diff src/share/vm/ci/ciMethod.cpp @ 1818:c93c652551b5

6986944: JSR 292 assert(caller_nm->is_method_handle_return(caller_frame.pc())) failed: must be MH call site Reviewed-by: never, kvn
author twisti
date Fri, 24 Sep 2010 03:51:43 -0700
parents d5d065957597
children 3f9a70eb8b1f
line wrap: on
line diff
--- a/src/share/vm/ci/ciMethod.cpp	Wed Sep 22 23:51:03 2010 -0700
+++ b/src/share/vm/ci/ciMethod.cpp	Fri Sep 24 03:51:43 2010 -0700
@@ -735,7 +735,11 @@
 // Return true if the method is an instance of one of the two
 // signature-polymorphic MethodHandle methods, invokeExact or invokeGeneric.
 bool ciMethod::is_method_handle_invoke() const {
-  if (!is_loaded())  return false;
+  if (!is_loaded()) {
+    bool flag = (holder()->name() == ciSymbol::java_dyn_MethodHandle() &&
+                 methodOopDesc::is_method_handle_invoke_name(name()->sid()));
+    return flag;
+  }
   VM_ENTRY_MARK;
   return get_methodOop()->is_method_handle_invoke();
 }