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 489 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
500 Literal* lit_key = expr->key()->AsLiteral(); | 500 Literal* lit_key = expr->key()->AsLiteral(); |
501 DCHECK(lit_key != NULL && lit_key->value()->IsString()); | 501 DCHECK(lit_key != NULL && lit_key->value()->IsString()); |
502 Handle<String> name = Handle<String>::cast(lit_key->value()); | 502 Handle<String> name = Handle<String>::cast(lit_key->value()); |
503 if (FLAG_vector_ics) { | 503 if (FLAG_vector_ics) { |
504 oracle()->PropertyReceiverTypes(slot, name, expr->GetReceiverTypes()); | 504 oracle()->PropertyReceiverTypes(slot, name, expr->GetReceiverTypes()); |
505 } else { | 505 } else { |
506 oracle()->PropertyReceiverTypes(id, name, expr->GetReceiverTypes()); | 506 oracle()->PropertyReceiverTypes(id, name, expr->GetReceiverTypes()); |
507 } | 507 } |
508 } else { | 508 } else { |
509 bool is_string; | 509 bool is_string; |
510 IcCheckType key_type; | |
510 if (FLAG_vector_ics) { | 511 if (FLAG_vector_ics) { |
511 oracle()->KeyedPropertyReceiverTypes(slot, expr->GetReceiverTypes(), | 512 oracle()->KeyedPropertyReceiverTypes(slot, expr->GetReceiverTypes(), |
512 &is_string); | 513 &is_string); |
514 key_type = ELEMENT; | |
Jakob Kummerow
2014/12/15 13:07:57
Yeah, actually this is a problem, because it means
| |
513 } else { | 515 } else { |
514 oracle()->KeyedPropertyReceiverTypes(id, expr->GetReceiverTypes(), | 516 oracle()->KeyedPropertyReceiverTypes(id, expr->GetReceiverTypes(), |
515 &is_string); | 517 &is_string, &key_type); |
516 } | 518 } |
517 expr->set_is_string_access(is_string); | 519 expr->set_is_string_access(is_string); |
520 expr->set_key_type(key_type); | |
518 } | 521 } |
519 } | 522 } |
520 | 523 |
521 RECURSE(Visit(expr->obj())); | 524 RECURSE(Visit(expr->obj())); |
522 RECURSE(Visit(expr->key())); | 525 RECURSE(Visit(expr->key())); |
523 | 526 |
524 // We don't know anything about the result type. | 527 // We don't know anything about the result type. |
525 } | 528 } |
526 | 529 |
527 | 530 |
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
806 void AstTyper::VisitModuleUrl(ModuleUrl* module) { | 809 void AstTyper::VisitModuleUrl(ModuleUrl* module) { |
807 } | 810 } |
808 | 811 |
809 | 812 |
810 void AstTyper::VisitModuleStatement(ModuleStatement* stmt) { | 813 void AstTyper::VisitModuleStatement(ModuleStatement* stmt) { |
811 RECURSE(Visit(stmt->body())); | 814 RECURSE(Visit(stmt->body())); |
812 } | 815 } |
813 | 816 |
814 | 817 |
815 } } // namespace v8::internal | 818 } } // namespace v8::internal |
OLD | NEW |