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

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

Issue 1321993004: Vector ICs: ObjectLiteral refactoring for Oracle feedback (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: REBASE, turned off flag. Created 5 years, 3 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.cc ('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/ast-numbering.h" 5 #include "src/ast-numbering.h"
6 6
7 #include "src/ast.h" 7 #include "src/ast.h"
8 #include "src/scopes.h" 8 #include "src/scopes.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after
456 node->set_base_id(ReserveIdRange(node->num_ids())); 456 node->set_base_id(ReserveIdRange(node->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 ReserveFeedbackSlots(node); 465 ReserveFeedbackSlots(node);
466 node->LayoutFeedbackSlots();
466 } 467 }
467 468
468 469
469 void AstNumberingVisitor::VisitObjectLiteral(ObjectLiteral* node) { 470 void AstNumberingVisitor::VisitObjectLiteral(ObjectLiteral* node) {
470 IncrementNodeCount(); 471 IncrementNodeCount();
471 node->set_base_id(ReserveIdRange(node->num_ids())); 472 node->set_base_id(ReserveIdRange(node->num_ids()));
472 for (int i = 0; i < node->properties()->length(); i++) { 473 for (int i = 0; i < node->properties()->length(); i++) {
473 VisitObjectLiteralProperty(node->properties()->at(i)); 474 VisitObjectLiteralProperty(node->properties()->at(i));
474 } 475 }
475 node->BuildConstantProperties(isolate()); 476 node->BuildConstantProperties(isolate());
476 // Mark all computed expressions that are bound to a key that 477 // Mark all computed expressions that are bound to a key that
477 // is shadowed by a later occurrence of the same key. For the 478 // is shadowed by a later occurrence of the same key. For the
478 // marked expressions, no store code will be is emitted. 479 // marked expressions, no store code will be is emitted.
479 node->CalculateEmitStore(zone()); 480 node->CalculateEmitStore(zone());
480 ReserveFeedbackSlots(node); 481 ReserveFeedbackSlots(node);
482 node->LayoutFeedbackSlots();
481 } 483 }
482 484
483 485
484 void AstNumberingVisitor::VisitObjectLiteralProperty( 486 void AstNumberingVisitor::VisitObjectLiteralProperty(
485 ObjectLiteralProperty* node) { 487 ObjectLiteralProperty* node) {
486 if (node->is_computed_name()) DisableCrankshaft(kComputedPropertyName); 488 if (node->is_computed_name()) DisableCrankshaft(kComputedPropertyName);
487 Visit(node->key()); 489 Visit(node->key());
488 Visit(node->value()); 490 Visit(node->value());
489 } 491 }
490 492
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
574 } 576 }
575 577
576 578
577 bool AstNumbering::Renumber(Isolate* isolate, Zone* zone, 579 bool AstNumbering::Renumber(Isolate* isolate, Zone* zone,
578 FunctionLiteral* function) { 580 FunctionLiteral* function) {
579 AstNumberingVisitor visitor(isolate, zone); 581 AstNumberingVisitor visitor(isolate, zone);
580 return visitor.Renumber(function); 582 return visitor.Renumber(function);
581 } 583 }
582 } // namespace internal 584 } // namespace internal
583 } // namespace v8 585 } // namespace v8
OLDNEW
« no previous file with comments | « src/ast.cc ('k') | src/compiler/ast-graph-builder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698