Skip to content

Commit

Permalink
feat(codegen): use label instead of offset in control flow
Browse files Browse the repository at this point in the history
  • Loading branch information
clearloop committed Nov 27, 2024
1 parent 6ecb29e commit 3b5c033
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion codegen/src/visitor/control.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ impl Function {
tracing::trace!("select");
self.masm._iszero()?;
self.masm.increment_sp(1)?;
self.table.offset(self.masm.pc_offset(), 4);
self.table
.label(self.masm.pc_offset(), self.masm.pc_offset() + 4);
self.masm._jumpi()?;
self.masm._drop()?;
self.masm._jumpdest()?;
Expand Down

0 comments on commit 3b5c033

Please sign in to comment.