| 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/ast/ast-numbering.h" | 5 #include "src/ast/ast-numbering.h" |
| 6 | 6 |
| 7 #include "src/ast/ast.h" | 7 #include "src/ast/ast.h" |
| 8 #include "src/ast/scopes.h" | 8 #include "src/ast/scopes.h" |
| 9 | 9 |
| 10 namespace v8 { | 10 namespace v8 { |
| (...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 346 Visit(node->value()); | 346 Visit(node->value()); |
| 347 ReserveFeedbackSlots(node); | 347 ReserveFeedbackSlots(node); |
| 348 } | 348 } |
| 349 | 349 |
| 350 | 350 |
| 351 void AstNumberingVisitor::VisitBinaryOperation(BinaryOperation* node) { | 351 void AstNumberingVisitor::VisitBinaryOperation(BinaryOperation* node) { |
| 352 IncrementNodeCount(); | 352 IncrementNodeCount(); |
| 353 node->set_base_id(ReserveIdRange(BinaryOperation::num_ids())); | 353 node->set_base_id(ReserveIdRange(BinaryOperation::num_ids())); |
| 354 Visit(node->left()); | 354 Visit(node->left()); |
| 355 Visit(node->right()); | 355 Visit(node->right()); |
| 356 ReserveFeedbackSlots(node); |
| 356 } | 357 } |
| 357 | 358 |
| 358 | 359 |
| 359 void AstNumberingVisitor::VisitCompareOperation(CompareOperation* node) { | 360 void AstNumberingVisitor::VisitCompareOperation(CompareOperation* node) { |
| 360 IncrementNodeCount(); | 361 IncrementNodeCount(); |
| 361 node->set_base_id(ReserveIdRange(CompareOperation::num_ids())); | 362 node->set_base_id(ReserveIdRange(CompareOperation::num_ids())); |
| 362 Visit(node->left()); | 363 Visit(node->left()); |
| 363 Visit(node->right()); | 364 Visit(node->right()); |
| 364 } | 365 } |
| 365 | 366 |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 588 } | 589 } |
| 589 | 590 |
| 590 | 591 |
| 591 bool AstNumbering::Renumber(Isolate* isolate, Zone* zone, | 592 bool AstNumbering::Renumber(Isolate* isolate, Zone* zone, |
| 592 FunctionLiteral* function) { | 593 FunctionLiteral* function) { |
| 593 AstNumberingVisitor visitor(isolate, zone); | 594 AstNumberingVisitor visitor(isolate, zone); |
| 594 return visitor.Renumber(function); | 595 return visitor.Renumber(function); |
| 595 } | 596 } |
| 596 } // namespace internal | 597 } // namespace internal |
| 597 } // namespace v8 | 598 } // namespace v8 |
| OLD | NEW |