Commit 76c65af8 authored by Igor Sheludko's avatar Igor Sheludko Committed by Commit Bot

[csa] Rename GotoUnless to GotoIfNot.

BUG=

Change-Id: Ifc441739ef730a0b2278be0b662413c223631a72
Reviewed-on: https://chromium-review.googlesource.com/444190Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
Reviewed-by: 's avatarRoss McIlroy <rmcilroy@chromium.org>
Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#43288}
parent b41ed490
......@@ -575,7 +575,7 @@ TF_BUILTIN(ArrayForEach, ForEachCodeStubAssembler) {
// 5. If IsCallable(callbackfn) is false, throw a TypeError exception.
Label type_exception(this, Label::kDeferred);
GotoIf(TaggedIsSmi(callbackfn), &type_exception);
GotoUnless(IsCallableMap(LoadMap(callbackfn)), &type_exception);
GotoIfNot(IsCallableMap(LoadMap(callbackfn)), &type_exception);
// 6. If thisArg was supplied, let T be thisArg; else let T be undefined.
// [Already done by the arguments adapter]
......@@ -1714,7 +1714,7 @@ void Builtins::Generate_ArrayIncludes(compiler::CodeAssemblerState* state) {
{
// Handle case where JSArray length is not an Smi in the runtime
Node* len = assembler.LoadObjectField(array, JSArray::kLengthOffset);
assembler.GotoUnless(assembler.TaggedIsSmi(len), &call_runtime);
assembler.GotoIfNot(assembler.TaggedIsSmi(len), &call_runtime);
len_var.Bind(assembler.SmiToWord(len));
assembler.Branch(assembler.WordEqual(len_var.value(), intptr_zero),
......@@ -1812,7 +1812,7 @@ void Builtins::Generate_ArrayIncludes(compiler::CodeAssemblerState* state) {
string_loop(&assembler, &index_var), undef_loop(&assembler, &index_var),
not_smi(&assembler), not_heap_num(&assembler);
assembler.GotoUnless(assembler.TaggedIsSmi(search_element), &not_smi);
assembler.GotoIfNot(assembler.TaggedIsSmi(search_element), &not_smi);
search_num.Bind(assembler.SmiToFloat64(search_element));
assembler.Goto(&heap_num_loop);
......@@ -1820,7 +1820,7 @@ void Builtins::Generate_ArrayIncludes(compiler::CodeAssemblerState* state) {
assembler.GotoIf(assembler.WordEqual(search_element, undefined),
&undef_loop);
Node* map = assembler.LoadMap(search_element);
assembler.GotoUnless(assembler.IsHeapNumberMap(map), &not_heap_num);
assembler.GotoIfNot(assembler.IsHeapNumberMap(map), &not_heap_num);
search_num.Bind(assembler.LoadHeapNumberValue(search_element));
assembler.Goto(&heap_num_loop);
......@@ -1831,7 +1831,7 @@ void Builtins::Generate_ArrayIncludes(compiler::CodeAssemblerState* state) {
assembler.Bind(&ident_loop);
{
assembler.GotoUnless(
assembler.GotoIfNot(
assembler.UintPtrLessThan(index_var.value(), len_var.value()),
&return_false);
Node* element_k =
......@@ -1845,7 +1845,7 @@ void Builtins::Generate_ArrayIncludes(compiler::CodeAssemblerState* state) {
assembler.Bind(&undef_loop);
{
assembler.GotoUnless(
assembler.GotoIfNot(
assembler.UintPtrLessThan(index_var.value(), len_var.value()),
&return_false);
Node* element_k =
......@@ -1867,19 +1867,19 @@ void Builtins::Generate_ArrayIncludes(compiler::CodeAssemblerState* state) {
assembler.Bind(&not_nan_loop);
{
Label continue_loop(&assembler), not_smi(&assembler);
assembler.GotoUnless(
assembler.GotoIfNot(
assembler.UintPtrLessThan(index_var.value(), len_var.value()),
&return_false);
Node* element_k =
assembler.LoadFixedArrayElement(elements, index_var.value());
assembler.GotoUnless(assembler.TaggedIsSmi(element_k), &not_smi);
assembler.GotoIfNot(assembler.TaggedIsSmi(element_k), &not_smi);
assembler.Branch(
assembler.Float64Equal(search_num.value(),
assembler.SmiToFloat64(element_k)),
&return_true, &continue_loop);
assembler.Bind(&not_smi);
assembler.GotoUnless(
assembler.GotoIfNot(
assembler.IsHeapNumberMap(assembler.LoadMap(element_k)),
&continue_loop);
assembler.Branch(
......@@ -1895,13 +1895,13 @@ void Builtins::Generate_ArrayIncludes(compiler::CodeAssemblerState* state) {
assembler.Bind(&nan_loop);
{
Label continue_loop(&assembler);
assembler.GotoUnless(
assembler.GotoIfNot(
assembler.UintPtrLessThan(index_var.value(), len_var.value()),
&return_false);
Node* element_k =
assembler.LoadFixedArrayElement(elements, index_var.value());
assembler.GotoIf(assembler.TaggedIsSmi(element_k), &continue_loop);
assembler.GotoUnless(
assembler.GotoIfNot(
assembler.IsHeapNumberMap(assembler.LoadMap(element_k)),
&continue_loop);
assembler.BranchIfFloat64IsNaN(assembler.LoadHeapNumberValue(element_k),
......@@ -1916,13 +1916,13 @@ void Builtins::Generate_ArrayIncludes(compiler::CodeAssemblerState* state) {
assembler.Bind(&string_loop);
{
Label continue_loop(&assembler);
assembler.GotoUnless(
assembler.GotoIfNot(
assembler.UintPtrLessThan(index_var.value(), len_var.value()),
&return_false);
Node* element_k =
assembler.LoadFixedArrayElement(elements, index_var.value());
assembler.GotoIf(assembler.TaggedIsSmi(element_k), &continue_loop);
assembler.GotoUnless(
assembler.GotoIfNot(
assembler.IsStringInstanceType(assembler.LoadInstanceType(element_k)),
&continue_loop);
......@@ -1947,12 +1947,12 @@ void Builtins::Generate_ArrayIncludes(compiler::CodeAssemblerState* state) {
search_notnan(&assembler);
Variable search_num(&assembler, MachineRepresentation::kFloat64);
assembler.GotoUnless(assembler.TaggedIsSmi(search_element), &search_notnan);
assembler.GotoIfNot(assembler.TaggedIsSmi(search_element), &search_notnan);
search_num.Bind(assembler.SmiToFloat64(search_element));
assembler.Goto(&not_nan_loop);
assembler.Bind(&search_notnan);
assembler.GotoUnless(
assembler.GotoIfNot(
assembler.IsHeapNumberMap(assembler.LoadMap(search_element)),
&return_false);
......@@ -1965,7 +1965,7 @@ void Builtins::Generate_ArrayIncludes(compiler::CodeAssemblerState* state) {
assembler.Bind(&not_nan_loop);
{
Label continue_loop(&assembler);
assembler.GotoUnless(
assembler.GotoIfNot(
assembler.UintPtrLessThan(index_var.value(), len_var.value()),
&return_false);
Node* element_k = assembler.LoadFixedDoubleArrayElement(
......@@ -1981,7 +1981,7 @@ void Builtins::Generate_ArrayIncludes(compiler::CodeAssemblerState* state) {
assembler.Bind(&nan_loop);
{
Label continue_loop(&assembler);
assembler.GotoUnless(
assembler.GotoIfNot(
assembler.UintPtrLessThan(index_var.value(), len_var.value()),
&return_false);
Node* element_k = assembler.LoadFixedDoubleArrayElement(
......@@ -2000,14 +2000,14 @@ void Builtins::Generate_ArrayIncludes(compiler::CodeAssemblerState* state) {
search_notnan(&assembler);
Variable search_num(&assembler, MachineRepresentation::kFloat64);
assembler.GotoUnless(assembler.TaggedIsSmi(search_element), &search_notnan);
assembler.GotoIfNot(assembler.TaggedIsSmi(search_element), &search_notnan);
search_num.Bind(assembler.SmiToFloat64(search_element));
assembler.Goto(&not_nan_loop);
assembler.Bind(&search_notnan);
assembler.GotoIf(assembler.WordEqual(search_element, undefined),
&hole_loop);
assembler.GotoUnless(
assembler.GotoIfNot(
assembler.IsHeapNumberMap(assembler.LoadMap(search_element)),
&return_false);
......@@ -2020,7 +2020,7 @@ void Builtins::Generate_ArrayIncludes(compiler::CodeAssemblerState* state) {
assembler.Bind(&not_nan_loop);
{
Label continue_loop(&assembler);
assembler.GotoUnless(
assembler.GotoIfNot(
assembler.UintPtrLessThan(index_var.value(), len_var.value()),
&return_false);
......@@ -2040,7 +2040,7 @@ void Builtins::Generate_ArrayIncludes(compiler::CodeAssemblerState* state) {
assembler.Bind(&nan_loop);
{
Label continue_loop(&assembler);
assembler.GotoUnless(
assembler.GotoIfNot(
assembler.UintPtrLessThan(index_var.value(), len_var.value()),
&return_false);
......@@ -2058,7 +2058,7 @@ void Builtins::Generate_ArrayIncludes(compiler::CodeAssemblerState* state) {
// Search for the Hole
assembler.Bind(&hole_loop);
{
assembler.GotoUnless(
assembler.GotoIfNot(
assembler.UintPtrLessThan(index_var.value(), len_var.value()),
&return_false);
......@@ -2121,7 +2121,7 @@ void Builtins::Generate_ArrayIndexOf(compiler::CodeAssemblerState* state) {
{
// Handle case where JSArray length is not an Smi in the runtime
Node* len = assembler.LoadObjectField(array, JSArray::kLengthOffset);
assembler.GotoUnless(assembler.TaggedIsSmi(len), &call_runtime);
assembler.GotoIfNot(assembler.TaggedIsSmi(len), &call_runtime);
len_var.Bind(assembler.SmiToWord(len));
assembler.Branch(assembler.WordEqual(len_var.value(), intptr_zero),
......@@ -2219,7 +2219,7 @@ void Builtins::Generate_ArrayIndexOf(compiler::CodeAssemblerState* state) {
string_loop(&assembler, &index_var), undef_loop(&assembler, &index_var),
not_smi(&assembler), not_heap_num(&assembler);
assembler.GotoUnless(assembler.TaggedIsSmi(search_element), &not_smi);
assembler.GotoIfNot(assembler.TaggedIsSmi(search_element), &not_smi);
search_num.Bind(assembler.SmiToFloat64(search_element));
assembler.Goto(&heap_num_loop);
......@@ -2227,7 +2227,7 @@ void Builtins::Generate_ArrayIndexOf(compiler::CodeAssemblerState* state) {
assembler.GotoIf(assembler.WordEqual(search_element, undefined),
&undef_loop);
Node* map = assembler.LoadMap(search_element);
assembler.GotoUnless(assembler.IsHeapNumberMap(map), &not_heap_num);
assembler.GotoIfNot(assembler.IsHeapNumberMap(map), &not_heap_num);
search_num.Bind(assembler.LoadHeapNumberValue(search_element));
assembler.Goto(&heap_num_loop);
......@@ -2238,7 +2238,7 @@ void Builtins::Generate_ArrayIndexOf(compiler::CodeAssemblerState* state) {
assembler.Bind(&ident_loop);
{
assembler.GotoUnless(
assembler.GotoIfNot(
assembler.UintPtrLessThan(index_var.value(), len_var.value()),
&return_not_found);
Node* element_k =
......@@ -2252,7 +2252,7 @@ void Builtins::Generate_ArrayIndexOf(compiler::CodeAssemblerState* state) {
assembler.Bind(&undef_loop);
{
assembler.GotoUnless(
assembler.GotoIfNot(
assembler.UintPtrLessThan(index_var.value(), len_var.value()),
&return_not_found);
Node* element_k =
......@@ -2273,19 +2273,19 @@ void Builtins::Generate_ArrayIndexOf(compiler::CodeAssemblerState* state) {
assembler.Bind(&not_nan_loop);
{
Label continue_loop(&assembler), not_smi(&assembler);
assembler.GotoUnless(
assembler.GotoIfNot(
assembler.UintPtrLessThan(index_var.value(), len_var.value()),
&return_not_found);
Node* element_k =
assembler.LoadFixedArrayElement(elements, index_var.value());
assembler.GotoUnless(assembler.TaggedIsSmi(element_k), &not_smi);
assembler.GotoIfNot(assembler.TaggedIsSmi(element_k), &not_smi);
assembler.Branch(
assembler.Float64Equal(search_num.value(),
assembler.SmiToFloat64(element_k)),
&return_found, &continue_loop);
assembler.Bind(&not_smi);
assembler.GotoUnless(
assembler.GotoIfNot(
assembler.IsHeapNumberMap(assembler.LoadMap(element_k)),
&continue_loop);
assembler.Branch(
......@@ -2302,13 +2302,13 @@ void Builtins::Generate_ArrayIndexOf(compiler::CodeAssemblerState* state) {
assembler.Bind(&string_loop);
{
Label continue_loop(&assembler);
assembler.GotoUnless(
assembler.GotoIfNot(
assembler.UintPtrLessThan(index_var.value(), len_var.value()),
&return_not_found);
Node* element_k =
assembler.LoadFixedArrayElement(elements, index_var.value());
assembler.GotoIf(assembler.TaggedIsSmi(element_k), &continue_loop);
assembler.GotoUnless(
assembler.GotoIfNot(
assembler.IsStringInstanceType(assembler.LoadInstanceType(element_k)),
&continue_loop);
......@@ -2331,12 +2331,12 @@ void Builtins::Generate_ArrayIndexOf(compiler::CodeAssemblerState* state) {
Label not_nan_loop(&assembler, &index_var), search_notnan(&assembler);
Variable search_num(&assembler, MachineRepresentation::kFloat64);
assembler.GotoUnless(assembler.TaggedIsSmi(search_element), &search_notnan);
assembler.GotoIfNot(assembler.TaggedIsSmi(search_element), &search_notnan);
search_num.Bind(assembler.SmiToFloat64(search_element));
assembler.Goto(&not_nan_loop);
assembler.Bind(&search_notnan);
assembler.GotoUnless(
assembler.GotoIfNot(
assembler.IsHeapNumberMap(assembler.LoadMap(search_element)),
&return_not_found);
......@@ -2349,7 +2349,7 @@ void Builtins::Generate_ArrayIndexOf(compiler::CodeAssemblerState* state) {
assembler.Bind(&not_nan_loop);
{
Label continue_loop(&assembler);
assembler.GotoUnless(
assembler.GotoIfNot(
assembler.UintPtrLessThan(index_var.value(), len_var.value()),
&return_not_found);
Node* element_k = assembler.LoadFixedDoubleArrayElement(
......@@ -2367,12 +2367,12 @@ void Builtins::Generate_ArrayIndexOf(compiler::CodeAssemblerState* state) {
Label not_nan_loop(&assembler, &index_var), search_notnan(&assembler);
Variable search_num(&assembler, MachineRepresentation::kFloat64);
assembler.GotoUnless(assembler.TaggedIsSmi(search_element), &search_notnan);
assembler.GotoIfNot(assembler.TaggedIsSmi(search_element), &search_notnan);
search_num.Bind(assembler.SmiToFloat64(search_element));
assembler.Goto(&not_nan_loop);
assembler.Bind(&search_notnan);
assembler.GotoUnless(
assembler.GotoIfNot(
assembler.IsHeapNumberMap(assembler.LoadMap(search_element)),
&return_not_found);
......@@ -2385,7 +2385,7 @@ void Builtins::Generate_ArrayIndexOf(compiler::CodeAssemblerState* state) {
assembler.Bind(&not_nan_loop);
{
Label continue_loop(&assembler);
assembler.GotoUnless(
assembler.GotoIfNot(
assembler.UintPtrLessThan(index_var.value(), len_var.value()),
&return_not_found);
......@@ -2541,7 +2541,7 @@ void Builtins::Generate_ArrayIteratorPrototypeNext(
CSA_ASSERT(&assembler, assembler.TaggedIsSmi(length));
CSA_ASSERT(&assembler, assembler.TaggedIsSmi(index));
assembler.GotoUnless(assembler.SmiBelow(index, length), &set_done);
assembler.GotoIfNot(assembler.SmiBelow(index, length), &set_done);
Node* one = assembler.SmiConstant(Smi::FromInt(1));
assembler.StoreObjectFieldNoWriteBarrier(iterator,
......@@ -2746,7 +2746,7 @@ void Builtins::Generate_ArrayIteratorPrototypeNext(
CSA_ASSERT(&assembler, assembler.TaggedIsSmi(length));
CSA_ASSERT(&assembler, assembler.TaggedIsSmi(index));
assembler.GotoUnless(assembler.SmiBelow(index, length), &set_done);
assembler.GotoIfNot(assembler.SmiBelow(index, length), &set_done);
Node* one = assembler.SmiConstant(1);
assembler.StoreObjectFieldNoWriteBarrier(
......
......@@ -52,11 +52,11 @@ Node* AsyncBuiltinsAssembler::Await(
PromiseSetHasHandler(throwaway_promise);
Label do_perform_promise_then(this);
GotoUnless(IsDebugActive(), &do_perform_promise_then);
GotoIfNot(IsDebugActive(), &do_perform_promise_then);
{
Label common(this);
GotoIf(TaggedIsSmi(value), &common);
GotoUnless(HasInstanceType(value, JS_PROMISE_TYPE), &common);
GotoIfNot(HasInstanceType(value, JS_PROMISE_TYPE), &common);
{
// Mark the reject handler callback to be a forwarding edge, rather
// than a meaningful catch handler
......
......@@ -47,7 +47,7 @@ Node* ConstructorBuiltinsAssembler::EmitFastNewClosure(Node* shared_info,
Node* is_not_normal =
Word32And(compiler_hints,
Int32Constant(SharedFunctionInfo::kAllFunctionKindBitsMask));
GotoUnless(is_not_normal, &if_normal);
GotoIfNot(is_not_normal, &if_normal);
Node* is_generator = Word32And(
compiler_hints, Int32Constant(FunctionKind::kGeneratorFunction
......@@ -681,7 +681,7 @@ Node* ConstructorBuiltinsAssembler::EmitFastCloneShallowObject(
Node* boilerplate_map = LoadMap(boilerplate);
Node* instance_size = LoadMapInstanceSize(boilerplate_map);
Node* size_in_words = WordShr(object_size, kPointerSizeLog2);
GotoUnless(WordEqual(instance_size, size_in_words), call_runtime);
GotoIfNot(WordEqual(instance_size, size_in_words), call_runtime);
Node* copy = Allocate(allocation_size);
......@@ -705,8 +705,7 @@ Node* ConstructorBuiltinsAssembler::EmitFastCloneShallowObject(
Bind(&loop_check);
{
offset.Bind(IntPtrAdd(offset.value(), IntPtrConstant(kPointerSize)));
GotoUnless(IntPtrGreaterThanOrEqual(offset.value(), end_offset),
&loop_body);
GotoIfNot(IntPtrGreaterThanOrEqual(offset.value(), end_offset), &loop_body);
}
if (FLAG_allocation_site_pretenuring) {
......
......@@ -180,16 +180,15 @@ void Builtins::Generate_ToString(compiler::CodeAssemblerState* state) {
Node* input_instance_type = assembler.LoadMapInstanceType(input_map);
Label not_string(&assembler);
assembler.GotoUnless(assembler.IsStringInstanceType(input_instance_type),
&not_string);
assembler.GotoIfNot(assembler.IsStringInstanceType(input_instance_type),
&not_string);
assembler.Return(input);
Label not_heap_number(&assembler);
assembler.Bind(&not_string);
{
assembler.GotoUnless(assembler.IsHeapNumberMap(input_map),
&not_heap_number);
assembler.GotoIfNot(assembler.IsHeapNumberMap(input_map), &not_heap_number);
assembler.Goto(&is_number);
}
......@@ -367,9 +366,9 @@ void Builtins::Generate_ToLength(compiler::CodeAssemblerState* state) {
Node* len_value = assembler.LoadHeapNumberValue(len);
// Check if {len} is not greater than zero.
assembler.GotoUnless(assembler.Float64GreaterThan(
len_value, assembler.Float64Constant(0.0)),
&return_zero);
assembler.GotoIfNot(assembler.Float64GreaterThan(
len_value, assembler.Float64Constant(0.0)),
&return_zero);
// Check if {len} is greater than or equal to 2^53-1.
assembler.GotoIf(
......
......@@ -1099,7 +1099,7 @@ void Builtins::Generate_DatePrototypeToPrimitive(
// Check if the {receiver} is actually a JSReceiver.
Label receiver_is_invalid(&assembler, Label::kDeferred);
assembler.GotoIf(assembler.TaggedIsSmi(receiver), &receiver_is_invalid);
assembler.GotoUnless(assembler.IsJSReceiver(receiver), &receiver_is_invalid);
assembler.GotoIfNot(assembler.IsJSReceiver(receiver), &receiver_is_invalid);
// Dispatch to the appropriate OrdinaryToPrimitive builtin.
Label hint_is_number(&assembler), hint_is_string(&assembler),
......@@ -1116,7 +1116,7 @@ void Builtins::Generate_DatePrototypeToPrimitive(
// Slow-case with actual string comparisons.
Callable string_equal = CodeFactory::StringEqual(assembler.isolate());
assembler.GotoIf(assembler.TaggedIsSmi(hint), &hint_is_invalid);
assembler.GotoUnless(assembler.IsString(hint), &hint_is_invalid);
assembler.GotoIfNot(assembler.IsString(hint), &hint_is_invalid);
assembler.GotoIf(assembler.WordEqual(assembler.CallStub(string_equal, context,
hint, number_string),
assembler.TrueConstant()),
......
......@@ -325,7 +325,7 @@ void Builtins::Generate_FastFunctionPrototypeBind(
descriptors, DescriptorArray::ToValueIndex(length_index));
assembler.GotoIf(assembler.TaggedIsSmi(maybe_length_accessor), &slow);
Node* length_value_map = assembler.LoadMap(maybe_length_accessor);
assembler.GotoUnless(assembler.IsAccessorInfoMap(length_value_map), &slow);
assembler.GotoIfNot(assembler.IsAccessorInfoMap(length_value_map), &slow);
const int name_index = JSFunction::kNameDescriptorIndex;
Node* maybe_name = assembler.LoadFixedArrayElement(
......@@ -339,7 +339,7 @@ void Builtins::Generate_FastFunctionPrototypeBind(
descriptors, DescriptorArray::ToValueIndex(name_index));
assembler.GotoIf(assembler.TaggedIsSmi(maybe_name_accessor), &slow);
Node* name_value_map = assembler.LoadMap(maybe_name_accessor);
assembler.GotoUnless(assembler.IsAccessorInfoMap(name_value_map), &slow);
assembler.GotoIfNot(assembler.IsAccessorInfoMap(name_value_map), &slow);
// Choose the right bound function map based on whether the target is
// constructable.
......
......@@ -34,9 +34,9 @@ void GeneratorBuiltinsAssembler::GeneratorPrototypeResume(
Label if_receiverisincompatible(this, Label::kDeferred);
GotoIf(TaggedIsSmi(receiver), &if_receiverisincompatible);
Node* receiver_instance_type = LoadInstanceType(receiver);
GotoUnless(Word32Equal(receiver_instance_type,
Int32Constant(JS_GENERATOR_OBJECT_TYPE)),
&if_receiverisincompatible);
GotoIfNot(Word32Equal(receiver_instance_type,
Int32Constant(JS_GENERATOR_OBJECT_TYPE)),
&if_receiverisincompatible);
// Check if the {receiver} is running or already closed.
Node* receiver_continuation =
......
......@@ -142,7 +142,7 @@ TF_BUILTIN(LoadIC_FunctionPrototype, CodeStubAssembler) {
Variable var_result(this, MachineRepresentation::kTagged, proto_or_map);
Label done(this, &var_result);
GotoUnless(IsMap(proto_or_map), &done);
GotoIfNot(IsMap(proto_or_map), &done);
var_result.Bind(LoadMapPrototype(proto_or_map));
Goto(&done);
......
......@@ -247,7 +247,7 @@ void Builtins::Generate_NewUnmappedArgumentsElements(
assembler.Load(MachineType::AnyTagged(), parent_frame,
assembler.IntPtrConstant(
CommonFrameConstants::kContextOrFrameTypeOffset));
assembler.GotoUnless(
assembler.GotoIfNot(
assembler.WordEqual(
parent_frame_type,
assembler.SmiConstant(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR))),
......@@ -289,7 +289,7 @@ void Builtins::Generate_NewRestParameterElements(
assembler.Load(MachineType::AnyTagged(), frame,
assembler.IntPtrConstant(
CommonFrameConstants::kContextOrFrameTypeOffset));
assembler.GotoUnless(
assembler.GotoIfNot(
assembler.WordEqual(frame_type, assembler.SmiConstant(Smi::FromInt(
StackFrame::ARGUMENTS_ADAPTOR))),
&if_empty);
......
......@@ -60,7 +60,7 @@ TF_BUILTIN(NumberIsFinite, CodeStubAssembler) {
GotoIf(TaggedIsSmi(number), &return_true);
// Check if {number} is a HeapNumber.
GotoUnless(IsHeapNumberMap(LoadMap(number)), &return_false);
GotoIfNot(IsHeapNumberMap(LoadMap(number)), &return_false);
// Check if {number} contains a finite, non-NaN value.
Node* number_value = LoadHeapNumberValue(number);
......@@ -84,7 +84,7 @@ TF_BUILTIN(NumberIsInteger, CodeStubAssembler) {
GotoIf(TaggedIsSmi(number), &return_true);
// Check if {number} is a HeapNumber.
GotoUnless(IsHeapNumberMap(LoadMap(number)), &return_false);
GotoIfNot(IsHeapNumberMap(LoadMap(number)), &return_false);
// Load the actual value of {number}.
Node* number_value = LoadHeapNumberValue(number);
......@@ -113,7 +113,7 @@ TF_BUILTIN(NumberIsNaN, CodeStubAssembler) {
GotoIf(TaggedIsSmi(number), &return_false);
// Check if {number} is a HeapNumber.
GotoUnless(IsHeapNumberMap(LoadMap(number)), &return_false);
GotoIfNot(IsHeapNumberMap(LoadMap(number)), &return_false);
// Check if {number} contains a NaN value.
Node* number_value = LoadHeapNumberValue(number);
......@@ -136,7 +136,7 @@ TF_BUILTIN(NumberIsSafeInteger, CodeStubAssembler) {
GotoIf(TaggedIsSmi(number), &return_true);
// Check if {number} is a HeapNumber.
GotoUnless(IsHeapNumberMap(LoadMap(number)), &return_false);
GotoIfNot(IsHeapNumberMap(LoadMap(number)), &return_false);
// Load the actual value of {number}.
Node* number_value = LoadHeapNumberValue(number);
......@@ -145,7 +145,7 @@ TF_BUILTIN(NumberIsSafeInteger, CodeStubAssembler) {
Node* integer = Float64Trunc(number_value);
// Check if {number}s value matches the integer (ruling out the infinities).
GotoUnless(
GotoIfNot(
Float64Equal(Float64Sub(number_value, integer), Float64Constant(0.0)),
&return_false);
......@@ -299,8 +299,8 @@ TF_BUILTIN(NumberParseInt, CodeStubAssembler) {
// Check if the absolute {input} value is in the ]0.01,1e9[ range.
Node* input_value_abs = Float64Abs(input_value);
GotoUnless(Float64LessThan(input_value_abs, Float64Constant(1e9)),
&if_generic);
GotoIfNot(Float64LessThan(input_value_abs, Float64Constant(1e9)),
&if_generic);
Branch(Float64LessThan(Float64Constant(0.01), input_value_abs),
&if_inputissigned32, &if_generic);
......
......@@ -329,9 +329,9 @@ TF_BUILTIN(ObjectCreate, ObjectBuiltinsAssembler) {
Node* properties_map = LoadMap(properties);
GotoIf(IsSpecialReceiverMap(properties_map), &call_runtime);
// Stay on the fast path only if there are no elements.
GotoUnless(WordEqual(LoadElements(properties),
LoadRoot(Heap::kEmptyFixedArrayRootIndex)),
&call_runtime);
GotoIfNot(WordEqual(LoadElements(properties),
LoadRoot(Heap::kEmptyFixedArrayRootIndex)),
&call_runtime);
// Handle dictionary objects or fast objects with properties in runtime.
Node* bit_field3 = LoadMapBitField3(properties_map);
GotoIf(IsSetWord32<Map::DictionaryMap>(bit_field3), &call_runtime);
......@@ -934,7 +934,7 @@ TF_BUILTIN(ForInNext, ObjectBuiltinsAssembler) {
Node* key = LoadFixedArrayElement(cache_array, SmiUntag(index));
Node* map = LoadMap(object);
GotoUnless(WordEqual(map, cache_type), &filter);
GotoIfNot(WordEqual(map, cache_type), &filter);
Return(key);
Bind(&filter);
Return(ForInFilter(key, object, context));
......
......@@ -42,7 +42,7 @@ Node* PromiseBuiltinsAssembler::AllocateAndInitJSPromise(Node* context,
PromiseInit(instance);
Label out(this);
GotoUnless(IsPromiseHookEnabledOrDebugIsActive(), &out);
GotoIfNot(IsPromiseHookEnabledOrDebugIsActive(), &out);
CallRuntime(Runtime::kPromiseHookInit, context, instance, parent);
Goto(&out);
......@@ -63,7 +63,7 @@ Node* PromiseBuiltinsAssembler::AllocateAndSetJSPromise(Node* context,
SmiConstant(0));
Label out(this);
GotoUnless(IsPromiseHookEnabledOrDebugIsActive(), &out);
GotoIfNot(IsPromiseHookEnabledOrDebugIsActive(), &out);
CallRuntime(Runtime::kPromiseHookInit, context, instance,
UndefinedConstant());
Goto(&out);
......@@ -134,7 +134,7 @@ Node* PromiseBuiltinsAssembler::NewPromiseCapability(Node* context,
StoreObjectField(capability, JSPromiseCapability::kResolveOffset, resolve);
StoreObjectField(capability, JSPromiseCapability::kRejectOffset, reject);
GotoUnless(IsPromiseHookEnabledOrDebugIsActive(), &out);
GotoIfNot(IsPromiseHookEnabledOrDebugIsActive(), &out);
CallRuntime(Runtime::kPromiseHookInit, context, promise,
UndefinedConstant());
Goto(&out);
......@@ -158,12 +158,12 @@ Node* PromiseBuiltinsAssembler::NewPromiseCapability(Node* context,
Node* resolve =
LoadObjectField(capability, JSPromiseCapability::kResolveOffset);
GotoIf(TaggedIsSmi(resolve), &if_notcallable);
GotoUnless(IsCallableMap(LoadMap(resolve)), &if_notcallable);
GotoIfNot(IsCallableMap(LoadMap(resolve)), &if_notcallable);
Node* reject =
LoadObjectField(capability, JSPromiseCapability::kRejectOffset);
GotoIf(TaggedIsSmi(reject), &if_notcallable);
GotoUnless(IsCallableMap(LoadMap(reject)), &if_notcallable);
GotoIfNot(IsCallableMap(LoadMap(reject)), &if_notcallable);
StoreObjectField(capability, JSPromiseCapability::kPromiseOffset, promise);
......@@ -312,10 +312,10 @@ Node* PromiseBuiltinsAssembler::SpeciesConstructor(Node* context, Node* object,
// 7. If IsConstructor(S) is true, return S.
Label throw_error(this);
Node* species_bitfield = LoadMapBitField(LoadMap(species));
GotoUnless(Word32Equal(Word32And(species_bitfield,
Int32Constant((1 << Map::kIsConstructor))),
Int32Constant(1 << Map::kIsConstructor)),
&throw_error);
GotoIfNot(Word32Equal(Word32And(species_bitfield,
Int32Constant((1 << Map::kIsConstructor))),
Int32Constant(1 << Map::kIsConstructor)),
&throw_error);
var_result.Bind(species);
Goto(&out);
......@@ -467,8 +467,8 @@ Node* PromiseBuiltinsAssembler::InternalPerformPromiseThen(
{
Label fulfilled_check(this);
Node* const status = LoadObjectField(promise, JSPromise::kStatusOffset);
GotoUnless(SmiEqual(status, SmiConstant(v8::Promise::kPending)),
&fulfilled_check);
GotoIfNot(SmiEqual(status, SmiConstant(v8::Promise::kPending)),
&fulfilled_check);
Node* const existing_deferred_promise =
LoadObjectField(promise, JSPromise::kDeferredPromiseOffset);
......@@ -571,8 +571,8 @@ Node* PromiseBuiltinsAssembler::InternalPerformPromiseThen(
{
Label reject(this);
Node* const result = LoadObjectField(promise, JSPromise::kResultOffset);
GotoUnless(WordEqual(status, SmiConstant(v8::Promise::kFulfilled)),
&reject);
GotoIfNot(WordEqual(status, SmiConstant(v8::Promise::kFulfilled)),
&reject);
Node* info = AllocatePromiseReactionJobInfo(
result, var_on_resolve.value(), deferred_promise, deferred_on_resolve,
......@@ -640,7 +640,7 @@ void PromiseBuiltinsAssembler::BranchIfFastPath(Node* native_context,
LoadObjectField(promise_fun, JSFunction::kPrototypeOrInitialMapOffset);
Node* const has_initialmap = WordEqual(map, initial_map);
GotoUnless(has_initialmap, if_ismodified);
GotoIfNot(has_initialmap, if_ismodified);
Node* const initial_proto_initial_map =
LoadContextElement(native_context, Context::PROMISE_PROTOTYPE_MAP_INDEX);
......@@ -681,7 +681,7 @@ void PromiseBuiltinsAssembler::InternalResolvePromise(Node* context,
if_rejectpromise(this, Label::kDeferred), out(this);
Label cycle_check(this);
GotoUnless(IsPromiseHookEnabledOrDebugIsActive(), &cycle_check);
GotoIfNot(IsPromiseHookEnabledOrDebugIsActive(), &cycle_check);
CallRuntime(Runtime::kPromiseHookResolve, context, promise);
Goto(&cycle_check);
......@@ -691,7 +691,7 @@ void PromiseBuiltinsAssembler::InternalResolvePromise(Node* context,
// 7. If Type(resolution) is not Object, then
GotoIf(TaggedIsSmi(result), &fulfill);
GotoUnless(IsJSReceiver(result), &fulfill);
GotoIfNot(IsJSReceiver(result), &fulfill);
Label if_nativepromise(this), if_notnativepromise(this, Label::kDeferred);
Node* const native_context = LoadNativeContext(context);
......@@ -711,8 +711,8 @@ void PromiseBuiltinsAssembler::InternalResolvePromise(Node* context,
LoadObjectField(result, JSPromise::kResultOffset);
Label if_isnotpending(this);
GotoUnless(SmiEqual(SmiConstant(v8::Promise::kPending), thenable_status),
&if_isnotpending);
GotoIfNot(SmiEqual(SmiConstant(v8::Promise::kPending), thenable_status),
&if_isnotpending);
// TODO(gsathya): Use a marker here instead of the actual then
// callback, and check for the marker in PromiseResolveThenableJob
......@@ -770,7 +770,7 @@ void PromiseBuiltinsAssembler::InternalResolvePromise(Node* context,
// 11. If IsCallable(thenAction) is false, then
GotoIf(TaggedIsSmi(then), &fulfill);
Node* const then_map = LoadMap(then);
GotoUnless(IsCallableMap(then_map), &fulfill);
GotoIfNot(IsCallableMap(then_map), &fulfill);
var_then.Bind(then);
Goto(&do_enqueue);
}
......@@ -789,10 +789,10 @@ void PromiseBuiltinsAssembler::InternalResolvePromise(Node* context,
result, var_then.value(), resolve, reject, context);
Label enqueue(this);
GotoUnless(IsDebugActive(), &enqueue);
GotoIfNot(IsDebugActive(), &enqueue);
GotoIf(TaggedIsSmi(result), &enqueue);
GotoUnless(HasInstanceType(result, JS_PROMISE_TYPE), &enqueue);
GotoIfNot(HasInstanceType(result, JS_PROMISE_TYPE), &enqueue);
// Mark the dependency of the new promise on the resolution
Node* const key =
......@@ -868,7 +868,7 @@ void PromiseBuiltinsAssembler::PromiseFulfill(
Bind(&debug_async_event_enqueue_recurring);
{
GotoUnless(IsDebugActive(), &do_promisereset);
GotoIfNot(IsDebugActive(), &do_promisereset);
CallRuntime(Runtime::kDebugAsyncEventEnqueueRecurring, context, promise,
status_smi);
Goto(&do_promisereset);
......@@ -906,8 +906,8 @@ void PromiseBuiltinsAssembler::BranchIfAccessCheckFailed(
{
Node* executor_type = LoadInstanceType(var_executor.value());
GotoIf(InstanceTypeEqual(executor_type, JS_FUNCTION_TYPE), &found_function);
GotoUnless(InstanceTypeEqual(executor_type, JS_BOUND_FUNCTION_TYPE),
&call_runtime);
GotoIfNot(InstanceTypeEqual(executor_type, JS_BOUND_FUNCTION_TYPE),
&call_runtime);
var_executor.Bind(LoadObjectField(
var_executor.value(), JSBoundFunction::kBoundTargetFunctionOffset));
Goto(&loop_over_bound_function);
......@@ -940,8 +940,8 @@ void PromiseBuiltinsAssembler::InternalPromiseReject(Node* context,
Node* promise, Node* value,
Node* debug_event) {
Label out(this);
GotoUnless(IsDebugActive(), &out);
GotoUnless(WordEqual(TrueConstant(), debug_event), &out);
GotoIfNot(IsDebugActive(), &out);
GotoIfNot(WordEqual(TrueConstant(), debug_event), &out);
CallRuntime(Runtime::kDebugPromiseReject, context, promise, value);
Goto(&out);
......@@ -957,7 +957,7 @@ void PromiseBuiltinsAssembler::InternalPromiseReject(Node* context,
Label fulfill(this), report_unhandledpromise(this), run_promise_hook(this);
if (debug_event) {
GotoUnless(IsDebugActive(), &run_promise_hook);
GotoIfNot(IsDebugActive(), &run_promise_hook);
CallRuntime(Runtime::kDebugPromiseReject, context, promise, value);
Goto(&run_promise_hook);
} else {
......@@ -966,7 +966,7 @@ void PromiseBuiltinsAssembler::InternalPromiseReject(Node* context,
Bind(&run_promise_hook);
{
GotoUnless(IsPromiseHookEnabledOrDebugIsActive(), &report_unhandledpromise);
GotoIfNot(IsPromiseHookEnabledOrDebugIsActive(), &report_unhandledpromise);
CallRuntime(Runtime::kPromiseHookResolve, context, promise);
Goto(&report_unhandledpromise);
}
......@@ -1031,7 +1031,7 @@ TF_BUILTIN(PromiseConstructor, PromiseBuiltinsAssembler) {
GotoIf(TaggedIsSmi(executor), &if_notcallable);
Node* const executor_map = LoadMap(executor);
GotoUnless(IsCallableMap(executor_map), &if_notcallable);
GotoIfNot(IsCallableMap(executor_map), &if_notcallable);
Node* const native_context = LoadNativeContext(context);
Node* const promise_fun =
......@@ -1066,7 +1066,7 @@ TF_BUILTIN(PromiseConstructor, PromiseBuiltinsAssembler) {
PromiseInit(instance);
var_result.Bind(instance);
GotoUnless(IsPromiseHookEnabledOrDebugIsActive(), &debug_push);
GotoIfNot(IsPromiseHookEnabledOrDebugIsActive(), &debug_push);
CallRuntime(Runtime::kPromiseHookInit, context, instance,
UndefinedConstant());
Goto(&debug_push);
......@@ -1074,7 +1074,7 @@ TF_BUILTIN(PromiseConstructor, PromiseBuiltinsAssembler) {
Bind(&debug_push);
{
GotoUnless(is_debug_active, &run_executor);
GotoIfNot(is_debug_active, &run_executor);
CallRuntime(Runtime::kDebugPushPromise, context, var_result.value());
Goto(&run_executor);
}
......@@ -1255,13 +1255,13 @@ TF_BUILTIN(PromiseHandle, PromiseBuiltinsAssembler) {
Label run_handler(this), if_rejectpromise(this), promisehook_before(this),
promisehook_after(this), debug_pop(this);
GotoUnless(is_debug_active, &promisehook_before);
GotoIfNot(is_debug_active, &promisehook_before);
CallRuntime(Runtime::kDebugPushPromise, context, deferred_promise);
Goto(&promisehook_before);
Bind(&promisehook_before);
{
GotoUnless(IsPromiseHookEnabledOrDebugIsActive(), &run_handler);
GotoIfNot(IsPromiseHookEnabledOrDebugIsActive(), &run_handler);
CallRuntime(Runtime::kPromiseHookBefore, context, deferred_promise);
Goto(&run_handler);
}
......@@ -1332,7 +1332,7 @@ TF_BUILTIN(PromiseHandle, PromiseBuiltinsAssembler) {
Bind(&promisehook_after);
{
GotoUnless(IsPromiseHookEnabledOrDebugIsActive(), &debug_pop);
GotoIfNot(IsPromiseHookEnabledOrDebugIsActive(), &debug_pop);
CallRuntime(Runtime::kPromiseHookAfter, context, deferred_promise);
Goto(&debug_pop);
}
......@@ -1341,7 +1341,7 @@ TF_BUILTIN(PromiseHandle, PromiseBuiltinsAssembler) {
{
Label out(this);
GotoUnless(is_debug_active, &out);
GotoIfNot(is_debug_active, &out);
CallRuntime(Runtime::kDebugPopPromise, context);
Goto(&out);
......@@ -1402,7 +1402,7 @@ TF_BUILTIN(PromiseResolve, PromiseBuiltinsAssembler) {
GotoIf(TaggedIsSmi(value), &if_valueisnotpromise);
// This shortcircuits the constructor lookups.
GotoUnless(HasInstanceType(value, JS_PROMISE_TYPE), &if_valueisnotpromise);
GotoIfNot(HasInstanceType(value, JS_PROMISE_TYPE), &if_valueisnotpromise);
// This adds a fast path as non-subclassed native promises don't have
// an observable constructor lookup.
......@@ -1414,7 +1414,7 @@ TF_BUILTIN(PromiseResolve, PromiseBuiltinsAssembler) {
Bind(&if_valueisnativepromise);
{
GotoUnless(WordEqual(promise_fun, receiver), &if_valueisnotnativepromise);
GotoIfNot(WordEqual(promise_fun, receiver), &if_valueisnotnativepromise);
Return(value);
}
......@@ -1431,8 +1431,7 @@ TF_BUILTIN(PromiseResolve, PromiseBuiltinsAssembler) {
CallStub(getproperty_callable, context, value, constructor_str);
// 3.b If SameValue(xConstructor, C) is true, return x.
GotoUnless(SameValue(constructor, receiver, context),
&if_valueisnotpromise);
GotoIfNot(SameValue(constructor, receiver, context), &if_valueisnotpromise);
Return(value);
}
......
......@@ -278,9 +278,9 @@ Node* RegExpBuiltinsAssembler::RegExpPrototypeExecBodyWithoutResult(
Node* const lastindex = var_lastindex.value();
Label if_isoob(this, Label::kDeferred);
GotoUnless(TaggedIsSmi(lastindex), &if_isoob);
GotoIfNot(TaggedIsSmi(lastindex), &if_isoob);
Node* const string_length = LoadStringLength(string);
GotoUnless(SmiLessThanOrEqual(lastindex, string_length), &if_isoob);
GotoIfNot(SmiLessThanOrEqual(lastindex, string_length), &if_isoob);
Goto(&run_exec);
Bind(&if_isoob);
......@@ -315,9 +315,9 @@ Node* RegExpBuiltinsAssembler::RegExpPrototypeExecBodyWithoutResult(
// {match_indices} is either null or the RegExpMatchInfo array.
// Return early if exec failed, possibly updating last index.
GotoUnless(WordEqual(match_indices, null), &successful_match);
GotoIfNot(WordEqual(match_indices, null), &successful_match);
GotoUnless(should_update_last_index, if_didnotmatch);
GotoIfNot(should_update_last_index, if_didnotmatch);
StoreLastIndex(context, regexp, smi_zero, is_fastpath);
Goto(if_didnotmatch);
......@@ -325,7 +325,7 @@ Node* RegExpBuiltinsAssembler::RegExpPrototypeExecBodyWithoutResult(
Bind(&successful_match);
{
GotoUnless(should_update_last_index, &out);
GotoIfNot(should_update_last_index, &out);
// Update the new last index from {match_indices}.
Node* const new_lastindex = LoadFixedArrayElement(
......@@ -432,7 +432,7 @@ void RegExpBuiltinsAssembler::BranchIfFastRegExp(Node* const context,
LoadObjectField(regexp_fun, JSFunction::kPrototypeOrInitialMapOffset);
Node* const has_initialmap = WordEqual(map, initial_map);
GotoUnless(has_initialmap, if_ismodified);
GotoIfNot(has_initialmap, if_ismodified);
Node* const initial_proto_initial_map =
LoadContextElement(native_context, Context::REGEXP_PROTOTYPE_MAP_INDEX);
......@@ -532,7 +532,7 @@ Node* RegExpBuiltinsAssembler::FlagsGetter(Node* const context,
#define CASE_FOR_FLAG(FLAG) \
do { \
Label next(this); \
GotoUnless(IsSetWord(flags_intptr, FLAG), &next); \
GotoIfNot(IsSetWord(flags_intptr, FLAG), &next); \
var_length.Bind(IntPtrAdd(var_length.value(), int_one)); \
Goto(&next); \
Bind(&next); \
......@@ -589,7 +589,7 @@ Node* RegExpBuiltinsAssembler::FlagsGetter(Node* const context,
#define CASE_FOR_FLAG(FLAG, CHAR) \
do { \
Label next(this); \
GotoUnless(IsSetWord(flags_intptr, FLAG), &next); \
GotoIfNot(IsSetWord(flags_intptr, FLAG), &next); \
Node* const value = Int32Constant(CHAR); \
StoreNoWriteBarrier(MachineRepresentation::kWord8, result, \
var_offset.value(), value); \
......@@ -617,7 +617,7 @@ Node* RegExpBuiltinsAssembler::IsRegExp(Node* const context,
Variable var_result(this, MachineRepresentation::kWord32, Int32Constant(0));
GotoIf(TaggedIsSmi(maybe_receiver), &out);
GotoUnless(IsJSReceiver(maybe_receiver), &out);
GotoIfNot(IsJSReceiver(maybe_receiver), &out);
Node* const receiver = maybe_receiver;
......@@ -711,17 +711,17 @@ TF_BUILTIN(RegExpConstructor, RegExpBuiltinsAssembler) {
{
Label next(this);
GotoUnless(IsUndefined(new_target), &next);
GotoIfNot(IsUndefined(new_target), &next);
var_new_target.Bind(regexp_function);
GotoUnless(pattern_is_regexp, &next);
GotoUnless(IsUndefined(flags), &next);
GotoIfNot(pattern_is_regexp, &next);
GotoIfNot(IsUndefined(flags), &next);
Callable getproperty_callable = CodeFactory::GetProperty(isolate);
Node* const name = HeapConstant(isolate->factory()->constructor_string());
Node* const value = CallStub(getproperty_callable, context, pattern, name);
GotoUnless(WordEqual(value, regexp_function), &next);
GotoIfNot(WordEqual(value, regexp_function), &next);
Return(pattern);
Bind(&next);
......@@ -743,7 +743,7 @@ TF_BUILTIN(RegExpConstructor, RegExpBuiltinsAssembler) {
{
Label inner_next(this);
GotoUnless(IsUndefined(flags), &inner_next);
GotoIfNot(IsUndefined(flags), &inner_next);
Node* const value = FlagsGetter(context, pattern, true);
var_flags.Bind(value);
......@@ -768,7 +768,7 @@ TF_BUILTIN(RegExpConstructor, RegExpBuiltinsAssembler) {
{
Label inner_next(this);
GotoUnless(IsUndefined(flags), &inner_next);
GotoIfNot(IsUndefined(flags), &inner_next);
Node* const name = HeapConstant(isolate->factory()->flags_string());
Node* const value =
......@@ -840,7 +840,7 @@ TF_BUILTIN(RegExpPrototypeCompile, RegExpBuiltinsAssembler) {
Label next(this);
GotoIf(TaggedIsSmi(maybe_pattern), &next);
GotoUnless(HasInstanceType(maybe_pattern, JS_REGEXP_TYPE), &next);
GotoIfNot(HasInstanceType(maybe_pattern, JS_REGEXP_TYPE), &next);
Node* const pattern = maybe_pattern;
......@@ -1331,17 +1331,17 @@ Node* RegExpBuiltinsAssembler::AdvanceStringIndex(Node* const string,
Bind(&if_isunicode);
{
Node* const string_length = LoadStringLength(string);
GotoUnless(SmiLessThan(index_plus_one, string_length), &out);
GotoIfNot(SmiLessThan(index_plus_one, string_length), &out);
Node* const lead = StringCharCodeAt(string, index);
GotoUnless(Word32Equal(Word32And(lead, Int32Constant(0xFC00)),
Int32Constant(0xD800)),
&out);
GotoIfNot(Word32Equal(Word32And(lead, Int32Constant(0xFC00)),
Int32Constant(0xD800)),
&out);
Node* const trail = StringCharCodeAt(string, index_plus_one);
GotoUnless(Word32Equal(Word32And(trail, Int32Constant(0xFC00)),
Int32Constant(0xDC00)),
&out);
GotoIfNot(Word32Equal(Word32And(trail, Int32Constant(0xFC00)),
Int32Constant(0xDC00)),
&out);
// At a surrogate pair, return index + 2.
Node* const index_plus_two = SmiAdd(index, SmiConstant(2));
......@@ -1610,7 +1610,7 @@ void RegExpBuiltinsAssembler::RegExpPrototypeMatchBody(Node* const context,
Bind(&if_didnotmatch);
{
// Return null if there were no matches, otherwise just exit the loop.
GotoUnless(IntPtrEqual(array.length(), int_zero), &out);
GotoIfNot(IntPtrEqual(array.length(), int_zero), &out);
Return(null);
}
......@@ -1625,7 +1625,7 @@ void RegExpBuiltinsAssembler::RegExpPrototypeMatchBody(Node* const context,
// Advance last index if the match is the empty string.
Node* const match_length = LoadStringLength(match);
GotoUnless(SmiEqual(match_length, smi_zero), &loop);
GotoIfNot(SmiEqual(match_length, smi_zero), &loop);
Node* last_index = LoadLastIndex(context, regexp, is_fastpath);
......@@ -1747,7 +1747,7 @@ void RegExpBuiltinsAssembler::RegExpPrototypeSearchBodySlow(
// Return -1 if no match was found.
{
Label next(this);
GotoUnless(WordEqual(exec_result, NullConstant()), &next);
GotoIfNot(WordEqual(exec_result, NullConstant()), &next);
Return(SmiConstant(-1));
Bind(&next);
}
......@@ -1932,8 +1932,8 @@ void RegExpBuiltinsAssembler::RegExpPrototypeSplitBody(Node* const context,
{
Label next(this);
GotoUnless(SmiEqual(match_to, next_search_from), &next);
GotoUnless(SmiEqual(match_to, last_matched_until), &next);
GotoIfNot(SmiEqual(match_to, next_search_from), &next);
GotoIfNot(SmiEqual(match_to, last_matched_until), &next);
Node* const is_unicode = FastFlagGetter(regexp, JSRegExp::kUnicode);
Node* const new_next_search_from =
......@@ -2072,7 +2072,7 @@ TF_BUILTIN(RegExpSplit, RegExpBuiltinsAssembler) {
{
Node* const limit = ToUint32(context, maybe_limit);
GotoUnless(TaggedIsSmi(limit), &if_limitissmimax);
GotoIfNot(TaggedIsSmi(limit), &if_limitissmimax);
var_limit.Bind(limit);
Goto(&limit_done);
......@@ -2208,7 +2208,7 @@ Node* RegExpBuiltinsAssembler::ReplaceGlobalCallableFastPath(
Bind(&loop);
{
Node* const i = var_i.value();
GotoUnless(IntPtrLessThan(i, end), &create_result);
GotoIfNot(IntPtrLessThan(i, end), &create_result);
Node* const elem = LoadFixedArrayElement(res_elems, i);
......@@ -2460,7 +2460,7 @@ TF_BUILTIN(RegExpReplace, RegExpBuiltinsAssembler) {
isolate()->factory()->LookupSingleCharacterStringFromCode('$'));
Node* const dollar_ix = CallStub(indexof_callable, context, replace_string,
dollar_string, SmiConstant(0));
GotoUnless(SmiEqual(dollar_ix, SmiConstant(-1)), &runtime);
GotoIfNot(SmiEqual(dollar_ix, SmiConstant(-1)), &runtime);
Return(
ReplaceSimpleStringFastPath(context, regexp, string, replace_string));
......
......@@ -696,7 +696,7 @@ TF_BUILTIN(StringPrototypeCharAt, CodeStubAssembler) {
Label return_emptystring(this, Label::kDeferred);
position =
ToInteger(context, position, CodeStubAssembler::kTruncateMinusZero);
GotoUnless(TaggedIsSmi(position), &return_emptystring);
GotoIfNot(TaggedIsSmi(position), &return_emptystring);
// Determine the actual length of the {receiver} String.
Node* receiver_length = LoadObjectField(receiver, String::kLengthOffset);
......@@ -735,7 +735,7 @@ TF_BUILTIN(StringPrototypeCharCodeAt, CodeStubAssembler) {
Label return_nan(this, Label::kDeferred);
position =
ToInteger(context, position, CodeStubAssembler::kTruncateMinusZero);
GotoUnless(TaggedIsSmi(position), &return_nan);
GotoIfNot(TaggedIsSmi(position), &return_nan);
// Determine the actual length of the {receiver} String.
Node* receiver_length = LoadObjectField(receiver, String::kLengthOffset);
......@@ -873,9 +873,9 @@ void StringBuiltinsAssembler::StringIndexOf(
GotoIf(IntPtrEqual(IntPtrConstant(0), needle_length), &zero_length_needle);
// Check that the needle fits in the start position.
GotoUnless(IntPtrLessThanOrEqual(needle_length,
IntPtrSub(string_length, start_position)),
&return_minus_1);
GotoIfNot(IntPtrLessThanOrEqual(needle_length,
IntPtrSub(string_length, start_position)),
&return_minus_1);
// Only support one-byte strings on the fast path.
BranchIfSimpleOneByteStringInstanceType(instance_type, &check_search_string,
&call_runtime_unchecked);
......@@ -976,7 +976,7 @@ TF_BUILTIN(StringPrototypeIndexOf, StringBuiltinsAssembler) {
Comment("2 Argument case");
search_string.Bind(arguments.AtIndex(0));
position.Bind(arguments.AtIndex(1));
GotoUnless(TaggedIsSmi(position.value()), &call_runtime);
GotoIfNot(TaggedIsSmi(position.value()), &call_runtime);
Goto(&fast_path);
}
......@@ -988,10 +988,10 @@ TF_BUILTIN(StringPrototypeIndexOf, StringBuiltinsAssembler) {
GotoIf(TaggedIsSmi(needle), &call_runtime);
Node* instance_type = LoadInstanceType(receiver);
GotoUnless(IsStringInstanceType(instance_type), &call_runtime);
GotoIfNot(IsStringInstanceType(instance_type), &call_runtime);
Node* needle_instance_type = LoadInstanceType(needle);
GotoUnless(IsStringInstanceType(needle_instance_type), &call_runtime);
GotoIfNot(IsStringInstanceType(needle_instance_type), &call_runtime);
StringIndexOf(
receiver, instance_type, needle, needle_instance_type, position.value(),
......@@ -1133,7 +1133,7 @@ void StringBuiltinsAssembler::MaybeCallFunctionAtSymbol(
{
Label next(this);
GotoUnless(IsStringInstanceType(LoadMapInstanceType(object_map)), &next);
GotoIfNot(IsStringInstanceType(LoadMapInstanceType(object_map)), &next);
Node* const native_context = LoadNativeContext(context);
Node* const initial_proto_initial_map = LoadContextElement(
......@@ -1229,16 +1229,16 @@ TF_BUILTIN(StringPrototypeReplace, StringBuiltinsAssembler) {
{
Label next(this);
GotoUnless(SmiEqual(search_length, SmiConstant(1)), &next);
GotoUnless(SmiGreaterThan(subject_length, SmiConstant(0xFF)), &next);
GotoIfNot(SmiEqual(search_length, SmiConstant(1)), &next);
GotoIfNot(SmiGreaterThan(subject_length, SmiConstant(0xFF)), &next);
GotoIf(TaggedIsSmi(replace), &next);
GotoUnless(IsString(replace), &next);
GotoIfNot(IsString(replace), &next);
Node* const dollar_string = HeapConstant(
isolate()->factory()->LookupSingleCharacterStringFromCode('$'));
Node* const dollar_ix =
CallStub(indexof_callable, context, replace, dollar_string, smi_zero);
GotoUnless(SmiIsNegative(dollar_ix), &next);
GotoIfNot(SmiIsNegative(dollar_ix), &next);
// Searching by traversing a cons string tree and replace with cons of
// slices works only when the replaced string is a single character, being
......@@ -1263,7 +1263,7 @@ TF_BUILTIN(StringPrototypeReplace, StringBuiltinsAssembler) {
{
Label next(this), return_subject(this);
GotoUnless(SmiIsNegative(match_start_index), &next);
GotoIfNot(SmiIsNegative(match_start_index), &next);
// The spec requires to perform ToString(replace) if the {replace} is not
// callable even if we are going to exit here.
......@@ -1398,7 +1398,7 @@ TF_BUILTIN(StringPrototypeSplit, StringBuiltinsAssembler) {
// Shortcut for {limit} == 0.
{
Label next(this);
GotoUnless(SmiEqual(limit_number, smi_zero), &next);
GotoIfNot(SmiEqual(limit_number, smi_zero), &next);
const ElementsKind kind = FAST_ELEMENTS;
Node* const native_context = LoadNativeContext(context);
......@@ -1417,7 +1417,7 @@ TF_BUILTIN(StringPrototypeSplit, StringBuiltinsAssembler) {
// be an array of size 1 containing the entire string.
{
Label next(this);
GotoUnless(IsUndefined(separator), &next);
GotoIfNot(IsUndefined(separator), &next);
const ElementsKind kind = FAST_ELEMENTS;
Node* const native_context = LoadNativeContext(context);
......@@ -1438,7 +1438,7 @@ TF_BUILTIN(StringPrototypeSplit, StringBuiltinsAssembler) {
// If the separator string is empty then return the elements in the subject.
{
Label next(this);
GotoUnless(SmiEqual(LoadStringLength(separator_string), smi_zero), &next);
GotoIfNot(SmiEqual(LoadStringLength(separator_string), smi_zero), &next);
Node* const result = CallRuntime(Runtime::kStringToArray, context,
subject_string, limit_number);
......@@ -1535,7 +1535,7 @@ TF_BUILTIN(StringPrototypeSubstr, CodeStubAssembler) {
Node* const minimal_length = SmiSub(string_length, var_start.value());
var_length.Bind(SmiMin(positive_length, minimal_length));
GotoUnless(SmiLessThanOrEqual(var_length.value(), zero), &out);
GotoIfNot(SmiLessThanOrEqual(var_length.value(), zero), &out);
Return(EmptyStringConstant());
}
......@@ -1559,7 +1559,7 @@ TF_BUILTIN(StringPrototypeSubstr, CodeStubAssembler) {
Bind(&if_ispositive);
{
var_length.Bind(SmiSub(string_length, var_start.value()));
GotoUnless(SmiLessThanOrEqual(var_length.value(), zero), &out);
GotoIfNot(SmiLessThanOrEqual(var_length.value(), zero), &out);
Return(EmptyStringConstant());
}
}
......@@ -1799,7 +1799,7 @@ compiler::Node* StringBuiltinsAssembler::LoadSurrogatePairAt(
&return_result);
Node* next_index = SmiAdd(index, SmiConstant(Smi::FromInt(1)));
GotoUnless(SmiLessThan(next_index, length), &return_result);
GotoIfNot(SmiLessThan(next_index, length), &return_result);
var_trail.Bind(StringCharCodeAt(string, next_index));
Branch(Word32Equal(Word32And(var_trail.value(), Int32Constant(0xFC00)),
Int32Constant(0xDC00)),
......@@ -1861,9 +1861,9 @@ TF_BUILTIN(StringIteratorPrototypeNext, StringBuiltinsAssembler) {
Node* context = Parameter(3);
GotoIf(TaggedIsSmi(iterator), &throw_bad_receiver);
GotoUnless(Word32Equal(LoadInstanceType(iterator),
Int32Constant(JS_STRING_ITERATOR_TYPE)),
&throw_bad_receiver);
GotoIfNot(Word32Equal(LoadInstanceType(iterator),
Int32Constant(JS_STRING_ITERATOR_TYPE)),
&throw_bad_receiver);
Node* string = LoadObjectField(iterator, JSStringIterator::kStringOffset);
Node* position =
......
......@@ -35,7 +35,7 @@ void Generate_TypedArrayPrototypeGetter(compiler::CodeAssemblerState* state,
Label if_receiverisincompatible(&assembler, Label::kDeferred);
assembler.GotoIf(assembler.TaggedIsSmi(receiver), &if_receiverisincompatible);
Node* receiver_instance_type = assembler.LoadInstanceType(receiver);
assembler.GotoUnless(
assembler.GotoIfNot(
assembler.Word32Equal(receiver_instance_type,
assembler.Int32Constant(JS_TYPED_ARRAY_TYPE)),
&if_receiverisincompatible);
......
......@@ -248,7 +248,7 @@ Node* CodeStubAssembler::Float64Ceil(Node* x) {
// Round positive {x} towards Infinity.
var_x.Bind(Float64Sub(Float64Add(two_52, x), two_52));
GotoUnless(Float64LessThan(var_x.value(), x), &return_x);
GotoIfNot(Float64LessThan(var_x.value(), x), &return_x);
var_x.Bind(Float64Add(var_x.value(), one));
Goto(&return_x);
}
......@@ -257,12 +257,12 @@ Node* CodeStubAssembler::Float64Ceil(Node* x) {
{
// Just return {x} unless it's in the range ]-2^52,0[
GotoIf(Float64LessThanOrEqual(x, minus_two_52), &return_x);
GotoUnless(Float64LessThan(x, zero), &return_x);
GotoIfNot(Float64LessThan(x, zero), &return_x);
// Round negated {x} towards Infinity and return the result negated.
Node* minus_x = Float64Neg(x);
var_x.Bind(Float64Sub(Float64Add(two_52, minus_x), two_52));
GotoUnless(Float64GreaterThan(var_x.value(), minus_x), &return_minus_x);
GotoIfNot(Float64GreaterThan(var_x.value(), minus_x), &return_minus_x);
var_x.Bind(Float64Sub(var_x.value(), one));
Goto(&return_minus_x);
}
......@@ -300,7 +300,7 @@ Node* CodeStubAssembler::Float64Floor(Node* x) {
// Round positive {x} towards -Infinity.
var_x.Bind(Float64Sub(Float64Add(two_52, x), two_52));
GotoUnless(Float64GreaterThan(var_x.value(), x), &return_x);
GotoIfNot(Float64GreaterThan(var_x.value(), x), &return_x);
var_x.Bind(Float64Sub(var_x.value(), one));
Goto(&return_x);
}
......@@ -309,12 +309,12 @@ Node* CodeStubAssembler::Float64Floor(Node* x) {
{
// Just return {x} unless it's in the range ]-2^52,0[
GotoIf(Float64LessThanOrEqual(x, minus_two_52), &return_x);
GotoUnless(Float64LessThan(x, zero), &return_x);
GotoIfNot(Float64LessThan(x, zero), &return_x);
// Round negated {x} towards -Infinity and return the result negated.
Node* minus_x = Float64Neg(x);
var_x.Bind(Float64Sub(Float64Add(two_52, minus_x), two_52));
GotoUnless(Float64LessThan(var_x.value(), minus_x), &return_minus_x);
GotoIfNot(Float64LessThan(var_x.value(), minus_x), &return_minus_x);
var_x.Bind(Float64Add(var_x.value(), one));
Goto(&return_minus_x);
}
......@@ -386,7 +386,7 @@ Node* CodeStubAssembler::Float64Trunc(Node* x) {
// Round positive {x} towards -Infinity.
var_x.Bind(Float64Sub(Float64Add(two_52, x), two_52));
GotoUnless(Float64GreaterThan(var_x.value(), x), &return_x);
GotoIfNot(Float64GreaterThan(var_x.value(), x), &return_x);
var_x.Bind(Float64Sub(var_x.value(), one));
}
Goto(&return_x);
......@@ -400,12 +400,12 @@ Node* CodeStubAssembler::Float64Trunc(Node* x) {
} else {
// Just return {x} unless its in the range ]-2^52,0[.
GotoIf(Float64LessThanOrEqual(x, minus_two_52), &return_x);
GotoUnless(Float64LessThan(x, zero), &return_x);
GotoIfNot(Float64LessThan(x, zero), &return_x);
// Round negated {x} towards -Infinity and return result negated.
Node* minus_x = Float64Neg(x);
var_x.Bind(Float64Sub(Float64Add(two_52, minus_x), two_52));
GotoUnless(Float64GreaterThan(var_x.value(), minus_x), &return_minus_x);
GotoIfNot(Float64GreaterThan(var_x.value(), minus_x), &return_minus_x);
var_x.Bind(Float64Sub(var_x.value(), one));
Goto(&return_minus_x);
}
......@@ -489,7 +489,7 @@ Node* CodeStubAssembler::SmiMod(Node* a, Node* b) {
// Check if {a} is kMinInt and {b} is -1 (only relevant if the
// kMinInt is actually representable as a Smi).
Label join(this);
GotoUnless(Word32Equal(a, Int32Constant(kMinInt)), &join);
GotoIfNot(Word32Equal(a, Int32Constant(kMinInt)), &join);
GotoIf(Word32Equal(b, Int32Constant(-1)), &return_minuszero);
Goto(&join);
Bind(&join);
......@@ -671,11 +671,11 @@ void CodeStubAssembler::BranchIfFastJSArray(
Node* elements_kind = LoadMapElementsKind(map);
// Bailout if receiver has slow elements.
GotoUnless(IsFastElementsKind(elements_kind), if_false);
GotoIfNot(IsFastElementsKind(elements_kind), if_false);
// Check prototype chain if receiver does not have packed elements.
if (mode == FastJSArrayAccessMode::INBOUNDS_READ) {
GotoUnless(IsHoleyFastElementsKind(elements_kind), if_true);
GotoIfNot(IsHoleyFastElementsKind(elements_kind), if_true);
}
BranchIfPrototypesHaveNoElements(map, if_true, if_false);
}
......@@ -871,7 +871,7 @@ void CodeStubAssembler::BranchIfToBooleanIsTrue(Node* value, Label* if_true,
Word32And(value_map_bitfield, Int32Constant(1 << Map::kIsUndetectable));
// Check if the {value} is undetectable.
GotoUnless(Word32Equal(value_map_undetectable, Int32Constant(0)), if_false);
GotoIfNot(Word32Equal(value_map_undetectable, Int32Constant(0)), if_false);
// We still need to handle numbers specially, but all other {value}s
// that make it here yield true.
......@@ -1072,9 +1072,9 @@ Node* CodeStubAssembler::LoadMapPrototypeInfo(Node* map,
Node* prototype_info =
LoadObjectField(map, Map::kTransitionsOrPrototypeInfoOffset);
GotoIf(TaggedIsSmi(prototype_info), if_no_proto_info);
GotoUnless(WordEqual(LoadMap(prototype_info),
LoadRoot(Heap::kPrototypeInfoMapRootIndex)),
if_no_proto_info);
GotoIfNot(WordEqual(LoadMap(prototype_info),
LoadRoot(Heap::kPrototypeInfoMapRootIndex)),
if_no_proto_info);
return prototype_info;
}
......@@ -1119,7 +1119,7 @@ Node* CodeStubAssembler::LoadMapConstructor(Node* map) {
GotoIf(TaggedIsSmi(result.value()), &done);
Node* is_map_type =
Word32Equal(LoadInstanceType(result.value()), Int32Constant(MAP_TYPE));
GotoUnless(is_map_type, &done);
GotoIfNot(is_map_type, &done);
result.Bind(
LoadObjectField(result.value(), Map::kConstructorOrBackPointerOffset));
Goto(&loop);
......@@ -1450,7 +1450,7 @@ Node* CodeStubAssembler::BuildAppendJSArray(ElementsKind kind, Node* context,
Node* growth = IntPtrSub(args.GetLength(), first);
Node* new_length =
IntPtrOrSmiAdd(WordToParameter(growth, mode), var_length.value(), mode);
GotoUnless(IntPtrOrSmiGreaterThan(new_length, capacity, mode), &fits);
GotoIfNot(IntPtrOrSmiGreaterThan(new_length, capacity, mode), &fits);
Node* new_capacity = CalculateNewElementsCapacity(new_length, mode);
var_elements.Bind(GrowElementsCapacity(array, var_elements.value(), kind,
kind, capacity, new_capacity, mode,
......@@ -2547,7 +2547,7 @@ Node* CodeStubAssembler::ChangeFloat64ToTagged(Node* value) {
Branch(Float64Equal(value, value64), &if_valueisequal, &if_valueisnotequal);
Bind(&if_valueisequal);
{
GotoUnless(Word32Equal(value32, Int32Constant(0)), &if_valueisint32);
GotoIfNot(Word32Equal(value32, Int32Constant(0)), &if_valueisint32);
Branch(Int32LessThan(Float64ExtractHighWord32(value), Int32Constant(0)),
&if_valueisheapnumber, &if_valueisint32);
}
......@@ -3301,8 +3301,8 @@ Node* CodeStubAssembler::SubString(Node* context, Node* string, Node* from,
// Make sure that both from and to are non-negative smis.
GotoUnless(TaggedIsPositiveSmi(from), &runtime);
GotoUnless(TaggedIsPositiveSmi(to), &runtime);
GotoIfNot(TaggedIsPositiveSmi(from), &runtime);
GotoIfNot(TaggedIsPositiveSmi(to), &runtime);
Node* const substr_length = SmiSub(to, from);
Node* const string_length = LoadStringLength(string);
......@@ -3439,10 +3439,10 @@ Node* CodeStubAssembler::SubString(Node* context, Node* string, Node* from,
// encoding at this point.
STATIC_ASSERT(kExternalStringTag != 0);
STATIC_ASSERT(kSeqStringTag == 0);
GotoUnless(Word32Equal(Word32And(var_instance_type.value(),
Int32Constant(kExternalStringTag)),
Int32Constant(0)),
&external_string);
GotoIfNot(Word32Equal(Word32And(var_instance_type.value(),
Int32Constant(kExternalStringTag)),
Int32Constant(0)),
&external_string);
var_result.Bind(AllocAndCopyStringCharacters(
this, context, var_string.value(), var_instance_type.value(),
......@@ -3781,7 +3781,7 @@ Node* CodeStubAssembler::NumberToString(Node* context, Node* argument) {
// Argument isn't smi, check to see if it's a heap-number.
Node* map = LoadMap(argument);
GotoUnless(IsHeapNumberMap(map), &runtime);
GotoIfNot(IsHeapNumberMap(map), &runtime);
// Make a hash from the two 32-bit values of the double.
Node* low =
......@@ -3797,15 +3797,15 @@ Node* CodeStubAssembler::NumberToString(Node* context, Node* argument) {
Node* number_key = LoadFixedArrayElement(number_string_cache, index);
GotoIf(TaggedIsSmi(number_key), &runtime);
map = LoadMap(number_key);
GotoUnless(IsHeapNumberMap(map), &runtime);
GotoIfNot(IsHeapNumberMap(map), &runtime);
// Cache entry's key must match the heap number value we're looking for.
Node* low_compare = LoadObjectField(number_key, HeapNumber::kValueOffset,
MachineType::Int32());
Node* high_compare = LoadObjectField(
number_key, HeapNumber::kValueOffset + kIntSize, MachineType::Int32());
GotoUnless(Word32Equal(low, low_compare), &runtime);
GotoUnless(Word32Equal(high, high_compare), &runtime);
GotoIfNot(Word32Equal(low, low_compare), &runtime);
GotoIfNot(Word32Equal(high, high_compare), &runtime);
// Heap number match, return value from cache entry.
IncrementCounter(isolate()->counters()->number_to_string_native(), 1);
......@@ -3978,7 +3978,7 @@ Node* CodeStubAssembler::ToNumber(Node* context, Node* input) {
Label end(this);
Label not_smi(this, Label::kDeferred);
GotoUnless(TaggedIsSmi(input), &not_smi);
GotoIfNot(TaggedIsSmi(input), &not_smi);
var_result.Bind(input);
Goto(&end);
......@@ -3986,7 +3986,7 @@ Node* CodeStubAssembler::ToNumber(Node* context, Node* input) {
{
Label not_heap_number(this, Label::kDeferred);
Node* input_map = LoadMap(input);
GotoUnless(IsHeapNumberMap(input_map), &not_heap_number);
GotoIfNot(IsHeapNumberMap(input_map), &not_heap_number);
var_result.Bind(input);
Goto(&end);
......@@ -4196,7 +4196,7 @@ Node* CodeStubAssembler::ToInteger(Node* context, Node* input,
Node* arg_value = LoadHeapNumberValue(arg);
// Check if {arg} is NaN.
GotoUnless(Float64Equal(arg_value, arg_value), &return_zero);
GotoIfNot(Float64Equal(arg_value, arg_value), &return_zero);
// Truncate {arg} towards zero.
Node* value = Float64Trunc(arg_value);
......@@ -4300,7 +4300,7 @@ void CodeStubAssembler::TryToName(Node* key, Label* if_keyisindex,
Node* key_instance_type = LoadMapInstanceType(key_map);
// Miss if |key| is not a String.
STATIC_ASSERT(FIRST_NAME_TYPE == FIRST_TYPE);
GotoUnless(IsStringInstanceType(key_instance_type), if_bailout);
GotoIfNot(IsStringInstanceType(key_instance_type), if_bailout);
// |key| is a String. Check if it has a cached array index.
Node* hash = LoadNameHashField(key);
Node* contains_index =
......@@ -4598,10 +4598,10 @@ void CodeStubAssembler::InsertEntry<NameDictionary>(Node* dictionary,
// Private names must be marked non-enumerable.
Label not_private(this, &var_details);
GotoUnless(IsSymbolMap(LoadMap(name)), &not_private);
GotoIfNot(IsSymbolMap(LoadMap(name)), &not_private);
Node* flags = SmiToWord32(LoadObjectField(name, Symbol::kFlagsOffset));
const int kPrivateMask = 1 << Symbol::kPrivateBit;
GotoUnless(IsSetWord32(flags, kPrivateMask), &not_private);
GotoIfNot(IsSetWord32(flags, kPrivateMask), &not_private);
Node* dont_enum =
SmiShl(SmiConstant(DONT_ENUM), PropertyDetails::AttributesField::kShift);
var_details.Bind(SmiOr(var_details.value(), dont_enum));
......@@ -4858,8 +4858,8 @@ void CodeStubAssembler::TryLookupProperty(
Bind(&if_objectisspecial);
{
// Handle global object here and other special objects in runtime.
GotoUnless(Word32Equal(instance_type, Int32Constant(JS_GLOBAL_OBJECT_TYPE)),
if_bailout);
GotoIfNot(Word32Equal(instance_type, Int32Constant(JS_GLOBAL_OBJECT_TYPE)),
if_bailout);
// Handle interceptors and access checks in runtime.
Node* bit_field = LoadMapBitField(map);
......@@ -5069,7 +5069,7 @@ Node* CodeStubAssembler::CallGetterIfAccessor(Node* value, Node* details,
// Return undefined if the {getter} is not callable.
var_value.Bind(UndefinedConstant());
GotoUnless(IsCallableMap(getter_map), &done);
GotoIfNot(IsCallableMap(getter_map), &done);
// Call the accessor.
Callable callable = CodeFactory::Call(isolate());
......@@ -5185,7 +5185,7 @@ void CodeStubAssembler::TryLookupElement(Node* object, Node* map,
Node* elements = LoadElements(object);
Node* length = LoadAndUntagFixedArrayBaseLength(elements);
GotoUnless(UintPtrLessThan(intptr_index, length), &if_oob);
GotoIfNot(UintPtrLessThan(intptr_index, length), &if_oob);
Node* element = LoadFixedArrayElement(elements, intptr_index);
Node* the_hole = TheHoleConstant();
......@@ -5196,7 +5196,7 @@ void CodeStubAssembler::TryLookupElement(Node* object, Node* map,
Node* elements = LoadElements(object);
Node* length = LoadAndUntagFixedArrayBaseLength(elements);
GotoUnless(UintPtrLessThan(intptr_index, length), &if_oob);
GotoIfNot(UintPtrLessThan(intptr_index, length), &if_oob);
// Check if the element is a double hole, but don't load it.
LoadFixedDoubleArrayElement(elements, intptr_index, MachineType::None(), 0,
......@@ -5373,10 +5373,10 @@ Node* CodeStubAssembler::OrdinaryHasInstance(Node* context, Node* callable,
Node* instanceof_cache_map = LoadRoot(Heap::kInstanceofCacheMapRootIndex);
{
Label instanceof_cache_miss(this);
GotoUnless(WordEqual(instanceof_cache_function, callable),
&instanceof_cache_miss);
GotoUnless(WordEqual(instanceof_cache_map, object_map),
&instanceof_cache_miss);
GotoIfNot(WordEqual(instanceof_cache_function, callable),
&instanceof_cache_miss);
GotoIfNot(WordEqual(instanceof_cache_map, object_map),
&instanceof_cache_miss);
var_result.Bind(LoadRoot(Heap::kInstanceofCacheAnswerRootIndex));
Goto(&return_result);
Bind(&instanceof_cache_miss);
......@@ -5390,14 +5390,14 @@ Node* CodeStubAssembler::OrdinaryHasInstance(Node* context, Node* callable,
// Goto runtime if {callable} is not a JSFunction.
Node* callable_instance_type = LoadMapInstanceType(callable_map);
GotoUnless(
GotoIfNot(
Word32Equal(callable_instance_type, Int32Constant(JS_FUNCTION_TYPE)),
&return_runtime);
// Goto runtime if {callable} is not a constructor or has
// a non-instance "prototype".
Node* callable_bitfield = LoadMapBitField(callable_map);
GotoUnless(
GotoIfNot(
Word32Equal(Word32And(callable_bitfield,
Int32Constant((1 << Map::kHasNonInstancePrototype) |
(1 << Map::kIsConstructor))),
......@@ -5418,7 +5418,7 @@ Node* CodeStubAssembler::OrdinaryHasInstance(Node* context, Node* callable,
// created so far and hence we should return false.
Node* callable_prototype_instance_type =
LoadInstanceType(callable_prototype);
GotoUnless(
GotoIfNot(
Word32Equal(callable_prototype_instance_type, Int32Constant(MAP_TYPE)),
&callable_prototype_valid);
var_callable_prototype.Bind(
......@@ -5443,7 +5443,7 @@ Node* CodeStubAssembler::OrdinaryHasInstance(Node* context, Node* callable,
// Check if the current {object} needs to be access checked.
Node* object_bitfield = LoadMapBitField(object_map);
GotoUnless(
GotoIfNot(
Word32Equal(Word32And(object_bitfield,
Int32Constant(1 << Map::kIsAccessCheckNeeded)),
Int32Constant(0)),
......@@ -5563,11 +5563,11 @@ Node* CodeStubAssembler::TryToIntptr(Node* key, Label* miss) {
Label done(this, &var_intptr_key), key_is_smi(this);
GotoIf(TaggedIsSmi(key), &key_is_smi);
// Try to convert a heap number to a Smi.
GotoUnless(IsHeapNumberMap(LoadMap(key)), miss);
GotoIfNot(IsHeapNumberMap(LoadMap(key)), miss);
{
Node* value = LoadHeapNumberValue(key);
Node* int_value = RoundFloat64ToInt32(value);
GotoUnless(Float64Equal(value, ChangeInt32ToFloat64(int_value)), miss);
GotoIfNot(Float64Equal(value, ChangeInt32ToFloat64(int_value)), miss);
var_intptr_key.Bind(ChangeInt32ToIntPtr(int_value));
Goto(&done);
}
......@@ -5612,7 +5612,7 @@ Node* CodeStubAssembler::EmitKeyedSloppyArguments(Node* receiver, Node* key,
bool is_load = value == nullptr;
GotoUnless(TaggedIsSmi(key), bailout);
GotoIfNot(TaggedIsSmi(key), bailout);
key = SmiUntag(key);
GotoIf(IntPtrLessThan(key, IntPtrConstant(0)), bailout);
......@@ -5800,7 +5800,7 @@ Node* CodeStubAssembler::PrepareValueForWriteToTypedArray(
Label done(this, &var_result), if_smi(this);
GotoIf(TaggedIsSmi(input), &if_smi);
// Try to convert a heap number to a Smi.
GotoUnless(IsHeapNumberMap(LoadMap(input)), bailout);
GotoIfNot(IsHeapNumberMap(LoadMap(input)), bailout);
{
Node* value = LoadHeapNumberValue(input);
if (rep == MachineRepresentation::kWord32) {
......@@ -5878,12 +5878,12 @@ void CodeStubAssembler::EmitElementStore(Node* object, Node* key, Node* value,
if (store_mode == STORE_NO_TRANSITION_IGNORE_OUT_OF_BOUNDS) {
// Skip the store if we write beyond the length.
GotoUnless(IntPtrLessThan(key, length), &done);
GotoIfNot(IntPtrLessThan(key, length), &done);
// ... but bailout if the key is negative.
} else {
DCHECK_EQ(STANDARD_STORE, store_mode);
}
GotoUnless(UintPtrLessThan(key, length), bailout);
GotoIfNot(UintPtrLessThan(key, length), bailout);
// Backing store = external_pointer + base_pointer.
Node* external_pointer =
......@@ -5910,7 +5910,7 @@ void CodeStubAssembler::EmitElementStore(Node* object, Node* key, Node* value,
// a smi before manipulating the backing store. Otherwise the backing store
// may be left in an invalid state.
if (IsFastSmiElementsKind(elements_kind)) {
GotoUnless(TaggedIsSmi(value), bailout);
GotoIfNot(TaggedIsSmi(value), bailout);
} else if (IsFastDoubleElementsKind(elements_kind)) {
value = TryTaggedToFloat64(value, bailout);
}
......@@ -5919,7 +5919,7 @@ void CodeStubAssembler::EmitElementStore(Node* object, Node* key, Node* value,
elements = CheckForCapacityGrow(object, elements, elements_kind, length,
key, parameter_mode, is_jsarray, bailout);
} else {
GotoUnless(UintPtrLessThan(key, length), bailout);
GotoIfNot(UintPtrLessThan(key, length), bailout);
if ((store_mode == STORE_NO_TRANSITION_HANDLE_COW) &&
IsFastSmiOrObjectElementsKind(elements_kind)) {
......@@ -5974,7 +5974,7 @@ Node* CodeStubAssembler::CheckForCapacityGrow(Node* object, Node* elements,
Bind(&no_grow_case);
{
GotoUnless(UintPtrLessThan(key, length), bailout);
GotoIfNot(UintPtrLessThan(key, length), bailout);
checked_elements.Bind(elements);
Goto(&done);
}
......@@ -5990,7 +5990,7 @@ Node* CodeStubAssembler::CopyElementsOnWrite(Node* object, Node* elements,
Variable new_elements_var(this, MachineRepresentation::kTagged, elements);
Label done(this);
GotoUnless(
GotoIfNot(
WordEqual(LoadMap(elements), LoadRoot(Heap::kFixedCOWArrayMapRootIndex)),
&done);
{
......@@ -7685,7 +7685,7 @@ Node* CodeStubAssembler::ClassOf(Node* value) {
// Load the {value}s constructor, and check that it's a JSFunction.
Node* constructor = LoadMapConstructor(value_map);
GotoUnless(IsJSFunction(constructor), &if_object);
GotoIfNot(IsJSFunction(constructor), &if_object);
// Return the instance class name for the {constructor}.
Node* shared_info =
......@@ -7736,8 +7736,8 @@ Node* CodeStubAssembler::Typeof(Node* value, Node* context) {
Int32Constant(1 << Map::kIsCallable)),
&return_function);
GotoUnless(Word32Equal(callable_or_undetectable_mask, Int32Constant(0)),
&return_undefined);
GotoIfNot(Word32Equal(callable_or_undetectable_mask, Int32Constant(0)),
&return_undefined);
GotoIf(IsJSReceiverInstanceType(instance_type), &return_object);
......@@ -7798,7 +7798,7 @@ Node* CodeStubAssembler::GetSuperConstructor(Node* active_function,
Node* map = LoadMap(active_function);
Node* prototype = LoadMapPrototype(map);
Node* prototype_map = LoadMap(prototype);
GotoUnless(IsConstructorMap(prototype_map), &is_not_constructor);
GotoIfNot(IsConstructorMap(prototype_map), &is_not_constructor);
result.Bind(prototype);
Goto(&out);
......@@ -7824,7 +7824,7 @@ Node* CodeStubAssembler::InstanceOf(Node* object, Node* callable,
// Ensure that the {callable} is actually a JSReceiver.
GotoIf(TaggedIsSmi(callable), &if_notreceiver);
GotoUnless(IsJSReceiver(callable), &if_notreceiver);
GotoIfNot(IsJSReceiver(callable), &if_notreceiver);
// Load the @@hasInstance property from {callable}.
Node* inst_of_handler = CallStub(CodeFactory::GetProperty(isolate()), context,
......@@ -7836,8 +7836,8 @@ Node* CodeStubAssembler::InstanceOf(Node* object, Node* callable,
Node* native_context = LoadNativeContext(context);
Node* function_has_instance =
LoadContextElement(native_context, Context::FUNCTION_HAS_INSTANCE_INDEX);
GotoUnless(WordEqual(inst_of_handler, function_has_instance),
&if_otherhandler);
GotoIfNot(WordEqual(inst_of_handler, function_has_instance),
&if_otherhandler);
{
// Call to Function.prototype[@@hasInstance] directly.
Callable builtin(isolate()->builtins()->FunctionPrototypeHasInstance(),
......@@ -7865,7 +7865,7 @@ Node* CodeStubAssembler::InstanceOf(Node* object, Node* callable,
Bind(&if_nohandler);
{
// Ensure that the {callable} is actually Callable.
GotoUnless(IsCallable(callable), &if_notcallable);
GotoIfNot(IsCallable(callable), &if_notcallable);
// Use the OrdinaryHasInstance algorithm.
Node* result = CallStub(CodeFactory::OrdinaryHasInstance(isolate()),
......@@ -8078,7 +8078,7 @@ Node* CodeStubAssembler::CreateArrayIterator(Node* array, Node* array_map,
// here, and take the slow path if any fail.
Node* protector_cell = LoadRoot(Heap::kArrayProtectorRootIndex);
DCHECK(isolate()->heap()->array_protector()->IsPropertyCell());
GotoUnless(
GotoIfNot(
WordEqual(
LoadObjectField(protector_cell, PropertyCell::kValueOffset),
SmiConstant(Smi::FromInt(Isolate::kProtectorValid))),
......@@ -8089,13 +8089,13 @@ Node* CodeStubAssembler::CreateArrayIterator(Node* array, Node* array_map,
Node* prototype = LoadMapPrototype(array_map);
Node* array_prototype = LoadContextElement(
native_context, Context::INITIAL_ARRAY_PROTOTYPE_INDEX);
GotoUnless(WordEqual(prototype, array_prototype), &if_isslow);
GotoIfNot(WordEqual(prototype, array_prototype), &if_isslow);
Node* map = LoadMap(prototype);
prototype = LoadMapPrototype(map);
Node* object_prototype = LoadContextElement(
native_context, Context::INITIAL_OBJECT_PROTOTYPE_INDEX);
GotoUnless(WordEqual(prototype, object_prototype), &if_isslow);
GotoIfNot(WordEqual(prototype, object_prototype), &if_isslow);
map = LoadMap(prototype);
prototype = LoadMapPrototype(map);
......
......@@ -581,8 +581,8 @@ compiler::Node* AddWithFeedbackStub::Generate(CodeStubAssembler* assembler,
Node* rhs_map = assembler->LoadMap(rhs);
// Check if the {rhs} is a HeapNumber.
assembler->GotoUnless(assembler->IsHeapNumberMap(rhs_map),
&check_rhsisoddball);
assembler->GotoIfNot(assembler->IsHeapNumberMap(rhs_map),
&check_rhsisoddball);
var_fadd_lhs.Bind(assembler->SmiToFloat64(lhs));
var_fadd_rhs.Bind(assembler->LoadHeapNumberValue(rhs));
......@@ -596,8 +596,8 @@ compiler::Node* AddWithFeedbackStub::Generate(CodeStubAssembler* assembler,
Node* lhs_map = assembler->LoadMap(lhs);
// Check if {lhs} is a HeapNumber.
assembler->GotoUnless(assembler->IsHeapNumberMap(lhs_map),
&if_lhsisnotnumber);
assembler->GotoIfNot(assembler->IsHeapNumberMap(lhs_map),
&if_lhsisnotnumber);
// Check if the {rhs} is Smi.
Label if_rhsissmi(assembler), if_rhsisnotsmi(assembler);
......@@ -617,8 +617,8 @@ compiler::Node* AddWithFeedbackStub::Generate(CodeStubAssembler* assembler,
Node* rhs_map = assembler->LoadMap(rhs);
// Check if the {rhs} is a HeapNumber.
assembler->GotoUnless(assembler->IsHeapNumberMap(rhs_map),
&check_rhsisoddball);
assembler->GotoIfNot(assembler->IsHeapNumberMap(rhs_map),
&check_rhsisoddball);
var_fadd_lhs.Bind(assembler->LoadHeapNumberValue(lhs));
var_fadd_rhs.Bind(assembler->LoadHeapNumberValue(rhs));
......@@ -662,8 +662,8 @@ compiler::Node* AddWithFeedbackStub::Generate(CodeStubAssembler* assembler,
assembler->Bind(&if_lhsisnotoddball);
{
// Exit unless {lhs} is a string
assembler->GotoUnless(assembler->IsStringInstanceType(lhs_instance_type),
&call_with_any_feedback);
assembler->GotoIfNot(assembler->IsStringInstanceType(lhs_instance_type),
&call_with_any_feedback);
// Check if the {rhs} is a smi, and exit the string check early if it is.
assembler->GotoIf(assembler->TaggedIsSmi(rhs), &call_with_any_feedback);
......@@ -672,8 +672,8 @@ compiler::Node* AddWithFeedbackStub::Generate(CodeStubAssembler* assembler,
// Exit unless {rhs} is a string. Since {lhs} is a string we no longer
// need an Oddball check.
assembler->GotoUnless(assembler->IsStringInstanceType(rhs_instance_type),
&call_with_any_feedback);
assembler->GotoIfNot(assembler->IsStringInstanceType(rhs_instance_type),
&call_with_any_feedback);
var_type_feedback.Bind(
assembler->SmiConstant(BinaryOperationFeedback::kString));
......@@ -788,8 +788,8 @@ compiler::Node* SubtractWithFeedbackStub::Generate(
Node* rhs_map = assembler->LoadMap(rhs);
// Check if {rhs} is a HeapNumber.
assembler->GotoUnless(assembler->IsHeapNumberMap(rhs_map),
&check_rhsisoddball);
assembler->GotoIfNot(assembler->IsHeapNumberMap(rhs_map),
&check_rhsisoddball);
// Perform a floating point subtraction.
var_fsub_lhs.Bind(assembler->SmiToFloat64(lhs));
......@@ -804,8 +804,8 @@ compiler::Node* SubtractWithFeedbackStub::Generate(
Node* lhs_map = assembler->LoadMap(lhs);
// Check if the {lhs} is a HeapNumber.
assembler->GotoUnless(assembler->IsHeapNumberMap(lhs_map),
&if_lhsisnotnumber);
assembler->GotoIfNot(assembler->IsHeapNumberMap(lhs_map),
&if_lhsisnotnumber);
// Check if the {rhs} is a Smi.
Label if_rhsissmi(assembler), if_rhsisnotsmi(assembler);
......@@ -826,8 +826,8 @@ compiler::Node* SubtractWithFeedbackStub::Generate(
Node* rhs_map = assembler->LoadMap(rhs);
// Check if the {rhs} is a HeapNumber.
assembler->GotoUnless(assembler->IsHeapNumberMap(rhs_map),
&check_rhsisoddball);
assembler->GotoIfNot(assembler->IsHeapNumberMap(rhs_map),
&check_rhsisoddball);
// Perform a floating point subtraction.
var_fsub_lhs.Bind(assembler->LoadHeapNumberValue(lhs));
......@@ -854,7 +854,7 @@ compiler::Node* SubtractWithFeedbackStub::Generate(
Node* lhs_instance_type = assembler->LoadInstanceType(lhs);
Node* lhs_is_oddball = assembler->Word32Equal(
lhs_instance_type, assembler->Int32Constant(ODDBALL_TYPE));
assembler->GotoUnless(lhs_is_oddball, &call_with_any_feedback);
assembler->GotoIfNot(lhs_is_oddball, &call_with_any_feedback);
Label if_rhsissmi(assembler), if_rhsisnotsmi(assembler);
assembler->Branch(assembler->TaggedIsSmi(rhs), &if_rhsissmi,
......@@ -873,8 +873,8 @@ compiler::Node* SubtractWithFeedbackStub::Generate(
Node* rhs_map = assembler->LoadMap(rhs);
// Check if {rhs} is a HeapNumber.
assembler->GotoUnless(assembler->IsHeapNumberMap(rhs_map),
&check_rhsisoddball);
assembler->GotoIfNot(assembler->IsHeapNumberMap(rhs_map),
&check_rhsisoddball);
var_type_feedback.Bind(
assembler->SmiConstant(BinaryOperationFeedback::kNumberOrOddball));
......@@ -889,7 +889,7 @@ compiler::Node* SubtractWithFeedbackStub::Generate(
Node* rhs_instance_type = assembler->LoadInstanceType(rhs);
Node* rhs_is_oddball = assembler->Word32Equal(
rhs_instance_type, assembler->Int32Constant(ODDBALL_TYPE));
assembler->GotoUnless(rhs_is_oddball, &call_with_any_feedback);
assembler->GotoIfNot(rhs_is_oddball, &call_with_any_feedback);
var_type_feedback.Bind(
assembler->SmiConstant(BinaryOperationFeedback::kNumberOrOddball));
......@@ -962,8 +962,8 @@ compiler::Node* MultiplyWithFeedbackStub::Generate(
Node* rhs_map = assembler->LoadMap(rhs);
// Check if {rhs} is a HeapNumber.
assembler->GotoUnless(assembler->IsHeapNumberMap(rhs_map),
&check_rhsisoddball);
assembler->GotoIfNot(assembler->IsHeapNumberMap(rhs_map),
&check_rhsisoddball);
// Convert {lhs} to a double and multiply it with the value of {rhs}.
var_lhs_float64.Bind(assembler->SmiToFloat64(lhs));
......@@ -977,8 +977,8 @@ compiler::Node* MultiplyWithFeedbackStub::Generate(
Node* lhs_map = assembler->LoadMap(lhs);
// Check if {lhs} is a HeapNumber.
assembler->GotoUnless(assembler->IsHeapNumberMap(lhs_map),
&if_lhsisnotnumber);
assembler->GotoIfNot(assembler->IsHeapNumberMap(lhs_map),
&if_lhsisnotnumber);
// Check if {rhs} is a Smi.
Label rhs_is_smi(assembler), rhs_is_not_smi(assembler);
......@@ -998,8 +998,8 @@ compiler::Node* MultiplyWithFeedbackStub::Generate(
Node* rhs_map = assembler->LoadMap(rhs);
// Check if {rhs} is a HeapNumber.
assembler->GotoUnless(assembler->IsHeapNumberMap(rhs_map),
&check_rhsisoddball);
assembler->GotoIfNot(assembler->IsHeapNumberMap(rhs_map),
&check_rhsisoddball);
// Both {lhs} and {rhs} are HeapNumbers. Load their values and
// multiply them.
......@@ -1027,7 +1027,7 @@ compiler::Node* MultiplyWithFeedbackStub::Generate(
Node* lhs_instance_type = assembler->LoadInstanceType(lhs);
Node* lhs_is_oddball = assembler->Word32Equal(
lhs_instance_type, assembler->Int32Constant(ODDBALL_TYPE));
assembler->GotoUnless(lhs_is_oddball, &call_with_any_feedback);
assembler->GotoIfNot(lhs_is_oddball, &call_with_any_feedback);
assembler->GotoIf(assembler->TaggedIsSmi(rhs), &call_with_oddball_feedback);
......@@ -1180,8 +1180,8 @@ compiler::Node* DivideWithFeedbackStub::Generate(
Node* divisor_map = assembler->LoadMap(divisor);
// Check if {divisor} is a HeapNumber.
assembler->GotoUnless(assembler->IsHeapNumberMap(divisor_map),
&check_divisor_for_oddball);
assembler->GotoIfNot(assembler->IsHeapNumberMap(divisor_map),
&check_divisor_for_oddball);
// Convert {dividend} to a double and divide it with the value of
// {divisor}.
......@@ -1195,8 +1195,8 @@ compiler::Node* DivideWithFeedbackStub::Generate(
Node* dividend_map = assembler->LoadMap(dividend);
// Check if {dividend} is a HeapNumber.
assembler->GotoUnless(assembler->IsHeapNumberMap(dividend_map),
&dividend_is_not_number);
assembler->GotoIfNot(assembler->IsHeapNumberMap(dividend_map),
&dividend_is_not_number);
// Check if {divisor} is a Smi.
Label divisor_is_smi(assembler), divisor_is_not_smi(assembler);
......@@ -1217,8 +1217,8 @@ compiler::Node* DivideWithFeedbackStub::Generate(
Node* divisor_map = assembler->LoadMap(divisor);
// Check if {divisor} is a HeapNumber.
assembler->GotoUnless(assembler->IsHeapNumberMap(divisor_map),
&check_divisor_for_oddball);
assembler->GotoIfNot(assembler->IsHeapNumberMap(divisor_map),
&check_divisor_for_oddball);
// Both {dividend} and {divisor} are HeapNumbers. Load their values
// and divide them.
......@@ -1246,7 +1246,7 @@ compiler::Node* DivideWithFeedbackStub::Generate(
Node* dividend_instance_type = assembler->LoadInstanceType(dividend);
Node* dividend_is_oddball = assembler->Word32Equal(
dividend_instance_type, assembler->Int32Constant(ODDBALL_TYPE));
assembler->GotoUnless(dividend_is_oddball, &call_with_any_feedback);
assembler->GotoIfNot(dividend_is_oddball, &call_with_any_feedback);
assembler->GotoIf(assembler->TaggedIsSmi(divisor),
&call_with_oddball_feedback);
......@@ -1341,8 +1341,8 @@ compiler::Node* ModulusWithFeedbackStub::Generate(
Node* divisor_map = assembler->LoadMap(divisor);
// Check if {divisor} is a HeapNumber.
assembler->GotoUnless(assembler->IsHeapNumberMap(divisor_map),
&check_divisor_for_oddball);
assembler->GotoIfNot(assembler->IsHeapNumberMap(divisor_map),
&check_divisor_for_oddball);
// Convert {dividend} to a double and divide it with the value of
// {divisor}.
......@@ -1357,8 +1357,8 @@ compiler::Node* ModulusWithFeedbackStub::Generate(
Node* dividend_map = assembler->LoadMap(dividend);
// Check if {dividend} is a HeapNumber.
assembler->GotoUnless(assembler->IsHeapNumberMap(dividend_map),
&dividend_is_not_number);
assembler->GotoIfNot(assembler->IsHeapNumberMap(dividend_map),
&dividend_is_not_number);
// Check if {divisor} is a Smi.
Label divisor_is_smi(assembler), divisor_is_not_smi(assembler);
......@@ -1379,8 +1379,8 @@ compiler::Node* ModulusWithFeedbackStub::Generate(
Node* divisor_map = assembler->LoadMap(divisor);
// Check if {divisor} is a HeapNumber.
assembler->GotoUnless(assembler->IsHeapNumberMap(divisor_map),
&check_divisor_for_oddball);
assembler->GotoIfNot(assembler->IsHeapNumberMap(divisor_map),
&check_divisor_for_oddball);
// Both {dividend} and {divisor} are HeapNumbers. Load their values
// and divide them.
......@@ -1407,7 +1407,7 @@ compiler::Node* ModulusWithFeedbackStub::Generate(
Node* dividend_instance_type = assembler->LoadInstanceType(dividend);
Node* dividend_is_oddball = assembler->Word32Equal(
dividend_instance_type, assembler->Int32Constant(ODDBALL_TYPE));
assembler->GotoUnless(dividend_is_oddball, &call_with_any_feedback);
assembler->GotoIfNot(dividend_is_oddball, &call_with_any_feedback);
assembler->GotoIf(assembler->TaggedIsSmi(divisor),
&call_with_oddball_feedback);
......@@ -1545,7 +1545,7 @@ void StoreGlobalStub::GenerateAssembly(
if (cell_type == PropertyCellType::kConstantType) {
switch (constant_type()) {
case PropertyCellConstantType::kSmi:
assembler.GotoUnless(assembler.TaggedIsSmi(value), &miss);
assembler.GotoIfNot(assembler.TaggedIsSmi(value), &miss);
value_is_smi = true;
break;
case PropertyCellConstantType::kStableMap: {
......@@ -1777,7 +1777,7 @@ void CallICStub::GenerateAssembly(compiler::CodeAssemblerState* state) const {
Node* feedback_element = assembler.LoadFixedArrayElement(vector, slot);
Node* feedback_value = assembler.LoadWeakCellValueUnchecked(feedback_element);
Node* is_monomorphic = assembler.WordEqual(target, feedback_value);
assembler.GotoUnless(is_monomorphic, &extra_checks);
assembler.GotoIfNot(is_monomorphic, &extra_checks);
// The compare above could have been a SMI/SMI comparison. Guard against
// this convincing us that we have a monomorphic JSFunction.
......@@ -1806,7 +1806,7 @@ void CallICStub::GenerateAssembly(compiler::CodeAssemblerState* state) const {
assembler.GotoIf(is_megamorphic, &call);
assembler.Comment("check if it is an allocation site");
assembler.GotoUnless(
assembler.GotoIfNot(
assembler.IsAllocationSiteMap(assembler.LoadMap(feedback_element)),
&check_initialized);
......@@ -1814,7 +1814,7 @@ void CallICStub::GenerateAssembly(compiler::CodeAssemblerState* state) const {
Node* context_slot = assembler.LoadContextElement(
assembler.LoadNativeContext(context), Context::ARRAY_FUNCTION_INDEX);
Node* is_array_function = assembler.WordEqual(context_slot, target);
assembler.GotoUnless(is_array_function, &mark_megamorphic);
assembler.GotoIfNot(is_array_function, &mark_megamorphic);
// Call ArrayConstructorStub.
Callable callable = CodeFactory::ArrayConstructor(isolate());
......@@ -1829,7 +1829,7 @@ void CallICStub::GenerateAssembly(compiler::CodeAssemblerState* state) const {
feedback_element,
assembler.HeapConstant(
FeedbackVector::UninitializedSentinel(isolate())));
assembler.GotoUnless(is_uninitialized, &mark_megamorphic);
assembler.GotoIfNot(is_uninitialized, &mark_megamorphic);
assembler.Comment("handle unitinitialized");
// If it is not a JSFunction mark it as megamorphic.
......@@ -1838,7 +1838,7 @@ void CallICStub::GenerateAssembly(compiler::CodeAssemblerState* state) const {
// Check if function is an object of JSFunction type.
Node* is_js_function = assembler.IsJSFunction(target);
assembler.GotoUnless(is_js_function, &mark_megamorphic);
assembler.GotoIfNot(is_js_function, &mark_megamorphic);
// Check if it is the Array() function.
Node* context_slot = assembler.LoadContextElement(
......
......@@ -651,7 +651,7 @@ void CodeAssembler::GotoIf(Node* condition, Label* true_label) {
Bind(&false_label);
}
void CodeAssembler::GotoUnless(Node* condition, Label* false_label) {
void CodeAssembler::GotoIfNot(Node* condition, Label* false_label) {
Label true_label(this);
Branch(condition, &true_label, false_label);
Bind(&true_label);
......
......@@ -239,7 +239,7 @@ class V8_EXPORT_PRIVATE CodeAssembler {
void Bind(Label* label);
void Goto(Label* label);
void GotoIf(Node* condition, Label* true_label);
void GotoUnless(Node* condition, Label* false_label);
void GotoIfNot(Node* condition, Label* false_label);
void Branch(Node* condition, Label* true_label, Label* false_label);
void Switch(Node* index, Label* default_label, const int32_t* case_values,
......
......@@ -213,7 +213,7 @@ void FastAccessorAssembler::CheckIsJSObjectOrJump(ValueId value_id,
&is_jsobject);
// JSApiObject?.
assembler_->GotoUnless(
assembler_->GotoIfNot(
assembler_->Word32Equal(instance_type, assembler_->Int32Constant(
Internals::kJSApiObjectType)),
FromId(label_id));
......
......@@ -187,7 +187,7 @@ void AccessorAssembler::HandleLoadICSmiHandlerCase(
Node* handler_kind = DecodeWord<LoadHandler::KindBits>(handler_word);
if (support_elements == kSupportElements) {
Label property(this);
GotoUnless(
GotoIfNot(
WordEqual(handler_kind, IntPtrConstant(LoadHandler::kForElements)),
&property);
......@@ -216,10 +216,10 @@ void AccessorAssembler::HandleLoadICSmiHandlerCase(
Bind(&if_hole);
{
Comment("convert hole");
GotoUnless(IsSetWord<LoadHandler::ConvertHoleBits>(handler_word), miss);
GotoIfNot(IsSetWord<LoadHandler::ConvertHoleBits>(handler_word), miss);
Node* protector_cell = LoadRoot(Heap::kArrayProtectorRootIndex);
DCHECK(isolate()->heap()->array_protector()->IsPropertyCell());
GotoUnless(
GotoIfNot(
WordEqual(LoadObjectField(protector_cell, PropertyCell::kValueOffset),
SmiConstant(Smi::FromInt(Isolate::kProtectorValid))),
miss);
......@@ -332,7 +332,7 @@ void AccessorAssembler::HandleLoadICProtoHandlerCase(
Node* handler_flags = SmiUntag(smi_handler);
Label check_prototypes(this);
GotoUnless(
GotoIfNot(
IsSetWord<LoadHandler::DoNegativeLookupOnReceiverBits>(handler_flags),
&check_prototypes);
{
......@@ -389,8 +389,8 @@ Node* AccessorAssembler::EmitLoadICProtoArrayCheck(
start_index.Bind(IntPtrConstant(LoadHandler::kFirstPrototypeIndex));
Label can_access(this);
GotoUnless(IsSetWord<LoadHandler::DoAccessCheckOnReceiverBits>(handler_flags),
&can_access);
GotoIfNot(IsSetWord<LoadHandler::DoAccessCheckOnReceiverBits>(handler_flags),
&can_access);
{
// Skip this entry of a handler.
start_index.Bind(IntPtrConstant(LoadHandler::kFirstPrototypeIndex + 1));
......@@ -404,7 +404,7 @@ Node* AccessorAssembler::EmitLoadICProtoArrayCheck(
Node* native_context = LoadNativeContext(p->context);
GotoIf(WordEqual(expected_native_context, native_context), &can_access);
// If the receiver is not a JSGlobalProxy then we miss.
GotoUnless(IsJSGlobalProxy(p->receiver), miss);
GotoIfNot(IsJSGlobalProxy(p->receiver), miss);
// For JSGlobalProxy receiver try to compare security tokens of current
// and expected native contexts.
Node* expected_token = LoadContextElement(expected_native_context,
......@@ -722,8 +722,8 @@ void AccessorAssembler::HandleStoreFieldAndReturn(Node* handler_word,
{
if (transition_to_field) {
Label storage_extended(this);
GotoUnless(IsSetWord<StoreHandler::ExtendStorageBits>(handler_word),
&storage_extended);
GotoIfNot(IsSetWord<StoreHandler::ExtendStorageBits>(handler_word),
&storage_extended);
Comment("[ Extend storage");
ExtendPropertiesBackingStore(holder);
Comment("] Extend storage");
......@@ -775,7 +775,7 @@ Node* AccessorAssembler::PrepareValueForStore(Node* handler_word, Node* holder,
Bind(&done);
} else if (representation.IsSmi()) {
GotoUnless(TaggedIsSmi(value), bailout);
GotoIfNot(TaggedIsSmi(value), bailout);
} else {
DCHECK(representation.IsTagged());
......@@ -850,17 +850,17 @@ void AccessorAssembler::StoreNamedField(Node* handler_word, Node* object,
// Do constant value check if necessary.
if (FLAG_track_constant_fields && !transition_to_field) {
Label done(this);
GotoUnless(WordEqual(DecodeWord<StoreHandler::KindBits>(handler_word),
IntPtrConstant(StoreHandler::kStoreConstField)),
&done);
GotoIfNot(WordEqual(DecodeWord<StoreHandler::KindBits>(handler_word),
IntPtrConstant(StoreHandler::kStoreConstField)),
&done);
{
if (store_value_as_double) {
Node* current_value =
LoadObjectField(property_storage, offset, MachineType::Float64());
GotoUnless(Float64Equal(current_value, value), bailout);
GotoIfNot(Float64Equal(current_value, value), bailout);
} else {
Node* current_value = LoadObjectField(property_storage, offset);
GotoUnless(WordEqual(current_value, value), bailout);
GotoIfNot(WordEqual(current_value, value), bailout);
}
Goto(&done);
}
......@@ -897,7 +897,7 @@ void AccessorAssembler::EmitFastElementsBoundsCheck(Node* object,
Goto(&length_loaded);
}
Bind(&length_loaded);
GotoUnless(UintPtrLessThan(intptr_index, var_length.value()), miss);
GotoIfNot(UintPtrLessThan(intptr_index, var_length.value()), miss);
}
void AccessorAssembler::EmitElementLoad(
......@@ -992,7 +992,7 @@ void AccessorAssembler::EmitElementLoad(
LoadDetailsByKeyIndex<SeededNumberDictionary>(elements, index);
Node* kind = DecodeWord32<PropertyDetails::KindField>(details);
// TODO(jkummerow): Support accessors without missing?
GotoUnless(Word32Equal(kind, Int32Constant(kData)), miss);
GotoIfNot(Word32Equal(kind, Int32Constant(kData)), miss);
// Finally, load the value.
exit_point->Return(
LoadValueByKeyIndex<SeededNumberDictionary>(elements, index));
......@@ -1008,7 +1008,7 @@ void AccessorAssembler::EmitElementLoad(
// Bounds check.
Node* length =
SmiUntag(LoadObjectField(object, JSTypedArray::kLengthOffset));
GotoUnless(UintPtrLessThan(intptr_index, length), out_of_bounds);
GotoIfNot(UintPtrLessThan(intptr_index, length), out_of_bounds);
// Backing store = external_pointer + base_pointer.
Node* external_pointer =
......@@ -1466,8 +1466,8 @@ void AccessorAssembler::LoadIC(const LoadICParameters* p) {
{
// Check polymorphic case.
Comment("LoadIC_try_polymorphic");
GotoUnless(WordEqual(LoadMap(feedback), FixedArrayMapConstant()),
&try_megamorphic);
GotoIfNot(WordEqual(LoadMap(feedback), FixedArrayMapConstant()),
&try_megamorphic);
HandlePolymorphicCase(receiver_map, feedback, &if_handler, &var_handler,
&miss, 2);
}
......@@ -1475,9 +1475,8 @@ void AccessorAssembler::LoadIC(const LoadICParameters* p) {
Bind(&try_megamorphic);
{
// Check megamorphic case.
GotoUnless(
WordEqual(feedback, LoadRoot(Heap::kmegamorphic_symbolRootIndex)),
&miss);
GotoIfNot(WordEqual(feedback, LoadRoot(Heap::kmegamorphic_symbolRootIndex)),
&miss);
TryProbeStubCache(isolate()->load_stub_cache(), p->receiver, p->name,
&if_handler, &var_handler, &miss);
......@@ -1609,8 +1608,8 @@ void AccessorAssembler::KeyedLoadIC(const LoadICParameters* p) {
{
// Check polymorphic case.
Comment("KeyedLoadIC_try_polymorphic");
GotoUnless(WordEqual(LoadMap(feedback), FixedArrayMapConstant()),
&try_megamorphic);
GotoIfNot(WordEqual(LoadMap(feedback), FixedArrayMapConstant()),
&try_megamorphic);
HandlePolymorphicCase(receiver_map, feedback, &if_handler, &var_handler,
&miss, 2);
}
......@@ -1619,9 +1618,8 @@ void AccessorAssembler::KeyedLoadIC(const LoadICParameters* p) {
{
// Check megamorphic case.
Comment("KeyedLoadIC_try_megamorphic");
GotoUnless(
WordEqual(feedback, LoadRoot(Heap::kmegamorphic_symbolRootIndex)),
&try_polymorphic_name);
GotoIfNot(WordEqual(feedback, LoadRoot(Heap::kmegamorphic_symbolRootIndex)),
&try_polymorphic_name);
// TODO(jkummerow): Inline this? Or some of it?
TailCallStub(CodeFactory::KeyedLoadIC_Megamorphic(isolate()), p->context,
p->receiver, p->name, p->slot, p->vector);
......@@ -1630,7 +1628,7 @@ void AccessorAssembler::KeyedLoadIC(const LoadICParameters* p) {
{
// We might have a name in feedback, and a fixed array in the next slot.
Comment("KeyedLoadIC_try_polymorphic_name");
GotoUnless(WordEqual(feedback, p->name), &miss);
GotoIfNot(WordEqual(feedback, p->name), &miss);
// If the name comparison succeeded, we know we have a fixed array with
// at least one map/handler pair.
Node* offset = ElementOffsetFromIndex(
......@@ -1708,7 +1706,7 @@ void AccessorAssembler::StoreIC(const StoreICParameters* p) {
{
// Check polymorphic case.
Comment("StoreIC_try_polymorphic");
GotoUnless(
GotoIfNot(
WordEqual(LoadMap(feedback), LoadRoot(Heap::kFixedArrayMapRootIndex)),
&try_megamorphic);
HandlePolymorphicCase(receiver_map, feedback, &if_handler, &var_handler,
......@@ -1718,9 +1716,8 @@ void AccessorAssembler::StoreIC(const StoreICParameters* p) {
Bind(&try_megamorphic);
{
// Check megamorphic case.
GotoUnless(
WordEqual(feedback, LoadRoot(Heap::kmegamorphic_symbolRootIndex)),
&miss);
GotoIfNot(WordEqual(feedback, LoadRoot(Heap::kmegamorphic_symbolRootIndex)),
&miss);
TryProbeStubCache(isolate()->store_stub_cache(), p->receiver, p->name,
&if_handler, &var_handler, &miss);
......@@ -1761,7 +1758,7 @@ void AccessorAssembler::KeyedStoreIC(const StoreICParameters* p,
{
// CheckPolymorphic case.
Comment("KeyedStoreIC_try_polymorphic");
GotoUnless(
GotoIfNot(
WordEqual(LoadMap(feedback), LoadRoot(Heap::kFixedArrayMapRootIndex)),
&try_megamorphic);
Label if_transition_handler(this);
......@@ -1777,7 +1774,7 @@ void AccessorAssembler::KeyedStoreIC(const StoreICParameters* p,
Label call_handler(this);
Variable var_code_handler(this, MachineRepresentation::kTagged);
var_code_handler.Bind(handler);
GotoUnless(IsTuple2Map(LoadMap(handler)), &call_handler);
GotoIfNot(IsTuple2Map(LoadMap(handler)), &call_handler);
{
CSA_ASSERT(this, IsTuple2Map(LoadMap(handler)));
......@@ -1811,7 +1808,7 @@ void AccessorAssembler::KeyedStoreIC(const StoreICParameters* p,
{
// Check megamorphic case.
Comment("KeyedStoreIC_try_megamorphic");
GotoUnless(
GotoIfNot(
WordEqual(feedback, LoadRoot(Heap::kmegamorphic_symbolRootIndex)),
&try_polymorphic_name);
TailCallStub(
......@@ -1823,7 +1820,7 @@ void AccessorAssembler::KeyedStoreIC(const StoreICParameters* p,
{
// We might have a name in feedback, and a fixed array in the next slot.
Comment("KeyedStoreIC_try_polymorphic_name");
GotoUnless(WordEqual(feedback, p->name), &miss);
GotoIfNot(WordEqual(feedback, p->name), &miss);
// If the name comparison succeeded, we know we have a FixedArray with
// at least one map/handler pair.
Node* offset = ElementOffsetFromIndex(
......
......@@ -273,7 +273,7 @@ void KeyedStoreGenericAssembler::StoreElementWithCapacity(
// can always be stored.
{
Label non_smi_value(this);
GotoUnless(TaggedIsSmi(value), &non_smi_value);
GotoIfNot(TaggedIsSmi(value), &non_smi_value);
// If we're about to introduce holes, ensure holey elements.
if (update_length == kBumpLengthWithGap) {
TryChangeToHoleyMapMulti(receiver, receiver_map, elements_kind, context,
......@@ -848,7 +848,7 @@ void KeyedStoreGenericAssembler::EmitGenericPropertyStore(
Node* setter_map = LoadMap(setter);
// FunctionTemplateInfo setters are not supported yet.
GotoIf(IsFunctionTemplateInfoMap(setter_map), slow);
GotoUnless(IsCallableMap(setter_map), &not_callable);
GotoIfNot(IsCallableMap(setter_map), &not_callable);
Callable callable = CodeFactory::Call(isolate());
CallJS(callable, p->context, setter, receiver, p->value);
......
......@@ -581,7 +581,7 @@ Node* InterpreterAssembler::CallJSWithFeedback(Node* function, Node* context,
Node* feedback_element = LoadFixedArrayElement(feedback_vector, slot_id);
Node* feedback_value = LoadWeakCellValueUnchecked(feedback_element);
Node* is_monomorphic = WordEqual(function, feedback_value);
GotoUnless(is_monomorphic, &extra_checks);
GotoIfNot(is_monomorphic, &extra_checks);
// The compare above could have been a SMI/SMI comparison. Guard against
// this convincing us that we have a monomorphic JSFunction.
......@@ -616,14 +616,14 @@ Node* InterpreterAssembler::CallJSWithFeedback(Node* function, Node* context,
GotoIf(is_megamorphic, &call);
Comment("check if it is an allocation site");
GotoUnless(IsAllocationSiteMap(LoadMap(feedback_element)),
&check_initialized);
GotoIfNot(IsAllocationSiteMap(LoadMap(feedback_element)),
&check_initialized);
// If it is not the Array() function, mark megamorphic.
Node* context_slot = LoadContextElement(LoadNativeContext(context),
Context::ARRAY_FUNCTION_INDEX);
Node* is_array_function = WordEqual(context_slot, function);
GotoUnless(is_array_function, &mark_megamorphic);
GotoIfNot(is_array_function, &mark_megamorphic);
// It is a monomorphic Array function. Increment the call count.
IncrementCallCount(feedback_vector, slot_id);
......@@ -645,7 +645,7 @@ Node* InterpreterAssembler::CallJSWithFeedback(Node* function, Node* context,
Node* is_uninitialized = WordEqual(
feedback_element,
HeapConstant(FeedbackVector::UninitializedSentinel(isolate())));
GotoUnless(is_uninitialized, &mark_megamorphic);
GotoIfNot(is_uninitialized, &mark_megamorphic);
Comment("handle_unitinitialized");
// If it is not a JSFunction mark it as megamorphic.
......@@ -656,7 +656,7 @@ Node* InterpreterAssembler::CallJSWithFeedback(Node* function, Node* context,
Node* instance_type = LoadInstanceType(function);
Node* is_js_function =
Word32Equal(instance_type, Int32Constant(JS_FUNCTION_TYPE));
GotoUnless(is_js_function, &mark_megamorphic);
GotoIfNot(is_js_function, &mark_megamorphic);
// Check if it is the Array() function.
Node* context_slot = LoadContextElement(LoadNativeContext(context),
......@@ -669,7 +669,7 @@ Node* InterpreterAssembler::CallJSWithFeedback(Node* function, Node* context,
LoadObjectField(function, JSFunction::kContextOffset));
Node* is_same_native_context =
WordEqual(native_context, LoadNativeContext(context));
GotoUnless(is_same_native_context, &mark_megamorphic);
GotoIfNot(is_same_native_context, &mark_megamorphic);
CreateWeakCellInFeedbackVector(feedback_vector, SmiTag(slot_id),
function);
......@@ -770,7 +770,7 @@ Node* InterpreterAssembler::Construct(Node* constructor, Node* context,
Node* instance_type = LoadInstanceType(constructor);
Node* is_js_function =
Word32Equal(instance_type, Int32Constant(JS_FUNCTION_TYPE));
GotoUnless(is_js_function, &call_construct);
GotoIfNot(is_js_function, &call_construct);
// Check if it is a monomorphic constructor.
Node* feedback_element = LoadFixedArrayElement(feedback_vector, slot_id);
......@@ -807,7 +807,7 @@ Node* InterpreterAssembler::Construct(Node* constructor, Node* context,
Comment("check if weak cell");
Node* is_weak_cell = WordEqual(LoadMap(feedback_element),
LoadRoot(Heap::kWeakCellMapRootIndex));
GotoUnless(is_weak_cell, &check_allocation_site);
GotoIfNot(is_weak_cell, &check_allocation_site);
// If the weak cell is cleared, we have a new chance to become
// monomorphic.
......@@ -821,13 +821,13 @@ Node* InterpreterAssembler::Construct(Node* constructor, Node* context,
Node* is_allocation_site =
WordEqual(LoadObjectField(feedback_element, 0),
LoadRoot(Heap::kAllocationSiteMapRootIndex));
GotoUnless(is_allocation_site, &check_initialized);
GotoIfNot(is_allocation_site, &check_initialized);
// Make sure the function is the Array() function.
Node* context_slot = LoadContextElement(LoadNativeContext(context),
Context::ARRAY_FUNCTION_INDEX);
Node* is_array_function = WordEqual(context_slot, constructor);
GotoUnless(is_array_function, &mark_megamorphic);
GotoIfNot(is_array_function, &mark_megamorphic);
allocation_feedback.Bind(feedback_element);
Goto(&call_construct_function);
......@@ -1372,7 +1372,7 @@ Node* InterpreterAssembler::ExportRegisterFile(Node* array) {
Bind(&loop);
{
Node* index = var_index.value();
GotoUnless(UintPtrLessThan(index, register_count), &done_loop);
GotoIfNot(UintPtrLessThan(index, register_count), &done_loop);
Node* reg_index = IntPtrSub(IntPtrConstant(Register(0).ToOperand()), index);
Node* value = LoadRegister(reg_index);
......@@ -1405,7 +1405,7 @@ Node* InterpreterAssembler::ImportRegisterFile(Node* array) {
Bind(&loop);
{
Node* index = var_index.value();
GotoUnless(UintPtrLessThan(index, register_count), &done_loop);
GotoIfNot(UintPtrLessThan(index, register_count), &done_loop);
Node* value = LoadFixedArrayElement(array, index);
......
......@@ -281,7 +281,7 @@ Node* IntrinsicsHelper::Call(Node* args_reg, Node* arg_count, Node* context) {
if (FLAG_debug_code) {
InterpreterAssembler::Label arg_count_positive(assembler_);
Node* comparison = __ Int32LessThan(target_args_count, __ Int32Constant(0));
__ GotoUnless(comparison, &arg_count_positive);
__ GotoIfNot(comparison, &arg_count_positive);
__ Abort(kWrongArgumentCountForInvokeIntrinsic);
__ Goto(&arg_count_positive);
__ Bind(&arg_count_positive);
......
......@@ -1145,7 +1145,7 @@ void Interpreter::DoCompareOpWithFeedback(Token::Value compare_op,
lhs_is_not_string(assembler), gather_rhs_type(assembler),
update_feedback(assembler);
__ GotoUnless(__ TaggedIsSmi(lhs), &lhs_is_not_smi);
__ GotoIfNot(__ TaggedIsSmi(lhs), &lhs_is_not_smi);
var_type_feedback.Bind(
__ SmiConstant(CompareOperationFeedback::kSignedSmall));
......@@ -1154,7 +1154,7 @@ void Interpreter::DoCompareOpWithFeedback(Token::Value compare_op,
__ Bind(&lhs_is_not_smi);
{
Node* lhs_map = __ LoadMap(lhs);
__ GotoUnless(__ IsHeapNumberMap(lhs_map), &lhs_is_not_number);
__ GotoIfNot(__ IsHeapNumberMap(lhs_map), &lhs_is_not_number);
var_type_feedback.Bind(__ SmiConstant(CompareOperationFeedback::kNumber));
__ Goto(&gather_rhs_type);
......@@ -1164,7 +1164,7 @@ void Interpreter::DoCompareOpWithFeedback(Token::Value compare_op,
Node* lhs_instance_type = __ LoadInstanceType(lhs);
if (Token::IsOrderedRelationalCompareOp(compare_op)) {
Label lhs_is_not_oddball(assembler);
__ GotoUnless(
__ GotoIfNot(
__ Word32Equal(lhs_instance_type, __ Int32Constant(ODDBALL_TYPE)),
&lhs_is_not_oddball);
......@@ -1176,8 +1176,8 @@ void Interpreter::DoCompareOpWithFeedback(Token::Value compare_op,
}
Label lhs_is_not_string(assembler);
__ GotoUnless(__ IsStringInstanceType(lhs_instance_type),
&lhs_is_not_string);
__ GotoIfNot(__ IsStringInstanceType(lhs_instance_type),
&lhs_is_not_string);
if (Token::IsOrderedRelationalCompareOp(compare_op)) {
var_type_feedback.Bind(
......@@ -1211,7 +1211,7 @@ void Interpreter::DoCompareOpWithFeedback(Token::Value compare_op,
{
Label rhs_is_not_smi(assembler), rhs_is_not_number(assembler);
__ GotoUnless(__ TaggedIsSmi(rhs), &rhs_is_not_smi);
__ GotoIfNot(__ TaggedIsSmi(rhs), &rhs_is_not_smi);
var_type_feedback.Bind(
__ SmiOr(var_type_feedback.value(),
......@@ -1221,7 +1221,7 @@ void Interpreter::DoCompareOpWithFeedback(Token::Value compare_op,
__ Bind(&rhs_is_not_smi);
{
Node* rhs_map = __ LoadMap(rhs);
__ GotoUnless(__ IsHeapNumberMap(rhs_map), &rhs_is_not_number);
__ GotoIfNot(__ IsHeapNumberMap(rhs_map), &rhs_is_not_number);
var_type_feedback.Bind(
__ SmiOr(var_type_feedback.value(),
......@@ -1233,9 +1233,9 @@ void Interpreter::DoCompareOpWithFeedback(Token::Value compare_op,
Node* rhs_instance_type = __ LoadInstanceType(rhs);
if (Token::IsOrderedRelationalCompareOp(compare_op)) {
Label rhs_is_not_oddball(assembler);
__ GotoUnless(__ Word32Equal(rhs_instance_type,
__ Int32Constant(ODDBALL_TYPE)),
&rhs_is_not_oddball);
__ GotoIfNot(__ Word32Equal(rhs_instance_type,
__ Int32Constant(ODDBALL_TYPE)),
&rhs_is_not_oddball);
var_type_feedback.Bind(__ SmiOr(
var_type_feedback.value(),
......@@ -1246,8 +1246,8 @@ void Interpreter::DoCompareOpWithFeedback(Token::Value compare_op,
}
Label rhs_is_not_string(assembler);
__ GotoUnless(__ IsStringInstanceType(rhs_instance_type),
&rhs_is_not_string);
__ GotoIfNot(__ IsStringInstanceType(rhs_instance_type),
&rhs_is_not_string);
if (Token::IsOrderedRelationalCompareOp(compare_op)) {
var_type_feedback.Bind(
......@@ -2888,8 +2888,8 @@ void Interpreter::DoCreateClosure(InterpreterAssembler* assembler) {
Node* context = __ GetContext();
Label call_runtime(assembler, Label::kDeferred);
__ GotoUnless(__ IsSetWord32<CreateClosureFlags::FastNewClosureBit>(flags),
&call_runtime);
__ GotoIfNot(__ IsSetWord32<CreateClosureFlags::FastNewClosureBit>(flags),
&call_runtime);
ConstructorBuiltinsAssembler constructor_assembler(assembler->state());
Node* vector_index = __ BytecodeOperandIdx(1);
vector_index = __ SmiTag(vector_index);
......
......@@ -205,16 +205,16 @@ TEST(TryToName) {
&if_bailout);
m.Bind(&if_keyisindex);
m.GotoUnless(m.WordEqual(expected_result,
m.SmiConstant(Smi::FromInt(kKeyIsIndex))),
&failed);
m.GotoIfNot(m.WordEqual(expected_result,
m.SmiConstant(Smi::FromInt(kKeyIsIndex))),
&failed);
m.Branch(m.WordEqual(m.SmiUntag(expected_arg), var_index.value()),
&passed, &failed);
m.Bind(&if_keyisunique);
m.GotoUnless(m.WordEqual(expected_result,
m.SmiConstant(Smi::FromInt(kKeyIsUnique))),
&failed);
m.GotoIfNot(m.WordEqual(expected_result,
m.SmiConstant(Smi::FromInt(kKeyIsUnique))),
&failed);
m.Branch(m.WordEqual(expected_arg, var_unique.value()), &passed, &failed);
}
......@@ -389,7 +389,7 @@ void TestNameDictionaryLookup() {
m.NameDictionaryLookup<Dictionary>(dictionary, unique_name, &if_found,
&var_name_index, &if_not_found);
m.Bind(&if_found);
m.GotoUnless(
m.GotoIfNot(
m.WordEqual(expected_result, m.SmiConstant(Smi::FromInt(kFound))),
&failed);
m.Branch(m.WordEqual(m.SmiUntag(expected_arg), var_name_index.value()),
......@@ -496,7 +496,7 @@ void TestNumberDictionaryLookup() {
m.NumberDictionaryLookup<Dictionary>(dictionary, key, &if_found, &var_entry,
&if_not_found);
m.Bind(&if_found);
m.GotoUnless(
m.GotoIfNot(
m.WordEqual(expected_result, m.SmiConstant(Smi::FromInt(kFound))),
&failed);
m.Branch(m.WordEqual(m.SmiUntag(expected_arg), var_entry.value()), &passed,
......
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