mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 02:17:35 +00:00
LibJS: Rename Environment Records so they match the spec :^)
This patch makes the following name changes: - ScopeObject => EnvironmentRecord - LexicalEnvironment => DeclarativeEnvironmentRecord - WithScope => ObjectEnvironmentRecord
This commit is contained in:
parent
e9b4a0a830
commit
6c6dbcfc36
35 changed files with 297 additions and 297 deletions
31
Userland/Libraries/LibJS/Runtime/ObjectEnvironmentRecord.h
Normal file
31
Userland/Libraries/LibJS/Runtime/ObjectEnvironmentRecord.h
Normal file
|
@ -0,0 +1,31 @@
|
|||
/*
|
||||
* Copyright (c) 2020-2021, Andreas Kling <kling@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <LibJS/Runtime/EnvironmentRecord.h>
|
||||
|
||||
namespace JS {
|
||||
|
||||
class ObjectEnvironmentRecord : public EnvironmentRecord {
|
||||
JS_OBJECT(ObjectEnvironmentRecord, EnvironmentRecord);
|
||||
|
||||
public:
|
||||
ObjectEnvironmentRecord(Object&, EnvironmentRecord* parent_scope);
|
||||
|
||||
virtual Optional<Variable> get_from_scope(const FlyString&) const override;
|
||||
virtual void put_to_scope(const FlyString&, Variable) override;
|
||||
virtual bool delete_from_scope(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;
|
||||
|
||||
Object& m_object;
|
||||
};
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue