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