blob: 5fc4d18d401fa70f01c98881083ce00b332e7510 [file] [log] [blame]
function shouldBe(actual, expected)
{
if (actual !== expected)
throw new Error('bad value: ' + actual);
}
function assign(object, name, value)
{
object[name] = value;
}
noInline(assign);
var key = Symbol();
for (var i = 0; i < 10001; ++i) {
var object = {};
if (i === 10000) {
var key2 = Symbol();
assign(object, key2, 42);
shouldBe(object[key2], 42);
shouldBe(object[key], undefined);
} else {
assign(object, key, 42);
shouldBe(object[key], 42);
}
}