| 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 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 481 Handle<String> name, | 481 Handle<String> name, |
| 482 Code::Flags flags, | 482 Code::Flags flags, |
| 483 SmallMapList* types) { | 483 SmallMapList* types) { |
| 484 Handle<Object> object = GetInfo(ast_id); | 484 Handle<Object> object = GetInfo(ast_id); |
| 485 if (object->IsUndefined() || object->IsSmi()) return; | 485 if (object->IsUndefined() || object->IsSmi()) return; |
| 486 | 486 |
| 487 if (*object == | 487 if (*object == |
| 488 isolate_->builtins()->builtin(Builtins::kStoreIC_GlobalProxy)) { | 488 isolate_->builtins()->builtin(Builtins::kStoreIC_GlobalProxy)) { |
| 489 // TODO(fschneider): We could collect the maps and signal that | 489 // TODO(fschneider): We could collect the maps and signal that |
| 490 // we need a generic store (or load) here. | 490 // we need a generic store (or load) here. |
| 491 ASSERT(Handle<Code>::cast(object)->ic_state() == MEGAMORPHIC); | 491 ASSERT(Handle<Code>::cast(object)->ic_state() == GENERIC); |
| 492 } else if (object->IsMap()) { | 492 } else if (object->IsMap()) { |
| 493 types->Add(Handle<Map>::cast(object), zone()); | 493 types->Add(Handle<Map>::cast(object), zone()); |
| 494 } else if (FLAG_collect_megamorphic_maps_from_stub_cache && | 494 } else if (FLAG_collect_megamorphic_maps_from_stub_cache && |
| 495 Handle<Code>::cast(object)->ic_state() == MEGAMORPHIC) { | 495 Handle<Code>::cast(object)->ic_state() == MEGAMORPHIC) { |
| 496 types->Reserve(4, zone()); | 496 types->Reserve(4, zone()); |
| 497 ASSERT(object->IsCode()); | 497 ASSERT(object->IsCode()); |
| 498 isolate_->stub_cache()->CollectMatchingMaps(types, | 498 isolate_->stub_cache()->CollectMatchingMaps(types, |
| 499 *name, | 499 *name, |
| 500 flags, | 500 flags, |
| 501 native_context_, | 501 native_context_, |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 704 USE(maybe_result); | 704 USE(maybe_result); |
| 705 #ifdef DEBUG | 705 #ifdef DEBUG |
| 706 Object* result = NULL; | 706 Object* result = NULL; |
| 707 // Dictionary has been allocated with sufficient size for all elements. | 707 // Dictionary has been allocated with sufficient size for all elements. |
| 708 ASSERT(maybe_result->ToObject(&result)); | 708 ASSERT(maybe_result->ToObject(&result)); |
| 709 ASSERT(*dictionary_ == result); | 709 ASSERT(*dictionary_ == result); |
| 710 #endif | 710 #endif |
| 711 } | 711 } |
| 712 | 712 |
| 713 } } // namespace v8::internal | 713 } } // namespace v8::internal |
| OLD | NEW |