diff options
Diffstat (limited to 'org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ConstantTest.java')
-rw-r--r-- | org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ConstantTest.java | 686 |
1 files changed, 208 insertions, 478 deletions
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ConstantTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ConstantTest.java index ff042cef3c..1580da86e7 100644 --- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ConstantTest.java +++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ConstantTest.java @@ -19,8 +19,6 @@ import junit.framework.TestSuite; import org.eclipse.jdt.core.ToolFactory; import org.eclipse.jdt.core.tests.util.Util; import org.eclipse.jdt.core.util.ClassFileBytesDisassembler; -import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants; -import org.eclipse.jdt.internal.compiler.impl.CompilerOptions; public class ConstantTest extends AbstractRegressionTest { @@ -691,244 +689,110 @@ public void test014() { ""); // ensure boolean codegen got optimized (optimizedBooleanConstant) String expectedOutput = - CompilerOptions.versionToJdkLevel(getCompilerOptions().get(CompilerOptions.OPTION_Compliance)) < ClassFileConstants.JDK1_4 - ? " // Method descriptor #20 (LX;)V\n" + - " // Stack: 2, Locals: 4\n" + - " void foo1(X x);\n" + - " 0 iconst_0\n" + - " 1 dup\n" + - " 2 istore_2 [bb]\n" + - " 3 ifeq 8\n" + - " 6 iconst_0\n" + - " 7 istore_3\n" + - " 8 return\n" + - " Line numbers:\n" + - " [pc: 0, line: 9]\n" + - " [pc: 6, line: 10]\n" + - " [pc: 8, line: 12]\n" + - " Local variable table:\n" + - " [pc: 0, pc: 9] local: this index: 0 type: X\n" + - " [pc: 0, pc: 9] local: x index: 1 type: X\n" + - " [pc: 3, pc: 9] local: bb index: 2 type: boolean\n" + - " \n" + - " // Method descriptor #20 (LX;)V\n" + - " // Stack: 1, Locals: 2\n" + - " void foo2(X x);\n" + - " 0 iconst_0\n" + - " 1 ifeq 4\n" + - " 4 return\n" + - " Line numbers:\n" + - " [pc: 0, line: 14]\n" + - " [pc: 4, line: 17]\n" + - " Local variable table:\n" + - " [pc: 0, pc: 5] local: this index: 0 type: X\n" + - " [pc: 0, pc: 5] local: x index: 1 type: X\n" + - " \n" + - " // Method descriptor #20 (LX;)V\n" + - " // Stack: 1, Locals: 2\n" + - " void foo3(X x);\n" + - " 0 iconst_0\n" + - " 1 ifne 0\n" + - " 4 return\n" + - " Line numbers:\n" + - " [pc: 0, line: 19]\n" + - " [pc: 4, line: 22]\n" + - " Local variable table:\n" + - " [pc: 0, pc: 5] local: this index: 0 type: X\n" + - " [pc: 0, pc: 5] local: x index: 1 type: X\n" + - " \n" + - " // Method descriptor #20 (LX;)V\n" + - " // Stack: 1, Locals: 3\n" + - " void foo4(X x);\n" + - " 0 iconst_0\n" + - " 1 istore_2 [b]\n" + - " 2 return\n" + - " Line numbers:\n" + - " [pc: 0, line: 24]\n" + - " [pc: 2, line: 25]\n" + - " Local variable table:\n" + - " [pc: 0, pc: 3] local: this index: 0 type: X\n" + - " [pc: 0, pc: 3] local: x index: 1 type: X\n" + - " [pc: 2, pc: 3] local: b index: 2 type: boolean\n" + - " \n" + - " // Method descriptor #12 ()V\n" + - " // Stack: 1, Locals: 1\n" + - " void foo5();\n" + - " 0 aload_0 [this]\n" + - " 1 pop\n" + - " 2 return\n" + - " Line numbers:\n" + - " [pc: 0, line: 27]\n" + - " [pc: 2, line: 30]\n" + - " Local variable table:\n" + - " [pc: 0, pc: 3] local: this index: 0 type: X\n" + - " \n" + - " // Method descriptor #12 ()V\n" + - " // Stack: 1, Locals: 1\n" + - " void foo6();\n" + - " 0 aload_0 [this]\n" + - " 1 pop\n" + - " 2 iconst_0\n" + - " 3 ifeq 6\n" + - " 6 return\n" + - " Line numbers:\n" + - " [pc: 0, line: 32]\n" + - " [pc: 6, line: 35]\n" + - " Local variable table:\n" + - " [pc: 0, pc: 7] local: this index: 0 type: X\n" + - " \n" + - " // Method descriptor #12 ()V\n" + - " // Stack: 1, Locals: 1\n" + - " void foo7();\n" + - " 0 aload_0 [this]\n" + - " 1 pop\n" + - " 2 iconst_0\n" + - " 3 ifne 0\n" + - " 6 return\n" + - " Line numbers:\n" + - " [pc: 0, line: 37]\n" + - " [pc: 6, line: 40]\n" + - " Local variable table:\n" + - " [pc: 0, pc: 7] local: this index: 0 type: X\n" + - " \n" + - " // Method descriptor #12 ()V\n" + - " // Stack: 1, Locals: 2\n" + - " void foo8();\n" + - " 0 aload_0 [this]\n" + - " 1 pop\n" + - " 2 aload_0 [this]\n" + - " 3 pop\n" + - " 4 iconst_0\n" + - " 5 istore_1 [b]\n" + - " 6 return\n" + - " Line numbers:\n" + - " [pc: 0, line: 42]\n" + - " [pc: 6, line: 43]\n" + - " Local variable table:\n" + - " [pc: 0, pc: 7] local: this index: 0 type: X\n" + - " [pc: 6, pc: 7] local: b index: 1 type: boolean\n" + - "}" - : " // Method descriptor #20 (LX;)V\n" + - " // Stack: 2, Locals: 4\n" + - " void foo1(X x);\n" + - " 0 iconst_0\n" + - " 1 dup\n" + - " 2 istore_2 [bb]\n" + - " 3 ifeq 8\n" + - " 6 iconst_0\n" + - " 7 istore_3\n" + - " 8 return\n" + - " Line numbers:\n" + - " [pc: 0, line: 9]\n" + - " [pc: 6, line: 10]\n" + - " [pc: 8, line: 12]\n" + - " Local variable table:\n" + - " [pc: 0, pc: 9] local: this index: 0 type: X\n" + - " [pc: 0, pc: 9] local: x index: 1 type: X\n" + - " [pc: 3, pc: 9] local: bb index: 2 type: boolean\n" + - " \n" + - " // Method descriptor #20 (LX;)V\n" + - " // Stack: 1, Locals: 2\n" + - " void foo2(X x);\n" + - " 0 iconst_0\n" + - " 1 ifeq 4\n" + - " 4 return\n" + - " Line numbers:\n" + - " [pc: 0, line: 14]\n" + - " [pc: 4, line: 17]\n" + - " Local variable table:\n" + - " [pc: 0, pc: 5] local: this index: 0 type: X\n" + - " [pc: 0, pc: 5] local: x index: 1 type: X\n" + - " \n" + - " // Method descriptor #20 (LX;)V\n" + - " // Stack: 1, Locals: 2\n" + - " void foo3(X x);\n" + - " 0 iconst_0\n" + - " 1 ifne 0\n" + - " 4 return\n" + - " Line numbers:\n" + - " [pc: 0, line: 19]\n" + - " [pc: 4, line: 22]\n" + - " Local variable table:\n" + - " [pc: 0, pc: 5] local: this index: 0 type: X\n" + - " [pc: 0, pc: 5] local: x index: 1 type: X\n" + - " \n" + - " // Method descriptor #20 (LX;)V\n" + - " // Stack: 1, Locals: 3\n" + - " void foo4(X x);\n" + - " 0 iconst_0\n" + - " 1 istore_2 [b]\n" + - " 2 return\n" + - " Line numbers:\n" + - " [pc: 0, line: 24]\n" + - " [pc: 2, line: 25]\n" + - " Local variable table:\n" + - " [pc: 0, pc: 3] local: this index: 0 type: X\n" + - " [pc: 0, pc: 3] local: x index: 1 type: X\n" + - " [pc: 2, pc: 3] local: b index: 2 type: boolean\n" + - " \n" + - " // Method descriptor #12 ()V\n" + - " // Stack: 1, Locals: 1\n" + - " void foo5();\n" + - " 0 aload_0 [this]\n" + - " 1 getfield X.fx : X [28]\n" + - " 4 pop\n" + - " 5 return\n" + - " Line numbers:\n" + - " [pc: 0, line: 27]\n" + - " [pc: 5, line: 30]\n" + - " Local variable table:\n" + - " [pc: 0, pc: 6] local: this index: 0 type: X\n" + - " \n" + - " // Method descriptor #12 ()V\n" + - " // Stack: 1, Locals: 1\n" + - " void foo6();\n" + - " 0 aload_0 [this]\n" + - " 1 getfield X.fx : X [28]\n" + - " 4 pop\n" + - " 5 iconst_0\n" + - " 6 ifeq 9\n" + - " 9 return\n" + - " Line numbers:\n" + - " [pc: 0, line: 32]\n" + - " [pc: 9, line: 35]\n" + - " Local variable table:\n" + - " [pc: 0, pc: 10] local: this index: 0 type: X\n" + - " \n" + - " // Method descriptor #12 ()V\n" + - " // Stack: 1, Locals: 1\n" + - " void foo7();\n" + - " 0 aload_0 [this]\n" + - " 1 getfield X.fx : X [28]\n" + - " 4 pop\n" + - " 5 iconst_0\n" + - " 6 ifne 0\n" + - " 9 return\n" + - " Line numbers:\n" + - " [pc: 0, line: 37]\n" + - " [pc: 9, line: 40]\n" + - " Local variable table:\n" + - " [pc: 0, pc: 10] local: this index: 0 type: X\n" + - " \n" + - " // Method descriptor #12 ()V\n" + - " // Stack: 1, Locals: 2\n" + - " void foo8();\n" + - " 0 aload_0 [this]\n" + - " 1 getfield X.fx : X [28]\n" + - " 4 pop\n" + - " 5 aload_0 [this]\n" + - " 6 getfield X.fx : X [28]\n" + - " 9 pop\n" + - " 10 iconst_0\n" + - " 11 istore_1 [b]\n" + - " 12 return\n" + - " Line numbers:\n" + - " [pc: 0, line: 42]\n" + - " [pc: 12, line: 43]\n" + - " Local variable table:\n" + - " [pc: 0, pc: 13] local: this index: 0 type: X\n" + - " [pc: 12, pc: 13] local: b index: 1 type: boolean\n" + - "}"; + " // Method descriptor #20 (LX;)V\n" + + " // Stack: 2, Locals: 4\n" + + " void foo1(X x);\n" + + " 0 iconst_0\n" + + " 1 dup\n" + + " 2 istore_2 [bb]\n" + + " 3 ifeq 8\n" + + " 6 iconst_0\n" + + " 7 istore_3\n" + + " 8 return\n" + + " Line numbers:\n" + + " [pc: 0, line: 9]\n" + + " [pc: 6, line: 10]\n" + + " [pc: 8, line: 12]\n" + + " Local variable table:\n" + + " [pc: 0, pc: 9] local: this index: 0 type: X\n" + + " [pc: 0, pc: 9] local: x index: 1 type: X\n" + + " [pc: 3, pc: 9] local: bb index: 2 type: boolean\n" + + " \n" + + " // Method descriptor #20 (LX;)V\n" + + " // Stack: 1, Locals: 2\n" + + " void foo2(X x);\n" + + " 0 iconst_0\n" + + " 1 ifeq 4\n" + + " 4 return\n" + + " Line numbers:\n" + + " [pc: 0, line: 14]\n" + + " [pc: 4, line: 17]\n" + + " Local variable table:\n" + + " [pc: 0, pc: 5] local: this index: 0 type: X\n" + + " [pc: 0, pc: 5] local: x index: 1 type: X\n" + + " \n" + + " // Method descriptor #20 (LX;)V\n" + + " // Stack: 1, Locals: 2\n" + + " void foo3(X x);\n" + + " 0 iconst_0\n" + + " 1 ifne 0\n" + + " 4 return\n" + + " Line numbers:\n" + + " [pc: 0, line: 19]\n" + + " [pc: 4, line: 22]\n" + + " Local variable table:\n" + + " [pc: 0, pc: 5] local: this index: 0 type: X\n" + + " [pc: 0, pc: 5] local: x index: 1 type: X\n" + + " \n" + + " // Method descriptor #20 (LX;)V\n" + + " // Stack: 1, Locals: 3\n" + + " void foo4(X x);\n" + + " 0 iconst_0\n" + + " 1 istore_2 [b]\n" + + " 2 return\n" + + " Line numbers:\n" + + " [pc: 0, line: 24]\n" + + " [pc: 2, line: 25]\n" + + " Local variable table:\n" + + " [pc: 0, pc: 3] local: this index: 0 type: X\n" + + " [pc: 0, pc: 3] local: x index: 1 type: X\n" + + " [pc: 2, pc: 3] local: b index: 2 type: boolean\n" + + " \n" + + " // Method descriptor #12 ()V\n" + + " // Stack: 0, Locals: 1\n" + + " void foo5();\n" + + " 0 return\n" + + " Line numbers:\n" + + " [pc: 0, line: 30]\n" + + " Local variable table:\n" + + " [pc: 0, pc: 1] local: this index: 0 type: X\n" + + " \n" + + " // Method descriptor #12 ()V\n" + + " // Stack: 1, Locals: 1\n" + + " void foo6();\n" + + " 0 iconst_0\n" + + " 1 ifeq 4\n" + + " 4 return\n" + + " Line numbers:\n" + + " [pc: 0, line: 32]\n" + + " [pc: 4, line: 35]\n" + + " Local variable table:\n" + + " [pc: 0, pc: 5] local: this index: 0 type: X\n" + + " \n" + + " // Method descriptor #12 ()V\n" + + " // Stack: 1, Locals: 1\n" + + " void foo7();\n" + + " 0 iconst_0\n" + + " 1 ifne 0\n" + + " 4 return\n" + + " Line numbers:\n" + + " [pc: 0, line: 37]\n" + + " [pc: 4, line: 40]\n" + + " Local variable table:\n" + + " [pc: 0, pc: 5] local: this index: 0 type: X\n" + + " \n" + + " // Method descriptor #12 ()V\n" + + " // Stack: 1, Locals: 2\n" + + " void foo8();\n" + + " 0 iconst_0\n" + + " 1 istore_1 [b]\n" + + " 2 return\n" + + " Line numbers:\n" + + " [pc: 0, line: 42]\n" + + " [pc: 2, line: 43]\n" + + " Local variable table:\n" + + " [pc: 0, pc: 3] local: this index: 0 type: X\n" + + " [pc: 2, pc: 3] local: b index: 1 type: boolean\n"; try { File f = new File(OUTPUT_DIR + File.separator + "X.class"); @@ -1002,244 +866,110 @@ public void test015() { ""); // ensure boolean codegen got optimized (optimizedBooleanConstant) String expectedOutput = - CompilerOptions.versionToJdkLevel(getCompilerOptions().get(CompilerOptions.OPTION_Compliance)) < ClassFileConstants.JDK1_4 - ? " // Method descriptor #20 (LX;)V\n" + - " // Stack: 2, Locals: 4\n" + - " void foo1(X x);\n" + - " 0 iconst_0\n" + - " 1 dup\n" + - " 2 istore_2 [bb]\n" + - " 3 ifeq 8\n" + - " 6 iconst_0\n" + - " 7 istore_3\n" + - " 8 return\n" + - " Line numbers:\n" + - " [pc: 0, line: 9]\n" + - " [pc: 6, line: 10]\n" + - " [pc: 8, line: 12]\n" + - " Local variable table:\n" + - " [pc: 0, pc: 9] local: this index: 0 type: X\n" + - " [pc: 0, pc: 9] local: x index: 1 type: X\n" + - " [pc: 3, pc: 9] local: bb index: 2 type: boolean\n" + - " \n" + - " // Method descriptor #20 (LX;)V\n" + - " // Stack: 1, Locals: 2\n" + - " void foo2(X x);\n" + - " 0 iconst_0\n" + - " 1 ifeq 4\n" + - " 4 return\n" + - " Line numbers:\n" + - " [pc: 0, line: 14]\n" + - " [pc: 4, line: 17]\n" + - " Local variable table:\n" + - " [pc: 0, pc: 5] local: this index: 0 type: X\n" + - " [pc: 0, pc: 5] local: x index: 1 type: X\n" + - " \n" + - " // Method descriptor #20 (LX;)V\n" + - " // Stack: 1, Locals: 2\n" + - " void foo3(X x);\n" + - " 0 iconst_0\n" + - " 1 ifne 0\n" + - " 4 return\n" + - " Line numbers:\n" + - " [pc: 0, line: 19]\n" + - " [pc: 4, line: 22]\n" + - " Local variable table:\n" + - " [pc: 0, pc: 5] local: this index: 0 type: X\n" + - " [pc: 0, pc: 5] local: x index: 1 type: X\n" + - " \n" + - " // Method descriptor #20 (LX;)V\n" + - " // Stack: 1, Locals: 3\n" + - " void foo4(X x);\n" + - " 0 iconst_0\n" + - " 1 istore_2 [b]\n" + - " 2 return\n" + - " Line numbers:\n" + - " [pc: 0, line: 24]\n" + - " [pc: 2, line: 25]\n" + - " Local variable table:\n" + - " [pc: 0, pc: 3] local: this index: 0 type: X\n" + - " [pc: 0, pc: 3] local: x index: 1 type: X\n" + - " [pc: 2, pc: 3] local: b index: 2 type: boolean\n" + - " \n" + - " // Method descriptor #12 ()V\n" + - " // Stack: 1, Locals: 1\n" + - " void foo5();\n" + - " 0 aload_0 [this]\n" + - " 1 pop\n" + - " 2 return\n" + - " Line numbers:\n" + - " [pc: 0, line: 27]\n" + - " [pc: 2, line: 30]\n" + - " Local variable table:\n" + - " [pc: 0, pc: 3] local: this index: 0 type: X\n" + - " \n" + - " // Method descriptor #12 ()V\n" + - " // Stack: 1, Locals: 1\n" + - " void foo6();\n" + - " 0 aload_0 [this]\n" + - " 1 pop\n" + - " 2 iconst_0\n" + - " 3 ifeq 6\n" + - " 6 return\n" + - " Line numbers:\n" + - " [pc: 0, line: 32]\n" + - " [pc: 6, line: 35]\n" + - " Local variable table:\n" + - " [pc: 0, pc: 7] local: this index: 0 type: X\n" + - " \n" + - " // Method descriptor #12 ()V\n" + - " // Stack: 1, Locals: 1\n" + - " void foo7();\n" + - " 0 aload_0 [this]\n" + - " 1 pop\n" + - " 2 iconst_0\n" + - " 3 ifne 0\n" + - " 6 return\n" + - " Line numbers:\n" + - " [pc: 0, line: 37]\n" + - " [pc: 6, line: 40]\n" + - " Local variable table:\n" + - " [pc: 0, pc: 7] local: this index: 0 type: X\n" + - " \n" + - " // Method descriptor #12 ()V\n" + - " // Stack: 1, Locals: 2\n" + - " void foo8();\n" + - " 0 aload_0 [this]\n" + - " 1 pop\n" + - " 2 aload_0 [this]\n" + - " 3 pop\n" + - " 4 iconst_0\n" + - " 5 istore_1 [b]\n" + - " 6 return\n" + - " Line numbers:\n" + - " [pc: 0, line: 42]\n" + - " [pc: 6, line: 43]\n" + - " Local variable table:\n" + - " [pc: 0, pc: 7] local: this index: 0 type: X\n" + - " [pc: 6, pc: 7] local: b index: 1 type: boolean\n" + - "}" - : " // Method descriptor #20 (LX;)V\n" + - " // Stack: 2, Locals: 4\n" + - " void foo1(X x);\n" + - " 0 iconst_0\n" + - " 1 dup\n" + - " 2 istore_2 [bb]\n" + - " 3 ifeq 8\n" + - " 6 iconst_0\n" + - " 7 istore_3\n" + - " 8 return\n" + - " Line numbers:\n" + - " [pc: 0, line: 9]\n" + - " [pc: 6, line: 10]\n" + - " [pc: 8, line: 12]\n" + - " Local variable table:\n" + - " [pc: 0, pc: 9] local: this index: 0 type: X\n" + - " [pc: 0, pc: 9] local: x index: 1 type: X\n" + - " [pc: 3, pc: 9] local: bb index: 2 type: boolean\n" + - " \n" + - " // Method descriptor #20 (LX;)V\n" + - " // Stack: 1, Locals: 2\n" + - " void foo2(X x);\n" + - " 0 iconst_0\n" + - " 1 ifeq 4\n" + - " 4 return\n" + - " Line numbers:\n" + - " [pc: 0, line: 14]\n" + - " [pc: 4, line: 17]\n" + - " Local variable table:\n" + - " [pc: 0, pc: 5] local: this index: 0 type: X\n" + - " [pc: 0, pc: 5] local: x index: 1 type: X\n" + - " \n" + - " // Method descriptor #20 (LX;)V\n" + - " // Stack: 1, Locals: 2\n" + - " void foo3(X x);\n" + - " 0 iconst_0\n" + - " 1 ifne 0\n" + - " 4 return\n" + - " Line numbers:\n" + - " [pc: 0, line: 19]\n" + - " [pc: 4, line: 22]\n" + - " Local variable table:\n" + - " [pc: 0, pc: 5] local: this index: 0 type: X\n" + - " [pc: 0, pc: 5] local: x index: 1 type: X\n" + - " \n" + - " // Method descriptor #20 (LX;)V\n" + - " // Stack: 1, Locals: 3\n" + - " void foo4(X x);\n" + - " 0 iconst_0\n" + - " 1 istore_2 [b]\n" + - " 2 return\n" + - " Line numbers:\n" + - " [pc: 0, line: 24]\n" + - " [pc: 2, line: 25]\n" + - " Local variable table:\n" + - " [pc: 0, pc: 3] local: this index: 0 type: X\n" + - " [pc: 0, pc: 3] local: x index: 1 type: X\n" + - " [pc: 2, pc: 3] local: b index: 2 type: boolean\n" + - " \n" + - " // Method descriptor #12 ()V\n" + - " // Stack: 1, Locals: 1\n" + - " void foo5();\n" + - " 0 aload_0 [this]\n" + - " 1 getfield X.fx : X [28]\n" + - " 4 pop\n" + - " 5 return\n" + - " Line numbers:\n" + - " [pc: 0, line: 27]\n" + - " [pc: 5, line: 30]\n" + - " Local variable table:\n" + - " [pc: 0, pc: 6] local: this index: 0 type: X\n" + - " \n" + - " // Method descriptor #12 ()V\n" + - " // Stack: 1, Locals: 1\n" + - " void foo6();\n" + - " 0 aload_0 [this]\n" + - " 1 getfield X.fx : X [28]\n" + - " 4 pop\n" + - " 5 iconst_0\n" + - " 6 ifeq 9\n" + - " 9 return\n" + - " Line numbers:\n" + - " [pc: 0, line: 32]\n" + - " [pc: 9, line: 35]\n" + - " Local variable table:\n" + - " [pc: 0, pc: 10] local: this index: 0 type: X\n" + - " \n" + - " // Method descriptor #12 ()V\n" + - " // Stack: 1, Locals: 1\n" + - " void foo7();\n" + - " 0 aload_0 [this]\n" + - " 1 getfield X.fx : X [28]\n" + - " 4 pop\n" + - " 5 iconst_0\n" + - " 6 ifne 0\n" + - " 9 return\n" + - " Line numbers:\n" + - " [pc: 0, line: 37]\n" + - " [pc: 9, line: 40]\n" + - " Local variable table:\n" + - " [pc: 0, pc: 10] local: this index: 0 type: X\n" + - " \n" + - " // Method descriptor #12 ()V\n" + - " // Stack: 1, Locals: 2\n" + - " void foo8();\n" + - " 0 aload_0 [this]\n" + - " 1 getfield X.fx : X [28]\n" + - " 4 pop\n" + - " 5 aload_0 [this]\n" + - " 6 getfield X.fx : X [28]\n" + - " 9 pop\n" + - " 10 iconst_0\n" + - " 11 istore_1 [b]\n" + - " 12 return\n" + - " Line numbers:\n" + - " [pc: 0, line: 42]\n" + - " [pc: 12, line: 43]\n" + - " Local variable table:\n" + - " [pc: 0, pc: 13] local: this index: 0 type: X\n" + - " [pc: 12, pc: 13] local: b index: 1 type: boolean\n" + - "}"; + " // Method descriptor #20 (LX;)V\n" + + " // Stack: 2, Locals: 4\n" + + " void foo1(X x);\n" + + " 0 iconst_0\n" + + " 1 dup\n" + + " 2 istore_2 [bb]\n" + + " 3 ifeq 8\n" + + " 6 iconst_0\n" + + " 7 istore_3\n" + + " 8 return\n" + + " Line numbers:\n" + + " [pc: 0, line: 9]\n" + + " [pc: 6, line: 10]\n" + + " [pc: 8, line: 12]\n" + + " Local variable table:\n" + + " [pc: 0, pc: 9] local: this index: 0 type: X\n" + + " [pc: 0, pc: 9] local: x index: 1 type: X\n" + + " [pc: 3, pc: 9] local: bb index: 2 type: boolean\n" + + " \n" + + " // Method descriptor #20 (LX;)V\n" + + " // Stack: 1, Locals: 2\n" + + " void foo2(X x);\n" + + " 0 iconst_0\n" + + " 1 ifeq 4\n" + + " 4 return\n" + + " Line numbers:\n" + + " [pc: 0, line: 14]\n" + + " [pc: 4, line: 17]\n" + + " Local variable table:\n" + + " [pc: 0, pc: 5] local: this index: 0 type: X\n" + + " [pc: 0, pc: 5] local: x index: 1 type: X\n" + + " \n" + + " // Method descriptor #20 (LX;)V\n" + + " // Stack: 1, Locals: 2\n" + + " void foo3(X x);\n" + + " 0 iconst_0\n" + + " 1 ifne 0\n" + + " 4 return\n" + + " Line numbers:\n" + + " [pc: 0, line: 19]\n" + + " [pc: 4, line: 22]\n" + + " Local variable table:\n" + + " [pc: 0, pc: 5] local: this index: 0 type: X\n" + + " [pc: 0, pc: 5] local: x index: 1 type: X\n" + + " \n" + + " // Method descriptor #20 (LX;)V\n" + + " // Stack: 1, Locals: 3\n" + + " void foo4(X x);\n" + + " 0 iconst_0\n" + + " 1 istore_2 [b]\n" + + " 2 return\n" + + " Line numbers:\n" + + " [pc: 0, line: 24]\n" + + " [pc: 2, line: 25]\n" + + " Local variable table:\n" + + " [pc: 0, pc: 3] local: this index: 0 type: X\n" + + " [pc: 0, pc: 3] local: x index: 1 type: X\n" + + " [pc: 2, pc: 3] local: b index: 2 type: boolean\n" + + " \n" + + " // Method descriptor #12 ()V\n" + + " // Stack: 0, Locals: 1\n" + + " void foo5();\n" + + " 0 return\n" + + " Line numbers:\n" + + " [pc: 0, line: 30]\n" + + " Local variable table:\n" + + " [pc: 0, pc: 1] local: this index: 0 type: X\n" + + " \n" + + " // Method descriptor #12 ()V\n" + + " // Stack: 1, Locals: 1\n" + + " void foo6();\n" + + " 0 iconst_0\n" + + " 1 ifeq 4\n" + + " 4 return\n" + + " Line numbers:\n" + + " [pc: 0, line: 32]\n" + + " [pc: 4, line: 35]\n" + + " Local variable table:\n" + + " [pc: 0, pc: 5] local: this index: 0 type: X\n" + + " \n" + + " // Method descriptor #12 ()V\n" + + " // Stack: 1, Locals: 1\n" + + " void foo7();\n" + + " 0 iconst_0\n" + + " 1 ifne 0\n" + + " 4 return\n" + + " Line numbers:\n" + + " [pc: 0, line: 37]\n" + + " [pc: 4, line: 40]\n" + + " Local variable table:\n" + + " [pc: 0, pc: 5] local: this index: 0 type: X\n" + + " \n" + + " // Method descriptor #12 ()V\n" + + " // Stack: 1, Locals: 2\n" + + " void foo8();\n" + + " 0 iconst_0\n" + + " 1 istore_1 [b]\n" + + " 2 return\n" + + " Line numbers:\n" + + " [pc: 0, line: 42]\n" + + " [pc: 2, line: 43]\n" + + " Local variable table:\n" + + " [pc: 0, pc: 3] local: this index: 0 type: X\n" + + " [pc: 2, pc: 3] local: b index: 1 type: boolean\n"; try { File f = new File(OUTPUT_DIR + File.separator + "X.class"); |