UNPKG

prepack

Version:

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

36 lines (28 loc) 1.23 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = _default; var _index = require("../../values/index.js"); var _singletons = require("../../singletons.js"); /** * Copyright (c) 2017-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. */ /* strict-local */ function _default(realm) { // ECMA262 18.2.1 return new _index.NativeFunctionValue(realm, "eval", "eval", 1, (context, [x]) => { // 1. Let evalRealm be the value of the active function object's [[Realm]] internal slot. let rcontext = realm.getRunningContext(); let evalRealm = rcontext.function == null ? realm : rcontext.function.$Realm; // 2. Let strictCaller be false. let strictCaller = false; // 3. Let directEval be false. let directEval = false; // 4. Return ? PerformEval(x, evalRealm, strictCaller, directEval). return _singletons.Functions.PerformEval(realm, x, evalRealm, strictCaller, directEval); }, false); } //# sourceMappingURL=eval.js.map