hotspot/src/share/vm/code/nmethod.cpp
changeset 10007 43d4a6542551
parent 9935 51267b5e1a3d
child 10265 4c869854aebd
--- a/hotspot/src/share/vm/code/nmethod.cpp	Tue Jun 21 09:04:55 2011 -0700
+++ b/hotspot/src/share/vm/code/nmethod.cpp	Wed Jun 22 14:45:37 2011 -0700
@@ -1832,7 +1832,9 @@
   if (!method()->is_native()) {
     SimpleScopeDesc ssd(this, fr.pc());
     Bytecode_invoke call(ssd.method(), ssd.bci());
-    bool has_receiver = call.has_receiver();
+    // compiled invokedynamic call sites have an implicit receiver at
+    // resolution time, so make sure it gets GC'ed.
+    bool has_receiver = !call.is_invokestatic();
     Symbol* signature = call.signature();
     fr.oops_compiled_arguments_do(signature, has_receiver, reg_map, f);
   }