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

Unified Diff: src/ast.cc

Issue 6263001: Expose receiver check type in call type feedback. (Closed)
Patch Set: Created 9 years, 11 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/compiler.cc » ('j') | src/type-info.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 6a92b8429847a9e670371f13d2cd337ae1b47ac3..b43e10f107eb4420f9f2f0e82118249d25432c11 100644
--- a/src/ast.cc
+++ b/src/ast.cc
@@ -645,10 +645,19 @@ void Call::RecordTypeFeedback(TypeFeedbackOracle* oracle) {
}
}
#endif
- if (receiver_types_ != NULL && receiver_types_->length() > 0) {
- Handle<Map> type = receiver_types_->at(0);
- is_monomorphic_ = oracle->CallIsMonomorphic(this);
- if (is_monomorphic_) is_monomorphic_ = ComputeTarget(type, name);
+ is_monomorphic_ = oracle->CallIsMonomorphic(this);
+ check_type_ = oracle->GetCallCheckType(this);
+ if (is_monomorphic_) {
+ Handle<Map> map;
+ if (receiver_types_ != NULL && receiver_types_->length() > 0) {
+ ASSERT(check_type_ == RECEIVER_MAP_CHECK);
+ map = receiver_types_->at(0);
+ } else {
+ ASSERT(check_type_ != RECEIVER_MAP_CHECK);
+ map = Handle<Map>(
+ oracle->GetPrototypeForPrimitiveCheck(check_type_)->map());
+ }
+ is_monomorphic_ = ComputeTarget(map, name);
}
}
« no previous file with comments | « src/ast.h ('k') | src/compiler.cc » ('j') | src/type-info.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698