1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 14:17:36 +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

@ -260,6 +260,44 @@ private:
Register m_src2;
};
class TypedInequals final : public Instruction {
public:
TypedInequals(Register dst, Register src1, Register src2)
: Instruction(Type::TypedInequals)
, 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 TypedEquals final : public Instruction {
public:
TypedEquals(Register dst, Register src1, Register src2)
: Instruction(Type::TypedEquals)
, 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 BitwiseAnd final : public Instruction {
public:
BitwiseAnd(Register dst, Register src1, Register src2)