summaryrefslogtreecommitdiffstats
path: root/dx
diff options
context:
space:
mode:
authorJean-Marie Henaff <jmhenaff@google.com>2014-01-17 10:04:52 +0100
committerSteve Kondik <shade@chemlab.org>2014-02-02 02:04:43 -0800
commit9c57d27d7943525f288de1122b506aea4c769dcc (patch)
tree9a56a63797319dcd858509842d6f2905149d881a /dx
parenta495ba91d6c01af4318b8b0ce2b5286180132036 (diff)
downloadandroid_dalvik-9c57d27d7943525f288de1122b506aea4c769dcc.tar.gz
android_dalvik-9c57d27d7943525f288de1122b506aea4c769dcc.tar.bz2
android_dalvik-9c57d27d7943525f288de1122b506aea4c769dcc.zip
Remove code related to extended-opcode.
- This support was removed one year ago. (cherry-pick from commit 18b65cbb3ec6634618bd3240a692507432e634b5) Change-Id: I1154e518dc8a15220f2fcb163056570030492bb0
Diffstat (limited to 'dx')
-rw-r--r--dx/src/com/android/dx/command/dexer/Main.java4
-rw-r--r--dx/src/com/android/dx/dex/DexOptions.java8
-rw-r--r--dx/src/com/android/dx/dex/code/Dops.java26
-rw-r--r--dx/src/com/android/dx/io/Opcodes.java17
4 files changed, 6 insertions, 49 deletions
diff --git a/dx/src/com/android/dx/command/dexer/Main.java b/dx/src/com/android/dx/command/dexer/Main.java
index ab6d2f788..d4c396903 100644
--- a/dx/src/com/android/dx/command/dexer/Main.java
+++ b/dx/src/com/android/dx/command/dexer/Main.java
@@ -1192,9 +1192,6 @@ public class Main {
*/
public boolean keepClassesInJar = false;
- /** what API level to target */
- public int targetApiLevel = DexFormat.API_NO_EXTENDED_OPCODES;
-
/** how much source position info to preserve */
public int positionInfo = PositionList.LINES;
@@ -1516,7 +1513,6 @@ public class Main {
cfOptions.warn = DxConsole.err;
dexOptions = new DexOptions();
- dexOptions.targetApiLevel = targetApiLevel;
dexOptions.forceJumbo = forceJumbo;
}
}
diff --git a/dx/src/com/android/dx/dex/DexOptions.java b/dx/src/com/android/dx/dex/DexOptions.java
index db0c7a2c5..60d83a84e 100644
--- a/dx/src/com/android/dx/dex/DexOptions.java
+++ b/dx/src/com/android/dx/dex/DexOptions.java
@@ -34,12 +34,4 @@ public class DexOptions {
public String getMagic() {
return DexFormat.apiToMagic(targetApiLevel);
}
-
- /**
- * Returns whether extended opcodes are allowed. This became
- * allowed as of Ice Cream Sandwich.
- */
- public boolean canUseExtendedOpcodes() {
- return targetApiLevel >= DexFormat.API_CURRENT;
- }
}
diff --git a/dx/src/com/android/dx/dex/code/Dops.java b/dx/src/com/android/dx/dex/code/Dops.java
index cc5c173ed..a84ddc098 100644
--- a/dx/src/com/android/dx/dex/code/Dops.java
+++ b/dx/src/com/android/dx/dex/code/Dops.java
@@ -1206,29 +1206,15 @@ public final class Dops {
* the last in its chain
*/
public static Dop getNextOrNull(Dop opcode, DexOptions options) {
- boolean suppressExtendedOpcodes = !options.canUseExtendedOpcodes();
+ int nextOpcode = opcode.getNextOpcode();
- for (;;) {
- int nextOpcode = opcode.getNextOpcode();
+ if (nextOpcode == Opcodes.NO_NEXT) {
+ return null;
+ }
- if (nextOpcode == Opcodes.NO_NEXT) {
- return null;
- }
-
- opcode = get(nextOpcode);
+ opcode = get(nextOpcode);
- if (suppressExtendedOpcodes && Opcodes.isExtended(nextOpcode)) {
- /*
- * Continuing rather than just returning null here
- * protects against the possibility that an
- * instruction fitting chain might list non-extended
- * opcodes after extended ones.
- */
- continue;
- }
-
- return opcode;
- }
+ return opcode;
}
/**
diff --git a/dx/src/com/android/dx/io/Opcodes.java b/dx/src/com/android/dx/io/Opcodes.java
index 6dba49d9e..611dbda43 100644
--- a/dx/src/com/android/dx/io/Opcodes.java
+++ b/dx/src/com/android/dx/io/Opcodes.java
@@ -327,23 +327,6 @@ public final class Opcodes {
}
/**
- * Gets whether ({@code true}) or not ({@code false}) the given
- * opcode value is an "extended" opcode (not counting the nop-like
- * payload opcodes). Extended opcodes require a full 16-bit code
- * unit to represent, without leaving space for an argument byte.
- *
- * @param opcode the opcode value
- * @return {@code true} iff the opcode is an "extended" opcode
- */
- public static boolean isExtended(int opcode) {
- /*
- * Note: Extended opcodes all have the form ((byteValue << 8)
- * | 0xff).
- */
- return (opcode >= 0x00ff);
- }
-
- /**
* Gets the opcode out of an opcode unit, the latter of which may also
* include one or more argument values.
*