v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
marking-state-inl.h
Go to the documentation of this file.
1// Copyright 2022 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_MARKING_STATE_INL_H_
6#define V8_HEAP_MARKING_STATE_INL_H_
7
9// Include the non-inl header before the rest of the headers.
10
13
14namespace v8 {
15namespace internal {
16
17template <typename ConcreteState, AccessMode access_mode>
22
23template <typename ConcreteState, AccessMode access_mode>
25 const Tagged<HeapObject> obj) const {
26 return !IsMarked(obj);
27}
28
29template <typename ConcreteState, AccessMode access_mode>
34
35template <typename ConcreteState, AccessMode access_mode>
38 if (TryMark(obj)) {
40 ALIGN_TO_ALLOCATION_ALIGNMENT(obj->Size(cage_base())));
41 return true;
42 }
43 return false;
44}
46template <typename ConcreteState, AccessMode access_mode>
48 Tagged<HeapObject> obj, int object_size) {
49 if (TryMark(obj)) {
51 object_size);
52 return true;
53 }
54 return false;
55}
56
57} // namespace internal
58} // namespace v8
59
60#endif // V8_HEAP_MARKING_STATE_INL_H_
static V8_ALLOW_UNUSED MarkBit From(Address)
V8_INLINE bool IsMarked(const Tagged< HeapObject > obj) const
V8_INLINE bool TryMarkAndAccountLiveBytes(Tagged< HeapObject > obj)
V8_INLINE bool TryMark(Tagged< HeapObject > obj)
V8_INLINE bool IsUnmarked(const Tagged< HeapObject > obj) const
static V8_INLINE MutablePageMetadata * FromHeapObject(Tagged< HeapObject > o)
#define ALIGN_TO_ALLOCATION_ALIGNMENT(value)
Definition globals.h:1796
V8_INLINE const Operation & Get(const Graph &graph, OpIndex index)
Definition graph.h:1231