--- old/src/share/vm/interpreter/templateTable.hpp 2016-12-12 12:56:04.404234167 -0500 +++ new/src/share/vm/interpreter/templateTable.hpp 2016-12-12 12:56:03.772231033 -0500 @@ -51,15 +51,17 @@ typedef void (*generator)(int arg); + Bytecodes::Code _code; // Bytecode generated by this template int _flags; // describes interpreter template properties (bcp unknown) TosState _tos_in; // tos cache state before template execution TosState _tos_out; // tos cache state after template execution generator _gen; // template code generator int _arg; // argument for template code generator - void initialize(int flags, TosState tos_in, TosState tos_out, generator gen, int arg); + void initialize(Bytecodes::Code code, int flags, TosState tos_in, TosState tos_out, generator gen, int arg); friend class TemplateTable; + friend class BCSetTemplate; public: Bytecodes::Code bytecode() const; @@ -73,11 +75,13 @@ void generate(InterpreterMacroAssembler* masm); }; +class BCSetTemplate; // The TemplateTable defines all Templates and provides accessor functions // to get the template for a given bytecode. class TemplateTable: AllStatic { + friend BCSetTemplate; public: enum Operation { add, sub, mul, div, rem, _and, _or, _xor, shl, shr, ushr }; enum Condition { equal, not_equal, less, less_equal, greater, greater_equal }; @@ -86,8 +90,8 @@ private: static bool _is_initialized; // true if TemplateTable has been initialized - static Template _template_table [Bytecodes::number_of_codes]; - static Template _template_table_wide[Bytecodes::number_of_codes]; + static Template* _template_table; + static Template* _template_table_wide; static Template* _desc; // the current template to be generated static Bytecodes::Code bytecode() { return _desc->bytecode(); } @@ -306,6 +310,7 @@ static void _new(); static void _vnew(); static void newarray(); + static void new_primitive_array(int type); static void anewarray(); static void vnewarray(); static void arraylength(); @@ -323,6 +328,8 @@ static void wide(); static void multianewarray(); + static void typed(); + static void fast_xaccess(TosState state); static void fast_accessfield(TosState state); static void fast_storefield(TosState state); @@ -357,6 +364,9 @@ static void initialize(); static void pd_initialize(); + // Cleanup + static void cleanup(); + // Templates static Template* template_for (Bytecodes::Code code) { Bytecodes::check (code); return &_template_table [code]; } static Template* template_for_wide(Bytecodes::Code code) { Bytecodes::wide_check(code); return &_template_table_wide[code]; }