OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 2660 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2671 for (uintptr_t key = base; key <= limit; key++) { | 2671 for (uintptr_t key = base; key <= limit; key++) { |
2672 HashMap::Entry* entry = chunk_map_.Lookup(reinterpret_cast<void*>(key), | 2672 HashMap::Entry* entry = chunk_map_.Lookup(reinterpret_cast<void*>(key), |
2673 static_cast<uint32_t>(key), | 2673 static_cast<uint32_t>(key), |
2674 true); | 2674 true); |
2675 ASSERT(entry != NULL); | 2675 ASSERT(entry != NULL); |
2676 entry->value = page; | 2676 entry->value = page; |
2677 } | 2677 } |
2678 | 2678 |
2679 HeapObject* object = page->GetObject(); | 2679 HeapObject* object = page->GetObject(); |
2680 | 2680 |
2681 // Make the object consistent so the large object space can be traversed. | 2681 #ifdef DEBUG |
| 2682 // Make the object consistent so the heap can be vefified in OldSpaceStep. |
2682 reinterpret_cast<Object**>(object->address())[0] = | 2683 reinterpret_cast<Object**>(object->address())[0] = |
2683 heap()->fixed_array_map(); | 2684 heap()->fixed_array_map(); |
2684 reinterpret_cast<Object**>(object->address())[1] = Smi::FromInt(0); | 2685 reinterpret_cast<Object**>(object->address())[1] = Smi::FromInt(0); |
| 2686 #endif |
2685 | 2687 |
2686 heap()->incremental_marking()->OldSpaceStep(object_size); | 2688 heap()->incremental_marking()->OldSpaceStep(object_size); |
2687 return object; | 2689 return object; |
2688 } | 2690 } |
2689 | 2691 |
2690 | 2692 |
2691 // GC support | 2693 // GC support |
2692 MaybeObject* LargeObjectSpace::FindObject(Address a) { | 2694 MaybeObject* LargeObjectSpace::FindObject(Address a) { |
2693 LargePage* page = FindPage(a); | 2695 LargePage* page = FindPage(a); |
2694 if (page != NULL) { | 2696 if (page != NULL) { |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2885 object->ShortPrint(); | 2887 object->ShortPrint(); |
2886 PrintF("\n"); | 2888 PrintF("\n"); |
2887 } | 2889 } |
2888 printf(" --------------------------------------\n"); | 2890 printf(" --------------------------------------\n"); |
2889 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes()); | 2891 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes()); |
2890 } | 2892 } |
2891 | 2893 |
2892 #endif // DEBUG | 2894 #endif // DEBUG |
2893 | 2895 |
2894 } } // namespace v8::internal | 2896 } } // namespace v8::internal |
OLD | NEW |