Mercurial > hg > graal-jvmci-8
comparison src/share/vm/runtime/sharedRuntime.cpp @ 9023:f94bb5d20e5d
Rename MethodInvalidatedException to InvalidInstalledCodeException (and make it a checked exception). Make sure that a compiled code object can always be directly called without first doing a check on the native method pointer.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Thu, 11 Apr 2013 17:36:46 +0200 |
parents | e41c32a4d573 |
children | ff5a32117e02 |
comparison
equal
deleted
inserted
replaced
9002:7844a36d0216 | 9023:f94bb5d20e5d |
---|---|
81 #ifdef COMPILER1 | 81 #ifdef COMPILER1 |
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::_deoptimized_installed_code_blob; | |
86 RuntimeStub* SharedRuntime::_wrong_method_blob; | 87 RuntimeStub* SharedRuntime::_wrong_method_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; |
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() { |
105 _deoptimized_installed_code_blob = generate_resolve_blob(CAST_FROM_FN_PTR(address, SharedRuntime::handle_deoptimized_installed_code), "deoptimized_installed_code"); | |
104 _wrong_method_blob = generate_resolve_blob(CAST_FROM_FN_PTR(address, SharedRuntime::handle_wrong_method), "wrong_method_stub"); | 106 _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"); | 107 _ic_miss_blob = generate_resolve_blob(CAST_FROM_FN_PTR(address, SharedRuntime::handle_wrong_method_ic_miss), "ic_miss_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"); | 108 _resolve_opt_virtual_call_blob = generate_resolve_blob(CAST_FROM_FN_PTR(address, SharedRuntime::resolve_opt_virtual_call_C), "resolve_opt_virtual_call"); |
107 _resolve_virtual_call_blob = generate_resolve_blob(CAST_FROM_FN_PTR(address, SharedRuntime::resolve_virtual_call_C), "resolve_virtual_call"); | 109 _resolve_virtual_call_blob = generate_resolve_blob(CAST_FROM_FN_PTR(address, SharedRuntime::resolve_virtual_call_C), "resolve_virtual_call"); |
108 _resolve_static_call_blob = generate_resolve_blob(CAST_FROM_FN_PTR(address, SharedRuntime::resolve_static_call_C), "resolve_static_call"); | 110 _resolve_static_call_blob = generate_resolve_blob(CAST_FROM_FN_PTR(address, SharedRuntime::resolve_static_call_C), "resolve_static_call"); |
1348 // return compiled code entry point after potential safepoints | 1350 // return compiled code entry point after potential safepoints |
1349 assert(callee_method->verified_code_entry() != NULL, " Jump to zero!"); | 1351 assert(callee_method->verified_code_entry() != NULL, " Jump to zero!"); |
1350 return callee_method->verified_code_entry(); | 1352 return callee_method->verified_code_entry(); |
1351 JRT_END | 1353 JRT_END |
1352 | 1354 |
1355 // Installed code has been deoptimized | |
1356 JRT_BLOCK_ENTRY(address, SharedRuntime::handle_deoptimized_installed_code(JavaThread* thread)) | |
1357 JavaThread* THREAD = thread; | |
1358 THROW_(vmSymbols::java_lang_NullPointerException(), NULL); | |
1359 JRT_END | |
1353 | 1360 |
1354 // Handle call site that has been made non-entrant | 1361 // Handle call site that has been made non-entrant |
1355 JRT_BLOCK_ENTRY(address, SharedRuntime::handle_wrong_method(JavaThread* thread)) | 1362 JRT_BLOCK_ENTRY(address, SharedRuntime::handle_wrong_method(JavaThread* thread)) |
1356 // 6243940 We might end up in here if the callee is deoptimized | 1363 // 6243940 We might end up in here if the callee is deoptimized |
1357 // as we race to call it. We don't want to take a safepoint if | 1364 // as we race to call it. We don't want to take a safepoint if |