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 #include "src/heap/incremental-marking.h" | 5 #include "src/heap/incremental-marking.h" |
6 | 6 |
7 #include "src/code-stubs.h" | 7 #include "src/code-stubs.h" |
8 #include "src/compilation-cache.h" | 8 #include "src/compilation-cache.h" |
9 #include "src/conversions.h" | 9 #include "src/conversions.h" |
10 #include "src/heap/gc-idle-time-handler.h" | 10 #include "src/heap/gc-idle-time-handler.h" |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 void IncrementalMarking::RecordWriteOfCodeEntrySlow(JSFunction* host, | 125 void IncrementalMarking::RecordWriteOfCodeEntrySlow(JSFunction* host, |
126 Object** slot, | 126 Object** slot, |
127 Code* value) { | 127 Code* value) { |
128 if (BaseRecordWrite(host, value)) { | 128 if (BaseRecordWrite(host, value)) { |
129 DCHECK(slot != NULL); | 129 DCHECK(slot != NULL); |
130 heap_->mark_compact_collector()->RecordCodeEntrySlot( | 130 heap_->mark_compact_collector()->RecordCodeEntrySlot( |
131 host, reinterpret_cast<Address>(slot), value); | 131 host, reinterpret_cast<Address>(slot), value); |
132 } | 132 } |
133 } | 133 } |
134 | 134 |
| 135 void IncrementalMarking::RecordWriteIntoCodeToNewSpaceSlow(Code* host, |
| 136 RelocInfo* rinfo, |
| 137 Object* value) { |
| 138 heap()->mark_compact_collector()->RecordRelocSlotToNewSpace(host, rinfo, |
| 139 value); |
| 140 } |
| 141 |
135 void IncrementalMarking::RecordWriteIntoCodeSlow(Code* host, RelocInfo* rinfo, | 142 void IncrementalMarking::RecordWriteIntoCodeSlow(Code* host, RelocInfo* rinfo, |
136 Object* value) { | 143 Object* value) { |
137 if (BaseRecordWrite(host, value)) { | 144 if (BaseRecordWrite(host, value)) { |
138 // Object is not going to be rescanned. We need to record the slot. | 145 // Object is not going to be rescanned. We need to record the slot. |
139 heap_->mark_compact_collector()->RecordRelocSlot(host, rinfo, value); | 146 heap_->mark_compact_collector()->RecordRelocSlot(host, rinfo, value); |
140 } | 147 } |
141 } | 148 } |
142 | 149 |
143 | 150 |
144 void IncrementalMarking::WhiteToGreyAndPush(HeapObject* obj, MarkBit mark_bit) { | 151 void IncrementalMarking::WhiteToGreyAndPush(HeapObject* obj, MarkBit mark_bit) { |
(...skipping 1105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1250 void IncrementalMarking::IncrementIdleMarkingDelayCounter() { | 1257 void IncrementalMarking::IncrementIdleMarkingDelayCounter() { |
1251 idle_marking_delay_counter_++; | 1258 idle_marking_delay_counter_++; |
1252 } | 1259 } |
1253 | 1260 |
1254 | 1261 |
1255 void IncrementalMarking::ClearIdleMarkingDelayCounter() { | 1262 void IncrementalMarking::ClearIdleMarkingDelayCounter() { |
1256 idle_marking_delay_counter_ = 0; | 1263 idle_marking_delay_counter_ = 0; |
1257 } | 1264 } |
1258 } // namespace internal | 1265 } // namespace internal |
1259 } // namespace v8 | 1266 } // namespace v8 |
OLD | NEW |