blob: b5c06df7b14b6591acb0add47d43cc6fea5991c9 [file] [log] [blame]
var createBuiltin = $vm.createBuiltin;
function shouldBe(actual, expected) {
if (actual !== expected)
throw new Error('bad value: ' + actual);
}
(function () {
var builtin = createBuiltin(`(function (obj, value) {
return @putByIdDirect(obj, "hello", value);
})`);
noInline(builtin);
var setValue = null;
var object = {
__proto__: {
hello: 30
}
};
builtin(object, 42);
shouldBe(object.hello, 42);
shouldBe(object.hasOwnProperty("hello"), true);
}());