From 66b7da4fc74d11f95bbef0255923c9f59eda3200 Mon Sep 17 00:00:00 2001 From: Aliaksandr Kalenik Date: Thu, 28 Sep 2023 20:07:29 +0200 Subject: [PATCH] LibJS: Remove unused make_super_property_reference() This function is no longer used anywhere after we removed AST interpreter. --- .../LibJS/Runtime/AbstractOperations.cpp | 16 ---------------- .../Libraries/LibJS/Runtime/AbstractOperations.h | 1 - 2 files changed, 17 deletions(-) diff --git a/Userland/Libraries/LibJS/Runtime/AbstractOperations.cpp b/Userland/Libraries/LibJS/Runtime/AbstractOperations.cpp index fa114e8c08..6d10aac5c3 100644 --- a/Userland/Libraries/LibJS/Runtime/AbstractOperations.cpp +++ b/Userland/Libraries/LibJS/Runtime/AbstractOperations.cpp @@ -501,22 +501,6 @@ Object* get_super_constructor(VM& vm) return super_constructor; } -// 13.3.7.3 MakeSuperPropertyReference ( actualThis, propertyKey, strict ), https://tc39.es/ecma262/#sec-makesuperpropertyreference -ThrowCompletionOr make_super_property_reference(VM& vm, Value actual_this, PropertyKey const& property_key, bool strict) -{ - // 1. Let env be GetThisEnvironment(). - auto& env = verify_cast(*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 ThrowCompletionOr perform_eval(VM& vm, Value x, CallerMode strict_caller, EvalMode direct) { diff --git a/Userland/Libraries/LibJS/Runtime/AbstractOperations.h b/Userland/Libraries/LibJS/Runtime/AbstractOperations.h index 6be2d303d0..c9629e8c4e 100644 --- a/Userland/Libraries/LibJS/Runtime/AbstractOperations.h +++ b/Userland/Libraries/LibJS/Runtime/AbstractOperations.h @@ -27,7 +27,6 @@ NonnullGCPtr new_private_environment(VM& vm, PrivateEnvironm NonnullGCPtr get_this_environment(VM&); bool can_be_held_weakly(Value); Object* get_super_constructor(VM&); -ThrowCompletionOr make_super_property_reference(VM&, Value actual_this, PropertyKey const&, bool strict); ThrowCompletionOr require_object_coercible(VM&, Value); ThrowCompletionOr call_impl(VM&, Value function, Value this_value, Optional> = {}); ThrowCompletionOr call_impl(VM&, FunctionObject& function, Value this_value, Optional> = {});