| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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/ast/ast-numbering.h" | 5 #include "src/ast/ast-numbering.h" |
| 6 | 6 |
| 7 #include "src/ast/ast.h" | 7 #include "src/ast/ast.h" |
| 8 #include "src/ast/scopes.h" | 8 #include "src/ast/scopes.h" |
| 9 #include "src/compiler.h" | 9 #include "src/compiler.h" |
| 10 #include "src/objects-inl.h" | 10 #include "src/objects-inl.h" |
| (...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 470 } | 470 } |
| 471 | 471 |
| 472 void AstNumberingVisitor::VisitGetIterator(GetIterator* node) { | 472 void AstNumberingVisitor::VisitGetIterator(GetIterator* node) { |
| 473 IncrementNodeCount(); | 473 IncrementNodeCount(); |
| 474 DisableFullCodegenAndCrankshaft(kGetIterator); | 474 DisableFullCodegenAndCrankshaft(kGetIterator); |
| 475 node->set_base_id(ReserveIdRange(GetIterator::num_ids())); | 475 node->set_base_id(ReserveIdRange(GetIterator::num_ids())); |
| 476 Visit(node->iterable()); | 476 Visit(node->iterable()); |
| 477 ReserveFeedbackSlots(node); | 477 ReserveFeedbackSlots(node); |
| 478 } | 478 } |
| 479 | 479 |
| 480 void AstNumberingVisitor::VisitImportCallExpression( |
| 481 ImportCallExpression* node) { |
| 482 IncrementNodeCount(); |
| 483 DisableFullCodegenAndCrankshaft(kDynamicImport); |
| 484 Visit(node->argument()); |
| 485 } |
| 486 |
| 480 void AstNumberingVisitor::VisitForInStatement(ForInStatement* node) { | 487 void AstNumberingVisitor::VisitForInStatement(ForInStatement* node) { |
| 481 IncrementNodeCount(); | 488 IncrementNodeCount(); |
| 482 DisableSelfOptimization(); | 489 DisableSelfOptimization(); |
| 483 node->set_base_id(ReserveIdRange(ForInStatement::num_ids())); | 490 node->set_base_id(ReserveIdRange(ForInStatement::num_ids())); |
| 484 Visit(node->enumerable()); // Not part of loop. | 491 Visit(node->enumerable()); // Not part of loop. |
| 485 node->set_first_yield_id(yield_count_); | 492 node->set_first_yield_id(yield_count_); |
| 486 Visit(node->each()); | 493 Visit(node->each()); |
| 487 Visit(node->body()); | 494 Visit(node->body()); |
| 488 node->set_yield_count(yield_count_ - node->first_yield_id()); | 495 node->set_yield_count(yield_count_ - node->first_yield_id()); |
| 489 ReserveFeedbackSlots(node); | 496 ReserveFeedbackSlots(node); |
| (...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 738 DisallowHeapAllocation no_allocation; | 745 DisallowHeapAllocation no_allocation; |
| 739 DisallowHandleAllocation no_handles; | 746 DisallowHandleAllocation no_handles; |
| 740 DisallowHandleDereference no_deref; | 747 DisallowHandleDereference no_deref; |
| 741 | 748 |
| 742 AstNumberingVisitor visitor(stack_limit, zone, eager_literals, | 749 AstNumberingVisitor visitor(stack_limit, zone, eager_literals, |
| 743 collect_type_profile); | 750 collect_type_profile); |
| 744 return visitor.Renumber(function); | 751 return visitor.Renumber(function); |
| 745 } | 752 } |
| 746 } // namespace internal | 753 } // namespace internal |
| 747 } // namespace v8 | 754 } // namespace v8 |
| OLD | NEW |