Mercurial > hg > graal-jvmci-8
comparison src/share/vm/graal/graalEnv.cpp @ 9011:23762f2438b6
support for compiling LambdaForm invocations (invokevirtual instructions that were rewritten to invokehandle instructions)
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Thu, 11 Apr 2013 21:43:14 +0200 |
parents | 7ef66078d837 |
children | 700f6a63763a |
comparison
equal
deleted
inserted
replaced
9010:08a16c26907f | 9011:23762f2438b6 |
---|---|
337 KlassHandle holder = get_klass_by_index_impl(cpool, holder_index, holder_is_accessible, accessor); | 337 KlassHandle holder = get_klass_by_index_impl(cpool, holder_index, holder_is_accessible, accessor); |
338 | 338 |
339 // Get the method's name and signature. | 339 // Get the method's name and signature. |
340 Symbol* name_sym = cpool->name_ref_at(index); | 340 Symbol* name_sym = cpool->name_ref_at(index); |
341 Symbol* sig_sym = cpool->signature_ref_at(index); | 341 Symbol* sig_sym = cpool->signature_ref_at(index); |
342 | |
343 if (cpool->has_preresolution() | |
344 || (holder() == SystemDictionary::MethodHandle_klass() && | |
345 MethodHandles::is_signature_polymorphic_name(holder(), name_sym))) { | |
346 // Short-circuit lookups for JSR 292-related call sites. | |
347 // That is, do not rely only on name-based lookups, because they may fail | |
348 // if the names are not resolvable in the boot class loader (7056328). | |
349 switch (bc) { | |
350 case Bytecodes::_invokevirtual: | |
351 case Bytecodes::_invokeinterface: | |
352 case Bytecodes::_invokespecial: | |
353 case Bytecodes::_invokestatic: | |
354 { | |
355 Method* m = ConstantPool::method_at_if_loaded(cpool, index); | |
356 if (m != NULL) { | |
357 return m; | |
358 } | |
359 } | |
360 break; | |
361 } | |
362 } | |
342 | 363 |
343 if (holder_is_accessible) { // Our declared holder is loaded. | 364 if (holder_is_accessible) { // Our declared holder is loaded. |
344 instanceKlassHandle lookup = get_instance_klass_for_declared_method_holder(holder); | 365 instanceKlassHandle lookup = get_instance_klass_for_declared_method_holder(holder); |
345 methodHandle m = lookup_method(accessor, lookup, name_sym, sig_sym, bc); | 366 methodHandle m = lookup_method(accessor, lookup, name_sym, sig_sym, bc); |
346 if (!m.is_null() && | 367 if (!m.is_null() && |