From b6a77c753324d4221540173711e733207dcfe1b9 Mon Sep 17 00:00:00 2001 From: Doehyun Baek Date: Mon, 27 Nov 2023 11:25:35 +0900 Subject: [PATCH] update wasabi and adjust to the api change --- src/benchmark.cts | 4 ++-- src/runtime.js | 4 ++-- tests/run-tests.cts | 2 +- wasabi | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/benchmark.cts b/src/benchmark.cts index e977f313..9ad5319c 100644 --- a/src/benchmark.cts +++ b/src/benchmark.cts @@ -72,7 +72,7 @@ export default class Benchmark { instrumentBinaries(): WasabiRuntime[] { return this.record.map((r, i) => { - const { instrumented, js } = instrument_wasm({ original: r.binary }) + const { instrumented, js } = instrument_wasm(r.binary) this.record[i].binary = instrumented return js }) @@ -85,4 +85,4 @@ export default class Benchmark { getPerformance() { return this.performanceTrace } -} \ No newline at end of file +} diff --git a/src/runtime.js b/src/runtime.js index dc5d9c85..c1fa7e03 100644 --- a/src/runtime.js +++ b/src/runtime.js @@ -64,7 +64,7 @@ function setup() { printWelcome() self.originalWasmBuffer.push(Array.from(new Uint8Array(buffer))) const p_instrumenting = performanceEvent(`instrumentation of wasm binary ${this_i}`) - const { instrumented, js } = instrument_wasm({ original: new Uint8Array(buffer) }); + const { instrumented, js } = instrument_wasm(new Uint8Array(buffer)); self.performanceList.push(p_instrumenting.stop()) wasabis.push(eval(js + '\nWasabi')) buffer = new Uint8Array(instrumented) @@ -86,4 +86,4 @@ function setup() { return WebAssembly.instantiate(body, obj); } } -setup() \ No newline at end of file +setup() diff --git a/tests/run-tests.cts b/tests/run-tests.cts index 4a8b37b3..f60c8870 100644 --- a/tests/run-tests.cts +++ b/tests/run-tests.cts @@ -67,7 +67,7 @@ async function runNodeTest(name: string): Promise { // const wabtModule = await wabt() // const binary = wabtModule.parseWat(watPath, wat).toBinary({}) const binary = await fs.readFile(wasmPath) - let { instrumented, js } = instrument_wasm({ original: binary }) + let { instrumented, js } = instrument_wasm(binary) await fs.writeFile(wasmPath, Buffer.from(instrumented)) // 2. Execute test and generate trace diff --git a/wasabi b/wasabi index 02f4210f..41442064 160000 --- a/wasabi +++ b/wasabi @@ -1 +1 @@ -Subproject commit 02f4210ffc1daa5efd08b5501c70e99c8d91ebb7 +Subproject commit 414420648de1d3ed2459effb652bd5c6d57e27f0