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