Mercurial > hg > truffle
comparison src/share/vm/opto/runtime.cpp @ 7428:2d6c433b1f38
8004741: Missing compiled exception handle table entry for multidimensional array allocation
Summary: Added missing exception path for multidimensional array allocation and use Throwable type instead of OutOfMemoryError for allocation's exception.
Reviewed-by: twisti
author | kvn |
---|---|
date | Wed, 19 Dec 2012 19:21:15 -0800 |
parents | 070d523b96a7 |
children | 989155e2d07a e76dd894b984 |
comparison
equal
deleted
inserted
replaced
7427:2c7f594145dc | 7428:2d6c433b1f38 |
---|---|
987 if (JvmtiExport::can_post_on_exceptions()) { | 987 if (JvmtiExport::can_post_on_exceptions()) { |
988 // "Full-speed catching" is not necessary here, | 988 // "Full-speed catching" is not necessary here, |
989 // since we're notifying the VM on every catch. | 989 // since we're notifying the VM on every catch. |
990 // Force deoptimization and the rest of the lookup | 990 // Force deoptimization and the rest of the lookup |
991 // will be fine. | 991 // will be fine. |
992 deoptimize_caller_frame(thread, true); | 992 deoptimize_caller_frame(thread); |
993 } | 993 } |
994 | 994 |
995 // Check the stack guard pages. If enabled, look for handler in this frame; | 995 // Check the stack guard pages. If enabled, look for handler in this frame; |
996 // otherwise, forcibly unwind the frame. | 996 // otherwise, forcibly unwind the frame. |
997 // | 997 // |
1141 return TypeFunc::make(domain, range); | 1141 return TypeFunc::make(domain, range); |
1142 } | 1142 } |
1143 | 1143 |
1144 | 1144 |
1145 void OptoRuntime::deoptimize_caller_frame(JavaThread *thread, bool doit) { | 1145 void OptoRuntime::deoptimize_caller_frame(JavaThread *thread, bool doit) { |
1146 // Deoptimize frame | 1146 // Deoptimize the caller before continuing, as the compiled |
1147 if (doit) { | 1147 // exception handler table may not be valid. |
1148 // Called from within the owner thread, so no need for safepoint | 1148 if (!StressCompiledExceptionHandlers && doit) { |
1149 RegisterMap reg_map(thread); | 1149 deoptimize_caller_frame(thread); |
1150 frame stub_frame = thread->last_frame(); | 1150 } |
1151 assert(stub_frame.is_runtime_frame() || exception_blob()->contains(stub_frame.pc()), "sanity check"); | 1151 } |
1152 frame caller_frame = stub_frame.sender(®_map); | 1152 |
1153 | 1153 void OptoRuntime::deoptimize_caller_frame(JavaThread *thread) { |
1154 // Deoptimize the caller frame. | 1154 // Called from within the owner thread, so no need for safepoint |
1155 Deoptimization::deoptimize_frame(thread, caller_frame.id()); | 1155 RegisterMap reg_map(thread); |
1156 } | 1156 frame stub_frame = thread->last_frame(); |
1157 assert(stub_frame.is_runtime_frame() || exception_blob()->contains(stub_frame.pc()), "sanity check"); | |
1158 frame caller_frame = stub_frame.sender(®_map); | |
1159 | |
1160 // Deoptimize the caller frame. | |
1161 Deoptimization::deoptimize_frame(thread, caller_frame.id()); | |
1157 } | 1162 } |
1158 | 1163 |
1159 | 1164 |
1160 bool OptoRuntime::is_deoptimized_caller_frame(JavaThread *thread) { | 1165 bool OptoRuntime::is_deoptimized_caller_frame(JavaThread *thread) { |
1161 // Called from within the owner thread, so no need for safepoint | 1166 // Called from within the owner thread, so no need for safepoint |