mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 08:17:35 +00:00
LibJS: Start implementing spec-compliant variable bindings
This patch adds the concept of variable bindings to the various environment record classes. The bindings are not yet hooked up to anything, this is just fleshing out all the operations. Most of this is following the spec exactly, but in a few cases we are missing the requisite abstract operations to do the exact right thing. I've added FIXME's in those cases where I noticed it.
This commit is contained in:
parent
2822da8c8f
commit
9d49a5478a
8 changed files with 360 additions and 4 deletions
|
@ -20,6 +20,14 @@ public:
|
|||
virtual void put_into_environment_record(FlyString const&, Variable) override;
|
||||
virtual bool delete_from_environment_record(FlyString const&) override;
|
||||
|
||||
virtual bool has_binding(FlyString const& name) const override;
|
||||
virtual void create_mutable_binding(GlobalObject&, FlyString const& name, bool can_be_deleted) override;
|
||||
virtual void create_immutable_binding(GlobalObject&, FlyString const& name, bool strict) override;
|
||||
virtual void initialize_binding(GlobalObject&, FlyString const& name, Value) override;
|
||||
virtual void set_mutable_binding(GlobalObject&, FlyString const& name, Value, bool strict) override;
|
||||
virtual Value get_binding_value(GlobalObject&, FlyString const& name, bool strict) override;
|
||||
virtual bool delete_binding(GlobalObject&, FlyString const& name) override;
|
||||
|
||||
Object& object() { return m_object; }
|
||||
|
||||
private:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue