Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Side by Side Diff: src/heap/incremental-marking.cc

Issue 871253005: Use weak cells in dependent code. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address comments Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/heap/heap.cc ('k') | src/heap/mark-compact.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/heap/incremental-marking.h" 7 #include "src/heap/incremental-marking.h"
8 8
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/compilation-cache.h" 10 #include "src/compilation-cache.h"
(...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after
545 if (FLAG_cleanup_code_caches_at_gc) { 545 if (FLAG_cleanup_code_caches_at_gc) {
546 // We will mark cache black with a separate pass 546 // We will mark cache black with a separate pass
547 // when we finish marking. 547 // when we finish marking.
548 MarkObjectGreyDoNotEnqueue(heap_->polymorphic_code_cache()); 548 MarkObjectGreyDoNotEnqueue(heap_->polymorphic_code_cache());
549 } 549 }
550 550
551 // Mark strong roots grey. 551 // Mark strong roots grey.
552 IncrementalMarkingRootMarkingVisitor visitor(this); 552 IncrementalMarkingRootMarkingVisitor visitor(this);
553 heap_->IterateStrongRoots(&visitor, VISIT_ONLY_STRONG); 553 heap_->IterateStrongRoots(&visitor, VISIT_ONLY_STRONG);
554 554
555 heap_->mark_compact_collector()->MarkWeakObjectToCodeTable();
556
557 // Ready to start incremental marking. 555 // Ready to start incremental marking.
558 if (FLAG_trace_incremental_marking) { 556 if (FLAG_trace_incremental_marking) {
559 PrintF("[IncrementalMarking] Running\n"); 557 PrintF("[IncrementalMarking] Running\n");
560 } 558 }
561 } 559 }
562 560
563 561
564 void IncrementalMarking::PrepareForScavenge() { 562 void IncrementalMarking::PrepareForScavenge() {
565 if (!IsMarking()) return; 563 if (!IsMarking()) return;
566 NewSpacePageIterator it(heap_->new_space()->FromSpaceStart(), 564 NewSpacePageIterator it(heap_->new_space()->FromSpaceStart(),
(...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after
1005 void IncrementalMarking::IncrementIdleMarkingDelayCounter() { 1003 void IncrementalMarking::IncrementIdleMarkingDelayCounter() {
1006 idle_marking_delay_counter_++; 1004 idle_marking_delay_counter_++;
1007 } 1005 }
1008 1006
1009 1007
1010 void IncrementalMarking::ClearIdleMarkingDelayCounter() { 1008 void IncrementalMarking::ClearIdleMarkingDelayCounter() {
1011 idle_marking_delay_counter_ = 0; 1009 idle_marking_delay_counter_ = 0;
1012 } 1010 }
1013 } 1011 }
1014 } // namespace v8::internal 1012 } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/heap/heap.cc ('k') | src/heap/mark-compact.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698