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

@webassemblyjs/wasm-parser

Package Overview
Dependencies
Maintainers
1
Versions
89
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@webassemblyjs/wasm-parser - npm Package Compare versions

Comparing version 1.5.0 to 1.5.1

37

lib/decoder.js

@@ -371,3 +371,3 @@ "use strict";

var id = t.identifier("".concat(moduleName.value, ".").concat(name.value));
var id = t.numberLiteral(i);
importDescr = t.funcImportDescr(id, t.signature(signature.params, signature.result));

@@ -1362,5 +1362,19 @@ state.functionsInModule.push({

var _startPosition10 = getPosition();
var _numberOfElementsu2 = readU32();
var _numberOfElements2 = _numberOfElementsu2.value;
eatBytes(_numberOfElementsu2.nextIndex);
var _endPosition9 = getPosition();
_metadata11.vectorOfSize = t.withLoc(t.numberLiteral(_numberOfElements2), _endPosition9, _startPosition10);
if (opts.ignoreDataSection === true) {
eatBytes(sectionSizeInBytes); // eat the entire section
var _remainingBytes = // $FlowIgnore
sectionSizeInBytes - _numberOfElements2.nextIndex;
eatBytes(_remainingBytes); // eat the entire section
dumpSep("ignore data (" + sectionSizeInBytes + " bytes)");

@@ -1372,13 +1386,2 @@ return {

} else {
var _startPosition10 = getPosition();
var _numberOfElementsu2 = readU32();
var _numberOfElements2 = _numberOfElementsu2.value;
eatBytes(_numberOfElementsu2.nextIndex);
var _endPosition9 = getPosition();
_metadata11.vectorOfSize = t.withLoc(t.numberLiteral(_numberOfElements2), _endPosition9, _startPosition10);
var _nodes11 = parseDataSection(_numberOfElements2);

@@ -1403,12 +1406,12 @@

var _remainingBytes = sectionSizeInBytes - sectionName.nextIndex;
var _remainingBytes2 = sectionSizeInBytes - sectionName.nextIndex;
if (sectionName.value === "name") {
_metadata12.push.apply(_metadata12, _toConsumableArray(parseNameSection(_remainingBytes)));
_metadata12.push.apply(_metadata12, _toConsumableArray(parseNameSection(_remainingBytes2)));
} else {
// We don't parse the custom section
eatBytes(_remainingBytes - 1
eatBytes(_remainingBytes2 - 1
/* UTF8 vector size */
);
dumpSep("ignore custom " + JSON.stringify(sectionName.value) + " section (" + _remainingBytes + " bytes)");
dumpSep("ignore custom " + JSON.stringify(sectionName.value) + " section (" + _remainingBytes2 + " bytes)");
}

@@ -1415,0 +1418,0 @@

@@ -92,4 +92,31 @@ "use strict";

}),
ModuleImport: function (_ModuleImport) {
function ModuleImport(_x3) {
return _ModuleImport.apply(this, arguments);
}
ModuleImport.toString = function () {
return _ModuleImport.toString();
};
return ModuleImport;
}(function (_ref4) {
var node = _ref4.node;
if (node.descr.type === "FuncImportDescr") {
// $FlowIgnore
var nodeName = node.descr.id;
var index = nodeName.value;
var functionName = functionNames.find(function (f) {
return f.index === index;
});
if (functionName) {
// $FlowIgnore
node.descr.id = t.identifier(functionName.name);
}
}
}),
CallInstruction: function (_CallInstruction) {
function CallInstruction(_x3) {
function CallInstruction(_x4) {
return _CallInstruction.apply(this, arguments);

@@ -122,4 +149,4 @@ }

t.traverse(ast, {
LocalNameMetadata: function LocalNameMetadata(_ref4) {
var node = _ref4.node;
LocalNameMetadata: function LocalNameMetadata(_ref5) {
var node = _ref5.node;
localNames.push({

@@ -139,3 +166,3 @@ name: node.value,

Func: function (_Func2) {
function Func(_x4) {
function Func(_x5) {
return _Func2.apply(this, arguments);

@@ -149,4 +176,4 @@ }

return Func;
}(function (_ref5) {
var node = _ref5.node;
}(function (_ref6) {
var node = _ref6.node;
var signature = node.signature;

@@ -178,3 +205,3 @@

ModuleNameMetadata: function (_ModuleNameMetadata) {
function ModuleNameMetadata(_x5) {
function ModuleNameMetadata(_x6) {
return _ModuleNameMetadata.apply(this, arguments);

@@ -192,3 +219,3 @@ }

Module: function (_Module) {
function Module(_x6) {
function Module(_x7) {
return _Module.apply(this, arguments);

@@ -202,4 +229,4 @@ }

return Module;
}(function (_ref6) {
var node = _ref6.node;
}(function (_ref7) {
var node = _ref7.node;
node.id = moduleNameMetadataPath.node.value;

@@ -206,0 +233,0 @@ })

{
"name": "@webassemblyjs/wasm-parser",
"version": "1.5.0",
"version": "1.5.1",
"keywords": [

@@ -19,7 +19,7 @@ "webassembly",

"dependencies": {
"@webassemblyjs/ast": "1.5.0",
"@webassemblyjs/helper-wasm-bytecode": "1.5.0",
"@webassemblyjs/leb128": "1.5.0",
"@webassemblyjs/wasm-parser": "1.5.0",
"webassemblyjs": "1.5.0"
"@webassemblyjs/ast": "1.5.1",
"@webassemblyjs/helper-wasm-bytecode": "1.5.1",
"@webassemblyjs/leb128": "1.5.1",
"@webassemblyjs/wasm-parser": "1.5.1",
"webassemblyjs": "1.5.1"
},

@@ -34,6 +34,6 @@ "repository": {

"devDependencies": {
"@webassemblyjs/helper-test-framework": "1.5.0",
"@webassemblyjs/wast-parser": "1.5.0",
"@webassemblyjs/helper-test-framework": "1.5.1",
"@webassemblyjs/wast-parser": "1.5.1",
"wabt": "^1.0.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