@webassemblyjs/ast
Advanced tools
Comparing version 1.2.6 to 1.2.7
@@ -8,2 +8,3 @@ "use strict"; | ||
exports.functionNameMetadata = functionNameMetadata; | ||
exports.localNameMetadata = localNameMetadata; | ||
exports.moduleMetadata = moduleMetadata; | ||
@@ -139,3 +140,12 @@ exports.identifier = identifier; | ||
function moduleMetadata(sections, functionNames) { | ||
function localNameMetadata(value, localIndex, functionIndex) { | ||
return { | ||
type: "LocalNameMetadata", | ||
value: value, | ||
localIndex: localIndex, | ||
functionIndex: functionIndex | ||
}; | ||
} | ||
function moduleMetadata(sections, functionNames, localNames) { | ||
var n = { | ||
@@ -150,2 +160,6 @@ type: "ModuleMetadata", | ||
if (localNames.length) { | ||
n.localNames = localNames; | ||
} | ||
return n; | ||
@@ -152,0 +166,0 @@ } |
@@ -80,2 +80,3 @@ "use strict"; | ||
case "FunctionNameMetadata": | ||
case "LocalNameMetadata": | ||
case "ModuleExport": | ||
@@ -118,2 +119,9 @@ case "Data": | ||
if (typeof n.localNames !== "undefined") { | ||
// $FlowIgnore | ||
n.localNames.forEach(function (x) { | ||
return walk(x, cb, _path2); | ||
}); | ||
} | ||
break; | ||
@@ -120,0 +128,0 @@ } |
{ | ||
"name": "@webassemblyjs/ast", | ||
"version": "1.2.6", | ||
"version": "1.2.7", | ||
"description": "AST utils for webassemblyjs", | ||
@@ -14,4 +14,4 @@ "keywords": [ | ||
"dependencies": { | ||
"@webassemblyjs/wast-parser": "1.2.6", | ||
"webassemblyjs": "1.2.6" | ||
"@webassemblyjs/wast-parser": "1.2.7", | ||
"webassemblyjs": "1.2.7" | ||
}, | ||
@@ -18,0 +18,0 @@ "repository": { |
@@ -47,5 +47,19 @@ // @flow | ||
export function localNameMetadata( | ||
value: string, | ||
localIndex: number, | ||
functionIndex: number | ||
): LocalNameMetadata { | ||
return { | ||
type: "LocalNameMetadata", | ||
value, | ||
localIndex, | ||
functionIndex | ||
}; | ||
} | ||
export function moduleMetadata( | ||
sections: Array<SectionMetadata>, | ||
functionNames: Array<FunctionNameMetadata> | ||
functionNames: Array<FunctionNameMetadata>, | ||
localNames: Array<LocalNameMetadata> | ||
): ModuleMetadata { | ||
@@ -56,6 +70,8 @@ const n: ModuleMetadata = { | ||
}; | ||
if (functionNames.length) { | ||
n.functionNames = functionNames; | ||
} | ||
if (localNames.length) { | ||
n.localNames = localNames; | ||
} | ||
return n; | ||
@@ -62,0 +78,0 @@ } |
@@ -71,2 +71,3 @@ // @flow | ||
case "FunctionNameMetadata": | ||
case "LocalNameMetadata": | ||
case "ModuleExport": | ||
@@ -101,2 +102,7 @@ case "Data": | ||
} | ||
if (typeof n.localNames !== "undefined") { | ||
// $FlowIgnore | ||
n.localNames.forEach(x => walk(x, cb, path)); | ||
} | ||
break; | ||
@@ -103,0 +109,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
71619
16
2508
+ Added@webassemblyjs/floating-point-hex-parser@1.2.7(transitive)
+ Added@webassemblyjs/helper-code-frame@1.2.7(transitive)
+ Added@webassemblyjs/helper-fsm@1.2.7(transitive)
+ Added@webassemblyjs/helper-wasm-bytecode@1.2.7(transitive)
+ Added@webassemblyjs/leb128@1.2.7(transitive)
+ Added@webassemblyjs/validation@1.2.7(transitive)
+ Added@webassemblyjs/wasm-parser@1.2.7(transitive)
+ Added@webassemblyjs/wast-parser@1.2.7(transitive)
+ Added@webassemblyjs/wast-printer@1.2.7(transitive)
+ Addedwebassemblyjs@1.2.7(transitive)
- Removed@webassemblyjs/floating-point-hex-parser@1.2.6(transitive)
- Removed@webassemblyjs/helper-code-frame@1.2.6(transitive)
- Removed@webassemblyjs/helper-fsm@1.2.6(transitive)
- Removed@webassemblyjs/helper-wasm-bytecode@1.2.6(transitive)
- Removed@webassemblyjs/leb128@1.2.6(transitive)
- Removed@webassemblyjs/wasm-parser@1.2.6(transitive)
- Removed@webassemblyjs/wast-parser@1.2.6(transitive)
- Removed@webassemblyjs/wast-printer@1.2.6(transitive)
- Removedwebassemblyjs@1.2.6(transitive)
Updatedwebassemblyjs@1.2.7