1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 09:37:44 +00:00

AK: Rename Vector::append(Vector) => Vector::extend(Vector)

Let's make it a bit more clear when we're appending the elements from
one vector to the end of another vector.
This commit is contained in:
Andreas Kling 2021-06-12 13:24:45 +02:00
parent 7e1bffdeb8
commit dc65f54c06
37 changed files with 103 additions and 104 deletions

View file

@ -61,7 +61,7 @@ BoundFunction* Function::bind(Value bound_this_value, Vector<Value> arguments)
constructor_prototype = &prototype_property.as_object();
auto all_bound_arguments = bound_arguments();
all_bound_arguments.append(move(arguments));
all_bound_arguments.extend(move(arguments));
return heap().allocate<BoundFunction>(global_object(), global_object(), target_function, bound_this_object, move(all_bound_arguments), computed_length, constructor_prototype);
}

View file

@ -28,7 +28,7 @@ public:
MarkedValueList copy() const
{
MarkedValueList copy { m_heap };
copy.append(*this);
copy.extend(*this);
return copy;
}

View file

@ -373,7 +373,7 @@ JS_DEFINE_NATIVE_FUNCTION(RegExpPrototype::symbol_replace)
if (replace_value.is_function()) {
MarkedValueList replacer_args(vm.heap());
replacer_args.append(js_string(vm, matched));
replacer_args.append(move(captures));
replacer_args.extend(move(captures));
replacer_args.append(Value(position));
replacer_args.append(js_string(vm, string));
if (!named_captures.is_undefined()) {

View file

@ -397,7 +397,7 @@ Value VM::construct(Function& function, Function& new_target, Optional<MarkedVal
call_frame.function_name = function.name();
call_frame.arguments = function.bound_arguments();
if (arguments.has_value())
call_frame.arguments.append(arguments.value().values());
call_frame.arguments.extend(arguments.value().values());
auto* environment = function.create_environment();
call_frame.scope = environment;
if (environment)
@ -509,7 +509,7 @@ Value VM::call_internal(Function& function, Value this_value, Optional<MarkedVal
call_frame.this_value = function.bound_this().value_or(this_value);
call_frame.arguments = function.bound_arguments();
if (arguments.has_value())
call_frame.arguments.append(arguments.value().values());
call_frame.arguments.extend(arguments.value().values());
auto* environment = function.create_environment();
call_frame.scope = environment;