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); |
514 } | 517 } |
515 | 518 |
516 ZoneList<Expression*>* args = expr->arguments(); | 519 ZoneList<Expression*>* args = expr->arguments(); |
517 for (int i = 0; i < args->length(); ++i) { | 520 for (int i = 0; i < args->length(); ++i) { |
518 Expression* arg = args->at(i); | 521 Expression* arg = args->at(i); |
519 RECURSE(Visit(arg)); | 522 RECURSE(Visit(arg)); |
520 } | 523 } |
521 | 524 |
522 VariableProxy* proxy = expr->expression()->AsVariableProxy(); | 525 VariableProxy* proxy = expr->expression()->AsVariableProxy(); |
523 if (proxy != NULL && proxy->var()->is_possibly_eval(isolate())) { | 526 if (proxy != NULL && proxy->var()->is_possibly_eval(isolate())) { |
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
770 void AstTyper::VisitModuleUrl(ModuleUrl* module) { | 773 void AstTyper::VisitModuleUrl(ModuleUrl* module) { |
771 } | 774 } |
772 | 775 |
773 | 776 |
774 void AstTyper::VisitModuleStatement(ModuleStatement* stmt) { | 777 void AstTyper::VisitModuleStatement(ModuleStatement* stmt) { |
775 RECURSE(Visit(stmt->body())); | 778 RECURSE(Visit(stmt->body())); |
776 } | 779 } |
777 | 780 |
778 | 781 |
779 } } // namespace v8::internal | 782 } } // namespace v8::internal |
OLD | NEW |