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

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

Issue 792233008: ES6 computed property names (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years 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.cc ('k') | src/bailout-reason.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 458 matching lines...) Expand 10 before | Expand all | Expand 10 after
469 IncrementNodeCount(); 469 IncrementNodeCount();
470 node->set_base_id(ReserveIdRange(ObjectLiteral::num_ids())); 470 node->set_base_id(ReserveIdRange(ObjectLiteral::num_ids()));
471 for (int i = 0; i < node->properties()->length(); i++) { 471 for (int i = 0; i < node->properties()->length(); i++) {
472 VisitObjectLiteralProperty(node->properties()->at(i)); 472 VisitObjectLiteralProperty(node->properties()->at(i));
473 } 473 }
474 } 474 }
475 475
476 476
477 void AstNumberingVisitor::VisitObjectLiteralProperty( 477 void AstNumberingVisitor::VisitObjectLiteralProperty(
478 ObjectLiteralProperty* node) { 478 ObjectLiteralProperty* node) {
479 if (node->is_computed_name()) DisableTurbofan(kComputedPropertyName);
479 Visit(node->key()); 480 Visit(node->key());
480 Visit(node->value()); 481 Visit(node->value());
481 } 482 }
482 483
483 484
484 void AstNumberingVisitor::VisitArrayLiteral(ArrayLiteral* node) { 485 void AstNumberingVisitor::VisitArrayLiteral(ArrayLiteral* node) {
485 IncrementNodeCount(); 486 IncrementNodeCount();
486 node->set_base_id(ReserveIdRange(node->num_ids())); 487 node->set_base_id(ReserveIdRange(node->num_ids()));
487 for (int i = 0; i < node->values()->length(); i++) { 488 for (int i = 0; i < node->values()->length(); i++) {
488 Visit(node->values()->at(i)); 489 Visit(node->values()->at(i));
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
569 return Finish(node); 570 return Finish(node);
570 } 571 }
571 572
572 573
573 bool AstNumbering::Renumber(FunctionLiteral* function, Zone* zone) { 574 bool AstNumbering::Renumber(FunctionLiteral* function, Zone* zone) {
574 AstNumberingVisitor visitor(zone); 575 AstNumberingVisitor visitor(zone);
575 return visitor.Renumber(function); 576 return visitor.Renumber(function);
576 } 577 }
577 } 578 }
578 } // namespace v8::internal 579 } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ast.cc ('k') | src/bailout-reason.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698