Mercurial > hg > graal-compiler
comparison src/share/vm/prims/methodHandles.cpp @ 13102:f9f4503a4ab5
Merge
author | Christos Kotselidis <christos.kotselidis@oracle.com> |
---|---|
date | Thu, 21 Nov 2013 15:04:54 +0100 |
parents | 096c224171c4 |
children | d8041d695d19 |
comparison
equal
deleted
inserted
replaced
13101:790ebab62d23 | 13102:f9f4503a4ab5 |
---|---|
185 vmindex = info.itable_index(); | 185 vmindex = info.itable_index(); |
186 // More importantly, the itable index only works with the method holder. | 186 // More importantly, the itable index only works with the method holder. |
187 receiver_limit = m->method_holder(); | 187 receiver_limit = m->method_holder(); |
188 assert(receiver_limit->verify_itable_index(vmindex), ""); | 188 assert(receiver_limit->verify_itable_index(vmindex), ""); |
189 flags |= IS_METHOD | (JVM_REF_invokeInterface << REFERENCE_KIND_SHIFT); | 189 flags |= IS_METHOD | (JVM_REF_invokeInterface << REFERENCE_KIND_SHIFT); |
190 if (TraceInvokeDynamic) { | |
191 ResourceMark rm; | |
192 tty->print_cr("memberName: invokeinterface method_holder::method: %s, receiver: %s, itableindex: %d, access_flags:", | |
193 Method::name_and_sig_as_C_string(receiver_limit(), m->name(), m->signature()), | |
194 receiver_limit()->internal_name(), vmindex); | |
195 m->access_flags().print_on(tty); | |
196 if (!m->is_abstract()) { | |
197 tty->print("default"); | |
198 } | |
199 tty->cr(); | |
200 } | |
190 break; | 201 break; |
191 | 202 |
192 case CallInfo::vtable_call: | 203 case CallInfo::vtable_call: |
193 vmindex = info.vtable_index(); | 204 vmindex = info.vtable_index(); |
194 flags |= IS_METHOD | (JVM_REF_invokeVirtual << REFERENCE_KIND_SHIFT); | 205 flags |= IS_METHOD | (JVM_REF_invokeVirtual << REFERENCE_KIND_SHIFT); |
195 assert(receiver_limit->is_subtype_of(m->method_holder()), "virtual call must be type-safe"); | 206 assert(receiver_limit->is_subtype_of(m->method_holder()), "virtual call must be type-safe"); |
207 if (TraceInvokeDynamic) { | |
208 ResourceMark rm; | |
209 tty->print_cr("memberName: invokevirtual method_holder::method: %s, receiver: %s, vtableindex: %d, access_flags:", | |
210 Method::name_and_sig_as_C_string(receiver_limit(), m->name(), m->signature()), | |
211 receiver_limit()->internal_name(), vmindex); | |
212 m->access_flags().print_on(tty); | |
213 if (m->is_default_method()) { | |
214 tty->print("default"); | |
215 } | |
216 tty->cr(); | |
217 } | |
196 break; | 218 break; |
197 | 219 |
198 case CallInfo::direct_call: | 220 case CallInfo::direct_call: |
199 vmindex = Method::nonvirtual_vtable_index; | 221 vmindex = Method::nonvirtual_vtable_index; |
200 if (m->is_static()) { | 222 if (m->is_static()) { |
1170 if (vmtarget == NULL) { | 1192 if (vmtarget == NULL) { |
1171 x = NULL; | 1193 x = NULL; |
1172 } else if (vmtarget->is_klass()) { | 1194 } else if (vmtarget->is_klass()) { |
1173 x = ((Klass*) vmtarget)->java_mirror(); | 1195 x = ((Klass*) vmtarget)->java_mirror(); |
1174 } else if (vmtarget->is_method()) { | 1196 } else if (vmtarget->is_method()) { |
1175 Handle mname2 = MethodHandles::new_MemberName(CHECK_NULL); | 1197 x = mname(); |
1176 CallInfo info((Method*)vmtarget); | |
1177 x = MethodHandles::init_method_MemberName(mname2, info); | |
1178 } | 1198 } |
1179 result->obj_at_put(1, x); | 1199 result->obj_at_put(1, x); |
1180 return JNIHandles::make_local(env, result()); | 1200 return JNIHandles::make_local(env, result()); |
1181 } | 1201 } |
1182 JVM_END | 1202 JVM_END |