Skip to content

Commit

Permalink
Reduce some code duplication
Browse files Browse the repository at this point in the history
  • Loading branch information
alexcrichton committed Dec 12, 2024
1 parent 005a174 commit 6834f54
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions crates/wasmtime/src/runtime/vm/interpreter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,15 +141,7 @@ impl InterpreterRef<'_> {
s.set_jit_trap(regs, None, trap);
}
None => {
let result = s.test_if_trap(
TrapRegisters {
pc: pc.as_ptr() as usize,
fp: self.0[XReg::fp].get_ptr::<u8>() as usize,
},
None,
|_| false,
);
match result {
match s.test_if_trap(regs, None, |_| false) {
// This shouldn't be possible, so this is a fatal error
// if it happens.
TrapTest::NotWasm => {
Expand Down

0 comments on commit 6834f54

Please sign in to comment.