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

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

Issue 722793005: Classes: Implement correct name binding (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: git rebase Created 6 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « src/ast.h ('k') | src/full-codegen.h » ('j') | src/parser.cc » ('J')
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 430 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « src/ast.h ('k') | src/full-codegen.h » ('j') | src/parser.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698