Mercurial > hg > graal-compiler
diff src/share/vm/interpreter/linkResolver.cpp @ 3461:81d815b05abb
7056328: JSR 292 invocation sometimes fails in adapters for types not on boot class path
Reviewed-by: never
author | jrose |
---|---|
date | Thu, 23 Jun 2011 17:14:06 -0700 |
parents | ba550512d3b2 |
children | 43f9d800f276 |
line wrap: on
line diff
--- a/src/share/vm/interpreter/linkResolver.cpp Thu Jun 23 22:43:28 2011 -0700 +++ b/src/share/vm/interpreter/linkResolver.cpp Thu Jun 23 17:14:06 2011 -0700 @@ -294,6 +294,16 @@ Symbol* method_signature = pool->signature_ref_at(index); KlassHandle current_klass(THREAD, pool->pool_holder()); + if (pool->has_preresolution() + || (resolved_klass() == SystemDictionary::MethodHandle_klass() && + methodOopDesc::is_method_handle_invoke_name(method_name))) { + methodOop result_oop = constantPoolOopDesc::method_at_if_loaded(pool, index); + if (result_oop != NULL) { + resolved_method = methodHandle(THREAD, result_oop); + return; + } + } + resolve_method(resolved_method, resolved_klass, method_name, method_signature, current_klass, true, CHECK); }