--- old/src/share/vm/interpreter/abstractInterpreter.hpp 2015-12-17 17:52:16.940362833 -0500 +++ new/src/share/vm/interpreter/abstractInterpreter.hpp 2015-12-17 17:52:16.599523697 -0500 @@ -62,8 +62,8 @@ class AbstractInterpreter: AllStatic { friend class VMStructs; - friend class Interpreter; friend class CppInterpreterGenerator; + friend class TemplateInterpreterGenerator; public: enum MethodKind { zerolocals, // method needs locals initialization @@ -128,7 +128,6 @@ static address _rethrow_exception_entry; // rethrows an activation in previous frame friend class AbstractInterpreterGenerator; - friend class InterpreterGenerator; friend class InterpreterMacroAssembler; public: @@ -213,6 +212,29 @@ const static int stackElementSize = stackElementWords * wordSize; const static int logStackElementSize = LogBytesPerWord; + static int expr_index_at(int i) { + return stackElementWords * i; + } + + static int expr_offset_in_bytes(int i) { +#if defined(TARGET_ARCH_ppc) || defined(TARGET_ARCH_sparc) + return stackElementSize * i + wordSize; // both point to one word past TOS +#else + return stackElementSize * i; +#endif + } + + static int local_index_at(int i) { + assert(i <= 0, "local direction already negated"); + return stackElementWords * i; + } + +#ifdef TARGET_ARCH_x86 + static Address::ScaleFactor stackElementScale() { + return NOT_LP64(Address::times_4) LP64_ONLY(Address::times_8); + } +#endif + // Local values relative to locals[n] static int local_offset_in_bytes(int n) { return ((frame::interpreter_frame_expression_stack_direction() * n) * stackElementSize);