mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 20:27:34 +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
|
@ -1,41 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) 2020, Andreas Kling <kling@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <LibJS/Runtime/Object.h>
|
||||
|
||||
namespace JS {
|
||||
|
||||
struct Variable {
|
||||
Value value;
|
||||
DeclarationKind declaration_kind;
|
||||
};
|
||||
|
||||
class ScopeObject : public Object {
|
||||
JS_OBJECT(ScopeObject, Object);
|
||||
|
||||
public:
|
||||
virtual Optional<Variable> get_from_scope(const FlyString&) const = 0;
|
||||
virtual void put_to_scope(const FlyString&, Variable) = 0;
|
||||
virtual bool delete_from_scope(FlyString const&) = 0;
|
||||
virtual bool has_this_binding() const = 0;
|
||||
virtual Value get_this_binding(GlobalObject&) const = 0;
|
||||
|
||||
ScopeObject* parent() { return m_parent; }
|
||||
const ScopeObject* parent() const { return m_parent; }
|
||||
|
||||
protected:
|
||||
explicit ScopeObject(ScopeObject* parent);
|
||||
explicit ScopeObject(GlobalObjectTag);
|
||||
|
||||
virtual void visit_edges(Visitor&) override;
|
||||
|
||||
private:
|
||||
ScopeObject* m_parent { nullptr };
|
||||
};
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue