UNPKG

prepack

Version:

Execute a JS bundle, serialize global state and side effects to a snapshot that can be quickly restored.

26 lines (19 loc) 820 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = function (realm) { // ECMA262 25.2.1 let func = new _index.NativeFunctionValue(realm, "GeneratorFunction", "GeneratorFunction", 1, (context, args, argCount, NewTarget) => { // 1. Let C be the active function object. let C = func; // 2. Let args be the argumentsList that was passed to this function by [[Call]] or [[Construct]]. args = argCount > 0 ? args : []; // 3. Return ? CreateDynamicFunction(C, NewTarget, "generator", args). return _singletons.Create.CreateDynamicFunction(realm, C, NewTarget, "generator", args); }); return func; }; var _index = require("../../values/index.js"); var _singletons = require("../../singletons.js"); //# sourceMappingURL=GeneratorFunction.js.map