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

Side by Side Diff: src/typing.cc

Issue 754303003: Flesh out vector ic state query and set mechanisms. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: REBASE. 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/type-info.cc ('k') | test/cctest/test-compiler.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 466 matching lines...) Expand 10 before | Expand all | Expand 10 after
477 void AstTyper::VisitThrow(Throw* expr) { 477 void AstTyper::VisitThrow(Throw* expr) {
478 RECURSE(Visit(expr->exception())); 478 RECURSE(Visit(expr->exception()));
479 // TODO(rossberg): is it worth having a non-termination effect? 479 // TODO(rossberg): is it worth having a non-termination effect?
480 480
481 NarrowType(expr, Bounds(Type::None(zone()))); 481 NarrowType(expr, Bounds(Type::None(zone())));
482 } 482 }
483 483
484 484
485 void AstTyper::VisitProperty(Property* expr) { 485 void AstTyper::VisitProperty(Property* expr) {
486 // Collect type feedback. 486 // Collect type feedback.
487 TypeFeedbackId id = expr->PropertyFeedbackId(); 487 FeedbackVectorICSlot slot(FeedbackVectorICSlot::Invalid());
488 expr->set_is_uninitialized(oracle()->LoadIsUninitialized(id)); 488 TypeFeedbackId id(TypeFeedbackId::None());
489 if (FLAG_vector_ics) {
490 slot = expr->PropertyFeedbackSlot();
491 expr->set_is_uninitialized(oracle()->LoadIsUninitialized(slot));
492 } else {
493 id = expr->PropertyFeedbackId();
494 expr->set_is_uninitialized(oracle()->LoadIsUninitialized(id));
495 }
496
489 if (!expr->IsUninitialized()) { 497 if (!expr->IsUninitialized()) {
490 if (expr->key()->IsPropertyName()) { 498 if (expr->key()->IsPropertyName()) {
491 Literal* lit_key = expr->key()->AsLiteral(); 499 Literal* lit_key = expr->key()->AsLiteral();
492 DCHECK(lit_key != NULL && lit_key->value()->IsString()); 500 DCHECK(lit_key != NULL && lit_key->value()->IsString());
493 Handle<String> name = Handle<String>::cast(lit_key->value()); 501 Handle<String> name = Handle<String>::cast(lit_key->value());
494 oracle()->PropertyReceiverTypes(id, name, expr->GetReceiverTypes()); 502 if (FLAG_vector_ics) {
503 oracle()->PropertyReceiverTypes(slot, name, expr->GetReceiverTypes());
504 } else {
505 oracle()->PropertyReceiverTypes(id, name, expr->GetReceiverTypes());
506 }
495 } else { 507 } else {
496 bool is_string; 508 bool is_string;
497 oracle()->KeyedPropertyReceiverTypes( 509 if (FLAG_vector_ics) {
498 id, expr->GetReceiverTypes(), &is_string); 510 oracle()->KeyedPropertyReceiverTypes(slot, expr->GetReceiverTypes(),
511 &is_string);
512 } else {
513 oracle()->KeyedPropertyReceiverTypes(id, expr->GetReceiverTypes(),
514 &is_string);
515 }
499 expr->set_is_string_access(is_string); 516 expr->set_is_string_access(is_string);
500 } 517 }
501 } 518 }
502 519
503 RECURSE(Visit(expr->obj())); 520 RECURSE(Visit(expr->obj()));
504 RECURSE(Visit(expr->key())); 521 RECURSE(Visit(expr->key()));
505 522
506 // We don't know anything about the result type. 523 // We don't know anything about the result type.
507 } 524 }
508 525
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
788 void AstTyper::VisitModuleUrl(ModuleUrl* module) { 805 void AstTyper::VisitModuleUrl(ModuleUrl* module) {
789 } 806 }
790 807
791 808
792 void AstTyper::VisitModuleStatement(ModuleStatement* stmt) { 809 void AstTyper::VisitModuleStatement(ModuleStatement* stmt) {
793 RECURSE(Visit(stmt->body())); 810 RECURSE(Visit(stmt->body()));
794 } 811 }
795 812
796 813
797 } } // namespace v8::internal 814 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/type-info.cc ('k') | test/cctest/test-compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698