summaryrefslogtreecommitdiffstats
path: root/dx
diff options
context:
space:
mode:
authormikaelpeltier <mikaelpeltier@google.com>2014-07-17 10:13:59 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-07-17 00:10:10 +0000
commitdd0d90c710486e4d6b13f69637223018842ee2bf (patch)
tree822cdddd9eef608ec6728fa1870e10ef4a89282b /dx
parent1186a9530ab33686225ed3e6f49cd5c88026a4a0 (diff)
parentb6679e4bf536353526ede471fab46721f03ad15b (diff)
downloadtoolchain_jack-dd0d90c710486e4d6b13f69637223018842ee2bf.zip
toolchain_jack-dd0d90c710486e4d6b13f69637223018842ee2bf.tar.gz
toolchain_jack-dd0d90c710486e4d6b13f69637223018842ee2bf.tar.bz2
Merge "Add comment explaining why some instructions are skipped" into jack-wip-dev
Diffstat (limited to 'dx')
-rw-r--r--dx/src/com/android/jack/dx/dex/code/OutputFinisher.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/dx/src/com/android/jack/dx/dex/code/OutputFinisher.java b/dx/src/com/android/jack/dx/dex/code/OutputFinisher.java
index b549982..df18147 100644
--- a/dx/src/com/android/jack/dx/dex/code/OutputFinisher.java
+++ b/dx/src/com/android/jack/dx/dex/code/OutputFinisher.java
@@ -800,6 +800,8 @@ while (guess != null) {
for (int i = 0; i < insnSize; i++) {
DalvInsn insn = insns.get(i);
+ // Since there is no need to replace CodeAddress since it does not use registers, skips it to
+ // avoid to update all TargetInsn that contain a reference to CodeAddress
if (!(insn instanceof CodeAddress)) {
insns.set(i, insn.withRegisterOffset(delta));
}
@@ -822,6 +824,8 @@ while (guess != null) {
for (int i = 0; i < insnSize; i++) {
DalvInsn insn = insns.get(i);
+ // Since there is no need to replace CodeAddress since it does not use registers, skips it to
+ // avoid to update all TargetInsn that contain a reference to CodeAddress
if (!(insn instanceof CodeAddress)) {
insns.set(i, insn.withRegisters(mapper.map(insn.getRegisters())));
}