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

Unified Diff: src/code-stubs-hydrogen.cc

Issue 1417503008: [turbofan] Use CompareNilIC for abstract equality with null/undefined. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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/code-stubs-hydrogen.cc
diff --git a/src/code-stubs-hydrogen.cc b/src/code-stubs-hydrogen.cc
index 0cf39f7dcfe2b9665ad291bb577c413ac7327df7..60e626e1aec843a4a04b0fc418a9dec6e5aa75e5 100644
--- a/src/code-stubs-hydrogen.cc
+++ b/src/code-stubs-hydrogen.cc
@@ -1356,12 +1356,11 @@ HValue* CodeStubGraphBuilder<CompareNilICStub>::BuildCodeInitializedStub() {
if_nil.Then();
if (continuation.IsFalseReachable()) {
if_nil.Else();
- if_nil.Return(graph()->GetConstant0());
+ if_nil.Return(graph()->GetConstantFalse());
}
if_nil.End();
- return continuation.IsTrueReachable()
- ? graph()->GetConstant1()
- : graph()->GetConstantUndefined();
+ return continuation.IsTrueReachable() ? graph()->GetConstantTrue()
+ : graph()->GetConstantUndefined();
}

Powered by Google App Engine
This is Rietveld 408576698