--- 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------------------------------