Skip to content

Commit

Permalink
feat: emit compressed 0 and 1 constants
Browse files Browse the repository at this point in the history
  • Loading branch information
jac3km4 committed Aug 12, 2024
1 parent dc6bc31 commit 5fb167d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions compiler/src/assembler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,12 @@ impl<'a> Assembler<'a> {
Constant::F64(val) => {
self.emit(Instr::F64Const(val));
}
Constant::I32(0) => {
self.emit(Instr::I32Zero);
}
Constant::I32(1) => {
self.emit(Instr::I32One);
}
Constant::I32(val) => {
self.emit(Instr::I32Const(val));
}
Expand Down

0 comments on commit 5fb167d

Please sign in to comment.