v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
ptr-compr.cc
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
6
7namespace v8::internal {
8
9#ifdef V8_COMPRESS_POINTERS
10
11#ifdef V8_COMPRESS_POINTERS_IN_SHARED_CAGE
12#define THREAD_LOCAL_IF_MULTICAGE
13#else
14#define THREAD_LOCAL_IF_MULTICAGE thread_local
15#endif // V8_COMPRESS_POINTERS_IN_SHARED_CAGE
16
17THREAD_LOCAL_IF_MULTICAGE uintptr_t MainCage::base_ = kNullAddress;
18
19// static
21
22// static
24
25#ifdef V8_ENABLE_SANDBOX
26uintptr_t TrustedCage::base_ = kNullAddress;
27
28// static
29Address TrustedCage::base_non_inlined() { return base_; }
30
31// static
32void TrustedCage::set_base_non_inlined(Address base) { base_ = base; }
33#endif // V8_ENABLE_SANDBOX
34
35#ifdef V8_EXTERNAL_CODE_SPACE
36THREAD_LOCAL_IF_MULTICAGE uintptr_t ExternalCodeCompressionScheme::base_ =
38
39// static
40Address ExternalCodeCompressionScheme::base_non_inlined() { return base_; }
41
42// static
43void ExternalCodeCompressionScheme::set_base_non_inlined(Address base) {
44 base_ = base;
45}
46#endif // V8_EXTERNAL_CODE_SPACE
47
48#undef THREAD_LOCAL_IF_MULTICAGE
49
50#endif // V8_COMPRESS_POINTERS
51
52} // namespace v8::internal
static V8_EXPORT_PRIVATE void set_base_non_inlined(Address base)
static V8_EXPORT_PRIVATE Address base_non_inlined()
static constexpr Address kNullAddress
Definition v8-internal.h:53