blob: 0d55b83a9d552456c5dbd15f71455c653f3ef920 [file] [log] [blame]
Ben Murdochb8a8cc12014-11-26 15:28:44 +00001// 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
10namespace v8 {
11namespace internal {
12
13
Ben Murdochb8a8cc12014-11-26 15:28:44 +000014void IncrementalMarking::RecordWrite(HeapObject* obj, Object** slot,
15 Object* value) {
16 if (IsMarking() && value->IsHeapObject()) {
17 RecordWriteSlow(obj, slot, value);
18 }
19}
20
21
22void IncrementalMarking::RecordWriteOfCodeEntry(JSFunction* host, Object** slot,
23 Code* value) {
Ben Murdoch4a90d5f2016-03-22 12:00:34 +000024 if (IsMarking()) {
25 RecordWriteOfCodeEntrySlow(host, slot, value);
26 }
Ben Murdochb8a8cc12014-11-26 15:28:44 +000027}
28
29
30void IncrementalMarking::RecordWriteIntoCode(HeapObject* obj, RelocInfo* rinfo,
31 Object* value) {
32 if (IsMarking() && value->IsHeapObject()) {
33 RecordWriteIntoCodeSlow(obj, rinfo, value);
34 }
35}
36
37
Ben Murdoch4a90d5f2016-03-22 12:00:34 +000038} // namespace internal
39} // namespace v8
Ben Murdochb8a8cc12014-11-26 15:28:44 +000040
41#endif // V8_HEAP_INCREMENTAL_MARKING_INL_H_