hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp

Print this page




 816 
 817   // This code must exactly match what InterpreterFrame::build
 818   // does (the full InterpreterFrame::build, that is, not the
 819   // one that creates empty frames for the deoptimizer).
 820   //
 821   // If interpreter_frame is not NULL then it will be filled in.
 822   // It's size is determined by a previous call to this method,
 823   // so it should be correct.
 824   //
 825   // Note that tempcount is the current size of the expression
 826   // stack.  For top most frames we will allocate a full sized
 827   // expression stack and not the trimmed version that non-top
 828   // frames have.
 829 
 830   int header_words        = InterpreterFrame::header_words;
 831   int monitor_words       = moncount * frame::interpreter_frame_monitor_size();
 832   int stack_words         = is_top_frame ? method->max_stack() : tempcount;
 833   int callee_extra_locals = callee_locals - callee_param_count;
 834 
 835   if (interpreter_frame) {
 836     intptr_t *locals        = interpreter_frame->sp() + method->max_locals();
 837     interpreterState istate = interpreter_frame->get_interpreterState();
 838     intptr_t *monitor_base  = (intptr_t*) istate;
 839     intptr_t *stack_base    = monitor_base - monitor_words;
 840     intptr_t *stack         = stack_base - tempcount - 1;
 841 
 842     BytecodeInterpreter::layout_interpreterState(istate,
 843                                                  caller,
 844                                                  NULL,
 845                                                  method,
 846                                                  locals,
 847                                                  stack,
 848                                                  stack_base,
 849                                                  monitor_base,
 850                                                  NULL,
 851                                                  is_top_frame);
 852   }
 853   return header_words + monitor_words + stack_words + callee_extra_locals;
 854 }
 855 
 856 void BytecodeInterpreter::layout_interpreterState(interpreterState istate,




 816 
 817   // This code must exactly match what InterpreterFrame::build
 818   // does (the full InterpreterFrame::build, that is, not the
 819   // one that creates empty frames for the deoptimizer).
 820   //
 821   // If interpreter_frame is not NULL then it will be filled in.
 822   // It's size is determined by a previous call to this method,
 823   // so it should be correct.
 824   //
 825   // Note that tempcount is the current size of the expression
 826   // stack.  For top most frames we will allocate a full sized
 827   // expression stack and not the trimmed version that non-top
 828   // frames have.
 829 
 830   int header_words        = InterpreterFrame::header_words;
 831   int monitor_words       = moncount * frame::interpreter_frame_monitor_size();
 832   int stack_words         = is_top_frame ? method->max_stack() : tempcount;
 833   int callee_extra_locals = callee_locals - callee_param_count;
 834 
 835   if (interpreter_frame) {
 836     intptr_t *locals        = interpreter_frame->fp() + method->max_locals();
 837     interpreterState istate = interpreter_frame->get_interpreterState();
 838     intptr_t *monitor_base  = (intptr_t*) istate;
 839     intptr_t *stack_base    = monitor_base - monitor_words;
 840     intptr_t *stack         = stack_base - tempcount - 1;
 841 
 842     BytecodeInterpreter::layout_interpreterState(istate,
 843                                                  caller,
 844                                                  NULL,
 845                                                  method,
 846                                                  locals,
 847                                                  stack,
 848                                                  stack_base,
 849                                                  monitor_base,
 850                                                  NULL,
 851                                                  is_top_frame);
 852   }
 853   return header_words + monitor_words + stack_words + callee_extra_locals;
 854 }
 855 
 856 void BytecodeInterpreter::layout_interpreterState(interpreterState istate,