comparison src/share/vm/runtime/sharedRuntime.cpp @ 14442:1174c8abbdb6

Merge
author kvn
date Thu, 05 Dec 2013 15:13:12 -0800
parents 2b8e28fdf503 570aaefce624
children abec000618bf 5da8bb64b370
comparison
equal deleted inserted replaced
14441:e7cbc95179c4 14442:1174c8abbdb6
82 #include "c1/c1_Runtime1.hpp" 82 #include "c1/c1_Runtime1.hpp"
83 #endif 83 #endif
84 84
85 // Shared stub locations 85 // Shared stub locations
86 RuntimeStub* SharedRuntime::_wrong_method_blob; 86 RuntimeStub* SharedRuntime::_wrong_method_blob;
87 RuntimeStub* SharedRuntime::_wrong_method_abstract_blob;
87 RuntimeStub* SharedRuntime::_ic_miss_blob; 88 RuntimeStub* SharedRuntime::_ic_miss_blob;
88 RuntimeStub* SharedRuntime::_resolve_opt_virtual_call_blob; 89 RuntimeStub* SharedRuntime::_resolve_opt_virtual_call_blob;
89 RuntimeStub* SharedRuntime::_resolve_virtual_call_blob; 90 RuntimeStub* SharedRuntime::_resolve_virtual_call_blob;
90 RuntimeStub* SharedRuntime::_resolve_static_call_blob; 91 RuntimeStub* SharedRuntime::_resolve_static_call_blob;
91 92
99 #endif // COMPILER2 100 #endif // COMPILER2
100 101
101 102
102 //----------------------------generate_stubs----------------------------------- 103 //----------------------------generate_stubs-----------------------------------
103 void SharedRuntime::generate_stubs() { 104 void SharedRuntime::generate_stubs() {
104 _wrong_method_blob = generate_resolve_blob(CAST_FROM_FN_PTR(address, SharedRuntime::handle_wrong_method), "wrong_method_stub"); 105 _wrong_method_blob = generate_resolve_blob(CAST_FROM_FN_PTR(address, SharedRuntime::handle_wrong_method), "wrong_method_stub");
105 _ic_miss_blob = generate_resolve_blob(CAST_FROM_FN_PTR(address, SharedRuntime::handle_wrong_method_ic_miss), "ic_miss_stub"); 106 _wrong_method_abstract_blob = generate_resolve_blob(CAST_FROM_FN_PTR(address, SharedRuntime::handle_wrong_method_abstract), "wrong_method_abstract_stub");
106 _resolve_opt_virtual_call_blob = generate_resolve_blob(CAST_FROM_FN_PTR(address, SharedRuntime::resolve_opt_virtual_call_C), "resolve_opt_virtual_call"); 107 _ic_miss_blob = generate_resolve_blob(CAST_FROM_FN_PTR(address, SharedRuntime::handle_wrong_method_ic_miss), "ic_miss_stub");
107 _resolve_virtual_call_blob = generate_resolve_blob(CAST_FROM_FN_PTR(address, SharedRuntime::resolve_virtual_call_C), "resolve_virtual_call"); 108 _resolve_opt_virtual_call_blob = generate_resolve_blob(CAST_FROM_FN_PTR(address, SharedRuntime::resolve_opt_virtual_call_C), "resolve_opt_virtual_call");
108 _resolve_static_call_blob = generate_resolve_blob(CAST_FROM_FN_PTR(address, SharedRuntime::resolve_static_call_C), "resolve_static_call"); 109 _resolve_virtual_call_blob = generate_resolve_blob(CAST_FROM_FN_PTR(address, SharedRuntime::resolve_virtual_call_C), "resolve_virtual_call");
110 _resolve_static_call_blob = generate_resolve_blob(CAST_FROM_FN_PTR(address, SharedRuntime::resolve_static_call_C), "resolve_static_call");
109 111
110 #ifdef COMPILER2 112 #ifdef COMPILER2
111 // Vectors are generated only by C2. 113 // Vectors are generated only by C2.
112 if (is_wide_vector(MaxVectorSize)) { 114 if (is_wide_vector(MaxVectorSize)) {
113 _polling_page_vectors_safepoint_handler_blob = generate_handler_blob(CAST_FROM_FN_PTR(address, SafepointSynchronize::handle_polling_page_exception), POLL_AT_VECTOR_LOOP); 115 _polling_page_vectors_safepoint_handler_blob = generate_handler_blob(CAST_FROM_FN_PTR(address, SafepointSynchronize::handle_polling_page_exception), POLL_AT_VECTOR_LOOP);
1341 thread->set_vm_result_2(callee_method()); 1343 thread->set_vm_result_2(callee_method());
1342 JRT_BLOCK_END 1344 JRT_BLOCK_END
1343 // return compiled code entry point after potential safepoints 1345 // return compiled code entry point after potential safepoints
1344 assert(callee_method->verified_code_entry() != NULL, " Jump to zero!"); 1346 assert(callee_method->verified_code_entry() != NULL, " Jump to zero!");
1345 return callee_method->verified_code_entry(); 1347 return callee_method->verified_code_entry();
1348 JRT_END
1349
1350 // Handle abstract method call
1351 JRT_BLOCK_ENTRY(address, SharedRuntime::handle_wrong_method_abstract(JavaThread* thread))
1352 return StubRoutines::throw_AbstractMethodError_entry();
1346 JRT_END 1353 JRT_END
1347 1354
1348 1355
1349 // resolve a static call and patch code 1356 // resolve a static call and patch code
1350 JRT_BLOCK_ENTRY(address, SharedRuntime::resolve_static_call_C(JavaThread *thread )) 1357 JRT_BLOCK_ENTRY(address, SharedRuntime::resolve_static_call_C(JavaThread *thread ))
2339 if (_adapters != NULL) return; 2346 if (_adapters != NULL) return;
2340 _adapters = new AdapterHandlerTable(); 2347 _adapters = new AdapterHandlerTable();
2341 2348
2342 // Create a special handler for abstract methods. Abstract methods 2349 // Create a special handler for abstract methods. Abstract methods
2343 // are never compiled so an i2c entry is somewhat meaningless, but 2350 // are never compiled so an i2c entry is somewhat meaningless, but
2344 // fill it in with something appropriate just in case. Pass handle 2351 // throw AbstractMethodError just in case.
2345 // wrong method for the c2i transitions. 2352 // Pass wrong_method_abstract for the c2i transitions to return
2346 address wrong_method = SharedRuntime::get_handle_wrong_method_stub(); 2353 // AbstractMethodError for invalid invocations.
2354 address wrong_method_abstract = SharedRuntime::get_handle_wrong_method_abstract_stub();
2347 _abstract_method_handler = AdapterHandlerLibrary::new_entry(new AdapterFingerPrint(0, NULL), 2355 _abstract_method_handler = AdapterHandlerLibrary::new_entry(new AdapterFingerPrint(0, NULL),
2348 StubRoutines::throw_AbstractMethodError_entry(), 2356 StubRoutines::throw_AbstractMethodError_entry(),
2349 wrong_method, wrong_method); 2357 wrong_method_abstract, wrong_method_abstract);
2350 } 2358 }
2351 2359
2352 AdapterHandlerEntry* AdapterHandlerLibrary::new_entry(AdapterFingerPrint* fingerprint, 2360 AdapterHandlerEntry* AdapterHandlerLibrary::new_entry(AdapterFingerPrint* fingerprint,
2353 address i2c_entry, 2361 address i2c_entry,
2354 address c2i_entry, 2362 address c2i_entry,