< prev index next >
test/compiler/jvmci/compilerToVM/ResolveConstantInPoolTest.java
Print this page
*** 40,50 ****
import java.lang.invoke.MethodHandle;
import java.lang.invoke.MethodType;
import java.util.HashMap;
import java.util.Map;
import jdk.vm.ci.hotspot.CompilerToVMHelper;
- import jdk.vm.ci.hotspot.HotSpotConstantPool;
import jdk.test.lib.Asserts;
import sun.reflect.ConstantPool;
/**
* Test for {@code compiler.jvmci.CompilerToVM.resolveConstantInPool} method
--- 40,49 ----
*** 60,70 ****
ResolveConstantInPoolTest::validateMethodType);
ConstantPoolTestCase testCase = new ConstantPoolTestCase(typeTests);
testCase.test();
}
! private static void validateMethodHandle(HotSpotConstantPool constantPoolCTVM,
ConstantPool constantPoolSS,
ConstantPoolTestsHelper.DummyClasses dummyClass, int index) {
Object constantInPool = CompilerToVMHelper
.resolveConstantInPool(constantPoolCTVM, index);
if (!(constantInPool instanceof MethodHandle)) {
--- 59,70 ----
ResolveConstantInPoolTest::validateMethodType);
ConstantPoolTestCase testCase = new ConstantPoolTestCase(typeTests);
testCase.test();
}
! private static void validateMethodHandle(
! jdk.vm.ci.meta.ConstantPool constantPoolCTVM,
ConstantPool constantPoolSS,
ConstantPoolTestsHelper.DummyClasses dummyClass, int index) {
Object constantInPool = CompilerToVMHelper
.resolveConstantInPool(constantPoolCTVM, index);
if (!(constantInPool instanceof MethodHandle)) {
*** 75,85 ****
MethodHandle.class.getName());
throw new AssertionError(msg);
}
}
! private static void validateMethodType(HotSpotConstantPool constantPoolCTVM,
ConstantPool constantPoolSS,
ConstantPoolTestsHelper.DummyClasses dummyClass, int index) {
Object constantInPool = CompilerToVMHelper
.resolveConstantInPool(constantPoolCTVM, index);
Class mtToVerify = constantInPool.getClass();
--- 75,86 ----
MethodHandle.class.getName());
throw new AssertionError(msg);
}
}
! private static void validateMethodType(
! jdk.vm.ci.meta.ConstantPool constantPoolCTVM,
ConstantPool constantPoolSS,
ConstantPoolTestsHelper.DummyClasses dummyClass, int index) {
Object constantInPool = CompilerToVMHelper
.resolveConstantInPool(constantPoolCTVM, index);
Class mtToVerify = constantInPool.getClass();
< prev index next >