forked from nodejs/node
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcppheap-pointer.h
More file actions
33 lines (24 loc) · 1.28 KB
/
cppheap-pointer.h
File metadata and controls
33 lines (24 loc) · 1.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// Copyright 2025 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef V8_SANDBOX_CPPHEAP_POINTER_H_
#define V8_SANDBOX_CPPHEAP_POINTER_H_
#include "include/v8-sandbox.h"
#include "src/sandbox/isolate.h"
namespace v8::internal {
// TODO(saelo): consider passing a CppHeapPointerTagRange as template parameter
// once C++20 is supported everywhere.
template <CppHeapPointerTag lower_bound, CppHeapPointerTag upper_bound>
V8_INLINE Address ReadCppHeapPointerField(Address field_address,
IsolateForPointerCompression isolate);
V8_INLINE Address ReadCppHeapPointerField(Address field_address,
IsolateForPointerCompression isolate,
CppHeapPointerTagRange tag_range);
template <CppHeapPointerTag tag>
V8_INLINE void WriteLazilyInitializedCppHeapPointerField(
Address field_address, IsolateForPointerCompression isolate, Address value);
V8_INLINE void WriteLazilyInitializedCppHeapPointerField(
Address field_address, IsolateForPointerCompression isolate, Address value,
CppHeapPointerTag tag);
} // namespace v8::internal
#endif // V8_SANDBOX_CPPHEAP_POINTER_H_