blob: 4226770674fbb5c40356974765f777f30431ffa9 [file] [log] [blame]
function assert(b) {
if (!b)
throw new Error;
}
noInline(assert);
function foo(...args) {
return args[0];
}
noInline(foo);
for (let i = 0; i < 10000; i++) {
// Warm it up on in bound accesses.
assert(foo(i) === i);
}
Object.prototype[0] = 50;
for (let i = 0; i < 10000; i++)
assert(foo() === 50);