Commit 089a4881 authored by Santiago Aboy Solanes's avatar Santiago Aboy Solanes Committed by Commit Bot

[cleanup] Change VariableList to initializer lists when appropiate.

There are cases where using VariableList is the way to go, e.g BuildFastLoop.

Change-Id: I0dad242b69145b94725ce206938455127aabeb29
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1806684Reviewed-by: 's avatarRoss McIlroy <rmcilroy@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#63885}
parent 7dd85c1d
......@@ -2450,8 +2450,7 @@ TNode<IntPtrT> WeakCollectionsBuiltinsAssembler::FindKeyIndex(
TVARIABLE(IntPtrT, var_entry, WordAnd(key_hash, entry_mask));
TVARIABLE(IntPtrT, var_count, IntPtrConstant(0));
VariableList loop_vars({&var_count, &var_entry}, zone());
Label loop(this, loop_vars), if_found(this);
Label loop(this, {&var_count, &var_entry}), if_found(this);
Goto(&loop);
BIND(&loop);
TNode<IntPtrT> key_index;
......
......@@ -86,10 +86,9 @@ TF_BUILTIN(FastFunctionPrototypeBind, CodeStubAssembler) {
TVARIABLE(Map, bound_function_map);
{
Label with_constructor(this);
VariableList vars({&bound_function_map}, zone());
TNode<NativeContext> native_context = LoadNativeContext(context);
Label map_done(this, vars);
Label map_done(this, &bound_function_map);
GotoIf(IsConstructorMap(receiver_map), &with_constructor);
bound_function_map = CAST(LoadContextElement(
......
......@@ -2149,10 +2149,9 @@ TNode<JSArray> RegExpBuiltinsAssembler::RegExpPrototypeSplitBody(
TVARIABLE(IntPtrT, var_reg, IntPtrConstant(2));
VariableList vars({array.var_array(), array.var_length(),
array.var_capacity(), &var_reg},
zone());
Label nested_loop(this, vars), nested_loop_out(this);
Label nested_loop(this, {array.var_array(), array.var_length(),
array.var_capacity(), &var_reg}),
nested_loop_out(this);
Branch(IntPtrLessThan(var_reg.value(), int_num_registers), &nested_loop,
&nested_loop_out);
......
......@@ -7337,8 +7337,7 @@ ToDirectStringAssembler::ToDirectStringAssembler(
flags_(flags) {}
TNode<String> ToDirectStringAssembler::TryToDirect(Label* if_bailout) {
VariableList vars({&var_string_, &var_offset_, &var_instance_type_}, zone());
Label dispatch(this, vars);
Label dispatch(this, {&var_string_, &var_offset_, &var_instance_type_});
Label if_iscons(this);
Label if_isexternal(this);
Label if_issliced(this);
......@@ -10068,9 +10067,7 @@ void CodeStubAssembler::TryPrototypeChainLookup(
TVARIABLE(Map, var_holder_map, map);
TVARIABLE(Int32T, var_holder_instance_type, instance_type);
VariableList merged_variables(
{&var_holder, &var_holder_map, &var_holder_instance_type}, zone());
Label loop(this, merged_variables);
Label loop(this, {&var_holder, &var_holder_map, &var_holder_instance_type});
Goto(&loop);
BIND(&loop);
{
......@@ -10113,9 +10110,7 @@ void CodeStubAssembler::TryPrototypeChainLookup(
TVARIABLE(Map, var_holder_map, map);
TVARIABLE(Int32T, var_holder_instance_type, instance_type);
VariableList merged_variables(
{&var_holder, &var_holder_map, &var_holder_instance_type}, zone());
Label loop(this, merged_variables);
Label loop(this, {&var_holder, &var_holder_map, &var_holder_instance_type});
Goto(&loop);
BIND(&loop);
{
......
......@@ -614,8 +614,7 @@ void KeyedStoreGenericAssembler::LookupPropertyOnPrototypeChain(
var_holder = LoadMapPrototype(receiver_map);
var_holder_map = LoadMap(var_holder.value());
VariableList merged_variables({&var_holder, &var_holder_map}, zone());
Label loop(this, merged_variables);
Label loop(this, {&var_holder, &var_holder_map});
Goto(&loop);
BIND(&loop);
{
......
......@@ -179,9 +179,7 @@ TNode<Context> InterpreterAssembler::GetContextAtDepth(TNode<Context> context,
Label context_found(this);
VariableList context_search_loop_variables({&cur_depth, &cur_context},
zone());
Label context_search(this, context_search_loop_variables);
Label context_search(this, {&cur_depth, &cur_context});
// Fast path if the depth is 0.
Branch(Word32Equal(depth, Int32Constant(0)), &context_found, &context_search);
......@@ -206,9 +204,7 @@ void InterpreterAssembler::GotoIfHasContextExtensionUpToDepth(
TVARIABLE(Context, cur_context, context);
TVARIABLE(Uint32T, cur_depth, depth);
VariableList context_search_loop_variables({&cur_depth, &cur_context},
zone());
Label context_search(this, context_search_loop_variables);
Label context_search(this, {&cur_depth, &cur_context});
// Loop until the depth is 0.
Goto(&context_search);
......
......@@ -1209,8 +1209,7 @@ class UnaryNumericOpAssembler : public InterpreterAssembler {
TVARIABLE(Object, var_result);
TVARIABLE(Float64T, var_float_value);
TVARIABLE(Smi, var_feedback, SmiConstant(BinaryOperationFeedback::kNone));
VariableList loop_vars({&var_value, &var_feedback}, zone());
Label start(this, loop_vars), end(this);
Label start(this, {&var_value, &var_feedback}), end(this);
Label do_float_op(this, &var_float_value);
Goto(&start);
// We might have to try again after ToNumeric conversion.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment