hotspot/src/share/vm/opto/parse1.cpp
changeset 11445 3c768dca60f5
parent 11430 718fc06da49a
child 11458 5ba160829cef
--- a/hotspot/src/share/vm/opto/parse1.cpp	Sat Jan 07 10:39:23 2012 -0800
+++ b/hotspot/src/share/vm/opto/parse1.cpp	Sat Jan 07 13:26:43 2012 -0800
@@ -1819,8 +1819,12 @@
   } else if (jvms->is_stk(idx)) {
     t = block()->stack_type_at(idx - jvms->stkoff());
   } else if (jvms->is_mon(idx)) {
-    assert(!jvms->is_monitor_box(idx), "no phis for boxes");
-    t = TypeInstPtr::BOTTOM; // this is sufficient for a lock object
+    if (EliminateNestedLocks && jvms->is_monitor_box(idx)) {
+      // BoxLock nodes are not commoning. Create Phi.
+      t = o->bottom_type(); // TypeRawPtr::BOTTOM
+    } else {
+      t = TypeInstPtr::BOTTOM; // this is sufficient for a lock object
+    }
   } else if ((uint)idx < TypeFunc::Parms) {
     t = o->bottom_type();  // Type::RETURN_ADDRESS or such-like.
   } else {