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

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

Issue 2543873003: [stubs] Use CSA::IsHeapNumberMap() instead of manual map comparing. (Closed)
Patch Set: Created 4 years 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-global.cc
diff --git a/src/builtins/builtins-global.cc b/src/builtins/builtins-global.cc
index c65b3b6428a079897ccfc9bd0ab3886bc191d761..27d2d3b8b3445bb45c59a5e714341e68ffdd06fe 100644
--- a/src/builtins/builtins-global.cc
+++ b/src/builtins/builtins-global.cc
@@ -127,8 +127,7 @@ void Builtins::Generate_GlobalIsFinite(compiler::CodeAssemblerState* state) {
// Check if {num} is a HeapNumber.
Label if_numisheapnumber(&assembler),
if_numisnotheapnumber(&assembler, Label::kDeferred);
- assembler.Branch(assembler.WordEqual(assembler.LoadMap(num),
- assembler.HeapNumberMapConstant()),
+ assembler.Branch(assembler.IsHeapNumberMap(assembler.LoadMap(num)),
&if_numisheapnumber, &if_numisnotheapnumber);
assembler.Bind(&if_numisheapnumber);
@@ -182,8 +181,7 @@ void Builtins::Generate_GlobalIsNaN(compiler::CodeAssemblerState* state) {
// Check if {num} is a HeapNumber.
Label if_numisheapnumber(&assembler),
if_numisnotheapnumber(&assembler, Label::kDeferred);
- assembler.Branch(assembler.WordEqual(assembler.LoadMap(num),
- assembler.HeapNumberMapConstant()),
+ assembler.Branch(assembler.IsHeapNumberMap(assembler.LoadMap(num)),
&if_numisheapnumber, &if_numisnotheapnumber);
assembler.Bind(&if_numisheapnumber);

Powered by Google App Engine
This is Rietveld 408576698