202 203 // Initialization 204 void initialize_entry(int original_index); // initialize primary entry 205 void initialize_resolved_reference_index(int ref_index) { 206 assert(_f2 == 0, "set once"); // note: ref_index might be zero also 207 _f2 = ref_index; 208 } 209 210 void set_field( // sets entry to resolved field state 211 Bytecodes::Code get_code, // the bytecode used for reading the field 212 Bytecodes::Code put_code, // the bytecode used for writing the field 213 KlassHandle field_holder, // the object/klass holding the field 214 int orig_field_index, // the original field index in the field holder 215 int field_offset, // the field offset in words in the field holder 216 TosState field_type, // the (machine) field type 217 bool is_final, // the field is final 218 bool is_volatile, // the field is volatile 219 Klass* root_klass // needed by the GC to dirty the klass 220 ); 221 222 void set_method( // sets entry to resolved method entry 223 Bytecodes::Code invoke_code, // the bytecode used for invoking the method 224 methodHandle method, // the method/prototype if any (NULL, otherwise) 225 int vtable_index // the vtable index if any, else negative 226 ); 227 228 void set_interface_call( 229 methodHandle method, // Resolved method 230 int index // Method index into interface 231 ); 232 233 void set_method_handle( 234 constantPoolHandle cpool, // holding constant pool (required for locking) 235 const CallInfo &call_info // Call link information 236 ); 237 238 void set_dynamic_call( 239 constantPoolHandle cpool, // holding constant pool (required for locking) 240 const CallInfo &call_info // Call link information 241 ); 242 243 // Common code for invokedynamic and MH invocations. 244 245 // The "appendix" is an optional call-site-specific parameter which is 246 // pushed by the JVM at the end of the argument list. This argument may 247 // be a MethodType for the MH.invokes and a CallSite for an invokedynamic 248 // instruction. However, its exact type and use depends on the Java upcall, 249 // which simply returns a compiled LambdaForm along with any reference 250 // that LambdaForm needs to complete the call. If the upcall returns a | 202 203 // Initialization 204 void initialize_entry(int original_index); // initialize primary entry 205 void initialize_resolved_reference_index(int ref_index) { 206 assert(_f2 == 0, "set once"); // note: ref_index might be zero also 207 _f2 = ref_index; 208 } 209 210 void set_field( // sets entry to resolved field state 211 Bytecodes::Code get_code, // the bytecode used for reading the field 212 Bytecodes::Code put_code, // the bytecode used for writing the field 213 KlassHandle field_holder, // the object/klass holding the field 214 int orig_field_index, // the original field index in the field holder 215 int field_offset, // the field offset in words in the field holder 216 TosState field_type, // the (machine) field type 217 bool is_final, // the field is final 218 bool is_volatile, // the field is volatile 219 Klass* root_klass // needed by the GC to dirty the klass 220 ); 221 222 private: 223 void set_direct_or_vtable_call( 224 Bytecodes::Code invoke_code, // the bytecode used for invoking the method 225 methodHandle method, // the method/prototype if any (NULL, otherwise) 226 int vtable_index // the vtable index if any, else negative 227 ); 228 229 public: 230 void set_direct_call( // sets entry to exact concrete method entry 231 Bytecodes::Code invoke_code, // the bytecode used for invoking the method 232 methodHandle method // the method to call 233 ); 234 235 void set_vtable_call( // sets entry to vtable index 236 Bytecodes::Code invoke_code, // the bytecode used for invoking the method 237 methodHandle method, // resolved method which declares the vtable index 238 int vtable_index // the vtable index 239 ); 240 241 void set_itable_call( 242 Bytecodes::Code invoke_code, // the bytecode used; must be invokeinterface 243 methodHandle method, // the resolved interface method 244 int itable_index // index into itable for the method 245 ); 246 247 void set_method_handle( 248 constantPoolHandle cpool, // holding constant pool (required for locking) 249 const CallInfo &call_info // Call link information 250 ); 251 252 void set_dynamic_call( 253 constantPoolHandle cpool, // holding constant pool (required for locking) 254 const CallInfo &call_info // Call link information 255 ); 256 257 // Common code for invokedynamic and MH invocations. 258 259 // The "appendix" is an optional call-site-specific parameter which is 260 // pushed by the JVM at the end of the argument list. This argument may 261 // be a MethodType for the MH.invokes and a CallSite for an invokedynamic 262 // instruction. However, its exact type and use depends on the Java upcall, 263 // which simply returns a compiled LambdaForm along with any reference 264 // that LambdaForm needs to complete the call. If the upcall returns a |