summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenoit Lamarche <benoitlamarche@google.com>2015-07-20 16:48:46 +0200
committerBenoit Lamarche <benoitlamarche@google.com>2015-07-20 17:37:23 +0200
commit293f35ef9f6f952a8302b92a1546e6034c30a7c0 (patch)
treea6e5428e5c6bae193b4e354502b0d65def339455
parent511be00bb0fb0db47870da7a02af654a481b8f00 (diff)
downloadtoolchain_jill-293f35ef9f6f952a8302b92a1546e6034c30a7c0.tar.gz
toolchain_jill-293f35ef9f6f952a8302b92a1546e6034c30a7c0.tar.bz2
toolchain_jill-293f35ef9f6f952a8302b92a1546e6034c30a7c0.zip
Modify synthetic catch variable names
So that they match other Jill synthetic variable names. Change-Id: I2fcdce58cbad4fd1bb8e2fb6aeb15f16498b2a8d
-rw-r--r--jill/src/com/android/jill/frontend/java/MethodBodyWriter.java16
1 files changed, 8 insertions, 8 deletions
diff --git a/jill/src/com/android/jill/frontend/java/MethodBodyWriter.java b/jill/src/com/android/jill/frontend/java/MethodBodyWriter.java
index f68c9e7..77a5a69 100644
--- a/jill/src/com/android/jill/frontend/java/MethodBodyWriter.java
+++ b/jill/src/com/android/jill/frontend/java/MethodBodyWriter.java
@@ -332,7 +332,7 @@ public class MethodBodyWriter extends JillWriter implements Opcodes {
} else if (AsmHelper.isAbstract(currentMethod)) {
writer.writeNull();
} else {
- createCatchedVariables();
+ createCaughtVariables();
currentLine = startLine;
writeJavaMethodBody();
}
@@ -360,22 +360,22 @@ public class MethodBodyWriter extends JillWriter implements Opcodes {
}
}
- private void createCatchedVariables() {
+ private void createCaughtVariables() {
for (TryCatchBlockNode tryCatchNode : currentMethod.tryCatchBlocks) {
Variable declaringCatchVariable = null;
- Type catchedType;
+ Type caughtType;
if (tryCatchNode.type == null) {
// Jack represents finally by a catch on java.lang.Object.
- catchedType = Type.getType(Object.class);
+ caughtType = Type.getType(Object.class);
} else {
- // If there is multi catches, it is not possible to compute precisely the common type of
+ // If there are multi catches, it is not possible to compute precisely the common type of
// exceptions without having the full classpath and by loading all classes. Jill uses
// Throwable as common type even when a more precise type is known.
// This type will be cast with a reinterpret cast to the right type when it will be used.
- catchedType = Type.getType(Throwable.class);
+ caughtType = Type.getType(Throwable.class);
}
- String id = "catchedExceptionNotUsed" + (unusedVarCount++);
- declaringCatchVariable = new Variable(id, id, catchedType, null);
+ String id = "-e_" + (unusedVarCount++);
+ declaringCatchVariable = new Variable(id, id, caughtType, null);
catchBlockToCatchedVariable.put(tryCatchNode, declaringCatchVariable);
}
}