| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 515 } | 515 } |
| 516 | 516 |
| 517 | 517 |
| 518 void TypeFeedbackOracle::CollectReceiverTypes(TypeFeedbackId ast_id, | 518 void TypeFeedbackOracle::CollectReceiverTypes(TypeFeedbackId ast_id, |
| 519 Handle<String> name, | 519 Handle<String> name, |
| 520 Code::Flags flags, | 520 Code::Flags flags, |
| 521 SmallMapList* types) { | 521 SmallMapList* types) { |
| 522 Handle<Object> object = GetInfo(ast_id); | 522 Handle<Object> object = GetInfo(ast_id); |
| 523 if (object->IsUndefined() || object->IsSmi()) return; | 523 if (object->IsUndefined() || object->IsSmi()) return; |
| 524 | 524 |
| 525 if (object.is_identical_to(isolate_->builtins()->StoreIC_GlobalProxy())) { | 525 if (object->IsMap()) { |
| 526 // TODO(fschneider): We could collect the maps and signal that | |
| 527 // we need a generic store (or load) here. | |
| 528 ASSERT(Handle<Code>::cast(object)->ic_state() == GENERIC); | |
| 529 } else if (object->IsMap()) { | |
| 530 types->AddMapIfMissing(Handle<Map>::cast(object), zone()); | 526 types->AddMapIfMissing(Handle<Map>::cast(object), zone()); |
| 531 } else if (Handle<Code>::cast(object)->ic_state() == POLYMORPHIC || | 527 } else if (Handle<Code>::cast(object)->ic_state() == POLYMORPHIC || |
| 532 Handle<Code>::cast(object)->ic_state() == MONOMORPHIC) { | 528 Handle<Code>::cast(object)->ic_state() == MONOMORPHIC) { |
| 533 CollectPolymorphicMaps(Handle<Code>::cast(object), types); | 529 CollectPolymorphicMaps(Handle<Code>::cast(object), types); |
| 534 } else if (FLAG_collect_megamorphic_maps_from_stub_cache && | 530 } else if (FLAG_collect_megamorphic_maps_from_stub_cache && |
| 535 Handle<Code>::cast(object)->ic_state() == MEGAMORPHIC) { | 531 Handle<Code>::cast(object)->ic_state() == MEGAMORPHIC) { |
| 536 types->Reserve(4, zone()); | 532 types->Reserve(4, zone()); |
| 537 ASSERT(object->IsCode()); | 533 ASSERT(object->IsCode()); |
| 538 isolate_->stub_cache()->CollectMatchingMaps(types, | 534 isolate_->stub_cache()->CollectMatchingMaps(types, |
| 539 name, | 535 name, |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 744 if (info.IsUninitialized()) return Representation::None(); | 740 if (info.IsUninitialized()) return Representation::None(); |
| 745 if (info.IsSmi()) return Representation::Smi(); | 741 if (info.IsSmi()) return Representation::Smi(); |
| 746 if (info.IsInteger32()) return Representation::Integer32(); | 742 if (info.IsInteger32()) return Representation::Integer32(); |
| 747 if (info.IsDouble()) return Representation::Double(); | 743 if (info.IsDouble()) return Representation::Double(); |
| 748 if (info.IsNumber()) return Representation::Double(); | 744 if (info.IsNumber()) return Representation::Double(); |
| 749 return Representation::Tagged(); | 745 return Representation::Tagged(); |
| 750 } | 746 } |
| 751 | 747 |
| 752 | 748 |
| 753 } } // namespace v8::internal | 749 } } // namespace v8::internal |
| OLD | NEW |