122
123
124
125 inline intptr_t* frame::link() const { return (intptr_t*) *(intptr_t **)addr_at(link_offset); }
126 inline void frame::set_link(intptr_t* addr) { *(intptr_t **)addr_at(link_offset) = addr; }
127
128
129 inline intptr_t* frame::unextended_sp() const { return _unextended_sp; }
130
131 // Return address:
132
133 inline address* frame::sender_pc_addr() const { return (address*) addr_at( return_addr_offset); }
134 inline address frame::sender_pc() const { return *sender_pc_addr(); }
135
136 // return address of param, zero origin index.
137 inline address* frame::native_param_addr(int idx) const { return (address*) addr_at( native_frame_initial_param_offset+idx); }
138
139 #ifdef CC_INTERP
140
141 inline interpreterState frame::get_interpreterState() const {
142 return ((interpreterState)addr_at( -sizeof(BytecodeInterpreter)/wordSize ));
143 }
144
145 inline intptr_t* frame::sender_sp() const {
146 // Hmm this seems awfully expensive QQQ, is this really called with interpreted frames?
147 if (is_interpreted_frame()) {
148 assert(false, "should never happen");
149 return get_interpreterState()->sender_sp();
150 } else {
151 return addr_at(sender_sp_offset);
152 }
153 }
154
155 inline intptr_t** frame::interpreter_frame_locals_addr() const {
156 assert(is_interpreted_frame(), "must be interpreted");
157 return &(get_interpreterState()->_locals);
158 }
159
160 inline intptr_t* frame::interpreter_frame_bcx_addr() const {
161 assert(is_interpreted_frame(), "must be interpreted");
162 return (intptr_t*) &(get_interpreterState()->_bcp);
|
122
123
124
125 inline intptr_t* frame::link() const { return (intptr_t*) *(intptr_t **)addr_at(link_offset); }
126 inline void frame::set_link(intptr_t* addr) { *(intptr_t **)addr_at(link_offset) = addr; }
127
128
129 inline intptr_t* frame::unextended_sp() const { return _unextended_sp; }
130
131 // Return address:
132
133 inline address* frame::sender_pc_addr() const { return (address*) addr_at( return_addr_offset); }
134 inline address frame::sender_pc() const { return *sender_pc_addr(); }
135
136 // return address of param, zero origin index.
137 inline address* frame::native_param_addr(int idx) const { return (address*) addr_at( native_frame_initial_param_offset+idx); }
138
139 #ifdef CC_INTERP
140
141 inline interpreterState frame::get_interpreterState() const {
142 return ((interpreterState)addr_at( -((int)sizeof(BytecodeInterpreter))/wordSize ));
143 }
144
145 inline intptr_t* frame::sender_sp() const {
146 // Hmm this seems awfully expensive QQQ, is this really called with interpreted frames?
147 if (is_interpreted_frame()) {
148 assert(false, "should never happen");
149 return get_interpreterState()->sender_sp();
150 } else {
151 return addr_at(sender_sp_offset);
152 }
153 }
154
155 inline intptr_t** frame::interpreter_frame_locals_addr() const {
156 assert(is_interpreted_frame(), "must be interpreted");
157 return &(get_interpreterState()->_locals);
158 }
159
160 inline intptr_t* frame::interpreter_frame_bcx_addr() const {
161 assert(is_interpreted_frame(), "must be interpreted");
162 return (intptr_t*) &(get_interpreterState()->_bcp);
|