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

Side by Side Diff: src/typing.cc

Issue 1129853002: Removing FLAG_vector_ics. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Comment response. Created 5 years, 7 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-feedback-vector-inl.h ('k') | src/x64/code-stubs-x64.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 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 474 matching lines...) Expand 10 before | Expand all | Expand 10 after
485 RECURSE(Visit(expr->exception())); 485 RECURSE(Visit(expr->exception()));
486 // TODO(rossberg): is it worth having a non-termination effect? 486 // TODO(rossberg): is it worth having a non-termination effect?
487 487
488 NarrowType(expr, Bounds(Type::None(zone()))); 488 NarrowType(expr, Bounds(Type::None(zone())));
489 } 489 }
490 490
491 491
492 void AstTyper::VisitProperty(Property* expr) { 492 void AstTyper::VisitProperty(Property* expr) {
493 // Collect type feedback. 493 // Collect type feedback.
494 FeedbackVectorICSlot slot(FeedbackVectorICSlot::Invalid()); 494 FeedbackVectorICSlot slot(FeedbackVectorICSlot::Invalid());
495 TypeFeedbackId id(TypeFeedbackId::None()); 495 slot = expr->PropertyFeedbackSlot();
496 if (FLAG_vector_ics) { 496 expr->set_inline_cache_state(oracle()->LoadInlineCacheState(slot));
497 slot = expr->PropertyFeedbackSlot();
498 expr->set_inline_cache_state(oracle()->LoadInlineCacheState(slot));
499 } else {
500 id = expr->PropertyFeedbackId();
501 expr->set_inline_cache_state(oracle()->LoadInlineCacheState(id));
502 }
503 497
504 if (!expr->IsUninitialized()) { 498 if (!expr->IsUninitialized()) {
505 if (expr->key()->IsPropertyName()) { 499 if (expr->key()->IsPropertyName()) {
506 Literal* lit_key = expr->key()->AsLiteral(); 500 Literal* lit_key = expr->key()->AsLiteral();
507 DCHECK(lit_key != NULL && lit_key->value()->IsString()); 501 DCHECK(lit_key != NULL && lit_key->value()->IsString());
508 Handle<String> name = Handle<String>::cast(lit_key->value()); 502 Handle<String> name = Handle<String>::cast(lit_key->value());
509 if (FLAG_vector_ics) { 503 oracle()->PropertyReceiverTypes(slot, name, expr->GetReceiverTypes());
510 oracle()->PropertyReceiverTypes(slot, name, expr->GetReceiverTypes());
511 } else {
512 oracle()->PropertyReceiverTypes(id, name, expr->GetReceiverTypes());
513 }
514 } else { 504 } else {
515 bool is_string; 505 bool is_string;
516 IcCheckType key_type; 506 IcCheckType key_type;
517 if (FLAG_vector_ics) { 507 oracle()->KeyedPropertyReceiverTypes(slot, expr->GetReceiverTypes(),
518 oracle()->KeyedPropertyReceiverTypes(slot, expr->GetReceiverTypes(), 508 &is_string, &key_type);
519 &is_string, &key_type);
520 } else {
521 oracle()->KeyedPropertyReceiverTypes(id, expr->GetReceiverTypes(),
522 &is_string, &key_type);
523 }
524 expr->set_is_string_access(is_string); 509 expr->set_is_string_access(is_string);
525 expr->set_key_type(key_type); 510 expr->set_key_type(key_type);
526 } 511 }
527 } 512 }
528 513
529 RECURSE(Visit(expr->obj())); 514 RECURSE(Visit(expr->obj()));
530 RECURSE(Visit(expr->key())); 515 RECURSE(Visit(expr->key()));
531 516
532 // We don't know anything about the result type. 517 // We don't know anything about the result type.
533 } 518 }
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
798 783
799 void AstTyper::VisitImportDeclaration(ImportDeclaration* declaration) { 784 void AstTyper::VisitImportDeclaration(ImportDeclaration* declaration) {
800 } 785 }
801 786
802 787
803 void AstTyper::VisitExportDeclaration(ExportDeclaration* declaration) { 788 void AstTyper::VisitExportDeclaration(ExportDeclaration* declaration) {
804 } 789 }
805 790
806 791
807 } } // namespace v8::internal 792 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/type-feedback-vector-inl.h ('k') | src/x64/code-stubs-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698