| 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 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 evacuation_candidates_.Add(p); | 238 evacuation_candidates_.Add(p); |
| 239 } | 239 } |
| 240 | 240 |
| 241 | 241 |
| 242 bool MarkCompactCollector::StartCompaction() { | 242 bool MarkCompactCollector::StartCompaction() { |
| 243 if (!compacting_) { | 243 if (!compacting_) { |
| 244 ASSERT(evacuation_candidates_.length() == 0); | 244 ASSERT(evacuation_candidates_.length() == 0); |
| 245 | 245 |
| 246 CollectEvacuationCandidates(heap()->old_pointer_space()); | 246 CollectEvacuationCandidates(heap()->old_pointer_space()); |
| 247 CollectEvacuationCandidates(heap()->old_data_space()); | 247 CollectEvacuationCandidates(heap()->old_data_space()); |
| 248 CollectEvacuationCandidates(heap()->code_space()); | 248 |
| 249 if (FLAG_compact_code_space) { |
| 250 CollectEvacuationCandidates(heap()->code_space()); |
| 251 } |
| 249 | 252 |
| 250 heap()->old_pointer_space()->EvictEvacuationCandidatesFromFreeLists(); | 253 heap()->old_pointer_space()->EvictEvacuationCandidatesFromFreeLists(); |
| 251 heap()->old_data_space()->EvictEvacuationCandidatesFromFreeLists(); | 254 heap()->old_data_space()->EvictEvacuationCandidatesFromFreeLists(); |
| 252 heap()->code_space()->EvictEvacuationCandidatesFromFreeLists(); | 255 heap()->code_space()->EvictEvacuationCandidatesFromFreeLists(); |
| 253 | 256 |
| 254 compacting_ = evacuation_candidates_.length() > 0; | 257 compacting_ = evacuation_candidates_.length() > 0; |
| 255 } | 258 } |
| 256 | 259 |
| 257 return compacting_; | 260 return compacting_; |
| 258 } | 261 } |
| (...skipping 3560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3819 while (buffer != NULL) { | 3822 while (buffer != NULL) { |
| 3820 SlotsBuffer* next_buffer = buffer->next(); | 3823 SlotsBuffer* next_buffer = buffer->next(); |
| 3821 DeallocateBuffer(buffer); | 3824 DeallocateBuffer(buffer); |
| 3822 buffer = next_buffer; | 3825 buffer = next_buffer; |
| 3823 } | 3826 } |
| 3824 *buffer_address = NULL; | 3827 *buffer_address = NULL; |
| 3825 } | 3828 } |
| 3826 | 3829 |
| 3827 | 3830 |
| 3828 } } // namespace v8::internal | 3831 } } // namespace v8::internal |
| OLD | NEW |