src/share/vm/code/compiledIC.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hs-comp2 Sdiff src/share/vm/code

src/share/vm/code/compiledIC.cpp

Print this page




 578                     p2i(info.entry()));
 579     }
 580     // Call to compiled code
 581     assert (CodeCache::contains(info.entry()), "wrong entry point");
 582     set_destination_mt_safe(info.entry());
 583   }
 584 }
 585 
 586 
 587 // Compute settings for a CompiledStaticCall. Since we might have to set
 588 // the stub when calling to the interpreter, we need to return arguments.
 589 void CompiledStaticCall::compute_entry(methodHandle m, StaticCallInfo& info) {
 590   nmethod* m_code = m->code();
 591   info._callee = m;
 592   if (m_code != NULL && m_code->is_in_use()) {
 593     info._to_interpreter = false;
 594     info._entry  = m_code->verified_entry_point();
 595   } else {
 596     // Callee is interpreted code.  In any case entering the interpreter
 597     // puts a converter-frame on the stack to save arguments.

 598     info._to_interpreter = true;
 599     info._entry      = m()->get_c2i_entry();
 600   }
 601 }
 602 
 603 address CompiledStaticCall::find_stub() {
 604   // Find reloc. information containing this call-site
 605   RelocIterator iter((nmethod*)NULL, instruction_address());
 606   while (iter.next()) {
 607     if (iter.addr() == instruction_address()) {
 608       switch(iter.type()) {
 609         case relocInfo::static_call_type:
 610           return iter.static_call_reloc()->static_stub();
 611         // We check here for opt_virtual_call_type, since we reuse the code
 612         // from the CompiledIC implementation
 613         case relocInfo::opt_virtual_call_type:
 614           return iter.opt_virtual_call_reloc()->static_stub();
 615         case relocInfo::poll_type:
 616         case relocInfo::poll_return_type: // A safepoint can't overlap a call.
 617         default:




 578                     p2i(info.entry()));
 579     }
 580     // Call to compiled code
 581     assert (CodeCache::contains(info.entry()), "wrong entry point");
 582     set_destination_mt_safe(info.entry());
 583   }
 584 }
 585 
 586 
 587 // Compute settings for a CompiledStaticCall. Since we might have to set
 588 // the stub when calling to the interpreter, we need to return arguments.
 589 void CompiledStaticCall::compute_entry(methodHandle m, StaticCallInfo& info) {
 590   nmethod* m_code = m->code();
 591   info._callee = m;
 592   if (m_code != NULL && m_code->is_in_use()) {
 593     info._to_interpreter = false;
 594     info._entry  = m_code->verified_entry_point();
 595   } else {
 596     // Callee is interpreted code.  In any case entering the interpreter
 597     // puts a converter-frame on the stack to save arguments.
 598     assert(!UseCompiler || !m->is_method_handle_intrinsic(), "Compiled code should never call interpreter MH intrinsics");
 599     info._to_interpreter = true;
 600     info._entry      = m()->get_c2i_entry();
 601   }
 602 }
 603 
 604 address CompiledStaticCall::find_stub() {
 605   // Find reloc. information containing this call-site
 606   RelocIterator iter((nmethod*)NULL, instruction_address());
 607   while (iter.next()) {
 608     if (iter.addr() == instruction_address()) {
 609       switch(iter.type()) {
 610         case relocInfo::static_call_type:
 611           return iter.static_call_reloc()->static_stub();
 612         // We check here for opt_virtual_call_type, since we reuse the code
 613         // from the CompiledIC implementation
 614         case relocInfo::opt_virtual_call_type:
 615           return iter.opt_virtual_call_reloc()->static_stub();
 616         case relocInfo::poll_type:
 617         case relocInfo::poll_return_type: // A safepoint can't overlap a call.
 618         default:


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