blob: f69f4e52a92ebab1aec3fe1b0e9d80495a231f27 [file] [log] [blame]
var createBuiltin = $vm.createBuiltin;
function shouldBe(actual, expected) {
if (actual !== expected)
throw new Error('bad value: ' + actual);
}
var builtin = createBuiltin(`(function (a) {
return @argument(5);
})`);
function inlining(a, b, c)
{
return builtin.call(this, ...[1, 2, 3, 4, 5, 6, 7]);
}
noInline(inlining);
function escape(value)
{
return value;
}
noInline(escape);
(function () {
for (var i = 0; i < 1e4; ++i)
shouldBe(escape(inlining(0)), 6);
}());