Mercurial > hg > truffle
comparison src/share/vm/runtime/frame.cpp @ 1216:7f8790caccb0
Merge
author | apangin |
---|---|
date | Thu, 04 Feb 2010 15:50:59 -0800 |
parents | 18a389214829 |
children | e3a4305c6bc3 |
comparison
equal
deleted
inserted
replaced
1215:f19bf22685cc | 1216:7f8790caccb0 |
---|---|
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. |
105 // hardware would want to see in the native frame. The only user (at this point) | 105 // hardware would want to see in the native frame. The only user (at this point) |
106 // is deoptimization. It likely no one else should ever use it. | 106 // is deoptimization. It likely no one else should ever use it. |
107 | 107 |
108 address frame::raw_pc() const { | 108 address frame::raw_pc() const { |
109 if (is_deoptimized_frame()) { | 109 if (is_deoptimized_frame()) { |
110 return ((nmethod*) cb())->deopt_handler_begin() - pc_return_offset; | 110 nmethod* nm = cb()->as_nmethod_or_null(); |
111 if (nm->is_method_handle_return(pc())) | |
112 return nm->deopt_mh_handler_begin() - pc_return_offset; | |
113 else | |
114 return nm->deopt_handler_begin() - pc_return_offset; | |
111 } else { | 115 } else { |
112 return (pc() - pc_return_offset); | 116 return (pc() - pc_return_offset); |
113 } | 117 } |
114 } | 118 } |
115 | 119 |
267 } | 271 } |
268 } | 272 } |
269 } // NeedsDeoptSuspend | 273 } // NeedsDeoptSuspend |
270 | 274 |
271 | 275 |
272 address deopt = nm->deopt_handler_begin(); | 276 // If the call site is a MethodHandle call site use the MH deopt |
277 // handler. | |
278 address deopt = nm->is_method_handle_return(pc()) ? | |
279 nm->deopt_mh_handler_begin() : | |
280 nm->deopt_handler_begin(); | |
281 | |
273 // Save the original pc before we patch in the new one | 282 // Save the original pc before we patch in the new one |
274 nm->set_original_pc(this, pc()); | 283 nm->set_original_pc(this, pc()); |
275 patch_pc(thread, deopt); | 284 patch_pc(thread, deopt); |
285 | |
276 #ifdef ASSERT | 286 #ifdef ASSERT |
277 { | 287 { |
278 RegisterMap map(thread, false); | 288 RegisterMap map(thread, false); |
279 frame check = thread->last_frame(); | 289 frame check = thread->last_frame(); |
280 while (id() != check.id()) { | 290 while (id() != check.id()) { |