LibJS: Add <<, >> and >>> assignment operators

This commit is contained in:
Ryan Chandler 2021-06-07 20:21:15 +01:00 committed by Andreas Kling
parent 1e10965e61
commit 6612e026ba
Notes: sideshowbarker 2024-07-18 12:40:39 +09:00

View file

@ -223,6 +223,15 @@ Optional<Bytecode::Register> AssignmentExpression::generate_bytecode(Bytecode::G
case AssignmentOp::BitwiseXorAssignment:
generator.emit<Bytecode::Op::BitwiseXor>(dst_reg, *lhs_reg, *rhs_reg);
break;
case AssignmentOp::LeftShiftAssignment:
generator.emit<Bytecode::Op::LeftShift>(dst_reg, *lhs_reg, *rhs_reg);
break;
case AssignmentOp::RightShiftAssignment:
generator.emit<Bytecode::Op::RightShift>(dst_reg, *lhs_reg, *rhs_reg);
break;
case AssignmentOp::UnsignedRightShiftAssignment:
generator.emit<Bytecode::Op::UnsignedRightShift>(dst_reg, *lhs_reg, *rhs_reg);
break;
default:
TODO();
}