187 vf = vf->sender(); |
187 vf = vf->sender(); |
188 } |
188 } |
189 assert(vf->is_compiled_frame(), "Wrong frame type"); |
189 assert(vf->is_compiled_frame(), "Wrong frame type"); |
190 chunk->push(compiledVFrame::cast(vf)); |
190 chunk->push(compiledVFrame::cast(vf)); |
191 |
191 |
192 ScopeDesc* trap_scope = chunk->at(0)->scope(); |
|
193 Handle exceptionObject; |
|
194 if (trap_scope->rethrow_exception()) { |
|
195 if (PrintDeoptimizationDetails) { |
|
196 tty->print_cr("Exception to be rethrown in the interpreter for method %s::%s at bci %d", trap_scope->method()->method_holder()->name()->as_C_string(), trap_scope->method()->name()->as_C_string(), trap_scope->bci()); |
|
197 } |
|
198 GrowableArray<ScopeValue*>* expressions = trap_scope->expressions(); |
|
199 guarantee(expressions != NULL && expressions->length() > 0, "must have exception to throw"); |
|
200 ScopeValue* topOfStack = expressions->top(); |
|
201 exceptionObject = StackValue::create_stack_value(&deoptee, &map, topOfStack)->get_obj(); |
|
202 assert(exceptionObject() != NULL, "exception oop can not be null"); |
|
203 } |
|
204 |
|
205 bool realloc_failures = false; |
192 bool realloc_failures = false; |
206 |
193 |
207 #if defined(COMPILER2) || INCLUDE_JVMCI |
194 #if defined(COMPILER2) || INCLUDE_JVMCI |
208 // Reallocate the non-escaping objects and restore their fields. Then |
195 // Reallocate the non-escaping objects and restore their fields. Then |
209 // relock objects if synchronization on them was eliminated. |
196 // relock objects if synchronization on them was eliminated. |
293 #ifndef INCLUDE_JVMCI |
280 #ifndef INCLUDE_JVMCI |
294 } |
281 } |
295 } |
282 } |
296 #endif // INCLUDE_JVMCI |
283 #endif // INCLUDE_JVMCI |
297 #endif // COMPILER2 || INCLUDE_JVMCI |
284 #endif // COMPILER2 || INCLUDE_JVMCI |
|
285 |
|
286 ScopeDesc* trap_scope = chunk->at(0)->scope(); |
|
287 Handle exceptionObject; |
|
288 if (trap_scope->rethrow_exception()) { |
|
289 if (PrintDeoptimizationDetails) { |
|
290 tty->print_cr("Exception to be rethrown in the interpreter for method %s::%s at bci %d", trap_scope->method()->method_holder()->name()->as_C_string(), trap_scope->method()->name()->as_C_string(), trap_scope->bci()); |
|
291 } |
|
292 GrowableArray<ScopeValue*>* expressions = trap_scope->expressions(); |
|
293 guarantee(expressions != NULL && expressions->length() > 0, "must have exception to throw"); |
|
294 ScopeValue* topOfStack = expressions->top(); |
|
295 exceptionObject = StackValue::create_stack_value(&deoptee, &map, topOfStack)->get_obj(); |
|
296 guarantee(exceptionObject() != NULL, "exception oop can not be null"); |
|
297 } |
298 |
298 |
299 // Ensure that no safepoint is taken after pointers have been stored |
299 // Ensure that no safepoint is taken after pointers have been stored |
300 // in fields of rematerialized objects. If a safepoint occurs from here on |
300 // in fields of rematerialized objects. If a safepoint occurs from here on |
301 // out the java state residing in the vframeArray will be missed. |
301 // out the java state residing in the vframeArray will be missed. |
302 NoSafepointVerifier no_safepoint; |
302 NoSafepointVerifier no_safepoint; |