| 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 454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 465 } | 465 } |
| 466 | 466 |
| 467 void AstNumberingVisitor::VisitGetIterator(GetIterator* node) { | 467 void AstNumberingVisitor::VisitGetIterator(GetIterator* node) { |
| 468 IncrementNodeCount(); | 468 IncrementNodeCount(); |
| 469 DisableFullCodegenAndCrankshaft(kGetIterator); | 469 DisableFullCodegenAndCrankshaft(kGetIterator); |
| 470 node->set_base_id(ReserveIdRange(GetIterator::num_ids())); | 470 node->set_base_id(ReserveIdRange(GetIterator::num_ids())); |
| 471 Visit(node->iterable()); | 471 Visit(node->iterable()); |
| 472 ReserveFeedbackSlots(node); | 472 ReserveFeedbackSlots(node); |
| 473 } | 473 } |
| 474 | 474 |
| 475 void AstNumberingVisitor::VisitImportCallExpression( |
| 476 ImportCallExpression* node) { |
| 477 IncrementNodeCount(); |
| 478 DisableFullCodegenAndCrankshaft(kDynamicImport); |
| 479 Visit(node->argument()); |
| 480 } |
| 481 |
| 475 void AstNumberingVisitor::VisitForInStatement(ForInStatement* node) { | 482 void AstNumberingVisitor::VisitForInStatement(ForInStatement* node) { |
| 476 IncrementNodeCount(); | 483 IncrementNodeCount(); |
| 477 DisableSelfOptimization(); | 484 DisableSelfOptimization(); |
| 478 node->set_base_id(ReserveIdRange(ForInStatement::num_ids())); | 485 node->set_base_id(ReserveIdRange(ForInStatement::num_ids())); |
| 479 Visit(node->enumerable()); // Not part of loop. | 486 Visit(node->enumerable()); // Not part of loop. |
| 480 node->set_first_suspend_id(suspend_count_); | 487 node->set_first_suspend_id(suspend_count_); |
| 481 Visit(node->each()); | 488 Visit(node->each()); |
| 482 Visit(node->body()); | 489 Visit(node->body()); |
| 483 node->set_suspend_count(suspend_count_ - node->first_suspend_id()); | 490 node->set_suspend_count(suspend_count_ - node->first_suspend_id()); |
| 484 ReserveFeedbackSlots(node); | 491 ReserveFeedbackSlots(node); |
| (...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 732 DisallowHeapAllocation no_allocation; | 739 DisallowHeapAllocation no_allocation; |
| 733 DisallowHandleAllocation no_handles; | 740 DisallowHandleAllocation no_handles; |
| 734 DisallowHandleDereference no_deref; | 741 DisallowHandleDereference no_deref; |
| 735 | 742 |
| 736 AstNumberingVisitor visitor(stack_limit, zone, eager_literals, | 743 AstNumberingVisitor visitor(stack_limit, zone, eager_literals, |
| 737 collect_type_profile); | 744 collect_type_profile); |
| 738 return visitor.Renumber(function); | 745 return visitor.Renumber(function); |
| 739 } | 746 } |
| 740 } // namespace internal | 747 } // namespace internal |
| 741 } // namespace v8 | 748 } // namespace v8 |
| OLD | NEW |