src/share/vm/ci/ciStreams.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File 8073191-work Sdiff src/share/vm/ci

src/share/vm/ci/ciStreams.cpp

Print this page




 261 // ciBytecodeStream::get_field_index
 262 //
 263 // If this is a field access bytecode, get the constant pool
 264 // index of the referenced field.
 265 int ciBytecodeStream::get_field_index() {
 266   assert(cur_bc() == Bytecodes::_getfield ||
 267          cur_bc() == Bytecodes::_putfield ||
 268          cur_bc() == Bytecodes::_getstatic ||
 269          cur_bc() == Bytecodes::_putstatic, "wrong bc");
 270   return get_index_u2_cpcache();
 271 }
 272 
 273 
 274 // ------------------------------------------------------------------
 275 // ciBytecodeStream::get_field
 276 //
 277 // If this bytecode is one of get_field, get_static, put_field,
 278 // or put_static, get the referenced field.
 279 ciField* ciBytecodeStream::get_field(bool& will_link) {
 280   ciField* f = CURRENT_ENV->get_field_by_index(_holder, get_field_index());
 281   will_link = f->will_link(_holder, _bc);
 282   return f;
 283 }
 284 
 285 
 286 // ------------------------------------------------------------------
 287 // ciBytecodeStream::get_declared_field_holder
 288 //
 289 // Get the declared holder of the currently referenced field.
 290 //
 291 // Usage note: the holder() of a ciField class returns the canonical
 292 // holder of the field, rather than the holder declared in the
 293 // bytecodes.
 294 //
 295 // There is no "will_link" result passed back.  The user is responsible
 296 // for checking linkability when retrieving the associated field.
 297 ciInstanceKlass* ciBytecodeStream::get_declared_field_holder() {
 298   VM_ENTRY_MARK;
 299   constantPoolHandle cpool(_method->get_Method()->constants());
 300   int holder_index = get_field_holder_index();
 301   bool ignore;




 261 // ciBytecodeStream::get_field_index
 262 //
 263 // If this is a field access bytecode, get the constant pool
 264 // index of the referenced field.
 265 int ciBytecodeStream::get_field_index() {
 266   assert(cur_bc() == Bytecodes::_getfield ||
 267          cur_bc() == Bytecodes::_putfield ||
 268          cur_bc() == Bytecodes::_getstatic ||
 269          cur_bc() == Bytecodes::_putstatic, "wrong bc");
 270   return get_index_u2_cpcache();
 271 }
 272 
 273 
 274 // ------------------------------------------------------------------
 275 // ciBytecodeStream::get_field
 276 //
 277 // If this bytecode is one of get_field, get_static, put_field,
 278 // or put_static, get the referenced field.
 279 ciField* ciBytecodeStream::get_field(bool& will_link) {
 280   ciField* f = CURRENT_ENV->get_field_by_index(_holder, get_field_index());
 281   will_link = f->will_link(_holder, _method, _bc);
 282   return f;
 283 }
 284 
 285 
 286 // ------------------------------------------------------------------
 287 // ciBytecodeStream::get_declared_field_holder
 288 //
 289 // Get the declared holder of the currently referenced field.
 290 //
 291 // Usage note: the holder() of a ciField class returns the canonical
 292 // holder of the field, rather than the holder declared in the
 293 // bytecodes.
 294 //
 295 // There is no "will_link" result passed back.  The user is responsible
 296 // for checking linkability when retrieving the associated field.
 297 ciInstanceKlass* ciBytecodeStream::get_declared_field_holder() {
 298   VM_ENTRY_MARK;
 299   constantPoolHandle cpool(_method->get_Method()->constants());
 300   int holder_index = get_field_holder_index();
 301   bool ignore;


src/share/vm/ci/ciStreams.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File