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::VisitSpread(Spread* node) { UNREACHABLE(); } |
| 366 |
| 367 |
365 void AstNumberingVisitor::VisitForInStatement(ForInStatement* node) { | 368 void AstNumberingVisitor::VisitForInStatement(ForInStatement* node) { |
366 IncrementNodeCount(); | 369 IncrementNodeCount(); |
367 DisableSelfOptimization(); | 370 DisableSelfOptimization(); |
368 ReserveFeedbackSlots(node); | 371 ReserveFeedbackSlots(node); |
369 node->set_base_id(ReserveIdRange(ForInStatement::num_ids())); | 372 node->set_base_id(ReserveIdRange(ForInStatement::num_ids())); |
370 Visit(node->each()); | 373 Visit(node->each()); |
371 Visit(node->enumerable()); | 374 Visit(node->enumerable()); |
372 Visit(node->body()); | 375 Visit(node->body()); |
373 } | 376 } |
374 | 377 |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
556 } | 559 } |
557 | 560 |
558 | 561 |
559 bool AstNumbering::Renumber(Isolate* isolate, Zone* zone, | 562 bool AstNumbering::Renumber(Isolate* isolate, Zone* zone, |
560 FunctionLiteral* function) { | 563 FunctionLiteral* function) { |
561 AstNumberingVisitor visitor(isolate, zone); | 564 AstNumberingVisitor visitor(isolate, zone); |
562 return visitor.Renumber(function); | 565 return visitor.Renumber(function); |
563 } | 566 } |
564 } | 567 } |
565 } // namespace v8::internal | 568 } // namespace v8::internal |
OLD | NEW |