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