提交 88e51dd6 编写于 作者: V vlivanov

8034935: JSR 292 support for PopFrame has a fragile coupling with DirectMethodHandle

Reviewed-by: twisti, jrose, sspitsyn
上级 a9ca8905
......@@ -1269,8 +1269,10 @@ IRT_END
// This is a support of the JVMTI PopFrame interface.
// Make sure it is an invokestatic of a polymorphic intrinsic that has a member_name argument
// and return it as a vm_result so that it can be reloaded in the list of invokestatic parameters.
// The dmh argument is a reference to a DirectMethoHandle that has a member name field.
IRT_ENTRY(void, InterpreterRuntime::member_name_arg_or_null(JavaThread* thread, address dmh,
// The member_name argument is a saved reference (in local#0) to the member_name.
// For backward compatibility with some JDK versions (7, 8) it can also be a direct method handle.
// FIXME: remove DMH case after j.l.i.InvokerBytecodeGenerator code shape is updated.
IRT_ENTRY(void, InterpreterRuntime::member_name_arg_or_null(JavaThread* thread, address member_name,
Method* method, address bcp))
Bytecodes::Code code = Bytecodes::code_at(method, bcp);
if (code != Bytecodes::_invokestatic) {
......@@ -1282,8 +1284,12 @@ IRT_ENTRY(void, InterpreterRuntime::member_name_arg_or_null(JavaThread* thread,
Symbol* mname = cpool->name_ref_at(cp_index);
if (MethodHandles::has_member_arg(cname, mname)) {
oop member_name = java_lang_invoke_DirectMethodHandle::member((oop)dmh);
thread->set_vm_result(member_name);
oop member_name_oop = (oop) member_name;
if (java_lang_invoke_DirectMethodHandle::is_instance(member_name_oop)) {
// FIXME: remove after j.l.i.InvokerBytecodeGenerator code shape is updated.
member_name_oop = java_lang_invoke_DirectMethodHandle::member(member_name_oop);
}
thread->set_vm_result(member_name_oop);
}
IRT_END
#endif // INCLUDE_JVMTI
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册