wasmparser
Advanced tools
Comparing version 2.2.5 to 3.0.0
@@ -0,1 +1,22 @@ | ||
# [3.0.0](https://github.com/wasdk/wasmparser/compare/v2.2.5...v3.0.0) (2020-06-24) | ||
* revert!: add option to truncate disassembly ([2eb0025](https://github.com/wasdk/wasmparser/commit/2eb002523493efbe286f3661696fa8f4fd31d402)), closes [#30](https://github.com/wasdk/wasmparser/issues/30) | ||
### BREAKING CHANGES | ||
* dropping the `WasmDisassembler#maxLines` | ||
feature that was introduced earlier. | ||
The `WasmDisassembler#maxLines` feature doesn't interact well | ||
with the chunked disassembly machinery, in particular the | ||
logic in `getResult()` to avoid breaking def-use chains for | ||
labels didn't play well with the `maxLines` feature at all | ||
(it would remove `;; -- text is truncated due to size --` | ||
marker when the line limit was reached). | ||
Since there's already support for chunked disassembly built | ||
into wasmparser by design, that should be used instead. | ||
## [2.2.5](https://github.com/wasdk/wasmparser/compare/v2.2.4...v2.2.5) (2020-06-23) | ||
@@ -2,0 +23,0 @@ |
@@ -86,3 +86,2 @@ import { BinaryReader } from "./WasmParser.js"; | ||
private _labelMode; | ||
private _maxLines; | ||
private _functionBodyOffsets; | ||
@@ -103,3 +102,2 @@ private _currentFunctionBodyOffset; | ||
set nameResolver(resolver: INameResolver); | ||
set maxLines(value: number); | ||
private appendBuffer; | ||
@@ -106,0 +104,0 @@ private newLine; |
@@ -86,3 +86,2 @@ import { BinaryReader } from "./WasmParser.js"; | ||
private _labelMode; | ||
private _maxLines; | ||
private _functionBodyOffsets; | ||
@@ -103,3 +102,2 @@ private _currentFunctionBodyOffset; | ||
set nameResolver(resolver: INameResolver); | ||
set maxLines(value: number); | ||
private appendBuffer; | ||
@@ -106,0 +104,0 @@ private newLine; |
@@ -373,3 +373,2 @@ /* Copyright 2016 Mozilla Foundation | ||
this._labelIndex = 0; | ||
this._maxLines = 0; | ||
} | ||
@@ -416,5 +415,2 @@ get addOffsets() { | ||
} | ||
set maxLines(value) { | ||
this._maxLines = value; | ||
} | ||
appendBuffer(s) { | ||
@@ -833,7 +829,2 @@ this._buffer += s; | ||
while (true) { | ||
if (this._maxLines && this._lines.length >= this._maxLines) { | ||
this.appendBuffer(";; -- text is truncated due to size --"); | ||
this.newLine(); | ||
return true; | ||
} | ||
this._currentPosition = reader.position + offsetInModule; | ||
@@ -840,0 +831,0 @@ if (!reader.read()) |
{ | ||
"name": "wasmparser", | ||
"version": "2.2.5", | ||
"version": "3.0.0", | ||
"description": "Binary WebAssembly file parser.", | ||
@@ -5,0 +5,0 @@ "main": "dist/cjs/index.js", |
@@ -490,3 +490,2 @@ /* Copyright 2016 Mozilla Foundation | ||
private _labelMode: LabelMode; | ||
private _maxLines: number; | ||
private _functionBodyOffsets: Array<IFunctionBodyOffset>; | ||
@@ -523,3 +522,2 @@ private _currentFunctionBodyOffset: IFunctionBodyOffset; | ||
this._labelIndex = 0; | ||
this._maxLines = 0; | ||
} | ||
@@ -566,5 +564,2 @@ public get addOffsets() { | ||
} | ||
public set maxLines(value: number) { | ||
this._maxLines = value; | ||
} | ||
private appendBuffer(s: string) { | ||
@@ -1011,7 +1006,2 @@ this._buffer += s; | ||
while (true) { | ||
if (this._maxLines && this._lines.length >= this._maxLines) { | ||
this.appendBuffer(";; -- text is truncated due to size --"); | ||
this.newLine(); | ||
return true; | ||
} | ||
this._currentPosition = reader.position + offsetInModule; | ||
@@ -1018,0 +1008,0 @@ if (!reader.read()) return false; |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
979425
19092