src/cpu/zero/vm/cppInterpreter_zero.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File
*** old/src/cpu/zero/vm/cppInterpreter_zero.cpp Thu Mar 6 11:59:53 2014
--- new/src/cpu/zero/vm/cppInterpreter_zero.cpp Thu Mar 6 11:59:53 2014
*** 23,32 ****
--- 23,33 ----
*
*/
#include "precompiled.hpp"
#include "asm/assembler.hpp"
+ #include "ci/ciMethod.hpp"
#include "interpreter/bytecodeHistogram.hpp"
#include "interpreter/cppInterpreter.hpp"
#include "interpreter/interpreter.hpp"
#include "interpreter/interpreterGenerator.hpp"
#include "interpreter/interpreterRuntime.hpp"
*** 914,924 ****
--- 915,955 ----
stack->alloc((size_in_words - header_words) * wordSize);
return (InterpreterFrame *) fp;
}
! int AbstractInterpreter::layout_activation(Method* method,
! template<class M> int AbstractInterpreter::size_activation(M* method,
+ int tempcount,
+ int popframe_extra_args,
+ int moncount,
+ int callee_param_count,
+ int callee_locals,
+ bool is_top_frame) {
+ int header_words = InterpreterFrame::header_words;
+ int monitor_words = moncount * frame::interpreter_frame_monitor_size();
+ int stack_words = is_top_frame ? method->max_stack() : tempcount;
+ int callee_extra_locals = callee_locals - callee_param_count;
+
+ return header_words + monitor_words + stack_words + callee_extra_locals;
+ }
+
+ template int AbstractInterpreter::size_activation<Method>(Method* method,
+ int temps,
+ int popframe_args,
+ int monitors,
+ int callee_params,
+ int callee_locals,
+ bool is_top_frame);
+
+ template int AbstractInterpreter::size_activation<ciMethod>(ciMethod* method,
+ int temps,
+ int popframe_args,
+ int monitors,
+ int callee_params,
+ int callee_locals,
+ bool is_top_frame);
+ void AbstractInterpreter::layout_activation(Method* method,
int tempcount,
int popframe_extra_args,
int moncount,
int caller_actual_parameters,
int callee_param_count,
*** 933,957 ****
--- 964,982 ----
// This code must exactly match what InterpreterFrame::build
// does (the full InterpreterFrame::build, that is, not the
// one that creates empty frames for the deoptimizer).
//
// If interpreter_frame is not NULL then it will be filled in.
! // It's size is determined by a previous call to this method,
// so it should be correct.
+ // interpreter_frame will be filled in. It's size is determined by
! // a previous call to the size_activation() method,
//
// Note that tempcount is the current size of the expression
// stack. For top most frames we will allocate a full sized
// expression stack and not the trimmed version that non-top
// frames have.
int header_words = InterpreterFrame::header_words;
int monitor_words = moncount * frame::interpreter_frame_monitor_size();
int stack_words = is_top_frame ? method->max_stack() : tempcount;
int callee_extra_locals = callee_locals - callee_param_count;
if (interpreter_frame) {
intptr_t *locals = interpreter_frame->fp() + method->max_locals();
interpreterState istate = interpreter_frame->get_interpreterState();
intptr_t *monitor_base = (intptr_t*) istate;
intptr_t *stack_base = monitor_base - monitor_words;
intptr_t *stack = stack_base - tempcount - 1;
*** 964,975 ****
--- 989,998 ----
stack,
stack_base,
monitor_base,
NULL,
is_top_frame);
}
return header_words + monitor_words + stack_words + callee_extra_locals;
}
void BytecodeInterpreter::layout_interpreterState(interpreterState istate,
frame* caller,
frame* current,
src/cpu/zero/vm/cppInterpreter_zero.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File