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 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
358 | 358 |
359 | 359 |
360 void AstNumberingVisitor::VisitCompareOperation(CompareOperation* node) { | 360 void AstNumberingVisitor::VisitCompareOperation(CompareOperation* node) { |
361 IncrementNodeCount(); | 361 IncrementNodeCount(); |
362 node->set_base_id(ReserveIdRange(CompareOperation::num_ids())); | 362 node->set_base_id(ReserveIdRange(CompareOperation::num_ids())); |
363 Visit(node->left()); | 363 Visit(node->left()); |
364 Visit(node->right()); | 364 Visit(node->right()); |
365 } | 365 } |
366 | 366 |
367 | 367 |
| 368 void AstNumberingVisitor::VisitSpreadOperation(SpreadOperation* node) { |
| 369 IncrementNodeCount(); |
| 370 node->set_base_id(ReserveIdRange(SpreadOperation::num_ids())); |
| 371 Visit(node->expression()); |
| 372 } |
| 373 |
| 374 |
368 void AstNumberingVisitor::VisitForInStatement(ForInStatement* node) { | 375 void AstNumberingVisitor::VisitForInStatement(ForInStatement* node) { |
369 IncrementNodeCount(); | 376 IncrementNodeCount(); |
370 DisableSelfOptimization(); | 377 DisableSelfOptimization(); |
371 ReserveFeedbackSlots(node); | 378 ReserveFeedbackSlots(node); |
372 node->set_base_id(ReserveIdRange(ForInStatement::num_ids())); | 379 node->set_base_id(ReserveIdRange(ForInStatement::num_ids())); |
373 Visit(node->each()); | 380 Visit(node->each()); |
374 Visit(node->enumerable()); | 381 Visit(node->enumerable()); |
375 Visit(node->body()); | 382 Visit(node->body()); |
376 } | 383 } |
377 | 384 |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
559 } | 566 } |
560 | 567 |
561 | 568 |
562 bool AstNumbering::Renumber(Isolate* isolate, Zone* zone, | 569 bool AstNumbering::Renumber(Isolate* isolate, Zone* zone, |
563 FunctionLiteral* function) { | 570 FunctionLiteral* function) { |
564 AstNumberingVisitor visitor(isolate, zone); | 571 AstNumberingVisitor visitor(isolate, zone); |
565 return visitor.Renumber(function); | 572 return visitor.Renumber(function); |
566 } | 573 } |
567 } | 574 } |
568 } // namespace v8::internal | 575 } // namespace v8::internal |
OLD | NEW |