1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 05:37:43 +00:00

LibJS: Add bytecode generation for BinaryOp::InstanceOf

This commit is contained in:
Linus Groh 2021-06-07 21:18:19 +01:00
parent 5e996de8c6
commit 9c0d83d11d
4 changed files with 35 additions and 2 deletions

View file

@ -449,6 +449,25 @@ private:
Register m_src2;
};
class InstanceOf final : public Instruction {
public:
InstanceOf(Register dst, Register src1, Register src2)
: Instruction(Type::InstanceOf)
, 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)