node-linux-s390x 21.7.3 → 22.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.
Files changed (43) hide show
  1. package/CHANGELOG.md +470 -1502
  2. package/LICENSE +3 -33
  3. package/README.md +61 -55
  4. package/bin/node +0 -0
  5. package/include/node/common.gypi +29 -2
  6. package/include/node/config.gypi +9 -7
  7. package/include/node/cppgc/internal/api-constants.h +1 -1
  8. package/include/node/cppgc/type-traits.h +25 -4
  9. package/include/node/node.h +24 -2
  10. package/include/node/node_api.h +1 -1
  11. package/include/node/node_buffer.h +1 -1
  12. package/include/node/node_version.h +4 -4
  13. package/include/node/v8-array-buffer.h +6 -0
  14. package/include/node/v8-callbacks.h +6 -12
  15. package/include/node/v8-container.h +54 -0
  16. package/include/node/v8-context.h +51 -22
  17. package/include/node/v8-embedder-heap.h +19 -3
  18. package/include/node/v8-embedder-state-scope.h +2 -1
  19. package/include/node/v8-exception.h +15 -9
  20. package/include/node/v8-forward.h +1 -0
  21. package/include/node/v8-function-callback.h +129 -20
  22. package/include/node/v8-handle-base.h +32 -80
  23. package/include/node/v8-internal.h +472 -65
  24. package/include/node/v8-isolate.h +86 -51
  25. package/include/node/v8-local-handle.h +257 -31
  26. package/include/node/v8-memory-span.h +157 -2
  27. package/include/node/v8-message.h +22 -3
  28. package/include/node/v8-object.h +29 -10
  29. package/include/node/v8-persistent-handle.h +5 -3
  30. package/include/node/v8-platform.h +81 -44
  31. package/include/node/v8-script.h +61 -11
  32. package/include/node/v8-snapshot.h +94 -23
  33. package/include/node/v8-statistics.h +10 -24
  34. package/include/node/v8-template.h +410 -131
  35. package/include/node/v8-traced-handle.h +81 -46
  36. package/include/node/v8-typed-array.h +115 -7
  37. package/include/node/v8-value.h +92 -4
  38. package/include/node/v8-version.h +4 -4
  39. package/include/node/v8config.h +35 -10
  40. package/package.json +1 -1
  41. package/share/doc/node/gdbinit +77 -38
  42. package/share/doc/node/lldb_commands.py +59 -29
  43. package/share/man/man1/node.1 +12 -7
@@ -13,6 +13,7 @@ path. Add it with -I<path> to the command line
13
13
  #include "v8-gn.h" // NOLINT(build/include_directory)
14
14
  #endif
15
15
 
16
+ #include <memory>
16
17
  // clang-format off
17
18
 
18
19
  // Platform headers for feature detection below.
@@ -297,12 +298,16 @@ path. Add it with -I<path> to the command line
297
298
  // V8_HAS_ATTRIBUTE_NONNULL - __attribute__((nonnull)) supported
298
299
  // V8_HAS_ATTRIBUTE_NOINLINE - __attribute__((noinline)) supported
299
300
  // V8_HAS_ATTRIBUTE_UNUSED - __attribute__((unused)) supported
301
+ // V8_HAS_ATTRIBUTE_USED - __attribute__((used)) supported
302
+ // V8_HAS_ATTRIBUTE_RETAIN - __attribute__((retain)) supported
300
303
  // V8_HAS_ATTRIBUTE_VISIBILITY - __attribute__((visibility)) supported
301
304
  // V8_HAS_ATTRIBUTE_WARN_UNUSED_RESULT - __attribute__((warn_unused_result))
302
305
  // supported
303
306
  // V8_HAS_CPP_ATTRIBUTE_NODISCARD - [[nodiscard]] supported
304
307
  // V8_HAS_CPP_ATTRIBUTE_NO_UNIQUE_ADDRESS
305
308
  // - [[no_unique_address]] supported
309
+ // V8_HAS_BUILTIN_ADD_OVERFLOW - __builtin_add_overflow() supported
310
+ // V8_HAS_BUILTIN_BIT_CAST - __builtin_bit_cast() supported
306
311
  // V8_HAS_BUILTIN_BSWAP16 - __builtin_bswap16() supported
