Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@webassemblyjs/helper-module-context

Package Overview
Dependencies
Maintainers
1
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@webassemblyjs/helper-module-context - npm Package Compare versions

Comparing version 1.7.1-0 to 1.7.1

9

esm/index.js

@@ -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 @@ }

10

lib/index.js

@@ -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 @@ }

5

package.json
{
"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 @@ }

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc