Mercurial > hg > truffle
diff src/share/vm/code/compiledIC.hpp @ 20277:882004b9e7e1
8047362: Add a version of CompiledIC_at that doesn't create a new RelocIterator
Reviewed-by: iveresov, mgerdin
author | stefank |
---|---|
date | Tue, 01 Jul 2014 09:03:55 +0200 |
parents | 55fb97c4c58d |
children | 7848fc12602b |
line wrap: on
line diff
--- a/src/share/vm/code/compiledIC.hpp Thu Jun 26 11:36:58 2014 +0200 +++ b/src/share/vm/code/compiledIC.hpp Tue Jul 01 09:03:55 2014 +0200 @@ -150,6 +150,9 @@ bool _is_optimized; // an optimized virtual call (i.e., no compiled IC) CompiledIC(nmethod* nm, NativeCall* ic_call); + CompiledIC(RelocIterator* iter); + + void initialize_from_iter(RelocIterator* iter); static bool is_icholder_entry(address entry); @@ -183,6 +186,7 @@ friend CompiledIC* CompiledIC_before(nmethod* nm, address return_addr); friend CompiledIC* CompiledIC_at(nmethod* nm, address call_site); friend CompiledIC* CompiledIC_at(Relocation* call_site); + friend CompiledIC* CompiledIC_at(RelocIterator* reloc_iter); // This is used to release CompiledICHolder*s from nmethods that // are about to be freed. The callsite might contain other stale @@ -263,6 +267,13 @@ return c_ic; } +inline CompiledIC* CompiledIC_at(RelocIterator* reloc_iter) { + assert(reloc_iter->type() == relocInfo::virtual_call_type || + reloc_iter->type() == relocInfo::opt_virtual_call_type, "wrong reloc. info"); + CompiledIC* c_ic = new CompiledIC(reloc_iter); + c_ic->verify(); + return c_ic; +} //----------------------------------------------------------------------------- // The CompiledStaticCall represents a call to a static method in the compiled