| 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 430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 441 Visit(node->body()); | 441 Visit(node->body()); |
| 442 } | 442 } |
| 443 | 443 |
| 444 | 444 |
| 445 void AstNumberingVisitor::VisitClassLiteral(ClassLiteral* node) { | 445 void AstNumberingVisitor::VisitClassLiteral(ClassLiteral* node) { |
| 446 IncrementNodeCount(); | 446 IncrementNodeCount(); |
| 447 DisableTurbofan(kClassLiteral); | 447 DisableTurbofan(kClassLiteral); |
| 448 node->set_base_id(ReserveIdRange(ClassLiteral::num_ids())); | 448 node->set_base_id(ReserveIdRange(ClassLiteral::num_ids())); |
| 449 if (node->extends()) Visit(node->extends()); | 449 if (node->extends()) Visit(node->extends()); |
| 450 if (node->constructor()) Visit(node->constructor()); | 450 if (node->constructor()) Visit(node->constructor()); |
| 451 if (node->class_variable_proxy()) { |
| 452 VisitVariableProxy(node->class_variable_proxy()); |
| 453 } |
| 451 for (int i = 0; i < node->properties()->length(); i++) { | 454 for (int i = 0; i < node->properties()->length(); i++) { |
| 452 VisitObjectLiteralProperty(node->properties()->at(i)); | 455 VisitObjectLiteralProperty(node->properties()->at(i)); |
| 453 } | 456 } |
| 454 } | 457 } |
| 455 | 458 |
| 456 | 459 |
| 457 void AstNumberingVisitor::VisitObjectLiteral(ObjectLiteral* node) { | 460 void AstNumberingVisitor::VisitObjectLiteral(ObjectLiteral* node) { |
| 458 IncrementNodeCount(); | 461 IncrementNodeCount(); |
| 459 node->set_base_id(ReserveIdRange(ObjectLiteral::num_ids())); | 462 node->set_base_id(ReserveIdRange(ObjectLiteral::num_ids())); |
| 460 for (int i = 0; i < node->properties()->length(); i++) { | 463 for (int i = 0; i < node->properties()->length(); i++) { |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 547 } | 550 } |
| 548 | 551 |
| 549 | 552 |
| 550 bool AstNumbering::Renumber(FunctionLiteral* function, Zone* zone) { | 553 bool AstNumbering::Renumber(FunctionLiteral* function, Zone* zone) { |
| 551 AstNumberingVisitor visitor(zone); | 554 AstNumberingVisitor visitor(zone); |
| 552 visitor.Renumber(function); | 555 visitor.Renumber(function); |
| 553 return !visitor.HasStackOverflow(); | 556 return !visitor.HasStackOverflow(); |
| 554 } | 557 } |
| 555 } | 558 } |
| 556 } // namespace v8::internal | 559 } // namespace v8::internal |
| OLD | NEW |