< prev index next >

src/hotspot/share/interpreter/templateInterpreter.hpp

Print this page

 89   friend class TemplateInterpreterGenerator;
 90   friend class TemplateTable;
 91   // friend class Interpreter;
 92  public:
 93 
 94   enum MoreConstants {
 95     max_invoke_length = 5,    // invokedynamic is the longest
 96     max_bytecode_length = 6,  // worse case is wide iinc, "reexecute" bytecodes are excluded because "skip" will be 0
 97     number_of_return_entries  = max_invoke_length + 1,          // number of return entry points
 98     number_of_deopt_entries   = max_bytecode_length + 1,        // number of deoptimization entry points
 99     number_of_return_addrs    = number_of_states                // number of return addresses
100   };
101 
102  protected:
103 
104   static address    _throw_ArrayIndexOutOfBoundsException_entry;
105   static address    _throw_ArrayStoreException_entry;
106   static address    _throw_ArithmeticException_entry;
107   static address    _throw_ClassCastException_entry;
108   static address    _throw_NullPointerException_entry;

109   static address    _throw_exception_entry;
110 
111   static address    _throw_StackOverflowError_entry;
112 
113   static address    _cont_resume_interpreter_adapter;
114 
115   static address    _remove_activation_entry;                   // continuation address if an exception is not handled by current frame
116   static address    _remove_activation_preserving_args_entry;   // continuation address when current frame is being popped
117 
118 #ifndef PRODUCT
119   static EntryPoint _trace_code;
120 #endif // !PRODUCT
121   static EntryPoint _return_entry[number_of_return_entries];    // entry points to return to from a call
122   static EntryPoint _earlyret_entry;                            // entry point to return early from a call
123   static EntryPoint _deopt_entry[number_of_deopt_entries];      // entry points to return to from a deoptimization
124   static address    _deopt_reexecute_return_entry;
125   static EntryPoint _safept_entry;
126 
127   static address _invoke_return_entry[number_of_return_addrs];           // for invokestatic, invokespecial, invokevirtual return entries
128   static address _invokeinterface_return_entry[number_of_return_addrs];  // for invokeinterface return entries

136 
137  public:
138   // Initialization/debugging
139   static void       initialize_stub();
140   static void       initialize_code();
141   // this only returns whether a pc is within generated code for the interpreter.
142   static bool       contains(address pc)                        { return _code != nullptr && _code->contains(pc); }
143   // Debugging/printing
144   static InterpreterCodelet* codelet_containing(address pc);
145 
146 
147  public:
148 
149   static address    remove_activation_early_entry(TosState state) { return _earlyret_entry.entry(state); }
150   static address    remove_activation_preserving_args_entry()     { return _remove_activation_preserving_args_entry; }
151 
152   static address    remove_activation_entry()                   { return _remove_activation_entry; }
153   static address    throw_exception_entry()                     { return _throw_exception_entry; }
154   static address    throw_ArithmeticException_entry()           { return _throw_ArithmeticException_entry; }
155   static address    throw_NullPointerException_entry()          { return _throw_NullPointerException_entry; }

