| OLD | NEW |
| 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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 inline void RecordWriteOf(HeapObject* value); | 114 inline void RecordWriteOf(HeapObject* value); |
| 115 inline void RecordWrites(HeapObject* obj); | 115 inline void RecordWrites(HeapObject* obj); |
| 116 | 116 |
| 117 inline void BlackToGreyAndUnshift(HeapObject* obj, MarkBit mark_bit); | 117 inline void BlackToGreyAndUnshift(HeapObject* obj, MarkBit mark_bit); |
| 118 | 118 |
| 119 inline void WhiteToGreyAndPush(HeapObject* obj, MarkBit mark_bit); | 119 inline void WhiteToGreyAndPush(HeapObject* obj, MarkBit mark_bit); |
| 120 | 120 |
| 121 inline void WhiteToGrey(HeapObject* obj, MarkBit mark_bit); | 121 inline void WhiteToGrey(HeapObject* obj, MarkBit mark_bit); |
| 122 | 122 |
| 123 // Does white->black or grey->grey | 123 // Does white->black or grey->grey |
| 124 inline void MarkBlackOrKeepGrey(MarkBit mark_bit) { | 124 inline bool MarkBlackOrKeepGrey(MarkBit mark_bit) { |
| 125 ASSERT(!Marking::IsImpossible(mark_bit)); | 125 ASSERT(!Marking::IsImpossible(mark_bit)); |
| 126 if (mark_bit.Get()) return; | 126 if (mark_bit.Get()) return false; |
| 127 mark_bit.Set(); | 127 mark_bit.Set(); |
| 128 ASSERT(!Marking::IsWhite(mark_bit)); | 128 ASSERT(!Marking::IsWhite(mark_bit)); |
| 129 ASSERT(!Marking::IsImpossible(mark_bit)); | 129 ASSERT(!Marking::IsImpossible(mark_bit)); |
| 130 return true; |
| 130 } | 131 } |
| 131 | 132 |
| 132 inline int steps_count() { | 133 inline int steps_count() { |
| 133 return steps_count_; | 134 return steps_count_; |
| 134 } | 135 } |
| 135 | 136 |
| 136 inline double steps_took() { | 137 inline double steps_took() { |
| 137 return steps_took_; | 138 return steps_took_; |
| 138 } | 139 } |
| 139 | 140 |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 int steps_count_; | 190 int steps_count_; |
| 190 double steps_took_; | 191 double steps_took_; |
| 191 bool should_hurry_; | 192 bool should_hurry_; |
| 192 int allocation_marking_factor_; | 193 int allocation_marking_factor_; |
| 193 intptr_t allocated_; | 194 intptr_t allocated_; |
| 194 }; | 195 }; |
| 195 | 196 |
| 196 } } // namespace v8::internal | 197 } } // namespace v8::internal |
| 197 | 198 |
| 198 #endif // V8_INCREMENTAL_MARKING_H_ | 199 #endif // V8_INCREMENTAL_MARKING_H_ |
| OLD | NEW |