| 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-numbering.h" | 5 #include "src/ast-numbering.h" |
| 6 | 6 |
| 7 #include "src/ast.h" | 7 #include "src/ast.h" |
| 8 #include "src/scopes.h" | 8 #include "src/scopes.h" |
| 9 | 9 |
| 10 namespace v8 { | 10 namespace v8 { |
| (...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 364 } | 364 } |
| 365 | 365 |
| 366 | 366 |
| 367 void AstNumberingVisitor::VisitSpread(Spread* node) { | 367 void AstNumberingVisitor::VisitSpread(Spread* node) { |
| 368 IncrementNodeCount(); | 368 IncrementNodeCount(); |
| 369 DisableOptimization(kSpread); | 369 DisableOptimization(kSpread); |
| 370 Visit(node->expression()); | 370 Visit(node->expression()); |
| 371 } | 371 } |
| 372 | 372 |
| 373 | 373 |
| 374 void AstNumberingVisitor::VisitEmptyParentheses(EmptyParentheses* node) { | |
| 375 UNREACHABLE(); | |
| 376 } | |
| 377 | |
| 378 | |
| 379 void AstNumberingVisitor::VisitForInStatement(ForInStatement* node) { | 374 void AstNumberingVisitor::VisitForInStatement(ForInStatement* node) { |
| 380 IncrementNodeCount(); | 375 IncrementNodeCount(); |
| 381 DisableSelfOptimization(); | 376 DisableSelfOptimization(); |
| 382 node->set_base_id(ReserveIdRange(ForInStatement::num_ids())); | 377 node->set_base_id(ReserveIdRange(ForInStatement::num_ids())); |
| 383 Visit(node->each()); | 378 Visit(node->each()); |
| 384 Visit(node->enumerable()); | 379 Visit(node->enumerable()); |
| 385 Visit(node->body()); | 380 Visit(node->body()); |
| 386 ReserveFeedbackSlots(node); | 381 ReserveFeedbackSlots(node); |
| 387 } | 382 } |
| 388 | 383 |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 574 } | 569 } |
| 575 | 570 |
| 576 | 571 |
| 577 bool AstNumbering::Renumber(Isolate* isolate, Zone* zone, | 572 bool AstNumbering::Renumber(Isolate* isolate, Zone* zone, |
| 578 FunctionLiteral* function) { | 573 FunctionLiteral* function) { |
| 579 AstNumberingVisitor visitor(isolate, zone); | 574 AstNumberingVisitor visitor(isolate, zone); |
| 580 return visitor.Renumber(function); | 575 return visitor.Renumber(function); |
| 581 } | 576 } |
| 582 } // namespace internal | 577 } // namespace internal |
| 583 } // namespace v8 | 578 } // namespace v8 |
| OLD | NEW |