| 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 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 336 } | 336 } |
| 337 | 337 |
| 338 | 338 |
| 339 bool MarkCompactCollector::StartCompaction(CompactionMode mode) { | 339 bool MarkCompactCollector::StartCompaction(CompactionMode mode) { |
| 340 if (!compacting_) { | 340 if (!compacting_) { |
| 341 ASSERT(evacuation_candidates_.length() == 0); | 341 ASSERT(evacuation_candidates_.length() == 0); |
| 342 | 342 |
| 343 CollectEvacuationCandidates(heap()->old_pointer_space()); | 343 CollectEvacuationCandidates(heap()->old_pointer_space()); |
| 344 CollectEvacuationCandidates(heap()->old_data_space()); | 344 CollectEvacuationCandidates(heap()->old_data_space()); |
| 345 | 345 |
| 346 if (FLAG_compact_code_space && mode == NON_INCREMENTAL_COMPACTION) { | 346 if (FLAG_compact_code_space && |
| 347 (mode == NON_INCREMENTAL_COMPACTION || |
| 348 FLAG_incremental_code_compaction)) { |
| 347 CollectEvacuationCandidates(heap()->code_space()); | 349 CollectEvacuationCandidates(heap()->code_space()); |
| 348 } else if (FLAG_trace_fragmentation) { | 350 } else if (FLAG_trace_fragmentation) { |
| 349 TraceFragmentation(heap()->code_space()); | 351 TraceFragmentation(heap()->code_space()); |
| 350 } | 352 } |
| 351 | 353 |
| 352 if (FLAG_trace_fragmentation) { | 354 if (FLAG_trace_fragmentation) { |
| 353 TraceFragmentation(heap()->map_space()); | 355 TraceFragmentation(heap()->map_space()); |
| 354 TraceFragmentation(heap()->cell_space()); | 356 TraceFragmentation(heap()->cell_space()); |
| 355 } | 357 } |
| 356 | 358 |
| (...skipping 3785 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4142 while (buffer != NULL) { | 4144 while (buffer != NULL) { |
| 4143 SlotsBuffer* next_buffer = buffer->next(); | 4145 SlotsBuffer* next_buffer = buffer->next(); |
| 4144 DeallocateBuffer(buffer); | 4146 DeallocateBuffer(buffer); |
| 4145 buffer = next_buffer; | 4147 buffer = next_buffer; |
| 4146 } | 4148 } |
| 4147 *buffer_address = NULL; | 4149 *buffer_address = NULL; |
| 4148 } | 4150 } |
| 4149 | 4151 |
| 4150 | 4152 |
| 4151 } } // namespace v8::internal | 4153 } } // namespace v8::internal |
| OLD | NEW |