Skip to content

Commit

Permalink
update wasabi and adjust to the api change
Browse files Browse the repository at this point in the history
  • Loading branch information
doehyunbaek committed Nov 27, 2023
1 parent 5dd0051 commit b6a77c7
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/benchmark.cts
Original file line number Diff line number Diff line change
Expand Up @@ -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
})
Expand All @@ -85,4 +85,4 @@ export default class Benchmark {
getPerformance() {
return this.performanceTrace
}
}
}
4 changes: 2 additions & 2 deletions src/runtime.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -86,4 +86,4 @@ function setup() {
return WebAssembly.instantiate(body, obj);
}
}
setup()
setup()
2 changes: 1 addition & 1 deletion tests/run-tests.cts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ async function runNodeTest(name: string): Promise<TestReport> {
// 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
Expand Down

0 comments on commit b6a77c7

Please sign in to comment.