Mercurial > hg > truffle
comparison src/share/vm/opto/library_call.cpp @ 12269:da051ce490eb
Merge
author | adlertz |
---|---|
date | Thu, 19 Sep 2013 18:01:39 +0200 |
parents | 884ed7a10f09 b2e698d2276c |
children | 1b64d46620a3 |
comparison
equal
deleted
inserted
replaced
12253:179cd89fb279 | 12269:da051ce490eb |
---|---|
3732 // Helper for hashCode and clone. Peeks inside the vtable to avoid a call. | 3732 // Helper for hashCode and clone. Peeks inside the vtable to avoid a call. |
3733 Node* LibraryCallKit::generate_virtual_guard(Node* obj_klass, | 3733 Node* LibraryCallKit::generate_virtual_guard(Node* obj_klass, |
3734 RegionNode* slow_region) { | 3734 RegionNode* slow_region) { |
3735 ciMethod* method = callee(); | 3735 ciMethod* method = callee(); |
3736 int vtable_index = method->vtable_index(); | 3736 int vtable_index = method->vtable_index(); |
3737 assert(vtable_index >= 0 || vtable_index == Method::nonvirtual_vtable_index, | |
3738 err_msg_res("bad index %d", vtable_index)); | |
3737 // Get the Method* out of the appropriate vtable entry. | 3739 // Get the Method* out of the appropriate vtable entry. |
3738 int entry_offset = (InstanceKlass::vtable_start_offset() + | 3740 int entry_offset = (InstanceKlass::vtable_start_offset() + |
3739 vtable_index*vtableEntry::size()) * wordSize + | 3741 vtable_index*vtableEntry::size()) * wordSize + |
3740 vtableEntry::method_offset_in_bytes(); | 3742 vtableEntry::method_offset_in_bytes(); |
3741 Node* entry_addr = basic_plus_adr(obj_klass, entry_offset); | 3743 Node* entry_addr = basic_plus_adr(obj_klass, entry_offset); |
3782 } else { | 3784 } else { |
3783 // hashCode and clone are not a miranda methods, | 3785 // hashCode and clone are not a miranda methods, |
3784 // so the vtable index is fixed. | 3786 // so the vtable index is fixed. |
3785 // No need to use the linkResolver to get it. | 3787 // No need to use the linkResolver to get it. |
3786 vtable_index = method->vtable_index(); | 3788 vtable_index = method->vtable_index(); |
3789 assert(vtable_index >= 0 || vtable_index == Method::nonvirtual_vtable_index, | |
3790 err_msg_res("bad index %d", vtable_index)); | |
3787 } | 3791 } |
3788 slow_call = new(C) CallDynamicJavaNode(tf, | 3792 slow_call = new(C) CallDynamicJavaNode(tf, |
3789 SharedRuntime::get_resolve_virtual_call_stub(), | 3793 SharedRuntime::get_resolve_virtual_call_stub(), |
3790 method, vtable_index, bci()); | 3794 method, vtable_index, bci()); |
3791 } else { // neither virtual nor static: opt_virtual | 3795 } else { // neither virtual nor static: opt_virtual |