node-linux-arm64 20.8.0 → 21.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 +237 -1609
- package/README.md +3 -3
- package/bin/node +0 -0
- package/include/node/common.gypi +3 -3
- package/include/node/config.gypi +5 -3
- package/include/node/cppgc/internal/api-constants.h +23 -4
- package/include/node/cppgc/internal/caged-heap-local-data.h +16 -6
- package/include/node/cppgc/internal/caged-heap.h +12 -5
- package/include/node/cppgc/internal/gc-info.h +82 -91
- package/include/node/cppgc/internal/member-storage.h +16 -8
- package/include/node/cppgc/member.h +25 -0
- package/include/node/cppgc/persistent.h +4 -0
- package/include/node/cppgc/platform.h +6 -1
- package/include/node/cppgc/sentinel-pointer.h +7 -0
- package/include/node/cppgc/source-location.h +2 -78
- package/include/node/cppgc/trace-trait.h +8 -0
- package/include/node/cppgc/visitor.h +82 -4
- package/include/node/js_native_api.h +11 -1
- package/include/node/libplatform/libplatform.h +7 -1
- package/include/node/node.h +2 -0
- package/include/node/node_api.h +8 -7
- package/include/node/node_version.h +7 -6
- package/include/node/v8-callbacks.h +52 -8
- package/include/node/v8-context.h +10 -13
- package/include/node/v8-embedder-heap.h +12 -0
- package/include/node/v8-function-callback.h +11 -15
- package/include/node/v8-function.h +6 -0
- package/include/node/v8-handle-base.h +185 -0
- package/include/node/v8-internal.h +109 -77
- package/include/node/v8-isolate.h +130 -89
- package/include/node/v8-local-handle.h +134 -89
- package/include/node/v8-object.h +71 -69
- package/include/node/v8-persistent-handle.h +65 -89
- package/include/node/v8-platform.h +140 -9
- package/include/node/v8-primitive.h +12 -8
- package/include/node/v8-profiler.h +16 -2
- package/include/node/v8-script.h +9 -7
- package/include/node/v8-snapshot.h +4 -1
- package/include/node/v8-source-location.h +92 -0
- package/include/node/v8-statistics.h +36 -1
- package/include/node/v8-traced-handle.h +37 -54
- package/include/node/v8-unwinder.h +1 -1
- package/include/node/v8-value-serializer.h +14 -0
- package/include/node/v8-value.h +14 -0
- package/include/node/v8-version.h +3 -3
- package/include/node/v8config.h +19 -10
- package/package.json +1 -1
- package/share/doc/node/gdbinit +60 -6
- package/share/doc/node/lldb_commands.py +73 -10
- package/share/man/man1/node.1 +12 -0
package/share/doc/node/gdbinit
CHANGED
|
@@ -21,14 +21,51 @@ Usage: jh internal_handle
|
|
|
21
21
|
end
|
|
22
22
|
|
|
23
23
|
# Print content of v8::Local handle.
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
Print content of
|
|
29
|
-
|
|
24
|
+
python
|
|
25
|
+
import gdb
|
|
26
|
+
|
|
27
|
+
class PrintV8LocalCommand(gdb.Command):
|
|
28
|
+
"""Print content of v8::Local handle."""
|
|
29
|
+
|
|
30
|
+
PRINT_CMD = "call (void) _v8_internal_Print_Object(*(v8::internal::Address**)({0}))"
|
|
31
|
+
|
|
32
|
+
def __init__ (self):
|
|
33
|
+
super(PrintV8LocalCommand, self).__init__ ("print-v8-local", gdb.COMMAND_DATA)
|
|
34
|
+
|
|
35
|
+
@staticmethod
|
|
36
|
+
def get_address_from_local(value):
|
|
37
|
+
if gdb.types.get_basic_type(value.type).code != gdb.TYPE_CODE_STRUCT:
|
|
38
|
+
return None
|
|
39
|
+
# After https://crrev.com/c/4335544, v8::MaybeLocal contains a local_.
|
|
40
|
+
if gdb.types.has_field(value.type, "local_"):
|
|
41
|
+
value = value["local_"]
|
|
42
|
+
# After https://crrev.com/c/4335544, v8::Local contains a location_.
|
|
43
|
+
if gdb.types.has_field(value.type, "location_"):
|
|
44
|
+
return value["location_"].format_string()
|
|
45
|
+
# Before https://crrev.com/c/4335544, v8::Local contained a val_.
|
|
46
|
+
if gdb.types.has_field(value.type, "val_"):
|
|
47
|
+
return value["val_"].format_string()
|
|
48
|
+
# We don't know how to print this...
|
|
49
|
+
return None
|
|
50
|
+
|
|
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))
|
|
62
|
+
|
|
63
|
+
PrintV8LocalCommand()
|
|
30
64
|
end
|
|
31
65
|
|
|
66
|
+
alias jlh = print-v8-local
|
|
67
|
+
alias jl = print-v8-local
|
|
68
|
+
|
|
32
69
|
# Print Code objects containing given PC.
|
|
33
70
|
define jco
|
|
34
71
|
if $argc == 0
|
|
@@ -42,6 +79,23 @@ Print a v8 Code object from an internal code address
|
|
|
42
79
|
Usage: jco pc
|
|
43
80
|
end
|
|
44
81
|
|
|
82
|
+
# Print Code objects assembly code surrounding given PC.
|
|
83
|
+
define jca
|
|
84
|
+
if $argc == 0
|
|
85
|
+
call (void) _v8_internal_Print_OnlyCode((void*)($pc), 30)
|
|
86
|
+
else
|
|
87
|
+
if $argc == 0
|
|
88
|
+
call (void) _v8_internal_Print_OnlyCode((void*)($arg0), 30)
|
|
89
|
+
else
|
|
90
|
+
call (void) _v8_internal_Print_OnlyCode((void*)($arg0), (size_t)($arg1))
|
|
91
|
+
end
|
|
92
|
+
end
|
|
93
|
+
end
|
|
94
|
+
document jco
|
|
95
|
+
Print a v8 Code object from an internal code address
|
|
96
|
+
Usage: jco pc
|
|
97
|
+
end
|
|
98
|
+
|
|
45
99
|
# Print TransitionTree.
|
|
46
100
|
define jtt
|
|
47
101
|
call (void) _v8_internal_Print_TransitionTree((void*)($arg0))
|
|
@@ -22,53 +22,114 @@ def current_thread(debugger):
|
|
|
22
22
|
def current_frame(debugger):
|
|
23
23
|
return current_thread(debugger).GetSelectedFrame()
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
|
|
26
|
+
def no_arg_cmd(debugger, cmd, print_error=True):
|
|
26
27
|
cast_to_void_expr = '(void) {}'.format(cmd)
|
|
27
28
|
evaluate_result = current_frame(debugger).EvaluateExpression(cast_to_void_expr)
|
|
28
29
|
# When a void function is called the return value type is 0x1001 which
|
|
29
30
|
# is specified in http://tiny.cc/bigskz. This does not indicate
|
|
30
31
|
# an error so we check for that value below.
|
|
31
32
|
kNoResult = 0x1001
|
|
32
|
-
|
|
33
|
-
|
|
33
|
+
result = evaluate_result.GetError()
|
|
34
|
+
is_success = not result.fail or result.value == kNoResult
|
|
35
|
+
if not is_success:
|
|
36
|
+
if print_error:
|
|
34
37
|
print("Failed to evaluate command {} :".format(cmd))
|
|
35
|
-
print(
|
|
38
|
+
print(result.description)
|
|
36
39
|
else:
|
|
37
40
|
print("")
|
|
41
|
+
return (is_success, result, cmd)
|
|
42
|
+
|
|
38
43
|
|
|
39
|
-
def ptr_arg_cmd(debugger, name, param, cmd):
|
|
44
|
+
def ptr_arg_cmd(debugger, name, param, cmd, print_error=True):
|
|
40
45
|
if not param:
|
|
41
46
|
print("'{}' requires an argument".format(name))
|
|
42
|
-
return
|
|
47
|
+
return (False, None, "")
|
|
43
48
|
param = '(void*)({})'.format(param)
|
|
44
|
-
no_arg_cmd(debugger, cmd.format(param))
|
|
49
|
+
return no_arg_cmd(debugger, cmd.format(param), print_error)
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
V8_LLDB_COMMANDS = []
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
def lldbCommand(fn):
|
|
56
|
+
V8_LLDB_COMMANDS.append(fn.__name__)
|
|
57
|
+
return fn
|
|
45
58
|
|
|
46
59
|
#####################
|
|
47
60
|
# lldb commands. #
|
|
48
61
|
#####################
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
@lldbCommand
|
|
49
65
|
def job(debugger, param, *args):
|
|
50
66
|
"""Print a v8 heap object"""
|
|
51
67
|
ptr_arg_cmd(debugger, 'job', param, "_v8_internal_Print_Object({})")
|
|
52
68
|
|
|
69
|
+
|
|
70
|
+
@lldbCommand
|
|
71
|
+
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
|
+
|
|
93
|
+
|
|
94
|
+
@lldbCommand
|
|
53
95
|
def jlh(debugger, param, *args):
|
|
54
96
|
"""Print v8::Local handle value"""
|
|
55
|
-
|
|
56
|
-
|
|
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))
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
@lldbCommand
|
|
107
|
+
def jl(debugger, param, *args):
|
|
108
|
+
"""Print v8::Local handle value"""
|
|
109
|
+
return jlh(debugger, param, *args)
|
|
57
110
|
|
|
111
|
+
|
|
112
|
+
@lldbCommand
|
|
58
113
|
def jco(debugger, param, *args):
|
|
59
114
|
"""Print the code object at the given pc (default: current pc)"""
|
|
60
115
|
if not param:
|
|
61
116
|
param = str(current_frame(debugger).FindRegister("pc").value)
|
|
62
117
|
ptr_arg_cmd(debugger, 'jco', param, "_v8_internal_Print_Code({})")
|
|
63
118
|
|
|
119
|
+
|
|
120
|
+
@lldbCommand
|
|
64
121
|
def jtt(debugger, param, *args):
|
|
65
122
|
"""Print the transition tree of a v8 Map"""
|
|
66
123
|
ptr_arg_cmd(debugger, 'jtt', param, "_v8_internal_Print_TransitionTree({})")
|
|
67
124
|
|
|
125
|
+
|
|
126
|
+
@lldbCommand
|
|
68
127
|
def jst(debugger, *args):
|
|
69
128
|
"""Print the current JavaScript stack trace"""
|
|
70
129
|
no_arg_cmd(debugger, "_v8_internal_Print_StackTrace()")
|
|
71
130
|
|
|
131
|
+
|
|
132
|
+
@lldbCommand
|
|
72
133
|
def jss(debugger, *args):
|
|
73
134
|
"""Skip the jitted stack on x64 to where we entered JS last"""
|
|
74
135
|
frame = current_frame(debugger)
|
|
@@ -83,6 +144,8 @@ def jss(debugger, *args):
|
|
|
83
144
|
rsp = js_entry_sp + 2 *sizeof_void
|
|
84
145
|
pc.value = js_entry_sp + sizeof_void
|
|
85
146
|
|
|
147
|
+
|
|
148
|
+
@lldbCommand
|
|
86
149
|
def bta(debugger, *args):
|
|
87
150
|
"""Print stack trace with assertion scopes"""
|
|
88
151
|
func_name_re = re.compile("([^(<]+)(?:\(.+\))?")
|
|
@@ -129,6 +192,6 @@ def setup_source_map_for_relative_paths(debugger):
|
|
|
129
192
|
def __lldb_init_module(debugger, dict):
|
|
130
193
|
setup_source_map_for_relative_paths(debugger)
|
|
131
194
|
debugger.HandleCommand('settings set target.x86-disassembly-flavor intel')
|
|
132
|
-
for cmd in
|
|
195
|
+
for cmd in V8_LLDB_COMMANDS:
|
|
133
196
|
debugger.HandleCommand(
|
|
134
197
|
'command script add -f lldb_commands.{} {}'.format(cmd, cmd))
|
package/share/man/man1/node.1
CHANGED
|
@@ -152,6 +152,11 @@ Requires Node.js to be built with
|
|
|
152
152
|
.It Fl -enable-source-maps
|
|
153
153
|
Enable Source Map V3 support for stack traces.
|
|
154
154
|
.
|
|
155
|
+
.It Fl -experimental-default-type Ns = Ns Ar type
|
|
156
|
+
Interpret as either ES modules or CommonJS modules input via --eval or STDIN, when --input-type is unspecified;
|
|
157
|
+
.js or extensionless files with no sibling or parent package.json;
|
|
158
|
+
.js or extensionless files whose nearest parent package.json lacks a "type" field, unless under node_modules.
|
|
159
|
+
.
|
|
155
160
|
.It Fl -experimental-global-webcrypto
|
|
156
161
|
Expose the Web Crypto API on the global scope.
|
|
157
162
|
.
|
|
@@ -178,6 +183,9 @@ Use this flag to enable ShadowRealm support.
|
|
|
178
183
|
.It Fl -experimental-test-coverage
|
|
179
184
|
Enable code coverage in the test runner.
|
|
180
185
|
.
|
|
186
|
+
.It Fl -experimental-websocket
|
|
187
|
+
Enable experimental support for the WebSocket API.
|
|
188
|
+
.
|
|
181
189
|
.It Fl -no-experimental-fetch
|
|
182
190
|
Disable experimental support for the Fetch API.
|
|
183
191
|
.
|
|
@@ -410,6 +418,10 @@ Specify the minimum allocation from the OpenSSL secure heap. The default is 2. T
|
|
|
410
418
|
.It Fl -test
|
|
411
419
|
Starts the Node.js command line test runner.
|
|
412
420
|
.
|
|
421
|
+
.It Fl -test-concurrency
|
|
422
|
+
The maximum number of test files that the test runner CLI will execute
|
|
423
|
+
concurrently.
|
|
424
|
+
.
|
|
413
425
|
.It Fl -test-name-pattern
|
|
414
426
|
A regular expression that configures the test runner to only execute tests
|
|
415
427
|
whose name matches the provided pattern.
|