hotspot/src/cpu/ppc/vm/compiledIC_ppc.cpp
changeset 25359 8a19ff205f89
parent 22824 28258dd5cb2e
child 25374 d7fb2af5d53c
equal deleted inserted replaced
25358:be17a72e2b3b 25359:8a19ff205f89
    46 
    46 
    47 bool CompiledIC::is_icholder_call_site(virtual_call_Relocation* call_site) {
    47 bool CompiledIC::is_icholder_call_site(virtual_call_Relocation* call_site) {
    48   // This call site might have become stale so inspect it carefully.
    48   // This call site might have become stale so inspect it carefully.
    49   NativeCall* call = nativeCall_at(call_site->addr());
    49   NativeCall* call = nativeCall_at(call_site->addr());
    50   return is_icholder_entry(call->destination());
    50   return is_icholder_entry(call->destination());
    51 }
       
    52 
       
    53 //-----------------------------------------------------------------------------
       
    54 // High-level access to an inline cache. Guaranteed to be MT-safe.
       
    55 
       
    56 CompiledIC::CompiledIC(nmethod* nm, NativeCall* call)
       
    57   : _ic_call(call)
       
    58 {
       
    59   address ic_call = call->instruction_address();
       
    60 
       
    61   assert(ic_call != NULL, "ic_call address must be set");
       
    62   assert(nm != NULL, "must pass nmethod");
       
    63   assert(nm->contains(ic_call), "must be in nmethod");
       
    64 
       
    65   // Search for the ic_call at the given address.
       
    66   RelocIterator iter(nm, ic_call, ic_call+1);
       
    67   bool ret = iter.next();
       
    68   assert(ret == true, "relocInfo must exist at this address");
       
    69   assert(iter.addr() == ic_call, "must find ic_call");
       
    70   if (iter.type() == relocInfo::virtual_call_type) {
       
    71     virtual_call_Relocation* r = iter.virtual_call_reloc();
       
    72     _is_optimized = false;
       
    73     _value = nativeMovConstReg_at(r->cached_value());
       
    74   } else {
       
    75     assert(iter.type() == relocInfo::opt_virtual_call_type, "must be a virtual call");
       
    76     _is_optimized = true;
       
    77     _value = NULL;
       
    78   }
       
    79 }
    51 }
    80 
    52 
    81 // ----------------------------------------------------------------------------
    53 // ----------------------------------------------------------------------------
    82 
    54 
    83 // A PPC CompiledStaticCall looks like this:
    55 // A PPC CompiledStaticCall looks like this: