Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Side by Side Diff: src/ast-numbering.cc

Issue 798873006: First simple implementation of class literals in TurboFan. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebased. Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/ast.h ('k') | src/compiler/ast-graph-builder.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/ast.h ('k') | src/compiler/ast-graph-builder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698