소스 검색

LibJS: Remove unused FunctionObject::environment()

ECMAScriptFunctionObject::environment() can just be non-virtual.
Linus Groh 3 년 전
부모
커밋
2dba048146
2개의 변경된 파일1개의 추가작업 그리고 6개의 파일을 삭제
  1. 1 1
      Userland/Libraries/LibJS/Runtime/ECMAScriptFunctionObject.h
  2. 0 5
      Userland/Libraries/LibJS/Runtime/FunctionObject.h

+ 1 - 1
Userland/Libraries/LibJS/Runtime/ECMAScriptFunctionObject.h

@@ -47,7 +47,7 @@ public:
 
     auto& bytecode_executable() const { return m_bytecode_executable; }
 
-    virtual Environment* environment() override { return m_environment; }
+    Environment* environment() { return m_environment; }
     virtual Realm* realm() const override { return m_realm; }
 
     ConstructorKind constructor_kind() const { return m_constructor_kind; };

+ 0 - 5
Userland/Libraries/LibJS/Runtime/FunctionObject.h

@@ -27,11 +27,6 @@ public:
 
     virtual bool is_strict_mode() const { return false; }
 
-    // [[Environment]]
-    // The Environment Record that the function was closed over.
-    // Used as the outer environment when evaluating the code of the function.
-    virtual Environment* environment() { return nullptr; }
-
     // [[Realm]]
     virtual Realm* realm() const { return nullptr; }