Commit fb640997 authored by Camillo Bruni's avatar Camillo Bruni Committed by Commit Bot

[csa] Use BIND macro for debug information

Change-Id: Ie84fbc26a3f3782564f3d0734c284f19a75853f3
Reviewed-on: https://chromium-review.googlesource.com/469826Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44438}
parent 076360c0
......@@ -53,7 +53,7 @@ ArgumentsBuiltinsAssembler::GetArgumentsFrameAndCount(Node* function,
argument_count.Bind(TaggedToParameter(adapted_parameter_count, mode));
Goto(&done_argument_count);
Bind(&done_argument_count);
BIND(&done_argument_count);
return std::tuple<Node*, Node*, Node*>(
frame_ptr.value(), argument_count.value(), formal_parameter_count);
}
......@@ -179,7 +179,7 @@ Node* ArgumentsBuiltinsAssembler::EmitFastNewRestParameter(Node* context,
mode, JSArray::kSize));
Goto(&done);
Bind(&no_rest_parameters);
BIND(&no_rest_parameters);
{
Node* arguments;
Node* elements;
......@@ -190,13 +190,13 @@ Node* ArgumentsBuiltinsAssembler::EmitFastNewRestParameter(Node* context,
Goto(&done);
}
Bind(&runtime);
BIND(&runtime);
{
result.Bind(CallRuntime(Runtime::kNewRestParameter, context, function));
Goto(&done);
}
Bind(&done);
BIND(&done);
return result.value();
}
......@@ -235,7 +235,7 @@ Node* ArgumentsBuiltinsAssembler::EmitFastNewStrictArguments(Node* context,
JSStrictArgumentsObject::kSize));
Goto(&done);
Bind(&empty);
BIND(&empty);
{
Node* arguments;
Node* elements;
......@@ -246,13 +246,13 @@ Node* ArgumentsBuiltinsAssembler::EmitFastNewStrictArguments(Node* context,
Goto(&done);
}
Bind(&runtime);
BIND(&runtime);
{
result.Bind(CallRuntime(Runtime::kNewStrictArguments, context, function));
Goto(&done);
}
Bind(&done);
BIND(&done);
return result.value();
}
......@@ -372,7 +372,7 @@ Node* ArgumentsBuiltinsAssembler::EmitFastNewSloppyArguments(Node* context,
Goto(&done);
}
Bind(&no_parameters);
BIND(&no_parameters);
{
Comment("No parameters JSSloppyArgumentsObject");
GotoIfFixedArraySizeDoesntFitInNewSpace(
......@@ -389,7 +389,7 @@ Node* ArgumentsBuiltinsAssembler::EmitFastNewSloppyArguments(Node* context,
Goto(&done);
}
Bind(&empty);
BIND(&empty);
{
Comment("Empty JSSloppyArgumentsObject");
Node* const native_context = LoadNativeContext(context);
......@@ -406,13 +406,13 @@ Node* ArgumentsBuiltinsAssembler::EmitFastNewSloppyArguments(Node* context,
Goto(&done);
}
Bind(&runtime);
BIND(&runtime);
{
result.Bind(CallRuntime(Runtime::kNewSloppyArguments, context, function));
Goto(&done);
}
Bind(&done);
BIND(&done);
return result.value();
}
......
This diff is collapsed.
......@@ -169,7 +169,7 @@ TF_BUILTIN(AsyncFunctionPromiseCreate, AsyncFunctionBuiltinsAssembler) {
// Early exit if debug is not active.
Return(promise);
Bind(&if_is_debug_active);
BIND(&if_is_debug_active);
{
// Push the Promise under construction in an async function on
// the catch prediction stack to handle exceptions thrown before
......@@ -192,7 +192,7 @@ TF_BUILTIN(AsyncFunctionPromiseRelease, AsyncFunctionBuiltinsAssembler) {
// Early exit if debug is not active.
Return(UndefinedConstant());
Bind(&if_is_debug_active);
BIND(&if_is_debug_active);
{
// Pop the Promise under construction in an async function on
// from catch prediction stack.
......
......@@ -76,7 +76,7 @@ Node* AsyncBuiltinsAssembler::Await(
}
Goto(&common);
Bind(&common);
BIND(&common);
// Mark the dependency to outer Promise in case the throwaway Promise is
// found on the Promise stack
CSA_SLOW_ASSERT(this, HasInstanceType(outer_promise, JS_PROMISE_TYPE));
......@@ -87,7 +87,7 @@ Node* AsyncBuiltinsAssembler::Await(
}
Goto(&do_perform_promise_then);
Bind(&do_perform_promise_then);
BIND(&do_perform_promise_then);
InternalPerformPromiseThen(context, wrapped_value, on_resolve, on_reject,
throwaway_promise, UndefinedConstant(),
UndefinedConstant());
......
......@@ -153,7 +153,7 @@ void AsyncGeneratorBuiltinsAssembler::AsyncGeneratorEnqueue(
Branch(HasInstanceType(generator, JS_ASYNC_GENERATOR_OBJECT_TYPE), &enqueue,
&if_receiverisincompatible);
Bind(&enqueue);
BIND(&enqueue);
{
Label done(this);
Node* const req =
......@@ -174,11 +174,11 @@ void AsyncGeneratorBuiltinsAssembler::AsyncGeneratorEnqueue(
CallBuiltin(Builtins::kAsyncGeneratorResumeNext, context, generator);
Goto(&done);
Bind(&done);
BIND(&done);
Return(promise);
}
Bind(&if_receiverisincompatible);
BIND(&if_receiverisincompatible);
{
Node* const error =
MakeTypeError(MessageTemplate::kIncompatibleMethodReceiver, context,
......@@ -282,32 +282,32 @@ void AsyncGeneratorBuiltinsAssembler::AddAsyncGeneratorRequestToQueue(
LoadObjectField(generator, JSAsyncGeneratorObject::kQueueOffset));
Branch(IsUndefined(var_current.value()), &empty, &loop);
Bind(&empty);
BIND(&empty);
{
StoreObjectField(generator, JSAsyncGeneratorObject::kQueueOffset, request);
Goto(&done);
}
Bind(&loop);
BIND(&loop);
{
Label loop_next(this), next_empty(this);
Node* current = var_current.value();
Node* next = LoadObjectField(current, AsyncGeneratorRequest::kNextOffset);
Branch(IsUndefined(next), &next_empty, &loop_next);
Bind(&next_empty);
BIND(&next_empty);
{
StoreObjectField(current, AsyncGeneratorRequest::kNextOffset, request);
Goto(&done);
}
Bind(&loop_next);
BIND(&loop_next);
{
var_current.Bind(next);
Goto(&loop);
}
}
Bind(&done);
BIND(&done);
}
Node* AsyncGeneratorBuiltinsAssembler::TakeFirstAsyncGeneratorRequestFromQueue(
......@@ -399,7 +399,7 @@ TF_BUILTIN(AsyncGeneratorRawYield, AsyncGeneratorBuiltinsAssembler) {
var_done.Bind(LoadObjectField(iter_result, JSIteratorResult::kDoneOffset));
Goto(&async_generator_resolve);
Bind(&if_slow);
BIND(&if_slow);
{
var_value.Bind(
GetProperty(context, iter_result, factory()->value_string()));
......@@ -413,7 +413,7 @@ TF_BUILTIN(AsyncGeneratorRawYield, AsyncGeneratorBuiltinsAssembler) {
Goto(&async_generator_resolve);
}
Bind(&async_generator_resolve);
BIND(&async_generator_resolve);
Node* const value = var_value.value();
Node* const done = var_done.value();
CallBuiltin(Builtins::kAsyncGeneratorResolve, context, generator, value,
......@@ -465,7 +465,7 @@ TF_BUILTIN(AsyncGeneratorResumeNext, AsyncGeneratorBuiltinsAssembler) {
Variable* labels[] = {&var_state, &var_next};
Label start(this, 2, labels);
Goto(&start);
Bind(&start);
BIND(&start);
CSA_ASSERT(this, IsGeneratorNotExecuting(generator));
......@@ -480,7 +480,7 @@ TF_BUILTIN(AsyncGeneratorResumeNext, AsyncGeneratorBuiltinsAssembler) {
Label if_abrupt(this), if_normal(this), resume_generator(this);
Branch(IsAbruptResumeType(resume_type), &if_abrupt, &if_normal);
Bind(&if_abrupt);
BIND(&if_abrupt);
{
Label settle_promise(this), fulfill_promise(this), reject_promise(this);
GotoIfNot(IsGeneratorStateSuspendedAtStart(var_state.value()),
......@@ -489,27 +489,27 @@ TF_BUILTIN(AsyncGeneratorResumeNext, AsyncGeneratorBuiltinsAssembler) {
var_state.Bind(SmiConstant(JSGeneratorObject::kGeneratorClosed));
Goto(&settle_promise);
Bind(&settle_promise);
BIND(&settle_promise);
GotoIfNot(IsGeneratorStateClosed(var_state.value()), &resume_generator);
Branch(SmiEqual(resume_type, SmiConstant(JSGeneratorObject::kReturn)),
&fulfill_promise, &reject_promise);
Bind(&fulfill_promise);
BIND(&fulfill_promise);
CallBuiltin(Builtins::kAsyncGeneratorResolve, context, generator,
LoadValueFromAsyncGeneratorRequest(next), TrueConstant());
var_next.Bind(LoadFirstAsyncGeneratorRequestFromQueue(generator));
Goto(&start);
Bind(&reject_promise);
BIND(&reject_promise);
CallBuiltin(Builtins::kAsyncGeneratorReject, context, generator,
LoadValueFromAsyncGeneratorRequest(next));
var_next.Bind(LoadFirstAsyncGeneratorRequestFromQueue(generator));
Goto(&start);
}
Bind(&if_normal);
BIND(&if_normal);
{
GotoIfNot(IsGeneratorStateClosed(var_state.value()), &resume_generator);
CallBuiltin(Builtins::kAsyncGeneratorResolve, context, generator,
......@@ -519,7 +519,7 @@ TF_BUILTIN(AsyncGeneratorResumeNext, AsyncGeneratorBuiltinsAssembler) {
Goto(&start);
}
Bind(&resume_generator);
BIND(&resume_generator);
{
CallStub(CodeFactory::ResumeGenerator(isolate()), context,
LoadValueFromAsyncGeneratorRequest(next), generator, resume_type,
......
......@@ -58,7 +58,7 @@ void AsyncFromSyncBuiltinsAssembler::ThrowIfNotAsyncFromSyncIterator(
Branch(HasInstanceType(object, JS_ASYNC_FROM_SYNC_ITERATOR_TYPE), &done,
&if_receiverisincompatible);
Bind(&if_receiverisincompatible);
BIND(&if_receiverisincompatible);
{
// If Type(O) is not Object, or if O does not have a [[SyncIterator]]
// internal slot, then
......@@ -74,7 +74,7 @@ void AsyncFromSyncBuiltinsAssembler::ThrowIfNotAsyncFromSyncIterator(
Goto(if_exception);
}
Bind(&done);
BIND(&done);
}
void AsyncFromSyncBuiltinsAssembler::Generate_AsyncFromSyncIteratorMethod(
......@@ -105,7 +105,7 @@ void AsyncFromSyncBuiltinsAssembler::Generate_AsyncFromSyncIteratorMethod(
GotoIfNot(IsUndefined(method), &if_isnotundefined);
if_method_undefined(native_context, promise, &reject_promise);
Bind(&if_isnotundefined);
BIND(&if_isnotundefined);
}
Node* const iter_result = CallJS(CodeFactory::Call(isolate()), context,
......@@ -134,7 +134,7 @@ void AsyncFromSyncBuiltinsAssembler::Generate_AsyncFromSyncIteratorMethod(
undefined, undefined);
Return(promise);
Bind(&reject_promise);
BIND(&reject_promise);
{
Node* const exception = var_exception.value();
InternalPromiseReject(context, promise, exception, TrueConstant());
......@@ -161,7 +161,7 @@ std::pair<Node*, Node*> AsyncFromSyncBuiltinsAssembler::LoadIteratorResult(
Branch(WordEqual(iter_result_map, fast_iter_result_map), &if_fastpath,
&if_slowpath);
Bind(&if_fastpath);
BIND(&if_fastpath);
{
var_value.Bind(
LoadObjectField(iter_result, JSIteratorResult::kValueOffset));
......@@ -169,7 +169,7 @@ std::pair<Node*, Node*> AsyncFromSyncBuiltinsAssembler::LoadIteratorResult(
Goto(&merge);
}
Bind(&if_slowpath);
BIND(&if_slowpath);
{
// Let nextValue be IteratorValue(nextResult).
// IfAbruptRejectPromise(nextValue, promiseCapability).
......@@ -188,7 +188,7 @@ std::pair<Node*, Node*> AsyncFromSyncBuiltinsAssembler::LoadIteratorResult(
Goto(&merge);
}
Bind(&if_notanobject);
BIND(&if_notanobject);
{
// Sync iterator result is not an object --- Produce a TypeError and jump
// to the `if_exception` path.
......@@ -198,12 +198,12 @@ std::pair<Node*, Node*> AsyncFromSyncBuiltinsAssembler::LoadIteratorResult(
Goto(if_exception);
}
Bind(&merge);
BIND(&merge);
// Ensure `iterResult.done` is a Boolean.
GotoIf(TaggedIsSmi(var_done.value()), &to_boolean);
Branch(IsBoolean(var_done.value()), &done, &to_boolean);
Bind(&to_boolean);
BIND(&to_boolean);
{
Node* const result =
CallStub(CodeFactory::ToBoolean(isolate()), context, var_done.value());
......@@ -211,7 +211,7 @@ std::pair<Node*, Node*> AsyncFromSyncBuiltinsAssembler::LoadIteratorResult(
Goto(&done);
}
Bind(&done);
BIND(&done);
return std::make_pair(var_value.value(), var_done.value());
}
} // namespace
......
......@@ -77,7 +77,7 @@ Node* ConstructorBuiltinsAssembler::EmitFastNewClosure(Node* shared_info,
}
Goto(&if_function_without_prototype);
Bind(&if_normal);
BIND(&if_normal);
{
map_index.Bind(SelectIntPtrConstant(is_strict,
Context::STRICT_FUNCTION_MAP_INDEX,
......@@ -85,7 +85,7 @@ Node* ConstructorBuiltinsAssembler::EmitFastNewClosure(Node* shared_info,
Goto(&load_map);
}
Bind(&if_generator);
BIND(&if_generator);
{
Node* is_async =
Word32And(compiler_hints,
......@@ -97,26 +97,26 @@ Node* ConstructorBuiltinsAssembler::EmitFastNewClosure(Node* shared_info,
Goto(&load_map);
}
Bind(&if_async);
BIND(&if_async);
{
map_index.Bind(IntPtrConstant(Context::ASYNC_FUNCTION_MAP_INDEX));
Goto(&load_map);
}
Bind(&if_class_constructor);
BIND(&if_class_constructor);
{
map_index.Bind(IntPtrConstant(Context::CLASS_FUNCTION_MAP_INDEX));
Goto(&load_map);
}
Bind(&if_function_without_prototype);
BIND(&if_function_without_prototype);
{
map_index.Bind(
IntPtrConstant(Context::STRICT_FUNCTION_WITHOUT_PROTOTYPE_MAP_INDEX));
Goto(&load_map);
}
Bind(&load_map);
BIND(&load_map);
// Get the function map in the current native context and set that
// as the map of the allocated object.
......@@ -143,15 +143,15 @@ Node* ConstructorBuiltinsAssembler::EmitFastNewClosure(Node* shared_info,
CSA_ASSERT(this, IsManyClosuresCellMap(cell_map));
Goto(&cell_done);
Bind(&no_closures);
BIND(&no_closures);
StoreMapNoWriteBarrier(literals_cell, Heap::kOneClosureCellMapRootIndex);
Goto(&cell_done);
Bind(&one_closure);
BIND(&one_closure);
StoreMapNoWriteBarrier(literals_cell, Heap::kManyClosuresCellMapRootIndex);
Goto(&cell_done);
Bind(&cell_done);
BIND(&cell_done);
}
StoreObjectFieldNoWriteBarrier(result, JSFunction::kFeedbackVectorOffset,
literals_cell);
......@@ -193,7 +193,7 @@ TF_BUILTIN(FastNewObject, ConstructorBuiltinsAssembler) {
Node* result = EmitFastNewObject(context, target, new_target, &call_runtime);
Return(result);
Bind(&call_runtime);
BIND(&call_runtime);
TailCallRuntime(Runtime::kNewObject, context, target, new_target);
}
......@@ -207,11 +207,11 @@ Node* ConstructorBuiltinsAssembler::EmitFastNewObject(Node* context,
var_obj.Bind(result);
Goto(&end);
Bind(&call_runtime);
BIND(&call_runtime);
var_obj.Bind(CallRuntime(Runtime::kNewObject, context, target, new_target));
Goto(&end);
Bind(&end);
BIND(&end);
return var_obj.value();
}
......@@ -227,7 +227,7 @@ Node* ConstructorBuiltinsAssembler::EmitFastNewObject(Node* context,
GotoIf(HasInstanceType(new_target, JS_FUNCTION_TYPE), &fast);
Goto(call_runtime);
Bind(&fast);
BIND(&fast);
// Load the initial map and verify that it's in fact a map.
Node* initial_map =
......@@ -249,13 +249,13 @@ Node* ConstructorBuiltinsAssembler::EmitFastNewObject(Node* context,
properties.Bind(EmptyFixedArrayConstant());
Goto(&instantiate_map);
}
Bind(&allocate_properties);
BIND(&allocate_properties);
{
properties.Bind(AllocateNameDictionary(NameDictionary::kInitialCapacity));
Goto(&instantiate_map);
}
Bind(&instantiate_map);
BIND(&instantiate_map);
Node* object = AllocateJSObjectFromMap(initial_map, properties.value());
......@@ -278,7 +278,7 @@ Node* ConstructorBuiltinsAssembler::EmitFastNewObject(Node* context,
}
{
Bind(&slack_tracking);
BIND(&slack_tracking);
// Decrease generous allocation count.
STATIC_ASSERT(Map::ConstructionCounter::kNext == 32);
......@@ -308,7 +308,7 @@ Node* ConstructorBuiltinsAssembler::EmitFastNewObject(Node* context,
{
// Finalize the instance size.
Bind(&finalize);
BIND(&finalize);
Node* unused_fields = LoadObjectField(
initial_map, Map::kUnusedPropertyFieldsOffset, MachineType::Uint8());
......@@ -328,7 +328,7 @@ Node* ConstructorBuiltinsAssembler::EmitFastNewObject(Node* context,
Goto(&end);
}
Bind(&end);
BIND(&end);
return object;
}
......@@ -428,14 +428,14 @@ Node* ConstructorBuiltinsAssembler::EmitFastCloneRegExp(Node* closure,
Goto(&end);
}
Bind(&call_runtime);
BIND(&call_runtime);
{
result.Bind(CallRuntime(Runtime::kCreateRegExpLiteral, context, closure,
literal_index, pattern, flags));
Goto(&end);
}
Bind(&end);
BIND(&end);
return result.value();
}
......@@ -519,7 +519,7 @@ Node* ConstructorBuiltinsAssembler::EmitFastCloneShallowArray(
Branch(IsFixedDoubleArrayMap(elements_map), &correct_elements_map,
&abort);
Bind(&abort);
BIND(&abort);
{
Node* abort_id = SmiConstant(
Smi::FromInt(BailoutReason::kExpectedFixedDoubleArrayMap));
......@@ -527,7 +527,7 @@ Node* ConstructorBuiltinsAssembler::EmitFastCloneShallowArray(
result.Bind(UndefinedConstant());
Goto(&return_result);
}
Bind(&correct_elements_map);
BIND(&correct_elements_map);
}
Node* array =
......@@ -537,7 +537,7 @@ Node* ConstructorBuiltinsAssembler::EmitFastCloneShallowArray(
Goto(&return_result);
}
Bind(&fast_elements);
BIND(&fast_elements);
{
Comment("fast elements path");
Node* array =
......@@ -551,7 +551,7 @@ Node* ConstructorBuiltinsAssembler::EmitFastCloneShallowArray(
elements(this, MachineRepresentation::kTagged);
Label allocate_without_elements(this);
Bind(&cow_elements);
BIND(&cow_elements);
{
Comment("fixed cow path");
length.Bind(LoadJSArrayLength(boilerplate));
......@@ -560,7 +560,7 @@ Node* ConstructorBuiltinsAssembler::EmitFastCloneShallowArray(
Goto(&allocate_without_elements);
}
Bind(&zero_capacity);
BIND(&zero_capacity);
{
Comment("zero capacity path");
length.Bind(zero);
......@@ -569,7 +569,7 @@ Node* ConstructorBuiltinsAssembler::EmitFastCloneShallowArray(
Goto(&allocate_without_elements);
}
Bind(&allocate_without_elements);
BIND(&allocate_without_elements);
{
Node* array = AllocateUninitializedJSArrayWithoutElements(
FAST_ELEMENTS, boilerplate_map, length.value(), allocation_site);
......@@ -578,7 +578,7 @@ Node* ConstructorBuiltinsAssembler::EmitFastCloneShallowArray(
Goto(&return_result);
}
Bind(&return_result);
BIND(&return_result);
return result.value();
}
......@@ -594,7 +594,7 @@ void ConstructorBuiltinsAssembler::CreateFastCloneShallowArrayBuiltin(
Return(EmitFastCloneShallowArray(closure, literal_index, context,
&call_runtime, allocation_site_mode));
Bind(&call_runtime);
BIND(&call_runtime);
{
Comment("call runtime");
Node* flags =
......@@ -648,7 +648,7 @@ Node* ConstructorBuiltinsAssembler::EmitFastCloneShallowObject(
Label loop_body(this, &offset), loop_check(this, &offset);
// We should always have an object size greater than zero.
Goto(&loop_body);
Bind(&loop_body);
BIND(&loop_body);
{
// The Allocate above guarantees that the copy lies in new space. This
// allows us to skip write barriers. This is necessary since we may also be
......@@ -658,7 +658,7 @@ Node* ConstructorBuiltinsAssembler::EmitFastCloneShallowObject(
offset.value(), field);
Goto(&loop_check);
}
Bind(&loop_check);
BIND(&loop_check);
{
offset.Bind(IntPtrAdd(offset.value(), IntPtrConstant(kPointerSize)));
GotoIfNot(IntPtrGreaterThanOrEqual(offset.value(), end_offset), &loop_body);
......@@ -699,7 +699,7 @@ void ConstructorBuiltinsAssembler::CreateFastCloneShallowObjectBuiltin(
&call_runtime, closure, literals_index, properties_count_node);
Return(copy);
Bind(&call_runtime);
BIND(&call_runtime);
Node* constant_properties = Parameter(Descriptor::kConstantProperties);
Node* flags = Parameter(Descriptor::kFlags);
Node* context = Parameter(Descriptor::kContext);
......
......@@ -55,13 +55,13 @@ void ConversionBuiltinsAssembler::Generate_NonPrimitiveToPrimitive(
Int32Constant(LAST_PRIMITIVE_TYPE)),
&if_resultisprimitive, &if_resultisnotprimitive);
Bind(&if_resultisprimitive);
BIND(&if_resultisprimitive);
{
// Just return the {result}.
Return(result);
}
Bind(&if_resultisnotprimitive);
BIND(&if_resultisnotprimitive);
{
// Somehow the @@toPrimitive method on {input} didn't yield a primitive.
TailCallRuntime(Runtime::kThrowCannotConvertToPrimitive, context);
......@@ -69,7 +69,7 @@ void ConversionBuiltinsAssembler::Generate_NonPrimitiveToPrimitive(
}
// Convert using the OrdinaryToPrimitive algorithm instead.
Bind(&ordinary_to_primitive);
BIND(&ordinary_to_primitive);
{
Callable callable = CodeFactory::OrdinaryToPrimitive(
isolate(), (hint == ToPrimitiveHint::kString)
......@@ -147,20 +147,20 @@ TF_BUILTIN(ToString, CodeStubAssembler) {
Label not_heap_number(this);
Bind(&not_string);
BIND(&not_string);
{ Branch(IsHeapNumberMap(input_map), &is_number, &not_heap_number); }
Bind(&is_number);
BIND(&is_number);
{ Return(NumberToString(context, input)); }
Bind(&not_heap_number);
BIND(&not_heap_number);
{
GotoIf(Word32NotEqual(input_instance_type, Int32Constant(ODDBALL_TYPE)),
&runtime);
Return(LoadObjectField(input, Oddball::kToStringOffset));
}
Bind(&runtime);
BIND(&runtime);
{ Return(CallRuntime(Runtime::kToString, context, input)); }
}
......@@ -193,7 +193,7 @@ void ConversionBuiltinsAssembler::Generate_OrdinaryToPrimitive(
Branch(IsCallableMap(method_map), &if_methodiscallable,
&if_methodisnotcallable);
Bind(&if_methodiscallable);
BIND(&if_methodiscallable);
{
// Call the {method} on the {input}.
Callable callable = CodeFactory::Call(
......@@ -212,12 +212,12 @@ void ConversionBuiltinsAssembler::Generate_OrdinaryToPrimitive(
// Just continue with the next {name} if the {method} is not callable.
Goto(&if_methodisnotcallable);
Bind(&if_methodisnotcallable);
BIND(&if_methodisnotcallable);
}
TailCallRuntime(Runtime::kThrowCannotConvertToPrimitive, context);
Bind(&return_result);
BIND(&return_result);
Return(var_result.value());
}
......@@ -242,10 +242,10 @@ TF_BUILTIN(ToBoolean, CodeStubAssembler) {
Label return_true(this), return_false(this);
BranchIfToBooleanIsTrue(value, &return_true, &return_false);
Bind(&return_true);
BIND(&return_true);
Return(BooleanConstant(true));
Bind(&return_false);
BIND(&return_false);
Return(BooleanConstant(false));
}
......@@ -257,7 +257,7 @@ TF_BUILTIN(ToLength, CodeStubAssembler) {
Parameter(Descriptor::kArgument));
Label loop(this, &var_len);
Goto(&loop);
Bind(&loop);
BIND(&loop);
{
// Shared entry points.
Label return_len(this), return_two53minus1(this, Label::kDeferred),
......@@ -278,7 +278,7 @@ TF_BUILTIN(ToLength, CodeStubAssembler) {
Branch(IsHeapNumberMap(LoadMap(len)), &if_lenisheapnumber,
&if_lenisnotheapnumber);
Bind(&if_lenisheapnumber);
BIND(&if_lenisheapnumber);
{
// Load the floating-point value of {len}.
Node* len_value = LoadHeapNumberValue(len);
......@@ -298,7 +298,7 @@ TF_BUILTIN(ToLength, CodeStubAssembler) {
Return(result);
}
Bind(&if_lenisnotheapnumber);
BIND(&if_lenisnotheapnumber);
{
// Need to convert {len} to a Number first.
Callable callable = CodeFactory::NonNumberToNumber(isolate());
......@@ -306,13 +306,13 @@ TF_BUILTIN(ToLength, CodeStubAssembler) {
Goto(&loop);
}
Bind(&return_len);
BIND(&return_len);
Return(var_len.value());
Bind(&return_two53minus1);
BIND(&return_two53minus1);
Return(NumberConstant(kMaxSafeInteger));
Bind(&return_zero);
BIND(&return_zero);
Return(SmiConstant(Smi::kZero));
}
}
......@@ -337,7 +337,7 @@ TF_BUILTIN(ToObject, CodeStubAssembler) {
Branch(TaggedIsSmi(object), &if_number, &if_notsmi);
Bind(&if_notsmi);
BIND(&if_notsmi);
Node* map = LoadMap(object);
GotoIf(IsHeapNumberMap(map), &if_number);
......@@ -352,12 +352,12 @@ TF_BUILTIN(ToObject, CodeStubAssembler) {
constructor_function_index_var.Bind(constructor_function_index);
Goto(&if_wrapjsvalue);
Bind(&if_number);
BIND(&if_number);
constructor_function_index_var.Bind(
IntPtrConstant(Context::NUMBER_FUNCTION_INDEX));
Goto(&if_wrapjsvalue);
Bind(&if_wrapjsvalue);
BIND(&if_wrapjsvalue);
Node* native_context = LoadNativeContext(context);
Node* constructor = LoadFixedArrayElement(
native_context, constructor_function_index_var.value());
......@@ -372,12 +372,12 @@ TF_BUILTIN(ToObject, CodeStubAssembler) {
StoreObjectField(js_value, JSValue::kValueOffset, object);
Return(js_value);
Bind(&if_noconstructor);
BIND(&if_noconstructor);
TailCallRuntime(
Runtime::kThrowUndefinedOrNullToObject, context,
HeapConstant(factory()->NewStringFromAsciiChecked("ToObject", TENURED)));
Bind(&if_jsreceiver);
BIND(&if_jsreceiver);
Return(object);
}
......
......@@ -47,7 +47,7 @@ void DateBuiltinsAssembler::Generate_DatePrototype_GetField(Node* context,
Return(LoadObjectField(
receiver, JSDate::kValueOffset + field_index * kPointerSize));
Bind(&stamp_mismatch);
BIND(&stamp_mismatch);
}
Node* field_index_smi = SmiConstant(Smi::FromInt(field_index));
......@@ -60,7 +60,7 @@ void DateBuiltinsAssembler::Generate_DatePrototype_GetField(Node* context,
}
// Raise a TypeError if the receiver is not a date.
Bind(&receiver_not_date);
BIND(&receiver_not_date);
{
CallRuntime(Runtime::kThrowNotDateError, context);
Unreachable();
......@@ -219,7 +219,7 @@ TF_BUILTIN(DatePrototypeToPrimitive, CodeStubAssembler) {
Goto(&hint_is_invalid);
// Use the OrdinaryToPrimitive builtin to convert to a Number.
Bind(&hint_is_number);
BIND(&hint_is_number);
{
Callable callable = CodeFactory::OrdinaryToPrimitive(
isolate(), OrdinaryToPrimitiveHint::kNumber);
......@@ -228,7 +228,7 @@ TF_BUILTIN(DatePrototypeToPrimitive, CodeStubAssembler) {
}
// Use the OrdinaryToPrimitive builtin to convert to a String.
Bind(&hint_is_string);
BIND(&hint_is_string);
{
Callable callable = CodeFactory::OrdinaryToPrimitive(
isolate(), OrdinaryToPrimitiveHint::kString);
......@@ -237,14 +237,14 @@ TF_BUILTIN(DatePrototypeToPrimitive, CodeStubAssembler) {
}
// Raise a TypeError if the {hint} is invalid.
Bind(&hint_is_invalid);
BIND(&hint_is_invalid);
{
CallRuntime(Runtime::kThrowInvalidHint, context, hint);
Unreachable();
}
// Raise a TypeError if the {receiver} is not a JSReceiver instance.
Bind(&receiver_is_invalid);
BIND(&receiver_is_invalid);
{
CallRuntime(Runtime::kThrowIncompatibleMethodReceiver, context,
HeapConstant(factory()->NewStringFromAsciiChecked(
......
......@@ -34,7 +34,7 @@ Node* ForInBuiltinsAssembler::ForInFilter(Node* key, Node* object,
var_result.Bind(UndefinedConstant());
Goto(&end);
Bind(&end);
BIND(&end);
return var_result.value();
}
......@@ -46,7 +46,7 @@ std::tuple<Node*, Node*, Node*> ForInBuiltinsAssembler::EmitForInPrepare(
CheckEnumCache(object, &use_cache, nothing_to_iterate, call_runtime);
Bind(&use_cache);
BIND(&use_cache);
Node* map = LoadMap(object);
Node* enum_length = EnumLength(map);
GotoIf(WordEqual(enum_length, SmiConstant(0)), nothing_to_iterate);
......@@ -79,7 +79,7 @@ void ForInBuiltinsAssembler::CheckPrototypeEnumCache(Node* receiver, Node* map,
Goto(&loop);
// Check that there are no elements. |current_js_object| contains
// the current JS object we've reached through the prototype chain.
Bind(&loop);
BIND(&loop);
{
Label if_elements(this), if_no_elements(this);
Node* elements = LoadElements(current_js_object.value());
......@@ -87,7 +87,7 @@ void ForInBuiltinsAssembler::CheckPrototypeEnumCache(Node* receiver, Node* map,
// Check that there are no elements.
Branch(WordEqual(elements, empty_fixed_array), &if_no_elements,
&if_elements);
Bind(&if_elements);
BIND(&if_elements);
{
// Second chance, the object may be using the empty slow element
// dictionary.
......@@ -97,7 +97,7 @@ void ForInBuiltinsAssembler::CheckPrototypeEnumCache(Node* receiver, Node* map,
&if_no_elements);
}
Bind(&if_no_elements);
BIND(&if_no_elements);
{
// Update map prototype.
current_js_object.Bind(LoadMapPrototype(current_map.value()));
......@@ -106,7 +106,7 @@ void ForInBuiltinsAssembler::CheckPrototypeEnumCache(Node* receiver, Node* map,
}
}
Bind(&next);
BIND(&next);
{
// For all objects but the receiver, check that the cache is empty.
current_map.Bind(LoadMap(current_js_object.value()));
......@@ -136,11 +136,11 @@ void ForInBuiltinsAssembler::CheckEnumCache(Node* receiver, Label* use_cache,
// Check that there are no elements on the fast |receiver| and its prototype
// chain.
Bind(&check_empty_prototype);
BIND(&check_empty_prototype);
CheckPrototypeEnumCache(receiver, map, use_cache, use_runtime);
Label dict_loop(this);
Bind(&check_dict_receiver);
BIND(&check_dict_receiver);
{
// Avoid runtime-call for empty dictionary receivers.
GotoIfNot(IsDictionaryMap(map), use_runtime);
......@@ -176,7 +176,7 @@ TF_BUILTIN(ForInNext, ForInBuiltinsAssembler) {
Node* map = LoadMap(object);
GotoIfNot(WordEqual(map, cache_type), &filter);
Return(key);
Bind(&filter);
BIND(&filter);
Return(ForInFilter(key, object, context));
}
......@@ -193,10 +193,10 @@ TF_BUILTIN(ForInPrepare, ForInBuiltinsAssembler) {
Return(cache_type, cache_array, cache_length);
Bind(&call_runtime);
BIND(&call_runtime);
TailCallRuntime(Runtime::kForInPrepare, context, object);
Bind(&nothing_to_iterate);
BIND(&nothing_to_iterate);
{
Node* zero = SmiConstant(0);
Return(zero, zero, zero);
......
......@@ -86,12 +86,12 @@ TF_BUILTIN(FastFunctionPrototypeBind, CodeStubAssembler) {
native_context, Context::BOUND_FUNCTION_WITHOUT_CONSTRUCTOR_MAP_INDEX));
Goto(&map_done);
Bind(&with_constructor);
BIND(&with_constructor);
bound_function_map.Bind(LoadContextElement(
native_context, Context::BOUND_FUNCTION_WITH_CONSTRUCTOR_MAP_INDEX));
Goto(&map_done);
Bind(&map_done);
BIND(&map_done);
// Verify that __proto__ matches that of a the target bound function.
Comment("Verify that __proto__ matches target bound function");
......@@ -119,11 +119,11 @@ TF_BUILTIN(FastFunctionPrototypeBind, CodeStubAssembler) {
argument_array.Bind(elements);
Goto(&arguments_done);
Bind(&empty_arguments);
BIND(&empty_arguments);
argument_array.Bind(EmptyFixedArrayConstant());
Goto(&arguments_done);
Bind(&arguments_done);
BIND(&arguments_done);
// Determine bound receiver.
Comment("Determine bound receiver");
......@@ -134,11 +134,11 @@ TF_BUILTIN(FastFunctionPrototypeBind, CodeStubAssembler) {
bound_receiver.Bind(UndefinedConstant());
Goto(&receiver_done);
Bind(&has_receiver);
BIND(&has_receiver);
bound_receiver.Bind(args.AtIndex(0));
Goto(&receiver_done);
Bind(&receiver_done);
BIND(&receiver_done);
// Allocate the resulting bound function.
Comment("Allocate the resulting bound function");
......@@ -159,7 +159,7 @@ TF_BUILTIN(FastFunctionPrototypeBind, CodeStubAssembler) {
empty_fixed_array);
args.PopAndReturn(bound_function);
Bind(&slow);
BIND(&slow);
Node* target = LoadFromFrame(StandardFrameConstants::kFunctionOffset,
MachineType::TaggedPointer());
......
......@@ -53,7 +53,7 @@ void GeneratorBuiltinsAssembler::GeneratorPrototypeResume(
SmiConstant(static_cast<int>(SuspendFlags::kGeneratorYield)));
Return(result);
Bind(&if_receiverisincompatible);
BIND(&if_receiverisincompatible);
{
// The {receiver} is not a valid JSGeneratorObject.
CallRuntime(Runtime::kThrowIncompatibleMethodReceiver, context,
......@@ -63,7 +63,7 @@ void GeneratorBuiltinsAssembler::GeneratorPrototypeResume(
Unreachable();
}
Bind(&if_receiverisclosed);
BIND(&if_receiverisclosed);
{
Callable create_iter_result_object =
CodeFactory::CreateIterResultObject(isolate());
......@@ -86,7 +86,7 @@ void GeneratorBuiltinsAssembler::GeneratorPrototypeResume(
Return(result);
}
Bind(&if_receiverisrunning);
BIND(&if_receiverisrunning);
{
CallRuntime(Runtime::kThrowGeneratorRunning, context);
Unreachable();
......
......@@ -20,7 +20,7 @@ TF_BUILTIN(GlobalIsFinite, CodeStubAssembler) {
Label loop(this, &var_num);
var_num.Bind(Parameter(Descriptor::kNumber));
Goto(&loop);
Bind(&loop);
BIND(&loop);
{
Node* num = var_num.value();
......@@ -33,7 +33,7 @@ TF_BUILTIN(GlobalIsFinite, CodeStubAssembler) {
Branch(IsHeapNumberMap(LoadMap(num)), &if_numisheapnumber,
&if_numisnotheapnumber);
Bind(&if_numisheapnumber);
BIND(&if_numisheapnumber);
{
// Check if {num} contains a finite, non-NaN value.
Node* num_value = LoadHeapNumberValue(num);
......@@ -41,7 +41,7 @@ TF_BUILTIN(GlobalIsFinite, CodeStubAssembler) {
&return_true);
}
Bind(&if_numisnotheapnumber);
BIND(&if_numisnotheapnumber);
{
// Need to convert {num} to a Number first.
Callable callable = CodeFactory::NonNumberToNumber(isolate());
......@@ -50,10 +50,10 @@ TF_BUILTIN(GlobalIsFinite, CodeStubAssembler) {
}
}
Bind(&return_true);
BIND(&return_true);
Return(BooleanConstant(true));
Bind(&return_false);
BIND(&return_false);
Return(BooleanConstant(false));
}
......@@ -68,7 +68,7 @@ TF_BUILTIN(GlobalIsNaN, CodeStubAssembler) {
Label loop(this, &var_num);
var_num.Bind(Parameter(Descriptor::kNumber));
Goto(&loop);
Bind(&loop);
BIND(&loop);
{
Node* num = var_num.value();
......@@ -81,14 +81,14 @@ TF_BUILTIN(GlobalIsNaN, CodeStubAssembler) {
Branch(IsHeapNumberMap(LoadMap(num)), &if_numisheapnumber,
&if_numisnotheapnumber);
Bind(&if_numisheapnumber);
BIND(&if_numisheapnumber);
{
// Check if {num} contains a NaN.
Node* num_value = LoadHeapNumberValue(num);
BranchIfFloat64IsNaN(num_value, &return_true, &return_false);
}
Bind(&if_numisnotheapnumber);
BIND(&if_numisnotheapnumber);
{
// Need to convert {num} to a Number first.
Callable callable = CodeFactory::NonNumberToNumber(isolate());
......@@ -97,10 +97,10 @@ TF_BUILTIN(GlobalIsNaN, CodeStubAssembler) {
}
}
Bind(&return_true);
BIND(&return_true);
Return(BooleanConstant(true));
Bind(&return_false);
BIND(&return_false);
Return(BooleanConstant(false));
}
......
......@@ -30,7 +30,7 @@ TF_BUILTIN(KeyedLoadIC_IndexedString, CodeStubAssembler) {
Node* result = StringFromCharCode(code);
Return(result);
Bind(&miss);
BIND(&miss);
TailCallRuntime(Runtime::kKeyedLoadIC_Miss, context, receiver, index, slot,
vector);
}
......@@ -142,10 +142,10 @@ TF_BUILTIN(LoadIC_FunctionPrototype, CodeStubAssembler) {
var_result.Bind(LoadMapPrototype(proto_or_map));
Goto(&done);
Bind(&done);
BIND(&done);
Return(var_result.value());
Bind(&miss);
BIND(&miss);
TailCallRuntime(Runtime::kLoadIC_Miss, context, receiver, name, slot, vector);
}
......
......@@ -42,7 +42,7 @@ TF_BUILTIN(CopyFastSmiOrObjectElements, CodeStubAssembler) {
mode),
&if_newspace, &if_oldspace);
Bind(&if_newspace);
BIND(&if_newspace);
{
Node* target = AllocateFixedArray(kind, length, mode);
CopyFixedArrayElements(kind, source, target, length, SKIP_WRITE_BARRIER,
......@@ -51,7 +51,7 @@ TF_BUILTIN(CopyFastSmiOrObjectElements, CodeStubAssembler) {
Return(target);
}
Bind(&if_oldspace);
BIND(&if_oldspace);
{
Node* target = AllocateFixedArray(kind, length, mode, kPretenured);
CopyFixedArrayElements(kind, source, target, length, UPDATE_WRITE_BARRIER,
......@@ -72,7 +72,7 @@ TF_BUILTIN(GrowFastDoubleElements, CodeStubAssembler) {
key, &runtime);
Return(elements);
Bind(&runtime);
BIND(&runtime);
TailCallRuntime(Runtime::kGrowArrayElements, context, object, key);
}
......@@ -87,7 +87,7 @@ TF_BUILTIN(GrowFastSmiOrObjectElements, CodeStubAssembler) {
TryGrowElementsCapacity(object, elements, FAST_ELEMENTS, key, &runtime);
Return(elements);
Bind(&runtime);
BIND(&runtime);
TailCallRuntime(Runtime::kGrowArrayElements, context, object, key);
}
......@@ -102,7 +102,7 @@ TF_BUILTIN(NewUnmappedArgumentsElements, CodeStubAssembler) {
Branch(IntPtrLessThan(length, IntPtrConstant(max_elements)), &if_newspace,
&if_oldspace);
Bind(&if_newspace);
BIND(&if_newspace);
{
// Prefer EmptyFixedArray in case of non-positive {length} (the {length}
// can be negative here for rest parameters).
......@@ -110,10 +110,10 @@ TF_BUILTIN(NewUnmappedArgumentsElements, CodeStubAssembler) {
Branch(IntPtrLessThanOrEqual(length, IntPtrConstant(0)), &if_empty,
&if_notempty);
Bind(&if_empty);
BIND(&if_empty);
Return(EmptyFixedArrayConstant());
Bind(&if_notempty);
BIND(&if_notempty);
{
// Allocate a FixedArray in new space.
Node* result = AllocateFixedArray(kind, length);
......@@ -126,7 +126,7 @@ TF_BUILTIN(NewUnmappedArgumentsElements, CodeStubAssembler) {
Label loop(this, &var_index), done_loop(this);
var_index.Bind(IntPtrConstant(0));
Goto(&loop);
Bind(&loop);
BIND(&loop);
{
// Load the current {index}.
Node* index = var_index.value();
......@@ -147,12 +147,12 @@ TF_BUILTIN(NewUnmappedArgumentsElements, CodeStubAssembler) {
Goto(&loop);
}
Bind(&done_loop);
BIND(&done_loop);
Return(result);
}
}
Bind(&if_oldspace);
BIND(&if_oldspace);
{
// Allocate in old space (or large object space).
TailCallRuntime(Runtime::kNewArgumentsElements, NoContextConstant(),
......
......@@ -37,7 +37,7 @@ TF_BUILTIN(MathAbs, CodeStubAssembler) {
Label loop(this, &var_x);
var_x.Bind(Parameter(Descriptor::kX));
Goto(&loop);
Bind(&loop);
BIND(&loop);
{
// Load the current {x} value.
Node* x = var_x.value();
......@@ -46,7 +46,7 @@ TF_BUILTIN(MathAbs, CodeStubAssembler) {
Label if_xissmi(this), if_xisnotsmi(this);
Branch(TaggedIsSmi(x), &if_xissmi, &if_xisnotsmi);
Bind(&if_xissmi);
BIND(&if_xissmi);
{
Label if_overflow(this, Label::kDeferred), if_notoverflow(this);
Node* pair = NULL;
......@@ -62,13 +62,13 @@ TF_BUILTIN(MathAbs, CodeStubAssembler) {
BranchIfSmiLessThanOrEqual(SmiConstant(Smi::FromInt(0)), x,
&if_xispositive, &if_xisnotpositive);
Bind(&if_xispositive);
BIND(&if_xispositive);
{
// Just return the input {x}.
Return(x);
}
Bind(&if_xisnotpositive);
BIND(&if_xisnotpositive);
{
// Try to negate the {x} value.
pair =
......@@ -78,25 +78,25 @@ TF_BUILTIN(MathAbs, CodeStubAssembler) {
}
}
Bind(&if_notoverflow);
BIND(&if_notoverflow);
{
// There is a Smi representation for negated {x}.
Node* result = Projection(0, pair);
Return(BitcastWordToTagged(result));
}
Bind(&if_overflow);
BIND(&if_overflow);
{ Return(NumberConstant(0.0 - Smi::kMinValue)); }
}
Bind(&if_xisnotsmi);
BIND(&if_xisnotsmi);
{
// Check if {x} is a HeapNumber.
Label if_xisheapnumber(this), if_xisnotheapnumber(this, Label::kDeferred);
Branch(IsHeapNumberMap(LoadMap(x)), &if_xisheapnumber,
&if_xisnotheapnumber);
Bind(&if_xisheapnumber);
BIND(&if_xisheapnumber);
{
Node* x_value = LoadHeapNumberValue(x);
Node* value = Float64Abs(x_value);
......@@ -104,7 +104,7 @@ TF_BUILTIN(MathAbs, CodeStubAssembler) {
Return(result);
}
Bind(&if_xisnotheapnumber);
BIND(&if_xisnotheapnumber);
{
// Need to convert {x} to a Number first.
Callable callable = CodeFactory::NonNumberToNumber(isolate());
......@@ -121,7 +121,7 @@ void MathBuiltinsAssembler::MathRoundingOperation(
Variable var_x(this, MachineRepresentation::kTagged, x);
Label loop(this, &var_x);
Goto(&loop);
Bind(&loop);
BIND(&loop);
{
// Load the current {x} value.
Node* x = var_x.value();
......@@ -130,20 +130,20 @@ void MathBuiltinsAssembler::MathRoundingOperation(
Label if_xissmi(this), if_xisnotsmi(this);
Branch(TaggedIsSmi(x), &if_xissmi, &if_xisnotsmi);
Bind(&if_xissmi);
BIND(&if_xissmi);
{
// Nothing to do when {x} is a Smi.
Return(x);
}
Bind(&if_xisnotsmi);
BIND(&if_xisnotsmi);
{
// Check if {x} is a HeapNumber.
Label if_xisheapnumber(this), if_xisnotheapnumber(this, Label::kDeferred);
Branch(IsHeapNumberMap(LoadMap(x)), &if_xisheapnumber,
&if_xisnotheapnumber);
Bind(&if_xisheapnumber);
BIND(&if_xisheapnumber);
{
Node* x_value = LoadHeapNumberValue(x);
Node* value = (this->*float64op)(x_value);
......@@ -151,7 +151,7 @@ void MathBuiltinsAssembler::MathRoundingOperation(
Return(result);
}
Bind(&if_xisnotheapnumber);
BIND(&if_xisnotheapnumber);
{
// Need to convert {x} to a Number first.
Callable callable = CodeFactory::NonNumberToNumber(isolate());
......@@ -270,7 +270,7 @@ TF_BUILTIN(MathClz32, CodeStubAssembler) {
Label loop(this, &var_x);
var_x.Bind(Parameter(Descriptor::kX));
Goto(&loop);
Bind(&loop);
BIND(&loop);
{
// Load the current {x} value.
Node* x = var_x.value();
......@@ -279,26 +279,26 @@ TF_BUILTIN(MathClz32, CodeStubAssembler) {
Label if_xissmi(this), if_xisnotsmi(this);
Branch(TaggedIsSmi(x), &if_xissmi, &if_xisnotsmi);
Bind(&if_xissmi);
BIND(&if_xissmi);
{
var_clz32_x.Bind(SmiToWord32(x));
Goto(&do_clz32);
}
Bind(&if_xisnotsmi);
BIND(&if_xisnotsmi);
{
// Check if {x} is a HeapNumber.
Label if_xisheapnumber(this), if_xisnotheapnumber(this, Label::kDeferred);
Branch(IsHeapNumberMap(LoadMap(x)), &if_xisheapnumber,
&if_xisnotheapnumber);
Bind(&if_xisheapnumber);
BIND(&if_xisheapnumber);
{
var_clz32_x.Bind(TruncateHeapNumberValueToWord32(x));
Goto(&do_clz32);
}
Bind(&if_xisnotheapnumber);
BIND(&if_xisnotheapnumber);
{
// Need to convert {x} to a Number first.
Callable callable = CodeFactory::NonNumberToNumber(isolate());
......@@ -308,7 +308,7 @@ TF_BUILTIN(MathClz32, CodeStubAssembler) {
}
}
Bind(&do_clz32);
BIND(&do_clz32);
{
Node* x_value = var_clz32_x.value();
Node* value = Word32Clz(x_value);
......@@ -434,7 +434,7 @@ TF_BUILTIN(MathRandom, CodeStubAssembler) {
Goto(&if_cached);
// Compute next index by decrement.
Bind(&if_cached);
BIND(&if_cached);
Node* new_smi_index = SmiSub(smi_index.value(), SmiConstant(Smi::FromInt(1)));
StoreContextElement(native_context, Context::MATH_RANDOM_INDEX_INDEX,
new_smi_index);
......@@ -467,10 +467,10 @@ TF_BUILTIN(MathSign, CodeStubAssembler) {
GotoIf(Float64LessThan(Float64Constant(0.0), x_value), &if_xispositive);
Return(ChangeFloat64ToTagged(x_value));
Bind(&if_xisnegative);
BIND(&if_xisnegative);
Return(SmiConstant(Smi::FromInt(-1)));
Bind(&if_xispositive);
BIND(&if_xispositive);
Return(SmiConstant(Smi::FromInt(1)));
}
......
This diff is collapsed.
......@@ -29,7 +29,7 @@ void ObjectBuiltinsAssembler::IsString(Node* object, Label* if_string,
Label if_notsmi(this);
Branch(TaggedIsSmi(object), if_notstring, &if_notsmi);
Bind(&if_notsmi);
BIND(&if_notsmi);
{
Node* instance_type = LoadInstanceType(object);
......@@ -59,7 +59,7 @@ TF_BUILTIN(ObjectHasOwnProperty, ObjectBuiltinsAssembler) {
// Smi receivers do not have own properties.
Label if_objectisnotsmi(this);
Branch(TaggedIsSmi(object), &return_false, &if_objectisnotsmi);
Bind(&if_objectisnotsmi);
BIND(&if_objectisnotsmi);
Node* map = LoadMap(object);
Node* instance_type = LoadMapInstanceType(map);
......@@ -72,23 +72,23 @@ TF_BUILTIN(ObjectHasOwnProperty, ObjectBuiltinsAssembler) {
TryToName(key, &keyisindex, &var_index, &if_iskeyunique, &var_unique,
&call_runtime);
Bind(&if_iskeyunique);
BIND(&if_iskeyunique);
TryHasOwnProperty(object, map, instance_type, var_unique.value(),
&return_true, &return_false, &call_runtime);
Bind(&keyisindex);
BIND(&keyisindex);
// Handle negative keys in the runtime.
GotoIf(IntPtrLessThan(var_index.value(), IntPtrConstant(0)), &call_runtime);
TryLookupElement(object, map, instance_type, var_index.value(),
&return_true, &return_false, &return_false, &call_runtime);
}
Bind(&return_true);
BIND(&return_true);
Return(BooleanConstant(true));
Bind(&return_false);
BIND(&return_false);
Return(BooleanConstant(false));
Bind(&call_runtime);
BIND(&call_runtime);
Return(CallRuntime(Runtime::kObjectHasOwnProperty, context, object, key));
}
......@@ -126,7 +126,7 @@ TF_BUILTIN(ObjectProtoToString, ObjectBuiltinsAssembler) {
Branch(Word32Equal(receiver_instance_type, Int32Constant(JS_PROXY_TYPE)),
&if_isproxy, &checkstringtag);
Bind(&if_isproxy);
BIND(&if_isproxy);
{
// This can throw
var_proxy_is_array.Bind(
......@@ -134,7 +134,7 @@ TF_BUILTIN(ObjectProtoToString, ObjectBuiltinsAssembler) {
Goto(&checkstringtag);
}
Bind(&checkstringtag);
BIND(&checkstringtag);
{
Node* to_string_tag_symbol =
HeapConstant(isolate()->factory()->to_string_tag_symbol());
......@@ -147,10 +147,10 @@ TF_BUILTIN(ObjectProtoToString, ObjectBuiltinsAssembler) {
IsString(to_string_tag_value, &if_tostringtag, &if_notostringtag);
Bind(&if_tostringtag);
BIND(&if_tostringtag);
ReturnToStringFormat(context, to_string_tag_value);
}
Bind(&if_notostringtag);
BIND(&if_notostringtag);
{
size_t const kNumCases = 11;
Label* case_labels[kNumCases];
......@@ -181,37 +181,37 @@ TF_BUILTIN(ObjectProtoToString, ObjectBuiltinsAssembler) {
Switch(receiver_instance_type, &return_object, case_values, case_labels,
arraysize(case_values));
Bind(&return_undefined);
BIND(&return_undefined);
Return(HeapConstant(isolate()->factory()->undefined_to_string()));
Bind(&return_null);
BIND(&return_null);
Return(HeapConstant(isolate()->factory()->null_to_string()));
Bind(&return_arguments);
BIND(&return_arguments);
Return(HeapConstant(isolate()->factory()->arguments_to_string()));
Bind(&return_array);
BIND(&return_array);
Return(HeapConstant(isolate()->factory()->array_to_string()));
Bind(&return_function);
BIND(&return_function);
Return(HeapConstant(isolate()->factory()->function_to_string()));
Bind(&return_error);
BIND(&return_error);
Return(HeapConstant(isolate()->factory()->error_to_string()));
Bind(&return_date);
BIND(&return_date);
Return(HeapConstant(isolate()->factory()->date_to_string()));
Bind(&return_regexp);
BIND(&return_regexp);
Return(HeapConstant(isolate()->factory()->regexp_to_string()));
Bind(&return_api);
BIND(&return_api);
{
Node* class_name = CallRuntime(Runtime::kClassOf, context, receiver);
ReturnToStringFormat(context, class_name);
}
Bind(&return_jsvalue);
BIND(&return_jsvalue);
{
Label return_boolean(this), return_number(this), return_string(this);
......@@ -228,17 +228,17 @@ TF_BUILTIN(ObjectProtoToString, ObjectBuiltinsAssembler) {
CSA_ASSERT(this, Word32Equal(instance_type, Int32Constant(SYMBOL_TYPE)));
Goto(&return_object);
Bind(&return_string);
BIND(&return_string);
Return(HeapConstant(isolate()->factory()->string_to_string()));
Bind(&return_number);
BIND(&return_number);
Return(HeapConstant(isolate()->factory()->number_to_string()));
Bind(&return_boolean);
BIND(&return_boolean);
Return(HeapConstant(isolate()->factory()->boolean_to_string()));
}
Bind(&return_jsproxy);
BIND(&return_jsproxy);
{
GotoIf(WordEqual(var_proxy_is_array.value(), BooleanConstant(true)),
&return_array);
......@@ -250,7 +250,7 @@ TF_BUILTIN(ObjectProtoToString, ObjectBuiltinsAssembler) {
}
// Default
Bind(&return_object);
BIND(&return_object);
Return(HeapConstant(isolate()->factory()->object_to_string()));
}
}
......@@ -280,7 +280,7 @@ TF_BUILTIN(ObjectCreate, ObjectBuiltinsAssembler) {
BranchIfJSReceiver(prototype, &prototype_valid, &call_runtime);
}
Bind(&prototype_valid);
BIND(&prototype_valid);
{
Comment("Argument 2 check: properties");
// Check that we have a simple object
......@@ -301,7 +301,7 @@ TF_BUILTIN(ObjectCreate, ObjectBuiltinsAssembler) {
}
// Create a new object with the given prototype.
Bind(&no_properties);
BIND(&no_properties);
{
Variable map(this, MachineRepresentation::kTagged);
Variable properties(this, MachineRepresentation::kTagged);
......@@ -309,7 +309,7 @@ TF_BUILTIN(ObjectCreate, ObjectBuiltinsAssembler) {
Branch(WordEqual(prototype, NullConstant()), &good, &non_null_proto);
Bind(&good);
BIND(&good);
{
map.Bind(LoadContextElement(
context, Context::SLOW_OBJECT_WITH_NULL_PROTOTYPE_MAP));
......@@ -317,7 +317,7 @@ TF_BUILTIN(ObjectCreate, ObjectBuiltinsAssembler) {
Goto(&instantiate_map);
}
Bind(&non_null_proto);
BIND(&non_null_proto);
{
properties.Bind(EmptyFixedArrayConstant());
Node* object_function =
......@@ -338,14 +338,14 @@ TF_BUILTIN(ObjectCreate, ObjectBuiltinsAssembler) {
Goto(&instantiate_map);
}
Bind(&instantiate_map);
BIND(&instantiate_map);
{
Node* instance = AllocateJSObjectFromMap(map.value(), properties.value());
Return(instance);
}
}
Bind(&call_runtime);
BIND(&call_runtime);
{
Return(CallRuntime(Runtime::kObjectCreate, context, prototype, properties));
}
......
This diff is collapsed.
This diff is collapsed.
......@@ -60,14 +60,14 @@ void SharedArrayBufferBuiltinsAssembler::ValidateSharedTypedArray(
Int32Constant(FIXED_FLOAT32_ARRAY_TYPE)),
&not_float_or_clamped, &invalid);
Bind(&invalid);
BIND(&invalid);
{
CallRuntime(Runtime::kThrowNotIntegerSharedTypedArrayError, context,
tagged);
Unreachable();
}
Bind(&not_float_or_clamped);
BIND(&not_float_or_clamped);
*out_instance_type = elements_instance_type;
Node* backing_store =
......@@ -94,13 +94,13 @@ Node* SharedArrayBufferBuiltinsAssembler::ConvertTaggedAtomicIndexToWord32(
Label if_numberissmi(this), if_numberisnotsmi(this);
Branch(TaggedIsSmi(*number_index), &if_numberissmi, &if_numberisnotsmi);
Bind(&if_numberissmi);
BIND(&if_numberissmi);
{
var_result.Bind(SmiToWord32(*number_index));
Goto(&done);
}
Bind(&if_numberisnotsmi);
BIND(&if_numberisnotsmi);
{
Node* number_index_value = LoadHeapNumberValue(*number_index);
Node* access_index = TruncateFloat64ToWord32(number_index_value);
......@@ -110,20 +110,20 @@ Node* SharedArrayBufferBuiltinsAssembler::ConvertTaggedAtomicIndexToWord32(
Branch(Float64Equal(number_index_value, test_index), &if_indexesareequal,
&if_indexesarenotequal);
Bind(&if_indexesareequal);
BIND(&if_indexesareequal);
{
var_result.Bind(access_index);
Goto(&done);
}
Bind(&if_indexesarenotequal);
BIND(&if_indexesarenotequal);
{
CallRuntime(Runtime::kThrowInvalidAtomicAccessIndexError, context);
Unreachable();
}
}
Bind(&done);
BIND(&done);
return var_result.value();
}
......@@ -136,7 +136,7 @@ void SharedArrayBufferBuiltinsAssembler::ValidateAtomicIndex(
CallRuntime(Runtime::kThrowInvalidAtomicAccessIndexError, context);
Unreachable();
Bind(&check_passed);
BIND(&check_passed);
}
TF_BUILTIN(AtomicsLoad, SharedArrayBufferBuiltinsAssembler) {
......@@ -168,32 +168,32 @@ TF_BUILTIN(AtomicsLoad, SharedArrayBufferBuiltinsAssembler) {
Switch(instance_type, &other, case_values, case_labels,
arraysize(case_labels));
Bind(&i8);
BIND(&i8);
Return(SmiFromWord32(
AtomicLoad(MachineType::Int8(), backing_store, index_word)));
Bind(&u8);
BIND(&u8);
Return(SmiFromWord32(
AtomicLoad(MachineType::Uint8(), backing_store, index_word)));
Bind(&i16);
BIND(&i16);
Return(SmiFromWord32(
AtomicLoad(MachineType::Int16(), backing_store, WordShl(index_word, 1))));
Bind(&u16);
BIND(&u16);
Return(SmiFromWord32(AtomicLoad(MachineType::Uint16(), backing_store,
WordShl(index_word, 1))));
Bind(&i32);
BIND(&i32);
Return(ChangeInt32ToTagged(
AtomicLoad(MachineType::Int32(), backing_store, WordShl(index_word, 2))));
Bind(&u32);
BIND(&u32);
Return(ChangeUint32ToTagged(AtomicLoad(MachineType::Uint32(), backing_store,
WordShl(index_word, 2))));
// This shouldn't happen, we've already validated the type.
Bind(&other);
BIND(&other);
Unreachable();
}
......@@ -229,23 +229,23 @@ TF_BUILTIN(AtomicsStore, SharedArrayBufferBuiltinsAssembler) {
Switch(instance_type, &other, case_values, case_labels,
arraysize(case_labels));
Bind(&u8);
BIND(&u8);
AtomicStore(MachineRepresentation::kWord8, backing_store, index_word,
value_word32);
Return(value_integer);
Bind(&u16);
BIND(&u16);
AtomicStore(MachineRepresentation::kWord16, backing_store,
WordShl(index_word, 1), value_word32);
Return(value_integer);
Bind(&u32);
BIND(&u32);
AtomicStore(MachineRepresentation::kWord32, backing_store,
WordShl(index_word, 2), value_word32);
Return(value_integer);
// This shouldn't happen, we've already validated the type.
Bind(&other);
BIND(&other);
Unreachable();
}
......@@ -288,34 +288,34 @@ TF_BUILTIN(AtomicsExchange, SharedArrayBufferBuiltinsAssembler) {
Switch(instance_type, &other, case_values, case_labels,
arraysize(case_labels));
Bind(&i8);
BIND(&i8);
Return(SmiFromWord32(AtomicExchange(MachineType::Int8(), backing_store,
index_word, value_word32)));
Bind(&u8);
BIND(&u8);
Return(SmiFromWord32(AtomicExchange(MachineType::Uint8(), backing_store,
index_word, value_word32)));
Bind(&i16);
BIND(&i16);
Return(SmiFromWord32(AtomicExchange(MachineType::Int16(), backing_store,
WordShl(index_word, 1), value_word32)));
Bind(&u16);
BIND(&u16);
Return(SmiFromWord32(AtomicExchange(MachineType::Uint16(), backing_store,
WordShl(index_word, 1), value_word32)));
Bind(&i32);
BIND(&i32);
Return(ChangeInt32ToTagged(AtomicExchange(MachineType::Int32(), backing_store,
WordShl(index_word, 2),
value_word32)));
Bind(&u32);
BIND(&u32);
Return(ChangeUint32ToTagged(
AtomicExchange(MachineType::Uint32(), backing_store,
WordShl(index_word, 2), value_word32)));
// This shouldn't happen, we've already validated the type.
Bind(&other);
BIND(&other);
Unreachable();
#endif // V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64
}
......@@ -365,38 +365,38 @@ TF_BUILTIN(AtomicsCompareExchange, SharedArrayBufferBuiltinsAssembler) {
Switch(instance_type, &other, case_values, case_labels,
arraysize(case_labels));
Bind(&i8);
BIND(&i8);
Return(SmiFromWord32(AtomicCompareExchange(MachineType::Int8(), backing_store,
index_word, old_value_word32,
new_value_word32)));
Bind(&u8);
BIND(&u8);
Return(SmiFromWord32(
AtomicCompareExchange(MachineType::Uint8(), backing_store, index_word,
old_value_word32, new_value_word32)));
Bind(&i16);
BIND(&i16);
Return(SmiFromWord32(AtomicCompareExchange(
MachineType::Int16(), backing_store, WordShl(index_word, 1),
old_value_word32, new_value_word32)));
Bind(&u16);
BIND(&u16);
Return(SmiFromWord32(AtomicCompareExchange(
MachineType::Uint16(), backing_store, WordShl(index_word, 1),
old_value_word32, new_value_word32)));
Bind(&i32);
BIND(&i32);
Return(ChangeInt32ToTagged(AtomicCompareExchange(
MachineType::Int32(), backing_store, WordShl(index_word, 2),
old_value_word32, new_value_word32)));
Bind(&u32);
BIND(&u32);
Return(ChangeUint32ToTagged(AtomicCompareExchange(
MachineType::Uint32(), backing_store, WordShl(index_word, 2),
old_value_word32, new_value_word32)));
// This shouldn't happen, we've already validated the type.
Bind(&other);
BIND(&other);
Unreachable();
#endif // V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64 || V8_TARGET_ARCH_PPC64
// || V8_TARGET_ARCH_PPC || V8_TARGET_ARCH_S390 || V8_TARGET_ARCH_S390X
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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