Socket
Socket
Sign inDemoInstall

@webassemblyjs/wasm-gen

Package Overview
Dependencies
Maintainers
1
Versions
84
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@webassemblyjs/wasm-gen - npm Package Compare versions

Comparing version 1.1.2-y.4 to 1.1.2-y.5

15

lib/encoder/index.js

@@ -20,2 +20,3 @@ "use strict";

exports.encodeTypeInstruction = encodeTypeInstruction;
exports.encodeInstr = encodeInstr;

@@ -224,2 +225,16 @@ var _helperWasmBytecode = _interopRequireDefault(require("@webassemblyjs/helper-wasm-bytecode"));

return out;
} // FIXME(sven): find a better way for doing that
function encodeInstr(n) {
switch (n.id) {
case "get_global":
return [0x23].concat(_toConsumableArray(encodeU32(n.args[0].value)));
case "set_global":
return [0x24].concat(_toConsumableArray(encodeU32(n.args[0].value)));
default:
throw new Error("encodeInstr: unknown instruction " + JSON.stringify(n.id));
}
}

3

lib/index.js

@@ -34,2 +34,5 @@ "use strict";

case "Instr":
return encoder.encodeInstr(n);
case "ModuleExport":

@@ -36,0 +39,0 @@ // $FlowIgnore: SectionMetadata ensure that the node is well formated

8

package.json
{
"name": "@webassemblyjs/wasm-gen",
"version": "1.1.2-y.4",
"version": "1.1.2-y.5",
"description": "",

@@ -19,6 +19,6 @@ "main": "lib/index.js",

"dependencies": {
"@webassemblyjs/ast": "1.1.2-y.4",
"@webassemblyjs/helper-leb128": "1.1.2-y.4",
"@webassemblyjs/helper-wasm-bytecode": "1.1.2-y.4"
"@webassemblyjs/ast": "1.1.2-y.5",
"@webassemblyjs/helper-leb128": "1.1.2-y.5",
"@webassemblyjs/helper-wasm-bytecode": "1.1.2-y.5"
}
}

@@ -222,1 +222,15 @@ // @flow

}
// FIXME(sven): find a better way for doing that
export function encodeInstr(n: Instruction) {
switch (n.id) {
case "get_global":
return [0x23, ...encodeU32(n.args[0].value)];
case "set_global":
return [0x24, ...encodeU32(n.args[0].value)];
default:
throw new Error(
"encodeInstr: unknown instruction " + JSON.stringify(n.id)
);
}
}

@@ -26,2 +26,5 @@ // @flow

case "Instr":
return encoder.encodeInstr(n);
case "ModuleExport":

@@ -28,0 +31,0 @@ // $FlowIgnore: SectionMetadata ensure that the node is well formated

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