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 809433002: Revert of 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);
480 Visit(node->key()); 479 Visit(node->key());
481 Visit(node->value()); 480 Visit(node->value());
482 } 481 }
483 482
484 483
485 void AstNumberingVisitor::VisitArrayLiteral(ArrayLiteral* node) { 484 void AstNumberingVisitor::VisitArrayLiteral(ArrayLiteral* node) {
486 IncrementNodeCount(); 485 IncrementNodeCount();
487 node->set_base_id(ReserveIdRange(node->num_ids())); 486 node->set_base_id(ReserveIdRange(node->num_ids()));
488 for (int i = 0; i < node->values()->length(); i++) { 487 for (int i = 0; i < node->values()->length(); i++) {
489 Visit(node->values()->at(i)); 488 Visit(node->values()->at(i));
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
570 return Finish(node); 569 return Finish(node);
571 } 570 }
572 571
573 572
574 bool AstNumbering::Renumber(FunctionLiteral* function, Zone* zone) { 573 bool AstNumbering::Renumber(FunctionLiteral* function, Zone* zone) {
575 AstNumberingVisitor visitor(zone); 574 AstNumberingVisitor visitor(zone);
576 return visitor.Renumber(function); 575 return visitor.Renumber(function);
577 } 576 }
578 } 577 }
579 } // namespace v8::internal 578 } // 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