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

Side by Side 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 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 unified diff | Download patch
« no previous file with comments | « src/ast-numbering.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/typing.h" 5 #include "src/typing.h"
6 6
7 #include "src/frames.h" 7 #include "src/frames.h"
8 #include "src/frames-inl.h" 8 #include "src/frames-inl.h"
9 #include "src/ostreams.h" 9 #include "src/ostreams.h"
10 #include "src/parser.h" // for CompileTimeValue; TODO(rossberg): should move 10 #include "src/parser.h" // for CompileTimeValue; TODO(rossberg): should move
(...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after
503 RECURSE(Visit(expr->obj())); 503 RECURSE(Visit(expr->obj()));
504 RECURSE(Visit(expr->key())); 504 RECURSE(Visit(expr->key()));
505 505
506 // We don't know anything about the result type. 506 // We don't know anything about the result type.
507 } 507 }
508 508
509 509
510 void AstTyper::VisitCall(Call* expr) { 510 void AstTyper::VisitCall(Call* expr) {
511 // Collect type feedback. 511 // Collect type feedback.
512 RECURSE(Visit(expr->expression())); 512 RECURSE(Visit(expr->expression()));
513 FeedbackVectorICSlot slot = expr->CallFeedbackSlot(); 513 bool is_uninitialized = true;
514 expr->set_is_uninitialized(oracle()->CallIsUninitialized(slot)); 514 if (expr->IsUsingCallFeedbackSlot(isolate())) {
515 if (!expr->expression()->IsProperty() && 515 FeedbackVectorICSlot slot = expr->CallFeedbackSlot();
516 expr->IsUsingCallFeedbackSlot(isolate()) && 516 is_uninitialized = oracle()->CallIsUninitialized(slot);
517 oracle()->CallIsMonomorphic(slot)) { 517 if (!expr->expression()->IsProperty() &&
518 expr->set_target(oracle()->GetCallTarget(slot)); 518 oracle()->CallIsMonomorphic(slot)) {
519 Handle<AllocationSite> site = oracle()->GetCallAllocationSite(slot); 519 expr->set_target(oracle()->GetCallTarget(slot));
520 expr->set_allocation_site(site); 520 Handle<AllocationSite> site = oracle()->GetCallAllocationSite(slot);
521 expr->set_allocation_site(site);
522 }
521 } 523 }
522 524
525 expr->set_is_uninitialized(is_uninitialized);
526
523 ZoneList<Expression*>* args = expr->arguments(); 527 ZoneList<Expression*>* args = expr->arguments();
524 for (int i = 0; i < args->length(); ++i) { 528 for (int i = 0; i < args->length(); ++i) {
525 Expression* arg = args->at(i); 529 Expression* arg = args->at(i);
526 RECURSE(Visit(arg)); 530 RECURSE(Visit(arg));
527 } 531 }
528 532
529 VariableProxy* proxy = expr->expression()->AsVariableProxy(); 533 VariableProxy* proxy = expr->expression()->AsVariableProxy();
530 if (proxy != NULL && proxy->var()->is_possibly_eval(isolate())) { 534 if (proxy != NULL && proxy->var()->is_possibly_eval(isolate())) {
531 store_.Forget(); // Eval could do whatever to local variables. 535 store_.Forget(); // Eval could do whatever to local variables.
532 } 536 }
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
784 void AstTyper::VisitModuleUrl(ModuleUrl* module) { 788 void AstTyper::VisitModuleUrl(ModuleUrl* module) {
785 } 789 }
786 790
787 791
788 void AstTyper::VisitModuleStatement(ModuleStatement* stmt) { 792 void AstTyper::VisitModuleStatement(ModuleStatement* stmt) {
789 RECURSE(Visit(stmt->body())); 793 RECURSE(Visit(stmt->body()));
790 } 794 }
791 795
792 796
793 } } // namespace v8::internal 797 } } // namespace v8::internal
OLDNEW
« 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