Commit 2e889e4d authored by Camillo Bruni's avatar Camillo Bruni Committed by Commit Bot

[csa] Use VARIABLE helper macro

Change-Id: If074bb297201470d688ecd7b01e5e9ce9bab464e
Reviewed-on: https://chromium-review.googlesource.com/469730
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44473}
parent 5ec1cddc
......@@ -21,14 +21,14 @@ ArgumentsBuiltinsAssembler::GetArgumentsFrameAndCount(Node* function,
ParameterMode mode) {
CSA_ASSERT(this, HasInstanceType(function, JS_FUNCTION_TYPE));
Variable frame_ptr(this, MachineType::PointerRepresentation());
VARIABLE(frame_ptr, MachineType::PointerRepresentation());
frame_ptr.Bind(LoadParentFramePointer());
CSA_ASSERT(this,
WordEqual(function,
LoadBufferObject(frame_ptr.value(),
StandardFrameConstants::kFunctionOffset,
MachineType::Pointer())));
Variable argument_count(this, ParameterRepresentation(mode));
VARIABLE(argument_count, ParameterRepresentation(mode));
VariableList list({&frame_ptr, &argument_count}, zone());
Label done_argument_count(this, list);
......@@ -133,7 +133,7 @@ Node* ArgumentsBuiltinsAssembler::ConstructParametersObjectFromArgs(
AllocateArgumentsObject(map, rest_count, nullptr, param_mode, base_size);
DCHECK(unused == nullptr);
CodeStubArguments arguments(this, arg_count, frame_ptr, param_mode);
Variable offset(this, MachineType::PointerRepresentation());
VARIABLE(offset, MachineType::PointerRepresentation());
offset.Bind(IntPtrConstant(FixedArrayBase::kHeaderSize - kHeapObjectTag));
VariableList list({&offset}, zone());
arguments.ForEach(list,
......@@ -158,7 +158,7 @@ Node* ArgumentsBuiltinsAssembler::EmitFastNewRestParameter(Node* context,
std::tie(frame_ptr, argument_count, formal_parameter_count) =
GetArgumentsFrameAndCount(function, mode);
Variable result(this, MachineRepresentation::kTagged);
VARIABLE(result, MachineRepresentation::kTagged);
Label no_rest_parameters(this), runtime(this, Label::kDeferred),
done(this, &result);
......@@ -208,7 +208,7 @@ TF_BUILTIN(FastNewRestParameter, ArgumentsBuiltinsAssembler) {
Node* ArgumentsBuiltinsAssembler::EmitFastNewStrictArguments(Node* context,
Node* function) {
Variable result(this, MachineRepresentation::kTagged);
VARIABLE(result, MachineRepresentation::kTagged);
Label done(this, &result), empty(this), runtime(this, Label::kDeferred);
Node* frame_ptr;
......@@ -267,7 +267,7 @@ Node* ArgumentsBuiltinsAssembler::EmitFastNewSloppyArguments(Node* context,
Node* frame_ptr;
Node* argument_count;
Node* formal_parameter_count;
Variable result(this, MachineRepresentation::kTagged);
VARIABLE(result, MachineRepresentation::kTagged);
ParameterMode mode = OptimalParameterMode();
Node* zero = IntPtrOrSmiConstant(0, mode);
......@@ -320,7 +320,7 @@ Node* ArgumentsBuiltinsAssembler::EmitFastNewSloppyArguments(Node* context,
ElementOffsetFromIndex(mapped_count, FAST_ELEMENTS, mode,
FixedArray::kHeaderSize - kHeapObjectTag);
CodeStubArguments arguments(this, argument_count, frame_ptr, mode);
Variable current_argument(this, MachineType::PointerRepresentation());
VARIABLE(current_argument, MachineType::PointerRepresentation());
current_argument.Bind(arguments.AtIndexPtr(argument_count, mode));
VariableList var_list1({&current_argument}, zone());
mapped_offset = BuildFastLoop(
......@@ -342,7 +342,7 @@ Node* ArgumentsBuiltinsAssembler::EmitFastNewSloppyArguments(Node* context,
// MIN_CONTEXT_SLOTS+argument_count-mapped_count
// We loop from right to left.
Comment("Fill in mapped parameters");
Variable context_index(this, OptimalParameterRepresentation());
VARIABLE(context_index, OptimalParameterRepresentation());
context_index.Bind(IntPtrOrSmiSub(
IntPtrOrSmiAdd(IntPtrOrSmiConstant(Context::MIN_CONTEXT_SLOTS, mode),
formal_parameter_count, mode),
......
......@@ -65,7 +65,7 @@ class ArrayBuiltinCodeStubAssembler : public CodeStubAssembler {
}
Node* ReduceResultGenerator() {
Variable a(this, MachineRepresentation::kTagged, UndefinedConstant());
VARIABLE(a, MachineRepresentation::kTagged, UndefinedConstant());
Label no_initial_value(this), has_initial_value(this), done(this, {&a});
// 8. If initialValue is present, then
......@@ -99,7 +99,7 @@ class ArrayBuiltinCodeStubAssembler : public CodeStubAssembler {
}
Node* ReduceProcessor(Node* k_value, Node* k) {
Variable result(this, MachineRepresentation::kTagged);
VARIABLE(result, MachineRepresentation::kTagged);
Label done(this, {&result}), initial(this);
GotoIf(WordEqual(a(), TheHoleConstant()), &initial);
result.Bind(CallJS(CodeFactory::Call(isolate()), context(), callbackfn(),
......@@ -215,7 +215,7 @@ class ArrayBuiltinCodeStubAssembler : public CodeStubAssembler {
// 3. Let len be ToLength(Get(O, "length")).
// 4. ReturnIfAbrupt(len).
Variable merged_length(this, MachineRepresentation::kTagged);
VARIABLE(merged_length, MachineRepresentation::kTagged);
Label has_length(this, &merged_length), not_js_array(this);
GotoIf(DoesntHaveInstanceType(o(), JS_ARRAY_TYPE), &not_js_array);
merged_length.Bind(LoadJSArrayLength(o()));
......@@ -484,7 +484,7 @@ class ArrayBuiltinCodeStubAssembler : public CodeStubAssembler {
Label* array_changed, ParameterMode mode,
ForEachDirection direction) {
Comment("begin VisitAllFastElementsOneKind");
Variable original_map(this, MachineRepresentation::kTagged);
VARIABLE(original_map, MachineRepresentation::kTagged);
original_map.Bind(LoadMap(o()));
VariableList list({&original_map, &a_, &k_, &to_}, zone());
Node* start = IntPtrOrSmiConstant(0, mode);
......@@ -607,7 +607,7 @@ class ArrayBuiltinCodeStubAssembler : public CodeStubAssembler {
};
TF_BUILTIN(FastArrayPush, CodeStubAssembler) {
Variable arg_index(this, MachineType::PointerRepresentation());
VARIABLE(arg_index, MachineType::PointerRepresentation());
Label default_label(this, &arg_index);
Label smi_transition(this);
Label object_push_pre(this);
......@@ -1095,7 +1095,7 @@ TF_BUILTIN(ArrayIncludes, CodeStubAssembler) {
Node* const start_from = Parameter(Descriptor::kFromIndex);
Node* const context = Parameter(Descriptor::kContext);
Variable index_var(this, MachineType::PointerRepresentation());
VARIABLE(index_var, MachineType::PointerRepresentation());
Label init_k(this), return_true(this), return_false(this), call_runtime(this);
Label init_len(this), select_loop(this);
......@@ -1151,7 +1151,7 @@ TF_BUILTIN(ArrayIncludes, CodeStubAssembler) {
BIND(&if_smiorobjects);
{
Variable search_num(this, MachineRepresentation::kFloat64);
VARIABLE(search_num, MachineRepresentation::kFloat64);
Label ident_loop(this, &index_var), heap_num_loop(this, &search_num),
string_loop(this, &index_var), undef_loop(this, &index_var),
not_smi(this), not_heap_num(this);
......@@ -1258,7 +1258,7 @@ TF_BUILTIN(ArrayIncludes, CodeStubAssembler) {
{
Label nan_loop(this, &index_var), not_nan_loop(this, &index_var),
hole_loop(this, &index_var), search_notnan(this);
Variable search_num(this, MachineRepresentation::kFloat64);
VARIABLE(search_num, MachineRepresentation::kFloat64);
GotoIfNot(TaggedIsSmi(search_element), &search_notnan);
search_num.Bind(SmiToFloat64(search_element));
......@@ -1303,7 +1303,7 @@ TF_BUILTIN(ArrayIncludes, CodeStubAssembler) {
{
Label nan_loop(this, &index_var), not_nan_loop(this, &index_var),
hole_loop(this, &index_var), search_notnan(this);
Variable search_num(this, MachineRepresentation::kFloat64);
VARIABLE(search_num, MachineRepresentation::kFloat64);
GotoIfNot(TaggedIsSmi(search_element), &search_notnan);
search_num.Bind(SmiToFloat64(search_element));
......@@ -1387,9 +1387,9 @@ TF_BUILTIN(ArrayIndexOf, CodeStubAssembler) {
Node* intptr_zero = IntPtrConstant(0);
Node* intptr_one = IntPtrConstant(1);
Variable len_var(this, MachineType::PointerRepresentation()),
index_var(this, MachineType::PointerRepresentation()),
start_from_var(this, MachineType::PointerRepresentation());
VARIABLE(len_var, MachineType::PointerRepresentation());
VARIABLE(index_var, MachineType::PointerRepresentation());
VARIABLE(start_from_var, MachineType::PointerRepresentation());
Label init_k(this), return_found(this), return_not_found(this),
call_runtime(this);
......@@ -1488,7 +1488,7 @@ TF_BUILTIN(ArrayIndexOf, CodeStubAssembler) {
BIND(&if_smiorobjects);
{
Variable search_num(this, MachineRepresentation::kFloat64);
VARIABLE(search_num, MachineRepresentation::kFloat64);
Label ident_loop(this, &index_var), heap_num_loop(this, &search_num),
string_loop(this, &index_var), not_smi(this), not_heap_num(this);
......@@ -1569,7 +1569,7 @@ TF_BUILTIN(ArrayIndexOf, CodeStubAssembler) {
BIND(&if_packed_doubles);
{
Label not_nan_loop(this, &index_var), search_notnan(this);
Variable search_num(this, MachineRepresentation::kFloat64);
VARIABLE(search_num, MachineRepresentation::kFloat64);
GotoIfNot(TaggedIsSmi(search_element), &search_notnan);
search_num.Bind(SmiToFloat64(search_element));
......@@ -1599,7 +1599,7 @@ TF_BUILTIN(ArrayIndexOf, CodeStubAssembler) {
BIND(&if_holey_doubles);
{
Label not_nan_loop(this, &index_var), search_notnan(this);
Variable search_num(this, MachineRepresentation::kFloat64);
VARIABLE(search_num, MachineRepresentation::kFloat64);
GotoIfNot(TaggedIsSmi(search_element), &search_notnan);
search_num.Bind(SmiToFloat64(search_element));
......@@ -1651,9 +1651,9 @@ class ArrayPrototypeIterationAssembler : public CodeStubAssembler {
protected:
void Generate_ArrayPrototypeIterationMethod(Node* context, Node* receiver,
IterationKind iteration_kind) {
Variable var_array(this, MachineRepresentation::kTagged);
Variable var_map(this, MachineRepresentation::kTagged);
Variable var_type(this, MachineRepresentation::kWord32);
VARIABLE(var_array, MachineRepresentation::kTagged);
VARIABLE(var_map, MachineRepresentation::kTagged);
VARIABLE(var_type, MachineRepresentation::kWord32);
Label if_isnotobject(this, Label::kDeferred);
Label create_array_iterator(this);
......@@ -1709,8 +1709,8 @@ TF_BUILTIN(ArrayIteratorPrototypeNext, CodeStubAssembler) {
Node* context = Parameter(Descriptor::kContext);
Node* iterator = Parameter(Descriptor::kReceiver);
Variable var_value(this, MachineRepresentation::kTagged);
Variable var_done(this, MachineRepresentation::kTagged);
VARIABLE(var_value, MachineRepresentation::kTagged);
VARIABLE(var_done, MachineRepresentation::kTagged);
// Required, or else `throw_bad_receiver` fails a DCHECK due to these
// variables not being bound along all paths, despite not being used.
......@@ -1859,7 +1859,7 @@ TF_BUILTIN(ArrayIteratorPrototypeNext, CodeStubAssembler) {
Node* length = nullptr;
{
Variable var_length(this, MachineRepresentation::kTagged);
VARIABLE(var_length, MachineRepresentation::kTagged);
Label if_isarray(this), if_isnotarray(this), done(this);
Branch(Word32Equal(array_type, Int32Constant(JS_ARRAY_TYPE)),
&if_isarray, &if_isnotarray);
......
......@@ -275,7 +275,7 @@ void AsyncGeneratorBuiltinsAssembler::AsyncGeneratorAwait(bool is_catchable) {
void AsyncGeneratorBuiltinsAssembler::AddAsyncGeneratorRequestToQueue(
Node* generator, Node* request) {
Variable var_current(this, MachineRepresentation::kTagged);
VARIABLE(var_current, MachineRepresentation::kTagged);
Label empty(this), loop(this, &var_current), done(this);
var_current.Bind(
......@@ -387,8 +387,8 @@ TF_BUILTIN(AsyncGeneratorRawYield, AsyncGeneratorBuiltinsAssembler) {
HasInstanceType(generator, JS_ASYNC_GENERATOR_OBJECT_TYPE));
CSA_ASSERT(this, IsGeneratorNotSuspendedForAwait(generator));
Variable var_value(this, MachineRepresentation::kTagged);
Variable var_done(this, MachineRepresentation::kTagged);
VARIABLE(var_value, MachineRepresentation::kTagged);
VARIABLE(var_done, MachineRepresentation::kTagged);
// RawYield is used for yield*, and values sent to yield* are always
// iterator result objects.
......@@ -458,10 +458,10 @@ TF_BUILTIN(AsyncGeneratorResumeNext, AsyncGeneratorBuiltinsAssembler) {
// performs a loop in AsyncGeneratorResumeNext, which continues as long as
// there is an AsyncGeneratorRequest in the queue, and as long as the
// generator is not suspended due to an AwaitExpression.
Variable var_state(this, MachineRepresentation::kTaggedSigned,
LoadGeneratorState(generator));
Variable var_next(this, MachineRepresentation::kTagged,
LoadFirstAsyncGeneratorRequestFromQueue(generator));
VARIABLE(var_state, MachineRepresentation::kTaggedSigned,
LoadGeneratorState(generator));
VARIABLE(var_next, MachineRepresentation::kTagged,
LoadFirstAsyncGeneratorRequestFromQueue(generator));
Variable* labels[] = {&var_state, &var_next};
Label start(this, 2, labels);
Goto(&start);
......
......@@ -85,10 +85,9 @@ void AsyncFromSyncBuiltinsAssembler::Generate_AsyncFromSyncIteratorMethod(
Node* const native_context = LoadNativeContext(context);
Node* const promise = AllocateAndInitJSPromise(context);
Variable var_exception(this, MachineRepresentation::kTagged,
initial_exception_value == nullptr
? UndefinedConstant()
: initial_exception_value);
VARIABLE(var_exception, MachineRepresentation::kTagged,
initial_exception_value == nullptr ? UndefinedConstant()
: initial_exception_value);
Label reject_promise(this, reject_label_type);
ThrowIfNotAsyncFromSyncIterator(context, iterator, &reject_promise,
......@@ -156,8 +155,8 @@ std::pair<Node*, Node*> AsyncFromSyncBuiltinsAssembler::LoadIteratorResult(
Node* const fast_iter_result_map =
LoadContextElement(native_context, Context::ITERATOR_RESULT_MAP_INDEX);
Variable var_value(this, MachineRepresentation::kTagged);
Variable var_done(this, MachineRepresentation::kTagged);
VARIABLE(var_value, MachineRepresentation::kTagged);
VARIABLE(var_done, MachineRepresentation::kTagged);
Branch(WordEqual(iter_result_map, fast_iter_result_map), &if_fastpath,
&if_slowpath);
......
......@@ -42,7 +42,7 @@ Node* ConstructorBuiltinsAssembler::EmitFastNewClosure(Node* shared_info,
Label if_normal(this), if_generator(this), if_async(this),
if_class_constructor(this), if_function_without_prototype(this),
load_map(this);
Variable map_index(this, MachineType::PointerRepresentation());
VARIABLE(map_index, MachineType::PointerRepresentation());
STATIC_ASSERT(FunctionKind::kNormalFunction == 0);
Node* is_not_normal =
......@@ -200,7 +200,7 @@ TF_BUILTIN(FastNewObject, ConstructorBuiltinsAssembler) {
Node* ConstructorBuiltinsAssembler::EmitFastNewObject(Node* context,
Node* target,
Node* new_target) {
Variable var_obj(this, MachineRepresentation::kTagged);
VARIABLE(var_obj, MachineRepresentation::kTagged);
Label call_runtime(this), end(this);
Node* result = EmitFastNewObject(context, target, new_target, &call_runtime);
......@@ -241,7 +241,7 @@ Node* ConstructorBuiltinsAssembler::EmitFastNewObject(Node* context,
LoadObjectField(initial_map, Map::kConstructorOrBackPointerOffset);
GotoIf(WordNotEqual(target, new_target_constructor), call_runtime);
Variable properties(this, MachineRepresentation::kTagged);
VARIABLE(properties, MachineRepresentation::kTagged);
Label instantiate_map(this), allocate_properties(this);
GotoIf(IsDictionaryMap(initial_map), &allocate_properties);
......@@ -409,7 +409,7 @@ Node* ConstructorBuiltinsAssembler::EmitFastCloneRegExp(Node* closure,
Node* context) {
Label call_runtime(this, Label::kDeferred), end(this);
Variable result(this, MachineRepresentation::kTagged);
VARIABLE(result, MachineRepresentation::kTagged);
Node* cell = LoadObjectField(closure, JSFunction::kFeedbackVectorOffset);
Node* feedback_vector = LoadObjectField(cell, Cell::kValueOffset);
......@@ -486,7 +486,7 @@ Node* ConstructorBuiltinsAssembler::EmitFastCloneShallowArray(
AllocationSiteMode allocation_site_mode) {
Label zero_capacity(this), cow_elements(this), fast_elements(this),
return_result(this);
Variable result(this, MachineRepresentation::kTagged);
VARIABLE(result, MachineRepresentation::kTagged);
Node* cell = LoadObjectField(closure, JSFunction::kFeedbackVectorOffset);
Node* feedback_vector = LoadObjectField(cell, Cell::kValueOffset);
......@@ -547,8 +547,8 @@ Node* ConstructorBuiltinsAssembler::EmitFastCloneShallowArray(
Goto(&return_result);
}
Variable length(this, MachineRepresentation::kTagged),
elements(this, MachineRepresentation::kTagged);
VARIABLE(length, MachineRepresentation::kTagged);
VARIABLE(elements, MachineRepresentation::kTagged);
Label allocate_without_elements(this);
BIND(&cow_elements);
......@@ -642,7 +642,7 @@ Node* ConstructorBuiltinsAssembler::EmitFastCloneShallowObject(
Node* copy = AllocateInNewSpace(allocation_size);
// Copy boilerplate elements.
Variable offset(this, MachineType::PointerRepresentation());
VARIABLE(offset, MachineType::PointerRepresentation());
offset.Bind(IntPtrConstant(-kHeapObjectTag));
Node* end_offset = IntPtrAdd(object_size, offset.value());
Label loop_body(this, &offset), loop_check(this, &offset);
......
......@@ -167,7 +167,7 @@ TF_BUILTIN(ToString, CodeStubAssembler) {
// 7.1.1.1 OrdinaryToPrimitive ( O, hint )
void ConversionBuiltinsAssembler::Generate_OrdinaryToPrimitive(
Node* context, Node* input, OrdinaryToPrimitiveHint hint) {
Variable var_result(this, MachineRepresentation::kTagged);
VARIABLE(var_result, MachineRepresentation::kTagged);
Label return_result(this, &var_result);
Handle<String> method_names[2];
......@@ -253,8 +253,8 @@ TF_BUILTIN(ToLength, CodeStubAssembler) {
Node* context = Parameter(Descriptor::kContext);
// We might need to loop once for ToNumber conversion.
Variable var_len(this, MachineRepresentation::kTagged,
Parameter(Descriptor::kArgument));
VARIABLE(var_len, MachineRepresentation::kTagged,
Parameter(Descriptor::kArgument));
Label loop(this, &var_len);
Goto(&loop);
BIND(&loop);
......@@ -332,8 +332,8 @@ TF_BUILTIN(ToObject, CodeStubAssembler) {
Node* context = Parameter(Descriptor::kContext);
Node* object = Parameter(Descriptor::kArgument);
Variable constructor_function_index_var(this,
MachineType::PointerRepresentation());
VARIABLE(constructor_function_index_var,
MachineType::PointerRepresentation());
Branch(TaggedIsSmi(object), &if_number, &if_notsmi);
......
......@@ -23,7 +23,7 @@ Node* ForInBuiltinsAssembler::ForInFilter(Node* key, Node* object,
Node* context) {
CSA_ASSERT(this, IsName(key));
Variable var_result(this, MachineRepresentation::kTagged, key);
VARIABLE(var_result, MachineRepresentation::kTagged, key);
Node* has_property =
HasProperty(object, key, context, Runtime::kForInHasProperty);
......@@ -69,8 +69,8 @@ Node* ForInBuiltinsAssembler::EnumLength(Node* map) {
void ForInBuiltinsAssembler::CheckPrototypeEnumCache(Node* receiver, Node* map,
Label* use_cache,
Label* use_runtime) {
Variable current_js_object(this, MachineRepresentation::kTagged, receiver);
Variable current_map(this, MachineRepresentation::kTagged, map);
VARIABLE(current_js_object, MachineRepresentation::kTagged, receiver);
VARIABLE(current_map, MachineRepresentation::kTagged, map);
// These variables are updated in the loop below.
Variable* loop_vars[2] = {&current_js_object, &current_map};
......
......@@ -72,7 +72,7 @@ TF_BUILTIN(FastFunctionPrototypeBind, CodeStubAssembler) {
// Choose the right bound function map based on whether the target is
// constructable.
Comment("Choose the right bound function map");
Variable bound_function_map(this, MachineRepresentation::kTagged);
VARIABLE(bound_function_map, MachineRepresentation::kTagged);
Label with_constructor(this);
VariableList vars({&bound_function_map}, zone());
Node* native_context = LoadNativeContext(context);
......@@ -101,13 +101,13 @@ TF_BUILTIN(FastFunctionPrototypeBind, CodeStubAssembler) {
// Allocate the arguments array.
Comment("Allocate the arguments array");
Variable argument_array(this, MachineRepresentation::kTagged);
VARIABLE(argument_array, MachineRepresentation::kTagged);
Label empty_arguments(this);
Label arguments_done(this, &argument_array);
GotoIf(Uint32LessThanOrEqual(argc, Int32Constant(1)), &empty_arguments);
Node* elements_length = ChangeUint32ToWord(Int32Sub(argc, Int32Constant(1)));
Node* elements = AllocateFixedArray(FAST_ELEMENTS, elements_length);
Variable index(this, MachineType::PointerRepresentation());
VARIABLE(index, MachineType::PointerRepresentation());
index.Bind(IntPtrConstant(0));
VariableList foreach_vars({&index}, zone());
args.ForEach(foreach_vars,
......@@ -127,7 +127,7 @@ TF_BUILTIN(FastFunctionPrototypeBind, CodeStubAssembler) {
// Determine bound receiver.
Comment("Determine bound receiver");
Variable bound_receiver(this, MachineRepresentation::kTagged);
VARIABLE(bound_receiver, MachineRepresentation::kTagged);
Label has_receiver(this);
Label receiver_done(this, &bound_receiver);
GotoIf(Word32NotEqual(argc, Int32Constant(0)), &has_receiver);
......
......@@ -16,7 +16,7 @@ TF_BUILTIN(GlobalIsFinite, CodeStubAssembler) {
Label return_true(this), return_false(this);
// We might need to loop once for ToNumber conversion.
Variable var_num(this, MachineRepresentation::kTagged);
VARIABLE(var_num, MachineRepresentation::kTagged);
Label loop(this, &var_num);
var_num.Bind(Parameter(Descriptor::kNumber));
Goto(&loop);
......@@ -64,7 +64,7 @@ TF_BUILTIN(GlobalIsNaN, CodeStubAssembler) {
Label return_true(this), return_false(this);
// We might need to loop once for ToNumber conversion.
Variable var_num(this, MachineRepresentation::kTagged);
VARIABLE(var_num, MachineRepresentation::kTagged);
Label loop(this, &var_num);
var_num.Bind(Parameter(Descriptor::kNumber));
Goto(&loop);
......
......@@ -135,7 +135,7 @@ TF_BUILTIN(LoadIC_FunctionPrototype, CodeStubAssembler) {
LoadObjectField(receiver, JSFunction::kPrototypeOrInitialMapOffset);
GotoIf(IsTheHole(proto_or_map), &miss);
Variable var_result(this, MachineRepresentation::kTagged, proto_or_map);
VARIABLE(var_result, MachineRepresentation::kTagged, proto_or_map);
Label done(this, &var_result);
GotoIfNot(IsMap(proto_or_map), &done);
......
......@@ -122,7 +122,7 @@ TF_BUILTIN(NewUnmappedArgumentsElements, CodeStubAssembler) {
Node* offset = IntPtrAdd(length, IntPtrConstant(1));
// Copy the parameters from {frame} (starting at {offset}) to {result}.
Variable var_index(this, MachineType::PointerRepresentation());
VARIABLE(var_index, MachineType::PointerRepresentation());
Label loop(this, &var_index), done_loop(this);
var_index.Bind(IntPtrConstant(0));
Goto(&loop);
......
......@@ -33,7 +33,7 @@ TF_BUILTIN(MathAbs, CodeStubAssembler) {
Node* context = Parameter(Descriptor::kContext);
// We might need to loop once for ToNumber conversion.
Variable var_x(this, MachineRepresentation::kTagged);
VARIABLE(var_x, MachineRepresentation::kTagged);
Label loop(this, &var_x);
var_x.Bind(Parameter(Descriptor::kX));
Goto(&loop);
......@@ -118,7 +118,7 @@ TF_BUILTIN(MathAbs, CodeStubAssembler) {
void MathBuiltinsAssembler::MathRoundingOperation(
Node* context, Node* x, Node* (CodeStubAssembler::*float64op)(Node*)) {
// We might need to loop once for ToNumber conversion.
Variable var_x(this, MachineRepresentation::kTagged, x);
VARIABLE(var_x, MachineRepresentation::kTagged, x);
Label loop(this, &var_x);
Goto(&loop);
BIND(&loop);
......@@ -176,7 +176,7 @@ void MathBuiltinsAssembler::MathMaxMin(
CodeStubArguments arguments(this, ChangeInt32ToIntPtr(argc));
argc = arguments.GetLength();
Variable result(this, MachineRepresentation::kFloat64);
VARIABLE(result, MachineRepresentation::kFloat64);
result.Bind(Float64Constant(default_val));
CodeStubAssembler::VariableList vars({&result}, zone());
......@@ -262,11 +262,11 @@ TF_BUILTIN(MathClz32, CodeStubAssembler) {
Node* context = Parameter(Descriptor::kContext);
// Shared entry point for the clz32 operation.
Variable var_clz32_x(this, MachineRepresentation::kWord32);
VARIABLE(var_clz32_x, MachineRepresentation::kWord32);
Label do_clz32(this);
// We might need to loop once for ToNumber conversion.
Variable var_x(this, MachineRepresentation::kTagged);
VARIABLE(var_x, MachineRepresentation::kTagged);
Label loop(this, &var_x);
var_x.Bind(Parameter(Descriptor::kX));
Goto(&loop);
......@@ -421,7 +421,7 @@ TF_BUILTIN(MathRandom, CodeStubAssembler) {
Node* native_context = LoadNativeContext(context);
// Load cache index.
Variable smi_index(this, MachineRepresentation::kTagged);
VARIABLE(smi_index, MachineRepresentation::kTagged);
smi_index.Bind(
LoadContextElement(native_context, Context::MATH_RANDOM_INDEX_INDEX));
......
......@@ -171,8 +171,8 @@ TF_BUILTIN(NumberParseFloat, CodeStubAssembler) {
Node* context = Parameter(Descriptor::kContext);
// We might need to loop once for ToString conversion.
Variable var_input(this, MachineRepresentation::kTagged,
Parameter(Descriptor::kString));
VARIABLE(var_input, MachineRepresentation::kTagged,
Parameter(Descriptor::kString));
Label loop(this, &var_input);
Goto(&loop);
BIND(&loop);
......@@ -355,14 +355,14 @@ TF_BUILTIN(Add, CodeStubAssembler) {
// Shared entry for floating point addition.
Label do_fadd(this);
Variable var_fadd_lhs(this, MachineRepresentation::kFloat64),
var_fadd_rhs(this, MachineRepresentation::kFloat64);
VARIABLE(var_fadd_lhs, MachineRepresentation::kFloat64);
VARIABLE(var_fadd_rhs, MachineRepresentation::kFloat64);
// We might need to loop several times due to ToPrimitive, ToString and/or
// ToNumber conversions.
Variable var_lhs(this, MachineRepresentation::kTagged),
var_rhs(this, MachineRepresentation::kTagged),
var_result(this, MachineRepresentation::kTagged);
VARIABLE(var_lhs, MachineRepresentation::kTagged);
VARIABLE(var_rhs, MachineRepresentation::kTagged);
VARIABLE(var_result, MachineRepresentation::kTagged);
Variable* loop_vars[2] = {&var_lhs, &var_rhs};
Label loop(this, 2, loop_vars), end(this),
string_add_convert_left(this, Label::kDeferred),
......@@ -698,14 +698,14 @@ TF_BUILTIN(Subtract, CodeStubAssembler) {
// Shared entry for floating point subtraction.
Label do_fsub(this), end(this);
Variable var_fsub_lhs(this, MachineRepresentation::kFloat64),
var_fsub_rhs(this, MachineRepresentation::kFloat64);
VARIABLE(var_fsub_lhs, MachineRepresentation::kFloat64);
VARIABLE(var_fsub_rhs, MachineRepresentation::kFloat64);
// We might need to loop several times due to ToPrimitive and/or ToNumber
// conversions.
Variable var_lhs(this, MachineRepresentation::kTagged),
var_rhs(this, MachineRepresentation::kTagged),
var_result(this, MachineRepresentation::kTagged);
VARIABLE(var_lhs, MachineRepresentation::kTagged);
VARIABLE(var_rhs, MachineRepresentation::kTagged);
VARIABLE(var_result, MachineRepresentation::kTagged);
Variable* loop_vars[2] = {&var_lhs, &var_rhs};
Label loop(this, 2, loop_vars);
var_lhs.Bind(left);
......@@ -857,13 +857,13 @@ TF_BUILTIN(Multiply, CodeStubAssembler) {
// Shared entry point for floating point multiplication.
Label do_fmul(this), return_result(this);
Variable var_lhs_float64(this, MachineRepresentation::kFloat64),
var_rhs_float64(this, MachineRepresentation::kFloat64);
VARIABLE(var_lhs_float64, MachineRepresentation::kFloat64);
VARIABLE(var_rhs_float64, MachineRepresentation::kFloat64);
// We might need to loop one or two times due to ToNumber conversions.
Variable var_lhs(this, MachineRepresentation::kTagged),
var_rhs(this, MachineRepresentation::kTagged),
var_result(this, MachineRepresentation::kTagged);
VARIABLE(var_lhs, MachineRepresentation::kTagged);
VARIABLE(var_rhs, MachineRepresentation::kTagged);
VARIABLE(var_result, MachineRepresentation::kTagged);
Variable* loop_variables[] = {&var_lhs, &var_rhs};
Label loop(this, 2, loop_variables);
var_lhs.Bind(left);
......@@ -994,13 +994,13 @@ TF_BUILTIN(Divide, CodeStubAssembler) {
// Shared entry point for floating point division.
Label do_fdiv(this), end(this);
Variable var_dividend_float64(this, MachineRepresentation::kFloat64),
var_divisor_float64(this, MachineRepresentation::kFloat64);
VARIABLE(var_dividend_float64, MachineRepresentation::kFloat64);
VARIABLE(var_divisor_float64, MachineRepresentation::kFloat64);
// We might need to loop one or two times due to ToNumber conversions.
Variable var_dividend(this, MachineRepresentation::kTagged),
var_divisor(this, MachineRepresentation::kTagged),
var_result(this, MachineRepresentation::kTagged);
VARIABLE(var_dividend, MachineRepresentation::kTagged);
VARIABLE(var_divisor, MachineRepresentation::kTagged);
VARIABLE(var_result, MachineRepresentation::kTagged);
Variable* loop_variables[] = {&var_dividend, &var_divisor};
Label loop(this, 2, loop_variables);
var_dividend.Bind(left);
......@@ -1187,17 +1187,17 @@ TF_BUILTIN(Modulus, CodeStubAssembler) {
Node* left = Parameter(Descriptor::kLeft);
Node* right = Parameter(Descriptor::kRight);
Variable var_result(this, MachineRepresentation::kTagged);
VARIABLE(var_result, MachineRepresentation::kTagged);
Label return_result(this, &var_result);
// Shared entry point for floating point modulus.
Label do_fmod(this);
Variable var_dividend_float64(this, MachineRepresentation::kFloat64),
var_divisor_float64(this, MachineRepresentation::kFloat64);
VARIABLE(var_dividend_float64, MachineRepresentation::kFloat64);
VARIABLE(var_divisor_float64, MachineRepresentation::kFloat64);
// We might need to loop one or two times due to ToNumber conversions.
Variable var_dividend(this, MachineRepresentation::kTagged),
var_divisor(this, MachineRepresentation::kTagged);
VARIABLE(var_dividend, MachineRepresentation::kTagged);
VARIABLE(var_divisor, MachineRepresentation::kTagged);
Variable* loop_variables[] = {&var_dividend, &var_divisor};
Label loop(this, 2, loop_variables);
var_dividend.Bind(left);
......
......@@ -65,8 +65,8 @@ TF_BUILTIN(ObjectHasOwnProperty, ObjectBuiltinsAssembler) {
Node* instance_type = LoadMapInstanceType(map);
{
Variable var_index(this, MachineType::PointerRepresentation());
Variable var_unique(this, MachineRepresentation::kTagged);
VARIABLE(var_index, MachineType::PointerRepresentation());
VARIABLE(var_unique, MachineRepresentation::kTagged);
Label keyisindex(this), if_iskeyunique(this);
TryToName(key, &keyisindex, &var_index, &if_iskeyunique, &var_unique,
......@@ -120,7 +120,7 @@ TF_BUILTIN(ObjectProtoToString, ObjectBuiltinsAssembler) {
Node* receiver_instance_type = LoadInstanceType(receiver);
// for proxies, check IsArray before getting @@toStringTag
Variable var_proxy_is_array(this, MachineRepresentation::kTagged);
VARIABLE(var_proxy_is_array, MachineRepresentation::kTagged);
var_proxy_is_array.Bind(BooleanConstant(false));
Branch(Word32Equal(receiver_instance_type, Int32Constant(JS_PROXY_TYPE)),
......@@ -303,8 +303,8 @@ TF_BUILTIN(ObjectCreate, ObjectBuiltinsAssembler) {
// Create a new object with the given prototype.
BIND(&no_properties);
{
Variable map(this, MachineRepresentation::kTagged);
Variable properties(this, MachineRepresentation::kTagged);
VARIABLE(map, MachineRepresentation::kTagged);
VARIABLE(properties, MachineRepresentation::kTagged);
Label non_null_proto(this), instantiate_map(this), good(this);
Branch(WordEqual(prototype, NullConstant()), &good, &non_null_proto);
......
......@@ -110,7 +110,7 @@ Node* PromiseBuiltinsAssembler::NewPromiseCapability(Node* context,
StoreObjectFieldNoWriteBarrier(capability, JSPromiseCapability::kRejectOffset,
UndefinedConstant());
Variable var_result(this, MachineRepresentation::kTagged);
VARIABLE(var_result, MachineRepresentation::kTagged);
var_result.Bind(capability);
Label if_builtin_promise(this), if_custom_promise(this, Label::kDeferred),
......@@ -230,7 +230,7 @@ Node* PromiseBuiltinsAssembler::ThrowIfNotJSReceiver(
Node* context, Node* value, MessageTemplate::Template msg_template,
const char* method_name) {
Label out(this), throw_exception(this, Label::kDeferred);
Variable var_value_map(this, MachineRepresentation::kTagged);
VARIABLE(var_value_map, MachineRepresentation::kTagged);
GotoIf(TaggedIsSmi(value), &throw_exception);
......@@ -279,7 +279,7 @@ void PromiseBuiltinsAssembler::PromiseSetHandledHint(Node* promise) {
Node* PromiseBuiltinsAssembler::SpeciesConstructor(Node* context, Node* object,
Node* default_constructor) {
Isolate* isolate = this->isolate();
Variable var_result(this, MachineRepresentation::kTagged);
VARIABLE(var_result, MachineRepresentation::kTagged);
var_result.Bind(default_constructor);
// 2. Let C be ? Get(O, "constructor").
......@@ -372,9 +372,9 @@ Node* PromiseBuiltinsAssembler::InternalPromiseThen(Node* context,
Callable call_callable = CodeFactory::Call(isolate);
Label fast_promise_capability(this), promise_capability(this),
perform_promise_then(this);
Variable var_deferred_promise(this, MachineRepresentation::kTagged),
var_deferred_on_resolve(this, MachineRepresentation::kTagged),
var_deferred_on_reject(this, MachineRepresentation::kTagged);
VARIABLE(var_deferred_promise, MachineRepresentation::kTagged);
VARIABLE(var_deferred_on_resolve, MachineRepresentation::kTagged);
VARIABLE(var_deferred_on_reject, MachineRepresentation::kTagged);
Branch(WordEqual(promise_fun, constructor), &fast_promise_capability,
&promise_capability);
......@@ -413,8 +413,8 @@ Node* PromiseBuiltinsAssembler::InternalPerformPromiseThen(
Node* context, Node* promise, Node* on_resolve, Node* on_reject,
Node* deferred_promise, Node* deferred_on_resolve,
Node* deferred_on_reject) {
Variable var_on_resolve(this, MachineRepresentation::kTagged),
var_on_reject(this, MachineRepresentation::kTagged);
VARIABLE(var_on_resolve, MachineRepresentation::kTagged);
VARIABLE(var_on_reject, MachineRepresentation::kTagged);
var_on_resolve.Bind(on_resolve);
var_on_reject.Bind(on_reject);
......@@ -665,8 +665,8 @@ void PromiseBuiltinsAssembler::InternalResolvePromise(Node* context,
Node* result) {
Isolate* isolate = this->isolate();
Variable var_reason(this, MachineRepresentation::kTagged),
var_then(this, MachineRepresentation::kTagged);
VARIABLE(var_reason, MachineRepresentation::kTagged);
VARIABLE(var_then, MachineRepresentation::kTagged);
Label do_enqueue(this), fulfill(this), if_cycle(this, Label::kDeferred),
if_rejectpromise(this, Label::kDeferred), out(this);
......@@ -884,7 +884,7 @@ void PromiseBuiltinsAssembler::PromiseFulfill(
void PromiseBuiltinsAssembler::BranchIfAccessCheckFailed(
Node* context, Node* native_context, Node* promise_constructor,
Node* executor, Label* if_noaccess) {
Variable var_executor(this, MachineRepresentation::kTagged);
VARIABLE(var_executor, MachineRepresentation::kTagged);
var_executor.Bind(executor);
Label has_access(this), call_runtime(this, Label::kDeferred);
......@@ -1038,9 +1038,9 @@ TF_BUILTIN(PromiseConstructor, PromiseBuiltinsAssembler) {
Branch(WordEqual(promise_fun, new_target), &if_targetisnotmodified,
&if_targetismodified);
Variable var_result(this, MachineRepresentation::kTagged),
var_reject_call(this, MachineRepresentation::kTagged),
var_reason(this, MachineRepresentation::kTagged);
VARIABLE(var_result, MachineRepresentation::kTagged);
VARIABLE(var_reject_call, MachineRepresentation::kTagged);
VARIABLE(var_reason, MachineRepresentation::kTagged);
BIND(&if_targetisnotmodified);
{
......@@ -1212,7 +1212,7 @@ TF_BUILTIN(PromiseHandleReject, PromiseBuiltinsAssembler) {
Node* const context = Parameter(Descriptor::kContext);
Callable call_callable = CodeFactory::Call(isolate());
Variable var_unused(this, MachineRepresentation::kTagged);
VARIABLE(var_unused, MachineRepresentation::kTagged);
Label if_internalhandler(this), if_customhandler(this, Label::kDeferred);
Branch(IsUndefined(on_reject), &if_internalhandler, &if_customhandler);
......@@ -1239,7 +1239,7 @@ TF_BUILTIN(PromiseHandle, PromiseBuiltinsAssembler) {
Node* const context = Parameter(Descriptor::kContext);
Isolate* isolate = this->isolate();
Variable var_reason(this, MachineRepresentation::kTagged);
VARIABLE(var_reason, MachineRepresentation::kTagged);
Node* const is_debug_active = IsDebugActive();
Label run_handler(this), if_rejectpromise(this), promisehook_before(this),
......@@ -1260,7 +1260,7 @@ TF_BUILTIN(PromiseHandle, PromiseBuiltinsAssembler) {
{
Label if_defaulthandler(this), if_callablehandler(this),
if_internalhandler(this), if_customhandler(this, Label::kDeferred);
Variable var_result(this, MachineRepresentation::kTagged);
VARIABLE(var_result, MachineRepresentation::kTagged);
Branch(IsSymbol(handler), &if_defaulthandler, &if_callablehandler);
......@@ -1707,8 +1707,8 @@ TF_BUILTIN(PromiseFinally, PromiseBuiltinsAssembler) {
ThrowIfNotInstanceType(context, promise, JS_PROMISE_TYPE,
"Promise.prototype.finally");
Variable var_then_finally(this, MachineRepresentation::kTagged),
var_catch_finally(this, MachineRepresentation::kTagged);
VARIABLE(var_then_finally, MachineRepresentation::kTagged);
VARIABLE(var_catch_finally, MachineRepresentation::kTagged);
Label if_notcallable(this, Label::kDeferred), perform_finally(this);
......
This diff is collapsed.
......@@ -81,7 +81,7 @@ void SharedArrayBufferBuiltinsAssembler::ValidateSharedTypedArray(
// https://tc39.github.io/ecmascript_sharedmem/shmem.html#Atomics.ValidateAtomicAccess
Node* SharedArrayBufferBuiltinsAssembler::ConvertTaggedAtomicIndexToWord32(
Node* tagged, Node* context, Node** number_index) {
Variable var_result(this, MachineRepresentation::kWord32);
VARIABLE(var_result, MachineRepresentation::kWord32);
// TODO(jkummerow): Skip ToNumber call when |tagged| is a number already.
// Maybe this can be unified with other tagged-to-index conversions?
......
......@@ -22,7 +22,7 @@ class StringBuiltinsAssembler : public CodeStubAssembler {
protected:
Node* DirectStringData(Node* string, Node* string_instance_type) {
// Compute the effective offset of the first character.
Variable var_data(this, MachineType::PointerRepresentation());
VARIABLE(var_data, MachineType::PointerRepresentation());
Label if_sequential(this), if_external(this), if_join(this);
Branch(Word32Equal(Word32And(string_instance_type,
Int32Constant(kStringRepresentationMask)),
......@@ -159,8 +159,8 @@ void StringBuiltinsAssembler::GenerateStringEqual(Node* context, Node* left,
// }
// return %StringEqual(lhs, rhs);
Variable var_left(this, MachineRepresentation::kTagged, left);
Variable var_right(this, MachineRepresentation::kTagged, right);
VARIABLE(var_left, MachineRepresentation::kTagged, left);
VARIABLE(var_right, MachineRepresentation::kTagged, right);
Variable* input_vars[2] = {&var_left, &var_right};
Label if_equal(this), if_notequal(this), restart(this, 2, input_vars);
......@@ -223,7 +223,7 @@ void StringBuiltinsAssembler::GenerateStringEqual(Node* context, Node* left,
Node* length = SmiUntag(lhs_length);
// Loop over the {lhs} and {rhs} strings to see if they are equal.
Variable var_offset(this, MachineType::PointerRepresentation());
VARIABLE(var_offset, MachineType::PointerRepresentation());
Label loop(this, &var_offset);
var_offset.Bind(IntPtrConstant(0));
Goto(&loop);
......@@ -266,8 +266,8 @@ void StringBuiltinsAssembler::GenerateStringEqual(Node* context, Node* left,
void StringBuiltinsAssembler::GenerateStringRelationalComparison(
Node* context, Node* left, Node* right, RelationalComparisonMode mode) {
Variable var_left(this, MachineRepresentation::kTagged, left);
Variable var_right(this, MachineRepresentation::kTagged, right);
VARIABLE(var_left, MachineRepresentation::kTagged, left);
VARIABLE(var_right, MachineRepresentation::kTagged, right);
Variable* input_vars[2] = {&var_left, &var_right};
Label if_less(this), if_equal(this), if_greater(this);
......@@ -319,7 +319,7 @@ void StringBuiltinsAssembler::GenerateStringRelationalComparison(
Node* end = IntPtrAdd(begin, SmiUntag(length));
// Loop over the {lhs} and {rhs} strings to see if they are equal.
Variable var_offset(this, MachineType::PointerRepresentation());
VARIABLE(var_offset, MachineType::PointerRepresentation());
Label loop(this, &var_offset);
var_offset.Bind(begin);
Goto(&loop);
......@@ -527,7 +527,7 @@ TF_BUILTIN(StringFromCharCode, CodeStubAssembler) {
// Assume that the resulting string contains only one-byte characters.
Node* one_byte_result = AllocateSeqOneByteString(context, argc);
Variable max_index(this, MachineType::PointerRepresentation());
VARIABLE(max_index, MachineType::PointerRepresentation());
max_index.Bind(IntPtrConstant(0));
// Iterate over the incoming arguments, converting them to 8-bit character
......@@ -692,7 +692,7 @@ TF_BUILTIN(StringPrototypeConcat, CodeStubAssembler) {
receiver = ToThisString(context, receiver, "String.prototype.concat");
// Concatenate all the arguments passed to this builtin.
Variable var_result(this, MachineRepresentation::kTagged);
VARIABLE(var_result, MachineRepresentation::kTagged);
var_result.Bind(receiver);
arguments.ForEach(
CodeStubAssembler::VariableList({&var_result}, zone()),
......@@ -717,10 +717,8 @@ void StringBuiltinsAssembler::StringIndexOf(
check_search_string(this), continue_fast_path(this);
Node* const int_zero = IntPtrConstant(0);
Variable var_needle_byte(this, MachineType::PointerRepresentation(),
int_zero);
Variable var_string_addr(this, MachineType::PointerRepresentation(),
int_zero);
VARIABLE(var_needle_byte, MachineType::PointerRepresentation(), int_zero);
VARIABLE(var_string_addr, MachineType::PointerRepresentation(), int_zero);
Node* needle_length = SmiUntag(LoadStringLength(search_string));
// Use faster/complex runtime fallback for long search strings.
......@@ -845,8 +843,8 @@ TF_BUILTIN(StringIndexOf, StringBuiltinsAssembler) {
// ES6 String.prototype.indexOf(searchString [, position])
// #sec-string.prototype.indexof
TF_BUILTIN(StringPrototypeIndexOf, StringBuiltinsAssembler) {
Variable search_string(this, MachineRepresentation::kTagged),
position(this, MachineRepresentation::kTagged);
VARIABLE(search_string, MachineRepresentation::kTagged);
VARIABLE(position, MachineRepresentation::kTagged);
Label call_runtime(this), call_runtime_unchecked(this), argc_0(this),
no_argc_0(this), argc_1(this), no_argc_1(this), argc_2(this),
fast_path(this), return_minus_1(this);
......@@ -1100,8 +1098,7 @@ TF_BUILTIN(StringPrototypeReplace, StringBuiltinsAssembler) {
Callable stringadd_callable =
CodeFactory::StringAdd(isolate(), STRING_ADD_CHECK_NONE, NOT_TENURED);
Variable var_result(this, MachineRepresentation::kTagged,
EmptyStringConstant());
VARIABLE(var_result, MachineRepresentation::kTagged, EmptyStringConstant());
// Compute the prefix.
{
......@@ -1268,8 +1265,8 @@ TF_BUILTIN(StringPrototypeSplit, StringBuiltinsAssembler) {
TF_BUILTIN(StringPrototypeSubstr, CodeStubAssembler) {
Label out(this), handle_length(this);
Variable var_start(this, MachineRepresentation::kTagged);
Variable var_length(this, MachineRepresentation::kTagged);
VARIABLE(var_start, MachineRepresentation::kTagged);
VARIABLE(var_length, MachineRepresentation::kTagged);
Node* const receiver = Parameter(Descriptor::kReceiver);
Node* const start = Parameter(Descriptor::kStart);
......@@ -1388,7 +1385,7 @@ compiler::Node* StringBuiltinsAssembler::ToSmiBetweenZeroAnd(Node* context,
Node* value,
Node* limit) {
Label out(this);
Variable var_result(this, MachineRepresentation::kTagged);
VARIABLE(var_result, MachineRepresentation::kTagged);
Node* const value_int =
this->ToInteger(context, value, CodeStubAssembler::kTruncateMinusZero);
......@@ -1437,8 +1434,8 @@ compiler::Node* StringBuiltinsAssembler::ToSmiBetweenZeroAnd(Node* context,
TF_BUILTIN(StringPrototypeSubstring, StringBuiltinsAssembler) {
Label out(this);
Variable var_start(this, MachineRepresentation::kTagged);
Variable var_end(this, MachineRepresentation::kTagged);
VARIABLE(var_start, MachineRepresentation::kTagged);
VARIABLE(var_end, MachineRepresentation::kTagged);
Node* const receiver = Parameter(Descriptor::kReceiver);
Node* const start = Parameter(Descriptor::kStart);
......@@ -1532,8 +1529,8 @@ compiler::Node* StringBuiltinsAssembler::LoadSurrogatePairAt(
compiler::Node* string, compiler::Node* length, compiler::Node* index,
UnicodeEncoding encoding) {
Label handle_surrogate_pair(this), return_result(this);
Variable var_result(this, MachineRepresentation::kWord32);
Variable var_trail(this, MachineRepresentation::kWord32);
VARIABLE(var_result, MachineRepresentation::kWord32);
VARIABLE(var_trail, MachineRepresentation::kWord32);
var_result.Bind(StringCharCodeAt(string, index));
var_trail.Bind(Int32Constant(0));
......@@ -1593,8 +1590,8 @@ compiler::Node* StringBuiltinsAssembler::LoadSurrogatePairAt(
// ES6 #sec-%stringiteratorprototype%.next
TF_BUILTIN(StringIteratorPrototypeNext, StringBuiltinsAssembler) {
Variable var_value(this, MachineRepresentation::kTagged);
Variable var_done(this, MachineRepresentation::kTagged);
VARIABLE(var_value, MachineRepresentation::kTagged);
VARIABLE(var_done, MachineRepresentation::kTagged);
var_value.Bind(UndefinedConstant());
var_done.Bind(BooleanConstant(true));
......
......@@ -109,9 +109,9 @@ void TypedArrayBuiltinsAssembler::DoInitialize(Node* const holder, Node* length,
Label setup_holder(this), alloc_array_buffer(this), aligned(this),
allocate_elements(this), attach_buffer(this), done(this);
Variable fixed_typed_map(this, MachineRepresentation::kTagged);
Variable element_size(this, MachineRepresentation::kTagged);
Variable total_size(this, MachineType::PointerRepresentation());
VARIABLE(fixed_typed_map, MachineRepresentation::kTagged);
VARIABLE(element_size, MachineRepresentation::kTagged);
VARIABLE(total_size, MachineType::PointerRepresentation());
// Make sure length is a Smi. The caller guarantees this is the case.
length = ToInteger(context, length, CodeStubAssembler::kTruncateMinusZero);
......@@ -291,7 +291,7 @@ void TypedArrayBuiltinsAssembler::InitializeBasedOnLength(
Node* const byte_offset, Node* const initialize, Node* const context) {
Label allocate_buffer(this), allocate_buffer_noinit(this), do_init(this);
Variable maybe_buffer(this, MachineRepresentation::kTagged, NullConstant());
VARIABLE(maybe_buffer, MachineRepresentation::kTagged, NullConstant());
// SmiMul returns a heap number in case of Smi overflow.
Node* byte_length = SmiMul(length, element_size);
......@@ -370,9 +370,8 @@ TF_BUILTIN(TypedArrayConstructByArrayBuffer, TypedArrayBuiltinsAssembler) {
Node* const context = Parameter(Descriptor::kContext);
Node* const initialize = BooleanConstant(true);
Variable new_byte_length(this, MachineRepresentation::kTagged,
SmiConstant(0));
Variable offset(this, MachineRepresentation::kTagged, SmiConstant(0));
VARIABLE(new_byte_length, MachineRepresentation::kTagged, SmiConstant(0));
VARIABLE(offset, MachineRepresentation::kTagged, SmiConstant(0));
Label start_offset_error(this, Label::kDeferred),
byte_length_error(this, Label::kDeferred),
......@@ -514,7 +513,7 @@ compiler::Node* TypedArrayBuiltinsAssembler::LoadDataPtr(Node* typed_array) {
compiler::Node* TypedArrayBuiltinsAssembler::ByteLengthIsValid(
Node* byte_length) {
Label smi(this), done(this);
Variable is_valid(this, MachineRepresentation::kWord32);
VARIABLE(is_valid, MachineRepresentation::kWord32);
GotoIf(TaggedIsSmi(byte_length), &smi);
CSA_ASSERT(this, IsHeapNumber(byte_length));
......@@ -684,7 +683,7 @@ void TypedArrayBuiltinsAssembler::GenerateTypedArrayPrototypeIterationMethod(
Return(CreateArrayIterator(receiver, map, instance_type, context,
iteration_kind));
Variable var_message(this, MachineRepresentation::kTagged);
VARIABLE(var_message, MachineRepresentation::kTagged);
BIND(&throw_bad_receiver);
var_message.Bind(SmiConstant(MessageTemplate::kNotTypedArray));
Goto(&throw_typeerror);
......
This diff is collapsed.
......@@ -1477,7 +1477,7 @@ class ToDirectStringAssembler : public CodeStubAssembler {
#define BIND(label) Bind(label, {#label, __FILE__, __LINE__})
#define VARIABLE(name, ...) \
Variable name(this, #name, {__FILE__, __LINE__, __VA_ARGS__});
Variable name(this, {#name, __FILE__, __LINE__}, __VA_ARGS__);
#else // DEBUG
#define CSA_ASSERT(csa, x) ((void)0)
......
......@@ -829,13 +829,13 @@ TF_STUB(GetPropertyStub, CodeStubAssembler) {
Node* object = Parameter(Descriptor::kObject);
Node* key = Parameter(Descriptor::kKey);
Node* context = Parameter(Descriptor::kContext);
Variable var_result(this, MachineRepresentation::kTagged);
VARIABLE(var_result, MachineRepresentation::kTagged);
CodeStubAssembler::LookupInHolder lookup_property_in_holder =
[=, &var_result, &end](Node* receiver, Node* holder, Node* holder_map,
Node* holder_instance_type, Node* unique_name,
Label* next_holder, Label* if_bailout) {
Variable var_value(this, MachineRepresentation::kTagged);
VARIABLE(var_value, MachineRepresentation::kTagged);
Label if_found(this);
TryGetOwnProperty(context, receiver, holder, holder_map,
holder_instance_type, unique_name, &if_found,
......
This diff is collapsed.
......@@ -19,10 +19,10 @@ Node* BinaryOpAssembler::Generate_AddWithFeedback(Node* context, Node* lhs,
check_rhsisoddball(this, Label::kDeferred),
call_with_oddball_feedback(this), call_with_any_feedback(this),
call_add_stub(this), end(this);
Variable var_fadd_lhs(this, MachineRepresentation::kFloat64),
var_fadd_rhs(this, MachineRepresentation::kFloat64),
var_type_feedback(this, MachineRepresentation::kTaggedSigned),
var_result(this, MachineRepresentation::kTagged);
VARIABLE(var_fadd_lhs, MachineRepresentation::kFloat64);
VARIABLE(var_fadd_rhs, MachineRepresentation::kFloat64);
VARIABLE(var_type_feedback, MachineRepresentation::kTaggedSigned);
VARIABLE(var_result, MachineRepresentation::kTagged);
// Check if the {lhs} is a Smi or a HeapObject.
Label if_lhsissmi(this), if_lhsisnotsmi(this);
......@@ -206,10 +206,10 @@ Node* BinaryOpAssembler::Generate_SubtractWithFeedback(Node* context, Node* lhs,
Label do_fsub(this), end(this), call_subtract_stub(this),
if_lhsisnotnumber(this), check_rhsisoddball(this),
call_with_any_feedback(this);
Variable var_fsub_lhs(this, MachineRepresentation::kFloat64),
var_fsub_rhs(this, MachineRepresentation::kFloat64),
var_type_feedback(this, MachineRepresentation::kTaggedSigned),
var_result(this, MachineRepresentation::kTagged);
VARIABLE(var_fsub_lhs, MachineRepresentation::kFloat64);
VARIABLE(var_fsub_rhs, MachineRepresentation::kFloat64);
VARIABLE(var_type_feedback, MachineRepresentation::kTaggedSigned);
VARIABLE(var_result, MachineRepresentation::kTagged);
// Check if the {lhs} is a Smi or a HeapObject.
Label if_lhsissmi(this), if_lhsisnotsmi(this);
......@@ -382,10 +382,10 @@ Node* BinaryOpAssembler::Generate_MultiplyWithFeedback(Node* context, Node* lhs,
check_rhsisoddball(this, Label::kDeferred),
call_with_oddball_feedback(this), call_with_any_feedback(this),
call_multiply_stub(this), end(this);
Variable var_lhs_float64(this, MachineRepresentation::kFloat64),
var_rhs_float64(this, MachineRepresentation::kFloat64),
var_result(this, MachineRepresentation::kTagged),
var_type_feedback(this, MachineRepresentation::kTaggedSigned);
VARIABLE(var_lhs_float64, MachineRepresentation::kFloat64);
VARIABLE(var_rhs_float64, MachineRepresentation::kFloat64);
VARIABLE(var_result, MachineRepresentation::kTagged);
VARIABLE(var_type_feedback, MachineRepresentation::kTaggedSigned);
Label lhs_is_smi(this), lhs_is_not_smi(this);
Branch(TaggedIsSmi(lhs), &lhs_is_smi, &lhs_is_not_smi);
......@@ -529,10 +529,10 @@ Node* BinaryOpAssembler::Generate_DivideWithFeedback(Node* context,
check_divisor_for_oddball(this, Label::kDeferred),
call_with_oddball_feedback(this), call_with_any_feedback(this),
call_divide_stub(this), end(this);
Variable var_dividend_float64(this, MachineRepresentation::kFloat64),
var_divisor_float64(this, MachineRepresentation::kFloat64),
var_result(this, MachineRepresentation::kTagged),
var_type_feedback(this, MachineRepresentation::kTaggedSigned);
VARIABLE(var_dividend_float64, MachineRepresentation::kFloat64);
VARIABLE(var_divisor_float64, MachineRepresentation::kFloat64);
VARIABLE(var_result, MachineRepresentation::kTagged);
VARIABLE(var_type_feedback, MachineRepresentation::kTaggedSigned);
Label dividend_is_smi(this), dividend_is_not_smi(this);
Branch(TaggedIsSmi(dividend), &dividend_is_smi, &dividend_is_not_smi);
......@@ -724,10 +724,10 @@ Node* BinaryOpAssembler::Generate_ModulusWithFeedback(Node* context,
check_divisor_for_oddball(this, Label::kDeferred),
call_with_oddball_feedback(this), call_with_any_feedback(this),
call_modulus_stub(this), end(this);
Variable var_dividend_float64(this, MachineRepresentation::kFloat64),
var_divisor_float64(this, MachineRepresentation::kFloat64),
var_result(this, MachineRepresentation::kTagged),
var_type_feedback(this, MachineRepresentation::kTaggedSigned);
VARIABLE(var_dividend_float64, MachineRepresentation::kFloat64);
VARIABLE(var_divisor_float64, MachineRepresentation::kFloat64);
VARIABLE(var_result, MachineRepresentation::kTagged);
VARIABLE(var_type_feedback, MachineRepresentation::kTaggedSigned);
Label dividend_is_smi(this), dividend_is_not_smi(this);
Branch(TaggedIsSmi(dividend), &dividend_is_smi, &dividend_is_not_smi);
......
......@@ -100,7 +100,7 @@ void StoreICUninitializedGenerator::Generate(
void KeyedStoreGenericAssembler::BranchIfPrototypesHaveNonFastElements(
Node* receiver_map, Label* non_fast_elements, Label* only_fast_elements) {
Variable var_map(this, MachineRepresentation::kTagged);
VARIABLE(var_map, MachineRepresentation::kTagged);
var_map.Bind(receiver_map);
Label loop_body(this, &var_map);
Goto(&loop_body);
......@@ -136,7 +136,7 @@ void KeyedStoreGenericAssembler::TryRewriteElements(
TrapAllocationMemento(receiver, bailout);
}
Label perform_transition(this), check_holey_map(this);
Variable var_target_map(this, MachineRepresentation::kTagged);
VARIABLE(var_target_map, MachineRepresentation::kTagged);
// Check if the receiver has the default |from_kind| map.
{
Node* packed_map =
......@@ -521,9 +521,9 @@ void KeyedStoreGenericAssembler::LookupPropertyOnPrototypeChain(
Variable* var_accessor_pair, Variable* var_accessor_holder, Label* readonly,
Label* bailout) {
Label ok_to_write(this);
Variable var_holder(this, MachineRepresentation::kTagged);
VARIABLE(var_holder, MachineRepresentation::kTagged);
var_holder.Bind(LoadMapPrototype(receiver_map));
Variable var_holder_map(this, MachineRepresentation::kTagged);
VARIABLE(var_holder_map, MachineRepresentation::kTagged);
var_holder_map.Bind(LoadMap(var_holder.value()));
Variable* merged_variables[] = {&var_holder, &var_holder_map};
......@@ -537,8 +537,8 @@ void KeyedStoreGenericAssembler::LookupPropertyOnPrototypeChain(
Label next_proto(this);
{
Label found(this), found_fast(this), found_dict(this), found_global(this);
Variable var_meta_storage(this, MachineRepresentation::kTagged);
Variable var_entry(this, MachineType::PointerRepresentation());
VARIABLE(var_meta_storage, MachineRepresentation::kTagged);
VARIABLE(var_entry, MachineType::PointerRepresentation());
TryLookupProperty(holder, holder_map, instance_type, name, &found_fast,
&found_dict, &found_global, &var_meta_storage,
&var_entry, &next_proto, bailout);
......@@ -552,7 +552,7 @@ void KeyedStoreGenericAssembler::LookupPropertyOnPrototypeChain(
// Accessor case.
// TODO(jkummerow): Implement a trimmed-down LoadAccessorFromFastObject.
Variable var_details(this, MachineRepresentation::kWord32);
VARIABLE(var_details, MachineRepresentation::kWord32);
LoadPropertyFromFastObject(holder, holder_map, descriptors, name_index,
&var_details, var_accessor_pair);
var_accessor_holder->Bind(holder);
......@@ -750,8 +750,8 @@ void KeyedStoreGenericAssembler::OverwriteExistingFastProperty(
void KeyedStoreGenericAssembler::EmitGenericPropertyStore(
Node* receiver, Node* receiver_map, const StoreICParameters* p, Label* slow,
LanguageMode language_mode, UseStubCache use_stub_cache) {
Variable var_accessor_pair(this, MachineRepresentation::kTagged);
Variable var_accessor_holder(this, MachineRepresentation::kTagged);
VARIABLE(var_accessor_pair, MachineRepresentation::kTagged);
VARIABLE(var_accessor_holder, MachineRepresentation::kTagged);
Label stub_cache(this), fast_properties(this), dictionary_properties(this),
accessor(this), readonly(this);
Node* properties = LoadProperties(receiver);
......@@ -765,7 +765,7 @@ void KeyedStoreGenericAssembler::EmitGenericPropertyStore(
Node* bitfield3 = LoadMapBitField3(receiver_map);
Node* descriptors = LoadMapDescriptors(receiver_map);
Label descriptor_found(this);
Variable var_name_index(this, MachineType::PointerRepresentation());
VARIABLE(var_name_index, MachineType::PointerRepresentation());
// TODO(jkummerow): Maybe look for existing map transitions?
Label* notfound = use_stub_cache == kUseStubCache ? &stub_cache : slow;
DescriptorLookup(p->name, descriptors, bitfield3, &descriptor_found,
......@@ -781,7 +781,7 @@ void KeyedStoreGenericAssembler::EmitGenericPropertyStore(
// Accessor case.
// TODO(jkummerow): Implement a trimmed-down LoadAccessorFromFastObject.
Variable var_details(this, MachineRepresentation::kWord32);
VARIABLE(var_details, MachineRepresentation::kWord32);
LoadPropertyFromFastObject(receiver, receiver_map, descriptors,
name_index, &var_details, &var_accessor_pair);
var_accessor_holder.Bind(receiver);
......@@ -803,7 +803,7 @@ void KeyedStoreGenericAssembler::EmitGenericPropertyStore(
// We checked for LAST_CUSTOM_ELEMENTS_RECEIVER before, which rules out
// seeing global objects here (which would need special handling).
Variable var_name_index(this, MachineType::PointerRepresentation());
VARIABLE(var_name_index, MachineType::PointerRepresentation());
Label dictionary_found(this, &var_name_index), not_found(this);
NameDictionaryLookup<NameDictionary>(properties, p->name, &dictionary_found,
&var_name_index, &not_found);
......@@ -892,7 +892,7 @@ void KeyedStoreGenericAssembler::EmitGenericPropertyStore(
if (use_stub_cache == kUseStubCache) {
BIND(&stub_cache);
Comment("stub cache probe");
Variable var_handler(this, MachineRepresentation::kTagged);
VARIABLE(var_handler, MachineRepresentation::kTagged);
Label found_handler(this, &var_handler), stub_cache_miss(this);
TryProbeStubCache(isolate()->store_stub_cache(), receiver, p->name,
&found_handler, &var_handler, &stub_cache_miss);
......@@ -920,8 +920,8 @@ void KeyedStoreGenericAssembler::KeyedStoreGeneric(LanguageMode language_mode) {
Node* vector = Parameter(Descriptor::kVector);
Node* context = Parameter(Descriptor::kContext);
Variable var_index(this, MachineType::PointerRepresentation());
Variable var_unique(this, MachineRepresentation::kTagged);
VARIABLE(var_index, MachineType::PointerRepresentation());
VARIABLE(var_unique, MachineRepresentation::kTagged);
var_unique.Bind(name); // Dummy initialization.
Label if_index(this), if_unique_name(this), slow(this);
......
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