| 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 457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 468 SmallMapList* types) { | 468 SmallMapList* types) { |
| 469 Handle<Object> object = GetInfo(ast_id); | 469 Handle<Object> object = GetInfo(ast_id); |
| 470 if (object->IsUndefined() || object->IsSmi()) return; | 470 if (object->IsUndefined() || object->IsSmi()) return; |
| 471 | 471 |
| 472 if (object.is_identical_to(isolate_->builtins()->StoreIC_GlobalProxy())) { | 472 if (object.is_identical_to(isolate_->builtins()->StoreIC_GlobalProxy())) { |
| 473 // TODO(fschneider): We could collect the maps and signal that | 473 // TODO(fschneider): We could collect the maps and signal that |
| 474 // we need a generic store (or load) here. | 474 // we need a generic store (or load) here. |
| 475 ASSERT(Handle<Code>::cast(object)->ic_state() == GENERIC); | 475 ASSERT(Handle<Code>::cast(object)->ic_state() == GENERIC); |
| 476 } else if (object->IsMap()) { | 476 } else if (object->IsMap()) { |
| 477 types->AddMapIfMissing(Handle<Map>::cast(object), zone()); | 477 types->AddMapIfMissing(Handle<Map>::cast(object), zone()); |
| 478 } else if (Handle<Code>::cast(object)->ic_state() == POLYMORPHIC) { | 478 } else if (Handle<Code>::cast(object)->ic_state() == POLYMORPHIC || |
| 479 Handle<Code>::cast(object)->ic_state() == MONOMORPHIC) { |
| 479 CollectPolymorphicMaps(Handle<Code>::cast(object), types); | 480 CollectPolymorphicMaps(Handle<Code>::cast(object), types); |
| 480 } else if (FLAG_collect_megamorphic_maps_from_stub_cache && | 481 } else if (FLAG_collect_megamorphic_maps_from_stub_cache && |
| 481 Handle<Code>::cast(object)->ic_state() == MEGAMORPHIC) { | 482 Handle<Code>::cast(object)->ic_state() == MEGAMORPHIC) { |
| 482 types->Reserve(4, zone()); | 483 types->Reserve(4, zone()); |
| 483 ASSERT(object->IsCode()); | 484 ASSERT(object->IsCode()); |
| 484 isolate_->stub_cache()->CollectMatchingMaps(types, | 485 isolate_->stub_cache()->CollectMatchingMaps(types, |
| 485 name, | 486 name, |
| 486 flags, | 487 flags, |
| 487 native_context_, | 488 native_context_, |
| 488 zone()); | 489 zone()); |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 673 USE(maybe_result); | 674 USE(maybe_result); |
| 674 #ifdef DEBUG | 675 #ifdef DEBUG |
| 675 Object* result = NULL; | 676 Object* result = NULL; |
| 676 // Dictionary has been allocated with sufficient size for all elements. | 677 // Dictionary has been allocated with sufficient size for all elements. |
| 677 ASSERT(maybe_result->ToObject(&result)); | 678 ASSERT(maybe_result->ToObject(&result)); |
| 678 ASSERT(*dictionary_ == result); | 679 ASSERT(*dictionary_ == result); |
| 679 #endif | 680 #endif |
| 680 } | 681 } |
| 681 | 682 |
| 682 } } // namespace v8::internal | 683 } } // namespace v8::internal |
| OLD | NEW |