| 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 2035 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2046 // Update pointers in to space. | 2046 // Update pointers in to space. |
| 2047 Address current = space->bottom(); | 2047 Address current = space->bottom(); |
| 2048 while (current < space->top()) { | 2048 while (current < space->top()) { |
| 2049 HeapObject* object = HeapObject::FromAddress(current); | 2049 HeapObject* object = HeapObject::FromAddress(current); |
| 2050 current += | 2050 current += |
| 2051 StaticPointersToNewGenUpdatingVisitor::IterateBody(object->map(), | 2051 StaticPointersToNewGenUpdatingVisitor::IterateBody(object->map(), |
| 2052 object); | 2052 object); |
| 2053 } | 2053 } |
| 2054 | 2054 |
| 2055 // Update roots. | 2055 // Update roots. |
| 2056 heap->IterateRoots(&updating_visitor, VISIT_ALL_IN_SCAVENGE); | 2056 heap->IterateRoots(&updating_visitor, VISIT_ALL_IN_SWEEP_NEWSPACE); |
| 2057 LiveObjectList::IterateElements(&updating_visitor); | 2057 LiveObjectList::IterateElements(&updating_visitor); |
| 2058 | 2058 |
| 2059 // Update pointers in old spaces. | 2059 // Update pointers in old spaces. |
| 2060 heap->IterateDirtyRegions(heap->old_pointer_space(), | 2060 heap->IterateDirtyRegions(heap->old_pointer_space(), |
| 2061 &Heap::IteratePointersInDirtyRegion, | 2061 &Heap::IteratePointersInDirtyRegion, |
| 2062 &UpdatePointerToNewGen, | 2062 &UpdatePointerToNewGen, |
| 2063 heap->WATERMARK_SHOULD_BE_VALID); | 2063 heap->WATERMARK_SHOULD_BE_VALID); |
| 2064 | 2064 |
| 2065 heap->lo_space()->IterateDirtyRegions(&UpdatePointerToNewGen); | 2065 heap->lo_space()->IterateDirtyRegions(&UpdatePointerToNewGen); |
| 2066 | 2066 |
| (...skipping 1062 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3129 } | 3129 } |
| 3130 | 3130 |
| 3131 | 3131 |
| 3132 void MarkCompactCollector::Initialize() { | 3132 void MarkCompactCollector::Initialize() { |
| 3133 StaticPointersToNewGenUpdatingVisitor::Initialize(); | 3133 StaticPointersToNewGenUpdatingVisitor::Initialize(); |
| 3134 StaticMarkingVisitor::Initialize(); | 3134 StaticMarkingVisitor::Initialize(); |
| 3135 } | 3135 } |
| 3136 | 3136 |
| 3137 | 3137 |
| 3138 } } // namespace v8::internal | 3138 } } // namespace v8::internal |
| OLD | NEW |