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

src/share/vm/ci/ciStreams.cpp

Print this page
rev 1081 : imported patch indy-cleanup-6893081.patch
rev 1082 : imported patch indy.compiler.patch
rev 1083 : [mq]: indy.compiler.inline.patch

*** 184,195 **** // ciBytecodeStream::get_klass // // If this bytecode is a new, newarray, multianewarray, instanceof, // or checkcast, get the referenced klass. ciKlass* ciBytecodeStream::get_klass(bool& will_link) { ! return CURRENT_ENV->get_klass_by_index(_holder, get_klass_index(), ! will_link); } // ------------------------------------------------------------------ // ciBytecodeStream::get_constant_index // --- 184,196 ---- // ciBytecodeStream::get_klass // // If this bytecode is a new, newarray, multianewarray, instanceof, // or checkcast, get the referenced klass. ciKlass* ciBytecodeStream::get_klass(bool& will_link) { ! VM_ENTRY_MARK; ! constantPoolHandle cpool(_method->get_methodOop()->constants()); ! return CURRENT_ENV->get_klass_by_index(cpool, get_klass_index(), will_link, _holder); } // ------------------------------------------------------------------ // ciBytecodeStream::get_constant_index //
*** 211,221 **** // ciBytecodeStream::get_constant // // If this bytecode is one of the ldc variants, get the referenced // constant. ciConstant ciBytecodeStream::get_constant() { ! return CURRENT_ENV->get_constant_by_index(_holder, get_constant_index()); } // ------------------------------------------------------------------ bool ciBytecodeStream::is_unresolved_string() const { return CURRENT_ENV->is_unresolved_string(_holder, get_constant_index()); --- 212,224 ---- // ciBytecodeStream::get_constant // // If this bytecode is one of the ldc variants, get the referenced // constant. ciConstant ciBytecodeStream::get_constant() { ! VM_ENTRY_MARK; ! constantPoolHandle cpool(_method->get_methodOop()->constants()); ! return CURRENT_ENV->get_constant_by_index(cpool, get_constant_index(), _holder); } // ------------------------------------------------------------------ bool ciBytecodeStream::is_unresolved_string() const { return CURRENT_ENV->is_unresolved_string(_holder, get_constant_index());
*** 262,287 **** // bytecodes. // // There is no "will_link" result passed back. The user is responsible // for checking linkability when retrieving the associated field. ciInstanceKlass* ciBytecodeStream::get_declared_field_holder() { int holder_index = get_field_holder_index(); bool ignore; ! return CURRENT_ENV->get_klass_by_index(_holder, holder_index, ignore) ->as_instance_klass(); } // ------------------------------------------------------------------ // ciBytecodeStream::get_field_holder_index // // Get the constant pool index of the declared holder of the field // referenced by the current bytecode. Used for generating // deoptimization information. int ciBytecodeStream::get_field_holder_index() { ! VM_ENTRY_MARK; constantPoolOop cpool = _holder->get_instanceKlass()->constants(); return cpool->klass_ref_index_at(get_field_index()); } // ------------------------------------------------------------------ // ciBytecodeStream::get_field_signature_index // --- 265,293 ---- // bytecodes. // // There is no "will_link" result passed back. The user is responsible // for checking linkability when retrieving the associated field. ciInstanceKlass* ciBytecodeStream::get_declared_field_holder() { + VM_ENTRY_MARK; + constantPoolHandle cpool(_method->get_methodOop()->constants()); int holder_index = get_field_holder_index(); bool ignore; ! return CURRENT_ENV->get_klass_by_index(cpool, holder_index, ignore, _holder) ->as_instance_klass(); } // ------------------------------------------------------------------ // ciBytecodeStream::get_field_holder_index // // Get the constant pool index of the declared holder of the field // referenced by the current bytecode. Used for generating // deoptimization information. int ciBytecodeStream::get_field_holder_index() { ! GUARDED_VM_ENTRY( constantPoolOop cpool = _holder->get_instanceKlass()->constants(); return cpool->klass_ref_index_at(get_field_index()); + ) } // ------------------------------------------------------------------ // ciBytecodeStream::get_field_signature_index //
*** 319,329 **** // ------------------------------------------------------------------ // ciBytecodeStream::get_method // // If this is a method invocation bytecode, get the invoked method. ciMethod* ciBytecodeStream::get_method(bool& will_link) { ! ciMethod* m = CURRENT_ENV->get_method_by_index(_holder, get_method_index(), cur_bc()); will_link = m->is_loaded(); return m; } // ------------------------------------------------------------------ --- 325,337 ---- // ------------------------------------------------------------------ // ciBytecodeStream::get_method // // If this is a method invocation bytecode, get the invoked method. ciMethod* ciBytecodeStream::get_method(bool& will_link) { ! VM_ENTRY_MARK; ! constantPoolHandle cpool(_method->get_methodOop()->constants()); ! ciMethod* m = CURRENT_ENV->get_method_by_index(cpool, get_method_index(), cur_bc(), _holder); will_link = m->is_loaded(); return m; } // ------------------------------------------------------------------
*** 336,361 **** // bytecodes. // // There is no "will_link" result passed back. The user is responsible // for checking linkability when retrieving the associated method. ciKlass* ciBytecodeStream::get_declared_method_holder() { bool ignore; // report as InvokeDynamic for invokedynamic, which is syntactically classless if (cur_bc() == Bytecodes::_invokedynamic) return CURRENT_ENV->get_klass_by_name(_holder, ciSymbol::java_dyn_InvokeDynamic(), false); ! return CURRENT_ENV->get_klass_by_index(_holder, get_method_holder_index(), ignore); } // ------------------------------------------------------------------ // ciBytecodeStream::get_method_holder_index // // Get the constant pool index of the declared holder of the method // referenced by the current bytecode. Used for generating // deoptimization information. int ciBytecodeStream::get_method_holder_index() { ! VM_ENTRY_MARK; ! constantPoolOop cpool = _holder->get_instanceKlass()->constants(); return cpool->klass_ref_index_at(get_method_index()); } // ------------------------------------------------------------------ // ciBytecodeStream::get_method_signature_index --- 344,370 ---- // bytecodes. // // There is no "will_link" result passed back. The user is responsible // for checking linkability when retrieving the associated method. ciKlass* ciBytecodeStream::get_declared_method_holder() { + VM_ENTRY_MARK; + constantPoolHandle cpool(_method->get_methodOop()->constants()); bool ignore; // report as InvokeDynamic for invokedynamic, which is syntactically classless if (cur_bc() == Bytecodes::_invokedynamic) return CURRENT_ENV->get_klass_by_name(_holder, ciSymbol::java_dyn_InvokeDynamic(), false); ! return CURRENT_ENV->get_klass_by_index(cpool, get_method_holder_index(), ignore, _holder); } // ------------------------------------------------------------------ // ciBytecodeStream::get_method_holder_index // // Get the constant pool index of the declared holder of the method // referenced by the current bytecode. Used for generating // deoptimization information. int ciBytecodeStream::get_method_holder_index() { ! constantPoolOop cpool = _method->get_methodOop()->constants(); return cpool->klass_ref_index_at(get_method_index()); } // ------------------------------------------------------------------ // ciBytecodeStream::get_method_signature_index
*** 379,383 **** --- 388,409 ---- constantPoolOop cpool = _holder->get_instanceKlass()->constants(); constantPoolCacheOop cpcache = cpool->cache(); return CURRENT_ENV->get_object(cpcache)->as_cpcache(); } + + // ------------------------------------------------------------------ + // ciBytecodeStream::get_call_site + ciCallSite* ciBytecodeStream::get_call_site() { + VM_ENTRY_MARK; + // Get the constant pool. + constantPoolOop cpool = _holder->get_instanceKlass()->constants(); + constantPoolCacheOop cpcache = cpool->cache(); + + // Get the CallSite from the constant pool cache. + int method_index = get_method_index(); + ConstantPoolCacheEntry* cpcache_entry = cpcache->secondary_entry_at(method_index); + oop call_site_oop = cpcache_entry->f1(); + + // Create a CallSite object and return it. + return CURRENT_ENV->get_object(call_site_oop)->as_call_site(); + }
src/share/vm/ci/ciStreams.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File