307
312
  // V8_HAS_BUILTIN_BSWAP32 - __builtin_bswap32() supported
308
313
  // V8_HAS_BUILTIN_BSWAP64 - __builtin_bswap64() supported
@@ -310,14 +315,13 @@ path. Add it with -I<path> to the command line
310
315
  // V8_HAS_BUILTIN_CTZ - __builtin_ctz() supported
311
316
  // V8_HAS_BUILTIN_EXPECT - __builtin_expect() supported
312
317
  // V8_HAS_BUILTIN_FRAME_ADDRESS - __builtin_frame_address() supported
313
- // V8_HAS_BUILTIN_POPCOUNT - __builtin_popcount() supported
314
- // V8_HAS_BUILTIN_ADD_OVERFLOW - __builtin_add_overflow() supported
315
- // V8_HAS_BUILTIN_SUB_OVERFLOW - __builtin_sub_overflow() supported
316
318
  // V8_HAS_BUILTIN_MUL_OVERFLOW - __builtin_mul_overflow() supported
319
+ // V8_HAS_BUILTIN_POPCOUNT - __builtin_popcount() supported
317
320
  // V8_HAS_BUILTIN_SADD_OVERFLOW - __builtin_sadd_overflow() supported
321
+ // V8_HAS_BUILTIN_SMUL_OVERFLOW - __builtin_smul_overflow() supported
318
322
  // V8_HAS_BUILTIN_SSUB_OVERFLOW - __builtin_ssub_overflow() supported
323
+ // V8_HAS_BUILTIN_SUB_OVERFLOW - __builtin_sub_overflow() supported
319
324
  // V8_HAS_BUILTIN_UADD_OVERFLOW - __builtin_uadd_overflow() supported
320
- // V8_HAS_BUILTIN_SMUL_OVERFLOW - __builtin_smul_overflow() supported
321
325
  // V8_HAS_COMPUTED_GOTO - computed goto/labels as values
322
326
  // supported
323
327
  // V8_HAS_DECLSPEC_NOINLINE - __declspec(noinline) supported
@@ -349,6 +353,8 @@ path. Add it with -I<path> to the command line
349
353
  # define V8_HAS_ATTRIBUTE_NONNULL (__has_attribute(nonnull))
350
354
  # define V8_HAS_ATTRIBUTE_NOINLINE (__has_attribute(noinline))
351
355
  # define V8_HAS_ATTRIBUTE_UNUSED (__has_attribute(unused))
356
+ # define V8_HAS_ATTRIBUTE_USED (__has_attribute(used))
357
+ # define V8_HAS_ATTRIBUTE_RETAIN (__has_attribute(retain))
352
358
  // Support for the "preserve_most" attribute is limited:
353
359
  // - 32-bit platforms do not implement it,
354
360
  // - component builds fail because _dl_runtime_resolve clobbers registers,
@@ -373,8 +379,10 @@ path. Add it with -I<path> to the command line
373
379
  # define V8_HAS_CPP_ATTRIBUTE_NO_UNIQUE_ADDRESS \
374
380
  (V8_HAS_CPP_ATTRIBUTE(no_unique_address))
375
381
 
382
+ # define V8_HAS_BUILTIN_ADD_OVERFLOW (__has_builtin(__builtin_add_overflow))
376
383
  # define V8_HAS_BUILTIN_ASSUME (__has_builtin(__builtin_assume))
377
384
  # define V8_HAS_BUILTIN_ASSUME_ALIGNED (__has_builtin(__builtin_assume_aligned))
385
+ # define V8_HAS_BUILTIN_BIT_CAST (__has_builtin(__builtin_bit_cast))
378
386
  # define V8_HAS_BUILTIN_BSWAP16 (__has_builtin(__builtin_bswap16))
379
387
  # define V8_HAS_BUILTIN_BSWAP32 (__has_builtin(__builtin_bswap32))
380
388
  # define V8_HAS_BUILTIN_BSWAP64 (__has_builtin(__builtin_bswap64))
@@ -382,14 +390,13 @@ path. Add it with -I<path> to the command line
382
390
  # define V8_HAS_BUILTIN_CTZ (__has_builtin(__builtin_ctz))
383
391
  # define V8_HAS_BUILTIN_EXPECT (__has_builtin(__builtin_expect))
