blob: 6901bebc8ae1d38fb3873e8a0047a24bd846c22f [file] [log] [blame]
description(
"Tests that the DFG doesn't crash if we constant fold the first read of a local variable in a block that is the result of merging two blocks, where the first doesn't touch the local and the second reads it."
);
function foo(x, y) {
var o = {};
if (y == 5) {
o.f = 42;
}
var z = o.f;
if (x == 5) {
if (y == 5) {
return z;
}
}
}
function bar(x) {
return foo(x, 5);
}
dfgShouldBe(bar, "bar(5)", "42");