summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Chandler <ryangjchandler@gmail.com>2021-06-07 20:21:15 +0100
committerAndreas Kling <kling@serenityos.org>2021-06-07 21:23:11 +0200
commit6612e026ba5657357bd1e15ad76b5d150e3cdcad (patch)
tree84bdd40a3198124d2d1799299db63444ca39b095
parent1e10965e61234f54b42ff8eefe91808dff9291e6 (diff)
downloadserenity-6612e026ba5657357bd1e15ad76b5d150e3cdcad.zip
LibJS: Add <<, >> and >>> assignment operators
-rw-r--r--Userland/Libraries/LibJS/Bytecode/ASTCodegen.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/Userland/Libraries/LibJS/Bytecode/ASTCodegen.cpp b/Userland/Libraries/LibJS/Bytecode/ASTCodegen.cpp
index 4a1a00c0db..48a8633f9b 100644
--- a/Userland/Libraries/LibJS/Bytecode/ASTCodegen.cpp
+++ b/Userland/Libraries/LibJS/Bytecode/ASTCodegen.cpp
@@ -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();
}