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