michael@0: // Test for one annoying case of the EliminateUnreachableCode michael@0: // optimization. Here the dominator of print("Goodbye") changes to be michael@0: // the print("Hello") after optimization. michael@0: michael@0: function test1(v) { michael@0: if (v) { michael@0: if (v) { michael@0: assertEq(v, v); michael@0: } else { michael@0: assertEq(0, 1); michael@0: } michael@0: } else { michael@0: if (v) { michael@0: assertEq(0, 1); michael@0: } else { michael@0: assertEq(v, v); michael@0: } michael@0: } michael@0: assertEq(v, v); michael@0: } michael@0: michael@0: function test() { michael@0: test1(true); michael@0: test1(false); michael@0: } michael@0: michael@0: for (var i = 0; i < 100; i++) michael@0: test();