Index: src/builtins/builtins-array.cc |
diff --git a/src/builtins/builtins-array.cc b/src/builtins/builtins-array.cc |
index ba9db3523323eab8814204c6bf27f1d1db7b68fe..b4969f1e575b2003f6b94a9c353011bfa0f8dfe0 100644 |
--- a/src/builtins/builtins-array.cc |
+++ b/src/builtins/builtins-array.cc |
@@ -1410,10 +1410,8 @@ void Builtins::Generate_ArrayIncludes(CodeStubAssembler* assembler) { |
assembler->Bind(¬_heap_num); |
Node* search_type = assembler->LoadMapInstanceType(map); |
- assembler->GotoIf( |
- assembler->Int32LessThan( |
- search_type, assembler->Int32Constant(FIRST_NONSTRING_TYPE)), |
- &string_loop); |
+ assembler->GotoIf(assembler->IsStringInstanceType(search_type), |
+ &string_loop); |
assembler->GotoIf( |
assembler->Word32Equal(search_type, |
assembler->Int32Constant(SIMD128_VALUE_TYPE)), |
@@ -1517,9 +1515,8 @@ void Builtins::Generate_ArrayIncludes(CodeStubAssembler* assembler) { |
Node* element_k = assembler->LoadFixedArrayElement( |
elements, index_var.value(), 0, CodeStubAssembler::INTPTR_PARAMETERS); |
assembler->GotoIf(assembler->WordIsSmi(element_k), &continue_loop); |
- assembler->GotoUnless(assembler->Int32LessThan( |
- assembler->LoadInstanceType(element_k), |
- assembler->Int32Constant(FIRST_NONSTRING_TYPE)), |
+ assembler->GotoUnless(assembler->IsStringInstanceType( |
+ assembler->LoadInstanceType(element_k)), |
&continue_loop); |
// TODO(bmeurer): Consider inlining the StringEqual logic here. |
@@ -1855,10 +1852,8 @@ void Builtins::Generate_ArrayIndexOf(CodeStubAssembler* assembler) { |
assembler->Bind(¬_heap_num); |
Node* search_type = assembler->LoadMapInstanceType(map); |
- assembler->GotoIf( |
- assembler->Int32LessThan( |
- search_type, assembler->Int32Constant(FIRST_NONSTRING_TYPE)), |
- &string_loop); |
+ assembler->GotoIf(assembler->IsStringInstanceType(search_type), |
+ &string_loop); |
assembler->GotoIf( |
assembler->Word32Equal(search_type, |
assembler->Int32Constant(SIMD128_VALUE_TYPE)), |
@@ -1937,9 +1932,8 @@ void Builtins::Generate_ArrayIndexOf(CodeStubAssembler* assembler) { |
Node* element_k = assembler->LoadFixedArrayElement( |
elements, index_var.value(), 0, CodeStubAssembler::INTPTR_PARAMETERS); |
assembler->GotoIf(assembler->WordIsSmi(element_k), &continue_loop); |
- assembler->GotoUnless(assembler->Int32LessThan( |
- assembler->LoadInstanceType(element_k), |
- assembler->Int32Constant(FIRST_NONSTRING_TYPE)), |
+ assembler->GotoUnless(assembler->IsStringInstanceType( |
+ assembler->LoadInstanceType(element_k)), |
&continue_loop); |
// TODO(bmeurer): Consider inlining the StringEqual logic here. |