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

Unified Diff: src/ast.cc

Issue 7170012: Crankshaft support for polymorphic array handling (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: address next round of comments. Created 9 years, 6 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/ast.h ('k') | src/hydrogen.h » ('j') | src/hydrogen.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast.cc
diff --git a/src/ast.cc b/src/ast.cc
index 03df229963ec00771500449589e04640e657c2df..18412df9d6abb1f266a970b88232adcb59fde528 100644
--- a/src/ast.cc
+++ b/src/ast.cc
@@ -607,6 +607,10 @@ void Property::RecordTypeFeedback(TypeFeedbackOracle* oracle) {
is_string_access_ = true;
} else if (is_monomorphic_) {
monomorphic_receiver_type_ = oracle->LoadMonomorphicReceiverType(this);
+ } else if (oracle->LoadIsMegamorphicWithTypeInfo(this)) {
+ // TODO(jkummerow): use constant instead of "4".
fschneider 2011/06/17 08:59:34 You could use sth. like kMaxKeyedLoadPolymorphism.
Jakob Kummerow 2011/06/17 17:43:14 Done.
+ receiver_types_ = new ZoneMapList(4);
+ oracle->CollectKeyedReceiverTypes(this->id(), receiver_types_);
}
}
@@ -622,8 +626,12 @@ void Assignment::RecordTypeFeedback(TypeFeedbackOracle* oracle) {
ZoneMapList* types = oracle->StoreReceiverTypes(this, name);
receiver_types_ = types;
} else if (is_monomorphic_) {
- // Record receiver type for monomorphic keyed loads.
+ // Record receiver type for monomorphic keyed stores.
monomorphic_receiver_type_ = oracle->StoreMonomorphicReceiverType(this);
+ } else if (oracle->StoreIsMegamorphicWithTypeInfo(this)) {
+ // TODO(jkummerow): use constant instead of "4".
+ receiver_types_ = new ZoneMapList(4);
+ oracle->CollectKeyedReceiverTypes(this->id(), receiver_types_);
}
}
@@ -631,8 +639,12 @@ void Assignment::RecordTypeFeedback(TypeFeedbackOracle* oracle) {
void CountOperation::RecordTypeFeedback(TypeFeedbackOracle* oracle) {
is_monomorphic_ = oracle->StoreIsMonomorphicNormal(this);
if (is_monomorphic_) {
- // Record receiver type for monomorphic keyed loads.
+ // Record receiver type for monomorphic keyed stores.
monomorphic_receiver_type_ = oracle->StoreMonomorphicReceiverType(this);
+ } else if (oracle->StoreIsMegamorphicWithTypeInfo(this)) {
+ // TODO(jkummerow): use constant instead of "4".
+ receiver_types_ = new ZoneMapList(4);
+ oracle->CollectKeyedReceiverTypes(this->id(), receiver_types_);
}
}
« no previous file with comments | « src/ast.h ('k') | src/hydrogen.h » ('j') | src/hydrogen.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698