| 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/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #include "src/ast.h" | 7 #include "src/ast.h" |
| 8 #include "src/ast-numbering.h" | 8 #include "src/ast-numbering.h" |
| 9 #include "src/scopes.h" | 9 #include "src/scopes.h" |
| 10 | 10 |
| (...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 349 | 349 |
| 350 | 350 |
| 351 void AstNumberingVisitor::VisitCompareOperation(CompareOperation* node) { | 351 void AstNumberingVisitor::VisitCompareOperation(CompareOperation* node) { |
| 352 IncrementNodeCount(); | 352 IncrementNodeCount(); |
| 353 node->set_base_id(ReserveIdRange(CompareOperation::num_ids())); | 353 node->set_base_id(ReserveIdRange(CompareOperation::num_ids())); |
| 354 Visit(node->left()); | 354 Visit(node->left()); |
| 355 Visit(node->right()); | 355 Visit(node->right()); |
| 356 } | 356 } |
| 357 | 357 |
| 358 | 358 |
| 359 void AstNumberingVisitor::VisitSpread(Spread* node) { |
| 360 UNREACHABLE(); |
| 361 } |
| 362 |
| 363 |
| 359 void AstNumberingVisitor::VisitForInStatement(ForInStatement* node) { | 364 void AstNumberingVisitor::VisitForInStatement(ForInStatement* node) { |
| 360 IncrementNodeCount(); | 365 IncrementNodeCount(); |
| 361 DisableSelfOptimization(); | 366 DisableSelfOptimization(); |
| 362 ReserveFeedbackSlots(node); | 367 ReserveFeedbackSlots(node); |
| 363 node->set_base_id(ReserveIdRange(ForInStatement::num_ids())); | 368 node->set_base_id(ReserveIdRange(ForInStatement::num_ids())); |
| 364 Visit(node->each()); | 369 Visit(node->each()); |
| 365 Visit(node->enumerable()); | 370 Visit(node->enumerable()); |
| 366 Visit(node->body()); | 371 Visit(node->body()); |
| 367 } | 372 } |
| 368 | 373 |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 550 } | 555 } |
| 551 | 556 |
| 552 | 557 |
| 553 bool AstNumbering::Renumber(Isolate* isolate, Zone* zone, | 558 bool AstNumbering::Renumber(Isolate* isolate, Zone* zone, |
| 554 FunctionLiteral* function) { | 559 FunctionLiteral* function) { |
| 555 AstNumberingVisitor visitor(isolate, zone); | 560 AstNumberingVisitor visitor(isolate, zone); |
| 556 return visitor.Renumber(function); | 561 return visitor.Renumber(function); |
| 557 } | 562 } |
| 558 } | 563 } |
| 559 } // namespace v8::internal | 564 } // namespace v8::internal |
| OLD | NEW |