1.1 --- a/src/cpu/x86/vm/frame_x86.inline.hpp Fri Jan 29 12:13:05 2010 +0100 1.2 +++ b/src/cpu/x86/vm/frame_x86.inline.hpp Fri Jan 29 08:33:24 2010 -0800 1.3 @@ -1,5 +1,5 @@ 1.4 /* 1.5 - * Copyright 1997-2010 Sun Microsystems, Inc. All Rights Reserved. 1.6 + * Copyright 1997-2009 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 @@ -35,35 +35,32 @@ 1.11 _deopt_state = unknown; 1.12 } 1.13 1.14 -inline frame::frame(intptr_t* sp, intptr_t* fp, address pc) { 1.15 +inline frame:: frame(intptr_t* sp, intptr_t* fp, address pc) { 1.16 _sp = sp; 1.17 _unextended_sp = sp; 1.18 _fp = fp; 1.19 _pc = pc; 1.20 assert(pc != NULL, "no pc?"); 1.21 _cb = CodeCache::find_blob(pc); 1.22 - 1.23 - address original_pc = nmethod::get_deopt_original_pc(this); 1.24 - if (original_pc != NULL) { 1.25 - _pc = original_pc; 1.26 + _deopt_state = not_deoptimized; 1.27 + if (_cb != NULL && _cb->is_nmethod() && ((nmethod*)_cb)->is_deopt_pc(_pc)) { 1.28 + _pc = (((nmethod*)_cb)->get_original_pc(this)); 1.29 _deopt_state = is_deoptimized; 1.30 } else { 1.31 _deopt_state = not_deoptimized; 1.32 } 1.33 } 1.34 1.35 -inline frame::frame(intptr_t* sp, intptr_t* unextended_sp, intptr_t* fp, address pc) { 1.36 +inline frame:: frame(intptr_t* sp, intptr_t* unextended_sp, intptr_t* fp, address pc) { 1.37 _sp = sp; 1.38 _unextended_sp = unextended_sp; 1.39 _fp = fp; 1.40 _pc = pc; 1.41 assert(pc != NULL, "no pc?"); 1.42 _cb = CodeCache::find_blob(pc); 1.43 - 1.44 - address original_pc = nmethod::get_deopt_original_pc(this); 1.45 - if (original_pc != NULL) { 1.46 - _pc = original_pc; 1.47 - assert(((nmethod*)_cb)->code_contains(_pc), "original PC must be in nmethod"); 1.48 + _deopt_state = not_deoptimized; 1.49 + if (_cb != NULL && _cb->is_nmethod() && ((nmethod*)_cb)->is_deopt_pc(_pc)) { 1.50 + _pc = (((nmethod*)_cb)->get_original_pc(this)); 1.51 _deopt_state = is_deoptimized; 1.52 } else { 1.53 _deopt_state = not_deoptimized; 1.54 @@ -89,9 +86,9 @@ 1.55 1.56 _cb = CodeCache::find_blob(_pc); 1.57 1.58 - address original_pc = nmethod::get_deopt_original_pc(this); 1.59 - if (original_pc != NULL) { 1.60 - _pc = original_pc; 1.61 + _deopt_state = not_deoptimized; 1.62 + if (_cb != NULL && _cb->is_nmethod() && ((nmethod*)_cb)->is_deopt_pc(_pc)) { 1.63 + _pc = (((nmethod*)_cb)->get_original_pc(this)); 1.64 _deopt_state = is_deoptimized; 1.65 } else { 1.66 _deopt_state = not_deoptimized;