hotspot/src/share/vm/interpreter/templateInterpreter.hpp
changeset 35214 d86005e0b4c2
parent 31620 53be635ad49c
child 35479 62c12ca7a45e
equal deleted inserted replaced
35211:3771329165d4 35214:d86005e0b4c2
    32 // of the template interpreter and the template interpreter generator.
    32 // of the template interpreter and the template interpreter generator.
    33 
    33 
    34 #ifndef CC_INTERP
    34 #ifndef CC_INTERP
    35 
    35 
    36 class InterpreterMacroAssembler;
    36 class InterpreterMacroAssembler;
       
    37 class InterpreterCodelet;
    37 
    38 
    38 //------------------------------------------------------------------------------------------------------------------------
    39 //------------------------------------------------------------------------------------------------------------------------
    39 // A little wrapper class to group tosca-specific entry points into a unit.
    40 // A little wrapper class to group tosca-specific entry points into a unit.
    40 // (tosca = Top-Of-Stack CAche)
    41 // (tosca = Top-Of-Stack CAche)
    41 
    42 
    83 
    84 
    84 class TemplateInterpreter: public AbstractInterpreter {
    85 class TemplateInterpreter: public AbstractInterpreter {
    85   friend class VMStructs;
    86   friend class VMStructs;
    86   friend class InterpreterMacroAssembler;
    87   friend class InterpreterMacroAssembler;
    87   friend class TemplateInterpreterGenerator;
    88   friend class TemplateInterpreterGenerator;
    88   friend class InterpreterGenerator;
       
    89   friend class TemplateTable;
    89   friend class TemplateTable;
    90   friend class CodeCacheExtensions;
    90   friend class CodeCacheExtensions;
    91   // friend class Interpreter;
    91   // friend class Interpreter;
    92  public:
    92  public:
    93 
    93 
   135  public:
   135  public:
   136   // Initialization/debugging
   136   // Initialization/debugging
   137   static void       initialize();
   137   static void       initialize();
   138   // this only returns whether a pc is within generated code for the interpreter.
   138   // this only returns whether a pc is within generated code for the interpreter.
   139   static bool       contains(address pc)                        { return _code != NULL && _code->contains(pc); }
   139   static bool       contains(address pc)                        { return _code != NULL && _code->contains(pc); }
       
   140   // Debugging/printing
       
   141   static InterpreterCodelet* codelet_containing(address pc);
       
   142 
   140 
   143 
   141  public:
   144  public:
   142 
   145 
   143   static address    remove_activation_early_entry(TosState state) { return _earlyret_entry.entry(state); }
   146   static address    remove_activation_early_entry(TosState state) { return _earlyret_entry.entry(state); }
   144 #ifdef HOTSWAP
   147 #ifdef HOTSWAP
   186   // Deoptimization should reexecute this bytecode
   189   // Deoptimization should reexecute this bytecode
   187   static bool    bytecode_should_reexecute(Bytecodes::Code code);
   190   static bool    bytecode_should_reexecute(Bytecodes::Code code);
   188   // Compute the address for reexecution
   191   // Compute the address for reexecution
   189   static address deopt_reexecute_entry(Method* method, address bcp);
   192   static address deopt_reexecute_entry(Method* method, address bcp);
   190 
   193 
   191 #ifdef TARGET_ARCH_x86
   194   // Size of interpreter code.  Max size with JVMTI
   192 # include "templateInterpreter_x86.hpp"
   195   static int InterpreterCodeSize;
       
   196 
       
   197 #ifdef PPC
       
   198  public:
       
   199   // PPC-only: Support abs and sqrt like in compiler.
       
   200   // For others we can use a normal (native) entry.
       
   201   static bool math_entry_available(AbstractInterpreter::MethodKind kind);
   193 #endif
   202 #endif
   194 #ifdef TARGET_ARCH_sparc
       
   195 # include "templateInterpreter_sparc.hpp"
       
   196 #endif
       
   197 #ifdef TARGET_ARCH_zero
       
   198 # include "templateInterpreter_zero.hpp"
       
   199 #endif
       
   200 #ifdef TARGET_ARCH_arm
       
   201 # include "templateInterpreter_arm.hpp"
       
   202 #endif
       
   203 #ifdef TARGET_ARCH_ppc
       
   204 # include "templateInterpreter_ppc.hpp"
       
   205 #endif
       
   206 #ifdef TARGET_ARCH_aarch64
       
   207 # include "templateInterpreter_aarch64.hpp"
       
   208 #endif
       
   209 
       
   210 
       
   211 };
   203 };
   212 
   204 
   213 #endif // !CC_INTERP
   205 #endif // !CC_INTERP
   214 
   206 
   215 #endif // SHARE_VM_INTERPRETER_TEMPLATEINTERPRETER_HPP
   207 #endif // SHARE_VM_INTERPRETER_TEMPLATEINTERPRETER_HPP