| 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 410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 421 Visit(node->body()); | 421 Visit(node->body()); |
| 422 } | 422 } |
| 423 | 423 |
| 424 | 424 |
| 425 void AstNumberingVisitor::VisitClassLiteral(ClassLiteral* node) { | 425 void AstNumberingVisitor::VisitClassLiteral(ClassLiteral* node) { |
| 426 IncrementNodeCount(); | 426 IncrementNodeCount(); |
| 427 DisableTurbofan(kClassLiteral); | 427 DisableTurbofan(kClassLiteral); |
| 428 node->set_base_id(ReserveIdRange(ClassLiteral::num_ids())); | 428 node->set_base_id(ReserveIdRange(ClassLiteral::num_ids())); |
| 429 if (node->extends()) Visit(node->extends()); | 429 if (node->extends()) Visit(node->extends()); |
| 430 if (node->constructor()) Visit(node->constructor()); | 430 if (node->constructor()) Visit(node->constructor()); |
| 431 if (node->class_variable_proxy()) { |
| 432 VisitVariableProxy(node->class_variable_proxy()); |
| 433 } |
| 431 for (int i = 0; i < node->properties()->length(); i++) { | 434 for (int i = 0; i < node->properties()->length(); i++) { |
| 432 VisitObjectLiteralProperty(node->properties()->at(i)); | 435 VisitObjectLiteralProperty(node->properties()->at(i)); |
| 433 } | 436 } |
| 434 } | 437 } |
| 435 | 438 |
| 436 | 439 |
| 437 void AstNumberingVisitor::VisitObjectLiteral(ObjectLiteral* node) { | 440 void AstNumberingVisitor::VisitObjectLiteral(ObjectLiteral* node) { |
| 438 IncrementNodeCount(); | 441 IncrementNodeCount(); |
| 439 node->set_base_id(ReserveIdRange(ObjectLiteral::num_ids())); | 442 node->set_base_id(ReserveIdRange(ObjectLiteral::num_ids())); |
| 440 for (int i = 0; i < node->properties()->length(); i++) { | 443 for (int i = 0; i < node->properties()->length(); i++) { |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 529 } | 532 } |
| 530 | 533 |
| 531 | 534 |
| 532 bool AstNumbering::Renumber(FunctionLiteral* function, Zone* zone) { | 535 bool AstNumbering::Renumber(FunctionLiteral* function, Zone* zone) { |
| 533 AstNumberingVisitor visitor(zone); | 536 AstNumberingVisitor visitor(zone); |
| 534 visitor.Renumber(function); | 537 visitor.Renumber(function); |
| 535 return !visitor.HasStackOverflow(); | 538 return !visitor.HasStackOverflow(); |
| 536 } | 539 } |
| 537 } | 540 } |
| 538 } // namespace v8::internal | 541 } // namespace v8::internal |
| OLD | NEW |