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

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

Issue 1150323002: Move work to omit unnecessary ObjectLiteral stores to the numbering pass. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: REBASE. Created 5 years, 6 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/arm64/full-codegen-arm64.cc ('k') | src/compiler/ast-graph-builder.cc » ('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/scopes.h" 9 #include "src/scopes.h"
10 10
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 } 425 }
426 } 426 }
427 427
428 428
429 void AstNumberingVisitor::VisitObjectLiteral(ObjectLiteral* node) { 429 void AstNumberingVisitor::VisitObjectLiteral(ObjectLiteral* node) {
430 IncrementNodeCount(); 430 IncrementNodeCount();
431 node->set_base_id(ReserveIdRange(node->num_ids())); 431 node->set_base_id(ReserveIdRange(node->num_ids()));
432 for (int i = 0; i < node->properties()->length(); i++) { 432 for (int i = 0; i < node->properties()->length(); i++) {
433 VisitObjectLiteralProperty(node->properties()->at(i)); 433 VisitObjectLiteralProperty(node->properties()->at(i));
434 } 434 }
435 // Mark all computed expressions that are bound to a key that
436 // is shadowed by a later occurrence of the same key. For the
437 // marked expressions, no store code will be is emitted.
438 node->CalculateEmitStore(zone());
435 } 439 }
436 440
437 441
438 void AstNumberingVisitor::VisitObjectLiteralProperty( 442 void AstNumberingVisitor::VisitObjectLiteralProperty(
439 ObjectLiteralProperty* node) { 443 ObjectLiteralProperty* node) {
440 if (node->is_computed_name()) DisableOptimization(kComputedPropertyName); 444 if (node->is_computed_name()) DisableOptimization(kComputedPropertyName);
441 Visit(node->key()); 445 Visit(node->key());
442 Visit(node->value()); 446 Visit(node->value());
443 } 447 }
444 448
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
532 } 536 }
533 537
534 538
535 bool AstNumbering::Renumber(Isolate* isolate, Zone* zone, 539 bool AstNumbering::Renumber(Isolate* isolate, Zone* zone,
536 FunctionLiteral* function) { 540 FunctionLiteral* function) {
537 AstNumberingVisitor visitor(isolate, zone); 541 AstNumberingVisitor visitor(isolate, zone);
538 return visitor.Renumber(function); 542 return visitor.Renumber(function);
539 } 543 }
540 } 544 }
541 } // namespace v8::internal 545 } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm64/full-codegen-arm64.cc ('k') | src/compiler/ast-graph-builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698