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