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:
parent
9e69ffc1b1
commit
18ac7fde12
4 changed files with 66 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue