30 * @library ../common/patches
31 * @modules java.base/jdk.internal.misc
32 * @modules java.base/jdk.internal.org.objectweb.asm
33 * java.base/jdk.internal.org.objectweb.asm.tree
34 * jdk.vm.ci/jdk.vm.ci.hotspot
35 * jdk.vm.ci/jdk.vm.ci.code
36 * @clean compiler.jvmci.compilerToVM.*
37 * @compile -g DummyInterface.java
38 * @compile -g DummyAbstractClass.java
39 * @compile -g DummyClass.java
40 * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper
41 * @build compiler.jvmci.compilerToVM.GetLocalVariableTableTest
42 * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI
43 * compiler.jvmci.compilerToVM.GetLocalVariableTableTest
44 * @clean compiler.jvmci.compilerToVM.*
45 */
46
47 package compiler.jvmci.compilerToVM;
48
49 import compiler.jvmci.common.CTVMUtilities;
50 import jdk.vm.ci.hotspot.HotSpotResolvedJavaMethod;
51 import jdk.vm.ci.hotspot.CompilerToVMHelper;
52 import jdk.test.lib.Asserts;
53
54 import java.lang.reflect.Executable;
55 import java.util.HashMap;
56 import java.util.Map;
57
58 public class GetLocalVariableTableTest {
59
60 public static final int MAIN_LOCALS_COUNT = 0;
61 public static final int INSTANCE_LOCALS_COUNT = 4;
62 public static final int EMPTY_INSTANCE_COUNT = 1;
63 public static final int EMPTY_STATIC_COUNT = 0;
64 public static final int ABSTRACT_INHERIT_LOCALS_COUNT = 2;
65 public static final int DEFAULTFUNC_LOCALS_COUNT = 4;
66
67 public static void main(String[] args) {
68 Map<Executable, Integer> testCases = createTestCases();
69 testCases.forEach(GetLocalVariableTableTest::runSanityTest);
70 }
71
72 private static Map<Executable, Integer> createTestCases() {
|
30 * @library ../common/patches
31 * @modules java.base/jdk.internal.misc
32 * @modules java.base/jdk.internal.org.objectweb.asm
33 * java.base/jdk.internal.org.objectweb.asm.tree
34 * jdk.vm.ci/jdk.vm.ci.hotspot
35 * jdk.vm.ci/jdk.vm.ci.code
36 * @clean compiler.jvmci.compilerToVM.*
37 * @compile -g DummyInterface.java
38 * @compile -g DummyAbstractClass.java
39 * @compile -g DummyClass.java
40 * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper
41 * @build compiler.jvmci.compilerToVM.GetLocalVariableTableTest
42 * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI
43 * compiler.jvmci.compilerToVM.GetLocalVariableTableTest
44 * @clean compiler.jvmci.compilerToVM.*
45 */
46
47 package compiler.jvmci.compilerToVM;
48
49 import compiler.jvmci.common.CTVMUtilities;
50 import jdk.test.lib.Asserts;
51 import jdk.vm.ci.hotspot.CompilerToVMHelper;
52 import jdk.vm.ci.hotspot.HotSpotResolvedJavaMethod;
53
54 import java.lang.reflect.Executable;
55 import java.util.HashMap;
56 import java.util.Map;
57
58 public class GetLocalVariableTableTest {
59
60 public static final int MAIN_LOCALS_COUNT = 0;
61 public static final int INSTANCE_LOCALS_COUNT = 4;
62 public static final int EMPTY_INSTANCE_COUNT = 1;
63 public static final int EMPTY_STATIC_COUNT = 0;
64 public static final int ABSTRACT_INHERIT_LOCALS_COUNT = 2;
65 public static final int DEFAULTFUNC_LOCALS_COUNT = 4;
66
67 public static void main(String[] args) {
68 Map<Executable, Integer> testCases = createTestCases();
69 testCases.forEach(GetLocalVariableTableTest::runSanityTest);
70 }
71
72 private static Map<Executable, Integer> createTestCases() {
|