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 2404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2415 // Flush code from collected candidates. | 2415 // Flush code from collected candidates. |
2416 if (is_code_flushing_enabled()) { | 2416 if (is_code_flushing_enabled()) { |
2417 code_flusher_->ProcessCandidates(); | 2417 code_flusher_->ProcessCandidates(); |
2418 // If incremental marker does not support code flushing, we need to | 2418 // If incremental marker does not support code flushing, we need to |
2419 // disable it before incremental marking steps for next cycle. | 2419 // disable it before incremental marking steps for next cycle. |
2420 if (FLAG_flush_code && !FLAG_flush_code_incrementally) { | 2420 if (FLAG_flush_code && !FLAG_flush_code_incrementally) { |
2421 EnableCodeFlushing(false); | 2421 EnableCodeFlushing(false); |
2422 } | 2422 } |
2423 } | 2423 } |
2424 | 2424 |
2425 if (!FLAG_watch_ic_patching) { | |
2426 // Clean up dead objects from the runtime profiler. | |
2427 heap()->isolate()->runtime_profiler()->RemoveDeadSamples(); | |
2428 } | |
2429 | |
2430 if (FLAG_track_gc_object_stats) { | 2425 if (FLAG_track_gc_object_stats) { |
2431 heap()->CheckpointObjectStats(); | 2426 heap()->CheckpointObjectStats(); |
2432 } | 2427 } |
2433 } | 2428 } |
2434 | 2429 |
2435 | 2430 |
2436 void MarkCompactCollector::ProcessMapCaches() { | 2431 void MarkCompactCollector::ProcessMapCaches() { |
2437 Object* raw_context = heap()->native_contexts_list_; | 2432 Object* raw_context = heap()->native_contexts_list_; |
2438 while (raw_context != heap()->undefined_value()) { | 2433 while (raw_context != heap()->undefined_value()) { |
2439 Context* context = reinterpret_cast<Context*>(raw_context); | 2434 Context* context = reinterpret_cast<Context*>(raw_context); |
(...skipping 1067 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3507 WeakHashTable* table = | 3502 WeakHashTable* table = |
3508 WeakHashTable::cast(heap_->weak_object_to_code_table()); | 3503 WeakHashTable::cast(heap_->weak_object_to_code_table()); |
3509 table->Iterate(&updating_visitor); | 3504 table->Iterate(&updating_visitor); |
3510 table->Rehash(heap_->undefined_value()); | 3505 table->Rehash(heap_->undefined_value()); |
3511 } | 3506 } |
3512 | 3507 |
3513 // Update pointers from external string table. | 3508 // Update pointers from external string table. |
3514 heap_->UpdateReferencesInExternalStringTable( | 3509 heap_->UpdateReferencesInExternalStringTable( |
3515 &UpdateReferenceInExternalStringTableEntry); | 3510 &UpdateReferenceInExternalStringTableEntry); |
3516 | 3511 |
3517 if (!FLAG_watch_ic_patching) { | |
3518 // Update JSFunction pointers from the runtime profiler. | |
3519 heap()->isolate()->runtime_profiler()->UpdateSamplesAfterCompact( | |
3520 &updating_visitor); | |
3521 } | |
3522 | |
3523 EvacuationWeakObjectRetainer evacuation_object_retainer; | 3512 EvacuationWeakObjectRetainer evacuation_object_retainer; |
3524 heap()->ProcessWeakReferences(&evacuation_object_retainer); | 3513 heap()->ProcessWeakReferences(&evacuation_object_retainer); |
3525 | 3514 |
3526 // Visit invalidated code (we ignored all slots on it) and clear mark-bits | 3515 // Visit invalidated code (we ignored all slots on it) and clear mark-bits |
3527 // under it. | 3516 // under it. |
3528 ProcessInvalidatedCode(&updating_visitor); | 3517 ProcessInvalidatedCode(&updating_visitor); |
3529 | 3518 |
3530 heap_->isolate()->inner_pointer_to_code_cache()->Flush(); | 3519 heap_->isolate()->inner_pointer_to_code_cache()->Flush(); |
3531 | 3520 |
3532 #ifdef VERIFY_HEAP | 3521 #ifdef VERIFY_HEAP |
(...skipping 834 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4367 while (buffer != NULL) { | 4356 while (buffer != NULL) { |
4368 SlotsBuffer* next_buffer = buffer->next(); | 4357 SlotsBuffer* next_buffer = buffer->next(); |
4369 DeallocateBuffer(buffer); | 4358 DeallocateBuffer(buffer); |
4370 buffer = next_buffer; | 4359 buffer = next_buffer; |
4371 } | 4360 } |
4372 *buffer_address = NULL; | 4361 *buffer_address = NULL; |
4373 } | 4362 } |
4374 | 4363 |
4375 | 4364 |
4376 } } // namespace v8::internal | 4365 } } // namespace v8::internal |
OLD | NEW |