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) { ...@@ -885,7 +885,7 @@ TF_BUILTIN(FastArrayPop, CodeStubAssembler) {
} }
args.PopAndReturn(AllocateHeapNumberWithValue(value)); args.PopAndReturn(AllocateHeapNumberWithValue(value));
Bind(&fast_elements); BIND(&fast_elements);
{ {
Node* value = LoadFixedArrayElement(elements, new_length); Node* value = LoadFixedArrayElement(elements, new_length);
StoreFixedArrayElement(elements, new_length, TheHoleConstant()); StoreFixedArrayElement(elements, new_length, TheHoleConstant());
...@@ -1136,7 +1136,7 @@ TF_BUILTIN(FastArrayShift, CodeStubAssembler) { ...@@ -1136,7 +1136,7 @@ TF_BUILTIN(FastArrayShift, CodeStubAssembler) {
} }
args.PopAndReturn(AllocateHeapNumberWithValue(value)); args.PopAndReturn(AllocateHeapNumberWithValue(value));
Bind(&fast_elements_tagged); BIND(&fast_elements_tagged);
{ {
Node* value = LoadFixedArrayElement(elements, 0); Node* value = LoadFixedArrayElement(elements, 0);
BuildFastLoop(IntPtrConstant(0), new_length, BuildFastLoop(IntPtrConstant(0), new_length,
...@@ -1153,7 +1153,7 @@ TF_BUILTIN(FastArrayShift, CodeStubAssembler) { ...@@ -1153,7 +1153,7 @@ TF_BUILTIN(FastArrayShift, CodeStubAssembler) {
args.PopAndReturn(value); args.PopAndReturn(value);
} }
Bind(&fast_elements_untagged); BIND(&fast_elements_untagged);
{ {
Node* value = LoadFixedArrayElement(elements, 0); Node* value = LoadFixedArrayElement(elements, 0);
Node* memmove = Node* memmove =
......
...@@ -469,36 +469,36 @@ void SharedArrayBufferBuiltinsAssembler::AtomicBinopBuiltinCommon( ...@@ -469,36 +469,36 @@ void SharedArrayBufferBuiltinsAssembler::AtomicBinopBuiltinCommon(
Switch(instance_type, &other, case_values, case_labels, Switch(instance_type, &other, case_values, case_labels,
arraysize(case_labels)); arraysize(case_labels));
Bind(&i8); BIND(&i8);
Return(SmiFromWord32((this->*function)(MachineType::Int8(), backing_store, Return(SmiFromWord32((this->*function)(MachineType::Int8(), backing_store,
index_word, value_word32))); index_word, value_word32)));
Bind(&u8); BIND(&u8);
Return(SmiFromWord32((this->*function)(MachineType::Uint8(), backing_store, Return(SmiFromWord32((this->*function)(MachineType::Uint8(), backing_store,
index_word, value_word32))); index_word, value_word32)));
Bind(&i16); BIND(&i16);
Return( Return(
SmiFromWord32((this->*function)(MachineType::Int16(), backing_store, SmiFromWord32((this->*function)(MachineType::Int16(), backing_store,
WordShl(index_word, 1), value_word32))); WordShl(index_word, 1), value_word32)));
Bind(&u16); BIND(&u16);
Return( Return(
SmiFromWord32((this->*function)(MachineType::Uint16(), backing_store, SmiFromWord32((this->*function)(MachineType::Uint16(), backing_store,
WordShl(index_word, 1), value_word32))); WordShl(index_word, 1), value_word32)));
Bind(&i32); BIND(&i32);
Return(ChangeInt32ToTagged( Return(ChangeInt32ToTagged(
(this->*function)(MachineType::Int32(), backing_store, (this->*function)(MachineType::Int32(), backing_store,
WordShl(index_word, 2), value_word32))); WordShl(index_word, 2), value_word32)));
Bind(&u32); BIND(&u32);
Return(ChangeUint32ToTagged( Return(ChangeUint32ToTagged(
(this->*function)(MachineType::Uint32(), backing_store, (this->*function)(MachineType::Uint32(), backing_store,
WordShl(index_word, 2), value_word32))); WordShl(index_word, 2), value_word32)));
// This shouldn't happen, we've already validated the type. // This shouldn't happen, we've already validated the type.
Bind(&other); BIND(&other);
Unreachable(); Unreachable();
#endif // V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64 || V8_TARGET_ARCH_PPC64 #endif // V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64 || V8_TARGET_ARCH_PPC64
// || V8_TARGET_ARCH_PPC || V8_TARGET_ARCH_S390 || V8_TARGET_ARCH_S390X // || V8_TARGET_ARCH_PPC || V8_TARGET_ARCH_S390 || V8_TARGET_ARCH_S390X
......
This diff is collapsed.
...@@ -77,7 +77,6 @@ class V8_EXPORT_PRIVATE CodeStubAssembler : public compiler::CodeAssembler { ...@@ -77,7 +77,6 @@ class V8_EXPORT_PRIVATE CodeStubAssembler : public compiler::CodeAssembler {
typedef base::Flags<AllocationFlag> AllocationFlags; typedef base::Flags<AllocationFlag> AllocationFlags;
enum ParameterMode { SMI_PARAMETERS, INTPTR_PARAMETERS }; enum ParameterMode { SMI_PARAMETERS, INTPTR_PARAMETERS };
// On 32-bit platforms, there is a slight performance advantage to doing all // 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 // 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 // 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 { ...@@ -302,6 +301,12 @@ class V8_EXPORT_PRIVATE CodeStubAssembler : public compiler::CodeAssembler {
Node* WordIsWordAligned(Node* word); Node* WordIsWordAligned(Node* word);
Node* WordIsPowerOfTwo(Node* value); 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) { void BranchIfSmiEqual(Node* a, Node* b, Label* if_true, Label* if_false) {
Branch(SmiEqual(a, b), if_true, if_false); Branch(SmiEqual(a, b), if_true, if_false);
} }
...@@ -1498,6 +1503,13 @@ class V8_EXPORT_PRIVATE CodeStubAssembler : public compiler::CodeAssembler { ...@@ -1498,6 +1503,13 @@ class V8_EXPORT_PRIVATE CodeStubAssembler : public compiler::CodeAssembler {
// Implements DescriptorArray::GetKey. // Implements DescriptorArray::GetKey.
Node* DescriptorArrayGetKey(Node* descriptors, Node* descriptor_number); 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; static const int kElementLoopUnrollThreshold = 8;
}; };
...@@ -1622,13 +1634,16 @@ class ToDirectStringAssembler : public CodeStubAssembler { ...@@ -1622,13 +1634,16 @@ class ToDirectStringAssembler : public CodeStubAssembler {
#define CSA_ASSERT_JS_ARGC_EQ(csa, expected) \ #define CSA_ASSERT_JS_ARGC_EQ(csa, expected) \
CSA_ASSERT_JS_ARGC_OP(csa, Word32Equal, ==, 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, ...) \ #define VARIABLE(name, ...) \
Variable name(this, {#name, __FILE__, __LINE__}, __VA_ARGS__); Variable name(this CSA_DEBUG_INFO(name), __VA_ARGS__);
#else // DEBUG #else // DEBUG
#define CSA_ASSERT(csa, x) ((void)0) #define CSA_ASSERT(csa, x) ((void)0)
#define CSA_ASSERT_JS_ARGC_EQ(csa, expected) ((void)0) #define CSA_ASSERT_JS_ARGC_EQ(csa, expected) ((void)0)
#define CSA_DEBUG_INFO(name)
#define BIND(label) Bind(label); #define BIND(label) Bind(label);
#define VARIABLE(name, ...) Variable name(this, __VA_ARGS__); #define VARIABLE(name, ...) Variable name(this, __VA_ARGS__);
#endif // DEBUG #endif // DEBUG
......
This diff is collapsed.
This diff is collapsed.
...@@ -89,7 +89,7 @@ Node* IntrinsicsGenerator::InvokeIntrinsic(Node* function_id, Node* context, ...@@ -89,7 +89,7 @@ Node* IntrinsicsGenerator::InvokeIntrinsic(Node* function_id, Node* context,
__ Switch(function_id, &abort, cases, labels, arraysize(cases)); __ Switch(function_id, &abort, cases, labels, arraysize(cases));
#define HANDLE_CASE(name, lower_case, expected_arg_count) \ #define HANDLE_CASE(name, lower_case, expected_arg_count) \
__ Bind(&lower_case); \ __ BIND(&lower_case); \
if (FLAG_debug_code && expected_arg_count >= 0) { \ if (FLAG_debug_code && expected_arg_count >= 0) { \
AbortIfArgCountMismatch(expected_arg_count, arg_count); \ AbortIfArgCountMismatch(expected_arg_count, arg_count); \
} \ } \
...@@ -98,14 +98,14 @@ Node* IntrinsicsGenerator::InvokeIntrinsic(Node* function_id, Node* context, ...@@ -98,14 +98,14 @@ Node* IntrinsicsGenerator::InvokeIntrinsic(Node* function_id, Node* context,
INTRINSICS_LIST(HANDLE_CASE) INTRINSICS_LIST(HANDLE_CASE)
#undef HANDLE_CASE #undef HANDLE_CASE
__ Bind(&abort); __ BIND(&abort);
{ {
__ Abort(BailoutReason::kUnexpectedFunctionIDForInvokeIntrinsic); __ Abort(BailoutReason::kUnexpectedFunctionIDForInvokeIntrinsic);
result.Bind(__ UndefinedConstant()); result.Bind(__ UndefinedConstant());
__ Goto(&end); __ Goto(&end);
} }
__ Bind(&end); __ BIND(&end);
return result.value(); return result.value();
} }
...@@ -133,19 +133,19 @@ Node* IntrinsicsGenerator::IsInstanceType(Node* input, int type) { ...@@ -133,19 +133,19 @@ Node* IntrinsicsGenerator::IsInstanceType(Node* input, int type) {
Node* condition = CompareInstanceType(arg, type, kInstanceTypeEqual); Node* condition = CompareInstanceType(arg, type, kInstanceTypeEqual);
__ Branch(condition, &return_true, &return_false); __ Branch(condition, &return_true, &return_false);
__ Bind(&return_true); __ BIND(&return_true);
{ {
return_value.Bind(__ BooleanConstant(true)); return_value.Bind(__ BooleanConstant(true));
__ Goto(&end); __ Goto(&end);
} }
__ Bind(&return_false); __ BIND(&return_false);
{ {
return_value.Bind(__ BooleanConstant(false)); return_value.Bind(__ BooleanConstant(false));
__ Goto(&end); __ Goto(&end);
} }
__ Bind(&end); __ BIND(&end);
return return_value.value(); return return_value.value();
} }
...@@ -166,19 +166,19 @@ Node* IntrinsicsGenerator::IsJSReceiver(Node* input, Node* arg_count, ...@@ -166,19 +166,19 @@ Node* IntrinsicsGenerator::IsJSReceiver(Node* input, Node* arg_count,
kInstanceTypeGreaterThanOrEqual); kInstanceTypeGreaterThanOrEqual);
__ Branch(condition, &return_true, &return_false); __ Branch(condition, &return_true, &return_false);
__ Bind(&return_true); __ BIND(&return_true);
{ {
return_value.Bind(__ BooleanConstant(true)); return_value.Bind(__ BooleanConstant(true));
__ Goto(&end); __ Goto(&end);
} }
__ Bind(&return_false); __ BIND(&return_false);
{ {
return_value.Bind(__ BooleanConstant(false)); return_value.Bind(__ BooleanConstant(false));
__ Goto(&end); __ Goto(&end);
} }
__ Bind(&end); __ BIND(&end);
return return_value.value(); return return_value.value();
} }
...@@ -237,19 +237,19 @@ Node* IntrinsicsGenerator::IsSmi(Node* input, Node* arg_count, Node* context) { ...@@ -237,19 +237,19 @@ Node* IntrinsicsGenerator::IsSmi(Node* input, Node* arg_count, Node* context) {
Node* arg = __ LoadRegister(input); Node* arg = __ LoadRegister(input);
__ Branch(__ TaggedIsSmi(arg), &if_smi, &if_not_smi); __ Branch(__ TaggedIsSmi(arg), &if_smi, &if_not_smi);
__ Bind(&if_smi); __ BIND(&if_smi);
{ {
return_value.Bind(__ BooleanConstant(true)); return_value.Bind(__ BooleanConstant(true));
__ Goto(&end); __ Goto(&end);
} }
__ Bind(&if_not_smi); __ BIND(&if_not_smi);
{ {
return_value.Bind(__ BooleanConstant(false)); return_value.Bind(__ BooleanConstant(false));
__ Goto(&end); __ Goto(&end);
} }
__ Bind(&end); __ BIND(&end);
return return_value.value(); return return_value.value();
} }
...@@ -335,7 +335,7 @@ Node* IntrinsicsGenerator::Call(Node* args_reg, Node* arg_count, ...@@ -335,7 +335,7 @@ Node* IntrinsicsGenerator::Call(Node* args_reg, Node* arg_count,
__ GotoIfNot(comparison, &arg_count_positive); __ GotoIfNot(comparison, &arg_count_positive);
__ Abort(kWrongArgumentCountForInvokeIntrinsic); __ Abort(kWrongArgumentCountForInvokeIntrinsic);
__ Goto(&arg_count_positive); __ Goto(&arg_count_positive);
__ Bind(&arg_count_positive); __ BIND(&arg_count_positive);
} }
Node* result = __ CallJS(function, context, receiver_arg, target_args_count, Node* result = __ CallJS(function, context, receiver_arg, target_args_count,
...@@ -374,7 +374,7 @@ Node* IntrinsicsGenerator::CreateAsyncFromSyncIterator(Node* args_reg, ...@@ -374,7 +374,7 @@ Node* IntrinsicsGenerator::CreateAsyncFromSyncIterator(Node* args_reg,
return_value.Bind(iterator); return_value.Bind(iterator);
__ Goto(&done); __ Goto(&done);
__ Bind(&not_receiver); __ BIND(&not_receiver);
{ {
return_value.Bind( return_value.Bind(
__ CallRuntime(Runtime::kThrowSymbolIteratorInvalid, context)); __ CallRuntime(Runtime::kThrowSymbolIteratorInvalid, context));
...@@ -383,7 +383,7 @@ Node* IntrinsicsGenerator::CreateAsyncFromSyncIterator(Node* args_reg, ...@@ -383,7 +383,7 @@ Node* IntrinsicsGenerator::CreateAsyncFromSyncIterator(Node* args_reg,
__ Goto(&done); __ Goto(&done);
} }
__ Bind(&done); __ BIND(&done);
return return_value.value(); return return_value.value();
} }
...@@ -452,7 +452,7 @@ void IntrinsicsGenerator::AbortIfArgCountMismatch(int expected, Node* actual) { ...@@ -452,7 +452,7 @@ void IntrinsicsGenerator::AbortIfArgCountMismatch(int expected, Node* actual) {
__ GotoIf(comparison, &match); __ GotoIf(comparison, &match);
__ Abort(kWrongArgumentCountForInvokeIntrinsic); __ Abort(kWrongArgumentCountForInvokeIntrinsic);
__ Goto(&match); __ Goto(&match);
__ Bind(&match); __ BIND(&match);
} }
} // namespace interpreter } // namespace interpreter
......
...@@ -140,18 +140,18 @@ TEST(TryProbeStubCache) { ...@@ -140,18 +140,18 @@ TEST(TryProbeStubCache) {
m.TryProbeStubCache(&stub_cache, receiver, name, &if_handler, &var_handler, m.TryProbeStubCache(&stub_cache, receiver, name, &if_handler, &var_handler,
&if_miss); &if_miss);
m.Bind(&if_handler); m.BIND(&if_handler);
m.Branch(m.WordEqual(expected_handler, var_handler.value()), &passed, m.Branch(m.WordEqual(expected_handler, var_handler.value()), &passed,
&failed); &failed);
m.Bind(&if_miss); m.BIND(&if_miss);
m.Branch(m.WordEqual(expected_handler, m.IntPtrConstant(0)), &passed, m.Branch(m.WordEqual(expected_handler, m.IntPtrConstant(0)), &passed,
&failed); &failed);
m.Bind(&passed); m.BIND(&passed);
m.Return(m.BooleanConstant(true)); m.Return(m.BooleanConstant(true));
m.Bind(&failed); m.BIND(&failed);
m.Return(m.BooleanConstant(false)); m.Return(m.BooleanConstant(false));
} }
......
...@@ -351,29 +351,29 @@ TEST(TryToName) { ...@@ -351,29 +351,29 @@ TEST(TryToName) {
m.TryToName(key, &if_keyisindex, &var_index, &if_keyisunique, &var_unique, m.TryToName(key, &if_keyisindex, &var_index, &if_keyisunique, &var_unique,
&if_bailout); &if_bailout);
m.Bind(&if_keyisindex); m.BIND(&if_keyisindex);
m.GotoIfNot(m.WordEqual(expected_result, m.GotoIfNot(m.WordEqual(expected_result,
m.SmiConstant(Smi::FromInt(kKeyIsIndex))), m.SmiConstant(Smi::FromInt(kKeyIsIndex))),
&failed); &failed);
m.Branch(m.WordEqual(m.SmiUntag(expected_arg), var_index.value()), m.Branch(m.WordEqual(m.SmiUntag(expected_arg), var_index.value()),
&passed, &failed); &passed, &failed);
m.Bind(&if_keyisunique); m.BIND(&if_keyisunique);
m.GotoIfNot(m.WordEqual(expected_result, m.GotoIfNot(m.WordEqual(expected_result,
m.SmiConstant(Smi::FromInt(kKeyIsUnique))), m.SmiConstant(Smi::FromInt(kKeyIsUnique))),
&failed); &failed);
m.Branch(m.WordEqual(expected_arg, var_unique.value()), &passed, &failed); m.Branch(m.WordEqual(expected_arg, var_unique.value()), &passed, &failed);
} }
m.Bind(&if_bailout); m.BIND(&if_bailout);
m.Branch( m.Branch(
m.WordEqual(expected_result, m.SmiConstant(Smi::FromInt(kBailout))), m.WordEqual(expected_result, m.SmiConstant(Smi::FromInt(kBailout))),
&passed, &failed); &passed, &failed);
m.Bind(&passed); m.BIND(&passed);
m.Return(m.BooleanConstant(true)); m.Return(m.BooleanConstant(true));
m.Bind(&failed); m.BIND(&failed);
m.Return(m.BooleanConstant(false)); m.Return(m.BooleanConstant(false));
} }
...@@ -535,22 +535,22 @@ void TestNameDictionaryLookup() { ...@@ -535,22 +535,22 @@ void TestNameDictionaryLookup() {
m.NameDictionaryLookup<Dictionary>(dictionary, unique_name, &if_found, m.NameDictionaryLookup<Dictionary>(dictionary, unique_name, &if_found,
&var_name_index, &if_not_found); &var_name_index, &if_not_found);
m.Bind(&if_found); m.BIND(&if_found);
m.GotoIfNot( m.GotoIfNot(
m.WordEqual(expected_result, m.SmiConstant(Smi::FromInt(kFound))), m.WordEqual(expected_result, m.SmiConstant(Smi::FromInt(kFound))),
&failed); &failed);
m.Branch(m.WordEqual(m.SmiUntag(expected_arg), var_name_index.value()), m.Branch(m.WordEqual(m.SmiUntag(expected_arg), var_name_index.value()),
&passed, &failed); &passed, &failed);
m.Bind(&if_not_found); m.BIND(&if_not_found);
m.Branch( m.Branch(
m.WordEqual(expected_result, m.SmiConstant(Smi::FromInt(kNotFound))), m.WordEqual(expected_result, m.SmiConstant(Smi::FromInt(kNotFound))),
&passed, &failed); &passed, &failed);
m.Bind(&passed); m.BIND(&passed);
m.Return(m.BooleanConstant(true)); m.Return(m.BooleanConstant(true));
m.Bind(&failed); m.BIND(&failed);
m.Return(m.BooleanConstant(false)); m.Return(m.BooleanConstant(false));
} }
...@@ -642,22 +642,22 @@ void TestNumberDictionaryLookup() { ...@@ -642,22 +642,22 @@ void TestNumberDictionaryLookup() {
m.NumberDictionaryLookup<Dictionary>(dictionary, key, &if_found, &var_entry, m.NumberDictionaryLookup<Dictionary>(dictionary, key, &if_found, &var_entry,
&if_not_found); &if_not_found);
m.Bind(&if_found); m.BIND(&if_found);
m.GotoIfNot( m.GotoIfNot(
m.WordEqual(expected_result, m.SmiConstant(Smi::FromInt(kFound))), m.WordEqual(expected_result, m.SmiConstant(Smi::FromInt(kFound))),
&failed); &failed);
m.Branch(m.WordEqual(m.SmiUntag(expected_arg), var_entry.value()), &passed, m.Branch(m.WordEqual(m.SmiUntag(expected_arg), var_entry.value()), &passed,
&failed); &failed);
m.Bind(&if_not_found); m.BIND(&if_not_found);
m.Branch( m.Branch(
m.WordEqual(expected_result, m.SmiConstant(Smi::FromInt(kNotFound))), m.WordEqual(expected_result, m.SmiConstant(Smi::FromInt(kNotFound))),
&passed, &failed); &passed, &failed);
m.Bind(&passed); m.BIND(&passed);
m.Return(m.BooleanConstant(true)); m.Return(m.BooleanConstant(true));
m.Bind(&failed); m.BIND(&failed);
m.Return(m.BooleanConstant(false)); m.Return(m.BooleanConstant(false));
} }
...@@ -782,24 +782,24 @@ TEST(TryHasOwnProperty) { ...@@ -782,24 +782,24 @@ TEST(TryHasOwnProperty) {
m.TryHasOwnProperty(object, map, instance_type, unique_name, &if_found, m.TryHasOwnProperty(object, map, instance_type, unique_name, &if_found,
&if_not_found, &if_bailout); &if_not_found, &if_bailout);
m.Bind(&if_found); m.BIND(&if_found);
m.Branch(m.WordEqual(expected_result, m.SmiConstant(Smi::FromInt(kFound))), m.Branch(m.WordEqual(expected_result, m.SmiConstant(Smi::FromInt(kFound))),
&passed, &failed); &passed, &failed);
m.Bind(&if_not_found); m.BIND(&if_not_found);
m.Branch( m.Branch(
m.WordEqual(expected_result, m.SmiConstant(Smi::FromInt(kNotFound))), m.WordEqual(expected_result, m.SmiConstant(Smi::FromInt(kNotFound))),
&passed, &failed); &passed, &failed);
m.Bind(&if_bailout); m.BIND(&if_bailout);
m.Branch( m.Branch(
m.WordEqual(expected_result, m.SmiConstant(Smi::FromInt(kBailout))), m.WordEqual(expected_result, m.SmiConstant(Smi::FromInt(kBailout))),
&passed, &failed); &passed, &failed);
m.Bind(&passed); m.BIND(&passed);
m.Return(m.BooleanConstant(true)); m.Return(m.BooleanConstant(true));
m.Bind(&failed); m.BIND(&failed);
m.Return(m.BooleanConstant(false)); m.Return(m.BooleanConstant(false));
} }
...@@ -971,13 +971,13 @@ TEST(TryGetOwnProperty) { ...@@ -971,13 +971,13 @@ TEST(TryGetOwnProperty) {
unique_name, &if_found, &var_value, &if_not_found, unique_name, &if_found, &var_value, &if_not_found,
&if_bailout); &if_bailout);
m.Bind(&if_found); m.BIND(&if_found);
m.Return(var_value.value()); m.Return(var_value.value());
m.Bind(&if_not_found); m.BIND(&if_not_found);
m.Return(m.HeapConstant(not_found_symbol)); m.Return(m.HeapConstant(not_found_symbol));
m.Bind(&if_bailout); m.BIND(&if_bailout);
m.Return(m.HeapConstant(bailout_symbol)); m.Return(m.HeapConstant(bailout_symbol));
} }
...@@ -1186,28 +1186,28 @@ TEST(TryLookupElement) { ...@@ -1186,28 +1186,28 @@ TEST(TryLookupElement) {
m.TryLookupElement(object, map, instance_type, index, &if_found, &if_absent, m.TryLookupElement(object, map, instance_type, index, &if_found, &if_absent,
&if_not_found, &if_bailout); &if_not_found, &if_bailout);
m.Bind(&if_found); m.BIND(&if_found);
m.Branch(m.WordEqual(expected_result, m.SmiConstant(Smi::FromInt(kFound))), m.Branch(m.WordEqual(expected_result, m.SmiConstant(Smi::FromInt(kFound))),
&passed, &failed); &passed, &failed);
m.Bind(&if_absent); m.BIND(&if_absent);
m.Branch(m.WordEqual(expected_result, m.SmiConstant(Smi::FromInt(kAbsent))), m.Branch(m.WordEqual(expected_result, m.SmiConstant(Smi::FromInt(kAbsent))),
&passed, &failed); &passed, &failed);
m.Bind(&if_not_found); m.BIND(&if_not_found);
m.Branch( m.Branch(
m.WordEqual(expected_result, m.SmiConstant(Smi::FromInt(kNotFound))), m.WordEqual(expected_result, m.SmiConstant(Smi::FromInt(kNotFound))),
&passed, &failed); &passed, &failed);
m.Bind(&if_bailout); m.BIND(&if_bailout);
m.Branch( m.Branch(
m.WordEqual(expected_result, m.SmiConstant(Smi::FromInt(kBailout))), m.WordEqual(expected_result, m.SmiConstant(Smi::FromInt(kBailout))),
&passed, &failed); &passed, &failed);
m.Bind(&passed); m.BIND(&passed);
m.Return(m.BooleanConstant(true)); m.Return(m.BooleanConstant(true));
m.Bind(&failed); m.BIND(&failed);
m.Return(m.BooleanConstant(false)); m.Return(m.BooleanConstant(false));
} }
...@@ -1757,9 +1757,9 @@ TEST(IsDebugActive) { ...@@ -1757,9 +1757,9 @@ TEST(IsDebugActive) {
CodeAssemblerLabel if_active(&m), if_not_active(&m); CodeAssemblerLabel if_active(&m), if_not_active(&m);
m.Branch(m.IsDebugActive(), &if_active, &if_not_active); m.Branch(m.IsDebugActive(), &if_active, &if_not_active);
m.Bind(&if_active); m.BIND(&if_active);
m.Return(m.TrueConstant()); m.Return(m.TrueConstant());
m.Bind(&if_not_active); m.BIND(&if_not_active);
m.Return(m.FalseConstant()); m.Return(m.FalseConstant());
Handle<Code> code = data.GenerateCode(); Handle<Code> code = data.GenerateCode();
...@@ -1811,7 +1811,7 @@ class AppendJSArrayCodeStubAssembler : public CodeStubAssembler { ...@@ -1811,7 +1811,7 @@ class AppendJSArrayCodeStubAssembler : public CodeStubAssembler {
arg_index, &bailout); arg_index, &bailout);
Return(length); Return(length);
Bind(&bailout); BIND(&bailout);
Return(SmiTag(IntPtrAdd(arg_index.value(), IntPtrConstant(2)))); Return(SmiTag(IntPtrAdd(arg_index.value(), IntPtrConstant(2))));
Handle<Code> code = tester->GenerateCode(); Handle<Code> code = tester->GenerateCode();
...@@ -2486,7 +2486,7 @@ TEST(DirectMemoryTest8BitWord32Immediate) { ...@@ -2486,7 +2486,7 @@ TEST(DirectMemoryTest8BitWord32Immediate) {
m.Return(m.SmiConstant(1)); m.Return(m.SmiConstant(1));
m.Bind(&bad); m.BIND(&bad);
m.Return(m.SmiConstant(0)); m.Return(m.SmiConstant(0));
Handle<Code> code = data.GenerateCode(); Handle<Code> code = data.GenerateCode();
...@@ -2523,7 +2523,7 @@ TEST(DirectMemoryTest16BitWord32Immediate) { ...@@ -2523,7 +2523,7 @@ TEST(DirectMemoryTest16BitWord32Immediate) {
m.Return(m.SmiConstant(1)); m.Return(m.SmiConstant(1));
m.Bind(&bad); m.BIND(&bad);
m.Return(m.SmiConstant(0)); m.Return(m.SmiConstant(0));
Handle<Code> code = data.GenerateCode(); Handle<Code> code = data.GenerateCode();
...@@ -2572,7 +2572,7 @@ TEST(DirectMemoryTest8BitWord32) { ...@@ -2572,7 +2572,7 @@ TEST(DirectMemoryTest8BitWord32) {
m.Return(m.SmiConstant(1)); m.Return(m.SmiConstant(1));
m.Bind(&bad); m.BIND(&bad);
m.Return(m.SmiConstant(0)); m.Return(m.SmiConstant(0));
Handle<Code> code = data.GenerateCode(); Handle<Code> code = data.GenerateCode();
...@@ -2635,7 +2635,7 @@ TEST(DirectMemoryTest16BitWord32) { ...@@ -2635,7 +2635,7 @@ TEST(DirectMemoryTest16BitWord32) {
m.Return(m.SmiConstant(1)); m.Return(m.SmiConstant(1));
m.Bind(&bad); m.BIND(&bad);
m.Return(m.SmiConstant(0)); m.Return(m.SmiConstant(0));
Handle<Code> code = data.GenerateCode(); 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