1.1 --- a/src/cpu/sparc/vm/frame_sparc.cpp Thu Jan 28 20:41:37 2010 -0800 1.2 +++ b/src/cpu/sparc/vm/frame_sparc.cpp Fri Jan 29 12:13:05 2010 +0100 1.3 @@ -1,5 +1,5 @@ 1.4 /* 1.5 - * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved. 1.6 + * Copyright 1997-2010 Sun Microsystems, Inc. All Rights Reserved. 1.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.8 * 1.9 * This code is free software; you can redistribute it and/or modify it 1.10 @@ -366,8 +366,9 @@ 1.11 // as get_original_pc() needs correct value for unextended_sp() 1.12 if (_pc != NULL) { 1.13 _cb = CodeCache::find_blob(_pc); 1.14 - if (_cb != NULL && _cb->is_nmethod() && ((nmethod*)_cb)->is_deopt_pc(_pc)) { 1.15 - _pc = ((nmethod*)_cb)->get_original_pc(this); 1.16 + address original_pc = nmethod::get_deopt_original_pc(this); 1.17 + if (original_pc != NULL) { 1.18 + _pc = original_pc; 1.19 _deopt_state = is_deoptimized; 1.20 } else { 1.21 _deopt_state = not_deoptimized; 1.22 @@ -519,9 +520,9 @@ 1.23 _cb = CodeCache::find_blob(pc); 1.24 *O7_addr() = pc - pc_return_offset; 1.25 _cb = CodeCache::find_blob(_pc); 1.26 - if (_cb != NULL && _cb->is_nmethod() && ((nmethod*)_cb)->is_deopt_pc(_pc)) { 1.27 - address orig = ((nmethod*)_cb)->get_original_pc(this); 1.28 - assert(orig == _pc, "expected original to be stored before patching"); 1.29 + address original_pc = nmethod::get_deopt_original_pc(this); 1.30 + if (original_pc != NULL) { 1.31 + assert(original_pc == _pc, "expected original to be stored before patching"); 1.32 _deopt_state = is_deoptimized; 1.33 } else { 1.34 _deopt_state = not_deoptimized;