1.1 --- a/src/share/vm/opto/parse1.cpp Sat Jan 07 10:39:23 2012 -0800 1.2 +++ b/src/share/vm/opto/parse1.cpp Sat Jan 07 13:26:43 2012 -0800 1.3 @@ -1819,8 +1819,12 @@ 1.4 } else if (jvms->is_stk(idx)) { 1.5 t = block()->stack_type_at(idx - jvms->stkoff()); 1.6 } else if (jvms->is_mon(idx)) { 1.7 - assert(!jvms->is_monitor_box(idx), "no phis for boxes"); 1.8 - t = TypeInstPtr::BOTTOM; // this is sufficient for a lock object 1.9 + if (EliminateNestedLocks && jvms->is_monitor_box(idx)) { 1.10 + // BoxLock nodes are not commoning. Create Phi. 1.11 + t = o->bottom_type(); // TypeRawPtr::BOTTOM 1.12 + } else { 1.13 + t = TypeInstPtr::BOTTOM; // this is sufficient for a lock object 1.14 + } 1.15 } else if ((uint)idx < TypeFunc::Parms) { 1.16 t = o->bottom_type(); // Type::RETURN_ADDRESS or such-like. 1.17 } else {