prepack
Version:
Execute a JS bundle, serialize global state and side effects to a snapshot that can be quickly restored.
27 lines (22 loc) • 817 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _default;
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(ast, strictCode, env, realm) {
// ECMA262 13.5.1
// 1. Let exprRef be the result of evaluating Expression.
let exprRef = env.evaluate(ast.expression, strictCode); // 2. Return ? GetValue(exprRef).
return _singletons.Environment.GetValue(realm, exprRef);
}
//# sourceMappingURL=ExpressionStatement.js.map