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

Unified Diff: src/type-info.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.h ('k') | src/typing.cc » ('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 317b4e38896b13ca9dc43b8d91a93671e199ed4c..f6ad3529230441d25b657b8b42d9d5c0e1171651 100644
--- a/src/type-info.cc
+++ b/src/type-info.cc
@@ -198,7 +198,8 @@ void TypeFeedbackOracle::GetStoreModeAndKeyType(
void TypeFeedbackOracle::GetStoreModeAndKeyType(
FeedbackVectorICSlot slot, KeyedAccessStoreMode* store_mode,
IcCheckType* key_type) {
- if (!slot.IsInvalid()) {
+ if (!slot.IsInvalid() &&
+ feedback_vector_->GetKind(slot) == Code::KEYED_STORE_IC) {
KeyedStoreICNexus nexus(feedback_vector_, slot);
*store_mode = nexus.GetKeyedAccessStoreMode();
*key_type = nexus.GetKeyType();
@@ -414,6 +415,13 @@ void TypeFeedbackOracle::CountReceiverTypes(TypeFeedbackId id,
}
+void TypeFeedbackOracle::CountReceiverTypes(FeedbackVectorICSlot slot,
+ SmallMapList* receiver_types) {
+ receiver_types->Clear();
+ if (!slot.IsInvalid()) CollectReceiverTypes(slot, receiver_types);
+}
+
+
void TypeFeedbackOracle::CollectReceiverTypes(FeedbackVectorICSlot slot,
Handle<Name> name,
Code::Flags flags,
@@ -462,8 +470,15 @@ void TypeFeedbackOracle::CollectReceiverTypes(TypeFeedbackId ast_id,
void TypeFeedbackOracle::CollectReceiverTypes(FeedbackVectorICSlot slot,
SmallMapList* types) {
- KeyedStoreICNexus nexus(feedback_vector_, slot);
- CollectReceiverTypes<FeedbackNexus>(&nexus, types);
+ Code::Kind kind = feedback_vector_->GetKind(slot);
+ if (kind == Code::STORE_IC) {
+ StoreICNexus nexus(feedback_vector_, slot);
+ CollectReceiverTypes<FeedbackNexus>(&nexus, types);
+ } else {
+ DCHECK(kind == Code::KEYED_STORE_IC);
+ KeyedStoreICNexus nexus(feedback_vector_, slot);
+ CollectReceiverTypes<FeedbackNexus>(&nexus, types);
+ }
}
« no previous file with comments | « src/type-info.h ('k') | src/typing.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698