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 449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
460 } | 460 } |
461 | 461 |
462 void AstNumberingVisitor::VisitGetIterator(GetIterator* node) { | 462 void AstNumberingVisitor::VisitGetIterator(GetIterator* node) { |
463 IncrementNodeCount(); | 463 IncrementNodeCount(); |
464 DisableFullCodegenAndCrankshaft(kGetIterator); | 464 DisableFullCodegenAndCrankshaft(kGetIterator); |
465 node->set_base_id(ReserveIdRange(GetIterator::num_ids())); | 465 node->set_base_id(ReserveIdRange(GetIterator::num_ids())); |
466 Visit(node->iterable()); | 466 Visit(node->iterable()); |
467 ReserveFeedbackSlots(node); | 467 ReserveFeedbackSlots(node); |
468 } | 468 } |
469 | 469 |
| 470 void AstNumberingVisitor::VisitImportCallExpression( |
| 471 ImportCallExpression* node) { |
| 472 IncrementNodeCount(); |
| 473 DisableFullCodegenAndCrankshaft(kDynamicImport); |
| 474 Visit(node->argument()); |
| 475 } |
| 476 |
470 void AstNumberingVisitor::VisitForInStatement(ForInStatement* node) { | 477 void AstNumberingVisitor::VisitForInStatement(ForInStatement* node) { |
471 IncrementNodeCount(); | 478 IncrementNodeCount(); |
472 DisableSelfOptimization(); | 479 DisableSelfOptimization(); |
473 node->set_base_id(ReserveIdRange(ForInStatement::num_ids())); | 480 node->set_base_id(ReserveIdRange(ForInStatement::num_ids())); |
474 Visit(node->enumerable()); // Not part of loop. | 481 Visit(node->enumerable()); // Not part of loop. |
475 node->set_first_yield_id(yield_count_); | 482 node->set_first_yield_id(yield_count_); |
476 Visit(node->each()); | 483 Visit(node->each()); |
477 Visit(node->body()); | 484 Visit(node->body()); |
478 node->set_yield_count(yield_count_ - node->first_yield_id()); | 485 node->set_yield_count(yield_count_ - node->first_yield_id()); |
479 ReserveFeedbackSlots(node); | 486 ReserveFeedbackSlots(node); |
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
723 DisallowHeapAllocation no_allocation; | 730 DisallowHeapAllocation no_allocation; |
724 DisallowHandleAllocation no_handles; | 731 DisallowHandleAllocation no_handles; |
725 DisallowHandleDereference no_deref; | 732 DisallowHandleDereference no_deref; |
726 | 733 |
727 AstNumberingVisitor visitor(stack_limit, zone, eager_literals, | 734 AstNumberingVisitor visitor(stack_limit, zone, eager_literals, |
728 collect_type_profile); | 735 collect_type_profile); |
729 return visitor.Renumber(function); | 736 return visitor.Renumber(function); |
730 } | 737 } |
731 } // namespace internal | 738 } // namespace internal |
732 } // namespace v8 | 739 } // namespace v8 |
OLD | NEW |