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

Side by Side Diff: src/typing.cc

Issue 408193002: Move function prototype handling into a special handler rather than IC (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Don't ensure that the IC state is monomorphic, but rather that the stubcache only contains handlers Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « src/type-info.cc ('k') | src/x64/lithium-codegen-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/parser.h" // for CompileTimeValue; TODO(rossberg): should move 9 #include "src/parser.h" // for CompileTimeValue; TODO(rossberg): should move
10 #include "src/scopes.h" 10 #include "src/scopes.h"
(...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after
478 478
479 void AstTyper::VisitProperty(Property* expr) { 479 void AstTyper::VisitProperty(Property* expr) {
480 // Collect type feedback. 480 // Collect type feedback.
481 TypeFeedbackId id = expr->PropertyFeedbackId(); 481 TypeFeedbackId id = expr->PropertyFeedbackId();
482 expr->set_is_uninitialized(oracle()->LoadIsUninitialized(id)); 482 expr->set_is_uninitialized(oracle()->LoadIsUninitialized(id));
483 if (!expr->IsUninitialized()) { 483 if (!expr->IsUninitialized()) {
484 if (expr->key()->IsPropertyName()) { 484 if (expr->key()->IsPropertyName()) {
485 Literal* lit_key = expr->key()->AsLiteral(); 485 Literal* lit_key = expr->key()->AsLiteral();
486 ASSERT(lit_key != NULL && lit_key->value()->IsString()); 486 ASSERT(lit_key != NULL && lit_key->value()->IsString());
487 Handle<String> name = Handle<String>::cast(lit_key->value()); 487 Handle<String> name = Handle<String>::cast(lit_key->value());
488 bool is_prototype; 488 oracle()->PropertyReceiverTypes(id, name, expr->GetReceiverTypes());
489 oracle()->PropertyReceiverTypes(
490 id, name, expr->GetReceiverTypes(), &is_prototype);
491 expr->set_is_function_prototype(is_prototype);
492 } else { 489 } else {
493 bool is_string; 490 bool is_string;
494 oracle()->KeyedPropertyReceiverTypes( 491 oracle()->KeyedPropertyReceiverTypes(
495 id, expr->GetReceiverTypes(), &is_string); 492 id, expr->GetReceiverTypes(), &is_string);
496 expr->set_is_string_access(is_string); 493 expr->set_is_string_access(is_string);
497 } 494 }
498 } 495 }
499 496
500 RECURSE(Visit(expr->obj())); 497 RECURSE(Visit(expr->obj()));
501 RECURSE(Visit(expr->key())); 498 RECURSE(Visit(expr->key()));
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
773 void AstTyper::VisitModuleUrl(ModuleUrl* module) { 770 void AstTyper::VisitModuleUrl(ModuleUrl* module) {
774 } 771 }
775 772
776 773
777 void AstTyper::VisitModuleStatement(ModuleStatement* stmt) { 774 void AstTyper::VisitModuleStatement(ModuleStatement* stmt) {
778 RECURSE(Visit(stmt->body())); 775 RECURSE(Visit(stmt->body()));
779 } 776 }
780 777
781 778
782 } } // namespace v8::internal 779 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/type-info.cc ('k') | src/x64/lithium-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698