OLD | NEW |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 // Prepare has selected whether to compact the old generation or not. | 69 // Prepare has selected whether to compact the old generation or not. |
70 // Tell the tracer. | 70 // Tell the tracer. |
71 if (IsCompacting()) tracer_->set_is_compacting(); | 71 if (IsCompacting()) tracer_->set_is_compacting(); |
72 | 72 |
73 MarkLiveObjects(); | 73 MarkLiveObjects(); |
74 | 74 |
75 if (FLAG_collect_maps) ClearNonLiveTransitions(); | 75 if (FLAG_collect_maps) ClearNonLiveTransitions(); |
76 | 76 |
77 SweepLargeObjectSpace(); | 77 SweepLargeObjectSpace(); |
78 | 78 |
79 if (compacting_collection_) { | 79 if (IsCompacting()) { |
80 EncodeForwardingAddresses(); | 80 EncodeForwardingAddresses(); |
81 | 81 |
82 UpdatePointers(); | 82 UpdatePointers(); |
83 | 83 |
84 RelocateObjects(); | 84 RelocateObjects(); |
85 | 85 |
86 RebuildRSets(); | 86 RebuildRSets(); |
87 | 87 |
88 } else { | 88 } else { |
89 SweepSpaces(); | 89 SweepSpaces(); |
(...skipping 1744 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1834 | 1834 |
1835 void MarkCompactCollector::RebuildRSets() { | 1835 void MarkCompactCollector::RebuildRSets() { |
1836 #ifdef DEBUG | 1836 #ifdef DEBUG |
1837 ASSERT(state_ == RELOCATE_OBJECTS); | 1837 ASSERT(state_ == RELOCATE_OBJECTS); |
1838 state_ = REBUILD_RSETS; | 1838 state_ = REBUILD_RSETS; |
1839 #endif | 1839 #endif |
1840 Heap::RebuildRSets(); | 1840 Heap::RebuildRSets(); |
1841 } | 1841 } |
1842 | 1842 |
1843 } } // namespace v8::internal | 1843 } } // namespace v8::internal |
OLD | NEW |