384
392
  # define V8_HAS_BUILTIN_FRAME_ADDRESS (__has_builtin(__builtin_frame_address))
385
- # define V8_HAS_BUILTIN_POPCOUNT (__has_builtin(__builtin_popcount))
386
- # define V8_HAS_BUILTIN_ADD_OVERFLOW (__has_builtin(__builtin_add_overflow))
387
- # define V8_HAS_BUILTIN_SUB_OVERFLOW (__has_builtin(__builtin_sub_overflow))
388
393
  # define V8_HAS_BUILTIN_MUL_OVERFLOW (__has_builtin(__builtin_mul_overflow))
394
+ # define V8_HAS_BUILTIN_POPCOUNT (__has_builtin(__builtin_popcount))
389
395
  # define V8_HAS_BUILTIN_SADD_OVERFLOW (__has_builtin(__builtin_sadd_overflow))
396
+ # define V8_HAS_BUILTIN_SMUL_OVERFLOW (__has_builtin(__builtin_smul_overflow))
390
397
  # define V8_HAS_BUILTIN_SSUB_OVERFLOW (__has_builtin(__builtin_ssub_overflow))
398
+ # define V8_HAS_BUILTIN_SUB_OVERFLOW (__has_builtin(__builtin_sub_overflow))
391
399
  # define V8_HAS_BUILTIN_UADD_OVERFLOW (__has_builtin(__builtin_uadd_overflow))
392
- # define V8_HAS_BUILTIN_SMUL_OVERFLOW (__has_builtin(__builtin_smul_overflow))
393
400
  # define V8_HAS_BUILTIN_UNREACHABLE (__has_builtin(__builtin_unreachable))
394
401
 
395
402
  // Clang has no __has_feature for computed gotos.
@@ -410,6 +417,11 @@ path. Add it with -I<path> to the command line
410
417
  # endif
411
418
  # define V8_CC_MINGW (V8_CC_MINGW32 || V8_CC_MINGW64)
412
419
 
420
+ // FYI: __has_builtin is only available with GCC 10 and later, so explicitly
421
+ // check GCC version numbers to enable features. TODO(leszeks): Merge feature
422
+ // enabling for GCC 10 and later into the Clang section above, and leave this
423
+ // section for GCC 9 and earlier.
424
+
413
425
  // always_inline is available in gcc 4.0 but not very reliable until 4.4.
414
426
  // Works around "sorry, unimplemented: inlining failed" build errors with
415
427
  // older compilers.
@@ -425,6 +437,9 @@ path. Add it with -I<path> to the command line
425
437
  // for V8_HAS_CPP_ATTRIBUTE_NODISCARD. See https://crbug.com/v8/11707.
426
438
 
427
439
  # define V8_HAS_BUILTIN_ASSUME_ALIGNED 1
440
+ # if __GNUC__ >= 11
441
+ # define V8_HAS_BUILTIN_BIT_CAST 1
442
+ # endif
428
443
  # define V8_HAS_BUILTIN_CLZ 1
429
444
  # define V8_HAS_BUILTIN_CTZ 1
430
445
  # define V8_HAS_BUILTIN_EXPECT 1
@@ -476,14 +491,17 @@ path. Add it with -I<path> to the command line
476
491
  # define V8_ASSUME USE
477
492
  #endif
478
493
 
479
- #if V8_HAS_BUILTIN_ASSUME_ALIGNED
494
+ // Prefer c++20 std::assume_aligned
495
+ #if __cplusplus >= 202002L && defined(__cpp_lib_assume_aligned)
496
+ # define V8_ASSUME_ALIGNED(ptr, alignment) \
497
+ std::assume_aligned<(alignment)>(ptr)
498
+ #elif V8_HAS_BUILTIN_ASSUME_ALIGNED
480
499
  # define V8_ASSUME_ALIGNED(ptr, alignment) \
481
500
  __builtin_assume_aligned((ptr), (alignment))
482
501
  #else
483
502
  # define V8_ASSUME_ALIGNED(ptr, alignment) (ptr)
484
503
  #endif
485
504
 
486
-
487
505
  // A macro to mark functions whose values don't change (e.g. across calls)
