| 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 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 289 #ifdef DEBUG | 289 #ifdef DEBUG |
| 290 if (FLAG_verify_heap) { | 290 if (FLAG_verify_heap) { |
| 291 VerifyMarking(heap_); | 291 VerifyMarking(heap_); |
| 292 } | 292 } |
| 293 #endif | 293 #endif |
| 294 | 294 |
| 295 SweepSpaces(); | 295 SweepSpaces(); |
| 296 | 296 |
| 297 if (!collect_maps_) ReattachInitialMaps(); | 297 if (!collect_maps_) ReattachInitialMaps(); |
| 298 | 298 |
| 299 heap_->isolate()->inner_pointer_to_code_cache()->Flush(); | |
| 300 | |
| 301 Finish(); | 299 Finish(); |
| 302 | 300 |
| 303 tracer_ = NULL; | 301 tracer_ = NULL; |
| 304 } | 302 } |
| 305 | 303 |
| 306 | 304 |
| 307 #ifdef DEBUG | 305 #ifdef DEBUG |
| 308 void MarkCompactCollector::VerifyMarkbitsAreClean(PagedSpace* space) { | 306 void MarkCompactCollector::VerifyMarkbitsAreClean(PagedSpace* space) { |
| 309 PageIterator it(space); | 307 PageIterator it(space); |
| 310 | 308 |
| (...skipping 3105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3416 &updating_visitor); | 3414 &updating_visitor); |
| 3417 } | 3415 } |
| 3418 | 3416 |
| 3419 EvacuationWeakObjectRetainer evacuation_object_retainer; | 3417 EvacuationWeakObjectRetainer evacuation_object_retainer; |
| 3420 heap()->ProcessWeakReferences(&evacuation_object_retainer); | 3418 heap()->ProcessWeakReferences(&evacuation_object_retainer); |
| 3421 | 3419 |
| 3422 // Visit invalidated code (we ignored all slots on it) and clear mark-bits | 3420 // Visit invalidated code (we ignored all slots on it) and clear mark-bits |
| 3423 // under it. | 3421 // under it. |
| 3424 ProcessInvalidatedCode(&updating_visitor); | 3422 ProcessInvalidatedCode(&updating_visitor); |
| 3425 | 3423 |
| 3424 heap_->isolate()->inner_pointer_to_code_cache()->Flush(); |
| 3425 |
| 3426 #ifdef DEBUG | 3426 #ifdef DEBUG |
| 3427 if (FLAG_verify_heap) { | 3427 if (FLAG_verify_heap) { |
| 3428 VerifyEvacuation(heap_); | 3428 VerifyEvacuation(heap_); |
| 3429 } | 3429 } |
| 3430 #endif | 3430 #endif |
| 3431 | 3431 |
| 3432 slots_buffer_allocator_.DeallocateChain(&migration_slots_buffer_); | 3432 slots_buffer_allocator_.DeallocateChain(&migration_slots_buffer_); |
| 3433 ASSERT(migration_slots_buffer_ == NULL); | 3433 ASSERT(migration_slots_buffer_ == NULL); |
| 3434 for (int i = 0; i < npages; i++) { | 3434 for (int i = 0; i < npages; i++) { |
| 3435 Page* p = evacuation_candidates_[i]; | 3435 Page* p = evacuation_candidates_[i]; |
| (...skipping 705 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4141 while (buffer != NULL) { | 4141 while (buffer != NULL) { |
| 4142 SlotsBuffer* next_buffer = buffer->next(); | 4142 SlotsBuffer* next_buffer = buffer->next(); |
| 4143 DeallocateBuffer(buffer); | 4143 DeallocateBuffer(buffer); |
| 4144 buffer = next_buffer; | 4144 buffer = next_buffer; |
| 4145 } | 4145 } |
| 4146 *buffer_address = NULL; | 4146 *buffer_address = NULL; |
| 4147 } | 4147 } |
| 4148 | 4148 |
| 4149 | 4149 |
| 4150 } } // namespace v8::internal | 4150 } } // namespace v8::internal |
| OLD | NEW |