Sfoglia il codice sorgente

LibJS: Make make_super_property_reference() take a PropertyKey

Let's get rid of StringOrSymbol usage outside of Shape.
Andreas Kling 3 anni fa
parent
commit
75f2510de9

+ 1 - 1
Userland/Libraries/LibJS/Runtime/AbstractOperations.cpp

@@ -452,7 +452,7 @@ Object* get_super_constructor(VM& vm)
 }
 
 // 13.3.7.3 MakeSuperPropertyReference ( actualThis, propertyKey, strict ), https://tc39.es/ecma262/#sec-makesuperpropertyreference
-ThrowCompletionOr<Reference> make_super_property_reference(GlobalObject& global_object, Value actual_this, StringOrSymbol const& property_key, bool strict)
+ThrowCompletionOr<Reference> make_super_property_reference(GlobalObject& global_object, Value actual_this, PropertyKey const& property_key, bool strict)
 {
     auto& vm = global_object.vm();
     // 1. Let env be GetThisEnvironment().

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

@@ -21,7 +21,7 @@ FunctionEnvironment* new_function_environment(ECMAScriptFunctionObject&, Object*
 PrivateEnvironment* new_private_environment(VM& vm, PrivateEnvironment* outer);
 Environment& get_this_environment(VM&);
 Object* get_super_constructor(VM&);
-ThrowCompletionOr<Reference> make_super_property_reference(GlobalObject&, Value actual_this, StringOrSymbol const& property_key, bool strict);
+ThrowCompletionOr<Reference> make_super_property_reference(GlobalObject&, Value actual_this, PropertyKey const&, bool strict);
 ThrowCompletionOr<Value> require_object_coercible(GlobalObject&, Value);
 ThrowCompletionOr<Value> call_impl(GlobalObject&, Value function, Value this_value, Optional<MarkedValueList> = {});
 ThrowCompletionOr<Object*> construct(GlobalObject&, FunctionObject&, Optional<MarkedValueList> = {}, FunctionObject* new_target = nullptr);