1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-16 10:24:59 +00:00

LibJS: Add bytecode ops for >, >= and <=

This commit is contained in:
Gunnar Beutner 2021-06-07 19:57:38 +02:00 committed by Andreas Kling
parent 73b8acf432
commit 4be3374b24
4 changed files with 99 additions and 0 deletions

View file

@ -61,9 +61,18 @@ Optional<Bytecode::Register> BinaryExpression::generate_bytecode(Bytecode::Gener
case BinaryOp::Exponentiation:
generator.emit<Bytecode::Op::Exp>(dst_reg, *lhs_reg, *rhs_reg);
return dst_reg;
case BinaryOp::GreaterThan:
generator.emit<Bytecode::Op::GreaterThan>(dst_reg, *lhs_reg, *rhs_reg);
return dst_reg;
case BinaryOp::GreaterThanEquals:
generator.emit<Bytecode::Op::GreaterThanEquals>(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;
case BinaryOp::LessThanEquals:
generator.emit<Bytecode::Op::LessThanEquals>(dst_reg, *lhs_reg, *rhs_reg);
return dst_reg;
case BinaryOp::AbstractInequals:
generator.emit<Bytecode::Op::AbstractInequals>(dst_reg, *lhs_reg, *rhs_reg);
return dst_reg;