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 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
445 node->set_base_id(ReserveIdRange(ForStatement::num_ids())); | 445 node->set_base_id(ReserveIdRange(ForStatement::num_ids())); |
446 if (node->init() != NULL) Visit(node->init()); | 446 if (node->init() != NULL) Visit(node->init()); |
447 if (node->cond() != NULL) Visit(node->cond()); | 447 if (node->cond() != NULL) Visit(node->cond()); |
448 if (node->next() != NULL) Visit(node->next()); | 448 if (node->next() != NULL) Visit(node->next()); |
449 Visit(node->body()); | 449 Visit(node->body()); |
450 } | 450 } |
451 | 451 |
452 | 452 |
453 void AstNumberingVisitor::VisitClassLiteral(ClassLiteral* node) { | 453 void AstNumberingVisitor::VisitClassLiteral(ClassLiteral* node) { |
454 IncrementNodeCount(); | 454 IncrementNodeCount(); |
455 DisableTurbofan(kClassLiteral); | 455 DisableCrankshaft(kClassLiteral); |
456 node->set_base_id(ReserveIdRange(ClassLiteral::num_ids())); | 456 node->set_base_id(ReserveIdRange(ClassLiteral::num_ids())); |
457 if (node->extends()) Visit(node->extends()); | 457 if (node->extends()) Visit(node->extends()); |
458 if (node->constructor()) Visit(node->constructor()); | 458 if (node->constructor()) Visit(node->constructor()); |
459 if (node->class_variable_proxy()) { | 459 if (node->class_variable_proxy()) { |
460 VisitVariableProxy(node->class_variable_proxy()); | 460 VisitVariableProxy(node->class_variable_proxy()); |
461 } | 461 } |
462 for (int i = 0; i < node->properties()->length(); i++) { | 462 for (int i = 0; i < node->properties()->length(); i++) { |
463 VisitObjectLiteralProperty(node->properties()->at(i)); | 463 VisitObjectLiteralProperty(node->properties()->at(i)); |
464 } | 464 } |
465 } | 465 } |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
570 return Finish(node); | 570 return Finish(node); |
571 } | 571 } |
572 | 572 |
573 | 573 |
574 bool AstNumbering::Renumber(FunctionLiteral* function, Zone* zone) { | 574 bool AstNumbering::Renumber(FunctionLiteral* function, Zone* zone) { |
575 AstNumberingVisitor visitor(zone); | 575 AstNumberingVisitor visitor(zone); |
576 return visitor.Renumber(function); | 576 return visitor.Renumber(function); |
577 } | 577 } |
578 } | 578 } |
579 } // namespace v8::internal | 579 } // namespace v8::internal |
OLD | NEW |