225 |
225 |
226 VMReg name = frame_map()->regname(opr); |
226 VMReg name = frame_map()->regname(opr); |
227 _oop_map->set_oop(name); |
227 _oop_map->set_oop(name); |
228 } |
228 } |
229 |
229 |
230 |
230 // Mirror the stack size calculation in the deopt code |
231 |
231 // How much stack space would we need at this point in the program in |
|
232 // case of deoptimization? |
|
233 int CodeEmitInfo::interpreter_frame_size() const { |
|
234 ValueStack* state = _stack; |
|
235 int size = 0; |
|
236 int callee_parameters = 0; |
|
237 int callee_locals = 0; |
|
238 int extra_args = state->scope()->method()->max_stack() - state->stack_size(); |
|
239 |
|
240 while (state != NULL) { |
|
241 int locks = state->locks_size(); |
|
242 int temps = state->stack_size(); |
|
243 bool is_top_frame = (state == _stack); |
|
244 ciMethod* method = state->scope()->method(); |
|
245 |
|
246 int frame_size = BytesPerWord * Interpreter::size_activation(method->max_stack(), |
|
247 temps + callee_parameters, |
|
248 extra_args, |
|
249 locks, |
|
250 callee_parameters, |
|
251 callee_locals, |
|
252 is_top_frame); |
|
253 size += frame_size; |
|
254 |
|
255 callee_parameters = method->size_of_parameters(); |
|
256 callee_locals = method->max_locals(); |
|
257 extra_args = 0; |
|
258 state = state->caller_state(); |
|
259 } |
|
260 return size + Deoptimization::last_frame_adjust(0, callee_locals) * BytesPerWord; |
|
261 } |
232 |
262 |
233 // Implementation of IR |
263 // Implementation of IR |
234 |
264 |
235 IR::IR(Compilation* compilation, ciMethod* method, int osr_bci) : |
265 IR::IR(Compilation* compilation, ciMethod* method, int osr_bci) : |
236 _locals_size(in_WordSize(-1)) |
266 _locals_size(in_WordSize(-1)) |