< prev index next >
test/hotspot/jtreg/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestResolvedJavaMethod.java
Print this page
@@ -427,15 +427,28 @@
assertFalse(m.isJavaLangObjectInit());
}
}
}
+ static class UnlinkedType {
+ }
+
/**
* All public non-final methods should be available in the vtable.
*/
@Test
public void testVirtualMethodTableAccess() {
+ ResolvedJavaType unlinkedType = metaAccess.lookupJavaType(UnlinkedType.class);
+ assertTrue(!unlinkedType.isLinked());
+ for (Class<?> c : classes) {
+ if (c.isInterface()) {
+ for (Method m : c.getDeclaredMethods()) {
+ ResolvedJavaMethod method = metaAccess.lookupJavaMethod(m);
+ method.isInVirtualMethodTable(unlinkedType);
+ }
+ }
+ }
for (Class<?> c : classes) {
if (c.isPrimitive() || c.isInterface()) {
continue;
}
ResolvedJavaType receiverType = metaAccess.lookupJavaType(c);
< prev index next >