Skip to content

Commit a9587a2

Browse files
Remove register write-back at the next inst dispatch
1 parent 1e633f7 commit a9587a2

File tree

3 files changed

+593
-397
lines changed

3 files changed

+593
-397
lines changed

Sources/WasmKit/Execution/Runtime/ExecutionState.swift

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -246,9 +246,8 @@ extension ExecutionState {
246246
mutating func runDirectThreaded(
247247
sp: Sp, pc: Pc, md: Md, ms: Ms
248248
) throws {
249-
let handler = pc.withMemoryRebound(to: wasmkit_tc_exec.self, capacity: 1) {
250-
$0.pointee
251-
}
249+
var pc = pc
250+
let handler = pc.read(wasmkit_tc_exec.self)
252251
wasmkit_tc_start(handler, sp, pc, md, ms, &self)
253252
if let error = self.trap {
254253
throw unsafeBitCast(error, to: Error.self)

0 commit comments

Comments
 (0)