OLD | NEW |
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 "typing.h" | 5 #include "typing.h" |
6 | 6 |
7 #include "frames.h" | 7 #include "frames.h" |
8 #include "frames-inl.h" | 8 #include "frames-inl.h" |
9 #include "parser.h" // for CompileTimeValue; TODO(rossberg): should move | 9 #include "parser.h" // for CompileTimeValue; TODO(rossberg): should move |
10 #include "scopes.h" | 10 #include "scopes.h" |
(...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
504 } | 504 } |
505 | 505 |
506 | 506 |
507 void AstTyper::VisitCall(Call* expr) { | 507 void AstTyper::VisitCall(Call* expr) { |
508 // Collect type feedback. | 508 // Collect type feedback. |
509 RECURSE(Visit(expr->expression())); | 509 RECURSE(Visit(expr->expression())); |
510 if (!expr->expression()->IsProperty() && | 510 if (!expr->expression()->IsProperty() && |
511 expr->IsUsingCallFeedbackSlot(isolate()) && | 511 expr->IsUsingCallFeedbackSlot(isolate()) && |
512 oracle()->CallIsMonomorphic(expr->CallFeedbackSlot())) { | 512 oracle()->CallIsMonomorphic(expr->CallFeedbackSlot())) { |
513 expr->set_target(oracle()->GetCallTarget(expr->CallFeedbackSlot())); | 513 expr->set_target(oracle()->GetCallTarget(expr->CallFeedbackSlot())); |
514 Handle<AllocationSite> site = | |
515 oracle()->GetCallAllocationSite(expr->CallFeedbackSlot()); | |
516 expr->set_allocation_site(site); | |
517 } | 514 } |
518 | 515 |
519 ZoneList<Expression*>* args = expr->arguments(); | 516 ZoneList<Expression*>* args = expr->arguments(); |
520 for (int i = 0; i < args->length(); ++i) { | 517 for (int i = 0; i < args->length(); ++i) { |
521 Expression* arg = args->at(i); | 518 Expression* arg = args->at(i); |
522 RECURSE(Visit(arg)); | 519 RECURSE(Visit(arg)); |
523 } | 520 } |
524 | 521 |
525 VariableProxy* proxy = expr->expression()->AsVariableProxy(); | 522 VariableProxy* proxy = expr->expression()->AsVariableProxy(); |
526 if (proxy != NULL && proxy->var()->is_possibly_eval(isolate())) { | 523 if (proxy != NULL && proxy->var()->is_possibly_eval(isolate())) { |
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
773 void AstTyper::VisitModuleUrl(ModuleUrl* module) { | 770 void AstTyper::VisitModuleUrl(ModuleUrl* module) { |
774 } | 771 } |
775 | 772 |
776 | 773 |
777 void AstTyper::VisitModuleStatement(ModuleStatement* stmt) { | 774 void AstTyper::VisitModuleStatement(ModuleStatement* stmt) { |
778 RECURSE(Visit(stmt->body())); | 775 RECURSE(Visit(stmt->body())); |
779 } | 776 } |
780 | 777 |
781 | 778 |
782 } } // namespace v8::internal | 779 } } // namespace v8::internal |
OLD | NEW |