322 // If this is a method invocation bytecode, get the invoked method.
323 ciMethod* ciBytecodeStream::get_method(bool& will_link) {
324 ciMethod* m = CURRENT_ENV->get_method_by_index(_holder, get_method_index(),cur_bc());
325 will_link = m->is_loaded();
326 return m;
327 }
328
329 // ------------------------------------------------------------------
330 // ciBytecodeStream::get_declared_method_holder
331 //
332 // Get the declared holder of the currently referenced method.
333 //
334 // Usage note: the holder() of a ciMethod class returns the canonical
335 // holder of the method, rather than the holder declared in the
336 // bytecodes.
337 //
338 // There is no "will_link" result passed back. The user is responsible
339 // for checking linkability when retrieving the associated method.
340 ciKlass* ciBytecodeStream::get_declared_method_holder() {
341 bool ignore;
342 // report as Dynamic for invokedynamic, which is syntactically classless
343 if (cur_bc() == Bytecodes::_invokedynamic)
344 return CURRENT_ENV->get_klass_by_name(_holder, ciSymbol::java_dyn_Dynamic(), false);
345 return CURRENT_ENV->get_klass_by_index(_holder, get_method_holder_index(), ignore);
346 }
347
348 // ------------------------------------------------------------------
349 // ciBytecodeStream::get_method_holder_index
350 //
351 // Get the constant pool index of the declared holder of the method
352 // referenced by the current bytecode. Used for generating
353 // deoptimization information.
354 int ciBytecodeStream::get_method_holder_index() {
355 VM_ENTRY_MARK;
356 constantPoolOop cpool = _holder->get_instanceKlass()->constants();
357 return cpool->klass_ref_index_at(get_method_index());
358 }
359
360 // ------------------------------------------------------------------
361 // ciBytecodeStream::get_method_signature_index
362 //
363 // Get the constant pool index of the signature of the method
364 // referenced by the current bytecode. Used for generating
|
322 // If this is a method invocation bytecode, get the invoked method.
323 ciMethod* ciBytecodeStream::get_method(bool& will_link) {
324 ciMethod* m = CURRENT_ENV->get_method_by_index(_holder, get_method_index(),cur_bc());
325 will_link = m->is_loaded();
326 return m;
327 }
328
329 // ------------------------------------------------------------------
330 // ciBytecodeStream::get_declared_method_holder
331 //
332 // Get the declared holder of the currently referenced method.
333 //
334 // Usage note: the holder() of a ciMethod class returns the canonical
335 // holder of the method, rather than the holder declared in the
336 // bytecodes.
337 //
338 // There is no "will_link" result passed back. The user is responsible
339 // for checking linkability when retrieving the associated method.
340 ciKlass* ciBytecodeStream::get_declared_method_holder() {
341 bool ignore;
342 // report as InvokeDynamic for invokedynamic, which is syntactically classless
343 if (cur_bc() == Bytecodes::_invokedynamic)
344 return CURRENT_ENV->get_klass_by_name(_holder, ciSymbol::java_dyn_InvokeDynamic(), false);
345 return CURRENT_ENV->get_klass_by_index(_holder, get_method_holder_index(), ignore);
346 }
347
348 // ------------------------------------------------------------------
349 // ciBytecodeStream::get_method_holder_index
350 //
351 // Get the constant pool index of the declared holder of the method
352 // referenced by the current bytecode. Used for generating
353 // deoptimization information.
354 int ciBytecodeStream::get_method_holder_index() {
355 VM_ENTRY_MARK;
356 constantPoolOop cpool = _holder->get_instanceKlass()->constants();
357 return cpool->klass_ref_index_at(get_method_index());
358 }
359
360 // ------------------------------------------------------------------
361 // ciBytecodeStream::get_method_signature_index
362 //
363 // Get the constant pool index of the signature of the method
364 // referenced by the current bytecode. Used for generating
|