176 // specific bit definitions for the flags field:
177 // (Note: the interpreter must use these definitions to access the CP cache.)
178 enum {
179 // high order bits are the TosState corresponding to field type or method return type
180 tos_state_bits = 4,
181 tos_state_mask = right_n_bits(tos_state_bits),
182 tos_state_shift = BitsPerInt - tos_state_bits, // see verify_tos_state_shift below
183 // misc. option bits; can be any bit position in [16..27]
184 is_field_entry_shift = 26, // (F) is it a field or a method?
185 has_method_type_shift = 25, // (M) does the call site have a MethodType?
186 has_appendix_shift = 24, // (A) does the call site have an appendix argument?
187 is_forced_virtual_shift = 23, // (I) is the interface reference forced to virtual mode?
188 is_final_shift = 22, // (f) is the field or method final?
189 is_volatile_shift = 21, // (v) is the field volatile?
190 is_vfinal_shift = 20, // (vf) did the call resolve to a final method?
191 // low order bits give field index (for FieldInfo) or method parameter size:
192 field_index_bits = 16,
193 field_index_mask = right_n_bits(field_index_bits),
194 parameter_size_bits = 8, // subset of field_index_mask, range is 0..255
195 parameter_size_mask = right_n_bits(parameter_size_bits),
196 option_bits_mask = ~(((-1) << tos_state_shift) | (field_index_mask | parameter_size_mask))
197 };
198
199 // specific bit definitions for the indices field:
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
|
176 // specific bit definitions for the flags field:
177 // (Note: the interpreter must use these definitions to access the CP cache.)
178 enum {
179 // high order bits are the TosState corresponding to field type or method return type
180 tos_state_bits = 4,
181 tos_state_mask = right_n_bits(tos_state_bits),
182 tos_state_shift = BitsPerInt - tos_state_bits, // see verify_tos_state_shift below
183 // misc. option bits; can be any bit position in [16..27]
184 is_field_entry_shift = 26, // (F) is it a field or a method?
185 has_method_type_shift = 25, // (M) does the call site have a MethodType?
186 has_appendix_shift = 24, // (A) does the call site have an appendix argument?
187 is_forced_virtual_shift = 23, // (I) is the interface reference forced to virtual mode?
188 is_final_shift = 22, // (f) is the field or method final?
189 is_volatile_shift = 21, // (v) is the field volatile?
190 is_vfinal_shift = 20, // (vf) did the call resolve to a final method?
191 // low order bits give field index (for FieldInfo) or method parameter size:
192 field_index_bits = 16,
193 field_index_mask = right_n_bits(field_index_bits),
194 parameter_size_bits = 8, // subset of field_index_mask, range is 0..255
195 parameter_size_mask = right_n_bits(parameter_size_bits),
196 option_bits_mask = ~((0xffffffff << tos_state_shift) | (field_index_mask | parameter_size_mask))
197 };
198
199 // specific bit definitions for the indices field:
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
|