@webassemblyjs/helper-module-context
Advanced tools
Comparing version 1.7.1-0 to 1.7.1
@@ -8,6 +8,2 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
// TODO(sven): add flow in here | ||
import { assert } from "mamacro"; | ||
var debug = require("debug")("webassemblyjs:modulecontext"); | ||
export function moduleContextFromModuleAST(m) { | ||
@@ -130,3 +126,2 @@ var moduleContext = new ModuleContext(); | ||
value: function newContext(debugName, expectedResult) { | ||
debug("new context %s", debugName); | ||
this.locals = []; | ||
@@ -156,3 +151,2 @@ this.labels = [expectedResult]; | ||
}); | ||
debug("add new function %s -> %s", args.join(" "), result.join(" ")); | ||
this.funcs.push({ | ||
@@ -177,3 +171,2 @@ args: args, | ||
}); | ||
debug("add new imported function %s -> %s", args.join(" "), result.join(" ")); | ||
this.funcs.unshift({ | ||
@@ -219,3 +212,2 @@ args: args, | ||
value: function addLabel(result) { | ||
debug("add label"); | ||
this.labels.unshift(result); | ||
@@ -255,3 +247,2 @@ } | ||
value: function addLocal(type) { | ||
debug("add local t=%s index=%d", type, this.locals.length); | ||
this.locals.push(type); | ||
@@ -258,0 +249,0 @@ } |
@@ -9,4 +9,2 @@ "use strict"; | ||
var _mamacro = require("mamacro"); | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
@@ -18,4 +16,3 @@ | ||
var debug = require("debug")("webassemblyjs:modulecontext"); | ||
// TODO(sven): add flow in here | ||
function moduleContextFromModuleAST(m) { | ||
@@ -139,3 +136,2 @@ var moduleContext = new ModuleContext(); | ||
value: function newContext(debugName, expectedResult) { | ||
debug("new context %s", debugName); | ||
this.locals = []; | ||
@@ -165,3 +161,2 @@ this.labels = [expectedResult]; | ||
}); | ||
debug("add new function %s -> %s", args.join(" "), result.join(" ")); | ||
this.funcs.push({ | ||
@@ -186,3 +181,2 @@ args: args, | ||
}); | ||
debug("add new imported function %s -> %s", args.join(" "), result.join(" ")); | ||
this.funcs.unshift({ | ||
@@ -228,3 +222,2 @@ args: args, | ||
value: function addLabel(result) { | ||
debug("add label"); | ||
this.labels.unshift(result); | ||
@@ -264,3 +257,2 @@ } | ||
value: function addLocal(type) { | ||
debug("add local t=%s index=%d", type, this.locals.length); | ||
this.locals.push(type); | ||
@@ -267,0 +259,0 @@ } |
{ | ||
"name": "@webassemblyjs/helper-module-context", | ||
"version": "1.7.1-0", | ||
"version": "1.7.1", | ||
"description": "", | ||
@@ -15,7 +15,6 @@ "main": "lib/index.js", | ||
"dependencies": { | ||
"debug": "^3.1.0", | ||
"mamacro": "^0.0.3" | ||
}, | ||
"devDependencies": { | ||
"@webassemblyjs/wast-parser": "1.7.1-0" | ||
"@webassemblyjs/wast-parser": "1.7.1" | ||
}, | ||
@@ -22,0 +21,0 @@ "publishConfig": { |
@@ -5,4 +5,2 @@ // TODO(sven): add flow in here | ||
const debug = require("debug")("webassemblyjs:modulecontext"); | ||
export function moduleContextFromModuleAST(m) { | ||
@@ -108,4 +106,2 @@ const moduleContext = new ModuleContext(); | ||
newContext(debugName, expectedResult) { | ||
debug("new context %s", debugName); | ||
this.locals = []; | ||
@@ -126,4 +122,2 @@ this.labels = [expectedResult]; | ||
debug("add new function %s -> %s", args.join(" "), result.join(" ")); | ||
this.funcs.push({ args, result }); | ||
@@ -141,8 +135,2 @@ | ||
debug( | ||
"add new imported function %s -> %s", | ||
args.join(" "), | ||
result.join(" ") | ||
); | ||
this.funcs.unshift({ args, result }); | ||
@@ -178,4 +166,2 @@ | ||
addLabel(result) { | ||
debug("add label"); | ||
this.labels.unshift(result); | ||
@@ -208,4 +194,2 @@ } | ||
addLocal(type) { | ||
debug("add local t=%s index=%d", type, this.locals.length); | ||
this.locals.push(type); | ||
@@ -212,0 +196,0 @@ } |
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
1
2
22496
803
- Removeddebug@^3.1.0
- Removeddebug@3.2.7(transitive)
- Removedms@2.1.3(transitive)