< prev index next >
src/hotspot/share/runtime/sharedRuntime.cpp
Print this page
@@ -1538,20 +1538,31 @@
// resolve a static call and patch code
JRT_BLOCK_ENTRY(address, SharedRuntime::resolve_static_call_C(JavaThread *thread ))
methodHandle callee_method;
- JRT_BLOCK
+ JRT_BLOCK {
+ RegisterMap cbl_map(thread, false);
+ frame caller_frame = thread->last_frame().sender(&cbl_map);
+ CodeBlob* caller_cb = caller_frame.cb();
+ guarantee(caller_cb != NULL && caller_cb->is_compiled(), "must be called from compiled method");
+ CompiledMethod* caller_nm = caller_cb->as_compiled_method_or_null();
+ SimpleScopeDesc ssd(caller_nm, caller_frame.pc());
+ Bytecode bc(ssd.method(), ssd.method()->bcp_from(ssd.bci()));
+ if (bc.code() == Bytecodes::_if_acmpeq || bc.code() == Bytecodes::_if_acmpne) {
+ SystemDictionary::ValueBootstrapMethods_klass()->initialize(CHECK_NULL);
+ callee_method = SystemDictionary::ValueBootstrapMethods_klass()->find_method(vmSymbols::isSubstitutable_name(), vmSymbols::object_object_boolean_signature());
+ } else {
callee_method = SharedRuntime::resolve_helper(thread, false, false, CHECK_NULL);
+ }
thread->set_vm_result_2(callee_method());
- JRT_BLOCK_END
+ } JRT_BLOCK_END
// return compiled code entry point after potential safepoints
assert(callee_method->verified_code_entry() != NULL, " Jump to zero!");
return callee_method->verified_code_entry();
JRT_END
-
// resolve virtual call and update inline cache to monomorphic
JRT_BLOCK_ENTRY(address, SharedRuntime::resolve_virtual_call_C(JavaThread *thread ))
methodHandle callee_method;
JRT_BLOCK
callee_method = SharedRuntime::resolve_helper(thread, true, false, CHECK_NULL);
< prev index next >