comparison src/share/vm/runtime/deoptimization.cpp @ 1200:ba263cfb7611

6917766: JSR 292 needs its own deopt handler Summary: We need to introduce a new MH deopt handler so we can easily determine if the deopt happened at a MH call site or not. Reviewed-by: never, jrose
author twisti
date Fri, 29 Jan 2010 12:13:05 +0100
parents b2b6a9bf6238
children 24128c2ffa87
comparison
equal deleted inserted replaced
1199:0e14bd797dad 1200:ba263cfb7611
1 /* 1 /*
2 * Copyright 1997-2009 Sun Microsystems, Inc. All Rights Reserved. 2 * Copyright 1997-2010 Sun Microsystems, Inc. All Rights Reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
232 // Compute the caller frame based on the sender sp of stub_frame and stored frame sizes info. 232 // Compute the caller frame based on the sender sp of stub_frame and stored frame sizes info.
233 CodeBlob* cb = stub_frame.cb(); 233 CodeBlob* cb = stub_frame.cb();
234 // Verify we have the right vframeArray 234 // Verify we have the right vframeArray
235 assert(cb->frame_size() >= 0, "Unexpected frame size"); 235 assert(cb->frame_size() >= 0, "Unexpected frame size");
236 intptr_t* unpack_sp = stub_frame.sp() + cb->frame_size(); 236 intptr_t* unpack_sp = stub_frame.sp() + cb->frame_size();
237
238 // If the deopt call site is a MethodHandle invoke call site we have
239 // to adjust the unpack_sp.
240 nmethod* deoptee_nm = deoptee.cb()->as_nmethod_or_null();
241 if (deoptee_nm != NULL && deoptee_nm->is_method_handle_return(deoptee.pc()))
242 unpack_sp = deoptee.unextended_sp();
237 243
238 #ifdef ASSERT 244 #ifdef ASSERT
239 assert(cb->is_deoptimization_stub() || cb->is_uncommon_trap_stub(), "just checking"); 245 assert(cb->is_deoptimization_stub() || cb->is_uncommon_trap_stub(), "just checking");
240 Events::log("fetch unroll sp " INTPTR_FORMAT, unpack_sp); 246 Events::log("fetch unroll sp " INTPTR_FORMAT, unpack_sp);
241 #endif 247 #endif