Commit 930e31e6 authored by Camillo Bruni's avatar Camillo Bruni Committed by Commit Bot

[csa] Enforce using BIND macro

This CL enforces passing an AssemblerDebugInfo object to Bind, most convently
acheived by the BIND macro.

Change-Id: I092714f10803f529d01d2fe716b96275b2bee806
Reviewed-on: https://chromium-review.googlesource.com/508729Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
Reviewed-by: 's avatarIgor Sheludko <ishell@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45433}
parent bd951778
......@@ -885,7 +885,7 @@ TF_BUILTIN(FastArrayPop, CodeStubAssembler) {
}
args.PopAndReturn(AllocateHeapNumberWithValue(value));
Bind(&fast_elements);
BIND(&fast_elements);
{
Node* value = LoadFixedArrayElement(elements, new_length);
StoreFixedArrayElement(elements, new_length, TheHoleConstant());
......@@ -1136,7 +1136,7 @@ TF_BUILTIN(FastArrayShift, CodeStubAssembler) {
}
args.PopAndReturn(AllocateHeapNumberWithValue(value));
Bind(&fast_elements_tagged);
BIND(&fast_elements_tagged);
{
Node* value = LoadFixedArrayElement(elements, 0);
BuildFastLoop(IntPtrConstant(0), new_length,
......@@ -1153,7 +1153,7 @@ TF_BUILTIN(FastArrayShift, CodeStubAssembler) {
args.PopAndReturn(value);
}
Bind(&fast_elements_untagged);
BIND(&fast_elements_untagged);
{
Node* value = LoadFixedArrayElement(elements, 0);
Node* memmove =
......
......@@ -469,36 +469,36 @@ void SharedArrayBufferBuiltinsAssembler::AtomicBinopBuiltinCommon(
Switch(instance_type, &other, case_values, case_labels,
arraysize(case_labels));
Bind(&i8);
BIND(&i8);
Return(SmiFromWord32((this->*function)(MachineType::Int8(), backing_store,
index_word, value_word32)));
Bind(&u8);
BIND(&u8);
Return(SmiFromWord32((this->*function)(MachineType::Uint8(), backing_store,
index_word, value_word32)));
Bind(&i16);
BIND(&i16);
Return(
SmiFromWord32((this->*function)(MachineType::Int16(), backing_store,
WordShl(index_word, 1), value_word32)));
Bind(&u16);
BIND(&u16);
Return(
SmiFromWord32((this->*function)(MachineType::Uint16(), backing_store,
WordShl(index_word, 1), value_word32)));
Bind(&i32);
BIND(&i32);
Return(ChangeInt32ToTagged(
(this->*function)(MachineType::Int32(), backing_store,
WordShl(index_word, 2), value_word32)));
Bind(&u32);
BIND(&u32);
Return(ChangeUint32ToTagged(
(this->*function)(MachineType::Uint32(), backing_store,
WordShl(index_word, 2), value_word32)));
// This shouldn't happen, we've already validated the type.
Bind(&other);
BIND(&other);
Unreachable();
#endif // V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64 || V8_TARGET_ARCH_PPC64
// || V8_TARGET_ARCH_PPC || V8_TARGET_ARCH_S390 || V8_TARGET_ARCH_S390X
......
......@@ -597,12 +597,12 @@ Node* CodeStubAssembler::TrySmiDiv(Node* dividend, Node* divisor,
Branch(WordEqual(dividend, SmiConstant(0)), &dividend_is_zero,
&dividend_is_not_zero);
Bind(&dividend_is_zero);
BIND(&dividend_is_zero);
{
GotoIf(SmiLessThan(divisor, SmiConstant(0)), bailout);
Goto(&dividend_is_not_zero);
}
Bind(&dividend_is_not_zero);
BIND(&dividend_is_not_zero);
Node* untagged_divisor = SmiToWord32(divisor);
Node* untagged_dividend = SmiToWord32(dividend);
......@@ -613,7 +613,7 @@ Node* CodeStubAssembler::TrySmiDiv(Node* dividend, Node* divisor,
Branch(Word32Equal(untagged_divisor, Int32Constant(-1)),
&divisor_is_minus_one, &divisor_is_not_minus_one);
Bind(&divisor_is_minus_one);
BIND(&divisor_is_minus_one);
{
GotoIf(Word32Equal(
untagged_dividend,
......@@ -621,7 +621,7 @@ Node* CodeStubAssembler::TrySmiDiv(Node* dividend, Node* divisor,
bailout);
Goto(&divisor_is_not_minus_one);
}
Bind(&divisor_is_not_minus_one);
BIND(&divisor_is_not_minus_one);
Node* untagged_result = Int32Div(untagged_dividend, untagged_divisor);
Node* truncated = Int32Mul(untagged_result, untagged_divisor);
......@@ -661,6 +661,14 @@ Node* CodeStubAssembler::WordIsWordAligned(Node* word) {
WordAnd(word, IntPtrConstant(kPointerSize - 1)));
}
#if DEBUG
void CodeStubAssembler::Bind(Label* label, AssemblerDebugInfo debug_info) {
CodeAssembler::Bind(label, debug_info);
}
#else
void CodeStubAssembler::Bind(Label* label) { CodeAssembler::Bind(label); }
#endif // DEBUG
void CodeStubAssembler::BranchIfPrototypesHaveNoElements(
Node* receiver_map, Label* definitely_no_elements,
Label* possibly_elements) {
......@@ -3503,61 +3511,54 @@ Node* CodeStubAssembler::StringFromCharCode(Node* code) {
return var_result.value();
}
namespace {
// A wrapper around CopyStringCharacters which determines the correct string
// encoding, allocates a corresponding sequential string, and then copies the
// given character range using CopyStringCharacters.
// |from_string| must be a sequential string. |from_index| and
// |character_count| must be Smis s.t.
// 0 <= |from_index| <= |from_index| + |character_count| < from_string.length.
Node* AllocAndCopyStringCharacters(CodeStubAssembler* a, Node* context,
Node* from, Node* from_instance_type,
Node* from_index, Node* character_count) {
typedef CodeStubAssembler::Label Label;
typedef CodeStubAssembler::Variable Variable;
Label end(a), one_byte_sequential(a), two_byte_sequential(a);
Variable var_result(a, MachineRepresentation::kTagged);
Node* CodeStubAssembler::AllocAndCopyStringCharacters(Node* context, Node* from,
Node* from_instance_type,
Node* from_index,
Node* character_count) {
Label end(this), one_byte_sequential(this), two_byte_sequential(this);
Variable var_result(this, MachineRepresentation::kTagged);
Node* const smi_zero = a->SmiConstant(Smi::kZero);
Node* const smi_zero = SmiConstant(Smi::kZero);
a->Branch(a->IsOneByteStringInstanceType(from_instance_type),
&one_byte_sequential, &two_byte_sequential);
Branch(IsOneByteStringInstanceType(from_instance_type), &one_byte_sequential,
&two_byte_sequential);
// The subject string is a sequential one-byte string.
a->BIND(&one_byte_sequential);
BIND(&one_byte_sequential);
{
Node* result =
a->AllocateSeqOneByteString(context, a->SmiToWord(character_count));
a->CopyStringCharacters(from, result, from_index, smi_zero, character_count,
String::ONE_BYTE_ENCODING,
String::ONE_BYTE_ENCODING,
CodeStubAssembler::SMI_PARAMETERS);
AllocateSeqOneByteString(context, SmiToWord(character_count));
CopyStringCharacters(from, result, from_index, smi_zero, character_count,
String::ONE_BYTE_ENCODING, String::ONE_BYTE_ENCODING,
CodeStubAssembler::SMI_PARAMETERS);
var_result.Bind(result);
a->Goto(&end);
Goto(&end);
}
// The subject string is a sequential two-byte string.
a->BIND(&two_byte_sequential);
BIND(&two_byte_sequential);
{
Node* result =
a->AllocateSeqTwoByteString(context, a->SmiToWord(character_count));
a->CopyStringCharacters(from, result, from_index, smi_zero, character_count,
String::TWO_BYTE_ENCODING,
String::TWO_BYTE_ENCODING,
CodeStubAssembler::SMI_PARAMETERS);
AllocateSeqTwoByteString(context, SmiToWord(character_count));
CopyStringCharacters(from, result, from_index, smi_zero, character_count,
String::TWO_BYTE_ENCODING, String::TWO_BYTE_ENCODING,
CodeStubAssembler::SMI_PARAMETERS);
var_result.Bind(result);
a->Goto(&end);
Goto(&end);
}
a->BIND(&end);
BIND(&end);
return var_result.value();
}
} // namespace
Node* CodeStubAssembler::SubString(Node* context, Node* string, Node* from,
Node* to, SubStringFlags flags) {
......@@ -3647,7 +3648,7 @@ Node* CodeStubAssembler::SubString(Node* context, Node* string, Node* from,
GotoIf(to_direct.is_external(), &external_string);
var_result.Bind(AllocAndCopyStringCharacters(
this, context, direct_string, instance_type, offset, substr_length));
context, direct_string, instance_type, offset, substr_length));
Counters* counters = isolate()->counters();
IncrementCounter(counters->sub_string_native(), 1);
......@@ -3660,9 +3661,8 @@ Node* CodeStubAssembler::SubString(Node* context, Node* string, Node* from,
{
Node* const fake_sequential_string = to_direct.PointerToString(&runtime);
var_result.Bind(
AllocAndCopyStringCharacters(this, context, fake_sequential_string,
instance_type, offset, substr_length));
var_result.Bind(AllocAndCopyStringCharacters(
context, fake_sequential_string, instance_type, offset, substr_length));
Counters* counters = isolate()->counters();
IncrementCounter(counters->sub_string_native(), 1);
......@@ -7385,103 +7385,87 @@ Node* CodeStubAssembler::RelationalComparison(RelationalComparisonMode mode,
return result.value();
}
namespace {
Node* CollectFeedbackForString(CodeStubAssembler* assembler,
Node* instance_type) {
Node* feedback = assembler->SelectSmiConstant(
assembler->Word32Equal(
assembler->Word32And(
instance_type, assembler->Int32Constant(kIsNotInternalizedMask)),
assembler->Int32Constant(kInternalizedTag)),
Node* CodeStubAssembler::CollectFeedbackForString(Node* instance_type) {
Node* feedback = SelectSmiConstant(
Word32Equal(
Word32And(instance_type, Int32Constant(kIsNotInternalizedMask)),
Int32Constant(kInternalizedTag)),
CompareOperationFeedback::kInternalizedString,
CompareOperationFeedback::kString);
return feedback;
}
void GenerateEqual_Same(
CodeStubAssembler* assembler, Node* value,
CodeStubAssembler::Label* if_equal, CodeStubAssembler::Label* if_notequal,
CodeStubAssembler::Variable* var_type_feedback = nullptr) {
void CodeStubAssembler::GenerateEqual_Same(Node* value, Label* if_equal,
Label* if_notequal,
Variable* var_type_feedback) {
// In case of abstract or strict equality checks, we need additional checks
// for NaN values because they are not considered equal, even if both the
// left and the right hand side reference exactly the same value.
typedef CodeStubAssembler::Label Label;
// Check if {value} is a Smi or a HeapObject.
Label if_valueissmi(assembler), if_valueisnotsmi(assembler);
assembler->Branch(assembler->TaggedIsSmi(value), &if_valueissmi,
&if_valueisnotsmi);
Label if_valueissmi(this), if_valueisnotsmi(this);
Branch(TaggedIsSmi(value), &if_valueissmi, &if_valueisnotsmi);
assembler->BIND(&if_valueisnotsmi);
BIND(&if_valueisnotsmi);
{
// Load the map of {value}.
Node* value_map = assembler->LoadMap(value);
Node* value_map = LoadMap(value);
// Check if {value} (and therefore {rhs}) is a HeapNumber.
Label if_valueisnumber(assembler), if_valueisnotnumber(assembler);
assembler->Branch(assembler->IsHeapNumberMap(value_map), &if_valueisnumber,
&if_valueisnotnumber);
Label if_valueisnumber(this), if_valueisnotnumber(this);
Branch(IsHeapNumberMap(value_map), &if_valueisnumber, &if_valueisnotnumber);
assembler->BIND(&if_valueisnumber);
BIND(&if_valueisnumber);
{
if (var_type_feedback != nullptr) {
assembler->CombineFeedback(
var_type_feedback,
assembler->SmiConstant(CompareOperationFeedback::kNumber));
CombineFeedback(var_type_feedback,
SmiConstant(CompareOperationFeedback::kNumber));
}
// Convert {value} (and therefore {rhs}) to floating point value.
Node* value_value = assembler->LoadHeapNumberValue(value);
Node* value_value = LoadHeapNumberValue(value);
// Check if the HeapNumber value is a NaN.
assembler->BranchIfFloat64IsNaN(value_value, if_notequal, if_equal);
BranchIfFloat64IsNaN(value_value, if_notequal, if_equal);
}
assembler->BIND(&if_valueisnotnumber);
BIND(&if_valueisnotnumber);
if (var_type_feedback != nullptr) {
// Collect type feedback.
Node* instance_type = assembler->LoadMapInstanceType(value_map);
Node* instance_type = LoadMapInstanceType(value_map);
Label if_valueisstring(assembler), if_valueisnotstring(assembler);
assembler->Branch(assembler->IsStringInstanceType(instance_type),
&if_valueisstring, &if_valueisnotstring);
Label if_valueisstring(this), if_valueisnotstring(this);
Branch(IsStringInstanceType(instance_type), &if_valueisstring,
&if_valueisnotstring);
assembler->BIND(&if_valueisstring);
BIND(&if_valueisstring);
{
assembler->CombineFeedback(
var_type_feedback,
CollectFeedbackForString(assembler, instance_type));
assembler->Goto(if_equal);
CombineFeedback(var_type_feedback,
CollectFeedbackForString(instance_type));
Goto(if_equal);
}
assembler->Bind(&if_valueisnotstring);
BIND(&if_valueisnotstring);
{
var_type_feedback->Bind(
assembler->SmiConstant(CompareOperationFeedback::kAny));
assembler->GotoIfNot(assembler->IsJSReceiverInstanceType(instance_type),
if_equal);
assembler->CombineFeedback(
var_type_feedback,
assembler->SmiConstant(CompareOperationFeedback::kReceiver));
assembler->Goto(if_equal);
var_type_feedback->Bind(SmiConstant(CompareOperationFeedback::kAny));
GotoIfNot(IsJSReceiverInstanceType(instance_type), if_equal);
CombineFeedback(var_type_feedback,
SmiConstant(CompareOperationFeedback::kReceiver));
Goto(if_equal);
}
} else {
assembler->Goto(if_equal);
Goto(if_equal);
}
}
assembler->BIND(&if_valueissmi);
BIND(&if_valueissmi);
if (var_type_feedback != nullptr) {
assembler->CombineFeedback(
var_type_feedback,
assembler->SmiConstant(CompareOperationFeedback::kSignedSmall));
CombineFeedback(var_type_feedback,
SmiConstant(CompareOperationFeedback::kSignedSmall));
}
assembler->Goto(if_equal);
Goto(if_equal);
}
} // namespace
// ES6 section 7.2.12 Abstract Equality Comparison
Node* CodeStubAssembler::Equal(Node* lhs, Node* rhs, Node* context,
......@@ -7527,7 +7511,7 @@ Node* CodeStubAssembler::Equal(Node* lhs, Node* rhs, Node* context,
{
// The {lhs} and {rhs} reference the exact same value, yet we need special
// treatment for HeapNumber, as NaN is not equal to NaN.
GenerateEqual_Same(this, lhs, &if_equal, &if_notequal, var_type_feedback);
GenerateEqual_Same(lhs, &if_equal, &if_notequal, var_type_feedback);
}
BIND(&if_notsame);
......@@ -7687,7 +7671,7 @@ Node* CodeStubAssembler::Equal(Node* lhs, Node* rhs, Node* context,
Switch(lhs_instance_type, &if_lhsisreceiver, case_values, case_labels,
arraysize(case_values));
for (int32_t i = 0; i < FIRST_NONSTRING_TYPE; ++i) {
Bind(case_labels[i]);
BIND(case_labels[i]);
Goto(&if_lhsisstring);
delete case_labels[i];
}
......@@ -7708,9 +7692,9 @@ Node* CodeStubAssembler::Equal(Node* lhs, Node* rhs, Node* context,
result.Bind(CallStub(callable, context, lhs, rhs));
if (var_type_feedback != nullptr) {
Node* lhs_feedback =
CollectFeedbackForString(this, lhs_instance_type);
CollectFeedbackForString(lhs_instance_type);
Node* rhs_feedback =
CollectFeedbackForString(this, rhs_instance_type);
CollectFeedbackForString(rhs_instance_type);
CombineFeedback(var_type_feedback,
SmiOr(lhs_feedback, rhs_feedback));
}
......@@ -8058,7 +8042,7 @@ Node* CodeStubAssembler::StrictEqual(Node* lhs, Node* rhs,
if (var_type_feedback != nullptr) {
var_type_feedback->Bind(SmiConstant(CompareOperationFeedback::kNone));
}
GenerateEqual_Same(this, lhs, &if_equal, &if_notequal, var_type_feedback);
GenerateEqual_Same(lhs, &if_equal, &if_notequal, var_type_feedback);
}
BIND(&if_notsame);
......@@ -8168,9 +8152,9 @@ Node* CodeStubAssembler::StrictEqual(Node* lhs, Node* rhs,
Callable callable = CodeFactory::StringEqual(isolate());
if (var_type_feedback != nullptr) {
Node* lhs_feedback =
CollectFeedbackForString(this, lhs_instance_type);
CollectFeedbackForString(lhs_instance_type);
Node* rhs_feedback =
CollectFeedbackForString(this, rhs_instance_type);
CollectFeedbackForString(rhs_instance_type);
var_type_feedback->Bind(SmiOr(lhs_feedback, rhs_feedback));
}
result.Bind(CallStub(callable, NoContextConstant(), lhs, rhs));
......@@ -8998,8 +8982,8 @@ CodeStubArguments::CodeStubArguments(CodeStubAssembler* assembler, Node* argc,
argc_mode_(mode),
argc_(argc),
arguments_(nullptr),
fp_(fp != nullptr ? fp : assembler->LoadFramePointer()) {
Node* offset = assembler->ElementOffsetFromIndex(
fp_(fp != nullptr ? fp : assembler_->LoadFramePointer()) {
Node* offset = assembler_->ElementOffsetFromIndex(
argc_, FAST_ELEMENTS, mode,
(StandardFrameConstants::kFixedSlotCountAboveFp - 1) * kPointerSize);
arguments_ = assembler_->IntPtrAdd(fp_, offset);
......
......@@ -77,7 +77,6 @@ class V8_EXPORT_PRIVATE CodeStubAssembler : public compiler::CodeAssembler {
typedef base::Flags<AllocationFlag> AllocationFlags;
enum ParameterMode { SMI_PARAMETERS, INTPTR_PARAMETERS };
// On 32-bit platforms, there is a slight performance advantage to doing all
// of the array offset/index arithmetic with SMIs, since it's possible
// to save a few tag/untag operations without paying an extra expense when
......@@ -302,6 +301,12 @@ class V8_EXPORT_PRIVATE CodeStubAssembler : public compiler::CodeAssembler {
Node* WordIsWordAligned(Node* word);
Node* WordIsPowerOfTwo(Node* value);
#if DEBUG
void Bind(Label* label, AssemblerDebugInfo debug_info);
#else
void Bind(Label* label);
#endif // DEBUG
void BranchIfSmiEqual(Node* a, Node* b, Label* if_true, Label* if_false) {
Branch(SmiEqual(a, b), if_true, if_false);
}
......@@ -1498,6 +1503,13 @@ class V8_EXPORT_PRIVATE CodeStubAssembler : public compiler::CodeAssembler {
// Implements DescriptorArray::GetKey.
Node* DescriptorArrayGetKey(Node* descriptors, Node* descriptor_number);
Node* CollectFeedbackForString(Node* instance_type);
void GenerateEqual_Same(Node* value, Label* if_equal, Label* if_notequal,
Variable* var_type_feedback = nullptr);
Node* AllocAndCopyStringCharacters(Node* context, Node* from,
Node* from_instance_type, Node* from_index,
Node* character_count);
static const int kElementLoopUnrollThreshold = 8;
};
......@@ -1622,13 +1634,16 @@ class ToDirectStringAssembler : public CodeStubAssembler {
#define CSA_ASSERT_JS_ARGC_EQ(csa, expected) \
CSA_ASSERT_JS_ARGC_OP(csa, Word32Equal, ==, expected)
#define BIND(label) Bind(label, {#label, __FILE__, __LINE__})
#define CSA_DEBUG_INFO(name) \
, { #name, __FILE__, __LINE__ }
#define BIND(label) Bind(label CSA_DEBUG_INFO(label))
#define VARIABLE(name, ...) \
Variable name(this, {#name, __FILE__, __LINE__}, __VA_ARGS__);
Variable name(this CSA_DEBUG_INFO(name), __VA_ARGS__);
#else // DEBUG
#define CSA_ASSERT(csa, x) ((void)0)
#define CSA_ASSERT_JS_ARGC_EQ(csa, expected) ((void)0)
#define CSA_DEBUG_INFO(name)
#define BIND(label) Bind(label);
#define VARIABLE(name, ...) Variable name(this, __VA_ARGS__);
#endif // DEBUG
......
......@@ -119,7 +119,7 @@ Node* InterpreterAssembler::GetContextAtDepth(Node* context, Node* depth) {
Branch(Word32Equal(depth, Int32Constant(0)), &context_found, &context_search);
// Loop until the depth is 0.
Bind(&context_search);
BIND(&context_search);
{
cur_depth.Bind(Int32Sub(cur_depth.value(), Int32Constant(1)));
cur_context.Bind(
......@@ -129,7 +129,7 @@ Node* InterpreterAssembler::GetContextAtDepth(Node* context, Node* depth) {
&context_search);
}
Bind(&context_found);
BIND(&context_found);
return cur_context.value();
}
......@@ -147,7 +147,7 @@ void InterpreterAssembler::GotoIfHasContextExtensionUpToDepth(Node* context,
// Loop until the depth is 0.
Goto(&context_search);
Bind(&context_search);
BIND(&context_search);
{
// TODO(leszeks): We only need to do this check if the context had a sloppy
// eval, we could pass in a context chain bitmask to figure out which
......@@ -598,7 +598,7 @@ Node* InterpreterAssembler::CallJSWithFeedback(
Node* is_smi = TaggedIsSmi(function);
Branch(is_smi, &extra_checks, &call_function);
Bind(&call_function);
BIND(&call_function);
{
// Increment the call count.
IncrementCallCount(feedback_vector, slot_id);
......@@ -614,7 +614,7 @@ Node* InterpreterAssembler::CallJSWithFeedback(
Goto(&end);
}
Bind(&extra_checks);
BIND(&extra_checks);
{
Label check_initialized(this), mark_megamorphic(this),
create_allocation_site(this);
......@@ -658,7 +658,7 @@ Node* InterpreterAssembler::CallJSWithFeedback(
Goto(&mark_megamorphic);
}
Bind(&check_initialized);
BIND(&check_initialized);
{
Comment("check if uninitialized");
// Check if it is uninitialized target first.
......@@ -698,7 +698,7 @@ Node* InterpreterAssembler::CallJSWithFeedback(
Goto(&call_function);
}
Bind(&create_allocation_site);
BIND(&create_allocation_site);
{
CreateAllocationSiteInFeedbackVector(feedback_vector, SmiTag(slot_id));
......@@ -708,7 +708,7 @@ Node* InterpreterAssembler::CallJSWithFeedback(
Goto(&call_function);
}
Bind(&mark_megamorphic);
BIND(&mark_megamorphic);
{
// Mark it as a megamorphic.
// MegamorphicSentinel is created as a part of Heap::InitialObjects
......@@ -722,7 +722,7 @@ Node* InterpreterAssembler::CallJSWithFeedback(
}
}
Bind(&call);
BIND(&call);
{
Comment("Increment call count and call using Call builtin");
// Increment the call count.
......@@ -739,7 +739,7 @@ Node* InterpreterAssembler::CallJSWithFeedback(
Goto(&end);
}
Bind(&end);
BIND(&end);
return return_value.value();
}
......@@ -805,7 +805,7 @@ Node* InterpreterAssembler::Construct(Node* constructor, Node* context,
allocation_feedback.Bind(UndefinedConstant());
Branch(is_monomorphic, &call_construct_function, &extra_checks);
Bind(&call_construct_function);
BIND(&call_construct_function);
{
Comment("call using ConstructFunction");
IncrementCallCount(feedback_vector, slot_id);
......@@ -818,7 +818,7 @@ Node* InterpreterAssembler::Construct(Node* constructor, Node* context,
Goto(&end);
}
Bind(&extra_checks);
BIND(&extra_checks);
{
Label check_allocation_site(this), check_initialized(this),
initialize(this), mark_megamorphic(this);
......@@ -841,7 +841,7 @@ Node* InterpreterAssembler::Construct(Node* constructor, Node* context,
Node* is_smi = TaggedIsSmi(feedback_value);
Branch(is_smi, &initialize, &mark_megamorphic);
Bind(&check_allocation_site);
BIND(&check_allocation_site);
{
Comment("check if it is an allocation site");
Node* is_allocation_site =
......@@ -859,7 +859,7 @@ Node* InterpreterAssembler::Construct(Node* constructor, Node* context,
Goto(&call_construct_function);
}
Bind(&check_initialized);
BIND(&check_initialized);
{
// Check if it is uninitialized.
Comment("check if uninitialized");
......@@ -868,7 +868,7 @@ Node* InterpreterAssembler::Construct(Node* constructor, Node* context,
Branch(is_uninitialized, &initialize, &mark_megamorphic);
}
Bind(&initialize);
BIND(&initialize);
{
Label create_allocation_site(this), create_weak_cell(this);
Comment("initialize the feedback element");
......@@ -879,7 +879,7 @@ Node* InterpreterAssembler::Construct(Node* constructor, Node* context,
Node* is_array_function = WordEqual(context_slot, constructor);
Branch(is_array_function, &create_allocation_site, &create_weak_cell);
Bind(&create_allocation_site);
BIND(&create_allocation_site);
{
Node* site = CreateAllocationSiteInFeedbackVector(feedback_vector,
SmiTag(slot_id));
......@@ -887,7 +887,7 @@ Node* InterpreterAssembler::Construct(Node* constructor, Node* context,
Goto(&call_construct_function);
}
Bind(&create_weak_cell);
BIND(&create_weak_cell);
{
CreateWeakCellInFeedbackVector(feedback_vector, SmiTag(slot_id),
constructor);
......@@ -895,7 +895,7 @@ Node* InterpreterAssembler::Construct(Node* constructor, Node* context,
}
}
Bind(&mark_megamorphic);
BIND(&mark_megamorphic);
{
// MegamorphicSentinel is an immortal immovable object so
// write-barrier is not needed.
......@@ -909,7 +909,7 @@ Node* InterpreterAssembler::Construct(Node* constructor, Node* context,
}
}
Bind(&call_construct);
BIND(&call_construct);
{
Comment("call using Construct builtin");
Callable callable = CodeFactory::InterpreterPushArgsThenConstruct(
......@@ -921,7 +921,7 @@ Node* InterpreterAssembler::Construct(Node* constructor, Node* context,
Goto(&end);
}
Bind(&end);
BIND(&end);
return return_value.value();
}
......@@ -991,7 +991,7 @@ void InterpreterAssembler::UpdateInterruptBudget(Node* weight, bool backward) {
Branch(condition, &ok, &interrupt_check);
// Perform interrupt and reset budget.
Bind(&interrupt_check);
BIND(&interrupt_check);
{
CallRuntime(Runtime::kInterrupt, GetContext());
new_budget.Bind(Int32Constant(Interpreter::InterruptBudget()));
......@@ -999,7 +999,7 @@ void InterpreterAssembler::UpdateInterruptBudget(Node* weight, bool backward) {
}
// Update budget.
Bind(&ok);
BIND(&ok);
StoreNoWriteBarrier(MachineRepresentation::kWord32,
BytecodeArrayTaggedPointer(), budget_offset,
new_budget.value());
......@@ -1040,9 +1040,9 @@ void InterpreterAssembler::JumpConditional(Node* condition, Node* delta) {
Label match(this), no_match(this);
Branch(condition, &match, &no_match);
Bind(&match);
BIND(&match);
Jump(delta);
Bind(&no_match);
BIND(&no_match);
Dispatch();
}
......@@ -1071,13 +1071,13 @@ Node* InterpreterAssembler::StarDispatchLookahead(Node* target_bytecode) {
Node* is_star = WordEqual(target_bytecode, star_bytecode);
Branch(is_star, &do_inline_star, &done);
Bind(&do_inline_star);
BIND(&do_inline_star);
{
InlineStar();
var_bytecode.Bind(LoadBytecode(BytecodeOffset()));
Goto(&done);
}
Bind(&done);
BIND(&done);
return var_bytecode.value();
}
......@@ -1188,7 +1188,7 @@ Node* InterpreterAssembler::TruncateTaggedToWord32WithFeedback(
var_value.Bind(value);
var_type_feedback->Bind(SmiConstant(BinaryOperationFeedback::kNone));
Goto(&loop);
Bind(&loop);
BIND(&loop);
{
// Load the current {value}.
value = var_value.value();
......@@ -1197,7 +1197,7 @@ Node* InterpreterAssembler::TruncateTaggedToWord32WithFeedback(
Label if_valueissmi(this), if_valueisnotsmi(this);
Branch(TaggedIsSmi(value), &if_valueissmi, &if_valueisnotsmi);
Bind(&if_valueissmi);
BIND(&if_valueissmi);
{
// Convert the Smi {value}.
var_result.Bind(SmiToWord32(value));
......@@ -1207,7 +1207,7 @@ Node* InterpreterAssembler::TruncateTaggedToWord32WithFeedback(
Goto(&done_loop);
}
Bind(&if_valueisnotsmi);
BIND(&if_valueisnotsmi);
{
// Check if {value} is a HeapNumber.
Label if_valueisheapnumber(this),
......@@ -1216,7 +1216,7 @@ Node* InterpreterAssembler::TruncateTaggedToWord32WithFeedback(
Branch(IsHeapNumberMap(value_map), &if_valueisheapnumber,
&if_valueisnotheapnumber);
Bind(&if_valueisheapnumber);
BIND(&if_valueisheapnumber);
{
// Truncate the floating point value.
var_result.Bind(TruncateHeapNumberValueToWord32(value));
......@@ -1226,7 +1226,7 @@ Node* InterpreterAssembler::TruncateTaggedToWord32WithFeedback(
Goto(&done_loop);
}
Bind(&if_valueisnotheapnumber);
BIND(&if_valueisnotheapnumber);
{
// We do not require an Or with earlier feedback here because once we
// convert the value to a number, we cannot reach this path. We can
......@@ -1240,7 +1240,7 @@ Node* InterpreterAssembler::TruncateTaggedToWord32WithFeedback(
Int32Constant(ODDBALL_TYPE));
Branch(is_oddball, &if_valueisoddball, &if_valueisnotoddball);
Bind(&if_valueisoddball);
BIND(&if_valueisoddball);
{
// Convert Oddball to a Number and perform checks again.
var_value.Bind(LoadObjectField(value, Oddball::kToNumberOffset));
......@@ -1249,7 +1249,7 @@ Node* InterpreterAssembler::TruncateTaggedToWord32WithFeedback(
Goto(&loop);
}
Bind(&if_valueisnotoddball);
BIND(&if_valueisnotoddball);
{
// Convert the {value} to a Number first.
Callable callable = CodeFactory::NonNumberToNumber(isolate());
......@@ -1260,7 +1260,7 @@ Node* InterpreterAssembler::TruncateTaggedToWord32WithFeedback(
}
}
}
Bind(&done_loop);
BIND(&done_loop);
return var_result.value();
}
......@@ -1315,11 +1315,11 @@ void InterpreterAssembler::AbortIfWordNotEqual(Node* lhs, Node* rhs,
Label ok(this), abort(this, Label::kDeferred);
Branch(WordEqual(lhs, rhs), &ok, &abort);
Bind(&abort);
BIND(&abort);
Abort(bailout_reason);
Goto(&ok);
Bind(&ok);
BIND(&ok);
}
void InterpreterAssembler::MaybeDropFrames(Node* context) {
......@@ -1332,14 +1332,14 @@ void InterpreterAssembler::MaybeDropFrames(Node* context) {
Label ok(this), drop_frames(this);
Branch(IntPtrEqual(restart_fp, null), &ok, &drop_frames);
Bind(&drop_frames);
BIND(&drop_frames);
// We don't expect this call to return since the frame dropper tears down
// the stack and jumps into the function on the target frame to restart it.
CallStub(CodeFactory::FrameDropperTrampoline(isolate()), context, restart_fp);
Abort(kUnexpectedReturnFromFrameDropper);
Goto(&ok);
Bind(&ok);
BIND(&ok);
}
void InterpreterAssembler::TraceBytecode(Runtime::FunctionId function_id) {
......@@ -1364,7 +1364,7 @@ void InterpreterAssembler::TraceBytecodeDispatch(Node* target_bytecode) {
old_counter, IntPtrConstant(std::numeric_limits<uintptr_t>::max()));
Branch(counter_reached_max, &counter_saturated, &counter_ok);
Bind(&counter_ok);
BIND(&counter_ok);
{
Node* new_counter = IntPtrAdd(old_counter, IntPtrConstant(1));
StoreNoWriteBarrier(MachineType::PointerRepresentation(), counters_table,
......@@ -1372,7 +1372,7 @@ void InterpreterAssembler::TraceBytecodeDispatch(Node* target_bytecode) {
Goto(&counter_saturated);
}
Bind(&counter_saturated);
BIND(&counter_saturated);
}
// static
......@@ -1412,7 +1412,7 @@ Node* InterpreterAssembler::ExportRegisterFile(Node* array) {
// BytecodeGraphBuilder::VisitResumeGenerator.
Label loop(this, &var_index), done_loop(this);
Goto(&loop);
Bind(&loop);
BIND(&loop);
{
Node* index = var_index.value();
GotoIfNot(UintPtrLessThan(index, register_count), &done_loop);
......@@ -1425,7 +1425,7 @@ Node* InterpreterAssembler::ExportRegisterFile(Node* array) {
var_index.Bind(IntPtrAdd(index, IntPtrConstant(1)));
Goto(&loop);
}
Bind(&done_loop);
BIND(&done_loop);
return array;
}
......@@ -1445,7 +1445,7 @@ Node* InterpreterAssembler::ImportRegisterFile(Node* array) {
// array contents to not keep them alive artificially.
Label loop(this, &var_index), done_loop(this);
Goto(&loop);
Bind(&loop);
BIND(&loop);
{
Node* index = var_index.value();
GotoIfNot(UintPtrLessThan(index, register_count), &done_loop);
......@@ -1460,7 +1460,7 @@ Node* InterpreterAssembler::ImportRegisterFile(Node* array) {
var_index.Bind(IntPtrAdd(index, IntPtrConstant(1)));
Goto(&loop);
}
Bind(&done_loop);
BIND(&done_loop);
return array;
}
......
......@@ -179,7 +179,7 @@ class InterpreterLoadGlobalAssembler : public InterpreterAssembler {
feedback_vector, feedback_slot, &exit_point, &try_handler, &miss,
CodeStubAssembler::INTPTR_PARAMETERS);
Bind(&done);
BIND(&done);
SetAccumulator(var_result.value());
Dispatch();
}
......@@ -190,7 +190,7 @@ class InterpreterLoadGlobalAssembler : public InterpreterAssembler {
Variable var_result(this, MachineRepresentation::kTagged);
ExitPoint exit_point(this, &done, &var_result);
Bind(&try_handler);
BIND(&try_handler);
{
Node* context = GetContext();
Node* smi_slot = SmiTag(feedback_slot);
......@@ -203,7 +203,7 @@ class InterpreterLoadGlobalAssembler : public InterpreterAssembler {
&exit_point, &miss);
}
Bind(&miss);
BIND(&miss);
{
Node* context = GetContext();
Node* smi_slot = SmiTag(feedback_slot);
......@@ -215,7 +215,7 @@ class InterpreterLoadGlobalAssembler : public InterpreterAssembler {
accessor_asm.LoadGlobalIC_MissCase(&params, &exit_point);
}
Bind(&done);
BIND(&done);
{
SetAccumulator(var_result.value());
Dispatch();
......@@ -414,7 +414,7 @@ class InterpreterLookupContextSlotAssembler : public InterpreterAssembler {
}
// Slow path when we have to call out to the runtime.
Bind(&slowpath);
BIND(&slowpath);
{
Node* name = LoadConstantPoolEntry(name_index);
Node* result = CallRuntime(function_id, context, name);
......@@ -470,7 +470,7 @@ class InterpreterLookupGlobalAssembler : public InterpreterLoadGlobalAssembler {
}
// Slow path when we have to call out to the runtime
Bind(&slowpath);
BIND(&slowpath);
{
Node* name_index = BytecodeOperandIdx(0);
Node* name = LoadConstantPoolEntry(name_index);
......@@ -557,7 +557,7 @@ IGNITION_HANDLER(LdaNamedProperty, InterpreterAssembler) {
AccessorAssembler accessor_asm(state());
accessor_asm.LoadIC_BytecodeHandler(&params, &exit_point);
Bind(&done);
BIND(&done);
{
SetAccumulator(var_result.value());
Dispatch();
......@@ -735,7 +735,7 @@ IGNITION_HANDLER(LdaModuleVariable, InterpreterAssembler) {
Branch(IntPtrGreaterThan(cell_index, IntPtrConstant(0)), &if_export,
&if_import);
Bind(&if_export);
BIND(&if_export);
{
Node* regular_exports =
LoadObjectField(module, Module::kRegularExportsOffset);
......@@ -746,7 +746,7 @@ IGNITION_HANDLER(LdaModuleVariable, InterpreterAssembler) {
Goto(&end);
}
Bind(&if_import);
BIND(&if_import);
{
Node* regular_imports =
LoadObjectField(module, Module::kRegularImportsOffset);
......@@ -757,7 +757,7 @@ IGNITION_HANDLER(LdaModuleVariable, InterpreterAssembler) {
Goto(&end);
}
Bind(&end);
BIND(&end);
Dispatch();
}
......@@ -777,7 +777,7 @@ IGNITION_HANDLER(StaModuleVariable, InterpreterAssembler) {
Branch(IntPtrGreaterThan(cell_index, IntPtrConstant(0)), &if_export,
&if_import);
Bind(&if_export);
BIND(&if_export);
{
Node* regular_exports =
LoadObjectField(module, Module::kRegularExportsOffset);
......@@ -788,14 +788,14 @@ IGNITION_HANDLER(StaModuleVariable, InterpreterAssembler) {
Goto(&end);
}
Bind(&if_import);
BIND(&if_import);
{
// Not supported (probably never).
Abort(kUnsupportedModuleOperation);
Goto(&end);
}
Bind(&end);
BIND(&end);
Dispatch();
}
......@@ -899,7 +899,7 @@ IGNITION_HANDLER(AddSmi, InterpreterAssembler) {
// {right} is known to be a Smi.
// Check if the {left} is a Smi take the fast path.
Branch(TaggedIsSmi(left), &fastpath, &slowpath);
Bind(&fastpath);
BIND(&fastpath);
{
// Try fast Smi addition first.
Node* pair = IntPtrAddWithOverflow(BitcastTaggedToWord(left),
......@@ -909,7 +909,7 @@ IGNITION_HANDLER(AddSmi, InterpreterAssembler) {
// Check if the Smi additon overflowed.
Label if_notoverflow(this);
Branch(overflow, &slowpath, &if_notoverflow);
Bind(&if_notoverflow);
BIND(&if_notoverflow);
{
UpdateFeedback(SmiConstant(BinaryOperationFeedback::kSignedSmall),
feedback_vector, slot_index);
......@@ -917,7 +917,7 @@ IGNITION_HANDLER(AddSmi, InterpreterAssembler) {
Goto(&end);
}
}
Bind(&slowpath);
BIND(&slowpath);
{
Node* context = GetContext();
// TODO(ishell): pass slot as word-size value.
......@@ -926,7 +926,7 @@ IGNITION_HANDLER(AddSmi, InterpreterAssembler) {
feedback_vector));
Goto(&end);
}
Bind(&end);
BIND(&end);
{
SetAccumulator(var_result.value());
Dispatch();
......@@ -948,7 +948,7 @@ IGNITION_HANDLER(SubSmi, InterpreterAssembler) {
// {right} is known to be a Smi.
// Check if the {left} is a Smi take the fast path.
Branch(TaggedIsSmi(left), &fastpath, &slowpath);
Bind(&fastpath);
BIND(&fastpath);
{
// Try fast Smi subtraction first.
Node* pair = IntPtrSubWithOverflow(BitcastTaggedToWord(left),
......@@ -958,7 +958,7 @@ IGNITION_HANDLER(SubSmi, InterpreterAssembler) {
// Check if the Smi subtraction overflowed.
Label if_notoverflow(this);
Branch(overflow, &slowpath, &if_notoverflow);
Bind(&if_notoverflow);
BIND(&if_notoverflow);
{
UpdateFeedback(SmiConstant(BinaryOperationFeedback::kSignedSmall),
feedback_vector, slot_index);
......@@ -966,7 +966,7 @@ IGNITION_HANDLER(SubSmi, InterpreterAssembler) {
Goto(&end);
}
}
Bind(&slowpath);
BIND(&slowpath);
{
Node* context = GetContext();
// TODO(ishell): pass slot as word-size value.
......@@ -975,7 +975,7 @@ IGNITION_HANDLER(SubSmi, InterpreterAssembler) {
feedback_vector));
Goto(&end);
}
Bind(&end);
BIND(&end);
{
SetAccumulator(var_result.value());
Dispatch();
......@@ -997,7 +997,7 @@ IGNITION_HANDLER(MulSmi, InterpreterAssembler) {
// {right} is known to be a Smi.
// Check if the {left} is a Smi take the fast path.
Branch(TaggedIsSmi(left), &fastpath, &slowpath);
Bind(&fastpath);
BIND(&fastpath);
{
// Both {lhs} and {rhs} are Smis. The result is not necessarily a smi,
// in case of overflow.
......@@ -1008,7 +1008,7 @@ IGNITION_HANDLER(MulSmi, InterpreterAssembler) {
UpdateFeedback(feedback, feedback_vector, slot_index);
Goto(&end);
}
Bind(&slowpath);
BIND(&slowpath);
{
Node* context = GetContext();
// TODO(ishell): pass slot as word-size value.
......@@ -1018,7 +1018,7 @@ IGNITION_HANDLER(MulSmi, InterpreterAssembler) {
Goto(&end);
}
Bind(&end);
BIND(&end);
{
SetAccumulator(var_result.value());
Dispatch();
......@@ -1040,14 +1040,14 @@ IGNITION_HANDLER(DivSmi, InterpreterAssembler) {
// {right} is known to be a Smi.
// Check if the {left} is a Smi take the fast path.
Branch(TaggedIsSmi(left), &fastpath, &slowpath);
Bind(&fastpath);
BIND(&fastpath);
{
var_result.Bind(TrySmiDiv(left, right, &slowpath));
UpdateFeedback(SmiConstant(BinaryOperationFeedback::kSignedSmall),
feedback_vector, slot_index);
Goto(&end);
}
Bind(&slowpath);
BIND(&slowpath);
{
Node* context = GetContext();
// TODO(ishell): pass slot as word-size value.
......@@ -1057,7 +1057,7 @@ IGNITION_HANDLER(DivSmi, InterpreterAssembler) {
Goto(&end);
}
Bind(&end);
BIND(&end);
{
SetAccumulator(var_result.value());
Dispatch();
......@@ -1079,7 +1079,7 @@ IGNITION_HANDLER(ModSmi, InterpreterAssembler) {
// {right} is known to be a Smi.
// Check if the {left} is a Smi take the fast path.
Branch(TaggedIsSmi(left), &fastpath, &slowpath);
Bind(&fastpath);
BIND(&fastpath);
{
// Both {lhs} and {rhs} are Smis. The result is not necessarily a smi.
var_result.Bind(SmiMod(left, right));
......@@ -1089,7 +1089,7 @@ IGNITION_HANDLER(ModSmi, InterpreterAssembler) {
UpdateFeedback(feedback, feedback_vector, slot_index);
Goto(&end);
}
Bind(&slowpath);
BIND(&slowpath);
{
Node* context = GetContext();
// TODO(ishell): pass slot as word-size value.
......@@ -1099,7 +1099,7 @@ IGNITION_HANDLER(ModSmi, InterpreterAssembler) {
Goto(&end);
}
Bind(&end);
BIND(&end);
{
SetAccumulator(var_result.value());
Dispatch();
......@@ -1172,7 +1172,7 @@ class InterpreterBitwiseBinaryOpAssembler : public InterpreterAssembler {
AbortIfWordNotEqual(result_map, HeapNumberMapConstant(),
kExpectedHeapNumber);
Goto(&ok);
Bind(&ok);
BIND(&ok);
}
Node* input_feedback =
......@@ -1422,21 +1422,21 @@ IGNITION_HANDLER(ToNumber, InterpreterAssembler) {
Node* object_map = LoadMap(object);
Branch(IsHeapNumberMap(object_map), &if_objectisnumber, &if_objectisother);
Bind(&if_objectissmi);
BIND(&if_objectissmi);
{
var_result.Bind(object);
var_type_feedback.Bind(SmiConstant(BinaryOperationFeedback::kSignedSmall));
Goto(&if_done);
}
Bind(&if_objectisnumber);
BIND(&if_objectisnumber);
{
var_result.Bind(object);
var_type_feedback.Bind(SmiConstant(BinaryOperationFeedback::kNumber));
Goto(&if_done);
}
Bind(&if_objectisother);
BIND(&if_objectisother);
{
// Convert the {object} to a Number.
Callable callable = CodeFactory::NonNumberToNumber(isolate());
......@@ -1445,7 +1445,7 @@ IGNITION_HANDLER(ToNumber, InterpreterAssembler) {
Goto(&if_done);
}
Bind(&if_done);
BIND(&if_done);
StoreRegister(var_result.value(), BytecodeOperandReg(0));
// Record the type feedback collected for {object}.
......@@ -1495,14 +1495,14 @@ IGNITION_HANDLER(Inc, InterpreterAssembler) {
value_var.Bind(value);
var_type_feedback.Bind(SmiConstant(BinaryOperationFeedback::kNone));
Goto(&start);
Bind(&start);
BIND(&start);
{
value = value_var.value();
Label if_issmi(this), if_isnotsmi(this);
Branch(TaggedIsSmi(value), &if_issmi, &if_isnotsmi);
Bind(&if_issmi);
BIND(&if_issmi);
{
// Try fast Smi addition first.
Node* one = SmiConstant(Smi::FromInt(1));
......@@ -1514,35 +1514,35 @@ IGNITION_HANDLER(Inc, InterpreterAssembler) {
Label if_overflow(this), if_notoverflow(this);
Branch(overflow, &if_overflow, &if_notoverflow);
Bind(&if_notoverflow);
BIND(&if_notoverflow);
var_type_feedback.Bind(
SmiOr(var_type_feedback.value(),
SmiConstant(BinaryOperationFeedback::kSignedSmall)));
result_var.Bind(BitcastWordToTaggedSigned(Projection(0, pair)));
Goto(&end);
Bind(&if_overflow);
BIND(&if_overflow);
{
var_finc_value.Bind(SmiToFloat64(value));
Goto(&do_finc);
}
}
Bind(&if_isnotsmi);
BIND(&if_isnotsmi);
{
// Check if the value is a HeapNumber.
Label if_valueisnumber(this), if_valuenotnumber(this, Label::kDeferred);
Node* value_map = LoadMap(value);
Branch(IsHeapNumberMap(value_map), &if_valueisnumber, &if_valuenotnumber);
Bind(&if_valueisnumber);
BIND(&if_valueisnumber);
{
// Load the HeapNumber value.
var_finc_value.Bind(LoadHeapNumberValue(value));
Goto(&do_finc);
}
Bind(&if_valuenotnumber);
BIND(&if_valuenotnumber);
{
// We do not require an Or with earlier feedback here because once we
// convert the value to a number, we cannot reach this path. We can
......@@ -1556,7 +1556,7 @@ IGNITION_HANDLER(Inc, InterpreterAssembler) {
Word32Equal(instance_type, Int32Constant(ODDBALL_TYPE));
Branch(is_oddball, &if_valueisoddball, &if_valuenotoddball);
Bind(&if_valueisoddball);
BIND(&if_valueisoddball);
{
// Convert Oddball to Number and check again.
value_var.Bind(LoadObjectField(value, Oddball::kToNumberOffset));
......@@ -1565,7 +1565,7 @@ IGNITION_HANDLER(Inc, InterpreterAssembler) {
Goto(&start);
}
Bind(&if_valuenotoddball);
BIND(&if_valuenotoddball);
{
// Convert to a Number first and try again.
Callable callable = CodeFactory::NonNumberToNumber(isolate());
......@@ -1577,7 +1577,7 @@ IGNITION_HANDLER(Inc, InterpreterAssembler) {
}
}
Bind(&do_finc);
BIND(&do_finc);
{
Node* finc_value = var_finc_value.value();
Node* one = Float64Constant(1.0);
......@@ -1589,7 +1589,7 @@ IGNITION_HANDLER(Inc, InterpreterAssembler) {
Goto(&end);
}
Bind(&end);
BIND(&end);
UpdateFeedback(var_type_feedback.value(), feedback_vector, slot_index);
SetAccumulator(result_var.value());
......@@ -1622,14 +1622,14 @@ IGNITION_HANDLER(Dec, InterpreterAssembler) {
var_type_feedback.Bind(SmiConstant(BinaryOperationFeedback::kNone));
value_var.Bind(value);
Goto(&start);
Bind(&start);
BIND(&start);
{
value = value_var.value();
Label if_issmi(this), if_isnotsmi(this);
Branch(TaggedIsSmi(value), &if_issmi, &if_isnotsmi);
Bind(&if_issmi);
BIND(&if_issmi);
{
// Try fast Smi subtraction first.
Node* one = SmiConstant(Smi::FromInt(1));
......@@ -1641,35 +1641,35 @@ IGNITION_HANDLER(Dec, InterpreterAssembler) {
Label if_overflow(this), if_notoverflow(this);
Branch(overflow, &if_overflow, &if_notoverflow);
Bind(&if_notoverflow);
BIND(&if_notoverflow);
var_type_feedback.Bind(
SmiOr(var_type_feedback.value(),
SmiConstant(BinaryOperationFeedback::kSignedSmall)));
result_var.Bind(BitcastWordToTaggedSigned(Projection(0, pair)));
Goto(&end);
Bind(&if_overflow);
BIND(&if_overflow);
{
var_fdec_value.Bind(SmiToFloat64(value));
Goto(&do_fdec);
}
}
Bind(&if_isnotsmi);
BIND(&if_isnotsmi);
{
// Check if the value is a HeapNumber.
Label if_valueisnumber(this), if_valuenotnumber(this, Label::kDeferred);
Node* value_map = LoadMap(value);
Branch(IsHeapNumberMap(value_map), &if_valueisnumber, &if_valuenotnumber);
Bind(&if_valueisnumber);
BIND(&if_valueisnumber);
{
// Load the HeapNumber value.
var_fdec_value.Bind(LoadHeapNumberValue(value));
Goto(&do_fdec);
}
Bind(&if_valuenotnumber);
BIND(&if_valuenotnumber);
{
// We do not require an Or with earlier feedback here because once we
// convert the value to a number, we cannot reach this path. We can
......@@ -1683,7 +1683,7 @@ IGNITION_HANDLER(Dec, InterpreterAssembler) {
Word32Equal(instance_type, Int32Constant(ODDBALL_TYPE));
Branch(is_oddball, &if_valueisoddball, &if_valuenotoddball);
Bind(&if_valueisoddball);
BIND(&if_valueisoddball);
{
// Convert Oddball to Number and check again.
value_var.Bind(LoadObjectField(value, Oddball::kToNumberOffset));
......@@ -1692,7 +1692,7 @@ IGNITION_HANDLER(Dec, InterpreterAssembler) {
Goto(&start);
}
Bind(&if_valuenotoddball);
BIND(&if_valuenotoddball);
{
// Convert to a Number first and try again.
Callable callable = CodeFactory::NonNumberToNumber(isolate());
......@@ -1704,7 +1704,7 @@ IGNITION_HANDLER(Dec, InterpreterAssembler) {
}
}
Bind(&do_fdec);
BIND(&do_fdec);
{
Node* fdec_value = var_fdec_value.value();
Node* one = Float64Constant(1.0);
......@@ -1716,7 +1716,7 @@ IGNITION_HANDLER(Dec, InterpreterAssembler) {
Goto(&end);
}
Bind(&end);
BIND(&end);
UpdateFeedback(var_type_feedback.value(), feedback_vector, slot_index);
SetAccumulator(result_var.value());
......@@ -1735,17 +1735,17 @@ IGNITION_HANDLER(ToBooleanLogicalNot, InterpreterAssembler) {
Node* true_value = BooleanConstant(true);
Node* false_value = BooleanConstant(false);
BranchIfToBooleanIsTrue(value, &if_true, &if_false);
Bind(&if_true);
BIND(&if_true);
{
result.Bind(false_value);
Goto(&end);
}
Bind(&if_false);
BIND(&if_false);
{
result.Bind(true_value);
Goto(&end);
}
Bind(&end);
BIND(&end);
SetAccumulator(result.value());
Dispatch();
}
......@@ -1761,12 +1761,12 @@ IGNITION_HANDLER(LogicalNot, InterpreterAssembler) {
Node* true_value = BooleanConstant(true);
Node* false_value = BooleanConstant(false);
Branch(WordEqual(value, true_value), &if_true, &if_false);
Bind(&if_true);
BIND(&if_true);
{
result.Bind(false_value);
Goto(&end);
}
Bind(&if_false);
BIND(&if_false);
{
if (FLAG_debug_code) {
AbortIfWordNotEqual(value, false_value,
......@@ -1775,7 +1775,7 @@ IGNITION_HANDLER(LogicalNot, InterpreterAssembler) {
result.Bind(true_value);
Goto(&end);
}
Bind(&end);
BIND(&end);
SetAccumulator(result.value());
Dispatch();
}
......@@ -2271,7 +2271,7 @@ IGNITION_HANDLER(TestUndetectable, InterpreterAssembler) {
SetAccumulator(result);
Goto(&end);
Bind(&end);
BIND(&end);
Dispatch();
}
......@@ -2322,37 +2322,37 @@ IGNITION_HANDLER(TestTypeOf, InterpreterAssembler) {
Switch(literal_flag, &abort, cases, labels, arraysize(cases));
Bind(&abort);
BIND(&abort);
{
Comment("Abort");
Abort(BailoutReason::kUnexpectedTestTypeofLiteralFlag);
Goto(&if_false);
}
Bind(&if_number);
BIND(&if_number);
{
Comment("IfNumber");
GotoIfNumber(object, &if_true);
Goto(&if_false);
}
Bind(&if_string);
BIND(&if_string);
{
Comment("IfString");
GotoIf(TaggedIsSmi(object), &if_false);
Branch(IsString(object), &if_true, &if_false);
}
Bind(&if_symbol);
BIND(&if_symbol);
{
Comment("IfSymbol");
GotoIf(TaggedIsSmi(object), &if_false);
Branch(IsSymbol(object), &if_true, &if_false);
}
Bind(&if_boolean);
BIND(&if_boolean);
{
Comment("IfBoolean");
GotoIf(WordEqual(object, BooleanConstant(true)), &if_true);
Branch(WordEqual(object, BooleanConstant(false)), &if_true, &if_false);
}
Bind(&if_undefined);
BIND(&if_undefined);
{
Comment("IfUndefined");
GotoIf(TaggedIsSmi(object), &if_false);
......@@ -2364,7 +2364,7 @@ IGNITION_HANDLER(TestTypeOf, InterpreterAssembler) {
Branch(Word32Equal(undetectable_bit, Int32Constant(0)), &if_false,
&if_true);
}
Bind(&if_function);
BIND(&if_function);
{
Comment("IfFunction");
GotoIf(TaggedIsSmi(object), &if_false);
......@@ -2377,7 +2377,7 @@ IGNITION_HANDLER(TestTypeOf, InterpreterAssembler) {
Int32Constant(1 << Map::kIsCallable)),
&if_true, &if_false);
}
Bind(&if_object);
BIND(&if_object);
{
Comment("IfObject");
GotoIf(TaggedIsSmi(object), &if_false);
......@@ -2395,23 +2395,23 @@ IGNITION_HANDLER(TestTypeOf, InterpreterAssembler) {
Branch(Word32Equal(callable_undetectable, Int32Constant(0)), &if_true,
&if_false);
}
Bind(&if_other);
BIND(&if_other);
{
// Typeof doesn't return any other string value.
Goto(&if_false);
}
Bind(&if_false);
BIND(&if_false);
{
SetAccumulator(BooleanConstant(false));
Goto(&end);
}
Bind(&if_true);
BIND(&if_true);
{
SetAccumulator(BooleanConstant(true));
Goto(&end);
}
Bind(&end);
BIND(&end);
Dispatch();
}
......@@ -2500,9 +2500,9 @@ IGNITION_HANDLER(JumpIfToBooleanTrue, InterpreterAssembler) {
Node* relative_jump = BytecodeOperandUImmWord(0);
Label if_true(this), if_false(this);
BranchIfToBooleanIsTrue(value, &if_true, &if_false);
Bind(&if_true);
BIND(&if_true);
Jump(relative_jump);
Bind(&if_false);
BIND(&if_false);
Dispatch();
}
......@@ -2517,9 +2517,9 @@ IGNITION_HANDLER(JumpIfToBooleanTrueConstant, InterpreterAssembler) {
Node* relative_jump = LoadAndUntagConstantPoolEntry(index);
Label if_true(this), if_false(this);
BranchIfToBooleanIsTrue(value, &if_true, &if_false);
Bind(&if_true);
BIND(&if_true);
Jump(relative_jump);
Bind(&if_false);
BIND(&if_false);
Dispatch();
}
......@@ -2532,9 +2532,9 @@ IGNITION_HANDLER(JumpIfToBooleanFalse, InterpreterAssembler) {
Node* relative_jump = BytecodeOperandUImmWord(0);
Label if_true(this), if_false(this);
BranchIfToBooleanIsTrue(value, &if_true, &if_false);
Bind(&if_true);
BIND(&if_true);
Dispatch();
Bind(&if_false);
BIND(&if_false);
Jump(relative_jump);
}
......@@ -2549,9 +2549,9 @@ IGNITION_HANDLER(JumpIfToBooleanFalseConstant, InterpreterAssembler) {
Node* relative_jump = LoadAndUntagConstantPoolEntry(index);
Label if_true(this), if_false(this);
BranchIfToBooleanIsTrue(value, &if_true, &if_false);
Bind(&if_true);
BIND(&if_true);
Dispatch();
Bind(&if_false);
BIND(&if_false);
Jump(relative_jump);
}
......@@ -2659,12 +2659,12 @@ IGNITION_HANDLER(JumpIfJSReceiver, InterpreterAssembler) {
Label if_object(this), if_notobject(this, Label::kDeferred), if_notsmi(this);
Branch(TaggedIsSmi(accumulator), &if_notobject, &if_notsmi);
Bind(&if_notsmi);
BIND(&if_notsmi);
Branch(IsJSReceiver(accumulator), &if_object, &if_notobject);
Bind(&if_object);
BIND(&if_object);
Jump(relative_jump);
Bind(&if_notobject);
BIND(&if_notobject);
Dispatch();
}
......@@ -2680,13 +2680,13 @@ IGNITION_HANDLER(JumpIfJSReceiverConstant, InterpreterAssembler) {
Label if_object(this), if_notobject(this), if_notsmi(this);
Branch(TaggedIsSmi(accumulator), &if_notobject, &if_notsmi);
Bind(&if_notsmi);
BIND(&if_notsmi);
Branch(IsJSReceiver(accumulator), &if_object, &if_notobject);
Bind(&if_object);
BIND(&if_object);
Jump(relative_jump);
Bind(&if_notobject);
BIND(&if_notobject);
Dispatch();
}
......@@ -2729,10 +2729,10 @@ IGNITION_HANDLER(JumpLoop, InterpreterAssembler) {
Node* condition = Int32GreaterThanOrEqual(loop_depth, osr_level);
Branch(condition, &ok, &osr_armed);
Bind(&ok);
BIND(&ok);
JumpBackward(relative_jump);
Bind(&osr_armed);
BIND(&osr_armed);
{
Callable callable = CodeFactory::InterpreterOnStackReplacement(isolate());
Node* target = HeapConstant(callable.code());
......@@ -2769,7 +2769,7 @@ IGNITION_HANDLER(SwitchOnSmiNoFeedback, InterpreterAssembler) {
Node* relative_jump = LoadAndUntagConstantPoolEntry(entry);
Jump(relative_jump);
Bind(&fall_through);
BIND(&fall_through);
Dispatch();
}
......@@ -2806,7 +2806,7 @@ IGNITION_HANDLER(CreateArrayLiteral, InterpreterAssembler) {
IsSetWord32<CreateArrayLiteralFlags::FastShallowCloneBit>(bytecode_flags),
&fast_shallow_clone, &call_runtime);
Bind(&fast_shallow_clone);
BIND(&fast_shallow_clone);
{
ConstructorBuiltinsAssembler constructor_assembler(state());
Node* result = constructor_assembler.EmitFastCloneShallowArray(
......@@ -2815,7 +2815,7 @@ IGNITION_HANDLER(CreateArrayLiteral, InterpreterAssembler) {
Dispatch();
}
Bind(&call_runtime);
BIND(&call_runtime);
{
Node* flags_raw = DecodeWordFromWord32<CreateArrayLiteralFlags::FlagsBits>(
bytecode_flags);
......@@ -2844,7 +2844,7 @@ IGNITION_HANDLER(CreateObjectLiteral, InterpreterAssembler) {
bytecode_flags),
&if_fast_clone, &if_not_fast_clone);
Bind(&if_fast_clone);
BIND(&if_fast_clone);
{
// If we can do a fast clone do the fast-path in FastCloneShallowObjectStub.
ConstructorBuiltinsAssembler constructor_assembler(state());
......@@ -2854,7 +2854,7 @@ IGNITION_HANDLER(CreateObjectLiteral, InterpreterAssembler) {
Dispatch();
}
Bind(&if_not_fast_clone);
BIND(&if_not_fast_clone);
{
// If we can't do a fast clone, call into the runtime.
Node* index = BytecodeOperandIdx(0);
......@@ -2894,7 +2894,7 @@ IGNITION_HANDLER(CreateClosure, InterpreterAssembler) {
shared, feedback_vector, vector_index, context));
Dispatch();
Bind(&call_runtime);
BIND(&call_runtime);
{
Node* tenured_raw =
DecodeWordFromWord32<CreateClosureFlags::PretenuredBit>(flags);
......@@ -3008,7 +3008,7 @@ IGNITION_HANDLER(CreateMappedArguments, InterpreterAssembler) {
Node* compare = Word32And(compiler_hints, duplicate_parameters_bit);
Branch(compare, &if_duplicate_parameters, &if_not_duplicate_parameters);
Bind(&if_not_duplicate_parameters);
BIND(&if_not_duplicate_parameters);
{
ArgumentsBuiltinsAssembler constructor_assembler(state());
Node* result =
......@@ -3017,7 +3017,7 @@ IGNITION_HANDLER(CreateMappedArguments, InterpreterAssembler) {
Dispatch();
}
Bind(&if_duplicate_parameters);
BIND(&if_duplicate_parameters);
{
Node* result =
CallRuntime(Runtime::kNewSloppyArguments_Generic, context, closure);
......@@ -3060,10 +3060,10 @@ IGNITION_HANDLER(StackCheck, InterpreterAssembler) {
Node* interrupt = StackCheckTriggeredInterrupt();
Branch(interrupt, &stack_check_interrupt, &ok);
Bind(&ok);
BIND(&ok);
Dispatch();
Bind(&stack_check_interrupt);
BIND(&stack_check_interrupt);
{
Node* context = GetContext();
CallRuntime(Runtime::kStackGuard, context);
......@@ -3186,7 +3186,7 @@ IGNITION_HANDLER(ForInPrepare, InterpreterForInPrepareAssembler) {
cache_length);
Dispatch();
Bind(&call_runtime);
BIND(&call_runtime);
{
Node* result_triple =
CallRuntime(Runtime::kForInPrepare, context, receiver);
......@@ -3197,7 +3197,7 @@ IGNITION_HANDLER(ForInPrepare, InterpreterForInPrepareAssembler) {
cache_length);
Dispatch();
}
Bind(&nothing_to_iterate);
BIND(&nothing_to_iterate);
{
// Receiver is null or undefined or descriptors are zero length.
Node* zero = SmiConstant(0);
......@@ -3227,13 +3227,13 @@ IGNITION_HANDLER(ForInNext, InterpreterAssembler) {
Label if_fast(this), if_slow(this, Label::kDeferred);
Node* receiver_map = LoadMap(receiver);
Branch(WordEqual(receiver_map, cache_type), &if_fast, &if_slow);
Bind(&if_fast);
BIND(&if_fast);
{
// Enum cache in use for {receiver}, the {key} is definitely valid.
SetAccumulator(key);
Dispatch();
}
Bind(&if_slow);
BIND(&if_slow);
{
// Record the fact that we hit the for-in slow path.
Node* vector_index = BytecodeOperandIdx(3);
......@@ -3264,17 +3264,17 @@ IGNITION_HANDLER(ForInContinue, InterpreterAssembler) {
// Check if {index} is at {cache_length} already.
Label if_true(this), if_false(this), end(this);
Branch(WordEqual(index, cache_length), &if_true, &if_false);
Bind(&if_true);
BIND(&if_true);
{
SetAccumulator(BooleanConstant(false));
Goto(&end);
}
Bind(&if_false);
BIND(&if_false);
{
SetAccumulator(BooleanConstant(true));
Goto(&end);
}
Bind(&end);
BIND(&end);
Dispatch();
}
......@@ -3333,7 +3333,7 @@ IGNITION_HANDLER(SuspendGenerator, InterpreterAssembler) {
STATIC_ASSERT(LastStepAction == StepIn);
Node* step_next = Int32Constant(StepNext);
Branch(Int32LessThanOrEqual(step_next, step_action), &if_stepping, &ok);
Bind(&ok);
BIND(&ok);
Node* array =
LoadObjectField(generator, JSGeneratorObject::kRegisterFileOffset);
......@@ -3357,7 +3357,7 @@ IGNITION_HANDLER(SuspendGenerator, InterpreterAssembler) {
static_cast<int>(SuspendFlags::kAsyncGeneratorAwait))),
&if_asyncgeneratorawait, &if_notasyncgeneratorawait);
Bind(&if_notasyncgeneratorawait);
BIND(&if_notasyncgeneratorawait);
{
// For ordinary yields (and for AwaitExpressions in Async Functions, which
// are implemented as ordinary yields), it is safe to write over the
......@@ -3367,7 +3367,7 @@ IGNITION_HANDLER(SuspendGenerator, InterpreterAssembler) {
Goto(&merge);
}
Bind(&if_asyncgeneratorawait);
BIND(&if_asyncgeneratorawait);
{
// An AwaitExpression in an Async Generator requires writing to the
// [await_input_or_debug_pos] field.
......@@ -3378,10 +3378,10 @@ IGNITION_HANDLER(SuspendGenerator, InterpreterAssembler) {
Goto(&merge);
}
Bind(&merge);
BIND(&merge);
Dispatch();
Bind(&if_stepping);
BIND(&if_stepping);
{
Node* context = GetContext();
CallRuntime(Runtime::kDebugRecordGenerator, context, generator);
......
......@@ -89,7 +89,7 @@ Node* IntrinsicsGenerator::InvokeIntrinsic(Node* function_id, Node* context,
__ Switch(function_id, &abort, cases, labels, arraysize(cases));
#define HANDLE_CASE(name, lower_case, expected_arg_count) \
__ Bind(&lower_case); \
__ BIND(&lower_case); \
if (FLAG_debug_code && expected_arg_count >= 0) { \
AbortIfArgCountMismatch(expected_arg_count, arg_count); \
} \
......@@ -98,14 +98,14 @@ Node* IntrinsicsGenerator::InvokeIntrinsic(Node* function_id, Node* context,
INTRINSICS_LIST(HANDLE_CASE)
#undef HANDLE_CASE
__ Bind(&abort);
__ BIND(&abort);
{
__ Abort(BailoutReason::kUnexpectedFunctionIDForInvokeIntrinsic);
result.Bind(__ UndefinedConstant());
__ Goto(&end);
}
__ Bind(&end);
__ BIND(&end);
return result.value();
}
......@@ -133,19 +133,19 @@ Node* IntrinsicsGenerator::IsInstanceType(Node* input, int type) {
Node* condition = CompareInstanceType(arg, type, kInstanceTypeEqual);
__ Branch(condition, &return_true, &return_false);
__ Bind(&return_true);
__ BIND(&return_true);
{
return_value.Bind(__ BooleanConstant(true));
__ Goto(&end);
}
__ Bind(&return_false);
__ BIND(&return_false);
{
return_value.Bind(__ BooleanConstant(false));
__ Goto(&end);
}
__ Bind(&end);
__ BIND(&end);
return return_value.value();
}
......@@ -166,19 +166,19 @@ Node* IntrinsicsGenerator::IsJSReceiver(Node* input, Node* arg_count,
kInstanceTypeGreaterThanOrEqual);
__ Branch(condition, &return_true, &return_false);
__ Bind(&return_true);
__ BIND(&return_true);
{
return_value.Bind(__ BooleanConstant(true));
__ Goto(&end);
}
__ Bind(&return_false);
__ BIND(&return_false);
{
return_value.Bind(__ BooleanConstant(false));
__ Goto(&end);
}
__ Bind(&end);
__ BIND(&end);
return return_value.value();
}
......@@ -237,19 +237,19 @@ Node* IntrinsicsGenerator::IsSmi(Node* input, Node* arg_count, Node* context) {
Node* arg = __ LoadRegister(input);
__ Branch(__ TaggedIsSmi(arg), &if_smi, &if_not_smi);
__ Bind(&if_smi);
__ BIND(&if_smi);
{
return_value.Bind(__ BooleanConstant(true));
__ Goto(&end);
}
__ Bind(&if_not_smi);
__ BIND(&if_not_smi);
{
return_value.Bind(__ BooleanConstant(false));
__ Goto(&end);
}
__ Bind(&end);
__ BIND(&end);
return return_value.value();
}
......@@ -335,7 +335,7 @@ Node* IntrinsicsGenerator::Call(Node* args_reg, Node* arg_count,
__ GotoIfNot(comparison, &arg_count_positive);
__ Abort(kWrongArgumentCountForInvokeIntrinsic);
__ Goto(&arg_count_positive);
__ Bind(&arg_count_positive);
__ BIND(&arg_count_positive);
}
Node* result = __ CallJS(function, context, receiver_arg, target_args_count,
......@@ -374,7 +374,7 @@ Node* IntrinsicsGenerator::CreateAsyncFromSyncIterator(Node* args_reg,
return_value.Bind(iterator);
__ Goto(&done);
__ Bind(&not_receiver);
__ BIND(&not_receiver);
{
return_value.Bind(
__ CallRuntime(Runtime::kThrowSymbolIteratorInvalid, context));
......@@ -383,7 +383,7 @@ Node* IntrinsicsGenerator::CreateAsyncFromSyncIterator(Node* args_reg,
__ Goto(&done);
}
__ Bind(&done);
__ BIND(&done);
return return_value.value();
}
......@@ -452,7 +452,7 @@ void IntrinsicsGenerator::AbortIfArgCountMismatch(int expected, Node* actual) {
__ GotoIf(comparison, &match);
__ Abort(kWrongArgumentCountForInvokeIntrinsic);
__ Goto(&match);
__ Bind(&match);
__ BIND(&match);
}
} // namespace interpreter
......
......@@ -140,18 +140,18 @@ TEST(TryProbeStubCache) {
m.TryProbeStubCache(&stub_cache, receiver, name, &if_handler, &var_handler,
&if_miss);
m.Bind(&if_handler);
m.BIND(&if_handler);
m.Branch(m.WordEqual(expected_handler, var_handler.value()), &passed,
&failed);
m.Bind(&if_miss);
m.BIND(&if_miss);
m.Branch(m.WordEqual(expected_handler, m.IntPtrConstant(0)), &passed,
&failed);
m.Bind(&passed);
m.BIND(&passed);
m.Return(m.BooleanConstant(true));
m.Bind(&failed);
m.BIND(&failed);
m.Return(m.BooleanConstant(false));
}
......
......@@ -351,29 +351,29 @@ TEST(TryToName) {
m.TryToName(key, &if_keyisindex, &var_index, &if_keyisunique, &var_unique,
&if_bailout);
m.Bind(&if_keyisindex);
m.BIND(&if_keyisindex);
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.BIND(&if_keyisunique);
m.GotoIfNot(m.WordEqual(expected_result,
m.SmiConstant(Smi::FromInt(kKeyIsUnique))),
&failed);
m.Branch(m.WordEqual(expected_arg, var_unique.value()), &passed, &failed);
}
m.Bind(&if_bailout);
m.BIND(&if_bailout);
m.Branch(
m.WordEqual(expected_result, m.SmiConstant(Smi::FromInt(kBailout))),
&passed, &failed);
m.Bind(&passed);
m.BIND(&passed);
m.Return(m.BooleanConstant(true));
m.Bind(&failed);
m.BIND(&failed);
m.Return(m.BooleanConstant(false));
}
......@@ -535,22 +535,22 @@ void TestNameDictionaryLookup() {
m.NameDictionaryLookup<Dictionary>(dictionary, unique_name, &if_found,
&var_name_index, &if_not_found);
m.Bind(&if_found);
m.BIND(&if_found);
m.GotoIfNot(
m.WordEqual(expected_result, m.SmiConstant(Smi::FromInt(kFound))),
&failed);
m.Branch(m.WordEqual(m.SmiUntag(expected_arg), var_name_index.value()),
&passed, &failed);
m.Bind(&if_not_found);
m.BIND(&if_not_found);
m.Branch(
m.WordEqual(expected_result, m.SmiConstant(Smi::FromInt(kNotFound))),
&passed, &failed);
m.Bind(&passed);
m.BIND(&passed);
m.Return(m.BooleanConstant(true));
m.Bind(&failed);
m.BIND(&failed);
m.Return(m.BooleanConstant(false));
}
......@@ -642,22 +642,22 @@ void TestNumberDictionaryLookup() {
m.NumberDictionaryLookup<Dictionary>(dictionary, key, &if_found, &var_entry,
&if_not_found);
m.Bind(&if_found);
m.BIND(&if_found);
m.GotoIfNot(
m.WordEqual(expected_result, m.SmiConstant(Smi::FromInt(kFound))),
&failed);
m.Branch(m.WordEqual(m.SmiUntag(expected_arg), var_entry.value()), &passed,
&failed);
m.Bind(&if_not_found);
m.BIND(&if_not_found);
m.Branch(
m.WordEqual(expected_result, m.SmiConstant(Smi::FromInt(kNotFound))),
&passed, &failed);
m.Bind(&passed);
m.BIND(&passed);
m.Return(m.BooleanConstant(true));
m.Bind(&failed);
m.BIND(&failed);
m.Return(m.BooleanConstant(false));
}
......@@ -782,24 +782,24 @@ TEST(TryHasOwnProperty) {
m.TryHasOwnProperty(object, map, instance_type, unique_name, &if_found,
&if_not_found, &if_bailout);
m.Bind(&if_found);
m.BIND(&if_found);
m.Branch(m.WordEqual(expected_result, m.SmiConstant(Smi::FromInt(kFound))),
&passed, &failed);
m.Bind(&if_not_found);
m.BIND(&if_not_found);
m.Branch(
m.WordEqual(expected_result, m.SmiConstant(Smi::FromInt(kNotFound))),
&passed, &failed);
m.Bind(&if_bailout);
m.BIND(&if_bailout);
m.Branch(
m.WordEqual(expected_result, m.SmiConstant(Smi::FromInt(kBailout))),
&passed, &failed);
m.Bind(&passed);
m.BIND(&passed);
m.Return(m.BooleanConstant(true));
m.Bind(&failed);
m.BIND(&failed);
m.Return(m.BooleanConstant(false));
}
......@@ -971,13 +971,13 @@ TEST(TryGetOwnProperty) {
unique_name, &if_found, &var_value, &if_not_found,
&if_bailout);
m.Bind(&if_found);
m.BIND(&if_found);
m.Return(var_value.value());
m.Bind(&if_not_found);
m.BIND(&if_not_found);
m.Return(m.HeapConstant(not_found_symbol));
m.Bind(&if_bailout);
m.BIND(&if_bailout);
m.Return(m.HeapConstant(bailout_symbol));
}
......@@ -1186,28 +1186,28 @@ TEST(TryLookupElement) {
m.TryLookupElement(object, map, instance_type, index, &if_found, &if_absent,
&if_not_found, &if_bailout);
m.Bind(&if_found);
m.BIND(&if_found);
m.Branch(m.WordEqual(expected_result, m.SmiConstant(Smi::FromInt(kFound))),
&passed, &failed);
m.Bind(&if_absent);
m.BIND(&if_absent);
m.Branch(m.WordEqual(expected_result, m.SmiConstant(Smi::FromInt(kAbsent))),
&passed, &failed);
m.Bind(&if_not_found);
m.BIND(&if_not_found);
m.Branch(
m.WordEqual(expected_result, m.SmiConstant(Smi::FromInt(kNotFound))),
&passed, &failed);
m.Bind(&if_bailout);
m.BIND(&if_bailout);
m.Branch(
m.WordEqual(expected_result, m.SmiConstant(Smi::FromInt(kBailout))),
&passed, &failed);
m.Bind(&passed);
m.BIND(&passed);
m.Return(m.BooleanConstant(true));
m.Bind(&failed);
m.BIND(&failed);
m.Return(m.BooleanConstant(false));
}
......@@ -1757,9 +1757,9 @@ TEST(IsDebugActive) {
CodeAssemblerLabel if_active(&m), if_not_active(&m);
m.Branch(m.IsDebugActive(), &if_active, &if_not_active);
m.Bind(&if_active);
m.BIND(&if_active);
m.Return(m.TrueConstant());
m.Bind(&if_not_active);
m.BIND(&if_not_active);
m.Return(m.FalseConstant());
Handle<Code> code = data.GenerateCode();
......@@ -1811,7 +1811,7 @@ class AppendJSArrayCodeStubAssembler : public CodeStubAssembler {
arg_index, &bailout);
Return(length);
Bind(&bailout);
BIND(&bailout);
Return(SmiTag(IntPtrAdd(arg_index.value(), IntPtrConstant(2))));
Handle<Code> code = tester->GenerateCode();
......@@ -2486,7 +2486,7 @@ TEST(DirectMemoryTest8BitWord32Immediate) {
m.Return(m.SmiConstant(1));
m.Bind(&bad);
m.BIND(&bad);
m.Return(m.SmiConstant(0));
Handle<Code> code = data.GenerateCode();
......@@ -2523,7 +2523,7 @@ TEST(DirectMemoryTest16BitWord32Immediate) {
m.Return(m.SmiConstant(1));
m.Bind(&bad);
m.BIND(&bad);
m.Return(m.SmiConstant(0));
Handle<Code> code = data.GenerateCode();
......@@ -2572,7 +2572,7 @@ TEST(DirectMemoryTest8BitWord32) {
m.Return(m.SmiConstant(1));
m.Bind(&bad);
m.BIND(&bad);
m.Return(m.SmiConstant(0));
Handle<Code> code = data.GenerateCode();
......@@ -2635,7 +2635,7 @@ TEST(DirectMemoryTest16BitWord32) {
m.Return(m.SmiConstant(1));
m.Bind(&bad);
m.BIND(&bad);
m.Return(m.SmiConstant(0));
Handle<Code> code = data.GenerateCode();
......
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