1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-29 01:22:11 +00:00

LibJS: Add support for typed equality checks

This commit is contained in:
Ryan Chandler 2021-06-07 19:39:47 +01:00 committed by Andreas Kling
parent 9e69ffc1b1
commit 18ac7fde12
4 changed files with 66 additions and 0 deletions

View file

@ -84,6 +84,12 @@ 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::TypedInequals:
generator.emit<Bytecode::Op::TypedInequals>(dst_reg, *lhs_reg, *rhs_reg);
return dst_reg;
case BinaryOp::TypedEquals:
generator.emit<Bytecode::Op::TypedEquals>(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;