Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(533)

Unified Diff: src/builtins/builtins-conversion.cc

Issue 2395453002: [stubs] Add String and JSReceiver instance type predicates (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/builtins/builtins-conversion.cc
diff --git a/src/builtins/builtins-conversion.cc b/src/builtins/builtins-conversion.cc
index eccec6b8b9e01b572926324c385fd87372055224..7fbe4f859e64b05903f9ab93e43bfced543b3d41 100644
--- a/src/builtins/builtins-conversion.cc
+++ b/src/builtins/builtins-conversion.cc
@@ -168,10 +168,8 @@ void Builtins::Generate_ToString(CodeStubAssembler* assembler) {
Node* input_instance_type = assembler->LoadMapInstanceType(input_map);
Label not_string(assembler);
- assembler->GotoIf(
- assembler->Int32GreaterThanOrEqual(
- input_instance_type, assembler->Int32Constant(FIRST_NONSTRING_TYPE)),
- &not_string);
+ assembler->GotoUnless(assembler->IsStringInstanceType(input_instance_type),
+ &not_string);
assembler->Return(input);
Label not_heap_number(assembler);

Powered by Google App Engine
This is Rietveld 408576698