mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 03:57:44 +00:00
LibJS: Bring function environment records closer to the spec
This patch adds FunctionEnvironmentRecord as a subclass of the existing DeclarativeEnvironmentRecord. Things that are specific to function environment records move into there, simplifying the base. Most of the abstract operations related to function environment records are rewritten to match the spec exactly. I also had to implement GetThisEnvironment() and GetSuperConstructor() to keep tests working after the changes, so that's nice as well. :^)
This commit is contained in:
parent
6ed6434bab
commit
aabd82d508
28 changed files with 228 additions and 159 deletions
|
@ -19,8 +19,6 @@ public:
|
|||
virtual Optional<Variable> get_from_environment_record(FlyString const&) const override;
|
||||
virtual void put_into_environment_record(FlyString const&, Variable) override;
|
||||
virtual bool delete_from_environment_record(FlyString const&) override;
|
||||
virtual bool has_this_binding() const override;
|
||||
virtual Value get_this_binding(GlobalObject&) const override;
|
||||
|
||||
private:
|
||||
virtual void visit_edges(Visitor&) override;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue