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

LibJS/Bytecode: Support in binary operator for private fields

11 new passes on test262. :^)
This commit is contained in:
Andreas Kling 2023-07-05 12:42:50 +02:00
parent e4b6c402cb
commit e87d84f883
4 changed files with 44 additions and 0 deletions

View file

@ -558,6 +558,23 @@ private:
IdentifierTableIndex m_property;
};
class HasPrivateId final : public Instruction {
public:
explicit HasPrivateId(IdentifierTableIndex property)
: Instruction(Type::HasPrivateId)
, m_property(property)
{
}
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
void replace_references_impl(BasicBlock const&, BasicBlock const&) { }
void replace_references_impl(Register, Register) { }
private:
IdentifierTableIndex m_property;
};
enum class PropertyKind {
Getter,
Setter,