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

Unified Diff: src/typing.cc

Issue 1321993004: Vector ICs: ObjectLiteral refactoring for Oracle feedback (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: REBASE, turned off flag. Created 5 years, 3 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/type-info.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/typing.cc
diff --git a/src/typing.cc b/src/typing.cc
index fb758828b076524a47c6be702050437507d4be95..db5ca61a8e71b217dcbb8bce2d2894def51b20bd 100644
--- a/src/typing.cc
+++ b/src/typing.cc
@@ -396,8 +396,13 @@ void AstTyper::VisitObjectLiteral(ObjectLiteral* expr) {
prop->emit_store()) {
// Record type feed back for the property.
TypeFeedbackId id = prop->key()->AsLiteral()->LiteralFeedbackId();
+ FeedbackVectorICSlot slot = prop->GetSlot();
SmallMapList maps;
- oracle()->CollectReceiverTypes(id, &maps);
+ if (FLAG_vector_stores) {
+ oracle()->CollectReceiverTypes(slot, &maps);
+ } else {
+ oracle()->CollectReceiverTypes(id, &maps);
+ }
prop->set_receiver_type(maps.length() == 1 ? maps.at(0)
: Handle<Map>::null());
}
@@ -612,12 +617,18 @@ void AstTyper::VisitUnaryOperation(UnaryOperation* expr) {
void AstTyper::VisitCountOperation(CountOperation* expr) {
// Collect type feedback.
TypeFeedbackId store_id = expr->CountStoreFeedbackId();
+ FeedbackVectorICSlot slot = expr->CountSlot();
KeyedAccessStoreMode store_mode;
IcCheckType key_type;
- oracle()->GetStoreModeAndKeyType(store_id, &store_mode, &key_type);
+ if (FLAG_vector_stores) {
+ oracle()->GetStoreModeAndKeyType(slot, &store_mode, &key_type);
+ oracle()->CountReceiverTypes(slot, expr->GetReceiverTypes());
+ } else {
+ oracle()->GetStoreModeAndKeyType(store_id, &store_mode, &key_type);
+ oracle()->CountReceiverTypes(store_id, expr->GetReceiverTypes());
+ }
expr->set_store_mode(store_mode);
expr->set_key_type(key_type);
- oracle()->CountReceiverTypes(store_id, expr->GetReceiverTypes());
expr->set_type(oracle()->CountType(expr->CountBinOpFeedbackId()));
// TODO(rossberg): merge the count type with the generic expression type.
« no previous file with comments | « src/type-info.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698