blob: 3b34fe371658577f9484f44980905d37ab303c6a [file] [log] [blame]
var x = 1;
var o = {
get value() {
x ^= x * 3;
x = x | 1;
return x;
}
}
function foo(o) {
var result = 0;
for (var i = 0; i < 128; i++) {
result ^= o.value;
result |= 1
}
return result;
}
noInline(foo);
var result = 0;
for (var i = 0; i < 40000; ++i) {
result ^= foo(o);
result = result | 1;
}
if (result != -2004318071)
throw "Incorrect result: " + result + ". Should be -2004318071";