| 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 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 365 | 365 |
| 366 | 366 |
| 367 void AstNumberingVisitor::VisitCompareOperation(CompareOperation* node) { | 367 void AstNumberingVisitor::VisitCompareOperation(CompareOperation* node) { |
| 368 IncrementNodeCount(); | 368 IncrementNodeCount(); |
| 369 node->set_base_id(ReserveIdRange(CompareOperation::num_ids())); | 369 node->set_base_id(ReserveIdRange(CompareOperation::num_ids())); |
| 370 Visit(node->left()); | 370 Visit(node->left()); |
| 371 Visit(node->right()); | 371 Visit(node->right()); |
| 372 } | 372 } |
| 373 | 373 |
| 374 | 374 |
| 375 void AstNumberingVisitor::VisitSpread(Spread* node) { | 375 void AstNumberingVisitor::VisitSpread(Spread* node) { UNREACHABLE(); } |
| 376 IncrementNodeCount(); | |
| 377 DisableCrankshaft(kSpread); | |
| 378 Visit(node->expression()); | |
| 379 } | |
| 380 | 376 |
| 381 | 377 |
| 382 void AstNumberingVisitor::VisitEmptyParentheses(EmptyParentheses* node) { | 378 void AstNumberingVisitor::VisitEmptyParentheses(EmptyParentheses* node) { |
| 383 UNREACHABLE(); | 379 UNREACHABLE(); |
| 384 } | 380 } |
| 385 | 381 |
| 386 | 382 |
| 387 void AstNumberingVisitor::VisitForInStatement(ForInStatement* node) { | 383 void AstNumberingVisitor::VisitForInStatement(ForInStatement* node) { |
| 388 IncrementNodeCount(); | 384 IncrementNodeCount(); |
| 389 DisableSelfOptimization(); | 385 DisableSelfOptimization(); |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 598 } | 594 } |
| 599 | 595 |
| 600 | 596 |
| 601 bool AstNumbering::Renumber(Isolate* isolate, Zone* zone, | 597 bool AstNumbering::Renumber(Isolate* isolate, Zone* zone, |
| 602 FunctionLiteral* function) { | 598 FunctionLiteral* function) { |
| 603 AstNumberingVisitor visitor(isolate, zone); | 599 AstNumberingVisitor visitor(isolate, zone); |
| 604 return visitor.Renumber(function); | 600 return visitor.Renumber(function); |
| 605 } | 601 } |
| 606 } // namespace internal | 602 } // namespace internal |
| 607 } // namespace v8 | 603 } // namespace v8 |
| OLD | NEW |