Skip to content

Commit 5978ab7

Browse files
Fix peekAtInterpreterVTable for dynamically loaded types
1 parent 510ac1f commit 5978ab7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

substratevm/src/com.oracle.svm.interpreter/src/com/oracle/svm/interpreter/InterpreterToVM.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -707,12 +707,12 @@ private static CFunctionPointer getSVMVTableCodePointer(WordBase vtableEntry) {
707707

708708
private static InterpreterResolvedJavaMethod peekAtInterpreterVTable(Class<?> seedClass, Class<?> thisClass, int vTableIndex, boolean isInvokeInterface) {
709709
ResolvedJavaType thisType;
710-
if (DebuggerWithInterpreter.getValue()) {
710+
if (RuntimeClassLoading.isSupported()) {
711+
thisType = DynamicHub.fromClass(thisClass).getInterpreterType();
712+
} else {
713+
assert DebuggerWithInterpreter.getValue();
711714
DebuggerSupport interpreterSupport = ImageSingletons.lookup(DebuggerSupport.class);
712715
thisType = interpreterSupport.getUniverse().lookupType(thisClass);
713-
} else {
714-
assert RuntimeClassLoading.isSupported();
715-
throw VMError.unimplemented("obtain java type with vtable mirror");
716716
}
717717
VMError.guarantee(thisType != null);
718718
VMError.guarantee(thisType instanceof InterpreterResolvedObjectType);

0 commit comments

Comments
 (0)