Mercurial > hg > graal-compiler
comparison src/cpu/x86/vm/compiledIC_x86.cpp @ 20271:c64b6b0c40c8
8047326: Consolidate all CompiledIC::CompiledIC implementations and move it to compiledIC.cpp
Reviewed-by: vlivanov, ehelin
author | stefank |
---|---|
date | Wed, 25 Jun 2014 08:56:57 +0200 |
parents | 78bbf4d43a14 |
children | 7848fc12602b |
comparison
equal
deleted
inserted
replaced
20270:b7d24d2bc8be | 20271:c64b6b0c40c8 |
---|---|
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. |