Mercurial > hg > graal-jvmci-8
comparison src/cpu/x86/vm/vtableStubs_x86_32.cpp @ 6266:1d7922586cf6
7023639: JSR 292 method handle invocation needs a fast path for compiled code
6984705: JSR 292 method handle creation should not go through JNI
Summary: remove assembly code for JDK 7 chained method handles
Reviewed-by: jrose, twisti, kvn, mhaupt
Contributed-by: John Rose <john.r.rose@oracle.com>, Christian Thalinger <christian.thalinger@oracle.com>, Michael Haupt <michael.haupt@oracle.com>
author | twisti |
---|---|
date | Tue, 24 Jul 2012 10:51:00 -0700 |
parents | f95d63e2154a |
children | da91efe96a93 |
comparison
equal
deleted
inserted
replaced
6241:aba91a731143 | 6266:1d7922586cf6 |
---|---|
74 assert(VtableStub::receiver_location() == rcx->as_VMReg(), "receiver expected in rcx"); | 74 assert(VtableStub::receiver_location() == rcx->as_VMReg(), "receiver expected in rcx"); |
75 | 75 |
76 // get receiver klass | 76 // get receiver klass |
77 address npe_addr = __ pc(); | 77 address npe_addr = __ pc(); |
78 __ movptr(rax, Address(rcx, oopDesc::klass_offset_in_bytes())); | 78 __ movptr(rax, Address(rcx, oopDesc::klass_offset_in_bytes())); |
79 // compute entry offset (in words) | 79 |
80 int entry_offset = instanceKlass::vtable_start_offset() + vtable_index*vtableEntry::size(); | |
81 #ifndef PRODUCT | 80 #ifndef PRODUCT |
82 if (DebugVtables) { | 81 if (DebugVtables) { |
83 Label L; | 82 Label L; |
84 // check offset vs vtable length | 83 // check offset vs vtable length |
85 __ cmpl(Address(rax, instanceKlass::vtable_length_offset()*wordSize), vtable_index*vtableEntry::size()); | 84 __ cmpl(Address(rax, instanceKlass::vtable_length_offset()*wordSize), vtable_index*vtableEntry::size()); |
91 #endif // PRODUCT | 90 #endif // PRODUCT |
92 | 91 |
93 const Register method = rbx; | 92 const Register method = rbx; |
94 | 93 |
95 // load methodOop and target address | 94 // load methodOop and target address |
96 __ movptr(method, Address(rax, entry_offset*wordSize + vtableEntry::method_offset_in_bytes())); | 95 __ lookup_virtual_method(rax, vtable_index, method); |
96 | |
97 if (DebugVtables) { | 97 if (DebugVtables) { |
98 Label L; | 98 Label L; |
99 __ cmpptr(method, (int32_t)NULL_WORD); | 99 __ cmpptr(method, (int32_t)NULL_WORD); |
100 __ jcc(Assembler::equal, L); | 100 __ jcc(Assembler::equal, L); |
101 __ cmpptr(Address(method, methodOopDesc::from_compiled_offset()), (int32_t)NULL_WORD); | 101 __ cmpptr(Address(method, methodOopDesc::from_compiled_offset()), (int32_t)NULL_WORD); |