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

Unified Diff: src/typing.cc

Issue 758543002: Make use of post-scoping information to compute feedback vector requirements. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years, 1 month 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-numbering.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 7f736a4fc6620419c4dddbf6ca4dc4e32313b9a0..e297ff2617f601464328b3f54adef58be974810b 100644
--- a/src/typing.cc
+++ b/src/typing.cc
@@ -510,16 +510,20 @@ void AstTyper::VisitProperty(Property* expr) {
void AstTyper::VisitCall(Call* expr) {
// Collect type feedback.
RECURSE(Visit(expr->expression()));
- FeedbackVectorICSlot slot = expr->CallFeedbackSlot();
- expr->set_is_uninitialized(oracle()->CallIsUninitialized(slot));
- if (!expr->expression()->IsProperty() &&
- expr->IsUsingCallFeedbackSlot(isolate()) &&
- oracle()->CallIsMonomorphic(slot)) {
- expr->set_target(oracle()->GetCallTarget(slot));
- Handle<AllocationSite> site = oracle()->GetCallAllocationSite(slot);
- expr->set_allocation_site(site);
+ bool is_uninitialized = true;
+ if (expr->IsUsingCallFeedbackSlot(isolate())) {
+ FeedbackVectorICSlot slot = expr->CallFeedbackSlot();
+ is_uninitialized = oracle()->CallIsUninitialized(slot);
+ if (!expr->expression()->IsProperty() &&
+ oracle()->CallIsMonomorphic(slot)) {
+ expr->set_target(oracle()->GetCallTarget(slot));
+ Handle<AllocationSite> site = oracle()->GetCallAllocationSite(slot);
+ expr->set_allocation_site(site);
+ }
}
+ expr->set_is_uninitialized(is_uninitialized);
+
ZoneList<Expression*>* args = expr->arguments();
for (int i = 0; i < args->length(); ++i) {
Expression* arg = args->at(i);
« no previous file with comments | « src/ast-numbering.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698