first commit
This commit is contained in:
184
build/node_modules/prepack/lib/partial-evaluators/ArrayExpression.js
generated
vendored
Normal file
184
build/node_modules/prepack/lib/partial-evaluators/ArrayExpression.js
generated
vendored
Normal file
@@ -0,0 +1,184 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); /**
|
||||
* 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.
|
||||
*/
|
||||
|
||||
// ECMA262 2.2.5.3
|
||||
|
||||
|
||||
exports.default = function (ast, strictCode, env, realm) {
|
||||
// 1. Let array be ArrayCreate(0).
|
||||
var array = _singletons.Create.ArrayCreate(realm, 0);
|
||||
|
||||
// 2. Let len be the result of performing ArrayAccumulation for ElementList with arguments array and 0.
|
||||
var elements = ast.elements || [];
|
||||
var partial_elements = [];
|
||||
var io = [];
|
||||
var len = elements.length;
|
||||
var nextIndex = 0;
|
||||
for (var i = 0; i < len; i++) {
|
||||
var elem = elements[i];
|
||||
if (!elem) {
|
||||
nextIndex++;
|
||||
continue;
|
||||
}
|
||||
|
||||
var elemValue = void 0,
|
||||
elemAst = void 0,
|
||||
elemIO = void 0;
|
||||
if (elem.type === "SpreadElement") {
|
||||
;
|
||||
|
||||
var _env$partiallyEvaluat = env.partiallyEvaluateCompletionDeref(elem.argument, strictCode);
|
||||
|
||||
var _env$partiallyEvaluat2 = _slicedToArray(_env$partiallyEvaluat, 3);
|
||||
|
||||
elemValue = _env$partiallyEvaluat2[0];
|
||||
elemAst = _env$partiallyEvaluat2[1];
|
||||
elemIO = _env$partiallyEvaluat2[2];
|
||||
} else {
|
||||
;
|
||||
|
||||
var _env$partiallyEvaluat3 = env.partiallyEvaluateCompletionDeref(elem, strictCode);
|
||||
|
||||
var _env$partiallyEvaluat4 = _slicedToArray(_env$partiallyEvaluat3, 3);
|
||||
|
||||
elemValue = _env$partiallyEvaluat4[0];
|
||||
elemAst = _env$partiallyEvaluat4[1];
|
||||
elemIO = _env$partiallyEvaluat4[2];
|
||||
}io.concat(elemIO);
|
||||
if (elemValue instanceof _completions.AbruptCompletion) {
|
||||
return [elemValue, ast, io]; //todo: log an error message
|
||||
} else if (elemValue instanceof _completions.PossiblyNormalCompletion) {
|
||||
// TODO: there was a conditional abrupt completion while evaluating elem, so join states somehow
|
||||
_index2.AbstractValue.reportIntrospectionError(elemValue.value);
|
||||
throw new _errors.FatalError();
|
||||
}
|
||||
(0, _invariant2.default)(elemValue instanceof _index2.Value);
|
||||
partial_elements[nextIndex] = elemAst;
|
||||
|
||||
// ECMA262 12.2.5.2
|
||||
if (elem.type === "SpreadElement") {
|
||||
var spreadObj = elemValue;
|
||||
partial_elements[nextIndex] = t.spreadElement(elemAst);
|
||||
|
||||
// update the abstract state with the contents of spreadObj, if known
|
||||
if (spreadObj instanceof _index2.ObjectValue && !spreadObj.isPartialObject()) {
|
||||
// 3. Let iterator be ? GetIterator(spreadObj).
|
||||
var iterator = (0, _index.GetIterator)(realm, spreadObj);
|
||||
|
||||
// 4. Repeat
|
||||
while (true) {
|
||||
// a. Let next be ? IteratorStep(iterator).
|
||||
var next = (0, _index.IteratorStep)(realm, iterator);
|
||||
|
||||
// b. If next is false, return nextIndex.
|
||||
if (next === false) break;
|
||||
|
||||
// c. Let nextValue be ? IteratorValue(next).
|
||||
var nextValue = (0, _index.IteratorValue)(realm, next);
|
||||
|
||||
// d. Let status be CreateDataProperty(array, ToString(ToUint32(nextIndex)), nextValue).
|
||||
var status = _singletons.Create.CreateDataProperty(realm, array, new _index2.StringValue(realm, nextIndex + ""), nextValue);
|
||||
|
||||
// e. Assert: status is true.
|
||||
(0, _invariant2.default)(status === true);
|
||||
|
||||
// f. Let nextIndex be nextIndex + 1.
|
||||
nextIndex++;
|
||||
}
|
||||
} else {
|
||||
// Update the abstract state to reflect our lack of complete knowledge
|
||||
// of all of the properties of the result of evaluating elem.
|
||||
array.makePartial();
|
||||
|
||||
// terminate the loop if all elements have been processed
|
||||
if (i === len - 1) break;
|
||||
|
||||
// If there are elements that come after this spread element, we need
|
||||
// to take their effects into account for the abstract state that results
|
||||
// from the array expression.
|
||||
|
||||
// First check if the runtime spread operation cannot fail
|
||||
if (spreadObj instanceof _index2.AbstractValue && spreadObj.getType() === "Array") {
|
||||
var method = (0, _index.GetMethod)(realm, spreadObj, realm.intrinsics.SymbolIterator);
|
||||
if (method === realm.intrinsics.ArrayProto_values) continue;
|
||||
}
|
||||
|
||||
// At this point we have to be pessimistic and assume that iterating spreadObj may
|
||||
// throw an exception, in which case we can't assume that the remaining element
|
||||
// expressions will be evaluated at runtime. As a consequence their effects
|
||||
// have be provisional.
|
||||
// TODO: join states somehow
|
||||
_index2.AbstractValue.reportIntrospectionError(spreadObj);
|
||||
throw new _errors.FatalError();
|
||||
}
|
||||
} else if (array.isPartialObject()) {
|
||||
// Dealing with an array element that follows on a spread object that
|
||||
// could not be iterated at compile time, so the index that this element
|
||||
// will have at runtime is not known at this point.
|
||||
|
||||
var abstractIndex = _index2.AbstractValue.createFromType(realm, _index2.NumberValue);
|
||||
array.$SetPartial(abstractIndex, elemValue, array);
|
||||
} else {
|
||||
// Redundant steps.
|
||||
// 1. Let postIndex be the result of performing ArrayAccumulation for ElementList with arguments array and nextIndex.
|
||||
// 2. ReturnIfAbrupt(postIndex).
|
||||
// 3. Let padding be the ElisionWidth of Elision; if Elision is not present, use the numeric value zero.
|
||||
|
||||
// 4. Let initResult be the result of evaluating AssignmentExpression.
|
||||
// 5. Let initValue be ? GetValue(initResult).
|
||||
var initValue = elemValue;
|
||||
|
||||
// 6. Let created be CreateDataProperty(array, ToString(ToUint32(postIndex+padding)), initValue).
|
||||
var created = _singletons.Create.CreateDataProperty(realm, array, new _index2.StringValue(realm, nextIndex++ + ""), initValue);
|
||||
|
||||
// 7. Assert: created is true.
|
||||
(0, _invariant2.default)(created === true, "expected data property creation");
|
||||
}
|
||||
}
|
||||
|
||||
// Not necessary since we propagate completions with exceptions.
|
||||
// 3. ReturnIfAbrupt(len).
|
||||
|
||||
// 4. Perform Set(array, "length", ToUint32(len), false).
|
||||
_singletons.Properties.Set(realm, array, "length", new _index2.NumberValue(realm, nextIndex), false);
|
||||
|
||||
// 5. NOTE: The above Set cannot fail because of the nature of the object returned by ArrayCreate.
|
||||
|
||||
// 6. Return array.
|
||||
return [array, t.arrayExpression(partial_elements), io];
|
||||
};
|
||||
|
||||
var _completions = require("../completions.js");
|
||||
|
||||
var _errors = require("../errors.js");
|
||||
|
||||
var _index = require("../methods/index.js");
|
||||
|
||||
var _index2 = require("../values/index.js");
|
||||
|
||||
var _singletons = require("../singletons.js");
|
||||
|
||||
var _invariant = require("../invariant.js");
|
||||
|
||||
var _invariant2 = _interopRequireDefault(_invariant);
|
||||
|
||||
var _babelTypes = require("babel-types");
|
||||
|
||||
var t = _interopRequireWildcard(_babelTypes);
|
||||
|
||||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
//# sourceMappingURL=ArrayExpression.js.map
|
||||
1
build/node_modules/prepack/lib/partial-evaluators/ArrayExpression.js.map
generated
vendored
Normal file
1
build/node_modules/prepack/lib/partial-evaluators/ArrayExpression.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
15
build/node_modules/prepack/lib/partial-evaluators/ArrowFunctionExpression.js
generated
vendored
Normal file
15
build/node_modules/prepack/lib/partial-evaluators/ArrowFunctionExpression.js
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
exports.default = function (ast, strictCode, env, realm) {
|
||||
var result = env.evaluateCompletionDeref(ast, strictCode);
|
||||
return [result, ast, []];
|
||||
};
|
||||
|
||||
var _completions = require("../completions.js");
|
||||
|
||||
var _index = require("../values/index.js");
|
||||
//# sourceMappingURL=ArrowFunctionExpression.js.map
|
||||
1
build/node_modules/prepack/lib/partial-evaluators/ArrowFunctionExpression.js.map
generated
vendored
Normal file
1
build/node_modules/prepack/lib/partial-evaluators/ArrowFunctionExpression.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../src/partial-evaluators/ArrowFunctionExpression.js"],"names":["ast","strictCode","env","realm","result","evaluateCompletionDeref"],"mappings":";;;;;;kBAmBe,UACbA,GADa,EAEbC,UAFa,EAGbC,GAHa,EAIbC,KAJa,EAK4E;AACzF,MAAIC,SAASF,IAAIG,uBAAJ,CAA4BL,GAA5B,EAAiCC,UAAjC,CAAb;AACA,SAAO,CAACG,MAAD,EAASJ,GAAT,EAAc,EAAd,CAAP;AACD,C;;AAZD;;AACA","file":"ArrowFunctionExpression.js","sourcesContent":["/**\n * Copyright (c) 2017-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\n/* @flow */\n\nimport type { BabelNodeArrowFunctionExpression, BabelNodeStatement } from \"babel-types\";\nimport type { LexicalEnvironment } from \"../environment.js\";\nimport type { Realm } from \"../realm.js\";\n\nimport { AbruptCompletion } from \"../completions.js\";\nimport { Value } from \"../values/index.js\";\n\n// ECMA262 14.2.16\nexport default function(\n ast: BabelNodeArrowFunctionExpression,\n strictCode: boolean,\n env: LexicalEnvironment,\n realm: Realm\n): [AbruptCompletion | Value, BabelNodeArrowFunctionExpression, Array<BabelNodeStatement>] {\n let result = env.evaluateCompletionDeref(ast, strictCode);\n return [result, ast, []];\n}\n"]}
|
||||
203
build/node_modules/prepack/lib/partial-evaluators/AssignmentExpression.js
generated
vendored
Normal file
203
build/node_modules/prepack/lib/partial-evaluators/AssignmentExpression.js
generated
vendored
Normal file
@@ -0,0 +1,203 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); /**
|
||||
* 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.
|
||||
*/
|
||||
|
||||
// ECMA262 12.15 Assignment Operators
|
||||
|
||||
|
||||
exports.default = function (ast, strictCode, env, realm) {
|
||||
var LeftHandSideExpression = ast.left;
|
||||
var AssignmentExpression = ast.right;
|
||||
var AssignmentOperator = ast.operator;
|
||||
|
||||
// AssignmentExpression : LeftHandSideExpression = AssignmentExpression
|
||||
if (AssignmentOperator === "=") {
|
||||
// 1. If LeftHandSideExpression is neither an ObjectLiteral nor an ArrayLiteral, then
|
||||
if (LeftHandSideExpression.type !== "ObjectLiteral" && LeftHandSideExpression.type !== "ArrayLiteral") {
|
||||
// a. Let lref be the result of evaluating LeftHandSideExpression.
|
||||
var _env$partiallyEvaluat = env.partiallyEvaluateCompletion(LeftHandSideExpression, strictCode),
|
||||
_env$partiallyEvaluat2 = _slicedToArray(_env$partiallyEvaluat, 3),
|
||||
_lref = _env$partiallyEvaluat2[0],
|
||||
_last = _env$partiallyEvaluat2[1],
|
||||
_lio = _env$partiallyEvaluat2[2];
|
||||
|
||||
// b. ReturnIfAbrupt(lref).
|
||||
|
||||
|
||||
if (_lref instanceof _completions.AbruptCompletion) return [_lref, _last, _lio];
|
||||
var _leftCompletion = void 0;
|
||||
|
||||
// c. Let rref be the result of evaluating AssignmentExpression.
|
||||
// d. Let rval be ? GetValue(rref).
|
||||
var _Join$unbundleNormalC = _singletons.Join.unbundleNormalCompletion(_lref);
|
||||
|
||||
var _Join$unbundleNormalC2 = _slicedToArray(_Join$unbundleNormalC, 2);
|
||||
|
||||
_leftCompletion = _Join$unbundleNormalC2[0];
|
||||
_lref = _Join$unbundleNormalC2[1];
|
||||
|
||||
var _env$partiallyEvaluat3 = env.partiallyEvaluateCompletionDeref(AssignmentExpression, strictCode),
|
||||
_env$partiallyEvaluat4 = _slicedToArray(_env$partiallyEvaluat3, 3),
|
||||
_rval = _env$partiallyEvaluat4[0],
|
||||
_rast = _env$partiallyEvaluat4[1],
|
||||
_rio = _env$partiallyEvaluat4[2];
|
||||
|
||||
var _io = _lio.concat(_rio);
|
||||
if (_rval instanceof _completions.AbruptCompletion) {
|
||||
return [_rval, t.assignmentExpression(ast.operator, _last, _rast), _io];
|
||||
}
|
||||
var _rightCompletion = void 0;
|
||||
|
||||
var _Join$unbundleNormalC3 = _singletons.Join.unbundleNormalCompletion(_rval);
|
||||
|
||||
var _Join$unbundleNormalC4 = _slicedToArray(_Join$unbundleNormalC3, 2);
|
||||
|
||||
_rightCompletion = _Join$unbundleNormalC4[0];
|
||||
_rval = _Join$unbundleNormalC4[1];
|
||||
|
||||
(0, _invariant2.default)(_rval instanceof _index.Value);
|
||||
|
||||
// e. If IsAnonymousFunctionDefinition(AssignmentExpression) and IsIdentifierRef of LeftHandSideExpression are both true, then
|
||||
if ((0, _index2.IsAnonymousFunctionDefinition)(realm, AssignmentExpression) && (0, _index2.IsIdentifierRef)(realm, LeftHandSideExpression)) {
|
||||
(0, _invariant2.default)(_rval instanceof _index.ObjectValue);
|
||||
|
||||
// i. Let hasNameProperty be ? HasOwnProperty(rval, "name").
|
||||
var hasNameProperty = (0, _index2.HasOwnProperty)(realm, _rval, "name");
|
||||
|
||||
// ii. If hasNameProperty is false, perform SetFunctionName(rval, GetReferencedName(lref)).
|
||||
if (!hasNameProperty) {
|
||||
(0, _invariant2.default)(_lref instanceof _environment.Reference);
|
||||
_singletons.Functions.SetFunctionName(realm, _rval, _singletons.Environment.GetReferencedName(realm, _lref));
|
||||
}
|
||||
}
|
||||
|
||||
// f. Perform ? PutValue(lref, rval).
|
||||
_singletons.Properties.PutValue(realm, _lref, _rval);
|
||||
|
||||
// g. Return rval.
|
||||
var _resultAst = t.assignmentExpression(ast.operator, _last, _rast);
|
||||
_rval = _singletons.Join.composeNormalCompletions(_leftCompletion, _rightCompletion, _rval, realm);
|
||||
return [_rval, _resultAst, _io];
|
||||
}
|
||||
throw new _errors.FatalError("Patterns aren't supported yet");
|
||||
// 2. Let assignmentPattern be the parse of the source text corresponding to LeftHandSideExpression using AssignmentPattern[?Yield] as the goal symbol.
|
||||
// 3. Let rref be the result of evaluating AssignmentExpression.
|
||||
// 4. Let rval be ? GetValue(rref).
|
||||
// 5. Let status be the result of performing DestructuringAssignmentEvaluation of assignmentPattern using rval as the argument.
|
||||
// 6. ReturnIfAbrupt(status).
|
||||
// 7. Return rval.
|
||||
}
|
||||
|
||||
// AssignmentExpression : LeftHandSideExpression AssignmentOperator AssignmentExpression
|
||||
|
||||
// 1. Let lref be the result of evaluating LeftHandSideExpression.
|
||||
|
||||
var _env$partiallyEvaluat5 = env.partiallyEvaluateCompletion(LeftHandSideExpression, strictCode),
|
||||
_env$partiallyEvaluat6 = _slicedToArray(_env$partiallyEvaluat5, 3),
|
||||
lref = _env$partiallyEvaluat6[0],
|
||||
last = _env$partiallyEvaluat6[1],
|
||||
lio = _env$partiallyEvaluat6[2];
|
||||
|
||||
if (lref instanceof _completions.AbruptCompletion) return [lref, last, lio];
|
||||
var leftCompletion = void 0;
|
||||
|
||||
// 2. Let lval be ? GetValue(lref).
|
||||
var _Join$unbundleNormalC5 = _singletons.Join.unbundleNormalCompletion(lref);
|
||||
|
||||
var _Join$unbundleNormalC6 = _slicedToArray(_Join$unbundleNormalC5, 2);
|
||||
|
||||
leftCompletion = _Join$unbundleNormalC6[0];
|
||||
lref = _Join$unbundleNormalC6[1];
|
||||
var lval = _singletons.Environment.GetValue(realm, lref);
|
||||
|
||||
// 3. Let rref be the result of evaluating AssignmentExpression.
|
||||
// 4. Let rval be ? GetValue(rref).
|
||||
|
||||
var _env$partiallyEvaluat7 = env.partiallyEvaluateCompletionDeref(AssignmentExpression, strictCode),
|
||||
_env$partiallyEvaluat8 = _slicedToArray(_env$partiallyEvaluat7, 3),
|
||||
rval = _env$partiallyEvaluat8[0],
|
||||
rast = _env$partiallyEvaluat8[1],
|
||||
rio = _env$partiallyEvaluat8[2];
|
||||
|
||||
var io = lio.concat(rio);
|
||||
if (rval instanceof _completions.AbruptCompletion) {
|
||||
return [rval, t.assignmentExpression(ast.operator, last, rast), io];
|
||||
}
|
||||
var rightCompletion = void 0;
|
||||
|
||||
var _Join$unbundleNormalC7 = _singletons.Join.unbundleNormalCompletion(rval);
|
||||
|
||||
var _Join$unbundleNormalC8 = _slicedToArray(_Join$unbundleNormalC7, 2);
|
||||
|
||||
rightCompletion = _Join$unbundleNormalC8[0];
|
||||
rval = _Join$unbundleNormalC8[1];
|
||||
|
||||
(0, _invariant2.default)(rval instanceof _index.Value);
|
||||
|
||||
// 5. Let op be the @ where AssignmentOperator is @=.
|
||||
var op = AssignmentOperator.slice(0, -1);
|
||||
|
||||
// 6. Let r be the result of applying op to lval and rval as if evaluating the expression lval op rval.
|
||||
var resultValue = void 0,
|
||||
resultAst = void 0;
|
||||
if (lval instanceof _index.ConcreteValue) {
|
||||
if (rval instanceof _index.ConcreteValue) {
|
||||
resultValue = (0, _BinaryExpression.computeBinary)(realm, op, lval, rval);
|
||||
resultAst = t.assignmentExpression(ast.operator, last, t.valueToNode(resultValue.serialize()));
|
||||
}
|
||||
}
|
||||
// if resultValue is undefined, one or both operands are abstract.
|
||||
if (resultValue === undefined && (op === "==" || op === "===" || op === "!=" || op === "!==")) {
|
||||
// When comparing to null or undefined, we can return a compile time value if we know the
|
||||
// other operand must be an object.
|
||||
if (!lval.mightNotBeObject() && (rval instanceof _index.NullValue || rval instanceof _index.UndefinedValue) || !rval.mightNotBeObject() && (lval instanceof _index.NullValue || lval instanceof _index.UndefinedValue)) {
|
||||
resultValue = new _index.BooleanValue(realm, op[0] !== "=");
|
||||
resultAst = t.assignmentExpression(ast.operator, last, t.valueToNode(resultValue.serialize()));
|
||||
}
|
||||
}
|
||||
// todo: special case if one result is known to be 0 or 1
|
||||
if (resultAst === undefined) {
|
||||
resultAst = t.assignmentExpression(ast.operator, last, rast);
|
||||
}
|
||||
return (0, _BinaryExpression2.createAbstractValueForBinary)(op, resultAst, lval, rval, last.loc, rast.loc, leftCompletion, rightCompletion, resultValue, io, realm);
|
||||
};
|
||||
|
||||
var _BinaryExpression = require("../evaluators/BinaryExpression.js");
|
||||
|
||||
var _BinaryExpression2 = require("../partial-evaluators/BinaryExpression.js");
|
||||
|
||||
var _completions = require("../completions.js");
|
||||
|
||||
var _environment = require("../environment.js");
|
||||
|
||||
var _errors = require("../errors.js");
|
||||
|
||||
var _index = require("../values/index.js");
|
||||
|
||||
var _index2 = require("../methods/index.js");
|
||||
|
||||
var _singletons = require("../singletons.js");
|
||||
|
||||
var _babelTypes = require("babel-types");
|
||||
|
||||
var t = _interopRequireWildcard(_babelTypes);
|
||||
|
||||
var _invariant = require("../invariant.js");
|
||||
|
||||
var _invariant2 = _interopRequireDefault(_invariant);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
|
||||
//# sourceMappingURL=AssignmentExpression.js.map
|
||||
1
build/node_modules/prepack/lib/partial-evaluators/AssignmentExpression.js.map
generated
vendored
Normal file
1
build/node_modules/prepack/lib/partial-evaluators/AssignmentExpression.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
15
build/node_modules/prepack/lib/partial-evaluators/AwaitExpression.js
generated
vendored
Normal file
15
build/node_modules/prepack/lib/partial-evaluators/AwaitExpression.js
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
exports.default = function (ast, strictCode, env, realm) {
|
||||
var result = env.evaluateCompletionDeref(ast, strictCode);
|
||||
return [result, ast, []];
|
||||
};
|
||||
|
||||
var _completions = require("../completions.js");
|
||||
|
||||
var _index = require("../values/index.js");
|
||||
//# sourceMappingURL=AwaitExpression.js.map
|
||||
1
build/node_modules/prepack/lib/partial-evaluators/AwaitExpression.js.map
generated
vendored
Normal file
1
build/node_modules/prepack/lib/partial-evaluators/AwaitExpression.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../src/partial-evaluators/AwaitExpression.js"],"names":["ast","strictCode","env","realm","result","evaluateCompletionDeref"],"mappings":";;;;;;kBAkBe,UACbA,GADa,EAEbC,UAFa,EAGbC,GAHa,EAIbC,KAJa,EAKoE;AACjF,MAAIC,SAASF,IAAIG,uBAAJ,CAA4BL,GAA5B,EAAiCC,UAAjC,CAAb;AACA,SAAO,CAACG,MAAD,EAASJ,GAAT,EAAc,EAAd,CAAP;AACD,C;;AAXD;;AACA","file":"AwaitExpression.js","sourcesContent":["/**\n * Copyright (c) 2017-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\n/* @flow */\n\nimport type { BabelNodeAwaitExpression, BabelNodeStatement } from \"babel-types\";\nimport type { LexicalEnvironment } from \"../environment.js\";\nimport type { Realm } from \"../realm.js\";\n\nimport { AbruptCompletion } from \"../completions.js\";\nimport { Value } from \"../values/index.js\";\n\nexport default function(\n ast: BabelNodeAwaitExpression,\n strictCode: boolean,\n env: LexicalEnvironment,\n realm: Realm\n): [AbruptCompletion | Value, BabelNodeAwaitExpression, Array<BabelNodeStatement>] {\n let result = env.evaluateCompletionDeref(ast, strictCode);\n return [result, ast, []];\n}\n"]}
|
||||
125
build/node_modules/prepack/lib/partial-evaluators/BinaryExpression.js
generated
vendored
Normal file
125
build/node_modules/prepack/lib/partial-evaluators/BinaryExpression.js
generated
vendored
Normal file
@@ -0,0 +1,125 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); /**
|
||||
* 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.
|
||||
*/
|
||||
|
||||
exports.default = function (ast, strictCode, env, realm) {
|
||||
var _env$partiallyEvaluat = env.partiallyEvaluateCompletionDeref(ast.left, strictCode),
|
||||
_env$partiallyEvaluat2 = _slicedToArray(_env$partiallyEvaluat, 3),
|
||||
lval = _env$partiallyEvaluat2[0],
|
||||
leftAst = _env$partiallyEvaluat2[1],
|
||||
leftIO = _env$partiallyEvaluat2[2];
|
||||
|
||||
if (lval instanceof _completions.AbruptCompletion) return [lval, leftAst, leftIO];
|
||||
var leftCompletion = void 0;
|
||||
|
||||
var _Join$unbundleNormalC = _singletons.Join.unbundleNormalCompletion(lval);
|
||||
|
||||
var _Join$unbundleNormalC2 = _slicedToArray(_Join$unbundleNormalC, 2);
|
||||
|
||||
leftCompletion = _Join$unbundleNormalC2[0];
|
||||
lval = _Join$unbundleNormalC2[1];
|
||||
|
||||
(0, _invariant2.default)(lval instanceof _index.Value);
|
||||
|
||||
var _env$partiallyEvaluat3 = env.partiallyEvaluateCompletionDeref(ast.right, strictCode),
|
||||
_env$partiallyEvaluat4 = _slicedToArray(_env$partiallyEvaluat3, 3),
|
||||
rval = _env$partiallyEvaluat4[0],
|
||||
rightAst = _env$partiallyEvaluat4[1],
|
||||
rightIO = _env$partiallyEvaluat4[2];
|
||||
|
||||
var io = leftIO.concat(rightIO);
|
||||
if (rval instanceof _completions.AbruptCompletion) {
|
||||
// todo: if leftCompletion is a PossiblyNormalCompletion, compose
|
||||
return [rval, t.binaryExpression(ast.operator, leftAst, rightAst), io];
|
||||
}
|
||||
var rightCompletion = void 0;
|
||||
|
||||
var _Join$unbundleNormalC3 = _singletons.Join.unbundleNormalCompletion(rval);
|
||||
|
||||
var _Join$unbundleNormalC4 = _slicedToArray(_Join$unbundleNormalC3, 2);
|
||||
|
||||
rightCompletion = _Join$unbundleNormalC4[0];
|
||||
rval = _Join$unbundleNormalC4[1];
|
||||
|
||||
(0, _invariant2.default)(rval instanceof _index.Value);
|
||||
|
||||
var op = ast.operator;
|
||||
var resultValue = void 0,
|
||||
resultAst = void 0;
|
||||
if (lval instanceof _index.ConcreteValue) {
|
||||
if (rval instanceof _index.ConcreteValue) {
|
||||
resultValue = (0, _BinaryExpression.computeBinary)(realm, op, lval, rval);
|
||||
resultAst = t.valueToNode(resultValue.serialize());
|
||||
}
|
||||
}
|
||||
// if resultValue is undefined, one or both operands are abstract.
|
||||
if (resultValue === undefined && (op === "==" || op === "===" || op === "!=" || op === "!==")) {
|
||||
// When comparing to null or undefined, we can return a compile time value if we know the
|
||||
// other operand must be an object.
|
||||
if (!lval.mightNotBeObject() && (rval instanceof _index.NullValue || rval instanceof _index.UndefinedValue) || !rval.mightNotBeObject() && (lval instanceof _index.NullValue || lval instanceof _index.UndefinedValue)) {
|
||||
resultValue = new _index.BooleanValue(realm, op[0] !== "=");
|
||||
resultAst = t.valueToNode(resultValue.serialize());
|
||||
}
|
||||
}
|
||||
// todo: special case if one result is known to be 0 or 1
|
||||
if (resultAst === undefined) {
|
||||
resultAst = t.binaryExpression(op, leftAst, rightAst);
|
||||
}
|
||||
return createAbstractValueForBinary(op, resultAst, lval, rval, leftAst.loc, rightAst.loc, leftCompletion, rightCompletion, resultValue, io, realm);
|
||||
};
|
||||
|
||||
exports.createAbstractValueForBinary = createAbstractValueForBinary;
|
||||
|
||||
var _BinaryExpression = require("../evaluators/BinaryExpression.js");
|
||||
|
||||
var _completions = require("../completions.js");
|
||||
|
||||
var _errors = require("../errors.js");
|
||||
|
||||
var _singletons = require("../singletons.js");
|
||||
|
||||
var _index = require("../values/index.js");
|
||||
|
||||
var _babelTypes = require("babel-types");
|
||||
|
||||
var t = _interopRequireWildcard(_babelTypes);
|
||||
|
||||
var _invariant = require("../invariant.js");
|
||||
|
||||
var _invariant2 = _interopRequireDefault(_invariant);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
|
||||
|
||||
function createAbstractValueForBinary(op, ast, lval, rval, lloc, rloc, leftCompletion, rightCompletion, resultValue, io, realm) {
|
||||
if (resultValue === undefined) {
|
||||
var resultType = (0, _BinaryExpression.getPureBinaryOperationResultType)(realm, op, lval, rval, lloc, rloc);
|
||||
if (resultType === undefined) {
|
||||
// The operation may result in side effects that we cannot track.
|
||||
// Since we have no idea what those effects are, we can either forget
|
||||
// (havoc) everything we know at this stage, or we can fault the
|
||||
// program and/or native model and stop evaluating.
|
||||
// We choose to do the latter.
|
||||
// TODO: report the error and carry on assuming no side effects.
|
||||
var val = lval instanceof _index.AbstractValue ? lval : rval;
|
||||
_index.AbstractValue.reportIntrospectionError(val);
|
||||
throw new _errors.FatalError();
|
||||
}
|
||||
resultValue = _index.AbstractValue.createFromBinaryOp(realm, op, lval, rval, ast.loc);
|
||||
}
|
||||
var r = _singletons.Join.composeNormalCompletions(leftCompletion, rightCompletion, resultValue, realm);
|
||||
return [r, ast, io];
|
||||
}
|
||||
//# sourceMappingURL=BinaryExpression.js.map
|
||||
1
build/node_modules/prepack/lib/partial-evaluators/BinaryExpression.js.map
generated
vendored
Normal file
1
build/node_modules/prepack/lib/partial-evaluators/BinaryExpression.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
96
build/node_modules/prepack/lib/partial-evaluators/BlockStatement.js
generated
vendored
Normal file
96
build/node_modules/prepack/lib/partial-evaluators/BlockStatement.js
generated
vendored
Normal file
@@ -0,0 +1,96 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); /**
|
||||
* 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.
|
||||
*/
|
||||
|
||||
// ECMA262 13.2.13
|
||||
|
||||
|
||||
exports.default = function (ast, strictCode, env, realm) {
|
||||
// 1. Let oldEnv be the running execution context's LexicalEnvironment.
|
||||
var oldEnv = realm.getRunningContext().lexicalEnvironment;
|
||||
|
||||
// 2. Let blockEnv be NewDeclarativeEnvironment(oldEnv).
|
||||
var blockEnv = _singletons.Environment.NewDeclarativeEnvironment(realm, oldEnv);
|
||||
|
||||
// 3. Perform BlockDeclarationInstantiation(StatementList, blockEnv).
|
||||
_singletons.Environment.BlockDeclarationInstantiation(realm, strictCode, ast.body, blockEnv);
|
||||
|
||||
// 4. Set the running execution context's LexicalEnvironment to blockEnv.
|
||||
realm.getRunningContext().lexicalEnvironment = blockEnv;
|
||||
|
||||
try {
|
||||
// 5. Let blockValue be the result of evaluating StatementList.
|
||||
var blockValue = void 0;
|
||||
|
||||
if (ast.directives) {
|
||||
var _iteratorNormalCompletion = true;
|
||||
var _didIteratorError = false;
|
||||
var _iteratorError = undefined;
|
||||
|
||||
try {
|
||||
for (var _iterator = ast.directives[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
||||
var directive = _step.value;
|
||||
|
||||
blockValue = new _index.StringValue(realm, directive.value.value);
|
||||
}
|
||||
} catch (err) {
|
||||
_didIteratorError = true;
|
||||
_iteratorError = err;
|
||||
} finally {
|
||||
try {
|
||||
if (!_iteratorNormalCompletion && _iterator.return) {
|
||||
_iterator.return();
|
||||
}
|
||||
} finally {
|
||||
if (_didIteratorError) {
|
||||
throw _iteratorError;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var _Functions$PartiallyE = _singletons.Functions.PartiallyEvaluateStatements(ast.body, blockValue, strictCode, blockEnv, realm),
|
||||
_Functions$PartiallyE2 = _slicedToArray(_Functions$PartiallyE, 2),
|
||||
res = _Functions$PartiallyE2[0],
|
||||
bAst = _Functions$PartiallyE2[1];
|
||||
|
||||
(0, _invariant2.default)(bAst.length > 0 || res instanceof _index.EmptyValue);
|
||||
if (bAst.length === 0) return [res, t.emptyStatement(), []];
|
||||
var rAst = t.blockStatement(bAst, ast.directives);
|
||||
return [res, rAst, []];
|
||||
} finally {
|
||||
// 6. Set the running execution context's LexicalEnvironment to oldEnv.
|
||||
realm.getRunningContext().lexicalEnvironment = oldEnv;
|
||||
realm.onDestroyScope(blockEnv);
|
||||
}
|
||||
};
|
||||
|
||||
var _completions = require("../completions.js");
|
||||
|
||||
var _index = require("../values/index.js");
|
||||
|
||||
var _singletons = require("../singletons.js");
|
||||
|
||||
var _invariant = require("../invariant.js");
|
||||
|
||||
var _invariant2 = _interopRequireDefault(_invariant);
|
||||
|
||||
var _babelTypes = require("babel-types");
|
||||
|
||||
var t = _interopRequireWildcard(_babelTypes);
|
||||
|
||||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
//# sourceMappingURL=BlockStatement.js.map
|
||||
1
build/node_modules/prepack/lib/partial-evaluators/BlockStatement.js.map
generated
vendored
Normal file
1
build/node_modules/prepack/lib/partial-evaluators/BlockStatement.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../src/partial-evaluators/BlockStatement.js"],"names":["ast","strictCode","env","realm","oldEnv","getRunningContext","lexicalEnvironment","blockEnv","NewDeclarativeEnvironment","BlockDeclarationInstantiation","body","blockValue","directives","directive","value","PartiallyEvaluateStatements","res","bAst","length","t","emptyStatement","rAst","blockStatement","onDestroyScope"],"mappings":";;;;;;ypBAAA;;;;;;;;;AAsBA;;;kBACe,UACbA,GADa,EAEbC,UAFa,EAGbC,GAHa,EAIbC,KAJa,EAKwD;AACrE;AACA,MAAIC,SAASD,MAAME,iBAAN,GAA0BC,kBAAvC;;AAEA;AACA,MAAIC,WAAW,wBAAYC,yBAAZ,CAAsCL,KAAtC,EAA6CC,MAA7C,CAAf;;AAEA;AACA,0BAAYK,6BAAZ,CAA0CN,KAA1C,EAAiDF,UAAjD,EAA6DD,IAAIU,IAAjE,EAAuEH,QAAvE;;AAEA;AACAJ,QAAME,iBAAN,GAA0BC,kBAA1B,GAA+CC,QAA/C;;AAEA,MAAI;AACF;AACA,QAAII,mBAAJ;;AAEA,QAAIX,IAAIY,UAAR,EAAoB;AAAA;AAAA;AAAA;;AAAA;AAClB,6BAAsBZ,IAAIY,UAA1B,8HAAsC;AAAA,cAA7BC,SAA6B;;AACpCF,uBAAa,uBAAgBR,KAAhB,EAAuBU,UAAUC,KAAV,CAAgBA,KAAvC,CAAb;AACD;AAHiB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAInB;;AARC,gCAUgB,sBAAUC,2BAAV,CAAsCf,IAAIU,IAA1C,EAAgDC,UAAhD,EAA4DV,UAA5D,EAAwEM,QAAxE,EAAkFJ,KAAlF,CAVhB;AAAA;AAAA,QAUGa,GAVH;AAAA,QAUQC,IAVR;;AAWF,6BAAUA,KAAKC,MAAL,GAAc,CAAd,IAAmBF,gCAA7B;AACA,QAAIC,KAAKC,MAAL,KAAgB,CAApB,EAAuB,OAAO,CAACF,GAAD,EAAMG,EAAEC,cAAF,EAAN,EAA0B,EAA1B,CAAP;AACvB,QAAIC,OAAOF,EAAEG,cAAF,CAAiBL,IAAjB,EAAuBjB,IAAIY,UAA3B,CAAX;AACA,WAAO,CAACI,GAAD,EAAMK,IAAN,EAAY,EAAZ,CAAP;AACD,GAfD,SAeU;AACR;AACAlB,UAAME,iBAAN,GAA0BC,kBAA1B,GAA+CF,MAA/C;AACAD,UAAMoB,cAAN,CAAqBhB,QAArB;AACD;AACF,C;;AA9CD;;AACA;;AACA;;AAEA;;;;AACA;;IAAYY,C","file":"BlockStatement.js","sourcesContent":["/**\n * Copyright (c) 2017-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\n/* @flow */\n\nimport type { BabelNodeBlockStatement, BabelNodeStatement } from \"babel-types\";\nimport type { Realm } from \"../realm.js\";\nimport type { LexicalEnvironment } from \"../environment.js\";\n\nimport { Completion, NormalCompletion } from \"../completions.js\";\nimport { EmptyValue, StringValue, Value } from \"../values/index.js\";\nimport { Environment, Functions } from \"../singletons.js\";\n\nimport invariant from \"../invariant.js\";\nimport * as t from \"babel-types\";\n\n// ECMA262 13.2.13\nexport default function(\n ast: BabelNodeBlockStatement,\n strictCode: boolean,\n env: LexicalEnvironment,\n realm: Realm\n): [Completion | Value, BabelNodeStatement, Array<BabelNodeStatement>] {\n // 1. Let oldEnv be the running execution context's LexicalEnvironment.\n let oldEnv = realm.getRunningContext().lexicalEnvironment;\n\n // 2. Let blockEnv be NewDeclarativeEnvironment(oldEnv).\n let blockEnv = Environment.NewDeclarativeEnvironment(realm, oldEnv);\n\n // 3. Perform BlockDeclarationInstantiation(StatementList, blockEnv).\n Environment.BlockDeclarationInstantiation(realm, strictCode, ast.body, blockEnv);\n\n // 4. Set the running execution context's LexicalEnvironment to blockEnv.\n realm.getRunningContext().lexicalEnvironment = blockEnv;\n\n try {\n // 5. Let blockValue be the result of evaluating StatementList.\n let blockValue: void | NormalCompletion | Value;\n\n if (ast.directives) {\n for (let directive of ast.directives) {\n blockValue = new StringValue(realm, directive.value.value);\n }\n }\n\n let [res, bAst] = Functions.PartiallyEvaluateStatements(ast.body, blockValue, strictCode, blockEnv, realm);\n invariant(bAst.length > 0 || res instanceof EmptyValue);\n if (bAst.length === 0) return [res, t.emptyStatement(), []];\n let rAst = t.blockStatement(bAst, ast.directives);\n return [res, rAst, []];\n } finally {\n // 6. Set the running execution context's LexicalEnvironment to oldEnv.\n realm.getRunningContext().lexicalEnvironment = oldEnv;\n realm.onDestroyScope(blockEnv);\n }\n}\n"]}
|
||||
13
build/node_modules/prepack/lib/partial-evaluators/BooleanLiteral.js
generated
vendored
Normal file
13
build/node_modules/prepack/lib/partial-evaluators/BooleanLiteral.js
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
exports.default = function (ast, strictCode, env, realm) {
|
||||
var result = new _index.BooleanValue(realm, ast.value);
|
||||
return [result, ast, []];
|
||||
};
|
||||
|
||||
var _index = require("../values/index.js");
|
||||
//# sourceMappingURL=BooleanLiteral.js.map
|
||||
1
build/node_modules/prepack/lib/partial-evaluators/BooleanLiteral.js.map
generated
vendored
Normal file
1
build/node_modules/prepack/lib/partial-evaluators/BooleanLiteral.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../src/partial-evaluators/BooleanLiteral.js"],"names":["ast","strictCode","env","realm","result","value"],"mappings":";;;;;;kBAiBe,UACbA,GADa,EAEbC,UAFa,EAGbC,GAHa,EAIbC,KAJa,EAKuD;AACpE,MAAIC,SAAS,wBAAiBD,KAAjB,EAAwBH,IAAIK,KAA5B,CAAb;AACA,SAAO,CAACD,MAAD,EAASJ,GAAT,EAAc,EAAd,CAAP;AACD,C;;AAVD","file":"BooleanLiteral.js","sourcesContent":["/**\n * Copyright (c) 2017-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\n/* @flow */\n\nimport type { BabelNodeBooleanLiteral, BabelNodeStatement } from \"babel-types\";\nimport type { LexicalEnvironment } from \"../environment.js\";\nimport type { Realm } from \"../realm.js\";\n\nimport { BooleanValue } from \"../values/index.js\";\n\nexport default function(\n ast: BabelNodeBooleanLiteral,\n strictCode: boolean,\n env: LexicalEnvironment,\n realm: Realm\n): [BooleanValue, BabelNodeBooleanLiteral, Array<BabelNodeStatement>] {\n let result = new BooleanValue(realm, ast.value);\n return [result, ast, []];\n}\n"]}
|
||||
13
build/node_modules/prepack/lib/partial-evaluators/BreakStatement.js
generated
vendored
Normal file
13
build/node_modules/prepack/lib/partial-evaluators/BreakStatement.js
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
exports.default = function (ast, strictCode, env, realm) {
|
||||
var result = new _completions.BreakCompletion(realm.intrinsics.empty, ast.loc, ast.label && ast.label.name);
|
||||
return [result, ast, []];
|
||||
};
|
||||
|
||||
var _completions = require("../completions.js");
|
||||
//# sourceMappingURL=BreakStatement.js.map
|
||||
1
build/node_modules/prepack/lib/partial-evaluators/BreakStatement.js.map
generated
vendored
Normal file
1
build/node_modules/prepack/lib/partial-evaluators/BreakStatement.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../src/partial-evaluators/BreakStatement.js"],"names":["ast","strictCode","env","realm","result","intrinsics","empty","loc","label","name"],"mappings":";;;;;;kBAiBe,UACbA,GADa,EAEbC,UAFa,EAGbC,GAHa,EAIbC,KAJa,EAK0D;AACvE,MAAIC,SAAS,iCAAoBD,MAAME,UAAN,CAAiBC,KAArC,EAA4CN,IAAIO,GAAhD,EAAqDP,IAAIQ,KAAJ,IAAaR,IAAIQ,KAAJ,CAAUC,IAA5E,CAAb;AACA,SAAO,CAACL,MAAD,EAASJ,GAAT,EAAc,EAAd,CAAP;AACD,C;;AAVD","file":"BreakStatement.js","sourcesContent":["/**\n * Copyright (c) 2017-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\n/* @flow */\n\nimport type { BabelNodeBreakStatement, BabelNodeStatement } from \"babel-types\";\nimport type { Realm } from \"../realm.js\";\nimport type { LexicalEnvironment } from \"../environment.js\";\n\nimport { BreakCompletion } from \"../completions.js\";\n\nexport default function(\n ast: BabelNodeBreakStatement,\n strictCode: boolean,\n env: LexicalEnvironment,\n realm: Realm\n): [BreakCompletion, BabelNodeBreakStatement, Array<BabelNodeStatement>] {\n let result = new BreakCompletion(realm.intrinsics.empty, ast.loc, ast.label && ast.label.name);\n return [result, ast, []];\n}\n"]}
|
||||
257
build/node_modules/prepack/lib/partial-evaluators/CallExpression.js
generated
vendored
Normal file
257
build/node_modules/prepack/lib/partial-evaluators/CallExpression.js
generated
vendored
Normal file
@@ -0,0 +1,257 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); /**
|
||||
* 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.
|
||||
*/
|
||||
|
||||
// ECMA262 12.3.4.1
|
||||
|
||||
|
||||
exports.default = function (ast, strictCode, env, realm) {
|
||||
realm.setNextExecutionContextLocation(ast.loc);
|
||||
|
||||
// 1. Let ref be the result of evaluating MemberExpression.
|
||||
|
||||
var _env$partiallyEvaluat = env.partiallyEvaluateCompletion(ast.callee, strictCode),
|
||||
_env$partiallyEvaluat2 = _slicedToArray(_env$partiallyEvaluat, 3),
|
||||
ref = _env$partiallyEvaluat2[0],
|
||||
calleeAst = _env$partiallyEvaluat2[1],
|
||||
calleeIO = _env$partiallyEvaluat2[2];
|
||||
|
||||
if (ref instanceof _completions.AbruptCompletion) return [ref, calleeAst, calleeIO];
|
||||
var completion = void 0;
|
||||
if (ref instanceof _completions.PossiblyNormalCompletion) {
|
||||
completion = ref;
|
||||
ref = completion.value;
|
||||
}
|
||||
(0, _invariant2.default)(ref instanceof _index2.Value || ref instanceof _environment.Reference);
|
||||
|
||||
// 2. Let func be ? GetValue(ref).
|
||||
var func = _singletons.Environment.GetValue(realm, ref);
|
||||
|
||||
var io = calleeIO;
|
||||
var partialArgs = [];
|
||||
var argVals = [];
|
||||
var _iteratorNormalCompletion = true;
|
||||
var _didIteratorError = false;
|
||||
var _iteratorError = undefined;
|
||||
|
||||
try {
|
||||
for (var _iterator = ast.arguments[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
||||
var arg = _step.value;
|
||||
|
||||
var _env$partiallyEvaluat3 = env.partiallyEvaluateCompletionDeref(arg, strictCode),
|
||||
_env$partiallyEvaluat4 = _slicedToArray(_env$partiallyEvaluat3, 3),
|
||||
argValue = _env$partiallyEvaluat4[0],
|
||||
argAst = _env$partiallyEvaluat4[1],
|
||||
argIO = _env$partiallyEvaluat4[2];
|
||||
|
||||
io = io.concat(argIO);
|
||||
partialArgs.push(argAst);
|
||||
if (argValue instanceof _completions.AbruptCompletion) {
|
||||
if (completion instanceof _completions.PossiblyNormalCompletion) completion = _singletons.Join.stopEffectCaptureJoinApplyAndReturnCompletion(completion, argValue, realm);else completion = argValue;
|
||||
var _resultAst = t.callExpression(calleeAst, partialArgs);
|
||||
return [completion, _resultAst, io];
|
||||
}
|
||||
if (argValue instanceof _completions.PossiblyNormalCompletion) {
|
||||
argVals.push(argValue.value);
|
||||
if (completion instanceof _completions.PossiblyNormalCompletion) completion = _singletons.Join.composeNormalCompletions(completion, argValue, argValue.value, realm);else completion = argValue;
|
||||
} else {
|
||||
(0, _invariant2.default)(argValue instanceof _index2.Value);
|
||||
argVals.push(argValue);
|
||||
}
|
||||
}
|
||||
} catch (err) {
|
||||
_didIteratorError = true;
|
||||
_iteratorError = err;
|
||||
} finally {
|
||||
try {
|
||||
if (!_iteratorNormalCompletion && _iterator.return) {
|
||||
_iterator.return();
|
||||
}
|
||||
} finally {
|
||||
if (_didIteratorError) {
|
||||
throw _iteratorError;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var callResult = EvaluateCall(ref, func, ast, argVals, strictCode, env, realm);
|
||||
if (callResult instanceof _completions.AbruptCompletion) {
|
||||
if (completion instanceof _completions.PossiblyNormalCompletion) completion = _singletons.Join.stopEffectCaptureJoinApplyAndReturnCompletion(completion, callResult, realm);else completion = callResult;
|
||||
var resultAst = t.callExpression(calleeAst, partialArgs);
|
||||
return [completion, resultAst, io];
|
||||
}
|
||||
var callCompletion = void 0;
|
||||
|
||||
var _Join$unbundleNormalC = _singletons.Join.unbundleNormalCompletion(callResult);
|
||||
|
||||
var _Join$unbundleNormalC2 = _slicedToArray(_Join$unbundleNormalC, 2);
|
||||
|
||||
callCompletion = _Join$unbundleNormalC2[0];
|
||||
callResult = _Join$unbundleNormalC2[1];
|
||||
|
||||
(0, _invariant2.default)(callResult instanceof _index2.Value);
|
||||
(0, _invariant2.default)(completion === undefined || completion instanceof _completions.PossiblyNormalCompletion);
|
||||
completion = _singletons.Join.composeNormalCompletions(completion, callCompletion, callResult, realm);
|
||||
if (completion instanceof _completions.PossiblyNormalCompletion) {
|
||||
realm.captureEffects(completion);
|
||||
}
|
||||
return [completion, t.callExpression(calleeAst, partialArgs), io];
|
||||
};
|
||||
|
||||
var _completions = require("../completions.js");
|
||||
|
||||
var _environment = require("../environment.js");
|
||||
|
||||
var _index = require("../methods/index.js");
|
||||
|
||||
var _singletons = require("../singletons.js");
|
||||
|
||||
var _index2 = require("../values/index.js");
|
||||
|
||||
var _babelTypes = require("babel-types");
|
||||
|
||||
var t = _interopRequireWildcard(_babelTypes);
|
||||
|
||||
var _invariant = require("../invariant.js");
|
||||
|
||||
var _invariant2 = _interopRequireDefault(_invariant);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
|
||||
|
||||
function callBothFunctionsAndJoinTheirEffects(funcs, ast, argVals, strictCode, env, realm) {
|
||||
var _funcs = _slicedToArray(funcs, 3),
|
||||
cond = _funcs[0],
|
||||
func1 = _funcs[1],
|
||||
func2 = _funcs[2];
|
||||
|
||||
(0, _invariant2.default)(cond instanceof _index2.AbstractValue && cond.getType() === _index2.BooleanValue);
|
||||
(0, _invariant2.default)(_index2.Value.isTypeCompatibleWith(func1.getType(), _index2.FunctionValue));
|
||||
(0, _invariant2.default)(_index2.Value.isTypeCompatibleWith(func2.getType(), _index2.FunctionValue));
|
||||
|
||||
var _realm$evaluateForEff = realm.evaluateForEffects(function () {
|
||||
return EvaluateCall(func1, func1, ast, argVals, strictCode, env, realm);
|
||||
}),
|
||||
_realm$evaluateForEff2 = _slicedToArray(_realm$evaluateForEff, 5),
|
||||
compl1 = _realm$evaluateForEff2[0],
|
||||
gen1 = _realm$evaluateForEff2[1],
|
||||
bindings1 = _realm$evaluateForEff2[2],
|
||||
properties1 = _realm$evaluateForEff2[3],
|
||||
createdObj1 = _realm$evaluateForEff2[4];
|
||||
|
||||
var _realm$evaluateForEff3 = realm.evaluateForEffects(function () {
|
||||
return EvaluateCall(func2, func2, ast, argVals, strictCode, env, realm);
|
||||
}),
|
||||
_realm$evaluateForEff4 = _slicedToArray(_realm$evaluateForEff3, 5),
|
||||
compl2 = _realm$evaluateForEff4[0],
|
||||
gen2 = _realm$evaluateForEff4[1],
|
||||
bindings2 = _realm$evaluateForEff4[2],
|
||||
properties2 = _realm$evaluateForEff4[3],
|
||||
createdObj2 = _realm$evaluateForEff4[4];
|
||||
|
||||
var joinedEffects = _singletons.Join.joinEffects(realm, cond, [compl1, gen1, bindings1, properties1, createdObj1], [compl2, gen2, bindings2, properties2, createdObj2]);
|
||||
var joinedCompletion = joinedEffects[0];
|
||||
if (joinedCompletion instanceof _completions.PossiblyNormalCompletion) {
|
||||
// in this case one of the branches may complete abruptly, which means that
|
||||
// not all control flow branches join into one flow at this point.
|
||||
// Consequently we have to continue tracking changes until the point where
|
||||
// all the branches come together into one.
|
||||
joinedCompletion = realm.composeWithSavedCompletion(joinedCompletion);
|
||||
}
|
||||
|
||||
// Note that the effects of (non joining) abrupt branches are not included
|
||||
// in joinedEffects, but are tracked separately inside joinedCompletion.
|
||||
realm.applyEffects(joinedEffects);
|
||||
|
||||
// return or throw completion
|
||||
(0, _invariant2.default)(joinedCompletion instanceof _completions.AbruptCompletion || joinedCompletion instanceof _index2.Value);
|
||||
return joinedCompletion;
|
||||
}
|
||||
|
||||
function EvaluateCall(ref, func, ast, argList, strictCode, env, realm) {
|
||||
if (func instanceof _index2.AbstractValue && _index2.Value.isTypeCompatibleWith(func.getType(), _index2.FunctionValue)) {
|
||||
if (func.kind === "conditional") return callBothFunctionsAndJoinTheirEffects(func.args, ast, argList, strictCode, env, realm);
|
||||
|
||||
// The called function comes from the environmental model and we require that
|
||||
// such functions have no visible side-effects. Hence we can carry on
|
||||
// by returning a call node with the arguments updated with their partial counterparts.
|
||||
// TODO: obtain the type of the return value from the abstract function.
|
||||
return _index2.AbstractValue.createFromType(realm, _index2.Value);
|
||||
}
|
||||
// If func is abstract and not known to be a safe function, we can't safely continue.
|
||||
func = func.throwIfNotConcrete();
|
||||
|
||||
// 3. If Type(ref) is Reference and IsPropertyReference(ref) is false and GetReferencedName(ref) is "eval", then
|
||||
if (ref instanceof _environment.Reference && !_singletons.Environment.IsPropertyReference(realm, ref) && _singletons.Environment.GetReferencedName(realm, ref) === "eval") {
|
||||
// a. If SameValue(func, %eval%) is true, then
|
||||
if ((0, _index.SameValue)(realm, func, realm.intrinsics.eval)) {
|
||||
// i. Let argList be ? ArgumentListEvaluation(Arguments).
|
||||
|
||||
// ii. If argList has no elements, return undefined.
|
||||
if (argList.length === 0) return realm.intrinsics.undefined;
|
||||
|
||||
// iii. Let evalText be the first element of argList.
|
||||
var evalText = argList[0];
|
||||
|
||||
// iv. If the source code matching this CallExpression is strict code, let strictCaller be true. Otherwise let strictCaller be false.
|
||||
var strictCaller = strictCode;
|
||||
|
||||
// v. Let evalRealm be the current Realm Record.
|
||||
var evalRealm = realm;
|
||||
|
||||
// vi. Return ? PerformEval(evalText, evalRealm, strictCaller, true).
|
||||
return _singletons.Functions.PerformEval(realm, evalText, evalRealm, strictCaller, true);
|
||||
}
|
||||
}
|
||||
|
||||
var thisValue = void 0;
|
||||
|
||||
// 4. If Type(ref) is Reference, then
|
||||
if (ref instanceof _environment.Reference) {
|
||||
// a. If IsPropertyReference(ref) is true, then
|
||||
if (_singletons.Environment.IsPropertyReference(realm, ref)) {
|
||||
// i. Let thisValue be GetThisValue(ref).
|
||||
thisValue = (0, _index.GetThisValue)(realm, ref);
|
||||
} else {
|
||||
// b. Else, the base of ref is an Environment Record
|
||||
// i. Let refEnv be GetBase(ref).
|
||||
var refEnv = _singletons.Environment.GetBase(realm, ref);
|
||||
(0, _invariant2.default)(refEnv instanceof _environment.EnvironmentRecord);
|
||||
|
||||
// ii. Let thisValue be refEnv.WithBaseObject().
|
||||
thisValue = refEnv.WithBaseObject();
|
||||
}
|
||||
} else {
|
||||
// 5. Else Type(ref) is not Reference,
|
||||
// a. Let thisValue be undefined.
|
||||
thisValue = realm.intrinsics.undefined;
|
||||
}
|
||||
|
||||
// 6. Let thisCall be this CallExpression.
|
||||
var thisCall = ast;
|
||||
|
||||
// 7. Let tailCall be IsInTailPosition(thisCall). (See 14.6.1)
|
||||
var tailCall = (0, _index.IsInTailPosition)(realm, thisCall);
|
||||
|
||||
// 8. Return ? EvaluateDirectCall(func, thisValue, Arguments, tailCall).
|
||||
|
||||
try {
|
||||
return (0, _index.EvaluateDirectCallWithArgList)(realm, strictCode, env, ref, func, thisValue, argList, tailCall);
|
||||
} catch (err) {
|
||||
if (err instanceof _completions.Completion) return err;
|
||||
throw err;
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=CallExpression.js.map
|
||||
1
build/node_modules/prepack/lib/partial-evaluators/CallExpression.js.map
generated
vendored
Normal file
1
build/node_modules/prepack/lib/partial-evaluators/CallExpression.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
23
build/node_modules/prepack/lib/partial-evaluators/CatchClause.js
generated
vendored
Normal file
23
build/node_modules/prepack/lib/partial-evaluators/CatchClause.js
generated
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
exports.default = function (ast, strictCode, env, realm, thrownValue) {
|
||||
(0, _invariant2.default)(thrownValue instanceof _completions.ThrowCompletion, "Metadata isn't a throw completion");
|
||||
|
||||
var result = env.evaluateCompletionDeref(ast, strictCode);
|
||||
return [result, ast, []];
|
||||
};
|
||||
|
||||
var _completions = require("../completions.js");
|
||||
|
||||
var _index = require("../values/index.js");
|
||||
|
||||
var _invariant = require("../invariant.js");
|
||||
|
||||
var _invariant2 = _interopRequireDefault(_invariant);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
//# sourceMappingURL=CatchClause.js.map
|
||||
1
build/node_modules/prepack/lib/partial-evaluators/CatchClause.js.map
generated
vendored
Normal file
1
build/node_modules/prepack/lib/partial-evaluators/CatchClause.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../src/partial-evaluators/CatchClause.js"],"names":["ast","strictCode","env","realm","thrownValue","result","evaluateCompletionDeref"],"mappings":";;;;;;kBAoBe,UACbA,GADa,EAEbC,UAFa,EAGbC,GAHa,EAIbC,KAJa,EAKbC,WALa,EAMgE;AAC7E,2BAAUA,mDAAV,EAAkD,mCAAlD;;AAEA,MAAIC,SAASH,IAAII,uBAAJ,CAA4BN,GAA5B,EAAiCC,UAAjC,CAAb;AACA,SAAO,CAACI,MAAD,EAASL,GAAT,EAAc,EAAd,CAAP;AACD,C;;AAhBD;;AACA;;AACA","file":"CatchClause.js","sourcesContent":["/**\n * Copyright (c) 2017-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\n/* @flow */\n\nimport type { BabelNodeCatchClause, BabelNodeStatement } from \"babel-types\";\nimport type { Realm } from \"../realm.js\";\nimport type { LexicalEnvironment } from \"../environment.js\";\n\nimport { AbruptCompletion, ThrowCompletion } from \"../completions.js\";\nimport { Value } from \"../values/index.js\";\nimport invariant from \"../invariant.js\";\n\n// ECAM262 13.15.7\nexport default function(\n ast: BabelNodeCatchClause,\n strictCode: boolean,\n env: LexicalEnvironment,\n realm: Realm,\n thrownValue: any\n): [AbruptCompletion | Value, BabelNodeCatchClause, Array<BabelNodeStatement>] {\n invariant(thrownValue instanceof ThrowCompletion, \"Metadata isn't a throw completion\");\n\n let result = env.evaluateCompletionDeref(ast, strictCode);\n return [result, ast, []];\n}\n"]}
|
||||
15
build/node_modules/prepack/lib/partial-evaluators/ClassDeclaration.js
generated
vendored
Normal file
15
build/node_modules/prepack/lib/partial-evaluators/ClassDeclaration.js
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
exports.default = function (ast, strictCode, env, realm) {
|
||||
var result = env.evaluateCompletionDeref(ast, strictCode);
|
||||
return [result, ast, []];
|
||||
};
|
||||
|
||||
var _completions = require("../completions.js");
|
||||
|
||||
var _index = require("../values/index.js");
|
||||
//# sourceMappingURL=ClassDeclaration.js.map
|
||||
1
build/node_modules/prepack/lib/partial-evaluators/ClassDeclaration.js.map
generated
vendored
Normal file
1
build/node_modules/prepack/lib/partial-evaluators/ClassDeclaration.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../src/partial-evaluators/ClassDeclaration.js"],"names":["ast","strictCode","env","realm","result","evaluateCompletionDeref"],"mappings":";;;;;;kBAkBe,UACbA,GADa,EAEbC,UAFa,EAGbC,GAHa,EAIbC,KAJa,EAKqE;AAClF,MAAIC,SAASF,IAAIG,uBAAJ,CAA4BL,GAA5B,EAAiCC,UAAjC,CAAb;AACA,SAAO,CAACG,MAAD,EAASJ,GAAT,EAAc,EAAd,CAAP;AACD,C;;AAXD;;AACA","file":"ClassDeclaration.js","sourcesContent":["/**\n * Copyright (c) 2017-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\n/* @flow */\n\nimport type { BabelNodeClassDeclaration, BabelNodeStatement } from \"babel-types\";\nimport type { LexicalEnvironment } from \"../environment.js\";\nimport type { Realm } from \"../realm.js\";\n\nimport { AbruptCompletion } from \"../completions.js\";\nimport { Value } from \"../values/index.js\";\n\nexport default function(\n ast: BabelNodeClassDeclaration,\n strictCode: boolean,\n env: LexicalEnvironment,\n realm: Realm\n): [AbruptCompletion | Value, BabelNodeClassDeclaration, Array<BabelNodeStatement>] {\n let result = env.evaluateCompletionDeref(ast, strictCode);\n return [result, ast, []];\n}\n"]}
|
||||
16
build/node_modules/prepack/lib/partial-evaluators/ClassExpression.js
generated
vendored
Normal file
16
build/node_modules/prepack/lib/partial-evaluators/ClassExpression.js
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
exports.default = function (ast, strictCode, env, realm) {
|
||||
throw new _errors.FatalError("TODO: ClassExpression");
|
||||
};
|
||||
|
||||
var _errors = require("../errors.js");
|
||||
|
||||
var _completions = require("../completions.js");
|
||||
|
||||
var _index = require("../values/index.js");
|
||||
//# sourceMappingURL=ClassExpression.js.map
|
||||
1
build/node_modules/prepack/lib/partial-evaluators/ClassExpression.js.map
generated
vendored
Normal file
1
build/node_modules/prepack/lib/partial-evaluators/ClassExpression.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../src/partial-evaluators/ClassExpression.js"],"names":["ast","strictCode","env","realm"],"mappings":";;;;;;kBAmBe,UACbA,GADa,EAEbC,UAFa,EAGbC,GAHa,EAIbC,KAJa,EAKoE;AACjF,QAAM,uBAAe,uBAAf,CAAN;AACD,C;;AAbD;;AAGA;;AACA","file":"ClassExpression.js","sourcesContent":["/**\n * Copyright (c) 2017-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\n/* @flow */\n\nimport type { BabelNodeClassExpression, BabelNodeStatement } from \"babel-types\";\nimport type { LexicalEnvironment } from \"../environment.js\";\nimport { FatalError } from \"../errors.js\";\nimport type { Realm } from \"../realm.js\";\n\nimport { AbruptCompletion } from \"../completions.js\";\nimport { Value } from \"../values/index.js\";\n\nexport default function(\n ast: BabelNodeClassExpression,\n strictCode: boolean,\n env: LexicalEnvironment,\n realm: Realm\n): [AbruptCompletion | Value, BabelNodeClassExpression, Array<BabelNodeStatement>] {\n throw new FatalError(\"TODO: ClassExpression\");\n}\n"]}
|
||||
15
build/node_modules/prepack/lib/partial-evaluators/ConditionalExpression.js
generated
vendored
Normal file
15
build/node_modules/prepack/lib/partial-evaluators/ConditionalExpression.js
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
exports.default = function (ast, strictCode, env, realm) {
|
||||
var result = env.evaluateCompletionDeref(ast, strictCode);
|
||||
return [result, ast, []];
|
||||
};
|
||||
|
||||
var _completions = require("../completions.js");
|
||||
|
||||
var _index = require("../values/index.js");
|
||||
//# sourceMappingURL=ConditionalExpression.js.map
|
||||
1
build/node_modules/prepack/lib/partial-evaluators/ConditionalExpression.js.map
generated
vendored
Normal file
1
build/node_modules/prepack/lib/partial-evaluators/ConditionalExpression.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../src/partial-evaluators/ConditionalExpression.js"],"names":["ast","strictCode","env","realm","result","evaluateCompletionDeref"],"mappings":";;;;;;kBAkBe,UACbA,GADa,EAEbC,UAFa,EAGbC,GAHa,EAIbC,KAJa,EAK0E;AACvF,MAAIC,SAASF,IAAIG,uBAAJ,CAA4BL,GAA5B,EAAiCC,UAAjC,CAAb;AACA,SAAO,CAACG,MAAD,EAASJ,GAAT,EAAc,EAAd,CAAP;AACD,C;;AAXD;;AACA","file":"ConditionalExpression.js","sourcesContent":["/**\n * Copyright (c) 2017-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\n/* @flow */\n\nimport type { BabelNodeConditionalExpression, BabelNodeStatement } from \"babel-types\";\nimport type { LexicalEnvironment } from \"../environment.js\";\nimport type { Realm } from \"../realm.js\";\n\nimport { AbruptCompletion } from \"../completions.js\";\nimport { Value } from \"../values/index.js\";\n\nexport default function(\n ast: BabelNodeConditionalExpression,\n strictCode: boolean,\n env: LexicalEnvironment,\n realm: Realm\n): [AbruptCompletion | Value, BabelNodeConditionalExpression, Array<BabelNodeStatement>] {\n let result = env.evaluateCompletionDeref(ast, strictCode);\n return [result, ast, []];\n}\n"]}
|
||||
13
build/node_modules/prepack/lib/partial-evaluators/ContinueStatement.js
generated
vendored
Normal file
13
build/node_modules/prepack/lib/partial-evaluators/ContinueStatement.js
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
exports.default = function (ast, strictCode, env, realm) {
|
||||
var result = new _completions.ContinueCompletion(realm.intrinsics.empty, ast.loc, ast.label && ast.label.name);
|
||||
return [result, ast, []];
|
||||
};
|
||||
|
||||
var _completions = require("../completions.js");
|
||||
//# sourceMappingURL=ContinueStatement.js.map
|
||||
1
build/node_modules/prepack/lib/partial-evaluators/ContinueStatement.js.map
generated
vendored
Normal file
1
build/node_modules/prepack/lib/partial-evaluators/ContinueStatement.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../src/partial-evaluators/ContinueStatement.js"],"names":["ast","strictCode","env","realm","result","intrinsics","empty","loc","label","name"],"mappings":";;;;;;kBAiBe,UACbA,GADa,EAEbC,UAFa,EAGbC,GAHa,EAIbC,KAJa,EAKgE;AAC7E,MAAIC,SAAS,oCAAuBD,MAAME,UAAN,CAAiBC,KAAxC,EAA+CN,IAAIO,GAAnD,EAAwDP,IAAIQ,KAAJ,IAAaR,IAAIQ,KAAJ,CAAUC,IAA/E,CAAb;AACA,SAAO,CAACL,MAAD,EAASJ,GAAT,EAAc,EAAd,CAAP;AACD,C;;AAVD","file":"ContinueStatement.js","sourcesContent":["/**\n * Copyright (c) 2017-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\n/* @flow */\n\nimport type { BabelNodeContinueStatement, BabelNodeStatement } from \"babel-types\";\nimport type { LexicalEnvironment } from \"../environment.js\";\nimport type { Realm } from \"../realm.js\";\n\nimport { ContinueCompletion } from \"../completions.js\";\n\nexport default function(\n ast: BabelNodeContinueStatement,\n strictCode: boolean,\n env: LexicalEnvironment,\n realm: Realm\n): [ContinueCompletion, BabelNodeContinueStatement, Array<BabelNodeStatement>] {\n let result = new ContinueCompletion(realm.intrinsics.empty, ast.loc, ast.label && ast.label.name);\n return [result, ast, []];\n}\n"]}
|
||||
15
build/node_modules/prepack/lib/partial-evaluators/Directive.js
generated
vendored
Normal file
15
build/node_modules/prepack/lib/partial-evaluators/Directive.js
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
exports.default = function (ast, strictCode, env, realm) {
|
||||
var result = env.evaluateCompletionDeref(ast.value, strictCode);
|
||||
return [result, ast, []];
|
||||
};
|
||||
|
||||
var _completions = require("../completions.js");
|
||||
|
||||
var _index = require("../values/index.js");
|
||||
//# sourceMappingURL=Directive.js.map
|
||||
1
build/node_modules/prepack/lib/partial-evaluators/Directive.js.map
generated
vendored
Normal file
1
build/node_modules/prepack/lib/partial-evaluators/Directive.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../src/partial-evaluators/Directive.js"],"names":["ast","strictCode","env","realm","result","evaluateCompletionDeref","value"],"mappings":";;;;;;kBAkBe,UACbA,GADa,EAEbC,UAFa,EAGbC,GAHa,EAIbC,KAJa,EAK8D;AAC3E,MAAIC,SAASF,IAAIG,uBAAJ,CAA4BL,IAAIM,KAAhC,EAAuCL,UAAvC,CAAb;AACA,SAAO,CAACG,MAAD,EAASJ,GAAT,EAAc,EAAd,CAAP;AACD,C;;AAXD;;AACA","file":"Directive.js","sourcesContent":["/**\n * Copyright (c) 2017-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\n/* @flow */\n\nimport type { BabelNodeDirective, BabelNodeStatement } from \"babel-types\";\nimport type { LexicalEnvironment } from \"../environment.js\";\nimport type { Realm } from \"../realm.js\";\n\nimport { AbruptCompletion } from \"../completions.js\";\nimport { Value } from \"../values/index.js\";\n\nexport default function(\n ast: BabelNodeDirective,\n strictCode: boolean,\n env: LexicalEnvironment,\n realm: Realm\n): [AbruptCompletion | Value, BabelNodeDirective, Array<BabelNodeStatement>] {\n let result = env.evaluateCompletionDeref(ast.value, strictCode);\n return [result, ast, []];\n}\n"]}
|
||||
17
build/node_modules/prepack/lib/partial-evaluators/DirectiveLiteral.js
generated
vendored
Normal file
17
build/node_modules/prepack/lib/partial-evaluators/DirectiveLiteral.js
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
var _StringLiteral = require("./StringLiteral");
|
||||
|
||||
Object.defineProperty(exports, "default", {
|
||||
enumerable: true,
|
||||
get: function get() {
|
||||
return _interopRequireDefault(_StringLiteral).default;
|
||||
}
|
||||
});
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
//# sourceMappingURL=DirectiveLiteral.js.map
|
||||
1
build/node_modules/prepack/lib/partial-evaluators/DirectiveLiteral.js.map
generated
vendored
Normal file
1
build/node_modules/prepack/lib/partial-evaluators/DirectiveLiteral.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../src/partial-evaluators/DirectiveLiteral.js"],"names":["default"],"mappings":";;;;;;;;;;;kDAWSA,O","file":"DirectiveLiteral.js","sourcesContent":["/**\n * Copyright (c) 2017-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\n/* @flow */\n\nexport { default } from \"./StringLiteral\";\n"]}
|
||||
17
build/node_modules/prepack/lib/partial-evaluators/DoExpression.js
generated
vendored
Normal file
17
build/node_modules/prepack/lib/partial-evaluators/DoExpression.js
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
var _BlockStatement = require("./BlockStatement.js");
|
||||
|
||||
Object.defineProperty(exports, "default", {
|
||||
enumerable: true,
|
||||
get: function get() {
|
||||
return _interopRequireDefault(_BlockStatement).default;
|
||||
}
|
||||
});
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
//# sourceMappingURL=DoExpression.js.map
|
||||
1
build/node_modules/prepack/lib/partial-evaluators/DoExpression.js.map
generated
vendored
Normal file
1
build/node_modules/prepack/lib/partial-evaluators/DoExpression.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../src/partial-evaluators/DoExpression.js"],"names":["default"],"mappings":";;;;;;;;;;;mDAWSA,O","file":"DoExpression.js","sourcesContent":["/**\n * Copyright (c) 2017-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\n/* @flow */\n\nexport { default } from \"./BlockStatement.js\";\n"]}
|
||||
15
build/node_modules/prepack/lib/partial-evaluators/DoWhileStatement.js
generated
vendored
Normal file
15
build/node_modules/prepack/lib/partial-evaluators/DoWhileStatement.js
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
exports.default = function (ast, strictCode, env, realm, labelSet) {
|
||||
var result = env.evaluateCompletionDeref(ast, strictCode);
|
||||
return [result, ast, []];
|
||||
};
|
||||
|
||||
var _completions = require("../completions.js");
|
||||
|
||||
var _index = require("../values/index.js");
|
||||
//# sourceMappingURL=DoWhileStatement.js.map
|
||||
1
build/node_modules/prepack/lib/partial-evaluators/DoWhileStatement.js.map
generated
vendored
Normal file
1
build/node_modules/prepack/lib/partial-evaluators/DoWhileStatement.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../src/partial-evaluators/DoWhileStatement.js"],"names":["ast","strictCode","env","realm","labelSet","result","evaluateCompletionDeref"],"mappings":";;;;;;kBAkBe,UACbA,GADa,EAEbC,UAFa,EAGbC,GAHa,EAIbC,KAJa,EAKbC,QALa,EAMqE;AAClF,MAAIC,SAASH,IAAII,uBAAJ,CAA4BN,GAA5B,EAAiCC,UAAjC,CAAb;AACA,SAAO,CAACI,MAAD,EAASL,GAAT,EAAc,EAAd,CAAP;AACD,C;;AAZD;;AACA","file":"DoWhileStatement.js","sourcesContent":["/**\n * Copyright (c) 2017-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\n/* @flow */\n\nimport type { BabelNodeDoWhileStatement, BabelNodeStatement } from \"babel-types\";\nimport type { LexicalEnvironment } from \"../environment.js\";\nimport type { Realm } from \"../realm.js\";\n\nimport { AbruptCompletion } from \"../completions.js\";\nimport { Value } from \"../values/index.js\";\n\nexport default function(\n ast: BabelNodeDoWhileStatement,\n strictCode: boolean,\n env: LexicalEnvironment,\n realm: Realm,\n labelSet: ?Array<string>\n): [AbruptCompletion | Value, BabelNodeDoWhileStatement, Array<BabelNodeStatement>] {\n let result = env.evaluateCompletionDeref(ast, strictCode);\n return [result, ast, []];\n}\n"]}
|
||||
12
build/node_modules/prepack/lib/partial-evaluators/EmptyStatement.js
generated
vendored
Normal file
12
build/node_modules/prepack/lib/partial-evaluators/EmptyStatement.js
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
exports.default = function (ast, strictCode, env, realm) {
|
||||
return [realm.intrinsics.empty, ast, []];
|
||||
};
|
||||
|
||||
var _index = require("../values/index.js");
|
||||
//# sourceMappingURL=EmptyStatement.js.map
|
||||
1
build/node_modules/prepack/lib/partial-evaluators/EmptyStatement.js.map
generated
vendored
Normal file
1
build/node_modules/prepack/lib/partial-evaluators/EmptyStatement.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../src/partial-evaluators/EmptyStatement.js"],"names":["ast","strictCode","env","realm","intrinsics","empty"],"mappings":";;;;;;kBAiBe,UACbA,GADa,EAEbC,UAFa,EAGbC,GAHa,EAIbC,KAJa,EAKqD;AAClE,SAAO,CAACA,MAAMC,UAAN,CAAiBC,KAAlB,EAAyBL,GAAzB,EAA8B,EAA9B,CAAP;AACD,C;;AATD","file":"EmptyStatement.js","sourcesContent":["/**\n * Copyright (c) 2017-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\n/* @flow */\n\nimport type { BabelNodeEmptyStatement, BabelNodeStatement } from \"babel-types\";\nimport type { LexicalEnvironment } from \"../environment.js\";\nimport type { Realm } from \"../realm.js\";\n\nimport { EmptyValue } from \"../values/index.js\";\n\nexport default function(\n ast: BabelNodeEmptyStatement,\n strictCode: boolean,\n env: LexicalEnvironment,\n realm: Realm\n): [EmptyValue, BabelNodeEmptyStatement, Array<BabelNodeStatement>] {\n return [realm.intrinsics.empty, ast, []];\n}\n"]}
|
||||
39
build/node_modules/prepack/lib/partial-evaluators/ExpressionStatement.js
generated
vendored
Normal file
39
build/node_modules/prepack/lib/partial-evaluators/ExpressionStatement.js
generated
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); /**
|
||||
* 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.
|
||||
*/
|
||||
|
||||
// ECMA262 13.5.1
|
||||
|
||||
|
||||
exports.default = function (ast, strictCode, env, realm) {
|
||||
var _env$partiallyEvaluat = env.partiallyEvaluateCompletionDeref(ast.expression, strictCode),
|
||||
_env$partiallyEvaluat2 = _slicedToArray(_env$partiallyEvaluat, 3),
|
||||
result = _env$partiallyEvaluat2[0],
|
||||
partial_expression_ast = _env$partiallyEvaluat2[1],
|
||||
io = _env$partiallyEvaluat2[2];
|
||||
|
||||
var partial_ast = t.expressionStatement(partial_expression_ast);
|
||||
return [result, partial_ast, io];
|
||||
};
|
||||
|
||||
var _completions = require("../completions.js");
|
||||
|
||||
var _index = require("../values/index.js");
|
||||
|
||||
var _babelTypes = require("babel-types");
|
||||
|
||||
var t = _interopRequireWildcard(_babelTypes);
|
||||
|
||||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
|
||||
//# sourceMappingURL=ExpressionStatement.js.map
|
||||
1
build/node_modules/prepack/lib/partial-evaluators/ExpressionStatement.js.map
generated
vendored
Normal file
1
build/node_modules/prepack/lib/partial-evaluators/ExpressionStatement.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../src/partial-evaluators/ExpressionStatement.js"],"names":["ast","strictCode","env","realm","partiallyEvaluateCompletionDeref","expression","result","partial_expression_ast","io","partial_ast","t","expressionStatement"],"mappings":";;;;;;ypBAAA;;;;;;;;;AAmBA;;;kBACe,UACbA,GADa,EAEbC,UAFa,EAGbC,GAHa,EAIbC,KAJa,EAKkE;AAAA,8BACpCD,IAAIE,gCAAJ,CAAqCJ,IAAIK,UAAzC,EAAqDJ,UAArD,CADoC;AAAA;AAAA,MAC1EK,MAD0E;AAAA,MAClEC,sBADkE;AAAA,MAC1CC,EAD0C;;AAE/E,MAAIC,cAAcC,EAAEC,mBAAF,CAAuBJ,sBAAvB,CAAlB;AACA,SAAO,CAACD,MAAD,EAASG,WAAT,EAAsBD,EAAtB,CAAP;AACD,C;;AAdD;;AACA;;AACA;;IAAYE,C","file":"ExpressionStatement.js","sourcesContent":["/**\n * Copyright (c) 2017-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\n/* @flow */\n\nimport type { BabelNodeExpressionStatement, BabelNodeStatement } from \"babel-types\";\nimport type { LexicalEnvironment } from \"../environment.js\";\nimport type { Realm } from \"../realm.js\";\n\nimport { Completion } from \"../completions.js\";\nimport { Value } from \"../values/index.js\";\nimport * as t from \"babel-types\";\n\n// ECMA262 13.5.1\nexport default function(\n ast: BabelNodeExpressionStatement,\n strictCode: boolean,\n env: LexicalEnvironment,\n realm: Realm\n): [Completion | Value, BabelNodeExpressionStatement, Array<BabelNodeStatement>] {\n let [result, partial_expression_ast, io] = env.partiallyEvaluateCompletionDeref(ast.expression, strictCode);\n let partial_ast = t.expressionStatement((partial_expression_ast: any));\n return [result, partial_ast, io];\n}\n"]}
|
||||
36
build/node_modules/prepack/lib/partial-evaluators/File.js
generated
vendored
Normal file
36
build/node_modules/prepack/lib/partial-evaluators/File.js
generated
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); /**
|
||||
* 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.
|
||||
*/
|
||||
|
||||
exports.default = function (ast, strictCode, env, realm) {
|
||||
var _env$partiallyEvaluat = env.partiallyEvaluateCompletionDeref(ast.program, strictCode),
|
||||
_env$partiallyEvaluat2 = _slicedToArray(_env$partiallyEvaluat, 3),
|
||||
result = _env$partiallyEvaluat2[0],
|
||||
partial_program = _env$partiallyEvaluat2[1],
|
||||
io = _env$partiallyEvaluat2[2];
|
||||
|
||||
var partial_file = t.file(partial_program, ast.comments, ast.tokens);
|
||||
return [result, partial_file, io];
|
||||
};
|
||||
|
||||
var _completions = require("../completions.js");
|
||||
|
||||
var _index = require("../values/index.js");
|
||||
|
||||
var _babelTypes = require("babel-types");
|
||||
|
||||
var t = _interopRequireWildcard(_babelTypes);
|
||||
|
||||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
|
||||
//# sourceMappingURL=File.js.map
|
||||
1
build/node_modules/prepack/lib/partial-evaluators/File.js.map
generated
vendored
Normal file
1
build/node_modules/prepack/lib/partial-evaluators/File.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../src/partial-evaluators/File.js"],"names":["ast","strictCode","env","realm","partiallyEvaluateCompletionDeref","program","result","partial_program","io","partial_file","t","file","comments","tokens"],"mappings":";;;;;;ypBAAA;;;;;;;;;kBAmBe,UACbA,GADa,EAEbC,UAFa,EAGbC,GAHa,EAIbC,KAJa,EAKmD;AAAA,8BAC5BD,IAAIE,gCAAJ,CAAqCJ,IAAIK,OAAzC,EAAkDJ,UAAlD,CAD4B;AAAA;AAAA,MAC3DK,MAD2D;AAAA,MACnDC,eADmD;AAAA,MAClCC,EADkC;;AAEhE,MAAIC,eAAeC,EAAEC,IAAF,CAAQJ,eAAR,EAA+BP,IAAIY,QAAnC,EAA6CZ,IAAIa,MAAjD,CAAnB;AACA,SAAO,CAACP,MAAD,EAASG,YAAT,EAAuBD,EAAvB,CAAP;AACD,C;;AAbD;;AACA;;AACA;;IAAYE,C","file":"File.js","sourcesContent":["/**\n * Copyright (c) 2017-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\n/* @flow */\n\nimport type { BabelNodeFile, BabelNodeStatement } from \"babel-types\";\nimport type { LexicalEnvironment } from \"../environment.js\";\nimport type { Realm } from \"../realm.js\";\n\nimport { Completion } from \"../completions.js\";\nimport { Value } from \"../values/index.js\";\nimport * as t from \"babel-types\";\n\nexport default function(\n ast: BabelNodeFile,\n strictCode: boolean,\n env: LexicalEnvironment,\n realm: Realm\n): [Completion | Value, BabelNodeFile, Array<BabelNodeStatement>] {\n let [result, partial_program, io] = env.partiallyEvaluateCompletionDeref(ast.program, strictCode);\n let partial_file = t.file((partial_program: any), ast.comments, ast.tokens);\n return [result, partial_file, io];\n}\n"]}
|
||||
15
build/node_modules/prepack/lib/partial-evaluators/ForInStatement.js
generated
vendored
Normal file
15
build/node_modules/prepack/lib/partial-evaluators/ForInStatement.js
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
exports.default = function (ast, strictCode, env, realm, labelSet) {
|
||||
var result = env.evaluateCompletionDeref(ast, strictCode);
|
||||
return [result, ast, []];
|
||||
};
|
||||
|
||||
var _completions = require("../completions.js");
|
||||
|
||||
var _index = require("../values/index.js");
|
||||
//# sourceMappingURL=ForInStatement.js.map
|
||||
1
build/node_modules/prepack/lib/partial-evaluators/ForInStatement.js.map
generated
vendored
Normal file
1
build/node_modules/prepack/lib/partial-evaluators/ForInStatement.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../src/partial-evaluators/ForInStatement.js"],"names":["ast","strictCode","env","realm","labelSet","result","evaluateCompletionDeref"],"mappings":";;;;;;kBAmBe,UACbA,GADa,EAEbC,UAFa,EAGbC,GAHa,EAIbC,KAJa,EAKbC,QALa,EAMmE;AAChF,MAAIC,SAASH,IAAII,uBAAJ,CAA4BN,GAA5B,EAAiCC,UAAjC,CAAb;AACA,SAAO,CAACI,MAAD,EAASL,GAAT,EAAc,EAAd,CAAP;AACD,C;;AAbD;;AACA","file":"ForInStatement.js","sourcesContent":["/**\n * Copyright (c) 2017-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\n/* @flow */\n\nimport type { BabelNodeForInStatement, BabelNodeStatement } from \"babel-types\";\nimport type { LexicalEnvironment } from \"../environment.js\";\nimport type { Realm } from \"../realm.js\";\n\nimport { AbruptCompletion } from \"../completions.js\";\nimport { Value } from \"../values/index.js\";\n\n// ECMA262 13.7.5.11\nexport default function(\n ast: BabelNodeForInStatement,\n strictCode: boolean,\n env: LexicalEnvironment,\n realm: Realm,\n labelSet: ?Array<string>\n): [AbruptCompletion | Value, BabelNodeForInStatement, Array<BabelNodeStatement>] {\n let result = env.evaluateCompletionDeref(ast, strictCode);\n return [result, ast, []];\n}\n"]}
|
||||
15
build/node_modules/prepack/lib/partial-evaluators/ForOfStatement.js
generated
vendored
Normal file
15
build/node_modules/prepack/lib/partial-evaluators/ForOfStatement.js
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
exports.default = function (ast, strictCode, env, realm, labelSet) {
|
||||
var result = env.evaluateCompletionDeref(ast, strictCode);
|
||||
return [result, ast, []];
|
||||
};
|
||||
|
||||
var _completions = require("../completions.js");
|
||||
|
||||
var _index = require("../values/index.js");
|
||||
//# sourceMappingURL=ForOfStatement.js.map
|
||||
1
build/node_modules/prepack/lib/partial-evaluators/ForOfStatement.js.map
generated
vendored
Normal file
1
build/node_modules/prepack/lib/partial-evaluators/ForOfStatement.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../src/partial-evaluators/ForOfStatement.js"],"names":["ast","strictCode","env","realm","labelSet","result","evaluateCompletionDeref"],"mappings":";;;;;;kBAmBe,UACbA,GADa,EAEbC,UAFa,EAGbC,GAHa,EAIbC,KAJa,EAKbC,QALa,EAMmE;AAChF,MAAIC,SAASH,IAAII,uBAAJ,CAA4BN,GAA5B,EAAiCC,UAAjC,CAAb;AACA,SAAO,CAACI,MAAD,EAASL,GAAT,EAAc,EAAd,CAAP;AACD,C;;AAbD;;AACA","file":"ForOfStatement.js","sourcesContent":["/**\n * Copyright (c) 2017-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\n/* @flow */\n\nimport type { BabelNodeForOfStatement, BabelNodeStatement } from \"babel-types\";\nimport type { LexicalEnvironment } from \"../environment.js\";\nimport type { Realm } from \"../realm.js\";\n\nimport { AbruptCompletion } from \"../completions.js\";\nimport { Value } from \"../values/index.js\";\n\n// ECMA262 13.7.5.11\nexport default function(\n ast: BabelNodeForOfStatement,\n strictCode: boolean,\n env: LexicalEnvironment,\n realm: Realm,\n labelSet: ?Array<string>\n): [AbruptCompletion | Value, BabelNodeForOfStatement, Array<BabelNodeStatement>] {\n let result = env.evaluateCompletionDeref(ast, strictCode);\n return [result, ast, []];\n}\n"]}
|
||||
15
build/node_modules/prepack/lib/partial-evaluators/ForStatement.js
generated
vendored
Normal file
15
build/node_modules/prepack/lib/partial-evaluators/ForStatement.js
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
exports.default = function (ast, strictCode, env, realm, labelSet) {
|
||||
var result = env.evaluateCompletionDeref(ast, strictCode);
|
||||
return [result, ast, []];
|
||||
};
|
||||
|
||||
var _completions = require("../completions.js");
|
||||
|
||||
var _index = require("../values/index.js");
|
||||
//# sourceMappingURL=ForStatement.js.map
|
||||
1
build/node_modules/prepack/lib/partial-evaluators/ForStatement.js.map
generated
vendored
Normal file
1
build/node_modules/prepack/lib/partial-evaluators/ForStatement.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../src/partial-evaluators/ForStatement.js"],"names":["ast","strictCode","env","realm","labelSet","result","evaluateCompletionDeref"],"mappings":";;;;;;kBAmBe,UACbA,GADa,EAEbC,UAFa,EAGbC,GAHa,EAIbC,KAJa,EAKbC,QALa,EAMiE;AAC9E,MAAIC,SAASH,IAAII,uBAAJ,CAA4BN,GAA5B,EAAiCC,UAAjC,CAAb;AACA,SAAO,CAACI,MAAD,EAASL,GAAT,EAAc,EAAd,CAAP;AACD,C;;AAbD;;AACA","file":"ForStatement.js","sourcesContent":["/**\n * Copyright (c) 2017-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\n/* @flow */\n\nimport type { BabelNodeForStatement, BabelNodeStatement } from \"babel-types\";\nimport type { LexicalEnvironment } from \"../environment.js\";\nimport type { Realm } from \"../realm.js\";\n\nimport { AbruptCompletion } from \"../completions.js\";\nimport { Value } from \"../values/index.js\";\n\n// ECMA262 13.7.4.7\nexport default function(\n ast: BabelNodeForStatement,\n strictCode: boolean,\n env: LexicalEnvironment,\n realm: Realm,\n labelSet: ?Array<string>\n): [AbruptCompletion | Value, BabelNodeForStatement, Array<BabelNodeStatement>] {\n let result = env.evaluateCompletionDeref(ast, strictCode);\n return [result, ast, []];\n}\n"]}
|
||||
15
build/node_modules/prepack/lib/partial-evaluators/FunctionDeclaration.js
generated
vendored
Normal file
15
build/node_modules/prepack/lib/partial-evaluators/FunctionDeclaration.js
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
exports.default = function (ast, strictCode, env, realm) {
|
||||
var result = env.evaluateCompletionDeref(ast, strictCode);
|
||||
return [result, ast, []];
|
||||
};
|
||||
|
||||
var _completions = require("../completions.js");
|
||||
|
||||
var _index = require("../values/index.js");
|
||||
//# sourceMappingURL=FunctionDeclaration.js.map
|
||||
1
build/node_modules/prepack/lib/partial-evaluators/FunctionDeclaration.js.map
generated
vendored
Normal file
1
build/node_modules/prepack/lib/partial-evaluators/FunctionDeclaration.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../src/partial-evaluators/FunctionDeclaration.js"],"names":["ast","strictCode","env","realm","result","evaluateCompletionDeref"],"mappings":";;;;;;kBAmBe,UACbA,GADa,EAEbC,UAFa,EAGbC,GAHa,EAIbC,KAJa,EAKwE;AACrF,MAAIC,SAASF,IAAIG,uBAAJ,CAA4BL,GAA5B,EAAiCC,UAAjC,CAAb;AACA,SAAO,CAACG,MAAD,EAASJ,GAAT,EAAc,EAAd,CAAP;AACD,C;;AAZD;;AACA","file":"FunctionDeclaration.js","sourcesContent":["/**\n * Copyright (c) 2017-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\n/* @flow */\n\nimport type { BabelNodeFunctionDeclaration, BabelNodeStatement } from \"babel-types\";\nimport type { LexicalEnvironment } from \"../environment.js\";\nimport type { Realm } from \"../realm.js\";\n\nimport { AbruptCompletion } from \"../completions.js\";\nimport { Value } from \"../values/index.js\";\n\n// ECMA262 14.1.20\nexport default function(\n ast: BabelNodeFunctionDeclaration,\n strictCode: boolean,\n env: LexicalEnvironment,\n realm: Realm\n): [AbruptCompletion | Value, BabelNodeFunctionDeclaration, Array<BabelNodeStatement>] {\n let result = env.evaluateCompletionDeref(ast, strictCode);\n return [result, ast, []];\n}\n"]}
|
||||
15
build/node_modules/prepack/lib/partial-evaluators/FunctionExpression.js
generated
vendored
Normal file
15
build/node_modules/prepack/lib/partial-evaluators/FunctionExpression.js
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
exports.default = function (ast, strictCode, env, realm) {
|
||||
var result = env.evaluateCompletionDeref(ast, strictCode);
|
||||
return [result, ast, []];
|
||||
};
|
||||
|
||||
var _completions = require("../completions.js");
|
||||
|
||||
var _index = require("../values/index.js");
|
||||
//# sourceMappingURL=FunctionExpression.js.map
|
||||
1
build/node_modules/prepack/lib/partial-evaluators/FunctionExpression.js.map
generated
vendored
Normal file
1
build/node_modules/prepack/lib/partial-evaluators/FunctionExpression.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../src/partial-evaluators/FunctionExpression.js"],"names":["ast","strictCode","env","realm","result","evaluateCompletionDeref"],"mappings":";;;;;;kBAkBe,UACbA,GADa,EAEbC,UAFa,EAGbC,GAHa,EAIbC,KAJa,EAKuE;AACpF,MAAIC,SAASF,IAAIG,uBAAJ,CAA4BL,GAA5B,EAAiCC,UAAjC,CAAb;AACA,SAAO,CAACG,MAAD,EAASJ,GAAT,EAAc,EAAd,CAAP;AACD,C;;AAXD;;AACA","file":"FunctionExpression.js","sourcesContent":["/**\n * Copyright (c) 2017-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\n/* @flow */\n\nimport type { BabelNodeFunctionExpression, BabelNodeStatement } from \"babel-types\";\nimport type { LexicalEnvironment } from \"../environment.js\";\nimport type { Realm } from \"../realm.js\";\n\nimport { AbruptCompletion } from \"../completions.js\";\nimport { Value } from \"../values/index.js\";\n\nexport default function(\n ast: BabelNodeFunctionExpression,\n strictCode: boolean,\n env: LexicalEnvironment,\n realm: Realm\n): [AbruptCompletion | Value, BabelNodeFunctionExpression, Array<BabelNodeStatement>] {\n let result = env.evaluateCompletionDeref(ast, strictCode);\n return [result, ast, []];\n}\n"]}
|
||||
15
build/node_modules/prepack/lib/partial-evaluators/Identifier.js
generated
vendored
Normal file
15
build/node_modules/prepack/lib/partial-evaluators/Identifier.js
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
exports.default = function (ast, strictCode, env, realm) {
|
||||
var result = env.evaluateCompletion(ast, strictCode);
|
||||
return [result, ast, []];
|
||||
};
|
||||
|
||||
var _completions = require("../completions.js");
|
||||
|
||||
var _index = require("../values/index.js");
|
||||
//# sourceMappingURL=Identifier.js.map
|
||||
1
build/node_modules/prepack/lib/partial-evaluators/Identifier.js.map
generated
vendored
Normal file
1
build/node_modules/prepack/lib/partial-evaluators/Identifier.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../src/partial-evaluators/Identifier.js"],"names":["ast","strictCode","env","realm","result","evaluateCompletion"],"mappings":";;;;;;kBAmBe,UACbA,GADa,EAEbC,UAFa,EAGbC,GAHa,EAIbC,KAJa,EAK2E;AACxF,MAAIC,SAASF,IAAIG,kBAAJ,CAAuBL,GAAvB,EAA4BC,UAA5B,CAAb;AACA,SAAO,CAACG,MAAD,EAASJ,GAAT,EAAc,EAAd,CAAP;AACD,C;;AAZD;;AACA","file":"Identifier.js","sourcesContent":["/**\n * Copyright (c) 2017-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\n/* @flow */\n\nimport type { BabelNodeIdentifier, BabelNodeStatement } from \"babel-types\";\nimport type { LexicalEnvironment, Reference } from \"../environment.js\";\nimport type { Realm } from \"../realm.js\";\n\nimport { AbruptCompletion } from \"../completions.js\";\nimport { Value } from \"../values/index.js\";\n\n// ECMA262 12.1.6\nexport default function(\n ast: BabelNodeIdentifier,\n strictCode: boolean,\n env: LexicalEnvironment,\n realm: Realm\n): [AbruptCompletion | Reference | Value, BabelNodeIdentifier, Array<BabelNodeStatement>] {\n let result = env.evaluateCompletion(ast, strictCode);\n return [result, ast, []];\n}\n"]}
|
||||
148
build/node_modules/prepack/lib/partial-evaluators/IfStatement.js
generated
vendored
Normal file
148
build/node_modules/prepack/lib/partial-evaluators/IfStatement.js
generated
vendored
Normal file
@@ -0,0 +1,148 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); /**
|
||||
* 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.
|
||||
*/
|
||||
|
||||
exports.default = function (ast, strictCode, env, realm) {
|
||||
var _env$partiallyEvaluat = env.partiallyEvaluateCompletionDeref(ast.test, strictCode),
|
||||
_env$partiallyEvaluat2 = _slicedToArray(_env$partiallyEvaluat, 3),
|
||||
exprValue = _env$partiallyEvaluat2[0],
|
||||
exprAst = _env$partiallyEvaluat2[1],
|
||||
exprIO = _env$partiallyEvaluat2[2];
|
||||
|
||||
if (exprValue instanceof _completions.AbruptCompletion) return [exprValue, t.expressionStatement(exprAst), exprIO];
|
||||
var completion = void 0;
|
||||
if (exprValue instanceof _completions.PossiblyNormalCompletion) {
|
||||
completion = exprValue;
|
||||
exprValue = completion.value;
|
||||
}
|
||||
(0, _invariant2.default)(exprValue instanceof _index2.Value);
|
||||
|
||||
if (!exprValue.mightNotBeTrue()) {
|
||||
// 3.a. Let stmtCompletion be the result of evaluating the first Statement
|
||||
var _env$partiallyEvaluat3 = env.partiallyEvaluateCompletionDeref(ast.consequent, strictCode),
|
||||
_env$partiallyEvaluat4 = _slicedToArray(_env$partiallyEvaluat3, 3),
|
||||
stmtCompletion = _env$partiallyEvaluat4[0],
|
||||
stmtAst = _env$partiallyEvaluat4[1],
|
||||
stmtIO = _env$partiallyEvaluat4[2];
|
||||
|
||||
// 5. Return Completion(UpdateEmpty(stmtCompletion, undefined)
|
||||
|
||||
|
||||
stmtCompletion = (0, _index.UpdateEmpty)(realm, stmtCompletion, realm.intrinsics.undefined);
|
||||
return [stmtCompletion, stmtAst, exprIO.concat(stmtIO)];
|
||||
} else if (!exprValue.mightNotBeFalse()) {
|
||||
var _stmtCompletion = void 0,
|
||||
_stmtAst = void 0,
|
||||
_stmtIO = void 0;
|
||||
if (ast.alternate) {
|
||||
// 4.a. Let stmtCompletion be the result of evaluating the second Statement
|
||||
;
|
||||
|
||||
var _env$partiallyEvaluat5 = env.partiallyEvaluateCompletionDeref(ast.alternate, strictCode);
|
||||
|
||||
var _env$partiallyEvaluat6 = _slicedToArray(_env$partiallyEvaluat5, 3);
|
||||
|
||||
_stmtCompletion = _env$partiallyEvaluat6[0];
|
||||
_stmtAst = _env$partiallyEvaluat6[1];
|
||||
_stmtIO = _env$partiallyEvaluat6[2];
|
||||
} else {
|
||||
// 3 (of the if only statement). Return NormalCompletion(undefined)
|
||||
_stmtCompletion = realm.intrinsics.undefined;
|
||||
_stmtAst = t.emptyStatement();
|
||||
_stmtIO = [];
|
||||
}
|
||||
// 5. Return Completion(UpdateEmpty(stmtCompletion, undefined)
|
||||
_stmtCompletion = (0, _index.UpdateEmpty)(realm, _stmtCompletion, realm.intrinsics.undefined);
|
||||
return [_stmtCompletion, _stmtAst, exprIO.concat(_stmtIO)];
|
||||
}
|
||||
(0, _invariant2.default)(exprValue instanceof _index2.AbstractValue);
|
||||
|
||||
// Evaluate consequent and alternate in sandboxes and get their effects.
|
||||
|
||||
var _realm$partiallyEvalu = realm.partiallyEvaluateNodeForEffects(ast.consequent, strictCode, env),
|
||||
_realm$partiallyEvalu2 = _slicedToArray(_realm$partiallyEvalu, 3),
|
||||
consequentEffects = _realm$partiallyEvalu2[0],
|
||||
conAst = _realm$partiallyEvalu2[1],
|
||||
conIO = _realm$partiallyEvalu2[2];
|
||||
|
||||
var _consequentEffects = _slicedToArray(consequentEffects, 5),
|
||||
conCompl = _consequentEffects[0],
|
||||
gen1 = _consequentEffects[1],
|
||||
bindings1 = _consequentEffects[2],
|
||||
properties1 = _consequentEffects[3],
|
||||
createdObj1 = _consequentEffects[4];
|
||||
|
||||
var consequentAst = conAst;
|
||||
if (conIO.length > 0) consequentAst = t.blockStatement(conIO.concat(consequentAst));
|
||||
|
||||
var _ref = ast.alternate ? realm.partiallyEvaluateNodeForEffects(ast.alternate, strictCode, env) : [(0, _realm.construct_empty_effects)(realm), undefined, []],
|
||||
_ref2 = _slicedToArray(_ref, 3),
|
||||
alternateEffects = _ref2[0],
|
||||
altAst = _ref2[1],
|
||||
altIO = _ref2[2];
|
||||
|
||||
var _alternateEffects = _slicedToArray(alternateEffects, 5),
|
||||
altCompl = _alternateEffects[0],
|
||||
gen2 = _alternateEffects[1],
|
||||
bindings2 = _alternateEffects[2],
|
||||
properties2 = _alternateEffects[3],
|
||||
createdObj2 = _alternateEffects[4];
|
||||
|
||||
var alternateAst = altAst;
|
||||
if (altIO.length > 0) alternateAst = t.blockStatement(altIO.concat(alternateAst));
|
||||
|
||||
// Join the effects, creating an abstract view of what happened, regardless
|
||||
// of the actual value of exprValue.
|
||||
var joinedEffects = _singletons.Join.joinEffects(realm, exprValue, [conCompl, gen1, bindings1, properties1, createdObj1], [altCompl, gen2, bindings2, properties2, createdObj2]);
|
||||
completion = joinedEffects[0];
|
||||
if (completion instanceof _completions.PossiblyNormalCompletion) {
|
||||
// in this case one of the branches may complete abruptly, which means that
|
||||
// not all control flow branches join into one flow at this point.
|
||||
// Consequently we have to continue tracking changes until the point where
|
||||
// all the branches come together into one.
|
||||
realm.captureEffects(completion);
|
||||
}
|
||||
// Note that the effects of (non joining) abrupt branches are not included
|
||||
// in joinedEffects, but are tracked separately inside completion.
|
||||
realm.applyEffects(joinedEffects);
|
||||
|
||||
var resultAst = t.ifStatement(exprAst, consequentAst, alternateAst);
|
||||
(0, _invariant2.default)(!(completion instanceof _environment.Reference));
|
||||
return [completion, resultAst, exprIO];
|
||||
};
|
||||
|
||||
var _completions = require("../completions.js");
|
||||
|
||||
var _environment = require("../environment.js");
|
||||
|
||||
var _index = require("../methods/index.js");
|
||||
|
||||
var _index2 = require("../values/index.js");
|
||||
|
||||
var _realm = require("../realm.js");
|
||||
|
||||
var _singletons = require("../singletons.js");
|
||||
|
||||
var _babelTypes = require("babel-types");
|
||||
|
||||
var t = _interopRequireWildcard(_babelTypes);
|
||||
|
||||
var _invariant = require("../invariant.js");
|
||||
|
||||
var _invariant2 = _interopRequireDefault(_invariant);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
|
||||
//# sourceMappingURL=IfStatement.js.map
|
||||
1
build/node_modules/prepack/lib/partial-evaluators/IfStatement.js.map
generated
vendored
Normal file
1
build/node_modules/prepack/lib/partial-evaluators/IfStatement.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
15
build/node_modules/prepack/lib/partial-evaluators/LabeledStatement.js
generated
vendored
Normal file
15
build/node_modules/prepack/lib/partial-evaluators/LabeledStatement.js
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
exports.default = function (ast, strictCode, env, realm) {
|
||||
var result = env.evaluateCompletionDeref(ast, strictCode);
|
||||
return [result, ast, []];
|
||||
};
|
||||
|
||||
var _completions = require("../completions.js");
|
||||
|
||||
var _index = require("../values/index.js");
|
||||
//# sourceMappingURL=LabeledStatement.js.map
|
||||
1
build/node_modules/prepack/lib/partial-evaluators/LabeledStatement.js.map
generated
vendored
Normal file
1
build/node_modules/prepack/lib/partial-evaluators/LabeledStatement.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../src/partial-evaluators/LabeledStatement.js"],"names":["ast","strictCode","env","realm","result","evaluateCompletionDeref"],"mappings":";;;;;;kBAqBe,UACbA,GADa,EAEbC,UAFa,EAGbC,GAHa,EAIbC,KAJa,EAKqE;AAClF,MAAIC,SAASF,IAAIG,uBAAJ,CAA4BL,GAA5B,EAAiCC,UAAjC,CAAb;AACA,SAAO,CAACG,MAAD,EAASJ,GAAT,EAAc,EAAd,CAAP;AACD,C;;AAdD;;AACA","file":"LabeledStatement.js","sourcesContent":["/**\n * Copyright (c) 2017-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\n/* @flow */\n\nimport type { BabelNodeLabeledStatement, BabelNodeStatement } from \"babel-types\";\nimport type { LexicalEnvironment } from \"../environment.js\";\nimport type { Realm } from \"../realm.js\";\n\nimport { AbruptCompletion } from \"../completions.js\";\nimport { Value } from \"../values/index.js\";\n\n// ECMA262 13.13.14\n\n// ECMA262 13.13.15\nexport default function(\n ast: BabelNodeLabeledStatement,\n strictCode: boolean,\n env: LexicalEnvironment,\n realm: Realm\n): [AbruptCompletion | Value, BabelNodeLabeledStatement, Array<BabelNodeStatement>] {\n let result = env.evaluateCompletionDeref(ast, strictCode);\n return [result, ast, []];\n}\n"]}
|
||||
15
build/node_modules/prepack/lib/partial-evaluators/LogicalExpression.js
generated
vendored
Normal file
15
build/node_modules/prepack/lib/partial-evaluators/LogicalExpression.js
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
exports.default = function (ast, strictCode, env, realm) {
|
||||
var result = env.evaluateCompletionDeref(ast, strictCode);
|
||||
return [result, ast, []];
|
||||
};
|
||||
|
||||
var _completions = require("../completions.js");
|
||||
|
||||
var _index = require("../values/index.js");
|
||||
//# sourceMappingURL=LogicalExpression.js.map
|
||||
1
build/node_modules/prepack/lib/partial-evaluators/LogicalExpression.js.map
generated
vendored
Normal file
1
build/node_modules/prepack/lib/partial-evaluators/LogicalExpression.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../src/partial-evaluators/LogicalExpression.js"],"names":["ast","strictCode","env","realm","result","evaluateCompletionDeref"],"mappings":";;;;;;kBAkBe,UACbA,GADa,EAEbC,UAFa,EAGbC,GAHa,EAIbC,KAJa,EAKsE;AACnF,MAAIC,SAASF,IAAIG,uBAAJ,CAA4BL,GAA5B,EAAiCC,UAAjC,CAAb;AACA,SAAO,CAACG,MAAD,EAASJ,GAAT,EAAc,EAAd,CAAP;AACD,C;;AAXD;;AACA","file":"LogicalExpression.js","sourcesContent":["/**\n * Copyright (c) 2017-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\n/* @flow */\n\nimport type { BabelNodeLogicalExpression, BabelNodeStatement } from \"babel-types\";\nimport type { LexicalEnvironment } from \"../environment.js\";\nimport type { Realm } from \"../realm.js\";\n\nimport { AbruptCompletion } from \"../completions.js\";\nimport { Value } from \"../values/index.js\";\n\nexport default function(\n ast: BabelNodeLogicalExpression,\n strictCode: boolean,\n env: LexicalEnvironment,\n realm: Realm\n): [AbruptCompletion | Value, BabelNodeLogicalExpression, Array<BabelNodeStatement>] {\n let result = env.evaluateCompletionDeref(ast, strictCode);\n return [result, ast, []];\n}\n"]}
|
||||
15
build/node_modules/prepack/lib/partial-evaluators/MemberExpression.js
generated
vendored
Normal file
15
build/node_modules/prepack/lib/partial-evaluators/MemberExpression.js
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
exports.default = function (ast, strictCode, env, realm) {
|
||||
var result = env.evaluateCompletion(ast, strictCode);
|
||||
return [result, ast, []];
|
||||
};
|
||||
|
||||
var _completions = require("../completions.js");
|
||||
|
||||
var _index = require("../values/index.js");
|
||||
//# sourceMappingURL=MemberExpression.js.map
|
||||
1
build/node_modules/prepack/lib/partial-evaluators/MemberExpression.js.map
generated
vendored
Normal file
1
build/node_modules/prepack/lib/partial-evaluators/MemberExpression.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../src/partial-evaluators/MemberExpression.js"],"names":["ast","strictCode","env","realm","result","evaluateCompletion"],"mappings":";;;;;;kBAmBe,UACbA,GADa,EAEbC,UAFa,EAGbC,GAHa,EAIbC,KAJa,EAKiF;AAC9F,MAAIC,SAASF,IAAIG,kBAAJ,CAAuBL,GAAvB,EAA4BC,UAA5B,CAAb;AACA,SAAO,CAACG,MAAD,EAASJ,GAAT,EAAc,EAAd,CAAP;AACD,C;;AAZD;;AACA","file":"MemberExpression.js","sourcesContent":["/**\n * Copyright (c) 2017-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\n/* @flow */\n\nimport type { BabelNodeMemberExpression, BabelNodeStatement } from \"babel-types\";\nimport type { LexicalEnvironment, Reference } from \"../environment.js\";\nimport type { Realm } from \"../realm.js\";\n\nimport { AbruptCompletion } from \"../completions.js\";\nimport { Value } from \"../values/index.js\";\n\n// ECMA262 12.3.2.1\nexport default function(\n ast: BabelNodeMemberExpression,\n strictCode: boolean,\n env: LexicalEnvironment,\n realm: Realm\n): [AbruptCompletion | Reference | Value, BabelNodeMemberExpression, Array<BabelNodeStatement>] {\n let result = env.evaluateCompletion(ast, strictCode);\n return [result, ast, []];\n}\n"]}
|
||||
15
build/node_modules/prepack/lib/partial-evaluators/MetaProperty.js
generated
vendored
Normal file
15
build/node_modules/prepack/lib/partial-evaluators/MetaProperty.js
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
exports.default = function (ast, strictCode, env, realm) {
|
||||
var result = env.evaluateCompletionDeref(ast, strictCode);
|
||||
return [result, ast, []];
|
||||
};
|
||||
|
||||
var _completions = require("../completions.js");
|
||||
|
||||
var _index = require("../values/index.js");
|
||||
//# sourceMappingURL=MetaProperty.js.map
|
||||
1
build/node_modules/prepack/lib/partial-evaluators/MetaProperty.js.map
generated
vendored
Normal file
1
build/node_modules/prepack/lib/partial-evaluators/MetaProperty.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../src/partial-evaluators/MetaProperty.js"],"names":["ast","strictCode","env","realm","result","evaluateCompletionDeref"],"mappings":";;;;;;kBAmBe,UACbA,GADa,EAEbC,UAFa,EAGbC,GAHa,EAIbC,KAJa,EAKiE;AAC9E,MAAIC,SAASF,IAAIG,uBAAJ,CAA4BL,GAA5B,EAAiCC,UAAjC,CAAb;AACA,SAAO,CAACG,MAAD,EAASJ,GAAT,EAAc,EAAd,CAAP;AACD,C;;AAZD;;AACA","file":"MetaProperty.js","sourcesContent":["/**\n * Copyright (c) 2017-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\n/* @flow */\n\nimport type { BabelNodeMetaProperty, BabelNodeStatement } from \"babel-types\";\nimport type { LexicalEnvironment } from \"../environment.js\";\nimport type { Realm } from \"../realm.js\";\n\nimport { AbruptCompletion } from \"../completions.js\";\nimport { Value } from \"../values/index.js\";\n\n// ECMA 12.3.8.1\nexport default function(\n ast: BabelNodeMetaProperty,\n strictCode: boolean,\n env: LexicalEnvironment,\n realm: Realm\n): [AbruptCompletion | Value, BabelNodeMetaProperty, Array<BabelNodeStatement>] {\n let result = env.evaluateCompletionDeref(ast, strictCode);\n return [result, ast, []];\n}\n"]}
|
||||
15
build/node_modules/prepack/lib/partial-evaluators/NewExpression.js
generated
vendored
Normal file
15
build/node_modules/prepack/lib/partial-evaluators/NewExpression.js
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
exports.default = function (ast, strictCode, env, realm) {
|
||||
var result = env.evaluateCompletionDeref(ast, strictCode);
|
||||
return [result, ast, []];
|
||||
};
|
||||
|
||||
var _completions = require("../completions.js");
|
||||
|
||||
var _index = require("../values/index.js");
|
||||
//# sourceMappingURL=NewExpression.js.map
|
||||
1
build/node_modules/prepack/lib/partial-evaluators/NewExpression.js.map
generated
vendored
Normal file
1
build/node_modules/prepack/lib/partial-evaluators/NewExpression.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../src/partial-evaluators/NewExpression.js"],"names":["ast","strictCode","env","realm","result","evaluateCompletionDeref"],"mappings":";;;;;;kBAkBe,UACbA,GADa,EAEbC,UAFa,EAGbC,GAHa,EAIbC,KAJa,EAKkE;AAC/E,MAAIC,SAASF,IAAIG,uBAAJ,CAA4BL,GAA5B,EAAiCC,UAAjC,CAAb;AACA,SAAO,CAACG,MAAD,EAASJ,GAAT,EAAc,EAAd,CAAP;AACD,C;;AAXD;;AACA","file":"NewExpression.js","sourcesContent":["/**\n * Copyright (c) 2017-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\n/* @flow */\n\nimport type { BabelNodeNewExpression, BabelNodeStatement } from \"babel-types\";\nimport type { LexicalEnvironment } from \"../environment.js\";\nimport type { Realm } from \"../realm.js\";\n\nimport { AbruptCompletion } from \"../completions.js\";\nimport { Value } from \"../values/index.js\";\n\nexport default function(\n ast: BabelNodeNewExpression,\n strictCode: boolean,\n env: LexicalEnvironment,\n realm: Realm\n): [AbruptCompletion | Value, BabelNodeNewExpression, Array<BabelNodeStatement>] {\n let result = env.evaluateCompletionDeref(ast, strictCode);\n return [result, ast, []];\n}\n"]}
|
||||
11
build/node_modules/prepack/lib/partial-evaluators/NullLiteral.js
generated
vendored
Normal file
11
build/node_modules/prepack/lib/partial-evaluators/NullLiteral.js
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
exports.default = function (ast, strictCode, env, realm) {
|
||||
var result = realm.intrinsics.null;
|
||||
return [result, ast, []];
|
||||
};
|
||||
//# sourceMappingURL=NullLiteral.js.map
|
||||
1
build/node_modules/prepack/lib/partial-evaluators/NullLiteral.js.map
generated
vendored
Normal file
1
build/node_modules/prepack/lib/partial-evaluators/NullLiteral.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../src/partial-evaluators/NullLiteral.js"],"names":["ast","strictCode","env","realm","result","intrinsics","null"],"mappings":";;;;;;kBAgBe,UACbA,GADa,EAEbC,UAFa,EAGbC,GAHa,EAIbC,KAJa,EAKiD;AAC9D,MAAIC,SAASD,MAAME,UAAN,CAAiBC,IAA9B;AACA,SAAO,CAACF,MAAD,EAASJ,GAAT,EAAc,EAAd,CAAP;AACD,C","file":"NullLiteral.js","sourcesContent":["/**\n * Copyright (c) 2017-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\n/* @flow */\n\nimport type { BabelNodeNullLiteral, BabelNodeStatement } from \"babel-types\";\nimport type { LexicalEnvironment } from \"../environment.js\";\nimport type { NullValue } from \"../values/index.js\";\nimport type { Realm } from \"../realm.js\";\n\nexport default function(\n ast: BabelNodeNullLiteral,\n strictCode: boolean,\n env: LexicalEnvironment,\n realm: Realm\n): [NullValue, BabelNodeNullLiteral, Array<BabelNodeStatement>] {\n let result = realm.intrinsics.null;\n return [result, ast, []];\n}\n"]}
|
||||
13
build/node_modules/prepack/lib/partial-evaluators/NumericLiteral.js
generated
vendored
Normal file
13
build/node_modules/prepack/lib/partial-evaluators/NumericLiteral.js
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
exports.default = function (ast, strictCode, env, realm) {
|
||||
var result = new _index.NumberValue(realm, ast.value);
|
||||
return [result, ast, []];
|
||||
};
|
||||
|
||||
var _index = require("../values/index.js");
|
||||
//# sourceMappingURL=NumericLiteral.js.map
|
||||
1
build/node_modules/prepack/lib/partial-evaluators/NumericLiteral.js.map
generated
vendored
Normal file
1
build/node_modules/prepack/lib/partial-evaluators/NumericLiteral.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../src/partial-evaluators/NumericLiteral.js"],"names":["ast","strictCode","env","realm","result","value"],"mappings":";;;;;;kBAiBe,UACbA,GADa,EAEbC,UAFa,EAGbC,GAHa,EAIbC,KAJa,EAKsD;AACnE,MAAIC,SAAS,uBAAgBD,KAAhB,EAAuBH,IAAIK,KAA3B,CAAb;AACA,SAAO,CAACD,MAAD,EAASJ,GAAT,EAAc,EAAd,CAAP;AACD,C;;AAVD","file":"NumericLiteral.js","sourcesContent":["/**\n * Copyright (c) 2017-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\n/* @flow */\n\nimport type { BabelNodeNumericLiteral, BabelNodeStatement } from \"babel-types\";\nimport type { LexicalEnvironment } from \"../environment.js\";\nimport type { Realm } from \"../realm.js\";\n\nimport { NumberValue } from \"../values/index.js\";\n\nexport default function(\n ast: BabelNodeNumericLiteral,\n strictCode: boolean,\n env: LexicalEnvironment,\n realm: Realm\n): [NumberValue, BabelNodeNumericLiteral, Array<BabelNodeStatement>] {\n let result = new NumberValue(realm, ast.value);\n return [result, ast, []];\n}\n"]}
|
||||
15
build/node_modules/prepack/lib/partial-evaluators/ObjectExpression.js
generated
vendored
Normal file
15
build/node_modules/prepack/lib/partial-evaluators/ObjectExpression.js
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
exports.default = function (ast, strictCode, env, realm) {
|
||||
var result = env.evaluateCompletionDeref(ast, strictCode);
|
||||
return [result, ast, []];
|
||||
};
|
||||
|
||||
var _completions = require("../completions.js");
|
||||
|
||||
var _index = require("../values/index.js");
|
||||
//# sourceMappingURL=ObjectExpression.js.map
|
||||
1
build/node_modules/prepack/lib/partial-evaluators/ObjectExpression.js.map
generated
vendored
Normal file
1
build/node_modules/prepack/lib/partial-evaluators/ObjectExpression.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../src/partial-evaluators/ObjectExpression.js"],"names":["ast","strictCode","env","realm","result","evaluateCompletionDeref"],"mappings":";;;;;;kBAmBe,UACbA,GADa,EAEbC,UAFa,EAGbC,GAHa,EAIbC,KAJa,EAKqE;AAClF,MAAIC,SAASF,IAAIG,uBAAJ,CAA4BL,GAA5B,EAAiCC,UAAjC,CAAb;AACA,SAAO,CAACG,MAAD,EAASJ,GAAT,EAAc,EAAd,CAAP;AACD,C;;AAZD;;AACA","file":"ObjectExpression.js","sourcesContent":["/**\n * Copyright (c) 2017-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\n/* @flow */\n\nimport type { BabelNodeObjectExpression, BabelNodeStatement } from \"babel-types\";\nimport type { LexicalEnvironment } from \"../environment.js\";\nimport type { Realm } from \"../realm.js\";\n\nimport { AbruptCompletion } from \"../completions.js\";\nimport { Value } from \"../values/index.js\";\n\n// ECMA262 12.2.6.8\nexport default function(\n ast: BabelNodeObjectExpression,\n strictCode: boolean,\n env: LexicalEnvironment,\n realm: Realm\n): [AbruptCompletion | Value, BabelNodeObjectExpression, Array<BabelNodeStatement>] {\n let result = env.evaluateCompletionDeref(ast, strictCode);\n return [result, ast, []];\n}\n"]}
|
||||
111
build/node_modules/prepack/lib/partial-evaluators/Program.js
generated
vendored
Normal file
111
build/node_modules/prepack/lib/partial-evaluators/Program.js
generated
vendored
Normal file
@@ -0,0 +1,111 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); /**
|
||||
* 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.
|
||||
*/
|
||||
|
||||
exports.default = function (ast, strictCode, env, realm) {
|
||||
strictCode = (0, _strict2.default)(ast);
|
||||
|
||||
(0, _Program.GlobalDeclarationInstantiation)(realm, ast, env, strictCode);
|
||||
|
||||
var partialBody = [];
|
||||
var val = void 0;
|
||||
|
||||
var _iteratorNormalCompletion = true;
|
||||
var _didIteratorError = false;
|
||||
var _iteratorError = undefined;
|
||||
|
||||
try {
|
||||
for (var _iterator = ast.body[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
||||
var node = _step.value;
|
||||
|
||||
if (node.type !== "FunctionDeclaration") {
|
||||
var _env$partiallyEvaluat = env.partiallyEvaluateCompletionDeref(node, strictCode),
|
||||
_env$partiallyEvaluat2 = _slicedToArray(_env$partiallyEvaluat, 3),
|
||||
potentialVal = _env$partiallyEvaluat2[0],
|
||||
partialAst = _env$partiallyEvaluat2[1],
|
||||
nio = _env$partiallyEvaluat2[2];
|
||||
|
||||
var _iteratorNormalCompletion2 = true;
|
||||
var _didIteratorError2 = false;
|
||||
var _iteratorError2 = undefined;
|
||||
|
||||
try {
|
||||
for (var _iterator2 = nio[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
|
||||
var ioAst = _step2.value;
|
||||
partialBody.push(ioAst);
|
||||
}
|
||||
} catch (err) {
|
||||
_didIteratorError2 = true;
|
||||
_iteratorError2 = err;
|
||||
} finally {
|
||||
try {
|
||||
if (!_iteratorNormalCompletion2 && _iterator2.return) {
|
||||
_iterator2.return();
|
||||
}
|
||||
} finally {
|
||||
if (_didIteratorError2) {
|
||||
throw _iteratorError2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
partialBody.push(partialAst);
|
||||
if (!(potentialVal instanceof _index.EmptyValue)) val = potentialVal;
|
||||
} else {
|
||||
// TODO: this goes away once residual functions are partially evaluated.
|
||||
partialBody.push(node);
|
||||
}
|
||||
}
|
||||
|
||||
// todo: compute a global fixed point by invoking each escaped (i.e. call back)
|
||||
// function with dummy arguments and joining their effects with the
|
||||
// global state until there is no invocation that causes further changes to
|
||||
// the global state.
|
||||
} catch (err) {
|
||||
_didIteratorError = true;
|
||||
_iteratorError = err;
|
||||
} finally {
|
||||
try {
|
||||
if (!_iteratorNormalCompletion && _iterator.return) {
|
||||
_iterator.return();
|
||||
}
|
||||
} finally {
|
||||
if (_didIteratorError) {
|
||||
throw _iteratorError;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var result = val || realm.intrinsics.empty;
|
||||
return [result, t.program(partialBody, ast.directives), []];
|
||||
};
|
||||
|
||||
var _completions = require("../completions.js");
|
||||
|
||||
var _index = require("../values/index.js");
|
||||
|
||||
var _Program = require("../evaluators/Program.js");
|
||||
|
||||
var _strict = require("../utils/strict.js");
|
||||
|
||||
var _strict2 = _interopRequireDefault(_strict);
|
||||
|
||||
var _babelTypes = require("babel-types");
|
||||
|
||||
var t = _interopRequireWildcard(_babelTypes);
|
||||
|
||||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
//# sourceMappingURL=Program.js.map
|
||||
1
build/node_modules/prepack/lib/partial-evaluators/Program.js.map
generated
vendored
Normal file
1
build/node_modules/prepack/lib/partial-evaluators/Program.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../src/partial-evaluators/Program.js"],"names":["ast","strictCode","env","realm","partialBody","val","body","node","type","partiallyEvaluateCompletionDeref","potentialVal","partialAst","nio","ioAst","push","result","intrinsics","empty","t","program","directives"],"mappings":";;;;;;ypBAAA;;;;;;;;;kBAsBe,UACbA,GADa,EAEbC,UAFa,EAGbC,GAHa,EAIbC,KAJa,EAKsD;AACnEF,eAAa,sBAASD,GAAT,CAAb;;AAEA,+CAA+BG,KAA/B,EAAsCH,GAAtC,EAA2CE,GAA3C,EAAgDD,UAAhD;;AAEA,MAAIG,cAAsE,EAA1E;AACA,MAAIC,YAAJ;;AANmE;AAAA;AAAA;;AAAA;AAQnE,yBAAiBL,IAAIM,IAArB,8HAA2B;AAAA,UAAlBC,IAAkB;;AACzB,UAAIA,KAAKC,IAAL,KAAc,qBAAlB,EAAyC;AAAA,oCACDN,IAAIO,gCAAJ,CAAqCF,IAArC,EAA2CN,UAA3C,CADC;AAAA;AAAA,YAClCS,YADkC;AAAA,YACpBC,UADoB;AAAA,YACRC,GADQ;;AAAA;AAAA;AAAA;;AAAA;AAEvC,gCAAkBA,GAAlB;AAAA,gBAASC,KAAT;AAAuBT,wBAAYU,IAAZ,CAAiBD,KAAjB;AAAvB;AAFuC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AAGvCT,oBAAYU,IAAZ,CAAkBH,UAAlB;AACA,YAAI,EAAED,yCAAF,CAAJ,EAA2CL,MAAMK,YAAN;AAC5C,OALD,MAKO;AACL;AACAN,oBAAYU,IAAZ,CAAiBP,IAAjB;AACD;AACF;;AAED;AACA;AACA;AACA;AAvBmE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AAyBnE,MAAIQ,SAASV,OAAOF,MAAMa,UAAN,CAAiBC,KAArC;AACA,SAAO,CAACF,MAAD,EAASG,EAAEC,OAAF,CAAUf,WAAV,EAAuBJ,IAAIoB,UAA3B,CAAT,EAAiD,EAAjD,CAAP;AACD,C;;AAvCD;;AACA;;AACA;;AAEA;;;;AACA;;IAAYF,C","file":"Program.js","sourcesContent":["/**\n * Copyright (c) 2017-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\n/* @flow */\n\nimport type { BabelNodeProgram, BabelNodeStatement, BabelNodeModuleDeclaration } from \"babel-types\";\nimport type { LexicalEnvironment } from \"../environment.js\";\nimport type { Realm } from \"../realm.js\";\n\nimport { Completion } from \"../completions.js\";\nimport { EmptyValue, Value } from \"../values/index.js\";\nimport { GlobalDeclarationInstantiation } from \"../evaluators/Program.js\";\n\nimport IsStrict from \"../utils/strict.js\";\nimport * as t from \"babel-types\";\n\nexport default function(\n ast: BabelNodeProgram,\n strictCode: boolean,\n env: LexicalEnvironment,\n realm: Realm\n): [Completion | Value, BabelNodeProgram, Array<BabelNodeStatement>] {\n strictCode = IsStrict(ast);\n\n GlobalDeclarationInstantiation(realm, ast, env, strictCode);\n\n let partialBody: Array<BabelNodeStatement | BabelNodeModuleDeclaration> = [];\n let val;\n\n for (let node of ast.body) {\n if (node.type !== \"FunctionDeclaration\") {\n let [potentialVal, partialAst, nio] = env.partiallyEvaluateCompletionDeref(node, strictCode);\n for (let ioAst of nio) partialBody.push(ioAst);\n partialBody.push((partialAst: any));\n if (!(potentialVal instanceof EmptyValue)) val = potentialVal;\n } else {\n // TODO: this goes away once residual functions are partially evaluated.\n partialBody.push(node);\n }\n }\n\n // todo: compute a global fixed point by invoking each escaped (i.e. call back)\n // function with dummy arguments and joining their effects with the\n // global state until there is no invocation that causes further changes to\n // the global state.\n\n let result = val || realm.intrinsics.empty;\n return [result, t.program(partialBody, ast.directives), []];\n}\n"]}
|
||||
15
build/node_modules/prepack/lib/partial-evaluators/RegExpLiteral.js
generated
vendored
Normal file
15
build/node_modules/prepack/lib/partial-evaluators/RegExpLiteral.js
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
exports.default = function (ast, strictCode, env, realm) {
|
||||
var result = (0, _index.RegExpCreate)(realm, new _index2.StringValue(realm, ast.pattern), ast.flags ? new _index2.StringValue(realm, ast.flags) : undefined);
|
||||
return [result, ast, []];
|
||||
};
|
||||
|
||||
var _index = require("../methods/index.js");
|
||||
|
||||
var _index2 = require("../values/index.js");
|
||||
//# sourceMappingURL=RegExpLiteral.js.map
|
||||
1
build/node_modules/prepack/lib/partial-evaluators/RegExpLiteral.js.map
generated
vendored
Normal file
1
build/node_modules/prepack/lib/partial-evaluators/RegExpLiteral.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../src/partial-evaluators/RegExpLiteral.js"],"names":["ast","strictCode","env","realm","result","pattern","flags","undefined"],"mappings":";;;;;;kBAkBe,UACbA,GADa,EAEbC,UAFa,EAGbC,GAHa,EAIbC,KAJa,EAKqD;AAClE,MAAIC,SAAS,yBACXD,KADW,EAEX,wBAAgBA,KAAhB,EAAuBH,IAAIK,OAA3B,CAFW,EAGXL,IAAIM,KAAJ,GAAY,wBAAgBH,KAAhB,EAAuBH,IAAIM,KAA3B,CAAZ,GAAgDC,SAHrC,CAAb;AAKA,SAAO,CAACH,MAAD,EAASJ,GAAT,EAAc,EAAd,CAAP;AACD,C;;AAfD;;AACA","file":"RegExpLiteral.js","sourcesContent":["/**\n * Copyright (c) 2017-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\n/* @flow */\n\nimport type { BabelNodeRegExpLiteral, BabelNodeStatement } from \"babel-types\";\nimport type { LexicalEnvironment } from \"../environment.js\";\nimport type { Realm } from \"../realm.js\";\n\nimport { RegExpCreate } from \"../methods/index.js\";\nimport { ObjectValue, StringValue } from \"../values/index.js\";\n\nexport default function(\n ast: BabelNodeRegExpLiteral,\n strictCode: boolean,\n env: LexicalEnvironment,\n realm: Realm\n): [ObjectValue, BabelNodeRegExpLiteral, Array<BabelNodeStatement>] {\n let result = RegExpCreate(\n realm,\n new StringValue(realm, ast.pattern),\n ast.flags ? new StringValue(realm, ast.flags) : undefined\n );\n return [result, ast, []];\n}\n"]}
|
||||
19
build/node_modules/prepack/lib/partial-evaluators/ReturnStatement.js
generated
vendored
Normal file
19
build/node_modules/prepack/lib/partial-evaluators/ReturnStatement.js
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
exports.default = function (ast, strictCode, env, realm) {
|
||||
var result = void 0;
|
||||
if (ast.argument) {
|
||||
result = env.evaluateCompletionDeref(ast.argument, strictCode);
|
||||
} else {
|
||||
result = realm.intrinsics.undefined;
|
||||
}
|
||||
if (!(result instanceof _completions.AbruptCompletion)) result = new _completions.ReturnCompletion(result, ast.loc);
|
||||
return [result, ast, []];
|
||||
};
|
||||
|
||||
var _completions = require("../completions.js");
|
||||
//# sourceMappingURL=ReturnStatement.js.map
|
||||
1
build/node_modules/prepack/lib/partial-evaluators/ReturnStatement.js.map
generated
vendored
Normal file
1
build/node_modules/prepack/lib/partial-evaluators/ReturnStatement.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../src/partial-evaluators/ReturnStatement.js"],"names":["ast","strictCode","env","realm","result","argument","evaluateCompletionDeref","intrinsics","undefined","loc"],"mappings":";;;;;;kBAiBe,UACbA,GADa,EAEbC,UAFa,EAGbC,GAHa,EAIbC,KAJa,EAK4D;AACzE,MAAIC,eAAJ;AACA,MAAIJ,IAAIK,QAAR,EAAkB;AAChBD,aAASF,IAAII,uBAAJ,CAA4BN,IAAIK,QAAhC,EAA0CJ,UAA1C,CAAT;AACD,GAFD,MAEO;AACLG,aAASD,MAAMI,UAAN,CAAiBC,SAA1B;AACD;AACD,MAAI,EAAEJ,+CAAF,CAAJ,EAA2CA,SAAS,kCAAqBA,MAArB,EAA6BJ,IAAIS,GAAjC,CAAT;AAC3C,SAAO,CAACL,MAAD,EAASJ,GAAT,EAAc,EAAd,CAAP;AACD,C;;AAhBD","file":"ReturnStatement.js","sourcesContent":["/**\n * Copyright (c) 2017-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\n/* @flow */\n\nimport type { BabelNodeReturnStatement, BabelNodeStatement } from \"babel-types\";\nimport type { Realm } from \"../realm.js\";\nimport type { LexicalEnvironment } from \"../environment.js\";\n\nimport { AbruptCompletion, ReturnCompletion } from \"../completions.js\";\n\nexport default function(\n ast: BabelNodeReturnStatement,\n strictCode: boolean,\n env: LexicalEnvironment,\n realm: Realm\n): [AbruptCompletion, BabelNodeReturnStatement, Array<BabelNodeStatement>] {\n let result;\n if (ast.argument) {\n result = env.evaluateCompletionDeref(ast.argument, strictCode);\n } else {\n result = realm.intrinsics.undefined;\n }\n if (!(result instanceof AbruptCompletion)) result = new ReturnCompletion(result, ast.loc);\n return [result, ast, []];\n}\n"]}
|
||||
15
build/node_modules/prepack/lib/partial-evaluators/SequenceExpression.js
generated
vendored
Normal file
15
build/node_modules/prepack/lib/partial-evaluators/SequenceExpression.js
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
exports.default = function (ast, strictCode, env, realm) {
|
||||
var result = env.evaluateCompletionDeref(ast, strictCode);
|
||||
return [result, ast, []];
|
||||
};
|
||||
|
||||
var _completions = require("../completions.js");
|
||||
|
||||
var _index = require("../values/index.js");
|
||||
//# sourceMappingURL=SequenceExpression.js.map
|
||||
1
build/node_modules/prepack/lib/partial-evaluators/SequenceExpression.js.map
generated
vendored
Normal file
1
build/node_modules/prepack/lib/partial-evaluators/SequenceExpression.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../src/partial-evaluators/SequenceExpression.js"],"names":["ast","strictCode","env","realm","result","evaluateCompletionDeref"],"mappings":";;;;;;kBAkBe,UACbA,GADa,EAEbC,UAFa,EAGbC,GAHa,EAIbC,KAJa,EAKuE;AACpF,MAAIC,SAASF,IAAIG,uBAAJ,CAA4BL,GAA5B,EAAiCC,UAAjC,CAAb;AACA,SAAO,CAACG,MAAD,EAASJ,GAAT,EAAc,EAAd,CAAP;AACD,C;;AAXD;;AACA","file":"SequenceExpression.js","sourcesContent":["/**\n * Copyright (c) 2017-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\n/* @flow */\n\nimport type { BabelNodeSequenceExpression, BabelNodeStatement } from \"babel-types\";\nimport type { LexicalEnvironment } from \"../environment.js\";\nimport type { Realm } from \"../realm.js\";\n\nimport { AbruptCompletion } from \"../completions.js\";\nimport { Value } from \"../values/index.js\";\n\nexport default function(\n ast: BabelNodeSequenceExpression,\n strictCode: boolean,\n env: LexicalEnvironment,\n realm: Realm\n): [AbruptCompletion | Value, BabelNodeSequenceExpression, Array<BabelNodeStatement>] {\n let result = env.evaluateCompletionDeref(ast, strictCode);\n return [result, ast, []];\n}\n"]}
|
||||
13
build/node_modules/prepack/lib/partial-evaluators/StringLiteral.js
generated
vendored
Normal file
13
build/node_modules/prepack/lib/partial-evaluators/StringLiteral.js
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
exports.default = function (ast, strictCode, env, realm) {
|
||||
var result = new _index.StringValue(realm, ast.value);
|
||||
return [result, ast, []];
|
||||
};
|
||||
|
||||
var _index = require("../values/index.js");
|
||||
//# sourceMappingURL=StringLiteral.js.map
|
||||
1
build/node_modules/prepack/lib/partial-evaluators/StringLiteral.js.map
generated
vendored
Normal file
1
build/node_modules/prepack/lib/partial-evaluators/StringLiteral.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../src/partial-evaluators/StringLiteral.js"],"names":["ast","strictCode","env","realm","result","value"],"mappings":";;;;;;kBAiBe,UACbA,GADa,EAEbC,UAFa,EAGbC,GAHa,EAIbC,KAJa,EAKqD;AAClE,MAAIC,SAAS,uBAAgBD,KAAhB,EAAuBH,IAAIK,KAA3B,CAAb;AACA,SAAO,CAACD,MAAD,EAASJ,GAAT,EAAc,EAAd,CAAP;AACD,C;;AAVD","file":"StringLiteral.js","sourcesContent":["/**\n * Copyright (c) 2017-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\n/* @flow */\n\nimport type { BabelNodeStringLiteral, BabelNodeStatement } from \"babel-types\";\nimport type { LexicalEnvironment } from \"../environment.js\";\nimport type { Realm } from \"../realm.js\";\n\nimport { StringValue } from \"../values/index.js\";\n\nexport default function(\n ast: BabelNodeStringLiteral,\n strictCode: boolean,\n env: LexicalEnvironment,\n realm: Realm\n): [StringValue, BabelNodeStringLiteral, Array<BabelNodeStatement>] {\n let result = new StringValue(realm, ast.value);\n return [result, ast, []];\n}\n"]}
|
||||
15
build/node_modules/prepack/lib/partial-evaluators/SwitchStatement.js
generated
vendored
Normal file
15
build/node_modules/prepack/lib/partial-evaluators/SwitchStatement.js
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
exports.default = function (ast, strictCode, env, realm, labelSet) {
|
||||
var result = env.evaluateCompletionDeref(ast, strictCode);
|
||||
return [result, ast, []];
|
||||
};
|
||||
|
||||
var _completions = require("../completions.js");
|
||||
|
||||
var _index = require("../values/index.js");
|
||||
//# sourceMappingURL=SwitchStatement.js.map
|
||||
1
build/node_modules/prepack/lib/partial-evaluators/SwitchStatement.js.map
generated
vendored
Normal file
1
build/node_modules/prepack/lib/partial-evaluators/SwitchStatement.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../src/partial-evaluators/SwitchStatement.js"],"names":["ast","strictCode","env","realm","labelSet","result","evaluateCompletionDeref"],"mappings":";;;;;;kBAmBe,UACbA,GADa,EAEbC,UAFa,EAGbC,GAHa,EAIbC,KAJa,EAKbC,QALa,EAMoE;AACjF,MAAIC,SAASH,IAAII,uBAAJ,CAA4BN,GAA5B,EAAiCC,UAAjC,CAAb;AACA,SAAO,CAACI,MAAD,EAASL,GAAT,EAAc,EAAd,CAAP;AACD,C;;AAbD;;AACA","file":"SwitchStatement.js","sourcesContent":["/**\n * Copyright (c) 2017-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\n/* @flow */\n\nimport type { BabelNodeSwitchStatement, BabelNodeStatement } from \"babel-types\";\nimport type { LexicalEnvironment } from \"../environment.js\";\nimport type { Realm } from \"../realm.js\";\n\nimport { AbruptCompletion } from \"../completions.js\";\nimport { Value } from \"../values/index.js\";\n\n// 13.12.11\nexport default function(\n ast: BabelNodeSwitchStatement,\n strictCode: boolean,\n env: LexicalEnvironment,\n realm: Realm,\n labelSet: Array<string>\n): [AbruptCompletion | Value, BabelNodeSwitchStatement, Array<BabelNodeStatement>] {\n let result = env.evaluateCompletionDeref(ast, strictCode);\n return [result, ast, []];\n}\n"]}
|
||||
15
build/node_modules/prepack/lib/partial-evaluators/TaggedTemplateExpression.js
generated
vendored
Normal file
15
build/node_modules/prepack/lib/partial-evaluators/TaggedTemplateExpression.js
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
exports.default = function (ast, strictCode, env, realm) {
|
||||
var result = env.evaluateCompletionDeref(ast, strictCode);
|
||||
return [result, ast, []];
|
||||
};
|
||||
|
||||
var _completions = require("../completions.js");
|
||||
|
||||
var _index = require("../values/index.js");
|
||||
//# sourceMappingURL=TaggedTemplateExpression.js.map
|
||||
1
build/node_modules/prepack/lib/partial-evaluators/TaggedTemplateExpression.js.map
generated
vendored
Normal file
1
build/node_modules/prepack/lib/partial-evaluators/TaggedTemplateExpression.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../src/partial-evaluators/TaggedTemplateExpression.js"],"names":["ast","strictCode","env","realm","result","evaluateCompletionDeref"],"mappings":";;;;;;kBAmBe,UACbA,GADa,EAEbC,UAFa,EAGbC,GAHa,EAIbC,KAJa,EAK6E;AAC1F,MAAIC,SAASF,IAAIG,uBAAJ,CAA4BL,GAA5B,EAAiCC,UAAjC,CAAb;AACA,SAAO,CAACG,MAAD,EAASJ,GAAT,EAAc,EAAd,CAAP;AACD,C;;AAZD;;AACA","file":"TaggedTemplateExpression.js","sourcesContent":["/**\n * Copyright (c) 2017-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\n/* @flow */\n\nimport type { BabelNodeTaggedTemplateExpression, BabelNodeStatement } from \"babel-types\";\nimport type { LexicalEnvironment } from \"../environment.js\";\nimport type { Realm } from \"../realm.js\";\n\nimport { AbruptCompletion } from \"../completions.js\";\nimport { Value } from \"../values/index.js\";\n\n// ECMA262 12.3.7\nexport default function(\n ast: BabelNodeTaggedTemplateExpression,\n strictCode: boolean,\n env: LexicalEnvironment,\n realm: Realm\n): [AbruptCompletion | Value, BabelNodeTaggedTemplateExpression, Array<BabelNodeStatement>] {\n let result = env.evaluateCompletionDeref(ast, strictCode);\n return [result, ast, []];\n}\n"]}
|
||||
15
build/node_modules/prepack/lib/partial-evaluators/TemplateLiteral.js
generated
vendored
Normal file
15
build/node_modules/prepack/lib/partial-evaluators/TemplateLiteral.js
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
exports.default = function (ast, strictCode, env, realm) {
|
||||
var result = env.evaluateCompletionDeref(ast, strictCode);
|
||||
return [result, ast, []];
|
||||
};
|
||||
|
||||
var _completions = require("../completions.js");
|
||||
|
||||
var _index = require("../values/index.js");
|
||||
//# sourceMappingURL=TemplateLiteral.js.map
|
||||
1
build/node_modules/prepack/lib/partial-evaluators/TemplateLiteral.js.map
generated
vendored
Normal file
1
build/node_modules/prepack/lib/partial-evaluators/TemplateLiteral.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../src/partial-evaluators/TemplateLiteral.js"],"names":["ast","strictCode","env","realm","result","evaluateCompletionDeref"],"mappings":";;;;;;kBAmBe,UACbA,GADa,EAEbC,UAFa,EAGbC,GAHa,EAIbC,KAJa,EAKoE;AACjF,MAAIC,SAASF,IAAIG,uBAAJ,CAA4BL,GAA5B,EAAiCC,UAAjC,CAAb;AACA,SAAO,CAACG,MAAD,EAASJ,GAAT,EAAc,EAAd,CAAP;AACD,C;;AAZD;;AACA","file":"TemplateLiteral.js","sourcesContent":["/**\n * Copyright (c) 2017-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\n/* @flow */\n\nimport type { BabelNodeTemplateLiteral, BabelNodeStatement } from \"babel-types\";\nimport type { LexicalEnvironment } from \"../environment.js\";\nimport type { Realm } from \"../realm.js\";\n\nimport { AbruptCompletion } from \"../completions.js\";\nimport { Value } from \"../values/index.js\";\n\n// ECMA262 12.2.9\nexport default function(\n ast: BabelNodeTemplateLiteral,\n strictCode: boolean,\n env: LexicalEnvironment,\n realm: Realm\n): [AbruptCompletion | Value, BabelNodeTemplateLiteral, Array<BabelNodeStatement>] {\n let result = env.evaluateCompletionDeref(ast, strictCode);\n return [result, ast, []];\n}\n"]}
|
||||
15
build/node_modules/prepack/lib/partial-evaluators/ThisExpression.js
generated
vendored
Normal file
15
build/node_modules/prepack/lib/partial-evaluators/ThisExpression.js
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
exports.default = function (ast, strictCode, env, realm) {
|
||||
var result = env.evaluateCompletionDeref(ast, strictCode);
|
||||
return [result, ast, []];
|
||||
};
|
||||
|
||||
var _completions = require("../completions.js");
|
||||
|
||||
var _index = require("../values/index.js");
|
||||
//# sourceMappingURL=ThisExpression.js.map
|
||||
1
build/node_modules/prepack/lib/partial-evaluators/ThisExpression.js.map
generated
vendored
Normal file
1
build/node_modules/prepack/lib/partial-evaluators/ThisExpression.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../src/partial-evaluators/ThisExpression.js"],"names":["ast","strictCode","env","realm","result","evaluateCompletionDeref"],"mappings":";;;;;;kBAmBe,UACbA,GADa,EAEbC,UAFa,EAGbC,GAHa,EAIbC,KAJa,EAKmE;AAChF,MAAIC,SAASF,IAAIG,uBAAJ,CAA4BL,GAA5B,EAAiCC,UAAjC,CAAb;AACA,SAAO,CAACG,MAAD,EAASJ,GAAT,EAAc,EAAd,CAAP;AACD,C;;AAZD;;AACA","file":"ThisExpression.js","sourcesContent":["/**\n * Copyright (c) 2017-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\n/* @flow */\n\nimport type { BabelNodeThisExpression, BabelNodeStatement } from \"babel-types\";\nimport type { LexicalEnvironment } from \"../environment.js\";\nimport type { Realm } from \"../realm.js\";\n\nimport { AbruptCompletion } from \"../completions.js\";\nimport { Value } from \"../values/index.js\";\n\n// ECMA262 12.2.2.1\nexport default function(\n ast: BabelNodeThisExpression,\n strictCode: boolean,\n env: LexicalEnvironment,\n realm: Realm\n): [AbruptCompletion | Value, BabelNodeThisExpression, Array<BabelNodeStatement>] {\n let result = env.evaluateCompletionDeref(ast, strictCode);\n return [result, ast, []];\n}\n"]}
|
||||
15
build/node_modules/prepack/lib/partial-evaluators/ThrowStatement.js
generated
vendored
Normal file
15
build/node_modules/prepack/lib/partial-evaluators/ThrowStatement.js
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
exports.default = function (ast, strictCode, env, realm) {
|
||||
var result = env.evaluateCompletionDeref(ast, strictCode);
|
||||
return [result, ast, []];
|
||||
};
|
||||
|
||||
var _completions = require("../completions.js");
|
||||
|
||||
var _index = require("../values/index.js");
|
||||
//# sourceMappingURL=ThrowStatement.js.map
|
||||
1
build/node_modules/prepack/lib/partial-evaluators/ThrowStatement.js.map
generated
vendored
Normal file
1
build/node_modules/prepack/lib/partial-evaluators/ThrowStatement.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../src/partial-evaluators/ThrowStatement.js"],"names":["ast","strictCode","env","realm","result","evaluateCompletionDeref"],"mappings":";;;;;;kBAkBe,UACbA,GADa,EAEbC,UAFa,EAGbC,GAHa,EAIbC,KAJa,EAKmE;AAChF,MAAIC,SAASF,IAAIG,uBAAJ,CAA4BL,GAA5B,EAAiCC,UAAjC,CAAb;AACA,SAAO,CAACG,MAAD,EAASJ,GAAT,EAAc,EAAd,CAAP;AACD,C;;AAXD;;AACA","file":"ThrowStatement.js","sourcesContent":["/**\n * Copyright (c) 2017-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\n/* @flow */\n\nimport type { BabelNodeThrowStatement, BabelNodeStatement } from \"babel-types\";\nimport type { LexicalEnvironment } from \"../environment.js\";\nimport type { Realm } from \"../realm.js\";\n\nimport { AbruptCompletion } from \"../completions.js\";\nimport { Value } from \"../values/index.js\";\n\nexport default function(\n ast: BabelNodeThrowStatement,\n strictCode: boolean,\n env: LexicalEnvironment,\n realm: Realm\n): [AbruptCompletion | Value, BabelNodeThrowStatement, Array<BabelNodeStatement>] {\n let result = env.evaluateCompletionDeref(ast, strictCode);\n return [result, ast, []];\n}\n"]}
|
||||
15
build/node_modules/prepack/lib/partial-evaluators/TryStatement.js
generated
vendored
Normal file
15
build/node_modules/prepack/lib/partial-evaluators/TryStatement.js
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
exports.default = function (ast, strictCode, env, realm) {
|
||||
var result = env.evaluateCompletionDeref(ast, strictCode);
|
||||
return [result, ast, []];
|
||||
};
|
||||
|
||||
var _completions = require("../completions.js");
|
||||
|
||||
var _index = require("../values/index.js");
|
||||
//# sourceMappingURL=TryStatement.js.map
|
||||
1
build/node_modules/prepack/lib/partial-evaluators/TryStatement.js.map
generated
vendored
Normal file
1
build/node_modules/prepack/lib/partial-evaluators/TryStatement.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../src/partial-evaluators/TryStatement.js"],"names":["ast","strictCode","env","realm","result","evaluateCompletionDeref"],"mappings":";;;;;;kBAkBe,UACbA,GADa,EAEbC,UAFa,EAGbC,GAHa,EAIbC,KAJa,EAKiE;AAC9E,MAAIC,SAASF,IAAIG,uBAAJ,CAA4BL,GAA5B,EAAiCC,UAAjC,CAAb;AACA,SAAO,CAACG,MAAD,EAASJ,GAAT,EAAc,EAAd,CAAP;AACD,C;;AAXD;;AACA","file":"TryStatement.js","sourcesContent":["/**\n * Copyright (c) 2017-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\n/* @flow */\n\nimport type { BabelNodeTryStatement, BabelNodeStatement } from \"babel-types\";\nimport type { LexicalEnvironment } from \"../environment.js\";\nimport type { Realm } from \"../realm.js\";\n\nimport { AbruptCompletion } from \"../completions.js\";\nimport { Value } from \"../values/index.js\";\n\nexport default function(\n ast: BabelNodeTryStatement,\n strictCode: boolean,\n env: LexicalEnvironment,\n realm: Realm\n): [AbruptCompletion | Value, BabelNodeTryStatement, Array<BabelNodeStatement>] {\n let result = env.evaluateCompletionDeref(ast, strictCode);\n return [result, ast, []];\n}\n"]}
|
||||
15
build/node_modules/prepack/lib/partial-evaluators/UnaryExpression.js
generated
vendored
Normal file
15
build/node_modules/prepack/lib/partial-evaluators/UnaryExpression.js
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
exports.default = function (ast, strictCode, env, realm) {
|
||||
var result = env.evaluateCompletionDeref(ast, strictCode);
|
||||
return [result, ast, []];
|
||||
};
|
||||
|
||||
var _completions = require("../completions.js");
|
||||
|
||||
var _index = require("../values/index.js");
|
||||
//# sourceMappingURL=UnaryExpression.js.map
|
||||
1
build/node_modules/prepack/lib/partial-evaluators/UnaryExpression.js.map
generated
vendored
Normal file
1
build/node_modules/prepack/lib/partial-evaluators/UnaryExpression.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../src/partial-evaluators/UnaryExpression.js"],"names":["ast","strictCode","env","realm","result","evaluateCompletionDeref"],"mappings":";;;;;;kBAkBe,UACbA,GADa,EAEbC,UAFa,EAGbC,GAHa,EAIbC,KAJa,EAKoE;AACjF,MAAIC,SAASF,IAAIG,uBAAJ,CAA4BL,GAA5B,EAAiCC,UAAjC,CAAb;AACA,SAAO,CAACG,MAAD,EAASJ,GAAT,EAAc,EAAd,CAAP;AACD,C;;AAXD;;AACA","file":"UnaryExpression.js","sourcesContent":["/**\n * Copyright (c) 2017-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\n/* @flow */\n\nimport type { BabelNodeUnaryExpression, BabelNodeStatement } from \"babel-types\";\nimport type { LexicalEnvironment } from \"../environment.js\";\nimport type { Realm } from \"../realm.js\";\n\nimport { AbruptCompletion } from \"../completions.js\";\nimport { Value } from \"../values/index.js\";\n\nexport default function(\n ast: BabelNodeUnaryExpression,\n strictCode: boolean,\n env: LexicalEnvironment,\n realm: Realm\n): [AbruptCompletion | Value, BabelNodeUnaryExpression, Array<BabelNodeStatement>] {\n let result = env.evaluateCompletionDeref(ast, strictCode);\n return [result, ast, []];\n}\n"]}
|
||||
15
build/node_modules/prepack/lib/partial-evaluators/UpdateExpression.js
generated
vendored
Normal file
15
build/node_modules/prepack/lib/partial-evaluators/UpdateExpression.js
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
exports.default = function (ast, strictCode, env, realm) {
|
||||
var result = env.evaluateCompletionDeref(ast, strictCode);
|
||||
return [result, ast, []];
|
||||
};
|
||||
|
||||
var _completions = require("../completions.js");
|
||||
|
||||
var _index = require("../values/index.js");
|
||||
//# sourceMappingURL=UpdateExpression.js.map
|
||||
1
build/node_modules/prepack/lib/partial-evaluators/UpdateExpression.js.map
generated
vendored
Normal file
1
build/node_modules/prepack/lib/partial-evaluators/UpdateExpression.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../src/partial-evaluators/UpdateExpression.js"],"names":["ast","strictCode","env","realm","result","evaluateCompletionDeref"],"mappings":";;;;;;kBAkBe,UACbA,GADa,EAEbC,UAFa,EAGbC,GAHa,EAIbC,KAJa,EAKqE;AAClF,MAAIC,SAASF,IAAIG,uBAAJ,CAA4BL,GAA5B,EAAiCC,UAAjC,CAAb;AACA,SAAO,CAACG,MAAD,EAASJ,GAAT,EAAc,EAAd,CAAP;AACD,C;;AAXD;;AACA","file":"UpdateExpression.js","sourcesContent":["/**\n * Copyright (c) 2017-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\n/* @flow */\n\nimport type { BabelNodeUpdateExpression, BabelNodeStatement } from \"babel-types\";\nimport type { LexicalEnvironment } from \"../environment.js\";\nimport type { Realm } from \"../realm.js\";\n\nimport { AbruptCompletion } from \"../completions.js\";\nimport { Value } from \"../values/index.js\";\n\nexport default function(\n ast: BabelNodeUpdateExpression,\n strictCode: boolean,\n env: LexicalEnvironment,\n realm: Realm\n): [AbruptCompletion | Value, BabelNodeUpdateExpression, Array<BabelNodeStatement>] {\n let result = env.evaluateCompletionDeref(ast, strictCode);\n return [result, ast, []];\n}\n"]}
|
||||
15
build/node_modules/prepack/lib/partial-evaluators/VariableDeclaration.js
generated
vendored
Normal file
15
build/node_modules/prepack/lib/partial-evaluators/VariableDeclaration.js
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
exports.default = function (ast, strictCode, env, realm) {
|
||||
var result = env.evaluateCompletionDeref(ast, strictCode);
|
||||
return [result, ast, []];
|
||||
};
|
||||
|
||||
var _completions = require("../completions.js");
|
||||
|
||||
var _index = require("../values/index.js");
|
||||
//# sourceMappingURL=VariableDeclaration.js.map
|
||||
1
build/node_modules/prepack/lib/partial-evaluators/VariableDeclaration.js.map
generated
vendored
Normal file
1
build/node_modules/prepack/lib/partial-evaluators/VariableDeclaration.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../src/partial-evaluators/VariableDeclaration.js"],"names":["ast","strictCode","env","realm","result","evaluateCompletionDeref"],"mappings":";;;;;;kBAmBe,UACbA,GADa,EAEbC,UAFa,EAGbC,GAHa,EAIbC,KAJa,EAKwE;AACrF,MAAIC,SAASF,IAAIG,uBAAJ,CAA4BL,GAA5B,EAAiCC,UAAjC,CAAb;AACA,SAAO,CAACG,MAAD,EAASJ,GAAT,EAAc,EAAd,CAAP;AACD,C;;AAZD;;AACA","file":"VariableDeclaration.js","sourcesContent":["/**\n * Copyright (c) 2017-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\n/* @flow */\n\nimport type { BabelNodeVariableDeclaration, BabelNodeStatement } from \"babel-types\";\nimport type { LexicalEnvironment } from \"../environment.js\";\nimport type { Realm } from \"../realm.js\";\n\nimport { AbruptCompletion } from \"../completions.js\";\nimport { Value } from \"../values/index.js\";\n\n// ECMA262 13.3.2.4\nexport default function(\n ast: BabelNodeVariableDeclaration,\n strictCode: boolean,\n env: LexicalEnvironment,\n realm: Realm\n): [AbruptCompletion | Value, BabelNodeVariableDeclaration, Array<BabelNodeStatement>] {\n let result = env.evaluateCompletionDeref(ast, strictCode);\n return [result, ast, []];\n}\n"]}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user