Mercurial > hg > graal-jvmci-8
comparison src/cpu/x86/vm/vtableStubs_x86_64.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 |
---|---|
67 | 67 |
68 // get receiver klass | 68 // get receiver klass |
69 address npe_addr = __ pc(); | 69 address npe_addr = __ pc(); |
70 __ load_klass(rax, j_rarg0); | 70 __ load_klass(rax, j_rarg0); |
71 | 71 |
72 // compute entry offset (in words) | |
73 int entry_offset = | |
74 instanceKlass::vtable_start_offset() + vtable_index * vtableEntry::size(); | |
75 | |
76 #ifndef PRODUCT | 72 #ifndef PRODUCT |
77 if (DebugVtables) { | 73 if (DebugVtables) { |
78 Label L; | 74 Label L; |
79 // check offset vs vtable length | 75 // check offset vs vtable length |
80 __ cmpl(Address(rax, instanceKlass::vtable_length_offset() * wordSize), | 76 __ cmpl(Address(rax, instanceKlass::vtable_length_offset() * wordSize), |
88 #endif // PRODUCT | 84 #endif // PRODUCT |
89 | 85 |
90 // load methodOop and target address | 86 // load methodOop and target address |
91 const Register method = rbx; | 87 const Register method = rbx; |
92 | 88 |
93 __ movptr(method, Address(rax, | 89 __ lookup_virtual_method(rax, vtable_index, method); |
94 entry_offset * wordSize + | 90 |
95 vtableEntry::method_offset_in_bytes())); | |
96 if (DebugVtables) { | 91 if (DebugVtables) { |
97 Label L; | 92 Label L; |
98 __ cmpptr(method, (int32_t)NULL_WORD); | 93 __ cmpptr(method, (int32_t)NULL_WORD); |
99 __ jcc(Assembler::equal, L); | 94 __ jcc(Assembler::equal, L); |
100 __ cmpptr(Address(method, methodOopDesc::from_compiled_offset()), (int32_t)NULL_WORD); | 95 __ cmpptr(Address(method, methodOopDesc::from_compiled_offset()), (int32_t)NULL_WORD); |