| 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 "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 522 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 533 } | 533 } |
| 534 | 534 |
| 535 | 535 |
| 536 void AstTyper::VisitCall(Call* expr) { | 536 void AstTyper::VisitCall(Call* expr) { |
| 537 // Collect type feedback. | 537 // Collect type feedback. |
| 538 RECURSE(Visit(expr->expression())); | 538 RECURSE(Visit(expr->expression())); |
| 539 bool is_uninitialized = true; | 539 bool is_uninitialized = true; |
| 540 if (expr->IsUsingCallFeedbackICSlot(isolate())) { | 540 if (expr->IsUsingCallFeedbackICSlot(isolate())) { |
| 541 FeedbackVectorICSlot slot = expr->CallFeedbackICSlot(); | 541 FeedbackVectorICSlot slot = expr->CallFeedbackICSlot(); |
| 542 is_uninitialized = oracle()->CallIsUninitialized(slot); | 542 is_uninitialized = oracle()->CallIsUninitialized(slot); |
| 543 if (oracle()->CallIsMonomorphic(slot)) { | 543 if (!expr->expression()->IsProperty() && |
| 544 if (oracle()->CallIsBuiltinWithMinusZeroResult(slot)) { | 544 oracle()->CallIsMonomorphic(slot)) { |
| 545 expr->MarkShouldHandleMinusZeroResult(); | 545 expr->set_target(oracle()->GetCallTarget(slot)); |
| 546 } | 546 Handle<AllocationSite> site = oracle()->GetCallAllocationSite(slot); |
| 547 if (!expr->expression()->IsProperty()) { | 547 expr->set_allocation_site(site); |
| 548 expr->set_target(oracle()->GetCallTarget(slot)); | |
| 549 Handle<AllocationSite> site = oracle()->GetCallAllocationSite(slot); | |
| 550 expr->set_allocation_site(site); | |
| 551 } | |
| 552 } | 548 } |
| 553 } | 549 } |
| 554 | 550 |
| 555 expr->set_is_uninitialized(is_uninitialized); | 551 expr->set_is_uninitialized(is_uninitialized); |
| 556 | 552 |
| 557 ZoneList<Expression*>* args = expr->arguments(); | 553 ZoneList<Expression*>* args = expr->arguments(); |
| 558 for (int i = 0; i < args->length(); ++i) { | 554 for (int i = 0; i < args->length(); ++i) { |
| 559 Expression* arg = args->at(i); | 555 Expression* arg = args->at(i); |
| 560 RECURSE(Visit(arg)); | 556 RECURSE(Visit(arg)); |
| 561 } | 557 } |
| (...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 826 void AstTyper::VisitModuleUrl(ModuleUrl* module) { | 822 void AstTyper::VisitModuleUrl(ModuleUrl* module) { |
| 827 } | 823 } |
| 828 | 824 |
| 829 | 825 |
| 830 void AstTyper::VisitModuleStatement(ModuleStatement* stmt) { | 826 void AstTyper::VisitModuleStatement(ModuleStatement* stmt) { |
| 831 RECURSE(Visit(stmt->body())); | 827 RECURSE(Visit(stmt->body())); |
| 832 } | 828 } |
| 833 | 829 |
| 834 | 830 |
| 835 } } // namespace v8::internal | 831 } } // namespace v8::internal |
| OLD | NEW |