node-linux-arm64 24.11.0 → 25.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +270 -1832
- package/README.md +2 -4
- package/bin/node +0 -0
- package/include/node/common.gypi +4 -16
- package/include/node/config.gypi +11 -9
- package/include/node/cppgc/allocation.h +3 -3
- package/include/node/cppgc/cross-thread-persistent.h +25 -29
- package/include/node/cppgc/internal/finalizer-trait.h +1 -1
- package/include/node/cppgc/internal/gc-info.h +3 -3
- package/include/node/cppgc/internal/logging.h +2 -2
- package/include/node/cppgc/internal/name-trait.h +1 -1
- package/include/node/cppgc/internal/pointer-policies.h +3 -3
- package/include/node/cppgc/member.h +10 -4
- package/include/node/cppgc/persistent.h +14 -15
- package/include/node/cppgc/platform.h +1 -1
- package/include/node/cppgc/trace-trait.h +1 -2
- package/include/node/cppgc/visitor.h +14 -9
- package/include/node/js_native_api.h +12 -0
- package/include/node/node.h +42 -78
- package/include/node/node_version.h +5 -5
- package/include/node/v8-array-buffer.h +1 -1
- package/include/node/v8-callbacks.h +3 -4
- package/include/node/v8-context.h +15 -5
- package/include/node/v8-data.h +5 -0
- package/include/node/v8-debug.h +11 -0
- package/include/node/v8-function-callback.h +26 -26
- package/include/node/v8-internal.h +136 -36
- package/include/node/v8-isolate.h +75 -16
- package/include/node/v8-json.h +8 -1
- package/include/node/v8-local-handle.h +112 -13
- package/include/node/v8-maybe.h +34 -10
- package/include/node/v8-memory-span.h +9 -4
- package/include/node/v8-message.h +3 -0
- package/include/node/v8-object.h +87 -24
- package/include/node/v8-persistent-handle.h +4 -4
- package/include/node/v8-platform.h +92 -28
- package/include/node/v8-primitive.h +22 -9
- package/include/node/v8-profiler.h +4 -0
- package/include/node/v8-sandbox.h +16 -0
- package/include/node/v8-script.h +17 -0
- package/include/node/v8-source-location.h +19 -26
- package/include/node/v8-template.h +37 -15
- package/include/node/v8-traced-handle.h +6 -6
- package/include/node/v8-unwinder.h +13 -0
- package/include/node/v8-version.h +4 -4
- package/include/node/v8config.h +65 -5
- package/package.json +1 -1
- package/share/doc/node/gdbinit +221 -4
- package/share/man/man1/node.1 +21 -4
package/README.md
CHANGED
|
@@ -323,8 +323,6 @@ For information about the governance of the Node.js project, see
|
|
|
323
323
|
**Erick Wendel** <<erick.workspace@gmail.com>> (he/him)
|
|
324
324
|
* [Ethan-Arrowood](https://github.com/Ethan-Arrowood) -
|
|
325
325
|
**Ethan Arrowood** <<ethan@arrowood.dev>> (he/him)
|
|
326
|
-
* [F3n67u](https://github.com/F3n67u) -
|
|
327
|
-
**Feng Yu** <<F3n67u@outlook.com>> (he/him)
|
|
328
326
|
* [fhinkel](https://github.com/fhinkel) -
|
|
329
327
|
**Franziska Hinkelmann** <<franziska.hinkelmann@gmail.com>> (she/her)
|
|
330
328
|
* [Flarna](https://github.com/Flarna) -
|
|
@@ -527,6 +525,8 @@ For information about the governance of the Node.js project, see
|
|
|
527
525
|
**Eugene Ostroukhov** <<eostroukhov@google.com>>
|
|
528
526
|
* [evanlucas](https://github.com/evanlucas) -
|
|
529
527
|
**Evan Lucas** <<evanlucas@me.com>> (he/him)
|
|
528
|
+
* [F3n67u](https://github.com/F3n67u) -
|
|
529
|
+
**Feng Yu** <<F3n67u@outlook.com>> (he/him)
|
|
530
530
|
* [firedfox](https://github.com/firedfox) -
|
|
531
531
|
**Daniel Wang** <<wangyang0123@gmail.com>>
|
|
532
532
|
* [Fishrock123](https://github.com/Fishrock123) -
|
|
@@ -751,8 +751,6 @@ maintaining the Node.js project.
|
|
|
751
751
|
**Oliver Medhurst** <<honk@goose.icu>> (they/them)
|
|
752
752
|
* [daeyeon](https://github.com/daeyeon) -
|
|
753
753
|
**Daeyeon Jeong** <<daeyeon.dev@gmail.com>> (he/him)
|
|
754
|
-
* [F3n67u](https://github.com/F3n67u) -
|
|
755
|
-
**Feng Yu** <<F3n67u@outlook.com>> (he/him)
|
|
756
754
|
* [gireeshpunathil](https://github.com/gireeshpunathil) -
|
|
757
755
|
**Gireesh Punathil** <<gpunathi@in.ibm.com>> (he/him)
|
|
758
756
|
* [gurgunday](https://github.com/gurgunday) -
|
package/bin/node
CHANGED
|
Binary file
|
package/include/node/common.gypi
CHANGED
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
|
|
39
39
|
# Reset this number to 0 on major V8 upgrades.
|
|
40
40
|
# Increment by one for each non-official patch applied to deps/v8.
|
|
41
|
-
'v8_embedder_string': '-node.
|
|
41
|
+
'v8_embedder_string': '-node.11',
|
|
42
42
|
|
|
43
43
|
##### V8 defaults for Node.js #####
|
|
44
44
|
|
|
@@ -78,14 +78,11 @@
|
|
|
78
78
|
'v8_win64_unwinding_info': 1,
|
|
79
79
|
|
|
80
80
|
# Variables controlling external defines exposed in public headers.
|
|
81
|
-
'v8_enable_conservative_stack_scanning%': 0,
|
|
82
|
-
'v8_enable_direct_local%': 0,
|
|
83
81
|
'v8_enable_map_packing%': 0,
|
|
84
82
|
'v8_enable_pointer_compression_shared_cage%': 0,
|
|
85
83
|
'v8_enable_external_code_space%': 0,
|
|
86
84
|
'v8_enable_sandbox%': 0,
|
|
87
85
|
'v8_enable_v8_checks%': 0,
|
|
88
|
-
'v8_enable_zone_compression%': 0,
|
|
89
86
|
'v8_use_perfetto': 0,
|
|
90
87
|
'tsan%': 0,
|
|
91
88
|
|
|
@@ -446,18 +443,15 @@
|
|
|
446
443
|
['v8_enable_pointer_compression == 1', {
|
|
447
444
|
'defines': ['V8_COMPRESS_POINTERS'],
|
|
448
445
|
}],
|
|
446
|
+
['v8_enable_pointer_compression == 1 and v8_enable_pointer_compression_shared_cage != 1', {
|
|
447
|
+
'defines': ['V8_COMPRESS_POINTERS_IN_MULTIPLE_CAGES'],
|
|
448
|
+
}],
|
|
449
449
|
['v8_enable_pointer_compression_shared_cage == 1', {
|
|
450
450
|
'defines': ['V8_COMPRESS_POINTERS_IN_SHARED_CAGE'],
|
|
451
451
|
}],
|
|
452
|
-
['v8_enable_pointer_compression == 1 and v8_enable_pointer_compression_shared_cage != 1', {
|
|
453
|
-
'defines': ['V8_COMPRESS_POINTERS_IN_ISOLATE_CAGE'],
|
|
454
|
-
}],
|
|
455
452
|
['v8_enable_pointer_compression == 1 or v8_enable_31bit_smis_on_64bit_arch == 1', {
|
|
456
453
|
'defines': ['V8_31BIT_SMIS_ON_64BIT_ARCH'],
|
|
457
454
|
}],
|
|
458
|
-
['v8_enable_zone_compression == 1', {
|
|
459
|
-
'defines': ['V8_COMPRESS_ZONES',],
|
|
460
|
-
}],
|
|
461
455
|
['v8_enable_sandbox == 1', {
|
|
462
456
|
'defines': ['V8_ENABLE_SANDBOX',],
|
|
463
457
|
}],
|
|
@@ -479,12 +473,6 @@
|
|
|
479
473
|
['tsan == 1', {
|
|
480
474
|
'defines': ['V8_IS_TSAN',],
|
|
481
475
|
}],
|
|
482
|
-
['v8_enable_conservative_stack_scanning == 1', {
|
|
483
|
-
'defines': ['V8_ENABLE_CONSERVATIVE_STACK_SCANNING',],
|
|
484
|
-
}],
|
|
485
|
-
['v8_enable_direct_local == 1', {
|
|
486
|
-
'defines': ['V8_ENABLE_DIRECT_LOCAL',],
|
|
487
|
-
}],
|
|
488
476
|
['OS == "win"', {
|
|
489
477
|
'defines': [
|
|
490
478
|
'WIN32',
|
package/include/node/config.gypi
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
'libraries': []},
|
|
9
9
|
'variables': { 'arm_fpu': 'neon',
|
|
10
10
|
'asan': 0,
|
|
11
|
-
'clang':
|
|
11
|
+
'clang': 1,
|
|
12
12
|
'control_flow_guard': 'false',
|
|
13
13
|
'coverage': 'false',
|
|
14
14
|
'dcheck_always_on': 0,
|
|
@@ -19,7 +19,6 @@
|
|
|
19
19
|
'enable_pgo_use': 'false',
|
|
20
20
|
'error_on_warn': 'false',
|
|
21
21
|
'force_dynamic_crt': 0,
|
|
22
|
-
'gas_version': '2.38',
|
|
23
22
|
'host_arch': 'arm64',
|
|
24
23
|
'icu_data_in': '../../deps/icu-tmp/icudt77l.dat',
|
|
25
24
|
'icu_endianness': 'l',
|
|
@@ -28,7 +27,7 @@
|
|
|
28
27
|
'icu_small': 'false',
|
|
29
28
|
'icu_ver_major': '77',
|
|
30
29
|
'libdir': 'lib',
|
|
31
|
-
'llvm_version': '
|
|
30
|
+
'llvm_version': '19.1',
|
|
32
31
|
'napi_build_version': '10',
|
|
33
32
|
'node_builtin_shareable_builtins': [ 'deps/cjs-module-lexer/lexer.js',
|
|
34
33
|
'deps/cjs-module-lexer/dist/lexer.js',
|
|
@@ -36,6 +35,7 @@
|
|
|
36
35
|
'deps/amaro/dist/index.js'],
|
|
37
36
|
'node_byteorder': 'little',
|
|
38
37
|
'node_cctest_sources': [ 'src/node_snapshot_stub.cc',
|
|
38
|
+
'test/cctest/inspector/test_network_requests_buffer.cc',
|
|
39
39
|
'test/cctest/inspector/test_node_protocol.cc',
|
|
40
40
|
'test/cctest/node_test_fixture.cc',
|
|
41
41
|
'test/cctest/test_aliased_buffer.cc',
|
|
@@ -60,6 +60,7 @@
|
|
|
60
60
|
'test/cctest/test_platform.cc',
|
|
61
61
|
'test/cctest/test_quic_cid.cc',
|
|
62
62
|
'test/cctest/test_quic_error.cc',
|
|
63
|
+
'test/cctest/test_quic_preferredaddress.cc',
|
|
63
64
|
'test/cctest/test_quic_tokens.cc',
|
|
64
65
|
'test/cctest/test_report.cc',
|
|
65
66
|
'test/cctest/test_sockaddr.cc',
|
|
@@ -72,7 +73,7 @@
|
|
|
72
73
|
'node_enable_v8_vtunejit': 'false',
|
|
73
74
|
'node_enable_v8windbg': 'false',
|
|
74
75
|
'node_fipsinstall': 'false',
|
|
75
|
-
'node_install_corepack': '
|
|
76
|
+
'node_install_corepack': 'false',
|
|
76
77
|
'node_install_npm': 'true',
|
|
77
78
|
'node_library_files': [ 'lib/_http_agent.js',
|
|
78
79
|
'lib/_http_client.js',
|
|
@@ -113,7 +114,6 @@
|
|
|
113
114
|
'lib/internal/abort_controller.js',
|
|
114
115
|
'lib/internal/assert.js',
|
|
115
116
|
'lib/internal/assert/assertion_error.js',
|
|
116
|
-
'lib/internal/assert/calltracker.js',
|
|
117
117
|
'lib/internal/assert/myers_diff.js',
|
|
118
118
|
'lib/internal/assert/utils.js',
|
|
119
119
|
'lib/internal/async_context_frame.js',
|
|
@@ -294,6 +294,7 @@
|
|
|
294
294
|
'lib/internal/readline/utils.js',
|
|
295
295
|
'lib/internal/repl.js',
|
|
296
296
|
'lib/internal/repl/await.js',
|
|
297
|
+
'lib/internal/repl/completion.js',
|
|
297
298
|
'lib/internal/repl/history.js',
|
|
298
299
|
'lib/internal/repl/utils.js',
|
|
299
300
|
'lib/internal/socket_list.js',
|
|
@@ -344,7 +345,9 @@
|
|
|
344
345
|
'lib/internal/test_runner/tests_stream.js',
|
|
345
346
|
'lib/internal/test_runner/utils.js',
|
|
346
347
|
'lib/internal/timers.js',
|
|
348
|
+
'lib/internal/tls/common.js',
|
|
347
349
|
'lib/internal/tls/secure-context.js',
|
|
350
|
+
'lib/internal/tls/wrap.js',
|
|
348
351
|
'lib/internal/trace_events_async_hooks.js',
|
|
349
352
|
'lib/internal/tty.js',
|
|
350
353
|
'lib/internal/url.js',
|
|
@@ -421,10 +424,9 @@
|
|
|
421
424
|
'lib/wasi.js',
|
|
422
425
|
'lib/worker_threads.js',
|
|
423
426
|
'lib/zlib.js'],
|
|
424
|
-
'node_module_version':
|
|
427
|
+
'node_module_version': 141,
|
|
425
428
|
'node_no_browser_globals': 'false',
|
|
426
429
|
'node_prefix': '/',
|
|
427
|
-
'node_quic': 'false',
|
|
428
430
|
'node_release_urlbase': 'https://nodejs.org/download/release/',
|
|
429
431
|
'node_section_ordering_info': '',
|
|
430
432
|
'node_shared': 'false',
|
|
@@ -456,9 +458,9 @@
|
|
|
456
458
|
'node_without_node_options': 'false',
|
|
457
459
|
'node_write_snapshot_as_array_literals': 'false',
|
|
458
460
|
'openssl_is_fips': 'false',
|
|
459
|
-
'
|
|
461
|
+
'openssl_version': 810549327,
|
|
460
462
|
'ossfuzz': 'false',
|
|
461
|
-
'shlib_suffix': 'so.
|
|
463
|
+
'shlib_suffix': 'so.141',
|
|
462
464
|
'single_executable_application': 'true',
|
|
463
465
|
'suppress_all_error_on_warn': 'false',
|
|
464
466
|
'target_arch': 'arm64',
|
|
@@ -71,7 +71,7 @@ class MakeGarbageCollectedTraitInternal {
|
|
|
71
71
|
template <typename GCInfoType, typename CustomSpace, size_t alignment>
|
|
72
72
|
struct AllocationDispatcher final {
|
|
73
73
|
static void* Invoke(AllocationHandle& handle, size_t size) {
|
|
74
|
-
static_assert(std::
|
|
74
|
+
static_assert(std::is_base_of_v<CustomSpaceBase, CustomSpace>,
|
|
75
75
|
"Custom space must inherit from CustomSpaceBase.");
|
|
76
76
|
static_assert(
|
|
77
77
|
!CustomSpace::kSupportsCompaction,
|
|
@@ -111,7 +111,7 @@ class MakeGarbageCollectedTraitInternal {
|
|
|
111
111
|
api_constants::kDefaultAlignment>
|
|
112
112
|
final {
|
|
113
113
|
static void* Invoke(AllocationHandle& handle, size_t size) {
|
|
114
|
-
static_assert(std::
|
|
114
|
+
static_assert(std::is_base_of_v<CustomSpaceBase, CustomSpace>,
|
|
115
115
|
"Custom space must inherit from CustomSpaceBase.");
|
|
116
116
|
return MakeGarbageCollectedTraitInternal::Allocate(
|
|
117
117
|
handle, size, internal::GCInfoTrait<GCInfoType>::Index(),
|
|
@@ -164,7 +164,7 @@ class MakeGarbageCollectedTraitBase
|
|
|
164
164
|
*/
|
|
165
165
|
V8_INLINE static void* Allocate(AllocationHandle& handle, size_t size) {
|
|
166
166
|
static_assert(
|
|
167
|
-
std::
|
|
167
|
+
std::is_base_of_v<typename T::ParentMostGarbageCollectedType, T>,
|
|
168
168
|
"U of GarbageCollected<U> must be a base of T. Check "
|
|
169
169
|
"GarbageCollected<T> base class inheritance.");
|
|
170
170
|
static constexpr size_t kWantedAlignment =
|
|
@@ -102,20 +102,19 @@ class BasicCrossThreadPersistent final : public CrossThreadPersistentBase,
|
|
|
102
102
|
// node.
|
|
103
103
|
}
|
|
104
104
|
|
|
105
|
-
BasicCrossThreadPersistent(
|
|
106
|
-
const SourceLocation& loc = SourceLocation::Current())
|
|
105
|
+
BasicCrossThreadPersistent(SourceLocation loc = SourceLocation::Current())
|
|
107
106
|
: LocationPolicy(loc) {}
|
|
108
107
|
|
|
109
|
-
BasicCrossThreadPersistent(
|
|
110
|
-
|
|
108
|
+
BasicCrossThreadPersistent(std::nullptr_t,
|
|
109
|
+
SourceLocation loc = SourceLocation::Current())
|
|
111
110
|
: LocationPolicy(loc) {}
|
|
112
111
|
|
|
113
|
-
BasicCrossThreadPersistent(
|
|
114
|
-
|
|
112
|
+
BasicCrossThreadPersistent(SentinelPointer s,
|
|
113
|
+
SourceLocation loc = SourceLocation::Current())
|
|
115
114
|
: CrossThreadPersistentBase(s), LocationPolicy(loc) {}
|
|
116
115
|
|
|
117
|
-
BasicCrossThreadPersistent(
|
|
118
|
-
|
|
116
|
+
BasicCrossThreadPersistent(T* raw,
|
|
117
|
+
SourceLocation loc = SourceLocation::Current())
|
|
119
118
|
: CrossThreadPersistentBase(raw), LocationPolicy(loc) {
|
|
120
119
|
if (!IsValid(raw)) return;
|
|
121
120
|
PersistentRegionLock guard;
|
|
@@ -132,9 +131,8 @@ class BasicCrossThreadPersistent final : public CrossThreadPersistentBase,
|
|
|
132
131
|
friend class BasicCrossThreadPersistent;
|
|
133
132
|
};
|
|
134
133
|
|
|
135
|
-
BasicCrossThreadPersistent(
|
|
136
|
-
|
|
137
|
-
const SourceLocation& loc = SourceLocation::Current())
|
|
134
|
+
BasicCrossThreadPersistent(UnsafeCtorTag, T* raw,
|
|
135
|
+
SourceLocation loc = SourceLocation::Current())
|
|
138
136
|
: CrossThreadPersistentBase(raw), LocationPolicy(loc) {
|
|
139
137
|
if (!IsValid(raw)) return;
|
|
140
138
|
CrossThreadPersistentRegion& region = this->GetPersistentRegion(raw);
|
|
@@ -142,24 +140,23 @@ class BasicCrossThreadPersistent final : public CrossThreadPersistentBase,
|
|
|
142
140
|
this->CheckPointer(raw);
|
|
143
141
|
}
|
|
144
142
|
|
|
145
|
-
BasicCrossThreadPersistent(
|
|
146
|
-
|
|
143
|
+
BasicCrossThreadPersistent(T& raw,
|
|
144
|
+
SourceLocation loc = SourceLocation::Current())
|
|
147
145
|
: BasicCrossThreadPersistent(&raw, loc) {}
|
|
148
146
|
|
|
149
147
|
template <typename U, typename MemberBarrierPolicy,
|
|
150
148
|
typename MemberWeaknessTag, typename MemberCheckingPolicy,
|
|
151
149
|
typename MemberStorageType,
|
|
152
|
-
typename = std::enable_if_t<std::
|
|
150
|
+
typename = std::enable_if_t<std::is_base_of_v<T, U>>>
|
|
153
151
|
BasicCrossThreadPersistent(
|
|
154
152
|
internal::BasicMember<U, MemberBarrierPolicy, MemberWeaknessTag,
|
|
155
153
|
MemberCheckingPolicy, MemberStorageType>
|
|
156
154
|
member,
|
|
157
|
-
|
|
155
|
+
SourceLocation loc = SourceLocation::Current())
|
|
158
156
|
: BasicCrossThreadPersistent(member.Get(), loc) {}
|
|
159
157
|
|
|
160
|
-
BasicCrossThreadPersistent(
|
|
161
|
-
|
|
162
|
-
const SourceLocation& loc = SourceLocation::Current())
|
|
158
|
+
BasicCrossThreadPersistent(const BasicCrossThreadPersistent& other,
|
|
159
|
+
SourceLocation loc = SourceLocation::Current())
|
|
163
160
|
: BasicCrossThreadPersistent(loc) {
|
|
164
161
|
// Invoke operator=.
|
|
165
162
|
*this = other;
|
|
@@ -168,19 +165,18 @@ class BasicCrossThreadPersistent final : public CrossThreadPersistentBase,
|
|
|
168
165
|
// Heterogeneous ctor.
|
|
169
166
|
template <typename U, typename OtherWeaknessPolicy,
|
|
170
167
|
typename OtherLocationPolicy, typename OtherCheckingPolicy,
|
|
171
|
-
typename = std::enable_if_t<std::
|
|
172
|
-
BasicCrossThreadPersistent(
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
const SourceLocation& loc = SourceLocation::Current())
|
|
168
|
+
typename = std::enable_if_t<std::is_base_of_v<T, U>>>
|
|
169
|
+
BasicCrossThreadPersistent(const BasicCrossThreadPersistent<
|
|
170
|
+
U, OtherWeaknessPolicy, OtherLocationPolicy,
|
|
171
|
+
OtherCheckingPolicy>& other,
|
|
172
|
+
SourceLocation loc = SourceLocation::Current())
|
|
177
173
|
: BasicCrossThreadPersistent(loc) {
|
|
178
174
|
*this = other;
|
|
179
175
|
}
|
|
180
176
|
|
|
181
177
|
BasicCrossThreadPersistent(
|
|
182
178
|
BasicCrossThreadPersistent&& other,
|
|
183
|
-
|
|
179
|
+
SourceLocation loc = SourceLocation::Current()) noexcept {
|
|
184
180
|
// Invoke operator=.
|
|
185
181
|
*this = std::move(other);
|
|
186
182
|
}
|
|
@@ -194,7 +190,7 @@ class BasicCrossThreadPersistent final : public CrossThreadPersistentBase,
|
|
|
194
190
|
|
|
195
191
|
template <typename U, typename OtherWeaknessPolicy,
|
|
196
192
|
typename OtherLocationPolicy, typename OtherCheckingPolicy,
|
|
197
|
-
typename = std::enable_if_t<std::
|
|
193
|
+
typename = std::enable_if_t<std::is_base_of_v<T, U>>>
|
|
198
194
|
BasicCrossThreadPersistent& operator=(
|
|
199
195
|
const BasicCrossThreadPersistent<U, OtherWeaknessPolicy,
|
|
200
196
|
OtherLocationPolicy,
|
|
@@ -232,7 +228,7 @@ class BasicCrossThreadPersistent final : public CrossThreadPersistentBase,
|
|
|
232
228
|
template <typename U, typename MemberBarrierPolicy,
|
|
233
229
|
typename MemberWeaknessTag, typename MemberCheckingPolicy,
|
|
234
230
|
typename MemberStorageType,
|
|
235
|
-
typename = std::enable_if_t<std::
|
|
231
|
+
typename = std::enable_if_t<std::is_base_of_v<T, U>>>
|
|
236
232
|
BasicCrossThreadPersistent& operator=(
|
|
237
233
|
internal::BasicMember<U, MemberBarrierPolicy, MemberWeaknessTag,
|
|
238
234
|
MemberCheckingPolicy, MemberStorageType>
|
|
@@ -338,8 +334,8 @@ class BasicCrossThreadPersistent final : public CrossThreadPersistentBase,
|
|
|
338
334
|
}
|
|
339
335
|
|
|
340
336
|
template <typename U = T,
|
|
341
|
-
typename =
|
|
342
|
-
U, WeaknessPolicy>::IsStrongPersistent::value
|
|
337
|
+
typename = std::enable_if_t<!BasicCrossThreadPersistent<
|
|
338
|
+
U, WeaknessPolicy>::IsStrongPersistent::value>>
|
|
343
339
|
BasicCrossThreadPersistent<U, internal::StrongCrossThreadPersistentPolicy>
|
|
344
340
|
Lock() const {
|
|
345
341
|
return BasicCrossThreadPersistent<
|
|
@@ -70,7 +70,7 @@ struct FinalizerTrait {
|
|
|
70
70
|
// - a destructor.
|
|
71
71
|
static constexpr bool kNonTrivialFinalizer =
|
|
72
72
|
internal::HasFinalizeGarbageCollectedObject<T>::value ||
|
|
73
|
-
!std::
|
|
73
|
+
!std::is_trivially_destructible_v<std::remove_cv_t<T>>;
|
|
74
74
|
|
|
75
75
|
static void Finalize(void* obj) {
|
|
76
76
|
internal::FinalizerTraitImpl<T, kNonTrivialFinalizer>::Finalize(obj);
|
|
@@ -108,10 +108,10 @@ struct GCInfoTrait final {
|
|
|
108
108
|
template <typename T, typename ParentMostGarbageCollectedType>
|
|
109
109
|
struct GCInfoFolding final {
|
|
110
110
|
static constexpr bool kHasVirtualDestructorAtBase =
|
|
111
|
-
std::
|
|
111
|
+
std::has_virtual_destructor_v<ParentMostGarbageCollectedType>;
|
|
112
112
|
static constexpr bool kBothTypesAreTriviallyDestructible =
|
|
113
|
-
std::
|
|
114
|
-
std::
|
|
113
|
+
std::is_trivially_destructible_v<ParentMostGarbageCollectedType> &&
|
|
114
|
+
std::is_trivially_destructible_v<T>;
|
|
115
115
|
static constexpr bool kHasCustomFinalizerDispatchAtBase =
|
|
116
116
|
internal::HasFinalizeGarbageCollectedObject<
|
|
117
117
|
ParentMostGarbageCollectedType>::value;
|
|
@@ -12,9 +12,9 @@ namespace cppgc {
|
|
|
12
12
|
namespace internal {
|
|
13
13
|
|
|
14
14
|
void V8_EXPORT DCheckImpl(const char*,
|
|
15
|
-
|
|
15
|
+
SourceLocation = SourceLocation::Current());
|
|
16
16
|
[[noreturn]] void V8_EXPORT
|
|
17
|
-
FatalImpl(const char*,
|
|
17
|
+
FatalImpl(const char*, SourceLocation = SourceLocation::Current());
|
|
18
18
|
|
|
19
19
|
// Used to ignore -Wunused-variable.
|
|
20
20
|
template <typename>
|
|
@@ -80,7 +80,7 @@ class NameTrait final : public NameTraitBase {
|
|
|
80
80
|
#elif CPPGC_SUPPORTS_OBJECT_NAMES
|
|
81
81
|
return true;
|
|
82
82
|
#else // !CPPGC_SUPPORTS_OBJECT_NAMES
|
|
83
|
-
return std::
|
|
83
|
+
return std::is_base_of_v<NameProvider, T>;
|
|
84
84
|
#endif // !CPPGC_SUPPORTS_OBJECT_NAMES
|
|
85
85
|
}
|
|
86
86
|
|
|
@@ -203,11 +203,11 @@ using DefaultCrossThreadPersistentCheckingPolicy = DisabledCheckingPolicy;
|
|
|
203
203
|
|
|
204
204
|
class KeepLocationPolicy {
|
|
205
205
|
public:
|
|
206
|
-
constexpr
|
|
206
|
+
constexpr SourceLocation Location() const { return location_; }
|
|
207
207
|
|
|
208
208
|
protected:
|
|
209
209
|
constexpr KeepLocationPolicy() = default;
|
|
210
|
-
constexpr explicit KeepLocationPolicy(
|
|
210
|
+
constexpr explicit KeepLocationPolicy(SourceLocation location)
|
|
211
211
|
: location_(location) {}
|
|
212
212
|
|
|
213
213
|
// KeepLocationPolicy must not copy underlying source locations.
|
|
@@ -228,7 +228,7 @@ class IgnoreLocationPolicy {
|
|
|
228
228
|
|
|
229
229
|
protected:
|
|
230
230
|
constexpr IgnoreLocationPolicy() = default;
|
|
231
|
-
constexpr explicit IgnoreLocationPolicy(
|
|
231
|
+
constexpr explicit IgnoreLocationPolicy(SourceLocation) {}
|
|
232
232
|
};
|
|
233
233
|
|
|
234
234
|
#if CPPGC_SUPPORTS_OBJECT_NAMES
|
|
@@ -20,6 +20,8 @@ namespace cppgc {
|
|
|
20
20
|
|
|
21
21
|
namespace subtle {
|
|
22
22
|
class HeapConsistency;
|
|
23
|
+
template <typename, typename, typename>
|
|
24
|
+
class TaggedUncompressedMember;
|
|
23
25
|
} // namespace subtle
|
|
24
26
|
|
|
25
27
|
class Visitor;
|
|
@@ -163,7 +165,7 @@ class V8_TRIVIAL_ABI BasicMember final : private MemberBase<StorageType>,
|
|
|
163
165
|
template <typename U, typename PersistentWeaknessPolicy,
|
|
164
166
|
typename PersistentLocationPolicy,
|
|
165
167
|
typename PersistentCheckingPolicy,
|
|
166
|
-
typename = std::enable_if_t<std::
|
|
168
|
+
typename = std::enable_if_t<std::is_base_of_v<T, U>>>
|
|
167
169
|
V8_INLINE BasicMember(const BasicPersistent<U, PersistentWeaknessPolicy,
|
|
168
170
|
PersistentLocationPolicy,
|
|
169
171
|
PersistentCheckingPolicy>& p)
|
|
@@ -219,7 +221,7 @@ class V8_TRIVIAL_ABI BasicMember final : private MemberBase<StorageType>,
|
|
|
219
221
|
template <typename U, typename PersistentWeaknessPolicy,
|
|
220
222
|
typename PersistentLocationPolicy,
|
|
221
223
|
typename PersistentCheckingPolicy,
|
|
222
|
-
typename = std::enable_if_t<std::
|
|
224
|
+
typename = std::enable_if_t<std::is_base_of_v<T, U>>>
|
|
223
225
|
V8_INLINE BasicMember& operator=(
|
|
224
226
|
const BasicPersistent<U, PersistentWeaknessPolicy,
|
|
225
227
|
PersistentLocationPolicy, PersistentCheckingPolicy>&
|
|
@@ -296,8 +298,10 @@ class V8_TRIVIAL_ABI BasicMember final : private MemberBase<StorageType>,
|
|
|
296
298
|
return *this;
|
|
297
299
|
}
|
|
298
300
|
|
|
299
|
-
V8_INLINE const
|
|
300
|
-
|
|
301
|
+
V8_INLINE const void* GetRawAtomic() const { return Base::GetRawAtomic(); }
|
|
302
|
+
|
|
303
|
+
V8_INLINE const T* GetAtomic() const {
|
|
304
|
+
return static_cast<const T*>(GetRawAtomic());
|
|
301
305
|
}
|
|
302
306
|
|
|
303
307
|
V8_INLINE void InitializingWriteBarrier(T* value) const {
|
|
@@ -328,6 +332,8 @@ class V8_TRIVIAL_ABI BasicMember final : private MemberBase<StorageType>,
|
|
|
328
332
|
V8_INLINE T* GetFromGC() const { return Get(); }
|
|
329
333
|
|
|
330
334
|
friend class cppgc::subtle::HeapConsistency;
|
|
335
|
+
template <typename, typename, typename>
|
|
336
|
+
friend class cppgc::subtle::TaggedUncompressedMember;
|
|
331
337
|
friend class cppgc::Visitor;
|
|
332
338
|
template <typename U>
|
|
333
339
|
friend struct cppgc::TraceTrait;
|
|
@@ -58,20 +58,20 @@ class BasicPersistent final : public PersistentBase,
|
|
|
58
58
|
|
|
59
59
|
// Null-state/sentinel constructors.
|
|
60
60
|
BasicPersistent( // NOLINT
|
|
61
|
-
|
|
61
|
+
SourceLocation loc = SourceLocation::Current())
|
|
62
62
|
: LocationPolicy(loc) {}
|
|
63
63
|
|
|
64
64
|
BasicPersistent(std::nullptr_t, // NOLINT
|
|
65
|
-
|
|
65
|
+
SourceLocation loc = SourceLocation::Current())
|
|
66
66
|
: LocationPolicy(loc) {}
|
|
67
67
|
|
|
68
68
|
BasicPersistent( // NOLINT
|
|
69
|
-
SentinelPointer s,
|
|
69
|
+
SentinelPointer s, SourceLocation loc = SourceLocation::Current())
|
|
70
70
|
: PersistentBase(s), LocationPolicy(loc) {}
|
|
71
71
|
|
|
72
72
|
// Raw value constructors.
|
|
73
73
|
BasicPersistent(T* raw, // NOLINT
|
|
74
|
-
|
|
74
|
+
SourceLocation loc = SourceLocation::Current())
|
|
75
75
|
: PersistentBase(raw), LocationPolicy(loc) {
|
|
76
76
|
if (!IsValid()) return;
|
|
77
77
|
SetNode(WeaknessPolicy::GetPersistentRegion(GetValue())
|
|
@@ -80,30 +80,29 @@ class BasicPersistent final : public PersistentBase,
|
|
|
80
80
|
}
|
|
81
81
|
|
|
82
82
|
BasicPersistent(T& raw, // NOLINT
|
|
83
|
-
|
|
83
|
+
SourceLocation loc = SourceLocation::Current())
|
|
84
84
|
: BasicPersistent(&raw, loc) {}
|
|
85
85
|
|
|
86
86
|
// Copy ctor.
|
|
87
87
|
BasicPersistent(const BasicPersistent& other,
|
|
88
|
-
|
|
88
|
+
SourceLocation loc = SourceLocation::Current())
|
|
89
89
|
: BasicPersistent(other.Get(), loc) {}
|
|
90
90
|
|
|
91
91
|
// Heterogeneous ctor.
|
|
92
92
|
template <typename U, typename OtherWeaknessPolicy,
|
|
93
93
|
typename OtherLocationPolicy, typename OtherCheckingPolicy,
|
|
94
|
-
typename = std::enable_if_t<std::
|
|
94
|
+
typename = std::enable_if_t<std::is_base_of_v<T, U>>>
|
|
95
95
|
// NOLINTNEXTLINE
|
|
96
96
|
BasicPersistent(
|
|
97
97
|
const BasicPersistent<U, OtherWeaknessPolicy, OtherLocationPolicy,
|
|
98
98
|
OtherCheckingPolicy>& other,
|
|
99
|
-
|
|
99
|
+
SourceLocation loc = SourceLocation::Current())
|
|
100
100
|
: BasicPersistent(other.Get(), loc) {}
|
|
101
101
|
|
|
102
102
|
// Move ctor. The heterogeneous move ctor is not supported since e.g.
|
|
103
103
|
// persistent can't reuse persistent node from weak persistent.
|
|
104
|
-
BasicPersistent(
|
|
105
|
-
|
|
106
|
-
const SourceLocation& loc = SourceLocation::Current()) noexcept
|
|
104
|
+
BasicPersistent(BasicPersistent&& other,
|
|
105
|
+
SourceLocation loc = SourceLocation::Current()) noexcept
|
|
107
106
|
: PersistentBase(std::move(other)), LocationPolicy(std::move(other)) {
|
|
108
107
|
if (!IsValid()) return;
|
|
109
108
|
GetNode()->UpdateOwner(this);
|
|
@@ -116,12 +115,12 @@ class BasicPersistent final : public PersistentBase,
|
|
|
116
115
|
template <typename U, typename MemberBarrierPolicy,
|
|
117
116
|
typename MemberWeaknessTag, typename MemberCheckingPolicy,
|
|
118
117
|
typename MemberStorageType,
|
|
119
|
-
typename = std::enable_if_t<std::
|
|
118
|
+
typename = std::enable_if_t<std::is_base_of_v<T, U>>>
|
|
120
119
|
// NOLINTNEXTLINE
|
|
121
120
|
BasicPersistent(const internal::BasicMember<
|
|
122
121
|
U, MemberBarrierPolicy, MemberWeaknessTag,
|
|
123
122
|
MemberCheckingPolicy, MemberStorageType>& member,
|
|
124
|
-
|
|
123
|
+
SourceLocation loc = SourceLocation::Current())
|
|
125
124
|
: BasicPersistent(member.Get(), loc) {}
|
|
126
125
|
|
|
127
126
|
~BasicPersistent() { Clear(); }
|
|
@@ -133,7 +132,7 @@ class BasicPersistent final : public PersistentBase,
|
|
|
133
132
|
|
|
134
133
|
template <typename U, typename OtherWeaknessPolicy,
|
|
135
134
|
typename OtherLocationPolicy, typename OtherCheckingPolicy,
|
|
136
|
-
typename = std::enable_if_t<std::
|
|
135
|
+
typename = std::enable_if_t<std::is_base_of_v<T, U>>>
|
|
137
136
|
BasicPersistent& operator=(
|
|
138
137
|
const BasicPersistent<U, OtherWeaknessPolicy, OtherLocationPolicy,
|
|
139
138
|
OtherCheckingPolicy>& other) {
|
|
@@ -158,7 +157,7 @@ class BasicPersistent final : public PersistentBase,
|
|
|
158
157
|
template <typename U, typename MemberBarrierPolicy,
|
|
159
158
|
typename MemberWeaknessTag, typename MemberCheckingPolicy,
|
|
160
159
|
typename MemberStorageType,
|
|
161
|
-
typename = std::enable_if_t<std::
|
|
160
|
+
typename = std::enable_if_t<std::is_base_of_v<T, U>>>
|
|
162
161
|
BasicPersistent& operator=(
|
|
163
162
|
const internal::BasicMember<U, MemberBarrierPolicy, MemberWeaknessTag,
|
|
164
163
|
MemberCheckingPolicy, MemberStorageType>&
|
|
@@ -165,7 +165,7 @@ V8_EXPORT void ShutdownProcess();
|
|
|
165
165
|
namespace internal {
|
|
166
166
|
|
|
167
167
|
V8_EXPORT void Fatal(const std::string& reason = std::string(),
|
|
168
|
-
|
|
168
|
+
SourceLocation = SourceLocation::Current());
|
|
169
169
|
|
|
170
170
|
} // namespace internal
|
|
171
171
|
|
|
@@ -23,8 +23,7 @@ using TraceRootCallback = void (*)(RootVisitor&, const void* object);
|
|
|
23
23
|
// Implementation of the default TraceTrait handling GarbageCollected and
|
|
24
24
|
// GarbageCollectedMixin.
|
|
25
25
|
template <typename T,
|
|
26
|
-
bool =
|
|
27
|
-
IsGarbageCollectedMixinTypeV<typename std::remove_const<T>::type>>
|
|
26
|
+
bool = IsGarbageCollectedMixinTypeV<std::remove_const_t<T>>>
|
|
28
27
|
struct TraceTraitImpl;
|
|
29
28
|
|
|
30
29
|
} // namespace internal
|