diff --git a/Userland/Libraries/LibJS/Runtime/AbstractOperations.cpp b/Userland/Libraries/LibJS/Runtime/AbstractOperations.cpp index a3d31c073e..5d6a68cd25 100644 --- a/Userland/Libraries/LibJS/Runtime/AbstractOperations.cpp +++ b/Userland/Libraries/LibJS/Runtime/AbstractOperations.cpp @@ -405,7 +405,7 @@ Value perform_eval(Value x, GlobalObject& caller_realm, CallerMode strict_caller } // 10.4.4.6 CreateUnmappedArgumentsObject ( argumentsList ), https://tc39.es/ecma262/#sec-createunmappedargumentsobject -Object* create_unmapped_arguments_object(GlobalObject& global_object, Vector const& arguments) +Object* create_unmapped_arguments_object(GlobalObject& global_object, Span arguments) { auto& vm = global_object.vm(); @@ -449,7 +449,7 @@ Object* create_unmapped_arguments_object(GlobalObject& global_object, Vector const& formals, Vector const& arguments, Environment& environment) +Object* create_mapped_arguments_object(GlobalObject& global_object, FunctionObject& function, Vector const& formals, Span arguments, Environment& environment) { auto& vm = global_object.vm(); @@ -570,7 +570,7 @@ Value canonical_numeric_index_string(GlobalObject& global_object, PropertyName c } // 22.1.3.17.1 GetSubstitution ( matched, str, position, captures, namedCaptures, replacement ), https://tc39.es/ecma262/#sec-getsubstitution -String get_substitution(GlobalObject& global_object, Utf16View const& matched, Utf16View const& str, size_t position, Vector const& captures, Value named_captures, Value replacement) +String get_substitution(GlobalObject& global_object, Utf16View const& matched, Utf16View const& str, size_t position, Span captures, Value named_captures, Value replacement) { auto& vm = global_object.vm(); diff --git a/Userland/Libraries/LibJS/Runtime/AbstractOperations.h b/Userland/Libraries/LibJS/Runtime/AbstractOperations.h index d1f52feb14..b1797f6867 100644 --- a/Userland/Libraries/LibJS/Runtime/AbstractOperations.h +++ b/Userland/Libraries/LibJS/Runtime/AbstractOperations.h @@ -27,10 +27,10 @@ GlobalObject* get_function_realm(GlobalObject&, FunctionObject const&); bool is_compatible_property_descriptor(bool extensible, PropertyDescriptor const&, Optional const& current); bool validate_and_apply_property_descriptor(Object*, PropertyName const&, bool extensible, PropertyDescriptor const&, Optional const& current); Object* get_prototype_from_constructor(GlobalObject&, FunctionObject const& constructor, Object* (GlobalObject::*intrinsic_default_prototype)()); -Object* create_unmapped_arguments_object(GlobalObject&, Vector const& arguments); -Object* create_mapped_arguments_object(GlobalObject&, FunctionObject&, Vector const&, Vector const& arguments, Environment&); +Object* create_unmapped_arguments_object(GlobalObject&, Span arguments); +Object* create_mapped_arguments_object(GlobalObject&, FunctionObject&, Vector const&, Span arguments, Environment&); Value canonical_numeric_index_string(GlobalObject&, PropertyName const&); -String get_substitution(GlobalObject&, Utf16View const& matched, Utf16View const& str, size_t position, Vector const& captures, Value named_captures, Value replacement); +String get_substitution(GlobalObject&, Utf16View const& matched, Utf16View const& str, size_t position, Span captures, Value named_captures, Value replacement); enum class CallerMode { Strict, diff --git a/Userland/Libraries/LibJS/Runtime/VM.cpp b/Userland/Libraries/LibJS/Runtime/VM.cpp index 1f4eb9b1bb..28be8eaed0 100644 --- a/Userland/Libraries/LibJS/Runtime/VM.cpp +++ b/Userland/Libraries/LibJS/Runtime/VM.cpp @@ -375,9 +375,9 @@ Value VM::get_variable(const FlyString& name, GlobalObject& global_object) return possible_match.value().value; if (!context.arguments_object) { if (context.function->is_strict_mode() || !context.function->has_simple_parameter_list()) { - context.arguments_object = create_unmapped_arguments_object(global_object, context.arguments); + context.arguments_object = create_unmapped_arguments_object(global_object, context.arguments.span()); } else { - context.arguments_object = create_mapped_arguments_object(global_object, *context.function, verify_cast(context.function)->parameters(), context.arguments, *lexical_environment()); + context.arguments_object = create_mapped_arguments_object(global_object, *context.function, verify_cast(context.function)->parameters(), context.arguments.span(), *lexical_environment()); } } return context.arguments_object;