200 enum {
201 cp_index_bits = 2*BitsPerByte,
202 cp_index_mask = right_n_bits(cp_index_bits),
203 bytecode_1_shift = cp_index_bits,
204 bytecode_1_mask = right_n_bits(BitsPerByte), // == (u1)0xFF
205 bytecode_2_shift = cp_index_bits + BitsPerByte,
206 bytecode_2_mask = right_n_bits(BitsPerByte) // == (u1)0xFF
207 };
208
209
210 // Initialization
211 void initialize_entry(int original_index); // initialize primary entry
212 void initialize_resolved_reference_index(int ref_index) {
213 assert(_f2 == 0, "set once"); // note: ref_index might be zero also
214 _f2 = ref_index;
215 }
216
217 void set_field( // sets entry to resolved field state
218 Bytecodes::Code get_code, // the bytecode used for reading the field
219 Bytecodes::Code put_code, // the bytecode used for writing the field
220 KlassHandle field_holder, // the object/klass holding the field
221 int orig_field_index, // the original field index in the field holder
222 int field_offset, // the field offset in words in the field holder
223 TosState field_type, // the (machine) field type
224 bool is_final, // the field is final
225 bool is_volatile, // the field is volatile
226 Klass* root_klass // needed by the GC to dirty the klass
227 );
228
229 private:
230 void set_direct_or_vtable_call(
231 Bytecodes::Code invoke_code, // the bytecode used for invoking the method
232 methodHandle method, // the method/prototype if any (NULL, otherwise)
233 int vtable_index // the vtable index if any, else negative
234 );
235
236 public:
237 void set_direct_call( // sets entry to exact concrete method entry
238 Bytecodes::Code invoke_code, // the bytecode used for invoking the method
239 methodHandle method // the method to call
240 );
|
200 enum {
201 cp_index_bits = 2*BitsPerByte,
202 cp_index_mask = right_n_bits(cp_index_bits),
203 bytecode_1_shift = cp_index_bits,
204 bytecode_1_mask = right_n_bits(BitsPerByte), // == (u1)0xFF
205 bytecode_2_shift = cp_index_bits + BitsPerByte,
206 bytecode_2_mask = right_n_bits(BitsPerByte) // == (u1)0xFF
207 };
208
209
210 // Initialization
211 void initialize_entry(int original_index); // initialize primary entry
212 void initialize_resolved_reference_index(int ref_index) {
213 assert(_f2 == 0, "set once"); // note: ref_index might be zero also
214 _f2 = ref_index;
215 }
216
217 void set_field( // sets entry to resolved field state
218 Bytecodes::Code get_code, // the bytecode used for reading the field
219 Bytecodes::Code put_code, // the bytecode used for writing the field
220 Klass* field_holder, // the object/klass holding the field
221 int orig_field_index, // the original field index in the field holder
222 int field_offset, // the field offset in words in the field holder
223 TosState field_type, // the (machine) field type
224 bool is_final, // the field is final
225 bool is_volatile, // the field is volatile
226 Klass* root_klass // needed by the GC to dirty the klass
227 );
228
229 private:
230 void set_direct_or_vtable_call(
231 Bytecodes::Code invoke_code, // the bytecode used for invoking the method
232 methodHandle method, // the method/prototype if any (NULL, otherwise)
233 int vtable_index // the vtable index if any, else negative
234 );
235
236 public:
237 void set_direct_call( // sets entry to exact concrete method entry
238 Bytecodes::Code invoke_code, // the bytecode used for invoking the method
239 methodHandle method // the method to call
240 );
|