hotspot/src/share/vm/opto/parseHelper.cpp
changeset 6416 d49b65c9425a
parent 5925 a30fef61d0b7
child 7397 5b173b4ca846
--- a/hotspot/src/share/vm/opto/parseHelper.cpp	Thu Aug 19 14:51:47 2010 -0700
+++ b/hotspot/src/share/vm/opto/parseHelper.cpp	Fri Aug 20 23:40:30 2010 -0700
@@ -119,7 +119,11 @@
   }
 
   // Push the bool result back on stack
-  push( gen_instanceof( pop(), makecon(TypeKlassPtr::make(klass)) ) );
+  Node* res = gen_instanceof(peek(), makecon(TypeKlassPtr::make(klass)));
+
+  // Pop from stack AFTER gen_instanceof because it can uncommon trap.
+  pop();
+  push(res);
 }
 
 //------------------------------array_store_check------------------------------