webassemblyjs
Advanced tools
Comparing version 1.2.6 to 1.2.7
@@ -11,4 +11,6 @@ "use strict"; | ||
var _validation = _interopRequireDefault(require("../validation")); | ||
var _denormalizeTypeReferences = require("@webassemblyjs/ast/lib/transform/denormalize-type-references"); | ||
var _validation = _interopRequireDefault(require("@webassemblyjs/validation")); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
@@ -40,2 +42,3 @@ | ||
(0, _denormalizeTypeReferences.transform)(ast); | ||
(0, _wastIdentifierToIndex.transform)(ast); | ||
@@ -42,0 +45,0 @@ (0, _validation.default)(ast); |
@@ -1014,2 +1014,3 @@ "use strict"; | ||
case "i32": | ||
case "u32": | ||
pushResult(i32.createValueFromArrayBuffer(_memory.buffer, _ptr, extend, signed)); | ||
@@ -1029,2 +1030,5 @@ break; | ||
break; | ||
default: | ||
throw new _errors.RuntimeError("Unsupported " + _object + " load"); | ||
} | ||
@@ -1031,0 +1035,0 @@ |
@@ -8,6 +8,4 @@ "use strict"; | ||
var _isConst = require("../../../compiler/validation/is-const"); | ||
var _validation = require("@webassemblyjs/validation"); | ||
var _typeInference = require("../../../compiler/validation/type-inference"); | ||
var _require = require("../../partial-evaluation"), | ||
@@ -25,3 +23,3 @@ evaluate = _require.evaluate; | ||
if (node.init.length > 0 && (0, _isConst.isConst)(node.init) === false) { | ||
if (node.init.length > 0 && (0, _validation.isConst)(node.init) === false) { | ||
throw new CompileError("constant expression required"); | ||
@@ -38,5 +36,5 @@ } // None or multiple constant expressions in the initializer seems not possible | ||
var resultInferedType = (0, _typeInference.getType)(node.init); | ||
var resultInferedType = (0, _validation.getType)(node.init); | ||
if (resultInferedType != null && (0, _typeInference.typeEq)([node.globalType.valtype], resultInferedType) === false) { | ||
if (resultInferedType != null && (0, _validation.typeEq)([node.globalType.valtype], resultInferedType) === false) { | ||
throw new CompileError("type mismatch"); | ||
@@ -43,0 +41,0 @@ } |
{ | ||
"name": "webassemblyjs", | ||
"version": "1.2.6", | ||
"version": "1.2.7", | ||
"keywords": [ | ||
@@ -21,9 +21,10 @@ "webassembly", | ||
"dependencies": { | ||
"@webassemblyjs/ast": "1.2.6", | ||
"@webassemblyjs/wasm-parser": "1.2.6", | ||
"@webassemblyjs/wast-parser": "1.2.6", | ||
"@webassemblyjs/ast": "1.2.7", | ||
"@webassemblyjs/validation": "1.2.7", | ||
"@webassemblyjs/wasm-parser": "1.2.7", | ||
"@webassemblyjs/wast-parser": "1.2.7", | ||
"long": "^3.2.0" | ||
}, | ||
"devDependencies": { | ||
"@webassemblyjs/floating-point-hex-parser": "1.2.6" | ||
"@webassemblyjs/floating-point-hex-parser": "1.2.7" | ||
}, | ||
@@ -30,0 +31,0 @@ "repository": { |
// @flow | ||
import { transform } from "@webassemblyjs/ast/lib/transform/wast-identifier-to-index"; | ||
import { transform as wastIdentifierToIndex } from "@webassemblyjs/ast/lib/transform/wast-identifier-to-index"; | ||
import { transform as denormalizeTypeReferences } from "@webassemblyjs/ast/lib/transform/denormalize-type-references"; | ||
const t = require("@webassemblyjs/ast"); | ||
import validateAST from "../validation"; | ||
import validateAST from "@webassemblyjs/validation"; | ||
const { CompileError } = require("../../errors"); | ||
@@ -39,3 +40,4 @@ | ||
// semantics during execution | ||
transform(ast); | ||
denormalizeTypeReferences(ast); | ||
wastIdentifierToIndex(ast); | ||
@@ -42,0 +44,0 @@ validateAST(ast); |
@@ -1011,2 +1011,3 @@ // @flow | ||
case "i32": | ||
case "u32": | ||
pushResult( | ||
@@ -1037,2 +1038,5 @@ i32.createValueFromArrayBuffer( | ||
break; | ||
default: | ||
throw new RuntimeError("Unsupported " + object + " load"); | ||
} | ||
@@ -1039,0 +1043,0 @@ |
// @flow | ||
import { isConst } from "../../../compiler/validation/is-const"; | ||
import { getType, typeEq } from "../../../compiler/validation/type-inference"; | ||
import { isConst, getType, typeEq } from "@webassemblyjs/validation"; | ||
@@ -6,0 +5,0 @@ const { evaluate } = require("../../partial-evaluation"); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
229949
5
56
6560
+ Added@webassemblyjs/ast@1.2.7(transitive)
+ Added@webassemblyjs/floating-point-hex-parser@1.2.7(transitive)
+ Added@webassemblyjs/helper-code-frame@1.2.7(transitive)
+ Added@webassemblyjs/helper-fsm@1.2.7(transitive)
+ Added@webassemblyjs/helper-wasm-bytecode@1.2.7(transitive)
+ Added@webassemblyjs/leb128@1.2.7(transitive)
+ Added@webassemblyjs/validation@1.2.7(transitive)
+ Added@webassemblyjs/wasm-parser@1.2.7(transitive)
+ Added@webassemblyjs/wast-parser@1.2.7(transitive)
+ Added@webassemblyjs/wast-printer@1.2.7(transitive)
- Removed@webassemblyjs/ast@1.2.6(transitive)
- Removed@webassemblyjs/floating-point-hex-parser@1.2.6(transitive)
- Removed@webassemblyjs/helper-code-frame@1.2.6(transitive)
- Removed@webassemblyjs/helper-fsm@1.2.6(transitive)
- Removed@webassemblyjs/helper-wasm-bytecode@1.2.6(transitive)
- Removed@webassemblyjs/leb128@1.2.6(transitive)
- Removed@webassemblyjs/wasm-parser@1.2.6(transitive)
- Removed@webassemblyjs/wast-parser@1.2.6(transitive)
- Removed@webassemblyjs/wast-printer@1.2.6(transitive)
Updated@webassemblyjs/ast@1.2.7