blob: 2472cef9b397526e70979ee4a57683df81ae4d89 [file] [log] [blame]
function assert(a, e) {
if (a !== e)
throw new Error("Bad");
}
function valueSub() {
let sum = 0;
do {
// We trigger the JIT compilation of valueSub
// so Date.now() will have SpecNone as result
for (let i = 0; i < 10000; i++)
sum++;
sum += 0.5;
} while (Date.now() - sum < 0);
assert(sum, 10000.5);
}
noInline(valueSub);
valueSub();