| 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-numbering.h" | 5 #include "src/ast-numbering.h" |
| 6 | 6 |
| 7 #include "src/ast.h" | 7 #include "src/ast.h" |
| 8 #include "src/scopes.h" | 8 #include "src/scopes.h" |
| 9 | 9 |
| 10 namespace v8 { | 10 namespace v8 { |
| (...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 341 | 341 |
| 342 void AstNumberingVisitor::VisitProperty(Property* node) { | 342 void AstNumberingVisitor::VisitProperty(Property* node) { |
| 343 VisitPropertyReference(node); | 343 VisitPropertyReference(node); |
| 344 ReserveFeedbackSlots(node); | 344 ReserveFeedbackSlots(node); |
| 345 } | 345 } |
| 346 | 346 |
| 347 | 347 |
| 348 void AstNumberingVisitor::VisitAssignment(Assignment* node) { | 348 void AstNumberingVisitor::VisitAssignment(Assignment* node) { |
| 349 IncrementNodeCount(); | 349 IncrementNodeCount(); |
| 350 node->set_base_id(ReserveIdRange(Assignment::num_ids())); | 350 node->set_base_id(ReserveIdRange(Assignment::num_ids())); |
| 351 |
| 352 RETURN_IF_VISIT_NODE(node->destructuring_assignment()); |
| 353 |
| 351 if (node->is_compound()) VisitBinaryOperation(node->binary_operation()); | 354 if (node->is_compound()) VisitBinaryOperation(node->binary_operation()); |
| 352 VisitReference(node->target()); | 355 VisitReference(node->target()); |
| 353 Visit(node->value()); | 356 Visit(node->value()); |
| 354 ReserveFeedbackSlots(node); | 357 ReserveFeedbackSlots(node); |
| 355 } | 358 } |
| 356 | 359 |
| 357 | 360 |
| 358 void AstNumberingVisitor::VisitBinaryOperation(BinaryOperation* node) { | 361 void AstNumberingVisitor::VisitBinaryOperation(BinaryOperation* node) { |
| 359 IncrementNodeCount(); | 362 IncrementNodeCount(); |
| 360 node->set_base_id(ReserveIdRange(BinaryOperation::num_ids())); | 363 node->set_base_id(ReserveIdRange(BinaryOperation::num_ids())); |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 583 } | 586 } |
| 584 | 587 |
| 585 | 588 |
| 586 bool AstNumbering::Renumber(Isolate* isolate, Zone* zone, | 589 bool AstNumbering::Renumber(Isolate* isolate, Zone* zone, |
| 587 FunctionLiteral* function) { | 590 FunctionLiteral* function) { |
| 588 AstNumberingVisitor visitor(isolate, zone); | 591 AstNumberingVisitor visitor(isolate, zone); |
| 589 return visitor.Renumber(function); | 592 return visitor.Renumber(function); |
| 590 } | 593 } |
| 591 } // namespace internal | 594 } // namespace internal |
| 592 } // namespace v8 | 595 } // namespace v8 |
| OLD | NEW |