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/mark-compact.h

Issue 7712026: Clear mark bits while sweeping and not explicitly. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/gc
Patch Set: Correctly handle incremental marking as well. Created 9 years, 4 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/incremental-marking.cc ('k') | src/mark-compact.cc » ('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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 422 matching lines...) Expand 10 before | Expand all | Expand 10 after
433 CodeFlusher* code_flusher() { return code_flusher_; } 433 CodeFlusher* code_flusher() { return code_flusher_; }
434 inline bool is_code_flushing_enabled() const { return code_flusher_ != NULL; } 434 inline bool is_code_flushing_enabled() const { return code_flusher_ != NULL; }
435 void EnableCodeFlushing(bool enable); 435 void EnableCodeFlushing(bool enable);
436 436
437 enum SweeperType { 437 enum SweeperType {
438 CONSERVATIVE, 438 CONSERVATIVE,
439 LAZY_CONSERVATIVE, 439 LAZY_CONSERVATIVE,
440 PRECISE 440 PRECISE
441 }; 441 };
442 442
443 #ifdef DEBUG
444 void VerifyMarkbitsAreClean();
445 static void VerifyMarkbitsAreClean(PagedSpace* space);
446 static void VerifyMarkbitsAreClean(NewSpace* space);
447 #endif
448
443 // Sweep a single page from the given space conservatively. 449 // Sweep a single page from the given space conservatively.
444 // Return a number of reclaimed bytes. 450 // Return a number of reclaimed bytes.
445 static intptr_t SweepConservatively(PagedSpace* space, Page* p); 451 static intptr_t SweepConservatively(PagedSpace* space, Page* p);
446 452
447 INLINE(static bool ShouldSkipEvacuationSlotRecording(Object** anchor)) { 453 INLINE(static bool ShouldSkipEvacuationSlotRecording(Object** anchor)) {
448 return Page::FromAddress(reinterpret_cast<Address>(anchor))-> 454 return Page::FromAddress(reinterpret_cast<Address>(anchor))->
449 ShouldSkipEvacuationSlotRecording(); 455 ShouldSkipEvacuationSlotRecording();
450 } 456 }
451 457
452 INLINE(static bool IsOnEvacuationCandidate(Object* obj)) { 458 INLINE(static bool IsOnEvacuationCandidate(Object* obj)) {
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
724 730
725 List<Page*> evacuation_candidates_; 731 List<Page*> evacuation_candidates_;
726 732
727 friend class Heap; 733 friend class Heap;
728 }; 734 };
729 735
730 736
731 } } // namespace v8::internal 737 } } // namespace v8::internal
732 738
733 #endif // V8_MARK_COMPACT_H_ 739 #endif // V8_MARK_COMPACT_H_
OLDNEW
« no previous file with comments | « src/incremental-marking.cc ('k') | src/mark-compact.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698