156   static address    throw_StackOverflowError_entry()            { return _throw_StackOverflowError_entry; }
157 
158   static address    cont_resume_interpreter_adapter()           { return _cont_resume_interpreter_adapter; }
159 
160   // Code generation
161 #ifndef PRODUCT
162   static address    trace_code    (TosState state)              { return _trace_code.entry(state); }
163 #endif // !PRODUCT
164   static address*   dispatch_table(TosState state)              { return _active_table.table_for(state); }
165   static address*   dispatch_table()                            { return _active_table.table_for(); }
166   static int        distance_from_dispatch_table(TosState state){ return _active_table.distance_from(state); }
167   static address*   normal_table(TosState state)                { return _normal_table.table_for(state); }
168   static address*   normal_table()                              { return _normal_table.table_for(); }
169   static address*   safept_table(TosState state)                { return _safept_table.table_for(state); }
170 
171   // Support for invokes
172   static address*   invoke_return_entry_table()                 { return _invoke_return_entry; }
173   static address*   invokeinterface_return_entry_table()        { return _invokeinterface_return_entry; }
174   static address*   invokedynamic_return_entry_table()          { return _invokedynamic_return_entry; }
175   static int        TosState_as_index(TosState state);

 89   friend class TemplateInterpreterGenerator;
 90   friend class TemplateTable;
 91   // friend class Interpreter;
 92  public:
 93 
 94   enum MoreConstants {
 95     max_invoke_length = 5,    // invokedynamic is the longest
 96     max_bytecode_length = 6,  // worse case is wide iinc, "reexecute" bytecodes are excluded because "skip" will be 0
 97     number_of_return_entries  = max_invoke_length + 1,          // number of return entry points
 98     number_of_deopt_entries   = max_bytecode_length + 1,        // number of deoptimization entry points
 99     number_of_return_addrs    = number_of_states                // number of return addresses
100   };
101 
102  protected:
103 
104   static address    _throw_ArrayIndexOutOfBoundsException_entry;
105   static address    _throw_ArrayStoreException_entry;
106   static address    _throw_ArithmeticException_entry;
107   static address    _throw_ClassCastException_entry;
108   static address    _throw_NullPointerException_entry;
109   static address    _throw_NPE_UninitializedField_entry;
110   static address    _throw_exception_entry;
111 
112   static address    _throw_StackOverflowError_entry;
113 
114   static address    _cont_resume_interpreter_adapter;
115 
116   static address    _remove_activation_entry;                   // continuation address if an exception is not handled by current frame
117   static address    _remove_activation_preserving_args_entry;   // continuation address when current frame is being popped
118 
119 #ifndef PRODUCT
120   static EntryPoint _trace_code;
121 #endif // !PRODUCT
122   static EntryPoint _return_entry[number_of_return_entries];    // entry points to return to from a call
123   static EntryPoint _earlyret_entry;                            // entry point to return early from a call
124   static EntryPoint _deopt_entry[number_of_deopt_entries];      // entry points to return to from a deoptimization
125   static address    _deopt_reexecute_return_entry;
126   static EntryPoint _safept_entry;
127 
128   static address _invoke_return_entry[number_of_return_addrs];           // for invokestatic, invokespecial, invokevirtual return entries
129   static address _invokeinterface_return_entry[number_of_return_addrs];  // for invokeinterface return entries

137 
138  public:
139   // Initialization/debugging
140   static void       initialize_stub();
141   static void       initialize_code();
142   // this only returns whether a pc is within generated code for the interpreter.
143   static bool       contains(address pc)                        { return _code != nullptr && _code->contains(pc); }
144   // Debugging/printing
145   static InterpreterCodelet* codelet_containing(address pc);
146 
147 
148  public:
149 
150   static address    remove_activation_early_entry(TosState state) { return _earlyret_entry.entry(state); }
151   static address    remove_activation_preserving_args_entry()     { return _remove_activation_preserving_args_entry; }
152 
153   static address    remove_activation_entry()                   { return _remove_activation_entry; }
154   static address    throw_exception_entry()                     { return _throw_exception_entry; }
155   static address    throw_ArithmeticException_entry()           { return _throw_ArithmeticException_entry; }
156   static address    throw_NullPointerException_entry()          { return _throw_NullPointerException_entry; }
157   static address    throw_NPE_UninitializedField_entry()        { return _throw_NPE_UninitializedField_entry; }
158   static address    throw_StackOverflowError_entry()            { return _throw_StackOverflowError_entry; }
159 
160   static address    cont_resume_interpreter_adapter()           { return _cont_resume_interpreter_adapter; }
161 
162   // Code generation
163 #ifndef PRODUCT
164   static address    trace_code    (TosState state)              { return _trace_code.entry(state); }
165 #endif // !PRODUCT
166   static address*   dispatch_table(TosState state)              { return _active_table.table_for(state); }
167   static address*   dispatch_table()                            { return _active_table.table_for(); }
168   static int        distance_from_dispatch_table(TosState state){ return _active_table.distance_from(state); }
169   static address*   normal_table(TosState state)                { return _normal_table.table_for(state); }
170   static address*   normal_table()                              { return _normal_table.table_for(); }
171   static address*   safept_table(TosState state)                { return _safept_table.table_for(state); }
172 
173   // Support for invokes
174   static address*   invoke_return_entry_table()                 { return _invoke_return_entry; }
175   static address*   invokeinterface_return_entry_table()        { return _invokeinterface_return_entry; }
176   static address*   invokedynamic_return_entry_table()          { return _invokedynamic_return_entry; }
177   static int        TosState_as_index(TosState state);
< prev index next >