8212817: [JVMCI] ResolvedJavaMethod.isInVirtualMethodTable throws InternalError
Reviewed-by: never, iveresov
This commit is contained in:
parent
db6696837e
commit
272eb6824b
@ -725,7 +725,7 @@ final class HotSpotResolvedJavaMethodImpl extends HotSpotMethod implements HotSp
|
||||
return config().invalidVtableIndex;
|
||||
}
|
||||
if (holder.isInterface()) {
|
||||
if (resolved.isInterface()) {
|
||||
if (resolved.isInterface() || !resolved.isLinked()) {
|
||||
return config().invalidVtableIndex;
|
||||
}
|
||||
return getVtableIndexForInterfaceMethod(resolved);
|
||||
|
@ -429,11 +429,24 @@ public class TestResolvedJavaMethod extends MethodUniverse {
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
|
Loading…
Reference in New Issue
Block a user