Mercurial > hg > graal-jvmci-8
comparison src/share/vm/runtime/sharedRuntime.cpp @ 3363:167b70ff3abc
6939861: JVM should handle more conversion operations
Reviewed-by: twisti, jrose
author | never |
---|---|
date | Fri, 06 May 2011 16:33:13 -0700 |
parents | 2a23b1b5a0a8 |
children | f7d55ea6ee56 |
comparison
equal
deleted
inserted
replaced
3362:d4c1fbc3de95 | 3363:167b70ff3abc |
---|---|
86 HS_DTRACE_PROBE_DECL7(hotspot, method__entry, int, | 86 HS_DTRACE_PROBE_DECL7(hotspot, method__entry, int, |
87 char*, int, char*, int, char*, int); | 87 char*, int, char*, int, char*, int); |
88 HS_DTRACE_PROBE_DECL7(hotspot, method__return, int, | 88 HS_DTRACE_PROBE_DECL7(hotspot, method__return, int, |
89 char*, int, char*, int, char*, int); | 89 char*, int, char*, int, char*, int); |
90 | 90 |
91 RicochetBlob* SharedRuntime::_ricochet_blob = NULL; | |
92 | |
91 // Implementation of SharedRuntime | 93 // Implementation of SharedRuntime |
92 | 94 |
93 #ifndef PRODUCT | 95 #ifndef PRODUCT |
94 // For statistics | 96 // For statistics |
95 int SharedRuntime::_ic_miss_ctr = 0; | 97 int SharedRuntime::_ic_miss_ctr = 0; |
457 return StubRoutines::catch_exception_entry(); | 459 return StubRoutines::catch_exception_entry(); |
458 } | 460 } |
459 // Interpreted code | 461 // Interpreted code |
460 if (Interpreter::contains(return_address)) { | 462 if (Interpreter::contains(return_address)) { |
461 return Interpreter::rethrow_exception_entry(); | 463 return Interpreter::rethrow_exception_entry(); |
464 } | |
465 // Ricochet frame unwind code | |
466 if (SharedRuntime::ricochet_blob() != NULL && SharedRuntime::ricochet_blob()->returns_to_bounce_addr(return_address)) { | |
467 return SharedRuntime::ricochet_blob()->exception_addr(); | |
462 } | 468 } |
463 | 469 |
464 guarantee(blob == NULL || !blob->is_runtime_stub(), "caller should have skipped stub"); | 470 guarantee(blob == NULL || !blob->is_runtime_stub(), "caller should have skipped stub"); |
465 guarantee(!VtableStubs::contains(return_address), "NULL exceptions in vtables should have been handled already!"); | 471 guarantee(!VtableStubs::contains(return_address), "NULL exceptions in vtables should have been handled already!"); |
466 | 472 |
1172 RegisterMap reg_map(thread, false); | 1178 RegisterMap reg_map(thread, false); |
1173 frame stub_frame = thread->last_frame(); | 1179 frame stub_frame = thread->last_frame(); |
1174 assert(stub_frame.is_runtime_frame(), "sanity check"); | 1180 assert(stub_frame.is_runtime_frame(), "sanity check"); |
1175 frame caller_frame = stub_frame.sender(®_map); | 1181 frame caller_frame = stub_frame.sender(®_map); |
1176 assert(!caller_frame.is_interpreted_frame() && !caller_frame.is_entry_frame(), "unexpected frame"); | 1182 assert(!caller_frame.is_interpreted_frame() && !caller_frame.is_entry_frame(), "unexpected frame"); |
1183 assert(!caller_frame.is_ricochet_frame(), "unexpected frame"); | |
1177 #endif /* ASSERT */ | 1184 #endif /* ASSERT */ |
1178 | 1185 |
1179 methodHandle callee_method; | 1186 methodHandle callee_method; |
1180 JRT_BLOCK | 1187 JRT_BLOCK |
1181 callee_method = SharedRuntime::handle_ic_miss_helper(thread, CHECK_NULL); | 1188 callee_method = SharedRuntime::handle_ic_miss_helper(thread, CHECK_NULL); |
1220 } | 1227 } |
1221 } | 1228 } |
1222 | 1229 |
1223 if (caller_frame.is_interpreted_frame() || | 1230 if (caller_frame.is_interpreted_frame() || |
1224 caller_frame.is_entry_frame() || | 1231 caller_frame.is_entry_frame() || |
1232 caller_frame.is_ricochet_frame() || | |
1225 is_mh_invoke_via_adapter) { | 1233 is_mh_invoke_via_adapter) { |
1226 methodOop callee = thread->callee_target(); | 1234 methodOop callee = thread->callee_target(); |
1227 guarantee(callee != NULL && callee->is_method(), "bad handshake"); | 1235 guarantee(callee != NULL && callee->is_method(), "bad handshake"); |
1228 thread->set_vm_result(callee); | 1236 thread->set_vm_result(callee); |
1229 thread->set_callee_target(NULL); | 1237 thread->set_callee_target(NULL); |