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

Unified Diff: src/type-info.cc

Issue 18602003: Encapsulate compare nil ic_state. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 5 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/objects.cc ('k') | test/cctest/cctest.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/type-info.cc
diff --git a/src/type-info.cc b/src/type-info.cc
index b256bb406e4de7f8c40931b856d4b5ec46919bb1..d8eebfb69724ff37ab7ce3cb4b2bf1cfad7f4777 100644
--- a/src/type-info.cc
+++ b/src/type-info.cc
@@ -377,12 +377,9 @@ void TypeFeedbackOracle::CompareType(TypeFeedbackId id,
CompareIC::StubInfoToType(
stub_minor_key, left_type, right_type, combined_type, map, isolate());
} else if (code->is_compare_nil_ic_stub()) {
- CompareNilICStub::State state(code->compare_nil_state());
- *combined_type = CompareNilICStub::StateToType(isolate_, state, map);
- Handle<Type> nil_type = handle(code->compare_nil_value() == kNullValue
- ? Type::Null() : Type::Undefined(), isolate_);
- *left_type = *right_type =
- handle(Type::Union(*combined_type, nil_type), isolate_);
+ CompareNilICStub stub(code->extended_extra_ic_state());
+ *combined_type = stub.GetType(isolate_, map);
+ *left_type = *right_type = stub.GetInputType(isolate_, map);
}
}
« no previous file with comments | « src/objects.cc ('k') | test/cctest/cctest.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698