Skip to content

Commit

Permalink
feat(rust-xir): support bit-and
Browse files Browse the repository at this point in the history
  • Loading branch information
Ray Redondo committed Jan 22, 2024
1 parent da59bf9 commit fdd8846
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions rust/src/irgen/xir_visitor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2592,6 +2592,16 @@ impl<'a> Drop for XirBinaryExprVisitor<'a> {
ir::OverflowBehaviour::Wrap,
)));
}
Some(BinaryOp::BitAnd) => {
*self.stack_height -= 1;
self.body
.block
.items
.push(ir::BlockItem::Expr(ir::Expr::BinaryOp(
ir::BinaryOp::BitAnd,
ir::OverflowBehaviour::Wrap,
)));
}
Some(BinaryOp::Less) => {
*self.stack_height -= 1;
self.body
Expand Down

0 comments on commit fdd8846

Please sign in to comment.