insertArguments asserts
Christian Thalinger
Christian.Thalinger at Sun.COM
Wed Sep 16 08:21:37 PDT 2009
Hi (John)!
While writing some tests for the compiler I stumbled over this assert in
the interpreter:
# Internal Error
(/Users/twisti/mlvm/hotspot/src/share/vm/runtime/sharedRuntime.cpp:591),
pid=19342, tid=2690041632
# Error: guarantee(cb->is_adapter_blob(),"exception happened outside
interpreter, nmethods and vtable stubs (1)")
The code that causes the assert is:
static int foo() throws Throwable {
return InvokeDynamic.<int>unknown(0);
}
static int target(int a0, int a1) { return a0 + a1; }
private static CallSite bootstrapDynamic(Class caller, String name,
MethodType type) {
MethodHandle target =
MethodHandles.lookup().findStatic(ia.class, "target",
MethodType.make(int.class, int.class, int.class));
CallSite site = new CallSite(caller, name, type);
site.setTarget(MethodHandles.insertArguments(target, 0,
Integer.valueOf(10)));
return site;
}
I think there is a typo in MethodHandles::generate_method_handle_stub():
diff --git a/src/cpu/x86/vm/methodHandles_x86.cpp
b/src/cpu/x86/vm/methodHandles_x86.cpp
--- a/src/cpu/x86/vm/methodHandles_x86.cpp
+++ b/src/cpu/x86/vm/methodHandles_x86.cpp
@@ -544,7 +544,6 @@
__ movl(Address(rax_argslot,
Interpreter::stackElementSize()), rbx_temp);
}
#endif //_LP64
- break;
}
if (direct_to_method) {
John, am I correct?
-- Christian
More information about the mlvm-dev
mailing list