OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_INCREMENTAL_MARKING_INL_H_ | 5 #ifndef V8_INCREMENTAL_MARKING_INL_H_ |
6 #define V8_INCREMENTAL_MARKING_INL_H_ | 6 #define V8_INCREMENTAL_MARKING_INL_H_ |
7 | 7 |
8 #include "incremental-marking.h" | 8 #include "incremental-marking.h" |
9 | 9 |
10 namespace v8 { | 10 namespace v8 { |
(...skipping 27 matching lines...) Expand all Loading... |
38 } | 38 } |
39 if (!is_compacting_) return false; | 39 if (!is_compacting_) return false; |
40 MarkBit obj_bit = Marking::MarkBitFrom(obj); | 40 MarkBit obj_bit = Marking::MarkBitFrom(obj); |
41 return Marking::IsBlack(obj_bit); | 41 return Marking::IsBlack(obj_bit); |
42 } | 42 } |
43 | 43 |
44 | 44 |
45 void IncrementalMarking::RecordWrite(HeapObject* obj, | 45 void IncrementalMarking::RecordWrite(HeapObject* obj, |
46 Object** slot, | 46 Object** slot, |
47 Object* value) { | 47 Object* value) { |
48 if (IsMarking() && value->NonFailureIsHeapObject()) { | 48 if (IsMarking() && value->IsHeapObject()) { |
49 RecordWriteSlow(obj, slot, value); | 49 RecordWriteSlow(obj, slot, value); |
50 } | 50 } |
51 } | 51 } |
52 | 52 |
53 | 53 |
54 void IncrementalMarking::RecordWriteOfCodeEntry(JSFunction* host, | 54 void IncrementalMarking::RecordWriteOfCodeEntry(JSFunction* host, |
55 Object** slot, | 55 Object** slot, |
56 Code* value) { | 56 Code* value) { |
57 if (IsMarking()) RecordWriteOfCodeEntrySlow(host, slot, value); | 57 if (IsMarking()) RecordWriteOfCodeEntrySlow(host, slot, value); |
58 } | 58 } |
59 | 59 |
60 | 60 |
61 void IncrementalMarking::RecordWriteIntoCode(HeapObject* obj, | 61 void IncrementalMarking::RecordWriteIntoCode(HeapObject* obj, |
62 RelocInfo* rinfo, | 62 RelocInfo* rinfo, |
63 Object* value) { | 63 Object* value) { |
64 if (IsMarking() && value->NonFailureIsHeapObject()) { | 64 if (IsMarking() && value->IsHeapObject()) { |
65 RecordWriteIntoCodeSlow(obj, rinfo, value); | 65 RecordWriteIntoCodeSlow(obj, rinfo, value); |
66 } | 66 } |
67 } | 67 } |
68 | 68 |
69 | 69 |
70 void IncrementalMarking::RecordWrites(HeapObject* obj) { | 70 void IncrementalMarking::RecordWrites(HeapObject* obj) { |
71 if (IsMarking()) { | 71 if (IsMarking()) { |
72 MarkBit obj_bit = Marking::MarkBitFrom(obj); | 72 MarkBit obj_bit = Marking::MarkBitFrom(obj); |
73 if (Marking::IsBlack(obj_bit)) { | 73 if (Marking::IsBlack(obj_bit)) { |
74 MemoryChunk* chunk = MemoryChunk::FromAddress(obj->address()); | 74 MemoryChunk* chunk = MemoryChunk::FromAddress(obj->address()); |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 | 113 |
114 void IncrementalMarking::WhiteToGreyAndPush(HeapObject* obj, MarkBit mark_bit) { | 114 void IncrementalMarking::WhiteToGreyAndPush(HeapObject* obj, MarkBit mark_bit) { |
115 Marking::WhiteToGrey(mark_bit); | 115 Marking::WhiteToGrey(mark_bit); |
116 marking_deque_.PushGrey(obj); | 116 marking_deque_.PushGrey(obj); |
117 } | 117 } |
118 | 118 |
119 | 119 |
120 } } // namespace v8::internal | 120 } } // namespace v8::internal |
121 | 121 |
122 #endif // V8_INCREMENTAL_MARKING_INL_H_ | 122 #endif // V8_INCREMENTAL_MARKING_INL_H_ |
OLD | NEW |