< prev index next >

src/hotspot/share/interpreter/templateTable.hpp

Print this page




  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #ifndef SHARE_VM_INTERPRETER_TEMPLATETABLE_HPP
  26 #define SHARE_VM_INTERPRETER_TEMPLATETABLE_HPP
  27 
  28 #include "interpreter/bytecodes.hpp"
  29 #include "memory/allocation.hpp"
  30 #include "runtime/frame.hpp"
  31 #include "utilities/macros.hpp"
  32 
  33 #ifndef CC_INTERP
  34 // All the necessary definitions used for (bytecode) template generation. Instead of
  35 // spreading the implementation functionality for each bytecode in the interpreter
  36 // and the snippet generator, a template is assigned to each bytecode which can be
  37 // used to generate the bytecode's implementation if needed.
  38 

  39 class InterpreterMacroAssembler;
  40 
  41 // A Template describes the properties of a code template for a given bytecode
  42 // and provides a generator to generate the code template.
  43 
  44 class Template {
  45  private:
  46   enum Flags {
  47     uses_bcp_bit,                                // set if template needs the bcp pointing to bytecode
  48     does_dispatch_bit,                           // set if template dispatches on its own
  49     calls_vm_bit,                                // set if template calls the vm
  50     wide_bit                                     // set if template belongs to a wide instruction
  51   };
  52 
  53   typedef void (*generator)(int arg);
  54 
  55   int       _flags;                              // describes interpreter template properties (bcp unknown)
  56   TosState  _tos_in;                             // tos cache state before template execution
  57   TosState  _tos_out;                            // tos cache state after  template execution
  58   generator _gen;                                // template code generator




  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #ifndef SHARE_VM_INTERPRETER_TEMPLATETABLE_HPP
  26 #define SHARE_VM_INTERPRETER_TEMPLATETABLE_HPP
  27 
  28 #include "interpreter/bytecodes.hpp"
  29 #include "memory/allocation.hpp"
  30 #include "runtime/frame.hpp"
  31 #include "utilities/macros.hpp"
  32 
  33 #ifndef CC_INTERP
  34 // All the necessary definitions used for (bytecode) template generation. Instead of
  35 // spreading the implementation functionality for each bytecode in the interpreter
  36 // and the snippet generator, a template is assigned to each bytecode which can be
  37 // used to generate the bytecode's implementation if needed.
  38 
  39 class BarrierSet;
  40 class InterpreterMacroAssembler;
  41 
  42 // A Template describes the properties of a code template for a given bytecode
  43 // and provides a generator to generate the code template.
  44 
  45 class Template {
  46  private:
  47   enum Flags {
  48     uses_bcp_bit,                                // set if template needs the bcp pointing to bytecode
  49     does_dispatch_bit,                           // set if template dispatches on its own
  50     calls_vm_bit,                                // set if template calls the vm
  51     wide_bit                                     // set if template belongs to a wide instruction
  52   };
  53 
  54   typedef void (*generator)(int arg);
  55 
  56   int       _flags;                              // describes interpreter template properties (bcp unknown)
  57   TosState  _tos_in;                             // tos cache state before template execution
  58   TosState  _tos_out;                            // tos cache state after  template execution
  59   generator _gen;                                // template code generator


< prev index next >