OLD | NEW |
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 476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
487 TypeFeedbackId id = expr->PropertyFeedbackId(); | 487 TypeFeedbackId id = expr->PropertyFeedbackId(); |
488 expr->set_is_uninitialized(oracle()->LoadIsUninitialized(id)); | 488 expr->set_is_uninitialized(oracle()->LoadIsUninitialized(id)); |
489 if (!expr->IsUninitialized()) { | 489 if (!expr->IsUninitialized()) { |
490 if (expr->key()->IsPropertyName()) { | 490 if (expr->key()->IsPropertyName()) { |
491 Literal* lit_key = expr->key()->AsLiteral(); | 491 Literal* lit_key = expr->key()->AsLiteral(); |
492 DCHECK(lit_key != NULL && lit_key->value()->IsString()); | 492 DCHECK(lit_key != NULL && lit_key->value()->IsString()); |
493 Handle<String> name = Handle<String>::cast(lit_key->value()); | 493 Handle<String> name = Handle<String>::cast(lit_key->value()); |
494 oracle()->PropertyReceiverTypes(id, name, expr->GetReceiverTypes()); | 494 oracle()->PropertyReceiverTypes(id, name, expr->GetReceiverTypes()); |
495 } else { | 495 } else { |
496 bool is_string; | 496 bool is_string; |
| 497 IcCheckType key_type; |
497 oracle()->KeyedPropertyReceiverTypes( | 498 oracle()->KeyedPropertyReceiverTypes( |
498 id, expr->GetReceiverTypes(), &is_string); | 499 id, expr->GetReceiverTypes(), &is_string, &key_type); |
499 expr->set_is_string_access(is_string); | 500 expr->set_is_string_access(is_string); |
| 501 expr->set_key_type(key_type); |
500 } | 502 } |
501 } | 503 } |
502 | 504 |
503 RECURSE(Visit(expr->obj())); | 505 RECURSE(Visit(expr->obj())); |
504 RECURSE(Visit(expr->key())); | 506 RECURSE(Visit(expr->key())); |
505 | 507 |
506 // We don't know anything about the result type. | 508 // We don't know anything about the result type. |
507 } | 509 } |
508 | 510 |
509 | 511 |
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
783 void AstTyper::VisitModuleUrl(ModuleUrl* module) { | 785 void AstTyper::VisitModuleUrl(ModuleUrl* module) { |
784 } | 786 } |
785 | 787 |
786 | 788 |
787 void AstTyper::VisitModuleStatement(ModuleStatement* stmt) { | 789 void AstTyper::VisitModuleStatement(ModuleStatement* stmt) { |
788 RECURSE(Visit(stmt->body())); | 790 RECURSE(Visit(stmt->body())); |
789 } | 791 } |
790 | 792 |
791 | 793 |
792 } } // namespace v8::internal | 794 } } // namespace v8::internal |
OLD | NEW |