| 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 493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 504 ASSERT(Handle<Code>::cast(object)->ic_state() == MEGAMORPHIC); | 504 ASSERT(Handle<Code>::cast(object)->ic_state() == MEGAMORPHIC); |
| 505 } else if (object->IsMap()) { | 505 } else if (object->IsMap()) { |
| 506 types->Add(Handle<Map>::cast(object), zone()); | 506 types->Add(Handle<Map>::cast(object), zone()); |
| 507 } else if (FLAG_collect_megamorphic_maps_from_stub_cache && | 507 } else if (FLAG_collect_megamorphic_maps_from_stub_cache && |
| 508 Handle<Code>::cast(object)->ic_state() == MEGAMORPHIC) { | 508 Handle<Code>::cast(object)->ic_state() == MEGAMORPHIC) { |
| 509 types->Reserve(4, zone()); | 509 types->Reserve(4, zone()); |
| 510 ASSERT(object->IsCode()); | 510 ASSERT(object->IsCode()); |
| 511 isolate_->stub_cache()->CollectMatchingMaps(types, | 511 isolate_->stub_cache()->CollectMatchingMaps(types, |
| 512 *name, | 512 *name, |
| 513 flags, | 513 flags, |
| 514 global_context_); | 514 global_context_, |
| 515 zone()); |
| 515 } | 516 } |
| 516 } | 517 } |
| 517 | 518 |
| 518 | 519 |
| 519 // Check if a map originates from a given global context. We use this | 520 // Check if a map originates from a given global context. We use this |
| 520 // information to filter out maps from different context to avoid | 521 // information to filter out maps from different context to avoid |
| 521 // retaining objects from different tabs in Chrome via optimized code. | 522 // retaining objects from different tabs in Chrome via optimized code. |
| 522 bool TypeFeedbackOracle::CanRetainOtherContext(Map* map, | 523 bool TypeFeedbackOracle::CanRetainOtherContext(Map* map, |
| 523 Context* global_context) { | 524 Context* global_context) { |
| 524 Object* constructor = NULL; | 525 Object* constructor = NULL; |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 714 USE(maybe_result); | 715 USE(maybe_result); |
| 715 #ifdef DEBUG | 716 #ifdef DEBUG |
| 716 Object* result = NULL; | 717 Object* result = NULL; |
| 717 // Dictionary has been allocated with sufficient size for all elements. | 718 // Dictionary has been allocated with sufficient size for all elements. |
| 718 ASSERT(maybe_result->ToObject(&result)); | 719 ASSERT(maybe_result->ToObject(&result)); |
| 719 ASSERT(*dictionary_ == result); | 720 ASSERT(*dictionary_ == result); |
| 720 #endif | 721 #endif |
| 721 } | 722 } |
| 722 | 723 |
| 723 } } // namespace v8::internal | 724 } } // namespace v8::internal |
| OLD | NEW |