comparison src/share/vm/interpreter/templateInterpreter.hpp @ 726:be93aad57795

6655646: dynamic languages need dynamically linked call sites Summary: invokedynamic instruction (JSR 292 RI) Reviewed-by: twisti, never
author jrose
date Tue, 21 Apr 2009 23:21:04 -0700
parents e5b0439ef4ae
children 9987d9d5eb0e
comparison
equal deleted inserted replaced
725:928912ce8438 726:be93aad57795
81 friend class TemplateTable; 81 friend class TemplateTable;
82 // friend class Interpreter; 82 // friend class Interpreter;
83 public: 83 public:
84 84
85 enum MoreConstants { 85 enum MoreConstants {
86 number_of_return_entries = 9, // number of return entry points 86 number_of_return_entries = number_of_states, // number of return entry points
87 number_of_deopt_entries = 9, // number of deoptimization entry points 87 number_of_deopt_entries = number_of_states, // number of deoptimization entry points
88 number_of_return_addrs = 9 // number of return addresses 88 number_of_return_addrs = number_of_states // number of return addresses
89 }; 89 };
90 90
91 protected: 91 protected:
92 92
93 static address _throw_ArrayIndexOutOfBoundsException_entry; 93 static address _throw_ArrayIndexOutOfBoundsException_entry;
108 #ifndef PRODUCT 108 #ifndef PRODUCT
109 static EntryPoint _trace_code; 109 static EntryPoint _trace_code;
110 #endif // !PRODUCT 110 #endif // !PRODUCT
111 static EntryPoint _return_entry[number_of_return_entries]; // entry points to return to from a call 111 static EntryPoint _return_entry[number_of_return_entries]; // entry points to return to from a call
112 static EntryPoint _earlyret_entry; // entry point to return early from a call 112 static EntryPoint _earlyret_entry; // entry point to return early from a call
113 static EntryPoint _return_unbox_entry; // entry point to unbox a return value from a call
113 static EntryPoint _deopt_entry[number_of_deopt_entries]; // entry points to return to from a deoptimization 114 static EntryPoint _deopt_entry[number_of_deopt_entries]; // entry points to return to from a deoptimization
114 static EntryPoint _continuation_entry; 115 static EntryPoint _continuation_entry;
115 static EntryPoint _safept_entry; 116 static EntryPoint _safept_entry;
116 117
117 static address _return_3_addrs_by_index[number_of_return_addrs]; // for invokevirtual return entries 118 static address _return_3_addrs_by_index[number_of_return_addrs]; // for invokevirtual return entries
118 static address _return_5_addrs_by_index[number_of_return_addrs]; // for invokeinterface return entries 119 static address _return_5_addrs_by_index[number_of_return_addrs]; // for invokeinterface return entries
120 static address _return_5_unbox_addrs_by_index[number_of_return_addrs]; // for invokedynamic bootstrap methods
119 121
120 static DispatchTable _active_table; // the active dispatch table (used by the interpreter for dispatch) 122 static DispatchTable _active_table; // the active dispatch table (used by the interpreter for dispatch)
121 static DispatchTable _normal_table; // the normal dispatch table (used to set the active table in normal mode) 123 static DispatchTable _normal_table; // the normal dispatch table (used to set the active table in normal mode)
122 static DispatchTable _safept_table; // the safepoint dispatch table (used to set the active table for safepoints) 124 static DispatchTable _safept_table; // the safepoint dispatch table (used to set the active table for safepoints)
123 static address _wentry_point[DispatchTable::length]; // wide instructions only (vtos tosca always) 125 static address _wentry_point[DispatchTable::length]; // wide instructions only (vtos tosca always)
155 static address* normal_table() { return _normal_table.table_for(); } 157 static address* normal_table() { return _normal_table.table_for(); }
156 158
157 // Support for invokes 159 // Support for invokes
158 static address* return_3_addrs_by_index_table() { return _return_3_addrs_by_index; } 160 static address* return_3_addrs_by_index_table() { return _return_3_addrs_by_index; }
159 static address* return_5_addrs_by_index_table() { return _return_5_addrs_by_index; } 161 static address* return_5_addrs_by_index_table() { return _return_5_addrs_by_index; }
162 static address* return_5_unbox_addrs_by_index_table() { return _return_5_unbox_addrs_by_index; }
160 static int TosState_as_index(TosState state); // computes index into return_3_entry_by_index table 163 static int TosState_as_index(TosState state); // computes index into return_3_entry_by_index table
161 164
162 static address return_entry (TosState state, int length); 165 static address return_entry (TosState state, int length);
163 static address deopt_entry (TosState state, int length); 166 static address deopt_entry (TosState state, int length);
167 static address return_unbox_entry(TosState state, int length);
164 168
165 // Safepoint support 169 // Safepoint support
166 static void notice_safepoints(); // stops the thread when reaching a safepoint 170 static void notice_safepoints(); // stops the thread when reaching a safepoint
167 static void ignore_safepoints(); // ignores safepoints 171 static void ignore_safepoints(); // ignores safepoints
168 172