| 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 468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 479 SmallMapList* types) { | 479 SmallMapList* types) { |
| 480 Handle<Object> object = GetInfo(ast_id); | 480 Handle<Object> object = GetInfo(ast_id); |
| 481 if (object->IsUndefined() || object->IsSmi()) return; | 481 if (object->IsUndefined() || object->IsSmi()) return; |
| 482 | 482 |
| 483 if (object.is_identical_to(isolate_->builtins()->StoreIC_GlobalProxy())) { | 483 if (object.is_identical_to(isolate_->builtins()->StoreIC_GlobalProxy())) { |
| 484 // TODO(fschneider): We could collect the maps and signal that | 484 // TODO(fschneider): We could collect the maps and signal that |
| 485 // we need a generic store (or load) here. | 485 // we need a generic store (or load) here. |
| 486 ASSERT(Handle<Code>::cast(object)->ic_state() == GENERIC); | 486 ASSERT(Handle<Code>::cast(object)->ic_state() == GENERIC); |
| 487 } else if (object->IsMap()) { | 487 } else if (object->IsMap()) { |
| 488 types->AddMapIfMissing(Handle<Map>::cast(object), zone()); | 488 types->AddMapIfMissing(Handle<Map>::cast(object), zone()); |
| 489 } else if (Handle<Code>::cast(object)->ic_state() == POLYMORPHIC) { | 489 } else if (Handle<Code>::cast(object)->ic_state() == POLYMORPHIC || |
| 490 Handle<Code>::cast(object)->ic_state() == MONOMORPHIC) { |
| 490 CollectPolymorphicMaps(Handle<Code>::cast(object), types); | 491 CollectPolymorphicMaps(Handle<Code>::cast(object), types); |
| 491 } else if (FLAG_collect_megamorphic_maps_from_stub_cache && | 492 } else if (FLAG_collect_megamorphic_maps_from_stub_cache && |
| 492 Handle<Code>::cast(object)->ic_state() == MEGAMORPHIC) { | 493 Handle<Code>::cast(object)->ic_state() == MEGAMORPHIC) { |
| 493 types->Reserve(4, zone()); | 494 types->Reserve(4, zone()); |
| 494 ASSERT(object->IsCode()); | 495 ASSERT(object->IsCode()); |
| 495 isolate_->stub_cache()->CollectMatchingMaps(types, | 496 isolate_->stub_cache()->CollectMatchingMaps(types, |
| 496 name, | 497 name, |
| 497 flags, | 498 flags, |
| 498 native_context_, | 499 native_context_, |
| 499 zone()); | 500 zone()); |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 684 USE(maybe_result); | 685 USE(maybe_result); |
| 685 #ifdef DEBUG | 686 #ifdef DEBUG |
| 686 Object* result = NULL; | 687 Object* result = NULL; |
| 687 // Dictionary has been allocated with sufficient size for all elements. | 688 // Dictionary has been allocated with sufficient size for all elements. |
| 688 ASSERT(maybe_result->ToObject(&result)); | 689 ASSERT(maybe_result->ToObject(&result)); |
| 689 ASSERT(*dictionary_ == result); | 690 ASSERT(*dictionary_ == result); |
| 690 #endif | 691 #endif |
| 691 } | 692 } |
| 692 | 693 |
| 693 } } // namespace v8::internal | 694 } } // namespace v8::internal |
| OLD | NEW |