Skip to content

Commit 85eeeb3

Browse files
authored
Add support for local.tee to wasm-bindgen-wasm-interpreter (#3232)
This doesn't solve #2969, since WASI uses plenty of instructions we don't support aside from `local.tee`, but it hopefully might solve [@tv42's issue](#2969 (comment)).
1 parent 8f4c4d8 commit 85eeeb3

File tree

1 file changed

+4
-0
lines changed
  • crates/wasm-interpreter/src

1 file changed

+4
-0
lines changed

crates/wasm-interpreter/src/lib.rs

+4
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,10 @@ impl Frame<'_> {
270270
let val = stack.pop().unwrap();
271271
self.locals.insert(e.local, val);
272272
}
273+
Instr::LocalTee(e) => {
274+
let val = stack.last().unwrap().clone();
275+
self.locals.insert(e.local, val);
276+
}
273277

274278
// Blindly assume all globals are the stack pointer
275279
Instr::GlobalGet(_) => stack.push(self.interp.sp),

0 commit comments

Comments
 (0)