blob: 48bf81c5a46e9e6a0b9ce5a04bc1e0680bbc61fd [file] [log] [blame]
function shouldBe(actual, expected) {
if (actual !== expected)
throw new Error('bad value: ' + actual);
}
var obj = {
0: 0,
1: 1,
get 1() {
return 42;
}
};
function testing(object) {
shouldBe(object[1], 42);
shouldBe(obj[0], 0);
}
noInline(testing);
for (var i = 0; i < 10000; ++i)
testing(obj);