Index: src/builtins/builtins-object.cc |
diff --git a/src/builtins/builtins-object.cc b/src/builtins/builtins-object.cc |
index 918eb7ef5c4119518449137a2beff7d458afc4b4..bec4e1244e5181e99a792b8761d0bf214a7004a0 100644 |
--- a/src/builtins/builtins-object.cc |
+++ b/src/builtins/builtins-object.cc |
@@ -230,10 +230,8 @@ void IsString(CodeStubAssembler* assembler, compiler::Node* object, |
{ |
Node* instance_type = assembler->LoadInstanceType(object); |
- assembler->Branch( |
- assembler->Int32LessThan( |
- instance_type, assembler->Int32Constant(FIRST_NONSTRING_TYPE)), |
- if_string, if_notstring); |
+ assembler->Branch(assembler->IsStringInstanceType(instance_type), if_string, |
+ if_notstring); |
} |
} |
@@ -259,10 +257,8 @@ void ReturnIfPrimitive(CodeStubAssembler* assembler, |
CodeStubAssembler::Label* return_string, |
CodeStubAssembler::Label* return_boolean, |
CodeStubAssembler::Label* return_number) { |
- assembler->GotoIf( |
- assembler->Int32LessThan(instance_type, |
- assembler->Int32Constant(FIRST_NONSTRING_TYPE)), |
- return_string); |
+ assembler->GotoIf(assembler->IsStringInstanceType(instance_type), |
+ return_string); |
assembler->GotoIf(assembler->Word32Equal( |
instance_type, assembler->Int32Constant(ODDBALL_TYPE)), |