215 ciConstant get_constant();
216 // True if the ldc variant points to an unresolved string
217 bool is_unresolved_string() const;
218 // True if the ldc variant points to an unresolved klass
219 bool is_unresolved_klass() const;
220
221 // If this bytecode is one of get_field, get_static, put_field,
222 // or put_static, get the referenced field.
223 ciField* get_field(bool& will_link);
224
225 ciInstanceKlass* get_declared_field_holder();
226 int get_field_holder_index();
227 int get_field_signature_index();
228
229 // If this is a method invocation bytecode, get the invoked method.
230 ciMethod* get_method(bool& will_link);
231 ciKlass* get_declared_method_holder();
232 int get_method_holder_index();
233 int get_method_signature_index();
234
235 private:
236 void assert_index_size(int required_size) const {
237 #ifdef ASSERT
238 int isize = instruction_size() - (is_wide() ? 1 : 0) - 1;
239 if (isize == 2 && cur_bc() == Bytecodes::_iinc)
240 isize = 1;
241 else if (isize <= 2)
242 ; // no change
243 else if (has_giant_index())
244 isize = 4;
245 else
246 isize = 2;
247 assert(isize = required_size, "wrong index size");
248 #endif
249 }
250 };
251
252
253 // ciSignatureStream
254 //
|
215 ciConstant get_constant();
216 // True if the ldc variant points to an unresolved string
217 bool is_unresolved_string() const;
218 // True if the ldc variant points to an unresolved klass
219 bool is_unresolved_klass() const;
220
221 // If this bytecode is one of get_field, get_static, put_field,
222 // or put_static, get the referenced field.
223 ciField* get_field(bool& will_link);
224
225 ciInstanceKlass* get_declared_field_holder();
226 int get_field_holder_index();
227 int get_field_signature_index();
228
229 // If this is a method invocation bytecode, get the invoked method.
230 ciMethod* get_method(bool& will_link);
231 ciKlass* get_declared_method_holder();
232 int get_method_holder_index();
233 int get_method_signature_index();
234
235 ciCPCache* get_cpcache();
236
237 private:
238 void assert_index_size(int required_size) const {
239 #ifdef ASSERT
240 int isize = instruction_size() - (is_wide() ? 1 : 0) - 1;
241 if (isize == 2 && cur_bc() == Bytecodes::_iinc)
242 isize = 1;
243 else if (isize <= 2)
244 ; // no change
245 else if (has_giant_index())
246 isize = 4;
247 else
248 isize = 2;
249 assert(isize = required_size, "wrong index size");
250 #endif
251 }
252 };
253
254
255 // ciSignatureStream
256 //
|