< prev index next >

src/hotspot/share/interpreter/templateInterpreter.hpp

Print this page

 94 
 95   enum MoreConstants {
 96     max_invoke_length = 5,    // invokedynamic is the longest
 97     max_bytecode_length = 6,  // worse case is wide iinc, "reexecute" bytecodes are excluded because "skip" will be 0
 98     number_of_return_entries  = max_invoke_length + 1,          // number of return entry points
 99     number_of_deopt_entries   = max_bytecode_length + 1,        // number of deoptimization entry points
100     number_of_return_addrs    = number_of_states                // number of return addresses
101   };
102 
103  protected:
104 
105   static address    _throw_ArrayIndexOutOfBoundsException_entry;
106   static address    _throw_ArrayStoreException_entry;
107   static address    _throw_ArithmeticException_entry;
108   static address    _throw_ClassCastException_entry;
109   static address    _throw_NullPointerException_entry;
110   static address    _throw_exception_entry;
111 
112   static address    _throw_StackOverflowError_entry;
113 


114   static address    _remove_activation_entry;                   // continuation address if an exception is not handled by current frame
115   static address    _remove_activation_preserving_args_entry;   // continuation address when current frame is being popped
116 
117 #ifndef PRODUCT
118   static EntryPoint _trace_code;
119 #endif // !PRODUCT
120   static EntryPoint _return_entry[number_of_return_entries];    // entry points to return to from a call
121   static EntryPoint _earlyret_entry;                            // entry point to return early from a call
122   static EntryPoint _deopt_entry[number_of_deopt_entries];      // entry points to return to from a deoptimization
123   static address    _deopt_reexecute_return_entry;
124   static EntryPoint _safept_entry;
125 
126   static address _invoke_return_entry[number_of_return_addrs];           // for invokestatic, invokespecial, invokevirtual return entries
127   static address _invokeinterface_return_entry[number_of_return_addrs];  // for invokeinterface return entries
128   static address _invokedynamic_return_entry[number_of_return_addrs];    // for invokedynamic return entries
129 
130   static DispatchTable _active_table;                           // the active    dispatch table (used by the interpreter for dispatch)
131   static DispatchTable _normal_table;                           // the normal    dispatch table (used to set the active table in normal mode)
132   static DispatchTable _safept_table;                           // the safepoint dispatch table (used to set the active table for safepoints)
133   static address       _wentry_point[DispatchTable::length];    // wide instructions only (vtos tosca always)

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


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

 94 
 95   enum MoreConstants {
 96     max_invoke_length = 5,    // invokedynamic is the longest
 97     max_bytecode_length = 6,  // worse case is wide iinc, "reexecute" bytecodes are excluded because "skip" will be 0
 98     number_of_return_entries  = max_invoke_length + 1,          // number of return entry points
 99     number_of_deopt_entries   = max_bytecode_length + 1,        // number of deoptimization entry points
100     number_of_return_addrs    = number_of_states                // number of return addresses
101   };
102 
103  protected:
104 
105   static address    _throw_ArrayIndexOutOfBoundsException_entry;
106   static address    _throw_ArrayStoreException_entry;
107   static address    _throw_ArithmeticException_entry;
108   static address    _throw_ClassCastException_entry;
109   static address    _throw_NullPointerException_entry;
110   static address    _throw_exception_entry;
111 
112   static address    _throw_StackOverflowError_entry;
113 
114   static address    _cont_preempt_rerun_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
130   static address _invokedynamic_return_entry[number_of_return_addrs];    // for invokedynamic return entries
131 
132   static DispatchTable _active_table;                           // the active    dispatch table (used by the interpreter for dispatch)
133   static DispatchTable _normal_table;                           // the normal    dispatch table (used to set the active table in normal mode)
134   static DispatchTable _safept_table;                           // the safepoint dispatch table (used to set the active table for safepoints)
135   static address       _wentry_point[DispatchTable::length];    // wide instructions only (vtos tosca always)

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_StackOverflowError_entry()            { return _throw_StackOverflowError_entry; }
158 
159   static address    cont_preempt_rerun_interpreter_adapter()    { return _cont_preempt_rerun_interpreter_adapter; }
160 
161   // Code generation
162 #ifndef PRODUCT
163   static address    trace_code    (TosState state)              { return _trace_code.entry(state); }
164 #endif // !PRODUCT
165   static address*   dispatch_table(TosState state)              { return _active_table.table_for(state); }
166   static address*   dispatch_table()                            { return _active_table.table_for(); }
167   static int        distance_from_dispatch_table(TosState state){ return _active_table.distance_from(state); }
168   static address*   normal_table(TosState state)                { return _normal_table.table_for(state); }
169   static address*   normal_table()                              { return _normal_table.table_for(); }
170   static address*   safept_table(TosState state)                { return _safept_table.table_for(state); }
171 
172   // Support for invokes
173   static address*   invoke_return_entry_table()                 { return _invoke_return_entry; }
174   static address*   invokeinterface_return_entry_table()        { return _invokeinterface_return_entry; }
175   static address*   invokedynamic_return_entry_table()          { return _invokedynamic_return_entry; }
176   static int        TosState_as_index(TosState state);
177 
178   static address* invoke_return_entry_table_for(Bytecodes::Code code);
179 
180   static address deopt_entry(TosState state, int length);
< prev index next >