UNPKG

prepack

Version:

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

93 lines (68 loc) 1.89 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.PathConditions = exports.SourceFileCollection = exports.ElementSize = void 0; var _index = require("./values/index.js"); var _completions = require("./completions.js"); var _environment = require("./environment.js"); var _errors = require("./errors.js"); var _invariant = _interopRequireDefault(require("./invariant.js")); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /** * 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. */ const ElementSize = { Float32: 4, Float64: 8, Int8: 1, Int16: 2, Int32: 4, Uint8: 1, Uint16: 2, Uint32: 4, Uint8Clamped: 1 }; exports.ElementSize = ElementSize; class SourceFileCollection { constructor(sourceFiles) { this._sourceFiles = sourceFiles; } toArray() { (0, _invariant.default)(this._sourceFiles !== undefined); return this._sourceFiles; } destroy() { this._sourceFiles = undefined; } } exports.SourceFileCollection = SourceFileCollection; class PathConditions { add(c) {} // this => val. A false value does not imply that !(this => val). implies(e, depth = 0) { return false; } // this => !val. A false value does not imply that !(this => !val). impliesNot(e, depth = 0) { return false; } isEmpty() { return false; } isReadOnly() { return false; } getLength() { return 0; } getAssumedConditions() { return new Set(); } refineBaseConditons(realm, depth = 0) {} } exports.PathConditions = PathConditions; //# sourceMappingURL=types.js.map