瀏覽代碼

LibJS: Remove unused make_super_property_reference()

This function is no longer used anywhere after we removed AST
interpreter.
Aliaksandr Kalenik 1 年之前
父節點
當前提交
66b7da4fc7

+ 0 - 16
Userland/Libraries/LibJS/Runtime/AbstractOperations.cpp

@@ -501,22 +501,6 @@ Object* get_super_constructor(VM& vm)
     return super_constructor;
     return super_constructor;
 }
 }
 
 
-// 13.3.7.3 MakeSuperPropertyReference ( actualThis, propertyKey, strict ), https://tc39.es/ecma262/#sec-makesuperpropertyreference
-ThrowCompletionOr<Reference> make_super_property_reference(VM& vm, Value actual_this, PropertyKey const& property_key, bool strict)
-{
-    // 1. Let env be GetThisEnvironment().
-    auto& env = verify_cast<FunctionEnvironment>(*get_this_environment(vm));
-
-    // 2. Assert: env.HasSuperBinding() is true.
-    VERIFY(env.has_super_binding());
-
-    // 3. Let baseValue be ? env.GetSuperBase().
-    auto base_value = TRY(env.get_super_base());
-
-    // 4. Return the Reference Record { [[Base]]: baseValue, [[ReferencedName]]: propertyKey, [[Strict]]: strict, [[ThisValue]]: actualThis }.
-    return Reference { base_value, property_key, actual_this, strict };
-}
-
 // 19.2.1.1 PerformEval ( x, strictCaller, direct ), https://tc39.es/ecma262/#sec-performeval
 // 19.2.1.1 PerformEval ( x, strictCaller, direct ), https://tc39.es/ecma262/#sec-performeval
 ThrowCompletionOr<Value> perform_eval(VM& vm, Value x, CallerMode strict_caller, EvalMode direct)
 ThrowCompletionOr<Value> perform_eval(VM& vm, Value x, CallerMode strict_caller, EvalMode direct)
 {
 {

+ 0 - 1
Userland/Libraries/LibJS/Runtime/AbstractOperations.h

@@ -27,7 +27,6 @@ NonnullGCPtr<PrivateEnvironment> new_private_environment(VM& vm, PrivateEnvironm
 NonnullGCPtr<Environment> get_this_environment(VM&);
 NonnullGCPtr<Environment> get_this_environment(VM&);
 bool can_be_held_weakly(Value);
 bool can_be_held_weakly(Value);
 Object* get_super_constructor(VM&);
 Object* get_super_constructor(VM&);
-ThrowCompletionOr<Reference> make_super_property_reference(VM&, Value actual_this, PropertyKey const&, bool strict);
 ThrowCompletionOr<Value> require_object_coercible(VM&, Value);
 ThrowCompletionOr<Value> require_object_coercible(VM&, Value);
 ThrowCompletionOr<Value> call_impl(VM&, Value function, Value this_value, Optional<MarkedVector<Value>> = {});
 ThrowCompletionOr<Value> call_impl(VM&, Value function, Value this_value, Optional<MarkedVector<Value>> = {});
 ThrowCompletionOr<Value> call_impl(VM&, FunctionObject& function, Value this_value, Optional<MarkedVector<Value>> = {});
 ThrowCompletionOr<Value> call_impl(VM&, FunctionObject& function, Value this_value, Optional<MarkedVector<Value>> = {});