| 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 | 9 |
| 10 namespace v8 { | 10 namespace v8 { |
| (...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 387 | 387 |
| 388 | 388 |
| 389 void AstNumberingVisitor::VisitCompareOperation(CompareOperation* node) { | 389 void AstNumberingVisitor::VisitCompareOperation(CompareOperation* node) { |
| 390 IncrementNodeCount(); | 390 IncrementNodeCount(); |
| 391 node->set_base_id(ReserveIdRange(CompareOperation::num_ids())); | 391 node->set_base_id(ReserveIdRange(CompareOperation::num_ids())); |
| 392 Visit(node->left()); | 392 Visit(node->left()); |
| 393 Visit(node->right()); | 393 Visit(node->right()); |
| 394 ReserveFeedbackSlots(node); | 394 ReserveFeedbackSlots(node); |
| 395 } | 395 } |
| 396 | 396 |
| 397 | 397 void AstNumberingVisitor::VisitSpread(Spread* node) { |
| 398 void AstNumberingVisitor::VisitSpread(Spread* node) { UNREACHABLE(); } | 398 IncrementNodeCount(); |
| 399 | 399 node->set_base_id(ReserveIdRange(Spread::num_ids())); |
| 400 Visit(node->expression()); |
| 401 } |
| 400 | 402 |
| 401 void AstNumberingVisitor::VisitEmptyParentheses(EmptyParentheses* node) { | 403 void AstNumberingVisitor::VisitEmptyParentheses(EmptyParentheses* node) { |
| 402 UNREACHABLE(); | 404 UNREACHABLE(); |
| 403 } | 405 } |
| 404 | 406 |
| 405 | 407 |
| 406 void AstNumberingVisitor::VisitForInStatement(ForInStatement* node) { | 408 void AstNumberingVisitor::VisitForInStatement(ForInStatement* node) { |
| 407 IncrementNodeCount(); | 409 IncrementNodeCount(); |
| 408 DisableSelfOptimization(); | 410 DisableSelfOptimization(); |
| 409 node->set_base_id(ReserveIdRange(ForInStatement::num_ids())); | 411 node->set_base_id(ReserveIdRange(ForInStatement::num_ids())); |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 621 } | 623 } |
| 622 | 624 |
| 623 | 625 |
| 624 bool AstNumbering::Renumber(Isolate* isolate, Zone* zone, | 626 bool AstNumbering::Renumber(Isolate* isolate, Zone* zone, |
| 625 FunctionLiteral* function) { | 627 FunctionLiteral* function) { |
| 626 AstNumberingVisitor visitor(isolate, zone); | 628 AstNumberingVisitor visitor(isolate, zone); |
| 627 return visitor.Renumber(function); | 629 return visitor.Renumber(function); |
| 628 } | 630 } |
| 629 } // namespace internal | 631 } // namespace internal |
| 630 } // namespace v8 | 632 } // namespace v8 |
| OLD | NEW |