New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

walt-compiler

Package Overview
Dependencies
Maintainers
1
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

walt-compiler - npm Package Compare versions

Comparing version 0.8.2 to 0.8.3

3

package.json
{
"name": "walt-compiler",
"version": "0.8.2",
"version": "0.8.3",
"description": "Alternative syntax for WebAssembly text format",

@@ -19,2 +19,3 @@ "main": "dist/walt.js",

"precommit": "lint-staged",
"preversion": "npm run build && npm run build-prod",
"nyc": "nyc"

@@ -21,0 +22,0 @@ },

@@ -7,2 +7,16 @@ // @flow

const alignCodes = {
load8_s: 0,
load8_u: 0,
store8: 0,
load16_s: 1,
load16_u: 1,
store16: 1,
store32: 2,
load32_s: 2,
load32_u: 2,
store: 2,
load: 2,
};
const generateNative: GeneratorType = (node, parent) => {

@@ -12,20 +26,7 @@ const block = node.params.map(mapSyntax(parent)).reduce(mergeBlock, []);

const operation = node.value.split(".").pop();
if (operation === "clz") {
if (alignCodes[operation] == null) {
block.push({ kind: textMap[node.value], params: [] });
} else {
const alignment = (() => {
switch (operation) {
case "load8_s":
case "load8_u":
case "store8":
return 0;
case "load16_s":
case "load16_u":
case "store16":
return 1;
// "store32" as well
default:
return 2;
}
})();
const alignment = alignCodes[operation];

@@ -32,0 +33,0 @@ const params = [alignment, 0];

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

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