node-linux-arm64 21.7.3 → 22.0.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 +335 -1514
- package/README.md +22 -18
- package/bin/node +0 -0
- package/include/node/common.gypi +29 -2
- package/include/node/config.gypi +7 -5
- package/include/node/cppgc/internal/api-constants.h +1 -1
- package/include/node/cppgc/type-traits.h +25 -4
- package/include/node/node.h +23 -2
- package/include/node/node_api.h +1 -1
- package/include/node/node_buffer.h +1 -1
- package/include/node/node_version.h +4 -4
- package/include/node/v8-array-buffer.h +6 -0
- package/include/node/v8-callbacks.h +6 -12
- package/include/node/v8-container.h +54 -0
- package/include/node/v8-context.h +51 -22
- package/include/node/v8-embedder-heap.h +19 -3
- package/include/node/v8-embedder-state-scope.h +2 -1
- package/include/node/v8-exception.h +15 -9
- package/include/node/v8-forward.h +1 -0
- package/include/node/v8-function-callback.h +129 -20
- package/include/node/v8-handle-base.h +32 -80
- package/include/node/v8-internal.h +472 -65
- package/include/node/v8-isolate.h +86 -51
- package/include/node/v8-local-handle.h +257 -31
- package/include/node/v8-memory-span.h +157 -2
- package/include/node/v8-message.h +22 -3
- package/include/node/v8-object.h +29 -10
- package/include/node/v8-persistent-handle.h +5 -3
- package/include/node/v8-platform.h +81 -44
- package/include/node/v8-script.h +61 -11
- package/include/node/v8-snapshot.h +94 -23
- package/include/node/v8-statistics.h +10 -24
- package/include/node/v8-template.h +410 -131
- package/include/node/v8-traced-handle.h +81 -46
- package/include/node/v8-typed-array.h +115 -7
- package/include/node/v8-value.h +92 -4
- package/include/node/v8-version.h +4 -4
- package/include/node/v8config.h +35 -10
- package/package.json +1 -1
- package/share/doc/node/gdbinit +77 -38
- package/share/doc/node/lldb_commands.py +59 -29
- package/share/man/man1/node.1 +7 -6
package/README.md
CHANGED
|
@@ -195,7 +195,7 @@ For information about the governance of the Node.js project, see
|
|
|
195
195
|
* [ronag](https://github.com/ronag) -
|
|
196
196
|
**Robert Nagy** <<ronagy@icloud.com>>
|
|
197
197
|
* [ruyadorno](https://github.com/ruyadorno) -
|
|
198
|
-
**Ruy Adorno** <<
|
|
198
|
+
**Ruy Adorno** <<ruy@vlt.sh>> (he/him)
|
|
199
199
|
* [ShogunPanda](https://github.com/ShogunPanda) -
|
|
200
200
|
**Paolo Insogna** <<paolo@cowtech.it>> (he/him)
|
|
201
201
|
* [targos](https://github.com/targos) -
|
|
@@ -215,20 +215,10 @@ For information about the governance of the Node.js project, see
|
|
|
215
215
|
**Colin Ihrig** <<cjihrig@gmail.com>> (he/him)
|
|
216
216
|
* [codebytere](https://github.com/codebytere) -
|
|
217
217
|
**Shelley Vohr** <<shelley.vohr@gmail.com>> (she/her)
|
|
218
|
-
* [danbev](https://github.com/danbev) -
|
|
219
|
-
**Daniel Bevenius** <<daniel.bevenius@gmail.com>> (he/him)
|
|
220
218
|
* [danielleadams](https://github.com/danielleadams) -
|
|
221
219
|
**Danielle Adams** <<adamzdanielle@gmail.com>> (she/her)
|
|
222
|
-
* [fhinkel](https://github.com/fhinkel) -
|
|
223
|
-
**Franziska Hinkelmann** <<franziska.hinkelmann@gmail.com>> (she/her)
|
|
224
|
-
* [gabrielschulhof](https://github.com/gabrielschulhof) -
|
|
225
|
-
**Gabriel Schulhof** <<gabrielschulhof@gmail.com>>
|
|
226
|
-
* [mscdex](https://github.com/mscdex) -
|
|
227
|
-
**Brian White** <<mscdex@mscdex.net>>
|
|
228
220
|
* [MylesBorins](https://github.com/MylesBorins) -
|
|
229
221
|
**Myles Borins** <<myles.borins@gmail.com>> (he/him)
|
|
230
|
-
* [rvagg](https://github.com/rvagg) -
|
|
231
|
-
**Rod Vagg** <<r@va.gg>>
|
|
232
222
|
* [TimothyGu](https://github.com/TimothyGu) -
|
|
233
223
|
**Tiancheng "Timothy" Gu** <<timothygu99@gmail.com>> (he/him)
|
|
234
224
|
* [Trott](https://github.com/Trott) -
|
|
@@ -244,10 +234,16 @@ For information about the governance of the Node.js project, see
|
|
|
244
234
|
**Anna Henningsen** <<anna@addaleax.net>> (she/her)
|
|
245
235
|
* [chrisdickinson](https://github.com/chrisdickinson) -
|
|
246
236
|
**Chris Dickinson** <<christopher.s.dickinson@gmail.com>>
|
|
237
|
+
* [danbev](https://github.com/danbev) -
|
|
238
|
+
**Daniel Bevenius** <<daniel.bevenius@gmail.com>> (he/him)
|
|
247
239
|
* [evanlucas](https://github.com/evanlucas) -
|
|
248
240
|
**Evan Lucas** <<evanlucas@me.com>> (he/him)
|
|
241
|
+
* [fhinkel](https://github.com/fhinkel) -
|
|
242
|
+
**Franziska Hinkelmann** <<franziska.hinkelmann@gmail.com>> (she/her)
|
|
249
243
|
* [Fishrock123](https://github.com/Fishrock123) -
|
|
250
244
|
**Jeremiah Senkpiel** <<fishrock123@rocketmail.com>> (he/they)
|
|
245
|
+
* [gabrielschulhof](https://github.com/gabrielschulhof) -
|
|
246
|
+
**Gabriel Schulhof** <<gabrielschulhof@gmail.com>>
|
|
251
247
|
* [gibfahn](https://github.com/gibfahn) -
|
|
252
248
|
**Gibson Fahnestock** <<gibfahn@gmail.com>> (he/him)
|
|
253
249
|
* [indutny](https://github.com/indutny) -
|
|
@@ -258,6 +254,8 @@ For information about the governance of the Node.js project, see
|
|
|
258
254
|
**Josh Gavant** <<josh.gavant@outlook.com>>
|
|
259
255
|
* [mmarchini](https://github.com/mmarchini) -
|
|
260
256
|
**Mary Marchini** <<oss@mmarchini.me>> (she/her)
|
|
257
|
+
* [mscdex](https://github.com/mscdex) -
|
|
258
|
+
**Brian White** <<mscdex@mscdex.net>>
|
|
261
259
|
* [nebrius](https://github.com/nebrius) -
|
|
262
260
|
**Bryan Hughes** <<bryan@nebri.us>>
|
|
263
261
|
* [ofrobots](https://github.com/ofrobots) -
|
|
@@ -268,6 +266,8 @@ For information about the governance of the Node.js project, see
|
|
|
268
266
|
**Bert Belder** <<bertbelder@gmail.com>>
|
|
269
267
|
* [RaisinTen](https://github.com/RaisinTen) -
|
|
270
268
|
**Darshan Sen** <<raisinten@gmail.com>> (he/him)
|
|
269
|
+
* [rvagg](https://github.com/rvagg) -
|
|
270
|
+
**Rod Vagg** <<r@va.gg>>
|
|
271
271
|
* [sam-github](https://github.com/sam-github) -
|
|
272
272
|
**Sam Roberts** <<vieuxtech@gmail.com>>
|
|
273
273
|
* [shigeki](https://github.com/shigeki) -
|
|
@@ -365,8 +365,6 @@ For information about the governance of the Node.js project, see
|
|
|
365
365
|
**Harshitha K P** <<harshitha014@gmail.com>> (she/her)
|
|
366
366
|
* [himself65](https://github.com/himself65) -
|
|
367
367
|
**Zeyu "Alex" Yang** <<himself65@outlook.com>> (he/him)
|
|
368
|
-
* [iansu](https://github.com/iansu) -
|
|
369
|
-
**Ian Sutherland** <<ian@iansutherland.ca>>
|
|
370
368
|
* [JakobJingleheimer](https://github.com/JakobJingleheimer) -
|
|
371
369
|
**Jacob Smith** <<jacob@frende.me>> (he/him)
|
|
372
370
|
* [jasnell](https://github.com/jasnell) -
|
|
@@ -440,7 +438,7 @@ For information about the governance of the Node.js project, see
|
|
|
440
438
|
* [ronag](https://github.com/ronag) -
|
|
441
439
|
**Robert Nagy** <<ronagy@icloud.com>>
|
|
442
440
|
* [ruyadorno](https://github.com/ruyadorno) -
|
|
443
|
-
**Ruy Adorno** <<
|
|
441
|
+
**Ruy Adorno** <<ruy@vlt.sh>> (he/him)
|
|
444
442
|
* [ryzokuken](https://github.com/ryzokuken) -
|
|
445
443
|
**Ujjwal Sharma** <<ryzokuken@disroot.org>> (he/him)
|
|
446
444
|
* [santigimeno](https://github.com/santigimeno) -
|
|
@@ -465,6 +463,8 @@ For information about the governance of the Node.js project, see
|
|
|
465
463
|
**Trivikram Kamat** <<trivikr.dev@gmail.com>>
|
|
466
464
|
* [Trott](https://github.com/Trott) -
|
|
467
465
|
**Rich Trott** <<rtrott@gmail.com>> (he/him)
|
|
466
|
+
* [UlisesGascon](https://github.com/ulisesgascon) -
|
|
467
|
+
**Ulises Gascón** <<ulisesgascongonzalez@gmail.com>> (he/him)
|
|
468
468
|
* [vdeturckheim](https://github.com/vdeturckheim) -
|
|
469
469
|
**Vladimir de Turckheim** <<vlad2t@hotmail.com>> (he/him)
|
|
470
470
|
* [vmoroz](https://github.com/vmoroz) -
|
|
@@ -480,7 +480,7 @@ For information about the governance of the Node.js project, see
|
|
|
480
480
|
* [ZYSzys](https://github.com/ZYSzys) -
|
|
481
481
|
**Yongsheng Zhang** <<zyszys98@gmail.com>> (he/him)
|
|
482
482
|
* [zcbenz](https://github.com/zcbenz) -
|
|
483
|
-
**Cheng Zhao**
|
|
483
|
+
**Cheng Zhao** <<zcbenz@gmail.com>> (he/him)
|
|
484
484
|
|
|
485
485
|
<details>
|
|
486
486
|
|
|
@@ -553,6 +553,8 @@ For information about the governance of the Node.js project, see
|
|
|
553
553
|
**Yang Guo** <<yangguo@chromium.org>> (he/him)
|
|
554
554
|
* [hiroppy](https://github.com/hiroppy) -
|
|
555
555
|
**Yuta Hiroto** <<hello@hiroppy.me>> (he/him)
|
|
556
|
+
* [iansu](https://github.com/iansu) -
|
|
557
|
+
**Ian Sutherland** <<ian@iansutherland.ca>>
|
|
556
558
|
* [iarna](https://github.com/iarna) -
|
|
557
559
|
**Rebecca Turner** <<me@re-becca.org>>
|
|
558
560
|
* [imran-iq](https://github.com/imran-iq) -
|
|
@@ -761,6 +763,8 @@ Primary GPG keys for Node.js Releasers (some Releasers sign with subkeys):
|
|
|
761
763
|
`74F12602B6F1C4E913FAA37AD3A89613643B6201`
|
|
762
764
|
* **Juan José Arboleda** <<soyjuanarbol@gmail.com>>
|
|
763
765
|
`DD792F5973C6DE52C432CBDAC77ABFA00DDBF2B7`
|
|
766
|
+
* **Marco Ippolito** <<marcoippolito54@gmail.com>>
|
|
767
|
+
`CC68F5A3106FF448322E48ED27F5E38D5B0A215F`
|
|
764
768
|
* **Michaël Zasso** <<targos@protonmail.com>>
|
|
765
769
|
`8FCCA13FEF1D0C2E91008E09770F7A9A5AE15600`
|
|
766
770
|
* **Myles Borins** <<myles.borins@gmail.com>>
|
|
@@ -782,6 +786,7 @@ gpg --keyserver hkps://keys.openpgp.org --recv-keys 4ED778F539E3634C779C87C6D706
|
|
|
782
786
|
gpg --keyserver hkps://keys.openpgp.org --recv-keys 141F07595B7B3FFE74309A937405533BE57C7D57
|
|
783
787
|
gpg --keyserver hkps://keys.openpgp.org --recv-keys 74F12602B6F1C4E913FAA37AD3A89613643B6201
|
|
784
788
|
gpg --keyserver hkps://keys.openpgp.org --recv-keys DD792F5973C6DE52C432CBDAC77ABFA00DDBF2B7
|
|
789
|
+
gpg --keyserver hkps://keys.openpgp.org --recv-keys CC68F5A3106FF448322E48ED27F5E38D5B0A215F
|
|
785
790
|
gpg --keyserver hkps://keys.openpgp.org --recv-keys 8FCCA13FEF1D0C2E91008E09770F7A9A5AE15600
|
|
786
791
|
gpg --keyserver hkps://keys.openpgp.org --recv-keys C4F0DFFF4E8C1A8236409D08E73BC641CC11F4C8
|
|
787
792
|
gpg --keyserver hkps://keys.openpgp.org --recv-keys 890C08DB8579162FEE0DF9DB8BEAB4DFCF555EF4
|
|
@@ -843,12 +848,11 @@ releases on a rotation basis as outlined in the
|
|
|
843
848
|
* Datadog
|
|
844
849
|
* [bengl](https://github.com/bengl) -
|
|
845
850
|
**Bryan English** <<bryan@bryanenglish.com>> (he/him)
|
|
846
|
-
* NearForm
|
|
847
|
-
* [RafaelGSS](https://github.com/RafaelGSS) -
|
|
848
|
-
**Rafael Gonzaga** <<rafael.nunu@hotmail.com>> (he/him)
|
|
849
851
|
* NodeSource
|
|
850
852
|
* [juanarbol](https://github.com/juanarbol) -
|
|
851
853
|
**Juan José Arboleda** <<soyjuanarbol@gmail.com>> (he/him)
|
|
854
|
+
* [RafaelGSS](https://github.com/RafaelGSS) -
|
|
855
|
+
**Rafael Gonzaga** <<rafael.nunu@hotmail.com>> (he/him)
|
|
852
856
|
* Platformatic
|
|
853
857
|
* [mcollina](https://github.com/mcollina) -
|
|
854
858
|
**Matteo Collina** <<matteo.collina@gmail.com>> (he/him)
|
package/bin/node
CHANGED
|
Binary file
|
package/include/node/common.gypi
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
'variables': {
|
|
3
3
|
'configuring_node%': 0,
|
|
4
4
|
'asan%': 0,
|
|
5
|
+
'ubsan%': 0,
|
|
5
6
|
'werror': '', # Turn off -Werror in V8 build.
|
|
6
7
|
'visibility%': 'hidden', # V8's visibility setting
|
|
7
8
|
'target_arch%': 'ia32', # set v8's target architecture
|
|
@@ -36,7 +37,7 @@
|
|
|
36
37
|
|
|
37
38
|
# Reset this number to 0 on major V8 upgrades.
|
|
38
39
|
# Increment by one for each non-official patch applied to deps/v8.
|
|
39
|
-
'v8_embedder_string': '-node.
|
|
40
|
+
'v8_embedder_string': '-node.10',
|
|
40
41
|
|
|
41
42
|
##### V8 defaults for Node.js #####
|
|
42
43
|
|
|
@@ -285,7 +286,10 @@
|
|
|
285
286
|
'VCCLCompilerTool': {
|
|
286
287
|
'AdditionalOptions': [
|
|
287
288
|
'/Zc:__cplusplus',
|
|
288
|
-
|
|
289
|
+
# The following option enables c++20 on Windows. This is needed for V8 v12.4+
|
|
290
|
+
'-std:c++20',
|
|
291
|
+
# The following option reduces the "error C1060: compiler is out of heap space"
|
|
292
|
+
'/Zm2000',
|
|
289
293
|
],
|
|
290
294
|
'BufferSecurityCheck': 'true',
|
|
291
295
|
'DebugInformationFormat': 1, # /Z7 embed info in .obj files
|
|
@@ -374,6 +378,29 @@
|
|
|
374
378
|
}],
|
|
375
379
|
],
|
|
376
380
|
}],
|
|
381
|
+
['ubsan == 1 and OS != "mac" and OS != "zos"', {
|
|
382
|
+
'cflags+': [
|
|
383
|
+
'-fno-omit-frame-pointer',
|
|
384
|
+
'-fsanitize=undefined',
|
|
385
|
+
],
|
|
386
|
+
'defines': [ 'UNDEFINED_SANITIZER'],
|
|
387
|
+
'cflags!': [ '-fno-omit-frame-pointer' ],
|
|
388
|
+
'ldflags': [ '-fsanitize=undefined' ],
|
|
389
|
+
}],
|
|
390
|
+
['ubsan == 1 and OS == "mac"', {
|
|
391
|
+
'xcode_settings': {
|
|
392
|
+
'OTHER_CFLAGS+': [
|
|
393
|
+
'-fno-omit-frame-pointer',
|
|
394
|
+
'-fsanitize=undefined',
|
|
395
|
+
'-DUNDEFINED_SANITIZER'
|
|
396
|
+
],
|
|
397
|
+
},
|
|
398
|
+
'target_conditions': [
|
|
399
|
+
['_type!="static_library"', {
|
|
400
|
+
'xcode_settings': {'OTHER_LDFLAGS': ['-fsanitize=undefined']},
|
|
401
|
+
}],
|
|
402
|
+
],
|
|
403
|
+
}],
|
|
377
404
|
# The defines bellow must include all things from the external_v8_defines
|
|
378
405
|
# list in v8/BUILD.gn.
|
|
379
406
|
['v8_enable_v8_checks == 1', {
|
package/include/node/config.gypi
CHANGED
|
@@ -128,6 +128,7 @@
|
|
|
128
128
|
'lib/internal/error_serdes.js',
|
|
129
129
|
'lib/internal/errors.js',
|
|
130
130
|
'lib/internal/event_target.js',
|
|
131
|
+
'lib/internal/events/abort_listener.js',
|
|
131
132
|
'lib/internal/events/symbols.js',
|
|
132
133
|
'lib/internal/file.js',
|
|
133
134
|
'lib/internal/fixed_queue.js',
|
|
@@ -165,6 +166,7 @@
|
|
|
165
166
|
'lib/internal/main/print_help.js',
|
|
166
167
|
'lib/internal/main/prof_process.js',
|
|
167
168
|
'lib/internal/main/repl.js',
|
|
169
|
+
'lib/internal/main/run.js',
|
|
168
170
|
'lib/internal/main/run_main_module.js',
|
|
169
171
|
'lib/internal/main/test_runner.js',
|
|
170
172
|
'lib/internal/main/watch_mode.js',
|
|
@@ -176,7 +178,6 @@
|
|
|
176
178
|
'lib/internal/modules/esm/fetch_module.js',
|
|
177
179
|
'lib/internal/modules/esm/formats.js',
|
|
178
180
|
'lib/internal/modules/esm/get_format.js',
|
|
179
|
-
'lib/internal/modules/esm/handle_process_exit.js',
|
|
180
181
|
'lib/internal/modules/esm/hooks.js',
|
|
181
182
|
'lib/internal/modules/esm/initialize_import_meta.js',
|
|
182
183
|
'lib/internal/modules/esm/load.js',
|
|
@@ -210,7 +211,6 @@
|
|
|
210
211
|
'lib/internal/policy/manifest.js',
|
|
211
212
|
'lib/internal/policy/sri.js',
|
|
212
213
|
'lib/internal/priority_queue.js',
|
|
213
|
-
'lib/internal/process/esm_loader.js',
|
|
214
214
|
'lib/internal/process/execution.js',
|
|
215
215
|
'lib/internal/process/per_thread.js',
|
|
216
216
|
'lib/internal/process/permission.js',
|
|
@@ -233,6 +233,7 @@
|
|
|
233
233
|
'lib/internal/repl/await.js',
|
|
234
234
|
'lib/internal/repl/history.js',
|
|
235
235
|
'lib/internal/repl/utils.js',
|
|
236
|
+
'lib/internal/shell.js',
|
|
236
237
|
'lib/internal/socket_list.js',
|
|
237
238
|
'lib/internal/socketaddress.js',
|
|
238
239
|
'lib/internal/source_map/prepare_stack_trace.js',
|
|
@@ -346,7 +347,7 @@
|
|
|
346
347
|
'lib/wasi.js',
|
|
347
348
|
'lib/worker_threads.js',
|
|
348
349
|
'lib/zlib.js'],
|
|
349
|
-
'node_module_version':
|
|
350
|
+
'node_module_version': 127,
|
|
350
351
|
'node_no_browser_globals': 'false',
|
|
351
352
|
'node_prefix': '/',
|
|
352
353
|
'node_release_urlbase': 'https://nodejs.org/download/release/',
|
|
@@ -374,9 +375,10 @@
|
|
|
374
375
|
'openssl_is_fips': 'false',
|
|
375
376
|
'openssl_quic': 'true',
|
|
376
377
|
'ossfuzz': 'false',
|
|
377
|
-
'shlib_suffix': 'so.
|
|
378
|
+
'shlib_suffix': 'so.127',
|
|
378
379
|
'single_executable_application': 'true',
|
|
379
380
|
'target_arch': 'arm64',
|
|
381
|
+
'ubsan': 0,
|
|
380
382
|
'use_prefix_to_find_headers': 'false',
|
|
381
383
|
'v8_enable_31bit_smis_on_64bit_arch': 0,
|
|
382
384
|
'v8_enable_extensible_ro_snapshot': 0,
|
|
@@ -386,7 +388,7 @@
|
|
|
386
388
|
'v8_enable_inspector': 1,
|
|
387
389
|
'v8_enable_javascript_promise_hooks': 1,
|
|
388
390
|
'v8_enable_lite_mode': 0,
|
|
389
|
-
'v8_enable_maglev':
|
|
391
|
+
'v8_enable_maglev': 1,
|
|
390
392
|
'v8_enable_object_print': 1,
|
|
391
393
|
'v8_enable_pointer_compression': 0,
|
|
392
394
|
'v8_enable_shared_ro_heap': 1,
|
|
@@ -32,7 +32,7 @@ static constexpr uint16_t kFullyConstructedBitMask = uint16_t{1};
|
|
|
32
32
|
|
|
33
33
|
static constexpr size_t kPageSize = size_t{1} << 17;
|
|
34
34
|
|
|
35
|
-
#if defined(
|
|
35
|
+
#if defined(V8_HOST_ARCH_ARM64) && defined(V8_OS_DARWIN)
|
|
36
36
|
constexpr size_t kGuardPageSize = 0;
|
|
37
37
|
#else
|
|
38
38
|
constexpr size_t kGuardPageSize = 4096;
|
|
@@ -128,13 +128,13 @@ struct IsSubclassOfBasicMemberTemplate {
|
|
|
128
128
|
private:
|
|
129
129
|
template <typename T, typename CheckingPolicy, typename StorageType>
|
|
130
130
|
static std::true_type SubclassCheck(
|
|
131
|
-
BasicMember<T, WeaknessTag, WriteBarrierPolicy, CheckingPolicy,
|
|
132
|
-
|
|
131
|
+
const BasicMember<T, WeaknessTag, WriteBarrierPolicy, CheckingPolicy,
|
|
132
|
+
StorageType>*);
|
|
133
133
|
static std::false_type SubclassCheck(...);
|
|
134
134
|
|
|
135
135
|
public:
|
|
136
|
-
static constexpr bool value =
|
|
137
|
-
|
|
136
|
+
static constexpr bool value = decltype(SubclassCheck(
|
|
137
|
+
std::declval<std::decay_t<BasicMemberCandidate>*>()))::value;
|
|
138
138
|
};
|
|
139
139
|
|
|
140
140
|
template <typename T,
|
|
@@ -180,6 +180,14 @@ constexpr bool IsStrictlyBaseOfV =
|
|
|
180
180
|
std::is_base_of_v<std::decay_t<B>, std::decay_t<D>> &&
|
|
181
181
|
!IsDecayedSameV<B, D>;
|
|
182
182
|
|
|
183
|
+
template <typename T>
|
|
184
|
+
constexpr bool IsAnyMemberTypeV = false;
|
|
185
|
+
|
|
186
|
+
template <typename T, typename WeaknessTag, typename WriteBarrierPolicy,
|
|
187
|
+
typename CheckingPolicy, typename StorageType>
|
|
188
|
+
constexpr bool IsAnyMemberTypeV<internal::BasicMember<
|
|
189
|
+
T, WeaknessTag, WriteBarrierPolicy, CheckingPolicy, StorageType>> = true;
|
|
190
|
+
|
|
183
191
|
} // namespace internal
|
|
184
192
|
|
|
185
193
|
/**
|
|
@@ -245,6 +253,19 @@ constexpr bool IsWeakV = internal::IsWeak<T>::value;
|
|
|
245
253
|
template <typename T>
|
|
246
254
|
constexpr bool IsCompleteV = internal::IsComplete<T>::value;
|
|
247
255
|
|
|
256
|
+
/**
|
|
257
|
+
* Value is true for member types `Member<T>` and `WeakMember<T>`.
|
|
258
|
+
*/
|
|
259
|
+
template <typename T>
|
|
260
|
+
constexpr bool IsMemberOrWeakMemberTypeV =
|
|
261
|
+
IsMemberTypeV<T> || IsWeakMemberTypeV<T>;
|
|
262
|
+
|
|
263
|
+
/**
|
|
264
|
+
* Value is true for any member type.
|
|
265
|
+
*/
|
|
266
|
+
template <typename T>
|
|
267
|
+
constexpr bool IsAnyMemberTypeV = internal::IsAnyMemberTypeV<std::decay_t<T>>;
|
|
268
|
+
|
|
248
269
|
} // namespace cppgc
|
|
249
270
|
|
|
250
271
|
#endif // INCLUDE_CPPGC_TYPE_TRAITS_H_
|
package/include/node/node.h
CHANGED
|
@@ -731,12 +731,33 @@ struct StartExecutionCallbackInfo {
|
|
|
731
731
|
|
|
732
732
|
using StartExecutionCallback =
|
|
733
733
|
std::function<v8::MaybeLocal<v8::Value>(const StartExecutionCallbackInfo&)>;
|
|
734
|
+
using EmbedderPreloadCallback =
|
|
735
|
+
std::function<void(Environment* env,
|
|
736
|
+
v8::Local<v8::Value> process,
|
|
737
|
+
v8::Local<v8::Value> require)>;
|
|
734
738
|
|
|
739
|
+
// Run initialization for the environment.
|
|
740
|
+
//
|
|
741
|
+
// The |preload| function, usually used by embedders to inject scripts,
|
|
742
|
+
// will be run by Node.js before Node.js executes the entry point.
|
|
743
|
+
// The function is guaranteed to run before the user land module loader running
|
|
744
|
+
// any user code, so it is safe to assume that at this point, no user code has
|
|
745
|
+
// been run yet.
|
|
746
|
+
// The function will be executed with preload(process, require), and the passed
|
|
747
|
+
// require function has access to internal Node.js modules. There is no
|
|
748
|
+
// stability guarantee about the internals exposed to the internal require
|
|
749
|
+
// function. Expect breakages when updating Node.js versions if the embedder
|
|
750
|
+
// imports internal modules with the internal require function.
|
|
751
|
+
// Worker threads created in the environment will also respect The |preload|
|
|
752
|
+
// function, so make sure the function is thread-safe.
|
|
735
753
|
NODE_EXTERN v8::MaybeLocal<v8::Value> LoadEnvironment(
|
|
736
754
|
Environment* env,
|
|
737
|
-
StartExecutionCallback cb
|
|
755
|
+
StartExecutionCallback cb,
|
|
756
|
+
EmbedderPreloadCallback preload = nullptr);
|
|
738
757
|
NODE_EXTERN v8::MaybeLocal<v8::Value> LoadEnvironment(
|
|
739
|
-
Environment* env,
|
|
758
|
+
Environment* env,
|
|
759
|
+
std::string_view main_script_source_utf8,
|
|
760
|
+
EmbedderPreloadCallback preload = nullptr);
|
|
740
761
|
NODE_EXTERN void FreeEnvironment(Environment* env);
|
|
741
762
|
|
|
742
763
|
// Set a callback that is called when process.exit() is called from JS,
|
package/include/node/node_api.h
CHANGED
|
@@ -209,7 +209,7 @@ napi_create_threadsafe_function(napi_env env,
|
|
|
209
209
|
size_t max_queue_size,
|
|
210
210
|
size_t initial_thread_count,
|
|
211
211
|
void* thread_finalize_data,
|
|
212
|
-
|
|
212
|
+
napi_finalize thread_finalize_cb,
|
|
213
213
|
void* context,
|
|
214
214
|
napi_threadsafe_function_call_js call_js_cb,
|
|
215
215
|
napi_threadsafe_function* result);
|
|
@@ -22,9 +22,9 @@
|
|
|
22
22
|
#ifndef SRC_NODE_VERSION_H_
|
|
23
23
|
#define SRC_NODE_VERSION_H_
|
|
24
24
|
|
|
25
|
-
#define NODE_MAJOR_VERSION
|
|
26
|
-
#define NODE_MINOR_VERSION
|
|
27
|
-
#define NODE_PATCH_VERSION
|
|
25
|
+
#define NODE_MAJOR_VERSION 22
|
|
26
|
+
#define NODE_MINOR_VERSION 0
|
|
27
|
+
#define NODE_PATCH_VERSION 0
|
|
28
28
|
|
|
29
29
|
#define NODE_VERSION_IS_LTS 0
|
|
30
30
|
#define NODE_VERSION_LTS_CODENAME ""
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
#if defined(NODE_EMBEDDER_MODULE_VERSION)
|
|
96
96
|
#define NODE_MODULE_VERSION NODE_EMBEDDER_MODULE_VERSION
|
|
97
97
|
#else
|
|
98
|
-
#define NODE_MODULE_VERSION
|
|
98
|
+
#define NODE_MODULE_VERSION 127
|
|
99
99
|
#endif
|
|
100
100
|
|
|
101
101
|
// The NAPI_VERSION supported by the runtime. This is the inclusive range of
|
|
@@ -318,6 +318,12 @@ class V8_EXPORT ArrayBuffer : public Object {
|
|
|
318
318
|
*/
|
|
319
319
|
std::shared_ptr<BackingStore> GetBackingStore();
|
|
320
320
|
|
|
321
|
+
/**
|
|
322
|
+
* More efficient shortcut for
|
|
323
|
+
* GetBackingStore()->IsResizableByUserJavaScript().
|
|
324
|
+
*/
|
|
325
|
+
bool IsResizableByUserJavaScript() const;
|
|
326
|
+
|
|
321
327
|
/**
|
|
322
328
|
* More efficient shortcut for GetBackingStore()->Data(). The returned pointer
|
|
323
329
|
* is valid as long as the ArrayBuffer is alive.
|
|
@@ -327,10 +327,6 @@ using WasmAsyncResolvePromiseCallback = void (*)(
|
|
|
327
327
|
using WasmLoadSourceMapCallback = Local<String> (*)(Isolate* isolate,
|
|
328
328
|
const char* name);
|
|
329
329
|
|
|
330
|
-
// --- Callback for checking if WebAssembly GC is enabled ---
|
|
331
|
-
// If the callback returns true, it will also enable Wasm stringrefs.
|
|
332
|
-
using WasmGCEnabledCallback = bool (*)(Local<Context> context);
|
|
333
|
-
|
|
334
330
|
// --- Callback for checking if WebAssembly imported strings are enabled ---
|
|
335
331
|
using WasmImportedStringsEnabledCallback = bool (*)(Local<Context> context);
|
|
336
332
|
|
|
@@ -342,6 +338,9 @@ using SharedArrayBufferConstructorEnabledCallback =
|
|
|
342
338
|
using JavaScriptCompileHintsMagicEnabledCallback =
|
|
343
339
|
bool (*)(Local<Context> context);
|
|
344
340
|
|
|
341
|
+
// --- Callback for checking if WebAssembly JSPI is enabled ---
|
|
342
|
+
using WasmJSPIEnabledCallback = bool (*)(Local<Context> context);
|
|
343
|
+
|
|
345
344
|
/**
|
|
346
345
|
* HostImportModuleDynamicallyCallback is called when we
|
|
347
346
|
* require the embedder to load a module. This is used as part of the dynamic
|
|
@@ -352,11 +351,11 @@ using JavaScriptCompileHintsMagicEnabledCallback =
|
|
|
352
351
|
*
|
|
353
352
|
* The specifier is the name of the module that should be imported.
|
|
354
353
|
*
|
|
355
|
-
* The
|
|
354
|
+
* The import_attributes are import attributes for this request in the form:
|
|
356
355
|
* [key1, value1, key2, value2, ...] where the keys and values are of type
|
|
357
356
|
* v8::String. Note, unlike the FixedArray passed to ResolveModuleCallback and
|
|
358
357
|
* returned from ModuleRequest::GetImportAssertions(), this array does not
|
|
359
|
-
* contain the source Locations of the
|
|
358
|
+
* contain the source Locations of the attributes.
|
|
360
359
|
*
|
|
361
360
|
* The embedder must compile, instantiate, evaluate the Module, and
|
|
362
361
|
* obtain its namespace object.
|
|
@@ -368,15 +367,10 @@ using JavaScriptCompileHintsMagicEnabledCallback =
|
|
|
368
367
|
* fails (e.g. due to stack overflow), the embedder must propagate
|
|
369
368
|
* that exception by returning an empty MaybeLocal.
|
|
370
369
|
*/
|
|
371
|
-
using HostImportModuleDynamicallyWithImportAssertionsCallback =
|
|
372
|
-
MaybeLocal<Promise> (*)(Local<Context> context,
|
|
373
|
-
Local<ScriptOrModule> referrer,
|
|
374
|
-
Local<String> specifier,
|
|
375
|
-
Local<FixedArray> import_assertions);
|
|
376
370
|
using HostImportModuleDynamicallyCallback = MaybeLocal<Promise> (*)(
|
|
377
371
|
Local<Context> context, Local<Data> host_defined_options,
|
|
378
372
|
Local<Value> resource_name, Local<String> specifier,
|
|
379
|
-
Local<FixedArray>
|
|
373
|
+
Local<FixedArray> import_attributes);
|
|
380
374
|
|
|
381
375
|
/**
|
|
382
376
|
* Callback for requesting a compile hint for a function from the embedder. The
|
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
#include <stddef.h>
|
|
9
9
|
#include <stdint.h>
|
|
10
10
|
|
|
11
|
+
#include <functional>
|
|
12
|
+
|
|
11
13
|
#include "v8-local-handle.h" // NOLINT(build/include_directory)
|
|
12
14
|
#include "v8-object.h" // NOLINT(build/include_directory)
|
|
13
15
|
#include "v8config.h" // NOLINT(build/include_directory)
|
|
@@ -43,6 +45,58 @@ class V8_EXPORT Array : public Object {
|
|
|
43
45
|
return static_cast<Array*>(value);
|
|
44
46
|
}
|
|
45
47
|
|
|
48
|
+
/**
|
|
49
|
+
* Creates a JavaScript array from a provided callback.
|
|
50
|
+
*
|
|
51
|
+
* \param context The v8::Context to create the array in.
|
|
52
|
+
* \param length The length of the array to be created.
|
|
53
|
+
* \param next_value_callback The callback that is invoked to retrieve
|
|
54
|
+
* elements for the array. The embedder can signal that the array
|
|
55
|
+
* initialization should be aborted by throwing an exception and returning
|
|
56
|
+
* an empty MaybeLocal.
|
|
57
|
+
* \returns The v8::Array if all elements were constructed successfully and an
|
|
58
|
+
* empty MaybeLocal otherwise.
|
|
59
|
+
*/
|
|
60
|
+
static MaybeLocal<Array> New(
|
|
61
|
+
Local<Context> context, size_t length,
|
|
62
|
+
std::function<MaybeLocal<v8::Value>()> next_value_callback);
|
|
63
|
+
|
|
64
|
+
enum class CallbackResult {
|
|
65
|
+
kException,
|
|
66
|
+
kBreak,
|
|
67
|
+
kContinue,
|
|
68
|
+
};
|
|
69
|
+
using IterationCallback = CallbackResult (*)(uint32_t index,
|
|
70
|
+
Local<Value> element,
|
|
71
|
+
void* data);
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Calls {callback} for every element of this array, passing {callback_data}
|
|
75
|
+
* as its {data} parameter.
|
|
76
|
+
* This function will typically be faster than calling {Get()} repeatedly.
|
|
77
|
+
* As a consequence of being optimized for low overhead, the provided
|
|
78
|
+
* callback must adhere to the following restrictions:
|
|
79
|
+
* - It must not allocate any V8 objects and continue iterating; it may
|
|
80
|
+
* allocate (e.g. an error message/object) and then immediately terminate
|
|
81
|
+
* the iteration.
|
|
82
|
+
* - It must not modify the array being iterated.
|
|
83
|
+
* - It must not call back into V8 (unless it can guarantee that such a
|
|
84
|
+
* call does not violate the above restrictions, which is difficult).
|
|
85
|
+
* - The {Local<Value> element} must not "escape", i.e. must not be assigned
|
|
86
|
+
* to any other {Local}. Creating a {Global} from it, or updating a
|
|
87
|
+
* v8::TypecheckWitness with it, is safe.
|
|
88
|
+
* These restrictions may be lifted in the future if use cases arise that
|
|
89
|
+
* justify a slower but more robust implementation.
|
|
90
|
+
*
|
|
91
|
+
* Returns {Nothing} on exception; use a {TryCatch} to catch and handle this
|
|
92
|
+
* exception.
|
|
93
|
+
* When the {callback} returns {kException}, iteration is terminated
|
|
94
|
+
* immediately, returning {Nothing}. By returning {kBreak}, the callback
|
|
95
|
+
* can request non-exceptional early termination of the iteration.
|
|
96
|
+
*/
|
|
97
|
+
Maybe<void> Iterate(Local<Context> context, IterationCallback callback,
|
|
98
|
+
void* callback_data);
|
|
99
|
+
|
|
46
100
|
private:
|
|
47
101
|
Array();
|
|
48
102
|
static void CheckCast(Value* obj);
|