comparison src/cpu/x86/vm/frame_x86.inline.hpp @ 1201:24128c2ffa87

6921339: backout 6917766 Reviewed-by: mr
author twisti
date Fri, 29 Jan 2010 08:33:24 -0800
parents ba263cfb7611
children 18a389214829
comparison
equal deleted inserted replaced
1200:ba263cfb7611 1201:24128c2ffa87
1 /* 1 /*
2 * Copyright 1997-2010 Sun Microsystems, Inc. All Rights Reserved. 2 * Copyright 1997-2009 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.
33 _fp = NULL; 33 _fp = NULL;
34 _cb = NULL; 34 _cb = NULL;
35 _deopt_state = unknown; 35 _deopt_state = unknown;
36 } 36 }
37 37
38 inline frame::frame(intptr_t* sp, intptr_t* fp, address pc) { 38 inline frame:: frame(intptr_t* sp, intptr_t* fp, address pc) {
39 _sp = sp; 39 _sp = sp;
40 _unextended_sp = sp; 40 _unextended_sp = sp;
41 _fp = fp; 41 _fp = fp;
42 _pc = pc; 42 _pc = pc;
43 assert(pc != NULL, "no pc?"); 43 assert(pc != NULL, "no pc?");
44 _cb = CodeCache::find_blob(pc); 44 _cb = CodeCache::find_blob(pc);
45 45 _deopt_state = not_deoptimized;
46 address original_pc = nmethod::get_deopt_original_pc(this); 46 if (_cb != NULL && _cb->is_nmethod() && ((nmethod*)_cb)->is_deopt_pc(_pc)) {
47 if (original_pc != NULL) { 47 _pc = (((nmethod*)_cb)->get_original_pc(this));
48 _pc = original_pc;
49 _deopt_state = is_deoptimized; 48 _deopt_state = is_deoptimized;
50 } else { 49 } else {
51 _deopt_state = not_deoptimized; 50 _deopt_state = not_deoptimized;
52 } 51 }
53 } 52 }
54 53
55 inline frame::frame(intptr_t* sp, intptr_t* unextended_sp, intptr_t* fp, address pc) { 54 inline frame:: frame(intptr_t* sp, intptr_t* unextended_sp, intptr_t* fp, address pc) {
56 _sp = sp; 55 _sp = sp;
57 _unextended_sp = unextended_sp; 56 _unextended_sp = unextended_sp;
58 _fp = fp; 57 _fp = fp;
59 _pc = pc; 58 _pc = pc;
60 assert(pc != NULL, "no pc?"); 59 assert(pc != NULL, "no pc?");
61 _cb = CodeCache::find_blob(pc); 60 _cb = CodeCache::find_blob(pc);
62 61 _deopt_state = not_deoptimized;
63 address original_pc = nmethod::get_deopt_original_pc(this); 62 if (_cb != NULL && _cb->is_nmethod() && ((nmethod*)_cb)->is_deopt_pc(_pc)) {
64 if (original_pc != NULL) { 63 _pc = (((nmethod*)_cb)->get_original_pc(this));
65 _pc = original_pc;
66 assert(((nmethod*)_cb)->code_contains(_pc), "original PC must be in nmethod");
67 _deopt_state = is_deoptimized; 64 _deopt_state = is_deoptimized;
68 } else { 65 } else {
69 _deopt_state = not_deoptimized; 66 _deopt_state = not_deoptimized;
70 } 67 }
71 } 68 }
87 // value. 84 // value.
88 // assert(_pc != NULL, "no pc?"); 85 // assert(_pc != NULL, "no pc?");
89 86
90 _cb = CodeCache::find_blob(_pc); 87 _cb = CodeCache::find_blob(_pc);
91 88
92 address original_pc = nmethod::get_deopt_original_pc(this); 89 _deopt_state = not_deoptimized;
93 if (original_pc != NULL) { 90 if (_cb != NULL && _cb->is_nmethod() && ((nmethod*)_cb)->is_deopt_pc(_pc)) {
94 _pc = original_pc; 91 _pc = (((nmethod*)_cb)->get_original_pc(this));
95 _deopt_state = is_deoptimized; 92 _deopt_state = is_deoptimized;
96 } else { 93 } else {
97 _deopt_state = not_deoptimized; 94 _deopt_state = not_deoptimized;
98 } 95 }
99 } 96 }