| 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 if (!site.is_null()) { |
| 517 expr->set_extra_info(oracle()->zone(), site); |
| 518 } |
| 514 } | 519 } |
| 515 | 520 |
| 516 ZoneList<Expression*>* args = expr->arguments(); | 521 ZoneList<Expression*>* args = expr->arguments(); |
| 517 for (int i = 0; i < args->length(); ++i) { | 522 for (int i = 0; i < args->length(); ++i) { |
| 518 Expression* arg = args->at(i); | 523 Expression* arg = args->at(i); |
| 519 RECURSE(Visit(arg)); | 524 RECURSE(Visit(arg)); |
| 520 } | 525 } |
| 521 | 526 |
| 522 VariableProxy* proxy = expr->expression()->AsVariableProxy(); | 527 VariableProxy* proxy = expr->expression()->AsVariableProxy(); |
| 523 if (proxy != NULL && proxy->var()->is_possibly_eval(isolate())) { | 528 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) { | 775 void AstTyper::VisitModuleUrl(ModuleUrl* module) { |
| 771 } | 776 } |
| 772 | 777 |
| 773 | 778 |
| 774 void AstTyper::VisitModuleStatement(ModuleStatement* stmt) { | 779 void AstTyper::VisitModuleStatement(ModuleStatement* stmt) { |
| 775 RECURSE(Visit(stmt->body())); | 780 RECURSE(Visit(stmt->body())); |
| 776 } | 781 } |
| 777 | 782 |
| 778 | 783 |
| 779 } } // namespace v8::internal | 784 } } // namespace v8::internal |
| OLD | NEW |