mirror of
https://github.com/RGBCube/serenity
synced 2025-05-20 11:45:06 +00:00
LibJS: Add bytecode ops for &, | and ^
This commit is contained in:
parent
4be3374b24
commit
ae763f1ade
4 changed files with 100 additions and 1 deletions
|
@ -79,6 +79,15 @@ Optional<Bytecode::Register> BinaryExpression::generate_bytecode(Bytecode::Gener
|
|||
case BinaryOp::AbstractEquals:
|
||||
generator.emit<Bytecode::Op::AbstractEquals>(dst_reg, *lhs_reg, *rhs_reg);
|
||||
return dst_reg;
|
||||
case BinaryOp::BitwiseAnd:
|
||||
generator.emit<Bytecode::Op::BitwiseAnd>(dst_reg, *lhs_reg, *rhs_reg);
|
||||
return dst_reg;
|
||||
case BinaryOp::BitwiseOr:
|
||||
generator.emit<Bytecode::Op::BitwiseOr>(dst_reg, *lhs_reg, *rhs_reg);
|
||||
return dst_reg;
|
||||
case BinaryOp::BitwiseXor:
|
||||
generator.emit<Bytecode::Op::BitwiseXor>(dst_reg, *lhs_reg, *rhs_reg);
|
||||
return dst_reg;
|
||||
default:
|
||||
TODO();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue