blob: fa22da6d41ecebc06a5f9918c8041e8c10f418dd [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
Ben Murdochda12d292016-06-02 14:46:10 +010029void IncrementalMarking::RecordWriteIntoCode(Code* host, RelocInfo* rinfo,
Ben Murdochb8a8cc12014-11-26 15:28:44 +000030 Object* value) {
31 if (IsMarking() && value->IsHeapObject()) {
Ben Murdochda12d292016-06-02 14:46:10 +010032 RecordWriteIntoCodeSlow(host, rinfo, value);
Ben Murdochb8a8cc12014-11-26 15:28:44 +000033 }
34}
35
36
Ben Murdoch4a90d5f2016-03-22 12:00:34 +000037} // namespace internal
38} // namespace v8
Ben Murdochb8a8cc12014-11-26 15:28:44 +000039
40#endif // V8_HEAP_INCREMENTAL_MARKING_INL_H_