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 1390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1401 collector->RecordSlot(anchor_slot, p, object); | 1401 collector->RecordSlot(anchor_slot, p, object); |
1402 MarkBit mark = Marking::MarkBitFrom(object); | 1402 MarkBit mark = Marking::MarkBitFrom(object); |
1403 collector->MarkObject(object, mark); | 1403 collector->MarkObject(object, mark); |
1404 } | 1404 } |
1405 | 1405 |
1406 | 1406 |
1407 // Visit an unmarked object. | 1407 // Visit an unmarked object. |
1408 INLINE(static void VisitUnmarkedObject(MarkCompactCollector* collector, | 1408 INLINE(static void VisitUnmarkedObject(MarkCompactCollector* collector, |
1409 HeapObject* obj)) { | 1409 HeapObject* obj)) { |
1410 #ifdef DEBUG | 1410 #ifdef DEBUG |
1411 ASSERT(Isolate::Current()->heap()->Contains(obj)); | 1411 ASSERT(collector->heap()->Contains(obj)); |
1412 ASSERT(!HEAP->mark_compact_collector()->IsMarked(obj)); | 1412 ASSERT(!HEAP->mark_compact_collector()->IsMarked(obj)); |
1413 #endif | 1413 #endif |
1414 Map* map = obj->map(); | 1414 Map* map = obj->map(); |
1415 Heap* heap = obj->GetHeap(); | 1415 Heap* heap = obj->GetHeap(); |
1416 MarkBit mark = Marking::MarkBitFrom(obj); | 1416 MarkBit mark = Marking::MarkBitFrom(obj); |
1417 heap->mark_compact_collector()->SetMark(obj, mark); | 1417 heap->mark_compact_collector()->SetMark(obj, mark); |
1418 // Mark the map pointer and the body. | 1418 // Mark the map pointer and the body. |
1419 MarkBit map_mark = Marking::MarkBitFrom(map); | 1419 MarkBit map_mark = Marking::MarkBitFrom(map); |
1420 heap->mark_compact_collector()->MarkObject(map, map_mark); | 1420 heap->mark_compact_collector()->MarkObject(map, map_mark); |
1421 IterateBody(map, obj); | 1421 IterateBody(map, obj); |
(...skipping 2887 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4309 while (buffer != NULL) { | 4309 while (buffer != NULL) { |
4310 SlotsBuffer* next_buffer = buffer->next(); | 4310 SlotsBuffer* next_buffer = buffer->next(); |
4311 DeallocateBuffer(buffer); | 4311 DeallocateBuffer(buffer); |
4312 buffer = next_buffer; | 4312 buffer = next_buffer; |
4313 } | 4313 } |
4314 *buffer_address = NULL; | 4314 *buffer_address = NULL; |
4315 } | 4315 } |
4316 | 4316 |
4317 | 4317 |
4318 } } // namespace v8::internal | 4318 } } // namespace v8::internal |
OLD | NEW |