提交 302a40d9 编写于 作者: M morris

8028319: ConflictingDefaultsTest.testReabstract spins when running with -mode invoke and -Xcomp

Summary: Change _abstract_method_handler to return AbstractMethodError i2c, c2i and c2iv entries.
Reviewed-by: kvn, vlivanov
上级 5200ee7e
...@@ -84,6 +84,7 @@ ...@@ -84,6 +84,7 @@
// Shared stub locations // Shared stub locations
RuntimeStub* SharedRuntime::_wrong_method_blob; RuntimeStub* SharedRuntime::_wrong_method_blob;
RuntimeStub* SharedRuntime::_wrong_method_abstract_blob;
RuntimeStub* SharedRuntime::_ic_miss_blob; RuntimeStub* SharedRuntime::_ic_miss_blob;
RuntimeStub* SharedRuntime::_resolve_opt_virtual_call_blob; RuntimeStub* SharedRuntime::_resolve_opt_virtual_call_blob;
RuntimeStub* SharedRuntime::_resolve_virtual_call_blob; RuntimeStub* SharedRuntime::_resolve_virtual_call_blob;
...@@ -101,11 +102,12 @@ UncommonTrapBlob* SharedRuntime::_uncommon_trap_blob; ...@@ -101,11 +102,12 @@ UncommonTrapBlob* SharedRuntime::_uncommon_trap_blob;
//----------------------------generate_stubs----------------------------------- //----------------------------generate_stubs-----------------------------------
void SharedRuntime::generate_stubs() { void SharedRuntime::generate_stubs() {
_wrong_method_blob = generate_resolve_blob(CAST_FROM_FN_PTR(address, SharedRuntime::handle_wrong_method), "wrong_method_stub"); _wrong_method_blob = generate_resolve_blob(CAST_FROM_FN_PTR(address, SharedRuntime::handle_wrong_method), "wrong_method_stub");
_ic_miss_blob = generate_resolve_blob(CAST_FROM_FN_PTR(address, SharedRuntime::handle_wrong_method_ic_miss), "ic_miss_stub"); _wrong_method_abstract_blob = generate_resolve_blob(CAST_FROM_FN_PTR(address, SharedRuntime::handle_wrong_method_abstract), "wrong_method_abstract_stub");
_resolve_opt_virtual_call_blob = generate_resolve_blob(CAST_FROM_FN_PTR(address, SharedRuntime::resolve_opt_virtual_call_C), "resolve_opt_virtual_call"); _ic_miss_blob = generate_resolve_blob(CAST_FROM_FN_PTR(address, SharedRuntime::handle_wrong_method_ic_miss), "ic_miss_stub");
_resolve_virtual_call_blob = generate_resolve_blob(CAST_FROM_FN_PTR(address, SharedRuntime::resolve_virtual_call_C), "resolve_virtual_call"); _resolve_opt_virtual_call_blob = generate_resolve_blob(CAST_FROM_FN_PTR(address, SharedRuntime::resolve_opt_virtual_call_C), "resolve_opt_virtual_call");
_resolve_static_call_blob = generate_resolve_blob(CAST_FROM_FN_PTR(address, SharedRuntime::resolve_static_call_C), "resolve_static_call"); _resolve_virtual_call_blob = generate_resolve_blob(CAST_FROM_FN_PTR(address, SharedRuntime::resolve_virtual_call_C), "resolve_virtual_call");
_resolve_static_call_blob = generate_resolve_blob(CAST_FROM_FN_PTR(address, SharedRuntime::resolve_static_call_C), "resolve_static_call");
#ifdef COMPILER2 #ifdef COMPILER2
// Vectors are generated only by C2. // Vectors are generated only by C2.
...@@ -1345,6 +1347,11 @@ JRT_BLOCK_ENTRY(address, SharedRuntime::handle_wrong_method(JavaThread* thread)) ...@@ -1345,6 +1347,11 @@ JRT_BLOCK_ENTRY(address, SharedRuntime::handle_wrong_method(JavaThread* thread))
return callee_method->verified_code_entry(); return callee_method->verified_code_entry();
JRT_END JRT_END
// Handle abstract method call
JRT_BLOCK_ENTRY(address, SharedRuntime::handle_wrong_method_abstract(JavaThread* thread))
return StubRoutines::throw_AbstractMethodError_entry();
JRT_END
// resolve a static call and patch code // resolve a static call and patch code
JRT_BLOCK_ENTRY(address, SharedRuntime::resolve_static_call_C(JavaThread *thread )) JRT_BLOCK_ENTRY(address, SharedRuntime::resolve_static_call_C(JavaThread *thread ))
...@@ -2341,12 +2348,13 @@ void AdapterHandlerLibrary::initialize() { ...@@ -2341,12 +2348,13 @@ void AdapterHandlerLibrary::initialize() {
// Create a special handler for abstract methods. Abstract methods // Create a special handler for abstract methods. Abstract methods
// are never compiled so an i2c entry is somewhat meaningless, but // are never compiled so an i2c entry is somewhat meaningless, but
// fill it in with something appropriate just in case. Pass handle // throw AbstractMethodError just in case.
// wrong method for the c2i transitions. // Pass wrong_method_abstract for the c2i transitions to return
address wrong_method = SharedRuntime::get_handle_wrong_method_stub(); // AbstractMethodError for invalid invocations.
address wrong_method_abstract = SharedRuntime::get_handle_wrong_method_abstract_stub();
_abstract_method_handler = AdapterHandlerLibrary::new_entry(new AdapterFingerPrint(0, NULL), _abstract_method_handler = AdapterHandlerLibrary::new_entry(new AdapterFingerPrint(0, NULL),
StubRoutines::throw_AbstractMethodError_entry(), StubRoutines::throw_AbstractMethodError_entry(),
wrong_method, wrong_method); wrong_method_abstract, wrong_method_abstract);
} }
AdapterHandlerEntry* AdapterHandlerLibrary::new_entry(AdapterFingerPrint* fingerprint, AdapterHandlerEntry* AdapterHandlerLibrary::new_entry(AdapterFingerPrint* fingerprint,
......
...@@ -56,6 +56,7 @@ class SharedRuntime: AllStatic { ...@@ -56,6 +56,7 @@ class SharedRuntime: AllStatic {
// Shared stub locations // Shared stub locations
static RuntimeStub* _wrong_method_blob; static RuntimeStub* _wrong_method_blob;
static RuntimeStub* _wrong_method_abstract_blob;
static RuntimeStub* _ic_miss_blob; static RuntimeStub* _ic_miss_blob;
static RuntimeStub* _resolve_opt_virtual_call_blob; static RuntimeStub* _resolve_opt_virtual_call_blob;
static RuntimeStub* _resolve_virtual_call_blob; static RuntimeStub* _resolve_virtual_call_blob;
...@@ -206,6 +207,11 @@ class SharedRuntime: AllStatic { ...@@ -206,6 +207,11 @@ class SharedRuntime: AllStatic {
return _wrong_method_blob->entry_point(); return _wrong_method_blob->entry_point();
} }
static address get_handle_wrong_method_abstract_stub() {
assert(_wrong_method_abstract_blob!= NULL, "oops");
return _wrong_method_abstract_blob->entry_point();
}
#ifdef COMPILER2 #ifdef COMPILER2
static void generate_uncommon_trap_blob(void); static void generate_uncommon_trap_blob(void);
static UncommonTrapBlob* uncommon_trap_blob() { return _uncommon_trap_blob; } static UncommonTrapBlob* uncommon_trap_blob() { return _uncommon_trap_blob; }
...@@ -481,6 +487,7 @@ class SharedRuntime: AllStatic { ...@@ -481,6 +487,7 @@ class SharedRuntime: AllStatic {
// handle ic miss with caller being compiled code // handle ic miss with caller being compiled code
// wrong method handling (inline cache misses, zombie methods) // wrong method handling (inline cache misses, zombie methods)
static address handle_wrong_method(JavaThread* thread); static address handle_wrong_method(JavaThread* thread);
static address handle_wrong_method_abstract(JavaThread* thread);
static address handle_wrong_method_ic_miss(JavaThread* thread); static address handle_wrong_method_ic_miss(JavaThread* thread);
#ifndef PRODUCT #ifndef PRODUCT
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册