488
506
  // and thereby compiler is free to hoist and fold multiple calls together.
489
507
  // Use like:
@@ -678,10 +696,12 @@ path. Add it with -I<path> to the command line
678
696
  #if defined(__clang__) && defined(__has_attribute)
679
697
  #if __has_attribute(trivial_abi)
680
698
  #define V8_TRIVIAL_ABI [[clang::trivial_abi]]
699
+ #define V8_HAS_ATTRIBUTE_TRIVIAL_ABI 1
681
700
  #endif // __has_attribute(trivial_abi)
682
701
  #endif // defined(__clang__) && defined(__has_attribute)
683
702
  #if !defined(V8_TRIVIAL_ABI)
684
703
  #define V8_TRIVIAL_ABI
704
+ #define V8_HAS_ATTRIBUTE_TRIVIAL_ABI 0
685
705
  #endif //!defined(V8_TRIVIAL_ABI)
686
706
 
687
707
  // Helper macro to define no_sanitize attributes only with clang.
@@ -694,6 +714,11 @@ path. Add it with -I<path> to the command line
694
714
  #define V8_CLANG_NO_SANITIZE(what)
695
715
  #endif
696
716
 
717
+ // Exposing private symbols requires exposing public symbols too.
718
+ #ifdef BUILDING_V8_SHARED_PRIVATE
719
+ #define BUILDING_V8_SHARED
720
+ #endif
721
+
697
722
  #if defined(BUILDING_V8_SHARED) && defined(USING_V8_SHARED)
698
723
  #error Inconsistent build configuration: To build the V8 shared library \
699
724
  set BUILDING_V8_SHARED, to include its headers for linking against the \
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-linux-s390x",
3
- "version": "v21.7.3",
3
+ "version": "v22.1.0",
4
4
  "description": "node",
