mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 06:27:45 +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:
parent
7e1bffdeb8
commit
dc65f54c06
37 changed files with 103 additions and 104 deletions
|
@ -2230,12 +2230,12 @@ Value DebuggerStatement::execute(Interpreter& interpreter, GlobalObject&) const
|
|||
|
||||
void ScopeNode::add_variables(NonnullRefPtrVector<VariableDeclaration> variables)
|
||||
{
|
||||
m_variables.append(move(variables));
|
||||
m_variables.extend(move(variables));
|
||||
}
|
||||
|
||||
void ScopeNode::add_functions(NonnullRefPtrVector<FunctionDeclaration> functions)
|
||||
{
|
||||
m_functions.append(move(functions));
|
||||
m_functions.extend(move(functions));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ public:
|
|||
MarkedValueList copy() const
|
||||
{
|
||||
MarkedValueList copy { m_heap };
|
||||
copy.append(*this);
|
||||
copy.extend(*this);
|
||||
return copy;
|
||||
}
|
||||
|
||||
|
|
|
@ -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()) {
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue