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

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

Issue 23477061: Make objects embedded in optimized code weak. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix arm Created 7 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « src/ia32/lithium-codegen-ia32.cc ('k') | src/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 // 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 630 matching lines...) Expand 10 before | Expand all | Expand 10 after
641 if (FLAG_cleanup_code_caches_at_gc) { 641 if (FLAG_cleanup_code_caches_at_gc) {
642 // We will mark cache black with a separate pass 642 // We will mark cache black with a separate pass
643 // when we finish marking. 643 // when we finish marking.
644 MarkObjectGreyDoNotEnqueue(heap_->polymorphic_code_cache()); 644 MarkObjectGreyDoNotEnqueue(heap_->polymorphic_code_cache());
645 } 645 }
646 646
647 // Mark strong roots grey. 647 // Mark strong roots grey.
648 IncrementalMarkingRootMarkingVisitor visitor(this); 648 IncrementalMarkingRootMarkingVisitor visitor(this);
649 heap_->IterateStrongRoots(&visitor, VISIT_ONLY_STRONG); 649 heap_->IterateStrongRoots(&visitor, VISIT_ONLY_STRONG);
650 650
651 heap_->mark_compact_collector()->MarkWeakObjectToCodeTable();
652
651 // Ready to start incremental marking. 653 // Ready to start incremental marking.
652 if (FLAG_trace_incremental_marking) { 654 if (FLAG_trace_incremental_marking) {
653 PrintF("[IncrementalMarking] Running\n"); 655 PrintF("[IncrementalMarking] Running\n");
654 } 656 }
655 } 657 }
656 658
657 659
658 void IncrementalMarking::PrepareForScavenge() { 660 void IncrementalMarking::PrepareForScavenge() {
659 if (!IsMarking()) return; 661 if (!IsMarking()) return;
660 NewSpacePageIterator it(heap_->new_space()->FromSpaceStart(), 662 NewSpacePageIterator it(heap_->new_space()->FromSpaceStart(),
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
1033 bytes_scanned_ = 0; 1035 bytes_scanned_ = 0;
1034 write_barriers_invoked_since_last_step_ = 0; 1036 write_barriers_invoked_since_last_step_ = 0;
1035 } 1037 }
1036 1038
1037 1039
1038 int64_t IncrementalMarking::SpaceLeftInOldSpace() { 1040 int64_t IncrementalMarking::SpaceLeftInOldSpace() {
1039 return heap_->MaxOldGenerationSize() - heap_->PromotedSpaceSizeOfObjects(); 1041 return heap_->MaxOldGenerationSize() - heap_->PromotedSpaceSizeOfObjects();
1040 } 1042 }
1041 1043
1042 } } // namespace v8::internal 1044 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ia32/lithium-codegen-ia32.cc ('k') | src/mark-compact.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698