5
5
  "bin": {
6
6
  "node": "bin/node"
@@ -11,60 +11,89 @@ Print a v8 JavaScript object
11
11
  Usage: job tagged_ptr
12
12
  end
13
13
 
14
- # Print content of v8::internal::Handle.
15
- define jh
16
- call (void) _v8_internal_Print_Object(*((v8::internal::Object**)($arg0).location_))
17
- end
18
- document jh
19
- Print content of a v8::internal::Handle
20
- Usage: jh internal_handle
21
- end
22
-
23
- # Print content of v8::Local handle.
14
+ # Print content of V8 handles.
24
15
  python
25
16
  import gdb
26
17
 
27
- class PrintV8LocalCommand(gdb.Command):
28
- """Print content of v8::Local handle."""
18
+ class PrintV8HandleCommand(gdb.Command):
19
+ """Print content of a V8 object, accessed through a handle."""
29
20
 
30
- PRINT_CMD = "call (void) _v8_internal_Print_Object(*(v8::internal::Address**)({0}))"
21
+ def __init__(self, command_name):
22
+ self.command_name = command_name
23
+ super(PrintV8HandleCommand, self).__init__(command_name, gdb.COMMAND_DATA)
31
24
 
32
- def __init__ (self):
33
- super(PrintV8LocalCommand, self).__init__ ("print-v8-local", gdb.COMMAND_DATA)
25
+ @staticmethod
26
+ def print_direct(value, from_tty):
27
+ CMD = "call (void) _v8_internal_Print_Object((v8::internal::Address*)({}))"
28
+ gdb.execute(CMD.format(value.format_string()), from_tty)
29
+ return True
34
30
 
35
31
  @staticmethod
36
- def get_address_from_local(value):
32
+ def print_indirect(value, from_tty):
33
+ CMD = "call (void) _v8_internal_Print_Object(*(v8::internal::Address**)({}))"
34
+ gdb.execute(CMD.format(value.format_string()), from_tty)
35
+ return True
36
+
37
+ def invoke(self, arg, from_tty):
38
+ argv = gdb.string_to_argv(arg)
39
+ if len(argv) != 1:
40
+ raise gdb.GdbError("{} takes exactly one argument.".format(
41
+ self.command_name))
42
+ value = gdb.parse_and_eval(argv[0])
43
+ if not self.print_handle(value, from_tty):
44
+ raise gdb.GdbError("{} cannot print a value of type {}".format(
45
+ self.command_name, value.type))
46
+
47
+
48
+ class PrintV8LocalCommand(PrintV8HandleCommand):
49
+ """Print content of v8::(Maybe)?Local."""
50
+
51
+ def __init__(self):
52
+ super(PrintV8LocalCommand, self).__init__("print-v8-local")
53
+
54
+ def print_handle(self, value, from_tty):
37
55
  if gdb.types.get_basic_type(value.type).code != gdb.TYPE_CODE_STRUCT:
38
- return None
56
+ return False
39
57
  # After https://crrev.com/c/4335544, v8::MaybeLocal contains a local_.
40
58
  if gdb.types.has_field(value.type, "local_"):
41
59
  value = value["local_"]
42
60
  # After https://crrev.com/c/4335544, v8::Local contains a location_.
43
61
  if gdb.types.has_field(value.type, "location_"):
44
- return value["location_"].format_string()
62
+ return self.print_indirect(value["location_"], from_tty)
45
63
  # Before https://crrev.com/c/4335544, v8::Local contained a val_.
46
64
  if gdb.types.has_field(value.type, "val_"):
47
- return value["val_"].format_string()
65
+ return self.print_indirect(value["val_"], from_tty)
66
+ # With v8_enable_direct_local=true, v8::Local contains a ptr_.
67
+ if gdb.types.has_field(value.type, "ptr_"):
68
+ return self.print_direct(value["ptr_"], from_tty)
48
69
  # We don't know how to print this...
49
- return None
70
+ return False
50
71
 
51
- def invoke (self, arg, from_tty):
52
- argv = gdb.string_to_argv(arg)
53
- if len(argv) != 1:
54
- raise gdb.GdbError("print-local takes exactly one argument.")
55
- value = gdb.parse_and_eval(argv[0])
56
- indirect_pointer = self.get_address_from_local(value)
57
- if indirect_pointer is not None:
58
- gdb.execute(self.PRINT_CMD.format(indirect_pointer), from_tty)
59
- else:
60
- raise gdb.GdbError("print-local cannot print a value of type {}".format(
61
- value.type))
72
+ class PrintV8InternalHandleCommand(PrintV8HandleCommand):
73
+ """Print content of v8::internal::(Maybe)?(Direct|Indirect)?Handle."""
74
+
75
+ def __init__(self):
76
+ super(PrintV8InternalHandleCommand, self).__init__("print-v8-internal-handle")
77
+
78
+ def print_handle(self, value, from_tty):
79
+ if gdb.types.get_basic_type(value.type).code != gdb.TYPE_CODE_STRUCT:
80
+ return False
81
+ # Indirect handles contain a location_.
82
+ if gdb.types.has_field(value.type, "location_"):
83
+ return self.print_indirect(value["location_"], from_tty)
84
+ # Direct handles contain a obj_.
85
+ if gdb.types.has_field(value.type, "obj_"):
86
+ return self.print_direct(value["obj_"], from_tty)
87
+ # We don't know how to print this...
88
+ return False
62
89
 
63
90
  PrintV8LocalCommand()
91
+ PrintV8InternalHandleCommand()
64
92
  end
65
93
 
66
94
  alias jlh = print-v8-local
67
95
  alias jl = print-v8-local
96
+ alias jh = print-v8-internal-handle
68
97
 
69
98
  # Print Code objects containing given PC.
70
99
  define jco
@@ -91,9 +120,9 @@ define jca
91
120
  end
92
121
  end
93
122
  end
94
- document jco
95
- Print a v8 Code object from an internal code address
96
- Usage: jco pc
123
+ document jca
124
+ Print a v8 Code object assembly code from an internal code address
125
+ Usage: jca pc
97
126
  end
98
127
 
99
128
  # Print TransitionTree.
@@ -366,10 +395,20 @@ def cppgc_pretty_printers(val):
366
395
  typename = val.type.name or val.type.tag or str(val.type)
367
396
  regex = re.compile("^(cppgc|blink)::(Weak|Untraced)?Member<(.*)>$")
368
397
  match = regex.match(typename)
369
- if match is None:
370
- return None
371
- return CppGCMemberPrinter(
372
- val, category=match.group(2), pointee_type=match.group(3))
398
+ if match is not None:
399
+ return CppGCMemberPrinter(
400
+ val, category=match.group(2), pointee_type=match.group(3))
401
+
402
+ # The member type might have been obscured by typedefs and template
403
+ # arguments. Fallback to using the underlying type.
404
+ real_type = val.type.strip_typedefs()
405
+ if (real_type.name is not None and
406
+ real_type.name.startswith('cppgc::internal::BasicMember')):
407
+ inner_type = real_type.template_argument(0)
408
+ return CppGCMemberPrinter(
409
+ val, category='Basic', pointee_type=inner_type.name)
410
+
411
+ return None
373
412
 
374
413
 
375
414
  gdb.pretty_printers.append(cppgc_pretty_printers)
@@ -16,6 +16,7 @@ import lldb
16
16
  #####################
17
17
  # Helper functions. #
18
18
  #####################
19
+
19
20
  def current_thread(debugger):
20
21
  return debugger.GetSelectedTarget().GetProcess().GetSelectedThread()
21
22
 
@@ -49,6 +50,25 @@ def ptr_arg_cmd(debugger, name, param, cmd, print_error=True):
49
50
  return no_arg_cmd(debugger, cmd.format(param), print_error)
50
51
 
51
52
 
53
+ def print_handle(debugger, command_name, param, print_func):
54
+ value = current_frame(debugger).EvaluateExpression(param)
55
+ result = print_func(value)
56
+ if not result[0]:
57
+ print("{} cannot print a value of type {}".format(command_name,
58
+ value.type.name))
59
+ return result
60
+
61
+
62
+ def print_direct(debugger, command_name, value):
63
+ CMD = "_v8_internal_Print_Object((v8::internal::Address*)({}))"
64
+ return ptr_arg_cmd(debugger, command_name, value, CMD.format(value))
65
+
66
+
67
+ def print_indirect(debugger, command_name, value):
68
+ CMD = "_v8_internal_Print_Object(*(v8::internal::Object**)({}))"
69
+ return ptr_arg_cmd(debugger, command_name, value, CMD.format(value))
70
+
71
+
52
72
  V8_LLDB_COMMANDS = []
53
73
 
54
74
 
@@ -56,11 +76,11 @@ def lldbCommand(fn):
56
76
  V8_LLDB_COMMANDS.append(fn.__name__)
57
77
  return fn
58
78
 
79
+
59
80
  #####################
60
81
  # lldb commands. #
61
82
  #####################
62
83
 
63
-
64
84
  @lldbCommand
65
85
  def job(debugger, param, *args):
66
86
  """Print a v8 heap object"""
@@ -69,38 +89,48 @@ def job(debugger, param, *args):
69
89
 
70
90
  @lldbCommand
71
91
  def jh(debugger, param, *args):
72
- """Print v8::internal::Handle value"""
73
- V8_PRINT_CMD = "_v8_internal_Print_Object(*(v8::internal::Object**)({}.%s))"
74
- ptr_arg_cmd(debugger, 'jh', param, V8_PRINT_CMD % "location_")
75
-
76
-
77
- def get_address_from_local(value):
78
- # After https://crrev.com/c/4335544, v8::MaybeLocal contains a local_.
79
- field = value.GetValueForExpressionPath(".local_")
80
- if field.IsValid():
81
- value = field
82
- # After https://crrev.com/c/4335544, v8::Local contains a location_.
83
- field = value.GetValueForExpressionPath(".location_")
84
- if field.IsValid():
85
- return field.value
86
- # Before https://crrev.com/c/4335544, v8::Local contained a val_.
87
- field = value.GetValueForExpressionPath(".val_")
88
- if field.IsValid():
89
- return field.value
90
- # We don't know how to print this...
91
- return None
92
+ """Print v8::internal::(Maybe)?(Direct|Indirect)?Handle value"""
93
+
94
+ def print_func(value):
95
+ # Indirect handles contain a location_.
96
+ field = value.GetValueForExpressionPath(".location_")
97
+ if field.IsValid():
98
+ return print_indirect(debugger, 'jh', field.value)
99
+ # Direct handles contain a obj_.
100
+ field = value.GetValueForExpressionPath(".obj_")
101
+ if field.IsValid():
102
+ return print_indirect(debugger, 'jh', field.value)
103
+ # We don't know how to print this...
104
+ return (False, None, "")
105
+
106
+ return print_handle(debugger, 'jh', param, print_func)
92
107
 
93
108
 
94
109
  @lldbCommand
95
110
  def jlh(debugger, param, *args):
96
- """Print v8::Local handle value"""
97
- V8_PRINT_CMD = "_v8_internal_Print_Object(*(v8::internal::Address**)({0}))"
98
- value = current_frame(debugger).EvaluateExpression(param)
99
- indirect_pointer = get_address_from_local(value)
100
- if indirect_pointer is not None:
101
- ptr_arg_cmd(debugger, 'jlh', param, V8_PRINT_CMD.format(indirect_pointer))
102
- else:
103
- print("Failed to print value of type {}".format(value.type.name))
111
+ """Print v8::(Maybe)?Local value"""
112
+
113
+ def print_func(value):
114
+ # After https://crrev.com/c/4335544, v8::MaybeLocal contains a local_.
115
+ field = value.GetValueForExpressionPath(".local_")
116
+ if field.IsValid():
117
+ value = field
118
+ # After https://crrev.com/c/4335544, v8::Local contains a location_.
119
+ field = value.GetValueForExpressionPath(".location_")
120
+ if field.IsValid():
121
+ return print_indirect(debugger, 'jlh', field.value)
122
+ # Before https://crrev.com/c/4335544, v8::Local contained a val_.
123
+ field = value.GetValueForExpressionPath(".val_")
124
+ if field.IsValid():
125
+ return print_indirect(debugger, 'jlh', field.value)
126
+ # With v8_enable_direct_local=true, v8::Local contains a ptr_.
127
+ field = value.GetValueForExpressionPath(".ptr_")
128
+ if field.IsValid():
129
+ return print_direct(debugger, 'jlh', field.value)
130
+ # We don't know how to print this...
131
+ return (False, None, "")
132
+
133
+ return print_handle(debugger, 'jlh', param, print_func)
104
134
 
105
135
 
106
136
  @lldbCommand
@@ -160,9 +160,6 @@ Interpret as either ES modules or CommonJS modules input via --eval or STDIN, wh
160
160
  .js or extensionless files with no sibling or parent package.json;
161
161
  .js or extensionless files whose nearest parent package.json lacks a "type" field, unless under node_modules.
162
162
  .
163
- .It Fl -experimental-global-webcrypto
164
- Expose the Web Crypto API on the global scope.
165
- .
166
163
  .It Fl -experimental-import-meta-resolve
167
164
  Enable experimental ES modules support for import.meta.resolve().
168
165
  .
@@ -186,12 +183,12 @@ Use this flag to enable ShadowRealm support.
186
183
  .It Fl -experimental-test-coverage
187
184
  Enable code coverage in the test runner.
188
185
  .
189
- .It Fl -experimental-websocket
190
- Enable experimental support for the WebSocket API.
191
- .
192
186
  .It Fl -no-experimental-fetch
193
187
  Disable experimental support for the Fetch API.
194
188
  .
189
+ .It Fl -no-experimental-websocket
190
+ Disable experimental support for the WebSocket API.
191
+ .
195
192
  .It Fl -no-experimental-global-customevent
196
193
  Disable exposition of the CustomEvent on the global scope.
197
194
  .
@@ -425,6 +422,10 @@ Starts the Node.js command line test runner.
425
422
  The maximum number of test files that the test runner CLI will execute
426
423
  concurrently.
427
424
  .
425
+ .It Fl -test-force-exit
426
+ Configures the test runner to exit the process once all known tests have
427
+ finished executing even if the event loop would otherwise remain active.
428
+ .
428
429
  .It Fl -test-name-pattern
429
430
  A regular expression that configures the test runner to only execute tests
430
431
  whose name matches the provided pattern.
@@ -441,7 +442,11 @@ option set.
441
442
  .
442
443
  .It Fl -test-shard
443
444
  Test suite shard to execute in a format of <index>/<total>.
444
-
445
+ .
446
+ .It Fl -test-skip-pattern
447
+ A regular expression that configures the test runner to skip tests
448
+ whose name matches the provided pattern.
449
+ .
445
450
  .It Fl -test-timeout
446
451
  A number of milliseconds the test execution will fail after.
447
452
  .