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

Side by Side Diff: src/typing.cc

Issue 1316953003: Vector ICs: Make the Oracle gather feedback for vector stores. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Slight update. 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/type-info.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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/typing.h" 5 #include "src/typing.h"
6 6
7 #include "src/frames.h" 7 #include "src/frames.h"
8 #include "src/frames-inl.h" 8 #include "src/frames-inl.h"
9 #include "src/ostreams.h" 9 #include "src/ostreams.h"
10 #include "src/parser.h" // for CompileTimeValue; TODO(rossberg): should move 10 #include "src/parser.h" // for CompileTimeValue; TODO(rossberg): should move
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 420
421 NarrowType(expr, Bounds(Type::Object(zone()))); 421 NarrowType(expr, Bounds(Type::Object(zone())));
422 } 422 }
423 423
424 424
425 void AstTyper::VisitAssignment(Assignment* expr) { 425 void AstTyper::VisitAssignment(Assignment* expr) {
426 // Collect type feedback. 426 // Collect type feedback.
427 Property* prop = expr->target()->AsProperty(); 427 Property* prop = expr->target()->AsProperty();
428 if (prop != NULL) { 428 if (prop != NULL) {
429 TypeFeedbackId id = expr->AssignmentFeedbackId(); 429 TypeFeedbackId id = expr->AssignmentFeedbackId();
430 expr->set_is_uninitialized(oracle()->StoreIsUninitialized(id)); 430 FeedbackVectorICSlot slot = expr->AssignmentSlot();
431 expr->set_is_uninitialized(FLAG_vector_stores
432 ? oracle()->StoreIsUninitialized(slot)
433 : oracle()->StoreIsUninitialized(id));
431 if (!expr->IsUninitialized()) { 434 if (!expr->IsUninitialized()) {
435 SmallMapList* receiver_types = expr->GetReceiverTypes();
432 if (prop->key()->IsPropertyName()) { 436 if (prop->key()->IsPropertyName()) {
433 Literal* lit_key = prop->key()->AsLiteral(); 437 Literal* lit_key = prop->key()->AsLiteral();
434 DCHECK(lit_key != NULL && lit_key->value()->IsString()); 438 DCHECK(lit_key != NULL && lit_key->value()->IsString());
435 Handle<String> name = Handle<String>::cast(lit_key->value()); 439 Handle<String> name = Handle<String>::cast(lit_key->value());
436 oracle()->AssignmentReceiverTypes(id, name, expr->GetReceiverTypes()); 440 if (FLAG_vector_stores) {
441 oracle()->AssignmentReceiverTypes(slot, name, receiver_types);
442 } else {
443 oracle()->AssignmentReceiverTypes(id, name, receiver_types);
444 }
437 } else { 445 } else {
438 KeyedAccessStoreMode store_mode; 446 KeyedAccessStoreMode store_mode;
439 IcCheckType key_type; 447 IcCheckType key_type;
440 oracle()->KeyedAssignmentReceiverTypes(id, expr->GetReceiverTypes(), 448 if (FLAG_vector_stores) {
441 &store_mode, &key_type); 449 oracle()->KeyedAssignmentReceiverTypes(slot, receiver_types,
450 &store_mode, &key_type);
451 } else {
452 oracle()->KeyedAssignmentReceiverTypes(id, receiver_types,
453 &store_mode, &key_type);
454 }
442 expr->set_store_mode(store_mode); 455 expr->set_store_mode(store_mode);
443 expr->set_key_type(key_type); 456 expr->set_key_type(key_type);
444 } 457 }
445 } 458 }
446 } 459 }
447 460
448 Expression* rhs = 461 Expression* rhs =
449 expr->is_compound() ? expr->binary_operation() : expr->value(); 462 expr->is_compound() ? expr->binary_operation() : expr->value();
450 RECURSE(Visit(expr->target())); 463 RECURSE(Visit(expr->target()));
451 RECURSE(Visit(rhs)); 464 RECURSE(Visit(rhs));
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
777 void AstTyper::VisitImportDeclaration(ImportDeclaration* declaration) { 790 void AstTyper::VisitImportDeclaration(ImportDeclaration* declaration) {
778 } 791 }
779 792
780 793
781 void AstTyper::VisitExportDeclaration(ExportDeclaration* declaration) { 794 void AstTyper::VisitExportDeclaration(ExportDeclaration* declaration) {
782 } 795 }
783 796
784 797
785 } // namespace internal 798 } // namespace internal
786 } // namespace v8 799 } // namespace v8
OLDNEW
« no previous file with comments | « src/type-info.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698