blob: 22082a1c99fb8bb2480c0679ca46a56277e922e1 [file] [log] [blame]
description(
"Tests what happens if we OSR exit on an assignment that was part of a side-effecting intrinsic."
);
function foo(array) {
var x = array.pop();
if (x)
return x;
}
for (var i = 0; i < 500; ++i) {
var array = [];
if (i == 50)
array.x = 42;
array.push("blah");
var expected;
if (i >= 450) {
array.push(2);
expected = "2";
} else {
array.push("bleh");
expected = "\"bleh\"";
}
shouldBe("foo(array)", expected);
}