mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-02-22 23:55:12 +00:00
LibJS: Add bytecode instructions for modulo and exponentiation
This commit is contained in:
committed by
Andreas Kling
parent
6af9d87258
commit
55f0791b13
@@ -55,6 +55,12 @@ Optional<Bytecode::Register> BinaryExpression::generate_bytecode(Bytecode::Gener
|
||||
case BinaryOp::Division:
|
||||
generator.emit<Bytecode::Op::Div>(dst_reg, *lhs_reg, *rhs_reg);
|
||||
return dst_reg;
|
||||
case BinaryOp::Modulo:
|
||||
generator.emit<Bytecode::Op::Mod>(dst_reg, *lhs_reg, *rhs_reg);
|
||||
return dst_reg;
|
||||
case BinaryOp::Exponentiation:
|
||||
generator.emit<Bytecode::Op::Exp>(dst_reg, *lhs_reg, *rhs_reg);
|
||||
return dst_reg;
|
||||
case BinaryOp::LessThan:
|
||||
generator.emit<Bytecode::Op::LessThan>(dst_reg, *lhs_reg, *rhs_reg);
|
||||
return dst_reg;
|
||||
|
||||
Reference in New Issue
Block a user