1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 11:37:34 +00:00

LibJS: Remove unused DeclarativeEnvironmentRecord::type()

Nothing was using this, and we now have separate classes for the
different types of environment records instead.
This commit is contained in:
Andreas Kling 2021-06-24 13:28:15 +02:00
parent 0cd65b55bd
commit ce2747692d
3 changed files with 1 additions and 26 deletions

View file

@ -25,18 +25,9 @@ class DeclarativeEnvironmentRecord : public EnvironmentRecord {
JS_ENVIRONMENT_RECORD(DeclarativeEnvironmentRecord, EnvironmentRecord);
public:
enum class EnvironmentRecordType {
Declarative,
Function,
Object,
Module,
};
DeclarativeEnvironmentRecord();
DeclarativeEnvironmentRecord(EnvironmentRecordType);
explicit DeclarativeEnvironmentRecord(EnvironmentRecord* parent_scope);
DeclarativeEnvironmentRecord(HashMap<FlyString, Variable> variables, EnvironmentRecord* parent_scope);
DeclarativeEnvironmentRecord(HashMap<FlyString, Variable> variables, EnvironmentRecord* parent_scope, EnvironmentRecordType);
virtual ~DeclarativeEnvironmentRecord() override;
// ^EnvironmentRecord
@ -46,8 +37,6 @@ public:
HashMap<FlyString, Variable> const& variables() const { return m_variables; }
EnvironmentRecordType type() const { return m_environment_record_type; }
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;
@ -62,7 +51,6 @@ protected:
private:
virtual bool is_declarative_environment_record() const override { return true; }
EnvironmentRecordType m_environment_record_type : 8 { EnvironmentRecordType::Declarative };
HashMap<FlyString, Variable> m_variables;
HashMap<FlyString, Binding> m_bindings;
};