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
5
#include "
src/common/ptr-compr-inl.h
"
6
7
namespace
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
17
THREAD_LOCAL_IF_MULTICAGE uintptr_t MainCage::base_ =
kNullAddress
;
18
19
// static
20
Address
MainCage::base_non_inlined
() {
return
base_
; }
21
22
// static
23
void
MainCage::set_base_non_inlined
(
Address
base) {
base_
=
base
; }
24
25
#ifdef V8_ENABLE_SANDBOX
26
uintptr_t TrustedCage::base_ =
kNullAddress
;
27
28
// static
29
Address
TrustedCage::base_non_inlined() {
return
base_
; }
30
31
// static
32
void
TrustedCage::set_base_non_inlined(
Address
base) {
base_
=
base
; }
33
#endif
// V8_ENABLE_SANDBOX
34
35
#ifdef V8_EXTERNAL_CODE_SPACE
36
THREAD_LOCAL_IF_MULTICAGE uintptr_t ExternalCodeCompressionScheme::base_ =
37
kNullAddress
;
38
39
// static
40
Address
ExternalCodeCompressionScheme::base_non_inlined() {
return
base_
; }
41
42
// static
43
void
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
v8::internal::MainCage::set_base_non_inlined
static V8_EXPORT_PRIVATE void set_base_non_inlined(Address base)
v8::internal::MainCage::base_non_inlined
static V8_EXPORT_PRIVATE Address base_non_inlined()
base_
OpIndex base_
Definition
instruction-selector-arm64.cc:281
base
OpIndex base
Definition
instruction-selector-ia32.cc:65
v8::internal
Definition
api-arguments-inl.h:20
v8::internal::Address
Address
Definition
api-callbacks-inl.h:36
v8::internal::kNullAddress
static constexpr Address kNullAddress
Definition
v8-internal.h:53
ptr-compr-inl.h
src
common
ptr-compr.cc
Generated on Sun Apr 6 2025 21:08:51 for v8 by
1.12.0