Socket
Socket
Sign inDemoInstall

@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.8.0 to 1.8.1

31

esm/index.js

@@ -20,4 +20,11 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

moduleContext.setStart(field.index);
break;
}
case "TypeInstruction":
{
moduleContext.addType(field);
break;
}
case "Func":

@@ -90,2 +97,3 @@ {

this.funcsOffsetByIdentifier = [];
this.types = [];
this.globals = [];

@@ -247,2 +255,25 @@ this.globalsOffsetByIdentifier = [];

/**
* Types
*/
}, {
key: "addType",
value: function addType(type) {
if (!(type.functype.type === "Signature")) {
throw new Error('type.functype.type === "Signature"' + " error: " + (undefined || "unknown"));
}
this.types.push(type.functype);
}
}, {
key: "hasType",
value: function hasType(index) {
return this.types[index] !== undefined;
}
}, {
key: "getType",
value: function getType(index) {
return this.types[index];
}
/**
* Globals

@@ -249,0 +280,0 @@ */

@@ -28,4 +28,11 @@ "use strict";

moduleContext.setStart(field.index);
break;
}
case "TypeInstruction":
{
moduleContext.addType(field);
break;
}
case "Func":

@@ -99,2 +106,3 @@ {

this.funcsOffsetByIdentifier = [];
this.types = [];
this.globals = [];

@@ -256,2 +264,25 @@ this.globalsOffsetByIdentifier = [];

/**
* Types
*/
}, {
key: "addType",
value: function addType(type) {
if (!(type.functype.type === "Signature")) {
throw new Error('type.functype.type === "Signature"' + " error: " + (undefined || "unknown"));
}
this.types.push(type.functype);
}
}, {
key: "hasType",
value: function hasType(index) {
return this.types[index] !== undefined;
}
}, {
key: "getType",
value: function getType(index) {
return this.types[index];
}
/**
* Globals

@@ -258,0 +289,0 @@ */

6

package.json
{
"name": "@webassemblyjs/helper-module-context",
"version": "1.8.0",
"version": "1.8.1",
"description": "",

@@ -15,3 +15,3 @@ "main": "lib/index.js",

"devDependencies": {
"@webassemblyjs/wast-parser": "1.8.0",
"@webassemblyjs/wast-parser": "1.8.1",
"mamacro": "^0.0.3"

@@ -24,3 +24,3 @@ },

"license": "MIT",
"gitHead": "8b2d1afa793ea81f20ec63416134c201e39694eb"
"gitHead": "a2f42245e9b597e3541e0f697253449d60fc4d79"
}

@@ -14,3 +14,8 @@ // TODO(sven): add flow in here

moduleContext.setStart(field.index);
break;
}
case "TypeInstruction": {
moduleContext.addType(field);
break;
}
case "Func": {

@@ -76,2 +81,4 @@ moduleContext.addFunction(field);

this.types = [];
this.globals = [];

@@ -198,2 +205,18 @@ this.globalsOffsetByIdentifier = [];

/**
* Types
*/
addType(type) {
assert(type.functype.type === "Signature");
this.types.push(type.functype);
}
hasType(index) {
return this.types[index] !== undefined;
}
getType(index) {
return this.types[index];
}
/**
* Globals

@@ -200,0 +223,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