| 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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 void RecordWriteOfCodeEntrySlow(JSFunction* host, Object** slot, Code* value); | 157 void RecordWriteOfCodeEntrySlow(JSFunction* host, Object** slot, Code* value); |
| 158 void RecordCodeTargetPatch(Code* host, Address pc, HeapObject* value); | 158 void RecordCodeTargetPatch(Code* host, Address pc, HeapObject* value); |
| 159 void RecordCodeTargetPatch(Address pc, HeapObject* value); | 159 void RecordCodeTargetPatch(Address pc, HeapObject* value); |
| 160 | 160 |
| 161 inline void RecordWrites(HeapObject* obj); | 161 inline void RecordWrites(HeapObject* obj); |
| 162 | 162 |
| 163 inline void BlackToGreyAndUnshift(HeapObject* obj, MarkBit mark_bit); | 163 inline void BlackToGreyAndUnshift(HeapObject* obj, MarkBit mark_bit); |
| 164 | 164 |
| 165 inline void WhiteToGreyAndPush(HeapObject* obj, MarkBit mark_bit); | 165 inline void WhiteToGreyAndPush(HeapObject* obj, MarkBit mark_bit); |
| 166 | 166 |
| 167 // Does white->black or keeps gray or black color. Returns true if converting | |
| 168 // white to black. | |
| 169 inline bool MarkBlackOrKeepGrey(MarkBit mark_bit) { | |
| 170 ASSERT(!Marking::IsImpossible(mark_bit)); | |
| 171 if (mark_bit.Get()) { | |
| 172 // Grey or black: Keep the color. | |
| 173 return false; | |
| 174 } | |
| 175 mark_bit.Set(); | |
| 176 ASSERT(Marking::IsBlack(mark_bit)); | |
| 177 return true; | |
| 178 } | |
| 179 | |
| 180 inline int steps_count() { | 167 inline int steps_count() { |
| 181 return steps_count_; | 168 return steps_count_; |
| 182 } | 169 } |
| 183 | 170 |
| 184 inline double steps_took() { | 171 inline double steps_took() { |
| 185 return steps_took_; | 172 return steps_took_; |
| 186 } | 173 } |
| 187 | 174 |
| 188 inline double longest_step() { | 175 inline double longest_step() { |
| 189 return longest_step_; | 176 return longest_step_; |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 289 intptr_t write_barriers_invoked_since_last_step_; | 276 intptr_t write_barriers_invoked_since_last_step_; |
| 290 | 277 |
| 291 int no_marking_scope_depth_; | 278 int no_marking_scope_depth_; |
| 292 | 279 |
| 293 DISALLOW_IMPLICIT_CONSTRUCTORS(IncrementalMarking); | 280 DISALLOW_IMPLICIT_CONSTRUCTORS(IncrementalMarking); |
| 294 }; | 281 }; |
| 295 | 282 |
| 296 } } // namespace v8::internal | 283 } } // namespace v8::internal |
| 297 | 284 |
| 298 #endif // V8_INCREMENTAL_MARKING_H_ | 285 #endif // V8_INCREMENTAL_MARKING_H_ |
| OLD | NEW |