mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:57:43 +00:00
LibJS: Add bytecode generation for BinaryOp::In
This commit is contained in:
parent
93eae063a1
commit
5e996de8c6
4 changed files with 42 additions and 6 deletions
|
@ -1,5 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2021, Andreas Kling <kling@serenityos.org>
|
||||
* Copyright (c) 2021, Linus Groh <linusg@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
@ -429,6 +430,25 @@ private:
|
|||
Register m_src2;
|
||||
};
|
||||
|
||||
class In final : public Instruction {
|
||||
public:
|
||||
In(Register dst, Register src1, Register src2)
|
||||
: Instruction(Type::In)
|
||||
, m_dst(dst)
|
||||
, m_src1(src1)
|
||||
, m_src2(src2)
|
||||
{
|
||||
}
|
||||
|
||||
void execute(Bytecode::Interpreter&) const;
|
||||
String to_string() const;
|
||||
|
||||
private:
|
||||
Register m_dst;
|
||||
Register m_src1;
|
||||
Register m_src2;
|
||||
};
|
||||
|
||||
class BitwiseNot final : public Instruction {
|
||||
public:
|
||||
BitwiseNot(Register dst, Register src)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue