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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 | 103 |
104 INLINE(static void BlackToGrey(HeapObject* obj)) { | 104 INLINE(static void BlackToGrey(HeapObject* obj)) { |
105 BlackToGrey(MarkBitFrom(obj)); | 105 BlackToGrey(MarkBitFrom(obj)); |
106 } | 106 } |
107 | 107 |
108 INLINE(static void AnyToGrey(MarkBit markbit)) { | 108 INLINE(static void AnyToGrey(MarkBit markbit)) { |
109 markbit.Set(); | 109 markbit.Set(); |
110 markbit.Next().Set(); | 110 markbit.Next().Set(); |
111 } | 111 } |
112 | 112 |
113 // Returns true if the the object whose mark is transferred is marked black. | 113 void TransferMark(Address old_start, Address new_start); |
114 bool TransferMark(Address old_start, Address new_start); | |
115 | 114 |
116 #ifdef DEBUG | 115 #ifdef DEBUG |
117 enum ObjectColor { | 116 enum ObjectColor { |
118 BLACK_OBJECT, | 117 BLACK_OBJECT, |
119 WHITE_OBJECT, | 118 WHITE_OBJECT, |
120 GREY_OBJECT, | 119 GREY_OBJECT, |
121 IMPOSSIBLE_COLOR | 120 IMPOSSIBLE_COLOR |
122 }; | 121 }; |
123 | 122 |
124 static const char* ColorName(ObjectColor color) { | 123 static const char* ColorName(ObjectColor color) { |
(...skipping 911 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1036 private: | 1035 private: |
1037 MarkCompactCollector* collector_; | 1036 MarkCompactCollector* collector_; |
1038 }; | 1037 }; |
1039 | 1038 |
1040 | 1039 |
1041 const char* AllocationSpaceName(AllocationSpace space); | 1040 const char* AllocationSpaceName(AllocationSpace space); |
1042 | 1041 |
1043 } } // namespace v8::internal | 1042 } } // namespace v8::internal |
1044 | 1043 |
1045 #endif // V8_MARK_COMPACT_H_ | 1044 #endif // V8_MARK_COMPACT_H_ |
OLD | NEW |