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

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

Issue 1743433002: Revert of [compiler] Drop the CompareNilIC. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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/code-stubs.cc ('k') | src/compiler/change-lowering.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/code-stubs-hydrogen.cc
diff --git a/src/code-stubs-hydrogen.cc b/src/code-stubs-hydrogen.cc
index 07177a277a091b40671e1d9acfab32a55d32cc7f..461baaa4e6d71447b186938e8bba55a87ec3f7e7 100644
--- a/src/code-stubs-hydrogen.cc
+++ b/src/code-stubs-hydrogen.cc
@@ -1419,6 +1419,31 @@
template <>
+HValue* CodeStubGraphBuilder<CompareNilICStub>::BuildCodeInitializedStub() {
+ Isolate* isolate = graph()->isolate();
+ CompareNilICStub* stub = casted_stub();
+ HIfContinuation continuation;
+ Handle<Map> sentinel_map(isolate->heap()->meta_map());
+ Type* type = stub->GetType(zone(), sentinel_map);
+ BuildCompareNil(GetParameter(0), type, &continuation, kEmbedMapsViaWeakCells);
+ IfBuilder if_nil(this, &continuation);
+ if_nil.Then();
+ if (continuation.IsFalseReachable()) {
+ if_nil.Else();
+ if_nil.Return(graph()->GetConstantFalse());
+ }
+ if_nil.End();
+ return continuation.IsTrueReachable() ? graph()->GetConstantTrue()
+ : graph()->GetConstantUndefined();
+}
+
+
+Handle<Code> CompareNilICStub::GenerateCode() {
+ return DoGenerateCode(this);
+}
+
+
+template <>
HValue* CodeStubGraphBuilder<BinaryOpICStub>::BuildCodeInitializedStub() {
BinaryOpICState state = casted_stub()->state();
« no previous file with comments | « src/code-stubs.cc ('k') | src/compiler/change-lowering.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698