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

Unified Diff: src/crankshaft/hydrogen-instructions.cc

Issue 1722193002: [compiler] Drop the CompareNilIC. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: REBASE Created 4 years, 10 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
« no previous file with comments | « src/crankshaft/hydrogen.cc ('k') | src/crankshaft/hydrogen-types.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/crankshaft/hydrogen-instructions.cc
diff --git a/src/crankshaft/hydrogen-instructions.cc b/src/crankshaft/hydrogen-instructions.cc
index f1a446c777ab588c5382a5296eb2e452d6603ddb..3c3ae355ae5fc1f4b22c83ff38647ea95af8608c 100644
--- a/src/crankshaft/hydrogen-instructions.cc
+++ b/src/crankshaft/hydrogen-instructions.cc
@@ -3238,6 +3238,17 @@ bool HIsUndetectableAndBranch::KnownSuccessorBlock(HBasicBlock** block) {
? FirstSuccessor() : SecondSuccessor();
return true;
}
+ if (value()->type().IsNull() || value()->type().IsUndefined()) {
+ *block = FirstSuccessor();
+ return true;
+ }
+ if (value()->type().IsBoolean() ||
+ value()->type().IsSmi() ||
+ value()->type().IsString() ||
+ value()->type().IsJSReceiver()) {
+ *block = SecondSuccessor();
+ return true;
+ }
*block = NULL;
return false;
}
« no previous file with comments | « src/crankshaft/hydrogen.cc ('k') | src/crankshaft/hydrogen-types.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698