forked from nodejs/node
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcode-pointer.h
More file actions
30 lines (23 loc) · 1.1 KB
/
code-pointer.h
File metadata and controls
30 lines (23 loc) · 1.1 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
// Copyright 2023 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_CODE_POINTER_H_
#define V8_SANDBOX_CODE_POINTER_H_
#include "src/common/globals.h"
#include "src/sandbox/code-entrypoint-tag.h"
namespace v8 {
namespace internal {
// Read the pointer to a Code's entrypoint via a code pointer.
// Only available when the sandbox is enabled as it requires the code pointer
// table.
V8_INLINE Address ReadCodeEntrypointViaCodePointerField(Address field_address,
CodeEntrypointTag tag);
// Writes the pointer to a Code's entrypoint via a code pointer.
// Only available when the sandbox is enabled as it requires the code pointer
// table.
V8_INLINE void WriteCodeEntrypointViaCodePointerField(Address field_address,
Address value,
CodeEntrypointTag tag);
} // namespace internal
} // namespace v8
#endif // V8_SANDBOX_CODE_POINTER_H_