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

Side by Side Diff: src/mark-compact.h

Issue 7867040: Reduce imprecision of incremental marking. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/gc
Patch Set: Created 9 years, 3 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
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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 ASSERT(IsGrey(markbit)); 112 ASSERT(IsGrey(markbit));
113 markbit.Next().Clear(); 113 markbit.Next().Clear();
114 ASSERT(IsBlack(markbit)); 114 ASSERT(IsBlack(markbit));
115 } 115 }
116 116
117 static inline void BlackToGrey(HeapObject* obj) { 117 static inline void BlackToGrey(HeapObject* obj) {
118 ASSERT(obj->Size() >= 2 * kPointerSize); 118 ASSERT(obj->Size() >= 2 * kPointerSize);
119 BlackToGrey(MarkBitFrom(obj)); 119 BlackToGrey(MarkBitFrom(obj));
120 } 120 }
121 121
122 static inline void AnyToGrey(MarkBit markbit) {
123 markbit.Set();
124 markbit.Next().Set();
125 ASSERT(IsGrey(markbit));
126 }
127
122 // Returns true if the the object whose mark is transferred is marked black. 128 // Returns true if the the object whose mark is transferred is marked black.
123 bool TransferMark(Address old_start, Address new_start); 129 bool TransferMark(Address old_start, Address new_start);
124 130
125 #ifdef DEBUG 131 #ifdef DEBUG
126 enum ObjectColor { 132 enum ObjectColor {
127 BLACK_OBJECT, 133 BLACK_OBJECT,
128 WHITE_OBJECT, 134 WHITE_OBJECT,
129 GREY_OBJECT, 135 GREY_OBJECT,
130 IMPOSSIBLE_COLOR 136 IMPOSSIBLE_COLOR
131 }; 137 };
(...skipping 623 matching lines...) Expand 10 before | Expand all | Expand 10 after
755 761
756 List<Page*> evacuation_candidates_; 762 List<Page*> evacuation_candidates_;
757 763
758 friend class Heap; 764 friend class Heap;
759 }; 765 };
760 766
761 767
762 } } // namespace v8::internal 768 } } // namespace v8::internal
763 769
764 #endif // V8_MARK_COMPACT_H_ 770 #endif // V8_MARK_COMPACT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698