Mercurial > hg > truffle
diff src/cpu/sparc/vm/frame_sparc.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 | d1605aabd0a1 |
children | 24128c2ffa87 |
line wrap: on
line diff
--- a/src/cpu/sparc/vm/frame_sparc.cpp Thu Jan 28 20:41:37 2010 -0800 +++ b/src/cpu/sparc/vm/frame_sparc.cpp Fri Jan 29 12:13:05 2010 +0100 @@ -1,5 +1,5 @@ /* - * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2010 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -366,8 +366,9 @@ // as get_original_pc() needs correct value for unextended_sp() if (_pc != NULL) { _cb = CodeCache::find_blob(_pc); - if (_cb != NULL && _cb->is_nmethod() && ((nmethod*)_cb)->is_deopt_pc(_pc)) { - _pc = ((nmethod*)_cb)->get_original_pc(this); + address original_pc = nmethod::get_deopt_original_pc(this); + if (original_pc != NULL) { + _pc = original_pc; _deopt_state = is_deoptimized; } else { _deopt_state = not_deoptimized; @@ -519,9 +520,9 @@ _cb = CodeCache::find_blob(pc); *O7_addr() = pc - pc_return_offset; _cb = CodeCache::find_blob(_pc); - if (_cb != NULL && _cb->is_nmethod() && ((nmethod*)_cb)->is_deopt_pc(_pc)) { - address orig = ((nmethod*)_cb)->get_original_pc(this); - assert(orig == _pc, "expected original to be stored before patching"); + address original_pc = nmethod::get_deopt_original_pc(this); + if (original_pc != NULL) { + assert(original_pc == _pc, "expected original to be stored before patching"); _deopt_state = is_deoptimized; } else { _deopt_state = not_deoptimized;