19 *
20 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
21 * or visit www.oracle.com if you need additional information or have any
22 * questions.
23 *
24 */
25
26 #ifndef CPU_ZERO_VM_FRAME_ZERO_INLINE_HPP
27 #define CPU_ZERO_VM_FRAME_ZERO_INLINE_HPP
28
29 // Constructors
30
31 inline frame::frame() {
32 _zeroframe = NULL;
33 _sp = NULL;
34 _pc = NULL;
35 _cb = NULL;
36 _deopt_state = unknown;
37 }
38
39 inline address frame::sender_pc() const { ShouldNotCallThis(); }
40
41 inline frame::frame(ZeroFrame* zf, intptr_t* sp) {
42 _zeroframe = zf;
43 _sp = sp;
44 switch (zeroframe()->type()) {
45 case ZeroFrame::ENTRY_FRAME:
46 _pc = StubRoutines::call_stub_return_pc();
47 _cb = NULL;
48 _deopt_state = not_deoptimized;
49 break;
50
51 case ZeroFrame::INTERPRETER_FRAME:
52 _pc = NULL;
53 _cb = NULL;
54 _deopt_state = not_deoptimized;
55 break;
56
57 case ZeroFrame::SHARK_FRAME: {
58 _pc = zero_sharkframe()->pc();
59 _cb = CodeCache::find_blob_unsafe(pc());
72 _deopt_state = not_deoptimized;
73 break;
74
75 default:
76 ShouldNotReachHere();
77 }
78 }
79
80 // Accessors
81
82 inline intptr_t* frame::sender_sp() const {
83 return fp() + 1;
84 }
85
86 inline intptr_t* frame::real_fp() const {
87 return fp();
88 }
89
90 inline intptr_t* frame::link() const {
91 ShouldNotCallThis();
92 }
93
94 #ifdef CC_INTERP
95 inline interpreterState frame::get_interpreterState() const {
96 return zero_interpreterframe()->interpreter_state();
97 }
98
99 inline intptr_t** frame::interpreter_frame_locals_addr() const {
100 return &(get_interpreterState()->_locals);
101 }
102
103 inline intptr_t* frame::interpreter_frame_bcx_addr() const {
104 return (intptr_t*) &(get_interpreterState()->_bcp);
105 }
106
107 inline ConstantPoolCache** frame::interpreter_frame_cache_addr() const {
108 return &(get_interpreterState()->_constants);
109 }
110
111 inline Method** frame::interpreter_frame_method_addr() const {
134 return -1;
135 }
136
137 // Return a unique id for this frame. The id must have a value where
138 // we can distinguish identity and younger/older relationship. NULL
139 // represents an invalid (incomparable) frame.
140 inline intptr_t* frame::id() const {
141 return fp();
142 }
143
144 inline JavaCallWrapper** frame::entry_frame_call_wrapper_addr() const {
145 return zero_entryframe()->call_wrapper();
146 }
147
148 inline void frame::set_saved_oop_result(RegisterMap* map, oop obj) {
149 ShouldNotCallThis();
150 }
151
152 inline oop frame::saved_oop_result(RegisterMap* map) const {
153 ShouldNotCallThis();
154 }
155
156 inline bool frame::is_older(intptr_t* id) const {
157 ShouldNotCallThis();
158 }
159
160 inline intptr_t* frame::entry_frame_argument_at(int offset) const {
161 ShouldNotCallThis();
162 }
163
164 inline intptr_t* frame::unextended_sp() const {
165 if (zeroframe()->is_shark_frame())
166 return zero_sharkframe()->unextended_sp();
167 else
168 return (intptr_t *) -1;
169 }
170
171 #endif // CPU_ZERO_VM_FRAME_ZERO_INLINE_HPP
|
19 *
20 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
21 * or visit www.oracle.com if you need additional information or have any
22 * questions.
23 *
24 */
25
26 #ifndef CPU_ZERO_VM_FRAME_ZERO_INLINE_HPP
27 #define CPU_ZERO_VM_FRAME_ZERO_INLINE_HPP
28
29 // Constructors
30
31 inline frame::frame() {
32 _zeroframe = NULL;
33 _sp = NULL;
34 _pc = NULL;
35 _cb = NULL;
36 _deopt_state = unknown;
37 }
38
39 inline address frame::sender_pc() const { ShouldNotCallThis(); return NULL; }
40
41 inline frame::frame(ZeroFrame* zf, intptr_t* sp) {
42 _zeroframe = zf;
43 _sp = sp;
44 switch (zeroframe()->type()) {
45 case ZeroFrame::ENTRY_FRAME:
46 _pc = StubRoutines::call_stub_return_pc();
47 _cb = NULL;
48 _deopt_state = not_deoptimized;
49 break;
50
51 case ZeroFrame::INTERPRETER_FRAME:
52 _pc = NULL;
53 _cb = NULL;
54 _deopt_state = not_deoptimized;
55 break;
56
57 case ZeroFrame::SHARK_FRAME: {
58 _pc = zero_sharkframe()->pc();
59 _cb = CodeCache::find_blob_unsafe(pc());
72 _deopt_state = not_deoptimized;
73 break;
74
75 default:
76 ShouldNotReachHere();
77 }
78 }
79
80 // Accessors
81
82 inline intptr_t* frame::sender_sp() const {
83 return fp() + 1;
84 }
85
86 inline intptr_t* frame::real_fp() const {
87 return fp();
88 }
89
90 inline intptr_t* frame::link() const {
91 ShouldNotCallThis();
92 return NULL;
93 }
94
95 #ifdef CC_INTERP
96 inline interpreterState frame::get_interpreterState() const {
97 return zero_interpreterframe()->interpreter_state();
98 }
99
100 inline intptr_t** frame::interpreter_frame_locals_addr() const {
101 return &(get_interpreterState()->_locals);
102 }
103
104 inline intptr_t* frame::interpreter_frame_bcx_addr() const {
105 return (intptr_t*) &(get_interpreterState()->_bcp);
106 }
107
108 inline ConstantPoolCache** frame::interpreter_frame_cache_addr() const {
109 return &(get_interpreterState()->_constants);
110 }
111
112 inline Method** frame::interpreter_frame_method_addr() const {
135 return -1;
136 }
137
138 // Return a unique id for this frame. The id must have a value where
139 // we can distinguish identity and younger/older relationship. NULL
140 // represents an invalid (incomparable) frame.
141 inline intptr_t* frame::id() const {
142 return fp();
143 }
144
145 inline JavaCallWrapper** frame::entry_frame_call_wrapper_addr() const {
146 return zero_entryframe()->call_wrapper();
147 }
148
149 inline void frame::set_saved_oop_result(RegisterMap* map, oop obj) {
150 ShouldNotCallThis();
151 }
152
153 inline oop frame::saved_oop_result(RegisterMap* map) const {
154 ShouldNotCallThis();
155 return NULL;
156 }
157
158 inline bool frame::is_older(intptr_t* id) const {
159 ShouldNotCallThis();
160 return false;
161 }
162
163 inline intptr_t* frame::entry_frame_argument_at(int offset) const {
164 ShouldNotCallThis();
165 return NULL;
166 }
167
168 inline intptr_t* frame::unextended_sp() const {
169 if (zeroframe()->is_shark_frame())
170 return zero_sharkframe()->unextended_sp();
171 else
172 return (intptr_t *) -1;
173 }
174
175 #endif // CPU_ZERO_VM_FRAME_ZERO_INLINE_HPP
|