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