equal
deleted
inserted
replaced
1265 |
1265 |
1266 #if INCLUDE_JVMTI |
1266 #if INCLUDE_JVMTI |
1267 // This is a support of the JVMTI PopFrame interface. |
1267 // This is a support of the JVMTI PopFrame interface. |
1268 // Make sure it is an invokestatic of a polymorphic intrinsic that has a member_name argument |
1268 // Make sure it is an invokestatic of a polymorphic intrinsic that has a member_name argument |
1269 // and return it as a vm_result so that it can be reloaded in the list of invokestatic parameters. |
1269 // and return it as a vm_result so that it can be reloaded in the list of invokestatic parameters. |
1270 // The dmh argument is a reference to a DirectMethoHandle that has a member name field. |
1270 // The member_name argument is a saved reference (in local#0) to the member_name. |
1271 IRT_ENTRY(void, InterpreterRuntime::member_name_arg_or_null(JavaThread* thread, address dmh, |
1271 // For backward compatibility with some JDK versions (7, 8) it can also be a direct method handle. |
|
1272 // FIXME: remove DMH case after j.l.i.InvokerBytecodeGenerator code shape is updated. |
|
1273 IRT_ENTRY(void, InterpreterRuntime::member_name_arg_or_null(JavaThread* thread, address member_name, |
1272 Method* method, address bcp)) |
1274 Method* method, address bcp)) |
1273 Bytecodes::Code code = Bytecodes::code_at(method, bcp); |
1275 Bytecodes::Code code = Bytecodes::code_at(method, bcp); |
1274 if (code != Bytecodes::_invokestatic) { |
1276 if (code != Bytecodes::_invokestatic) { |
1275 return; |
1277 return; |
1276 } |
1278 } |
1278 int cp_index = Bytes::get_native_u2(bcp + 1) + ConstantPool::CPCACHE_INDEX_TAG; |
1280 int cp_index = Bytes::get_native_u2(bcp + 1) + ConstantPool::CPCACHE_INDEX_TAG; |
1279 Symbol* cname = cpool->klass_name_at(cpool->klass_ref_index_at(cp_index)); |
1281 Symbol* cname = cpool->klass_name_at(cpool->klass_ref_index_at(cp_index)); |
1280 Symbol* mname = cpool->name_ref_at(cp_index); |
1282 Symbol* mname = cpool->name_ref_at(cp_index); |
1281 |
1283 |
1282 if (MethodHandles::has_member_arg(cname, mname)) { |
1284 if (MethodHandles::has_member_arg(cname, mname)) { |
1283 oop member_name = java_lang_invoke_DirectMethodHandle::member((oop)dmh); |
1285 oop member_name_oop = (oop) member_name; |
1284 thread->set_vm_result(member_name); |
1286 if (java_lang_invoke_DirectMethodHandle::is_instance(member_name_oop)) { |
|
1287 // FIXME: remove after j.l.i.InvokerBytecodeGenerator code shape is updated. |
|
1288 member_name_oop = java_lang_invoke_DirectMethodHandle::member(member_name_oop); |
|
1289 } |
|
1290 thread->set_vm_result(member_name_oop); |
1285 } |
1291 } |
1286 IRT_END |
1292 IRT_END |
1287 #endif // INCLUDE_JVMTI |
1293 #endif // INCLUDE_JVMTI |