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_HEAP_INCREMENTAL_MARKING_INL_H_ | 5 #ifndef V8_HEAP_INCREMENTAL_MARKING_INL_H_ |
6 #define V8_HEAP_INCREMENTAL_MARKING_INL_H_ | 6 #define V8_HEAP_INCREMENTAL_MARKING_INL_H_ |
7 | 7 |
8 #include "src/heap/incremental-marking.h" | 8 #include "src/heap/incremental-marking.h" |
9 | 9 |
10 namespace v8 { | 10 namespace v8 { |
11 namespace internal { | 11 namespace internal { |
12 | 12 |
13 | 13 |
14 void IncrementalMarking::RecordWrite(HeapObject* obj, Object** slot, | 14 void IncrementalMarking::RecordWrite(HeapObject* obj, Object** slot, |
15 Object* value) { | 15 Object* value) { |
16 if (IsMarking() && value->IsHeapObject()) { | 16 if (IsMarking() && value->IsHeapObject()) { |
17 RecordWriteSlow(obj, slot, value); | 17 RecordWriteSlow(obj, slot, value); |
18 } | 18 } |
19 } | 19 } |
20 | 20 |
21 | 21 |
22 void IncrementalMarking::RecordWriteOfCodeEntry(JSFunction* host, Object** slot, | 22 void IncrementalMarking::RecordWriteOfCodeEntry(JSFunction* host, Object** slot, |
23 Code* value) { | 23 Code* value) { |
24 if (IsMarking()) { | 24 if (IsMarking()) { |
25 RecordWriteOfCodeEntrySlow(host, slot, value); | 25 RecordWriteOfCodeEntrySlow(host, slot, value); |
26 } | 26 } |
27 } | 27 } |
28 | 28 |
29 | 29 void IncrementalMarking::RecordWriteIntoCode(Code* host, RelocInfo* rinfo, |
30 void IncrementalMarking::RecordWriteIntoCode(HeapObject* obj, RelocInfo* rinfo, | |
31 Object* value) { | 30 Object* value) { |
32 if (IsMarking() && value->IsHeapObject()) { | 31 if (IsMarking() && value->IsHeapObject()) { |
33 RecordWriteIntoCodeSlow(obj, rinfo, value); | 32 RecordWriteIntoCodeSlow(host, rinfo, value); |
34 } | 33 } |
35 } | 34 } |
36 | 35 |
37 | 36 |
38 } // namespace internal | 37 } // namespace internal |
39 } // namespace v8 | 38 } // namespace v8 |
40 | 39 |
41 #endif // V8_HEAP_INCREMENTAL_MARKING_INL_H_ | 40 #endif // V8_HEAP_INCREMENTAL_MARKING_INL_H_ |
OLD | NEW |