@encharm/cws 4.4.1 → 4.5.1

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 (485) hide show
  1. package/dist/bindings/cws_darwin_arm64_node115.node +0 -0
  2. package/dist/bindings/cws_darwin_arm64_node127.node +0 -0
  3. package/dist/bindings/cws_linux_arm64_node115.node +0 -0
  4. package/dist/bindings/cws_linux_arm64_node127.node +0 -0
  5. package/dist/bindings/cws_linux_x64_node115.node +0 -0
  6. package/dist/bindings/cws_linux_x64_node127.node +0 -0
  7. package/dist/bindings/cws_win32_x64_node108.node +0 -0
  8. package/dist/bindings/cws_win32_x64_node115.node +0 -0
  9. package/dist/bindings/cws_win32_x64_node127.node +0 -0
  10. package/dist/bindings/cws_win32_x64_node83.node +0 -0
  11. package/dist/bindings/cws_win32_x64_node93.node +0 -0
  12. package/package.json +1 -1
  13. package/src/Addon.h +8 -23
  14. package/src/Socket.h +0 -1
  15. package/src/headers/22/acorn_version.h +6 -0
  16. package/src/headers/22/aliased_buffer-inl.h +243 -0
  17. package/src/headers/22/aliased_buffer.h +206 -0
  18. package/src/headers/{18 → 22}/async_wrap-inl.h +8 -6
  19. package/src/headers/{18 → 22}/async_wrap.h +65 -59
  20. package/src/headers/{16 → 22}/base_object-inl.h +57 -117
  21. package/src/headers/{18 → 22}/base_object.h +58 -30
  22. package/src/headers/22/base_object_types.h +74 -0
  23. package/src/headers/22/blob_serializer_deserializer-inl.h +385 -0
  24. package/src/headers/22/blob_serializer_deserializer.h +132 -0
  25. package/src/headers/{16 → 22}/callback_queue.h +1 -0
  26. package/src/headers/{16 → 22}/cares_wrap.h +27 -20
  27. package/src/headers/22/cjs_module_lexer_version.h +6 -0
  28. package/src/headers/22/cleanup_queue-inl.h +62 -0
  29. package/src/headers/22/cleanup_queue.h +85 -0
  30. package/src/headers/22/compile_cache.h +104 -0
  31. package/src/headers/{18 → 22}/crypto/crypto_clienthello.h +1 -1
  32. package/src/headers/{18 → 22}/crypto/crypto_context.h +31 -7
  33. package/src/headers/{18 → 22}/crypto/crypto_keys.h +118 -148
  34. package/src/headers/{18 → 22}/crypto/crypto_tls.h +20 -5
  35. package/src/headers/{18 → 22}/crypto/crypto_util.h +219 -263
  36. package/src/headers/22/crypto/ncrypto.h +752 -0
  37. package/src/headers/{16 → 22}/debug_utils-inl.h +15 -7
  38. package/src/headers/{18 → 22}/debug_utils.h +25 -19
  39. package/src/headers/22/encoding_binding.h +59 -0
  40. package/src/headers/{14 → 22}/env-inl.h +276 -409
  41. package/src/headers/22/env.h +1266 -0
  42. package/src/headers/22/env_properties.h +497 -0
  43. package/src/headers/{18 → 22}/handle_wrap.h +2 -0
  44. package/src/headers/{18 → 22}/histogram.h +88 -48
  45. package/src/headers/{16 → 22}/inspector_agent.h +17 -1
  46. package/src/headers/{16 → 22}/inspector_profiler.h +15 -13
  47. package/src/headers/{18 → 22}/js_native_api.h +78 -30
  48. package/src/headers/{18 → 22}/js_native_api_types.h +46 -1
  49. package/src/headers/{18 → 22}/js_native_api_v8.h +206 -161
  50. package/src/headers/{18 → 22}/js_native_api_v8_internals.h +6 -0
  51. package/src/headers/22/json_parser.h +40 -0
  52. package/src/headers/{16 → 22}/json_utils.h +19 -8
  53. package/src/headers/{18 → 22}/memory_tracker-inl.h +16 -13
  54. package/src/headers/{14 → 22}/memory_tracker.h +13 -8
  55. package/src/headers/{16 → 22}/module_wrap.h +49 -19
  56. package/src/headers/22/ncrypto/ncrypto.h +752 -0
  57. package/src/headers/{18 → 22}/node.h +465 -68
  58. package/src/headers/{18 → 22}/node_api.h +66 -81
  59. package/src/headers/{18 → 22}/node_api_internals.h +8 -4
  60. package/src/headers/{18 → 22}/node_api_types.h +5 -0
  61. package/src/headers/22/node_binding.h +154 -0
  62. package/src/headers/{18 → 22}/node_blob.h +46 -78
  63. package/src/headers/{18 → 22}/node_bob-inl.h +1 -2
  64. package/src/headers/{18 → 22}/node_bob.h +2 -6
  65. package/src/headers/{18 → 22}/node_buffer.h +1 -1
  66. package/src/headers/22/node_builtins.h +220 -0
  67. package/src/headers/{18 → 22}/node_constants.h +3 -5
  68. package/src/headers/22/node_context_data.h +168 -0
  69. package/src/headers/22/node_contextify.h +199 -0
  70. package/src/headers/{16 → 22}/node_crypto.h +1 -2
  71. package/src/headers/22/node_dotenv.h +45 -0
  72. package/src/headers/{18 → 22}/node_errors.h +86 -27
  73. package/src/headers/22/node_exit_code.h +54 -0
  74. package/src/headers/22/node_external_reference.h +249 -0
  75. package/src/headers/{18 → 22}/node_file-inl.h +127 -30
  76. package/src/headers/{16 → 22}/node_file.h +122 -11
  77. package/src/headers/{18 → 22}/node_http2.h +28 -11
  78. package/src/headers/{16 → 22}/node_http2_state.h +34 -25
  79. package/src/headers/{18 → 22}/node_http_common-inl.h +2 -1
  80. package/src/headers/{18 → 22}/node_http_common.h +56 -55
  81. package/src/headers/{16 → 22}/node_i18n.h +5 -18
  82. package/src/headers/{18 → 22}/node_internals.h +121 -59
  83. package/src/headers/{18 → 22}/node_main_instance.h +4 -31
  84. package/src/headers/{18 → 22}/node_messaging.h +27 -10
  85. package/src/headers/{18 → 22}/node_metadata.h +23 -1
  86. package/src/headers/{18 → 22}/node_options-inl.h +24 -11
  87. package/src/headers/{18 → 22}/node_options.h +124 -39
  88. package/src/headers/{18 → 22}/node_perf.h +0 -2
  89. package/src/headers/{18 → 22}/node_perf_common.h +20 -9
  90. package/src/headers/{18 → 22}/node_platform.h +11 -5
  91. package/src/headers/{18 → 22}/node_process.h +26 -14
  92. package/src/headers/22/node_realm-inl.h +145 -0
  93. package/src/headers/22/node_realm.h +184 -0
  94. package/src/headers/{16 → 22}/node_report.h +13 -17
  95. package/src/headers/{16 → 22}/node_revert.h +3 -3
  96. package/src/headers/{16 → 22}/node_root_certs.h +902 -461
  97. package/src/headers/22/node_sea.h +64 -0
  98. package/src/headers/22/node_shadow_realm.h +46 -0
  99. package/src/headers/22/node_snapshot_builder.h +57 -0
  100. package/src/headers/22/node_snapshotable.h +174 -0
  101. package/src/headers/{18 → 22}/node_sockaddr.h +2 -2
  102. package/src/headers/{16 → 22}/node_stat_watcher.h +2 -1
  103. package/src/headers/22/node_threadsafe_cow-inl.h +54 -0
  104. package/src/headers/22/node_threadsafe_cow.h +105 -0
  105. package/src/headers/22/node_union_bytes.h +81 -0
  106. package/src/headers/22/node_url.h +96 -0
  107. package/src/headers/22/node_v8.h +77 -0
  108. package/src/headers/{14 → 22}/node_v8_platform-inl.h +17 -6
  109. package/src/headers/{18 → 22}/node_version.h +20 -8
  110. package/src/headers/22/node_wasi.h +185 -0
  111. package/src/headers/{14 → 22}/node_watchdog.h +2 -0
  112. package/src/headers/{18 → 22}/node_worker.h +7 -2
  113. package/src/headers/22/permission/child_process_permission.h +31 -0
  114. package/src/headers/22/permission/fs_permission.h +167 -0
  115. package/src/headers/22/permission/inspector_permission.h +31 -0
  116. package/src/headers/22/permission/permission.h +99 -0
  117. package/src/headers/22/permission/permission_base.h +60 -0
  118. package/src/headers/22/permission/wasi_permission.h +31 -0
  119. package/src/headers/22/permission/worker_permission.h +31 -0
  120. package/src/headers/{16 → 22}/req_wrap-inl.h +7 -6
  121. package/src/headers/{14 → 22}/spawn_sync.h +3 -3
  122. package/src/headers/{18 → 22}/stream_base-inl.h +0 -135
  123. package/src/headers/{18 → 22}/stream_base.h +35 -16
  124. package/src/headers/{18 → 22}/stream_pipe.h +3 -4
  125. package/src/headers/{16 → 22}/stream_wrap.h +2 -1
  126. package/src/headers/{18 → 22}/string_bytes.h +5 -14
  127. package/src/headers/{14 → 22}/string_decoder-inl.h +0 -6
  128. package/src/headers/{16 → 22}/string_decoder.h +0 -1
  129. package/src/headers/{18 → 22}/tcp_wrap.h +1 -1
  130. package/src/headers/{18 → 22}/threadpoolwork-inl.h +14 -1
  131. package/src/headers/22/timers.h +76 -0
  132. package/src/headers/{18 → 22}/tracing/trace_event.h +7 -5
  133. package/src/headers/{16 → 22}/udp_wrap.h +8 -5
  134. package/src/headers/22/undici_version.h +6 -0
  135. package/src/headers/{18 → 22}/util-inl.h +97 -127
  136. package/src/headers/{18 → 22}/util.h +293 -106
  137. package/src/headers/{18 → 22}/v8-fast-api-calls.h +103 -58
  138. package/dist/bindings/cws_darwin_arm64_node83.node +0 -0
  139. package/dist/bindings/cws_darwin_arm64_node93.node +0 -0
  140. package/dist/bindings/cws_darwin_x64_node83.node +0 -0
  141. package/dist/bindings/cws_darwin_x64_node93.node +0 -0
  142. package/dist/bindings/cws_linux_arm64_node83.node +0 -0
  143. package/dist/bindings/cws_linux_arm64_node93.node +0 -0
  144. package/dist/bindings/cws_linux_x64_node83.node +0 -0
  145. package/dist/bindings/cws_linux_x64_node93.node +0 -0
  146. package/src/headers/14/aliased_buffer.h +0 -263
  147. package/src/headers/14/allocated_buffer-inl.h +0 -110
  148. package/src/headers/14/allocated_buffer.h +0 -73
  149. package/src/headers/14/async_wrap-inl.h +0 -94
  150. package/src/headers/14/async_wrap.h +0 -230
  151. package/src/headers/14/base64.h +0 -183
  152. package/src/headers/14/base_object-inl.h +0 -371
  153. package/src/headers/14/base_object.h +0 -281
  154. package/src/headers/14/callback_queue-inl.h +0 -97
  155. package/src/headers/14/callback_queue.h +0 -78
  156. package/src/headers/14/debug_utils-inl.h +0 -223
  157. package/src/headers/14/debug_utils.h +0 -181
  158. package/src/headers/14/env.h +0 -1388
  159. package/src/headers/14/handle_wrap.h +0 -117
  160. package/src/headers/14/histogram-inl.h +0 -83
  161. package/src/headers/14/histogram.h +0 -98
  162. package/src/headers/14/inspector_agent.h +0 -149
  163. package/src/headers/14/inspector_profiler.h +0 -137
  164. package/src/headers/14/js_native_api.h +0 -544
  165. package/src/headers/14/js_native_api_types.h +0 -143
  166. package/src/headers/14/js_native_api_v8.h +0 -301
  167. package/src/headers/14/js_native_api_v8_internals.h +0 -38
  168. package/src/headers/14/json_utils.h +0 -161
  169. package/src/headers/14/memory_tracker-inl.h +0 -355
  170. package/src/headers/14/module_wrap.h +0 -99
  171. package/src/headers/14/node.h +0 -1032
  172. package/src/headers/14/node_api.h +0 -255
  173. package/src/headers/14/node_api_types.h +0 -44
  174. package/src/headers/14/node_binding.h +0 -99
  175. package/src/headers/14/node_buffer.h +0 -92
  176. package/src/headers/14/node_constants.h +0 -84
  177. package/src/headers/14/node_context_data.h +0 -44
  178. package/src/headers/14/node_contextify.h +0 -161
  179. package/src/headers/14/node_crypto.h +0 -865
  180. package/src/headers/14/node_crypto_bio.h +0 -195
  181. package/src/headers/14/node_crypto_clienthello-inl.h +0 -91
  182. package/src/headers/14/node_crypto_clienthello.h +0 -132
  183. package/src/headers/14/node_crypto_common.h +0 -138
  184. package/src/headers/14/node_crypto_groups.h +0 -415
  185. package/src/headers/14/node_dtrace.h +0 -86
  186. package/src/headers/14/node_errors.h +0 -214
  187. package/src/headers/14/node_file-inl.h +0 -306
  188. package/src/headers/14/node_file.h +0 -417
  189. package/src/headers/14/node_http2.h +0 -1191
  190. package/src/headers/14/node_http2_state.h +0 -149
  191. package/src/headers/14/node_http_common-inl.h +0 -194
  192. package/src/headers/14/node_http_common.h +0 -529
  193. package/src/headers/14/node_i18n.h +0 -144
  194. package/src/headers/14/node_internals.h +0 -405
  195. package/src/headers/14/node_main_instance.h +0 -96
  196. package/src/headers/14/node_mem.h +0 -45
  197. package/src/headers/14/node_messaging.h +0 -303
  198. package/src/headers/14/node_metadata.h +0 -109
  199. package/src/headers/14/node_mutex.h +0 -247
  200. package/src/headers/14/node_native_module.h +0 -101
  201. package/src/headers/14/node_native_module_env.h +0 -66
  202. package/src/headers/14/node_options-inl.h +0 -451
  203. package/src/headers/14/node_options.h +0 -481
  204. package/src/headers/14/node_perf.h +0 -181
  205. package/src/headers/14/node_perf_common.h +0 -97
  206. package/src/headers/14/node_platform.h +0 -189
  207. package/src/headers/14/node_process.h +0 -40
  208. package/src/headers/14/node_report.h +0 -47
  209. package/src/headers/14/node_revert.h +0 -72
  210. package/src/headers/14/node_root_certs.h +0 -3458
  211. package/src/headers/14/node_sockaddr-inl.h +0 -170
  212. package/src/headers/14/node_sockaddr.h +0 -123
  213. package/src/headers/14/node_stat_watcher.h +0 -70
  214. package/src/headers/14/node_union_bytes.h +0 -103
  215. package/src/headers/14/node_url.h +0 -188
  216. package/src/headers/14/node_version.h +0 -98
  217. package/src/headers/14/node_wasi.h +0 -108
  218. package/src/headers/14/node_win32_etw_provider-inl.h +0 -287
  219. package/src/headers/14/node_win32_etw_provider.h +0 -99
  220. package/src/headers/14/node_worker.h +0 -141
  221. package/src/headers/14/pipe_wrap.h +0 -78
  222. package/src/headers/14/req_wrap-inl.h +0 -170
  223. package/src/headers/14/req_wrap.h +0 -77
  224. package/src/headers/14/stream_base-inl.h +0 -275
  225. package/src/headers/14/stream_base.h +0 -434
  226. package/src/headers/14/stream_pipe.h +0 -73
  227. package/src/headers/14/stream_wrap.h +0 -130
  228. package/src/headers/14/string_bytes.h +0 -129
  229. package/src/headers/14/string_decoder.h +0 -50
  230. package/src/headers/14/string_search.h +0 -638
  231. package/src/headers/14/tcp_wrap.h +0 -101
  232. package/src/headers/14/threadpoolwork-inl.h +0 -57
  233. package/src/headers/14/tls_wrap.h +0 -222
  234. package/src/headers/14/tracing/agent.h +0 -195
  235. package/src/headers/14/tracing/node_trace_buffer.h +0 -83
  236. package/src/headers/14/tracing/node_trace_writer.h +0 -75
  237. package/src/headers/14/tracing/trace_event.h +0 -720
  238. package/src/headers/14/tracing/traced_value.h +0 -70
  239. package/src/headers/14/tty_wrap.h +0 -64
  240. package/src/headers/14/udp_wrap.h +0 -227
  241. package/src/headers/14/util-inl.h +0 -566
  242. package/src/headers/14/util.h +0 -804
  243. package/src/headers/14/v8abbr.h +0 -124
  244. package/src/headers/16/aliased_buffer.h +0 -315
  245. package/src/headers/16/aliased_struct-inl.h +0 -54
  246. package/src/headers/16/aliased_struct.h +0 -63
  247. package/src/headers/16/allocated_buffer-inl.h +0 -110
  248. package/src/headers/16/allocated_buffer.h +0 -73
  249. package/src/headers/16/async_wrap-inl.h +0 -94
  250. package/src/headers/16/async_wrap.h +0 -246
  251. package/src/headers/16/base64-inl.h +0 -189
  252. package/src/headers/16/base64.h +0 -69
  253. package/src/headers/16/base_object.h +0 -294
  254. package/src/headers/16/connect_wrap.h +0 -26
  255. package/src/headers/16/connection_wrap.h +0 -30
  256. package/src/headers/16/crypto/crypto_aes.h +0 -89
  257. package/src/headers/16/crypto/crypto_bio.h +0 -194
  258. package/src/headers/16/crypto/crypto_cipher.h +0 -286
  259. package/src/headers/16/crypto/crypto_clienthello-inl.h +0 -90
  260. package/src/headers/16/crypto/crypto_clienthello.h +0 -131
  261. package/src/headers/16/crypto/crypto_common.h +0 -187
  262. package/src/headers/16/crypto/crypto_context.h +0 -147
  263. package/src/headers/16/crypto/crypto_dh.h +0 -157
  264. package/src/headers/16/crypto/crypto_dsa.h +0 -76
  265. package/src/headers/16/crypto/crypto_ec.h +0 -169
  266. package/src/headers/16/crypto/crypto_groups.h +0 -415
  267. package/src/headers/16/crypto/crypto_hash.h +0 -89
  268. package/src/headers/16/crypto/crypto_hkdf.h +0 -66
  269. package/src/headers/16/crypto/crypto_hmac.h +0 -94
  270. package/src/headers/16/crypto/crypto_keygen.h +0 -301
  271. package/src/headers/16/crypto/crypto_keys.h +0 -412
  272. package/src/headers/16/crypto/crypto_pbkdf2.h +0 -76
  273. package/src/headers/16/crypto/crypto_random.h +0 -130
  274. package/src/headers/16/crypto/crypto_rsa.h +0 -141
  275. package/src/headers/16/crypto/crypto_scrypt.h +0 -87
  276. package/src/headers/16/crypto/crypto_sig.h +0 -167
  277. package/src/headers/16/crypto/crypto_spkac.h +0 -20
  278. package/src/headers/16/crypto/crypto_timing.h +0 -20
  279. package/src/headers/16/crypto/crypto_tls.h +0 -292
  280. package/src/headers/16/crypto/crypto_util.h +0 -736
  281. package/src/headers/16/crypto/crypto_x509.h +0 -141
  282. package/src/headers/16/debug_utils.h +0 -184
  283. package/src/headers/16/diagnosticfilename-inl.h +0 -33
  284. package/src/headers/16/env-inl.h +0 -1277
  285. package/src/headers/16/env.h +0 -1629
  286. package/src/headers/16/handle_wrap.h +0 -121
  287. package/src/headers/16/histogram-inl.h +0 -88
  288. package/src/headers/16/histogram.h +0 -216
  289. package/src/headers/16/inspector_io.h +0 -78
  290. package/src/headers/16/inspector_socket.h +0 -60
  291. package/src/headers/16/inspector_socket_server.h +0 -110
  292. package/src/headers/16/js_native_api.h +0 -561
  293. package/src/headers/16/js_native_api_types.h +0 -160
  294. package/src/headers/16/js_native_api_v8.h +0 -451
  295. package/src/headers/16/js_native_api_v8_internals.h +0 -39
  296. package/src/headers/16/js_stream.h +0 -52
  297. package/src/headers/16/memory_tracker-inl.h +0 -356
  298. package/src/headers/16/memory_tracker.h +0 -284
  299. package/src/headers/16/node.d +0 -315
  300. package/src/headers/16/node.h +0 -1132
  301. package/src/headers/16/node.stp +0 -146
  302. package/src/headers/16/node_api.h +0 -275
  303. package/src/headers/16/node_api_internals.h +0 -30
  304. package/src/headers/16/node_api_types.h +0 -50
  305. package/src/headers/16/node_binding.h +0 -99
  306. package/src/headers/16/node_blob.h +0 -191
  307. package/src/headers/16/node_bob-inl.h +0 -37
  308. package/src/headers/16/node_bob.h +0 -111
  309. package/src/headers/16/node_buffer.h +0 -92
  310. package/src/headers/16/node_constants.h +0 -84
  311. package/src/headers/16/node_context_data.h +0 -44
  312. package/src/headers/16/node_contextify.h +0 -196
  313. package/src/headers/16/node_dir.h +0 -52
  314. package/src/headers/16/node_dtrace.h +0 -86
  315. package/src/headers/16/node_errors.h +0 -277
  316. package/src/headers/16/node_external_reference.h +0 -129
  317. package/src/headers/16/node_file-inl.h +0 -306
  318. package/src/headers/16/node_http2.h +0 -1140
  319. package/src/headers/16/node_http_common-inl.h +0 -200
  320. package/src/headers/16/node_http_common.h +0 -531
  321. package/src/headers/16/node_internals.h +0 -421
  322. package/src/headers/16/node_main_instance.h +0 -103
  323. package/src/headers/16/node_mem-inl.h +0 -112
  324. package/src/headers/16/node_messaging.h +0 -373
  325. package/src/headers/16/node_metadata.h +0 -122
  326. package/src/headers/16/node_native_module.h +0 -101
  327. package/src/headers/16/node_native_module_env.h +0 -68
  328. package/src/headers/16/node_object_wrap.h +0 -132
  329. package/src/headers/16/node_options-inl.h +0 -477
  330. package/src/headers/16/node_options.h +0 -494
  331. package/src/headers/16/node_perf.h +0 -185
  332. package/src/headers/16/node_perf_common.h +0 -89
  333. package/src/headers/16/node_platform.h +0 -192
  334. package/src/headers/16/node_process.h +0 -43
  335. package/src/headers/16/node_provider.d +0 -80
  336. package/src/headers/16/node_snapshotable.h +0 -137
  337. package/src/headers/16/node_sockaddr-inl.h +0 -266
  338. package/src/headers/16/node_sockaddr.h +0 -405
  339. package/src/headers/16/node_union_bytes.h +0 -103
  340. package/src/headers/16/node_url.h +0 -205
  341. package/src/headers/16/node_v8.h +0 -41
  342. package/src/headers/16/node_v8_platform-inl.h +0 -194
  343. package/src/headers/16/node_version.h +0 -98
  344. package/src/headers/16/node_wasi.h +0 -108
  345. package/src/headers/16/node_watchdog.h +0 -152
  346. package/src/headers/16/node_win32_etw_provider-inl.h +0 -288
  347. package/src/headers/16/node_win32_etw_provider.h +0 -99
  348. package/src/headers/16/node_worker.h +0 -145
  349. package/src/headers/16/req_wrap.h +0 -77
  350. package/src/headers/16/spawn_sync.h +0 -242
  351. package/src/headers/16/stream_base-inl.h +0 -303
  352. package/src/headers/16/stream_base.h +0 -454
  353. package/src/headers/16/stream_pipe.h +0 -73
  354. package/src/headers/16/string_bytes.h +0 -122
  355. package/src/headers/16/string_decoder-inl.h +0 -37
  356. package/src/headers/16/string_search.h +0 -638
  357. package/src/headers/16/tcp_wrap.h +0 -103
  358. package/src/headers/16/threadpoolwork-inl.h +0 -57
  359. package/src/headers/16/timer_wrap.h +0 -84
  360. package/src/headers/16/tracing/agent.h +0 -195
  361. package/src/headers/16/tracing/node_trace_buffer.h +0 -83
  362. package/src/headers/16/tracing/node_trace_writer.h +0 -75
  363. package/src/headers/16/tracing/trace_event.h +0 -720
  364. package/src/headers/16/tracing/trace_event_common.h +0 -1109
  365. package/src/headers/16/tracing/traced_value.h +0 -70
  366. package/src/headers/16/tty_wrap.h +0 -66
  367. package/src/headers/16/util-inl.h +0 -575
  368. package/src/headers/16/util.h +0 -824
  369. package/src/headers/16/v8abbr.h +0 -123
  370. package/src/headers/16/v8ustack.d +0 -695
  371. package/src/headers/18/aliased_buffer.h +0 -315
  372. package/src/headers/18/aliased_struct-inl.h +0 -54
  373. package/src/headers/18/aliased_struct.h +0 -63
  374. package/src/headers/18/base64-inl.h +0 -189
  375. package/src/headers/18/base64.h +0 -69
  376. package/src/headers/18/base_object-inl.h +0 -374
  377. package/src/headers/18/callback_queue-inl.h +0 -97
  378. package/src/headers/18/callback_queue.h +0 -78
  379. package/src/headers/18/cares_wrap.h +0 -523
  380. package/src/headers/18/connect_wrap.h +0 -26
  381. package/src/headers/18/connection_wrap.h +0 -30
  382. package/src/headers/18/crypto/crypto_aes.h +0 -89
  383. package/src/headers/18/crypto/crypto_bio.h +0 -194
  384. package/src/headers/18/crypto/crypto_cipher.h +0 -291
  385. package/src/headers/18/crypto/crypto_clienthello-inl.h +0 -90
  386. package/src/headers/18/crypto/crypto_common.h +0 -151
  387. package/src/headers/18/crypto/crypto_dh.h +0 -156
  388. package/src/headers/18/crypto/crypto_dsa.h +0 -77
  389. package/src/headers/18/crypto/crypto_ec.h +0 -170
  390. package/src/headers/18/crypto/crypto_groups.h +0 -415
  391. package/src/headers/18/crypto/crypto_hash.h +0 -89
  392. package/src/headers/18/crypto/crypto_hkdf.h +0 -65
  393. package/src/headers/18/crypto/crypto_hmac.h +0 -94
  394. package/src/headers/18/crypto/crypto_keygen.h +0 -305
  395. package/src/headers/18/crypto/crypto_pbkdf2.h +0 -76
  396. package/src/headers/18/crypto/crypto_random.h +0 -130
  397. package/src/headers/18/crypto/crypto_rsa.h +0 -141
  398. package/src/headers/18/crypto/crypto_scrypt.h +0 -87
  399. package/src/headers/18/crypto/crypto_sig.h +0 -168
  400. package/src/headers/18/crypto/crypto_spkac.h +0 -21
  401. package/src/headers/18/crypto/crypto_timing.h +0 -20
  402. package/src/headers/18/crypto/crypto_x509.h +0 -143
  403. package/src/headers/18/debug_utils-inl.h +0 -223
  404. package/src/headers/18/diagnosticfilename-inl.h +0 -33
  405. package/src/headers/18/env-inl.h +0 -1308
  406. package/src/headers/18/env.h +0 -1667
  407. package/src/headers/18/inspector_agent.h +0 -144
  408. package/src/headers/18/inspector_io.h +0 -78
  409. package/src/headers/18/inspector_profiler.h +0 -149
  410. package/src/headers/18/inspector_socket.h +0 -60
  411. package/src/headers/18/inspector_socket_server.h +0 -110
  412. package/src/headers/18/js_stream.h +0 -52
  413. package/src/headers/18/json_utils.h +0 -161
  414. package/src/headers/18/memory_tracker.h +0 -284
  415. package/src/headers/18/module_wrap.h +0 -116
  416. package/src/headers/18/node_binding.h +0 -99
  417. package/src/headers/18/node_context_data.h +0 -44
  418. package/src/headers/18/node_contextify.h +0 -196
  419. package/src/headers/18/node_crypto.h +0 -57
  420. package/src/headers/18/node_dir.h +0 -52
  421. package/src/headers/18/node_dtrace.h +0 -86
  422. package/src/headers/18/node_external_reference.h +0 -145
  423. package/src/headers/18/node_file.h +0 -426
  424. package/src/headers/18/node_http2_state.h +0 -149
  425. package/src/headers/18/node_i18n.h +0 -145
  426. package/src/headers/18/node_mem-inl.h +0 -112
  427. package/src/headers/18/node_mem.h +0 -45
  428. package/src/headers/18/node_mutex.h +0 -323
  429. package/src/headers/18/node_native_module.h +0 -109
  430. package/src/headers/18/node_native_module_env.h +0 -71
  431. package/src/headers/18/node_object_wrap.h +0 -132
  432. package/src/headers/18/node_process-inl.h +0 -26
  433. package/src/headers/18/node_report.h +0 -47
  434. package/src/headers/18/node_revert.h +0 -82
  435. package/src/headers/18/node_root_certs.h +0 -3246
  436. package/src/headers/18/node_snapshot_builder.h +0 -43
  437. package/src/headers/18/node_snapshotable.h +0 -130
  438. package/src/headers/18/node_stat_watcher.h +0 -72
  439. package/src/headers/18/node_union_bytes.h +0 -103
  440. package/src/headers/18/node_url.h +0 -205
  441. package/src/headers/18/node_v8.h +0 -41
  442. package/src/headers/18/node_v8_platform-inl.h +0 -194
  443. package/src/headers/18/node_wasi.h +0 -108
  444. package/src/headers/18/node_watchdog.h +0 -152
  445. package/src/headers/18/node_win32_etw_provider-inl.h +0 -288
  446. package/src/headers/18/node_win32_etw_provider.h +0 -99
  447. package/src/headers/18/pipe_wrap.h +0 -80
  448. package/src/headers/18/req_wrap-inl.h +0 -170
  449. package/src/headers/18/spawn_sync.h +0 -242
  450. package/src/headers/18/stream_wrap.h +0 -133
  451. package/src/headers/18/string_decoder-inl.h +0 -37
  452. package/src/headers/18/string_decoder.h +0 -50
  453. package/src/headers/18/string_search.h +0 -638
  454. package/src/headers/18/tracing/node_trace_buffer.h +0 -83
  455. package/src/headers/18/tracing/node_trace_writer.h +0 -75
  456. package/src/headers/18/tracing/trace_event_common.h +0 -1109
  457. package/src/headers/18/tracing/traced_value.h +0 -70
  458. package/src/headers/18/udp_wrap.h +0 -227
  459. package/src/headers/18/v8abbr.h +0 -123
  460. /package/src/headers/{14 → 22}/aliased_struct-inl.h +0 -0
  461. /package/src/headers/{14 → 22}/aliased_struct.h +0 -0
  462. /package/src/headers/{16 → 22}/callback_queue-inl.h +0 -0
  463. /package/src/headers/{14 → 22}/connect_wrap.h +0 -0
  464. /package/src/headers/{14 → 22}/connection_wrap.h +0 -0
  465. /package/src/headers/{14 → 22}/diagnosticfilename-inl.h +0 -0
  466. /package/src/headers/{18 → 22}/histogram-inl.h +0 -0
  467. /package/src/headers/{14 → 22}/inspector_io.h +0 -0
  468. /package/src/headers/{14 → 22}/inspector_socket.h +0 -0
  469. /package/src/headers/{14 → 22}/inspector_socket_server.h +0 -0
  470. /package/src/headers/{14 → 22}/js_stream.h +0 -0
  471. /package/src/headers/{14 → 22}/node_dir.h +0 -0
  472. /package/src/headers/{14 → 22}/node_mem-inl.h +0 -0
  473. /package/src/headers/{16 → 22}/node_mem.h +0 -0
  474. /package/src/headers/{16 → 22}/node_mutex.h +0 -0
  475. /package/src/headers/{14 → 22}/node_object_wrap.h +0 -0
  476. /package/src/headers/{16 → 22}/node_process-inl.h +0 -0
  477. /package/src/headers/{18 → 22}/node_sockaddr-inl.h +0 -0
  478. /package/src/headers/{18 → 22}/node_wasm_web_api.h +0 -0
  479. /package/src/headers/{16 → 22}/pipe_wrap.h +0 -0
  480. /package/src/headers/{18 → 22}/req_wrap.h +0 -0
  481. /package/src/headers/{18 → 22}/timer_wrap-inl.h +0 -0
  482. /package/src/headers/{18 → 22}/timer_wrap.h +0 -0
  483. /package/src/headers/{18 → 22}/tracing/agent.h +0 -0
  484. /package/src/headers/{14 → 22}/tracing/trace_event_common.h +0 -0
  485. /package/src/headers/{18 → 22}/tty_wrap.h +0 -0
@@ -1,695 +0,0 @@
1
- /*
2
- * V8 DTrace ustack helper for annotating native stack traces with JavaScript
3
- * function names. We start with a frame pointer (arg1) and emit a string
4
- * describing the current function. We do this by chasing pointers to extract
5
- * the function's name (if any) and the filename and line number where the
6
- * function is defined.
7
- *
8
- * To use the helper, run node, then use the jstack() DTrace action to capture
9
- * a JavaScript stacktrace. You may need to tune the dtrace_helper_actions_max
10
- * kernel variable to 128.
11
- */
12
-
13
- #include <v8constants.h>
14
- #include <v8abbr.h>
15
-
16
- /*
17
- * V8 represents small integers (SMI) using the upper 31 bits of a 32/64-bit
18
- * value. To extract the actual integer value, we must shift it over.
19
- */
20
- #define IS_SMI(value) \
21
- ((value & V8_SmiTagMask) == V8_SmiTag)
22
- #define SMI_VALUE(value) \
23
- ((uint32_t) ((value) >> V8_SmiValueShift))
24
- #define NO_SHARED_FUNCTION_NAME_SENTINEL NULL
25
-
26
- /*
27
- * Heap objects usually start off with a Map pointer, itself another heap
28
- * object. However, during garbage collection, the low order bits of the
29
- * pointer (which are normally 01) are used to record GC state. Of course, we
30
- * have no idea if we're in GC or not, so we must always normalize the pointer.
31
- */
32
- #define V8_MAP_PTR(ptr) \
33
- ((ptr & ~V8_HeapObjectTagMask) | V8_HeapObjectTag)
34
-
35
- #define V8_TYPE_SCRIPT(type) \
36
- ((type) == V8_IT_SCRIPT)
37
-
38
- /*
39
- * Determine the encoding and representation of a V8 string.
40
- */
41
- #define V8_TYPE_STRING(type) \
42
- (((type) & V8_IsNotStringMask) == V8_StringTag)
43
-
44
- #define V8_STRENC_ASCII(type) \
45
- (((type) & V8_StringEncodingMask) == V8_AsciiStringTag)
46
-
47
- #define V8_STRREP_SEQ(type) \
48
- (((type) & V8_StringRepresentationMask) == V8_SeqStringTag)
49
- #define V8_STRREP_CONS(type) \
50
- (((type) & V8_StringRepresentationMask) == V8_ConsStringTag)
51
- #define V8_STRREP_EXT(type) \
52
- (((type) & V8_StringRepresentationMask) == V8_ExternalStringTag)
53
-
54
- /*
55
- * String type predicates
56
- */
57
- #define ASCII_SEQSTR(value) \
58
- (V8_TYPE_STRING(value) && V8_STRENC_ASCII(value) && V8_STRREP_SEQ(value))
59
-
60
- #define TWOBYTE_SEQSTR(value) \
61
- (V8_TYPE_STRING(value) && !V8_STRENC_ASCII(value) && V8_STRREP_SEQ(value))
62
-
63
- #define IS_CONSSTR(value) \
64
- (V8_TYPE_STRING(value) && V8_STRREP_CONS(value))
65
-
66
- #define ASCII_EXTSTR(value) \
67
- (V8_TYPE_STRING(value) && V8_STRENC_ASCII(value) && V8_STRREP_EXT(value))
68
-
69
- /*
70
- * General helper macros
71
- */
72
- #define COPYIN_UINT8(addr) (*(uint8_t*) copyin((addr), sizeof(uint8_t)))
73
- #define COPYIN_UINT32(addr) (*(uint32_t*) copyin((addr), sizeof(uint32_t)))
74
- #define COPYIN_UINT64(addr) (*(uint64_t*) copyin((addr), sizeof(uint64_t)))
75
-
76
- #if defined(__i386)
77
- # define COPYIN_PTR(addr) COPYIN_UINT32(addr)
78
- # define off_t uint32_t
79
- # define APPEND_PTR(p) APPEND_PTR_32(p)
80
- #else
81
- # define COPYIN_PTR(addr) COPYIN_UINT64(addr)
82
- # define off_t uint64_t
83
- # define APPEND_PTR(p) APPEND_PTR_64(p)
84
- #endif
85
-
86
- #define APPEND_CHR(c) (this->buf[this->off++] = (c))
87
- #define APPEND_CHR4(s0, s1, s2, s3) \
88
- APPEND_CHR(s0); \
89
- APPEND_CHR(s1); \
90
- APPEND_CHR(s2); \
91
- APPEND_CHR(s3);
92
- #define APPEND_CHR8(s0, s1, s2, s3, s4, s5, s6, s7) \
93
- APPEND_CHR4(s0, s1, s2, s3) \
94
- APPEND_CHR4(s4, s5, s6, s7)
95
-
96
- #define APPEND_DGT(i, d) \
97
- (((i) / (d)) ? APPEND_CHR('0' + ((i)/(d) % 10)) : 0)
98
-
99
- #define APPEND_NUM(i) \
100
- APPEND_DGT((i), 100000); \
101
- APPEND_DGT((i), 10000); \
102
- APPEND_DGT((i), 1000); \
103
- APPEND_DGT((i), 100); \
104
- APPEND_DGT((i), 10); \
105
- APPEND_DGT((i), 1);
106
-
107
- #define APPEND_HEX(d) \
108
- APPEND_CHR((d) < 10 ? '0' + (d) : 'a' - 10 + (d))
109
-
110
- #define APPEND_PTR_32(p) \
111
- APPEND_HEX((p >> 28) & 0xf); \
112
- APPEND_HEX((p >> 24) & 0xf); \
113
- APPEND_HEX((p >> 20) & 0xf); \
114
- APPEND_HEX((p >> 16) & 0xf); \
115
- APPEND_HEX((p >> 12) & 0xf); \
116
- APPEND_HEX((p >> 8) & 0xf); \
117
- APPEND_HEX((p >> 4) & 0xf); \
118
- APPEND_HEX((p) & 0xf);
119
-
120
- #define APPEND_PTR_64(p) \
121
- APPEND_PTR_32(p >> 32) \
122
- APPEND_PTR_32(p)
123
-
124
- /*
125
- * The following macros are used to output ASCII SeqStrings, ConsStrings, and
126
- * Node.js ExternalStrings. To represent each string, we use three fields:
127
- *
128
- * "str": a pointer to the string itself
129
- *
130
- * "len": the string length
131
- *
132
- * "attrs": the type identifier for the string, which indicates the
133
- * encoding and representation. We're only interested in strings
134
- * whose representation is one of:
135
- *
136
- * SeqOneByteString stored directly as a char array inside the object
137
- *
138
- * SeqTwoByteString stored as a UTF-16 char array inside the object
139
- *
140
- * ConsString pointer to two strings that should be concatenated
141
- *
142
- * ExternalString pointer to a char* outside the V8 heap
143
- */
144
-
145
- /*
146
- * Load "len" and "attrs" for the given "str".
147
- */
148
- #define LOAD_STRFIELDS(str, len, attrs) \
149
- len = SMI_VALUE(COPYIN_PTR(str + V8_OFF_STR_LENGTH)); \
150
- this->map = V8_MAP_PTR(COPYIN_PTR(str + V8_OFF_HEAPOBJ_MAP)); \
151
- attrs = COPYIN_UINT8(this->map + V8_OFF_MAP_ATTRS);
152
-
153
- #define APPEND_SEQSTR(str, len, attrs) \
154
- APPEND_SEQONEBYTESTR(str, len, attrs) \
155
- APPEND_SEQTWOBYTESTR(str, len, attrs)
156
-
157
- /*
158
- * Print out the given SeqOneByteString, or do nothing if the string is not an ASCII
159
- * SeqOneByteString.
160
- */
161
- #define APPEND_SEQONEBYTESTR(str, len, attrs) \
162
- dtrace:helper:ustack: \
163
- /!this->done && len > 0 && ASCII_SEQSTR(attrs)/ \
164
- { \
165
- copyinto(str + V8_OFF_STR_CHARS, len, this->buf + this->off); \
166
- this->off += len; \
167
- }
168
-
169
- /*
170
- * LOOP_ITER: macro to paste "block" while "ivar" is less than "dynmax" and
171
- * "statmax". The subsequent LOOP_{4,8} macros facilitate pasting the same
172
- * thing 4 and 8 times, respectively. Like much of the rest of the code in this
173
- * file, this is regrettably necessary given the constraints under which we're
174
- * expected to run.
175
- */
176
- #define LOOP_ITER(ivar, dynmax, statmax, block) \
177
- ((ivar) < (dynmax)) && ((ivar) < (statmax)) && (block); (ivar)++;
178
-
179
- #define LOOP_4(block) \
180
- block \
181
- block \
182
- block \
183
- block \
184
-
185
- #define LOOP_8(block) \
186
- LOOP_4(block) \
187
- LOOP_4(block)
188
-
189
- /*
190
- * Print out the given SeqTwoByteString, or do nothing if the string is not an ASCII
191
- * SeqTwoByteString. NOTE: if you bump MAX_TWOBYTESTR_CHARS, you'll also need
192
- * to modify the LOOP_* macro calls below to match.
193
- */
194
- #define MAX_TWOBYTESTR_CHARS 128
195
- #define MAX_TWOBYTESTR_BYTES (2 * MAX_TWOBYTESTR_CHARS)
196
- #define TO_ASCII(c) ((c) < 128 ? (c) : '?')
197
-
198
- #define APPEND_SEQTWOBYTESTR(str, len, attrs) \
199
- dtrace:helper:ustack: \
200
- /!this->done && len > 0 && TWOBYTE_SEQSTR(attrs)/ \
201
- { \
202
- this->i = 0; \
203
- this->stbuf = (uint16_t *)alloca(MAX_TWOBYTESTR_BYTES + 2); \
204
- copyinto(str + V8_OFF_TWOBYTESTR_CHARS, \
205
- MAX_TWOBYTESTR_BYTES, this->stbuf); \
206
- this->stbuf[MAX_TWOBYTESTR_BYTES - 1] = '\0'; \
207
- this->stbuf[MAX_TWOBYTESTR_BYTES] = '\0'; \
208
- \
209
- LOOP_8(LOOP_8(LOOP_4(LOOP_ITER(this->i, len, \
210
- MAX_TWOBYTESTR_CHARS, \
211
- APPEND_CHR(TO_ASCII(this->stbuf[this->i])))))) \
212
- \
213
- this->i = 0; \
214
- this->stbuf = 0; \
215
- }
216
-
217
- /*
218
- * Print out the given Node.js ExternalString, or do nothing if the string is
219
- * not an ASCII ExternalString.
220
- */
221
- #define APPEND_NODESTR(str, len, attrs) \
222
- dtrace:helper:ustack: \
223
- /!this->done && len > 0 && ASCII_EXTSTR(attrs)/ \
224
- { \
225
- this->resource = COPYIN_PTR(str + V8_OFF_EXTSTR_RSRC); \
226
- this->dataptr = COPYIN_PTR(this->resource + NODE_OFF_EXTSTR_DATA); \
227
- copyinto(this->dataptr, len, this->buf + this->off); \
228
- this->off += len; \
229
- }
230
-
231
- /*
232
- * Recall that each ConsString points to two other strings which are
233
- * semantically concatenated. Of course, these strings may themselves by
234
- * ConsStrings, but in D we can only expand this recursion to a finite level.
235
- * Thankfully, function and script names are generally not more than a few
236
- * levels deep, so we unroll the expansion up to three levels. Even this is
237
- * pretty hairy: we use strings "s0", ..., "s13", (each with "str", "len", and
238
- * "attr" fields -- see above) to store the expanded strings. We expand the
239
- * original string into s0 and s7, then s0 into s1 and s4, etc:
240
- *
241
- *
242
- * +---- str ----+
243
- * / \ <-- 1st expansion
244
- * / \
245
- * s0 s7
246
- * / \ / \
247
- * / \ / \ <-- 2nd expansion
248
- * / \ / \
249
- * s1 s4 s8 s11
250
- * / \ / \ / \ / \ <-- 3rd expansion
251
- * s2 s3 s5 s6 s9 s10 s12 s13
252
- *
253
- * Of course, for a given string, any of these expansions may not be needed.
254
- * For example, we may expand str and find that s0 is already a SeqString,
255
- * while s7 requires further expansion. So when we expand a ConsString, we
256
- * zero the length of the string itself, and then at the end we print out
257
- * all non-zero-length strings in order (including both internal nodes and
258
- * leafs in the tree above) to get the final output.
259
- */
260
- #define EXPAND_START() \
261
- dtrace:helper:ustack: \
262
- /!this->done/ \
263
- { \
264
- this->s0str = this->s1str = this->s2str = (off_t) 0; \
265
- this->s3str = this->s4str = this->s5str = (off_t) 0; \
266
- this->s6str = this->s7str = this->s8str = (off_t) 0; \
267
- this->s9str = this->s10str = this->s11str = (off_t) 0; \
268
- this->s12str = this->s13str = (off_t) 0; \
269
- \
270
- this->s0len = this->s1len = this->s2len = (off_t) 0; \
271
- this->s3len = this->s4len = this->s5len = (off_t) 0; \
272
- this->s6len = this->s7len = this->s8len = (off_t) 0; \
273
- this->s9len = this->s10len = this->s11len = (off_t) 0; \
274
- this->s12len = this->s13len = (off_t) 0; \
275
- \
276
- this->s0attrs = this->s1attrs = this->s2attrs = 0; \
277
- this->s3attrs = this->s4attrs = this->s5attrs = 0; \
278
- this->s6attrs = this->s7attrs = this->s8attrs = 0; \
279
- this->s9attrs = this->s10attrs = this->s11attrs = 0; \
280
- this->s12attrs = this->s13attrs = 0; \
281
- }
282
-
283
- /*
284
- * Expand the ConsString "str" (represented by "str", "len", and "attrs") into
285
- * strings "s1" (represented by "s1s", "s1l", and "s1a") and "s2" (represented
286
- * by "s2s", "s2l", "s2a"). If "str" is not a ConsString, do nothing.
287
- */
288
- #define EXPAND_STR(str, len, attrs, s1s, s1l, s1a, s2s, s2l, s2a) \
289
- dtrace:helper:ustack: \
290
- /!this->done && len > 0 && IS_CONSSTR(attrs)/ \
291
- { \
292
- len = 0; \
293
- \
294
- s1s = COPYIN_PTR(str + V8_OFF_CONSSTR_CAR); \
295
- LOAD_STRFIELDS(s1s, s1l, s1a) \
296
- \
297
- s2s = COPYIN_PTR(str + V8_OFF_CONSSTR_CDR); \
298
- LOAD_STRFIELDS(s2s, s2l, s2a) \
299
- }
300
-
301
- /*
302
- * Print out a ConsString by expanding it up to three levels and printing out
303
- * the resulting SeqStrings.
304
- */
305
- #define APPEND_CONSSTR(str, len, attrs) \
306
- EXPAND_START() \
307
- EXPAND_STR(str, len, attrs, \
308
- this->s0str, this->s0len, this->s0attrs, \
309
- this->s7str, this->s7len, this->s7attrs) \
310
- EXPAND_STR(this->s0str, this->s0len, this->s0attrs, \
311
- this->s1str, this->s1len, this->s1attrs, \
312
- this->s4str, this->s4len, this->s4attrs) \
313
- EXPAND_STR(this->s1str, this->s1len, this->s1attrs, \
314
- this->s2str, this->s2len, this->s2attrs, \
315
- this->s3str, this->s3len, this->s3attrs) \
316
- EXPAND_STR(this->s4str, this->s4len, this->s4attrs, \
317
- this->s5str, this->s5len, this->s5attrs, \
318
- this->s6str, this->s6len, this->s6attrs) \
319
- EXPAND_STR(this->s7str, this->s7len, this->s7attrs, \
320
- this->s8str, this->s8len, this->s8attrs, \
321
- this->s11str, this->s11len, this->s11attrs) \
322
- EXPAND_STR(this->s8str, this->s8len, this->s8attrs, \
323
- this->s9str, this->s9len, this->s9attrs, \
324
- this->s10str, this->s10len, this->s10attrs) \
325
- EXPAND_STR(this->s11str, this->s11len, this->s11attrs, \
326
- this->s12str, this->s12len, this->s12attrs, \
327
- this->s13str, this->s13len, this->s13attrs) \
328
- \
329
- APPEND_SEQSTR(str, len, attrs) \
330
- APPEND_SEQSTR(this->s0str, this->s0len, this->s0attrs) \
331
- APPEND_SEQSTR(this->s1str, this->s1len, this->s1attrs) \
332
- APPEND_SEQSTR(this->s2str, this->s2len, this->s2attrs) \
333
- APPEND_SEQSTR(this->s3str, this->s3len, this->s3attrs) \
334
- APPEND_SEQSTR(this->s4str, this->s4len, this->s4attrs) \
335
- APPEND_SEQSTR(this->s5str, this->s5len, this->s5attrs) \
336
- APPEND_SEQSTR(this->s6str, this->s6len, this->s6attrs) \
337
- APPEND_SEQSTR(this->s7str, this->s7len, this->s7attrs) \
338
- APPEND_SEQSTR(this->s8str, this->s8len, this->s8attrs) \
339
- APPEND_SEQSTR(this->s9str, this->s9len, this->s9attrs) \
340
- APPEND_SEQSTR(this->s10str, this->s10len, this->s10attrs) \
341
- APPEND_SEQSTR(this->s11str, this->s11len, this->s11attrs) \
342
- APPEND_SEQSTR(this->s12str, this->s12len, this->s12attrs) \
343
- APPEND_SEQSTR(this->s13str, this->s13len, this->s13attrs) \
344
-
345
-
346
- /*
347
- * Print out the given SeqString, ConsString, or ExternalString.
348
- * APPEND_CONSSTR implicitly handles SeqStrings as the degenerate case of an
349
- * expanded ConsString.
350
- */
351
- #define APPEND_V8STR(str, len, attrs) \
352
- APPEND_CONSSTR(str, len, attrs) \
353
- APPEND_NODESTR(str, len, attrs)
354
-
355
- /*
356
- * In this first clause we initialize all variables. We must explicitly clear
357
- * them because they may contain values left over from previous iterations.
358
- */
359
- dtrace:helper:ustack:
360
- {
361
- /* input */
362
- this->fp = arg1;
363
-
364
- /* output/flow control */
365
- this->buf = (char*) alloca(128);
366
- this->off = 0;
367
- this->done = 0;
368
-
369
- /* program state */
370
- this->ctx = (off_t) 0;
371
- this->marker = (off_t) 0;
372
- this->func = (off_t) 0;
373
- this->shared = (off_t) 0;
374
- this->map = (off_t) 0;
375
- this->attrs = 0;
376
- this->funcrawnamestr = (off_t) 0;
377
- this->hassharedname = 0;
378
- this->funcnamelen = 0;
379
- this->funcnameattrs = 0;
380
- this->script = (off_t) 0;
381
- this->scriptattrs = 0;
382
- this->scriptnamestr = (off_t) 0;
383
- this->scriptnamelen = 0;
384
- this->scriptnameattrs = 0;
385
- this->position = 0;
386
- this->line_ends = (off_t) 0;
387
- this->le_attrs = 0;
388
-
389
- /* binary search fields */
390
- this->bsearch_min = 0;
391
- this->bsearch_max = 0;
392
- this->ii = 0;
393
- }
394
-
395
- /*
396
- * Check for other common frame types for which we also have nothing to add.
397
- */
398
- dtrace:helper:ustack:
399
- /!this->done/
400
- {
401
- this->marker = COPYIN_PTR(this->fp + V8_OFF_FP_CONTEXT);
402
- }
403
-
404
- dtrace:helper:ustack:
405
- /!this->done && IS_SMI(this->marker) &&
406
- SMI_VALUE(this->marker) == V8_FT_ENTRY/
407
- {
408
- this->done = 1;
409
- APPEND_CHR8('<','<',' ','e','n','t','r','y');
410
- APPEND_CHR4(' ','>','>','\0');
411
- stringof(this->buf);
412
- }
413
-
414
- dtrace:helper:ustack:
415
- /!this->done && IS_SMI(this->marker) &&
416
- SMI_VALUE(this->marker) == V8_FT_ENTRYCONSTRUCT/
417
- {
418
- this->done = 1;
419
- APPEND_CHR8('<','<',' ','e','n','t','r','y');
420
- APPEND_CHR8('_','c','o','n','s','t','r','u');
421
- APPEND_CHR4('t',' ','>','>');
422
- APPEND_CHR('\0');
423
- stringof(this->buf);
424
- }
425
-
426
- dtrace:helper:ustack:
427
- /!this->done && IS_SMI(this->marker) &&
428
- SMI_VALUE(this->marker) == V8_FT_EXIT/
429
- {
430
- this->done = 1;
431
- APPEND_CHR8('<','<',' ','e','x','i','t',' ');
432
- APPEND_CHR4('>','>','\0','\0');
433
- stringof(this->buf);
434
- }
435
-
436
- dtrace:helper:ustack:
437
- /!this->done && IS_SMI(this->marker) &&
438
- SMI_VALUE(this->marker) == V8_FT_INTERNAL/
439
- {
440
- this->done = 1;
441
- APPEND_CHR8('<','<',' ','i','n','t','e','r');
442
- APPEND_CHR8('n','a','l',' ','>','>','\0','\0');
443
- stringof(this->buf);
444
- }
445
-
446
- dtrace:helper:ustack:
447
- /!this->done && IS_SMI(this->marker) &&
448
- SMI_VALUE(this->marker) == V8_FT_CONSTRUCT/
449
- {
450
- this->done = 1;
451
- APPEND_CHR8('<','<',' ','c','o','n','s','t');
452
- APPEND_CHR8('r','u','c','t','o','r',' ','>');
453
- APPEND_CHR4('>','\0','\0','\0');
454
- stringof(this->buf);
455
- }
456
-
457
- dtrace:helper:ustack:
458
- /!this->done && IS_SMI(this->marker) &&
459
- SMI_VALUE(this->marker) == V8_FT_STUB/
460
- {
461
- this->done = 1;
462
- APPEND_CHR8('<','<',' ','s','t','u','b',' ');
463
- APPEND_CHR4('>','>','\0','\0');
464
- stringof(this->buf);
465
- }
466
-
467
- /*
468
- * Now check for internal frames that we can only identify by seeing that
469
- * there's a Code object where there would be a JSFunction object for a
470
- * JavaScriptFrame.
471
- */
472
- dtrace:helper:ustack:
473
- /!this->done/
474
- {
475
- this->func = COPYIN_PTR(this->fp + V8_OFF_FP_FUNC);
476
- this->map = V8_MAP_PTR(COPYIN_PTR(this->func + V8_OFF_HEAPOBJ_MAP));
477
- this->attrs = COPYIN_UINT8(this->map + V8_OFF_MAP_ATTRS);
478
- }
479
-
480
- dtrace:helper:ustack:
481
- /!this->done && this->attrs == V8_IT_CODE/
482
- {
483
- this->done = 1;
484
- APPEND_CHR8('<','<',' ','i','n','t','e','r');
485
- APPEND_CHR8('n','a','l',' ','c','o','d','e');
486
- APPEND_CHR4(' ','>','>','\0');
487
- stringof(this->buf);
488
- }
489
-
490
- /*
491
- * At this point, we're either looking at a JavaScriptFrame or an
492
- * OptimizedFrame. For now, we assume JavaScript and start by grabbing the
493
- * function name.
494
- */
495
- dtrace:helper:ustack:
496
- /!this->done/
497
- {
498
- this->map = 0;
499
- this->attrs = 0;
500
-
501
- this->shared = COPYIN_PTR(this->func + V8_OFF_FUNC_SHARED);
502
- this->funcrawnamestr = COPYIN_PTR(this->shared + V8_OFF_RAW_NAME);
503
- this->hassharedname = this->funcrawnamestr !=
504
- NO_SHARED_FUNCTION_NAME_SENTINEL;
505
- }
506
-
507
- dtrace:helper:ustack:
508
- /!this->done && this->hassharedname/
509
- {
510
- LOAD_STRFIELDS(this->funcrawnamestr, this->funcnamelen,
511
- this->funcnameattrs);
512
- }
513
-
514
- dtrace:helper:ustack:
515
- /!this->done && this->funcnamelen == 0/
516
- {
517
- /*
518
- * This is an anonymous function, but if it was invoked as a method of
519
- * some object then V8 will have computed an inferred name that we can
520
- * include in the stack trace.
521
- */
522
- APPEND_CHR8('(','a','n','o','n',')',' ','a');
523
- APPEND_CHR('s');
524
- APPEND_CHR(' ');
525
-
526
- this->funcrawnamestr = COPYIN_PTR(this->shared + V8_OFF_SHARED_IDENT);
527
- LOAD_STRFIELDS(this->funcrawnamestr, this->funcnamelen,
528
- this->funcnameattrs);
529
- }
530
-
531
- dtrace:helper:ustack:
532
- /!this->done && this->funcnamelen == 0/
533
- {
534
- APPEND_CHR('(');
535
- APPEND_CHR4('a','n','o','n');
536
- APPEND_CHR(')');
537
- }
538
-
539
- APPEND_V8STR(this->funcrawnamestr, this->funcnamelen, this->funcnameattrs)
540
-
541
- /*
542
- * Now look for the name of the script where the function was defined. The
543
- * "script" itself may be undefined for special functions like "RegExp".
544
- */
545
- dtrace:helper:ustack:
546
- /!this->done/
547
- {
548
- this->script = COPYIN_PTR(this->shared + V8_OFF_SHARED_SCRIPT);
549
- this->map = V8_MAP_PTR(COPYIN_PTR(this->script + V8_OFF_HEAPOBJ_MAP));
550
- this->scriptattrs = COPYIN_UINT8(this->map + V8_OFF_MAP_ATTRS);
551
- }
552
-
553
- dtrace:helper:ustack:
554
- /!this->done && !V8_TYPE_SCRIPT(this->scriptattrs)/
555
- {
556
- APPEND_CHR('\0');
557
- this->done = 1;
558
- stringof(this->buf);
559
- }
560
-
561
-
562
- dtrace:helper:ustack:
563
- /!this->done/
564
- {
565
- this->scriptnamestr = COPYIN_PTR(this->script + V8_OFF_SCRIPT_NAME);
566
- LOAD_STRFIELDS(this->scriptnamestr, this->scriptnamelen,
567
- this->scriptnameattrs);
568
- }
569
-
570
- dtrace:helper:ustack:
571
- /!this->done && this->scriptnamelen != 0/
572
- {
573
- APPEND_CHR4(' ','a','t',' ');
574
- }
575
-
576
- APPEND_V8STR(this->scriptnamestr, this->scriptnamelen, this->scriptnameattrs)
577
-
578
- /*
579
- * Now look for file position and line number information.
580
- */
581
- dtrace:helper:ustack:
582
- /!this->done/
583
- {
584
- this->position = COPYIN_UINT32(this->shared + V8_OFF_SHARED_FUNIDENT);
585
- this->line_ends = COPYIN_PTR(this->script + V8_OFF_SCRIPT_LENDS);
586
- this->map = V8_MAP_PTR(COPYIN_PTR(this->line_ends + V8_OFF_HEAPOBJ_MAP));
587
- this->le_attrs = COPYIN_UINT8(this->map + V8_OFF_MAP_ATTRS);
588
- }
589
-
590
- dtrace:helper:ustack:
591
- /!this->done && this->le_attrs != V8_IT_FIXEDARRAY && this->position == 0/
592
- {
593
- APPEND_CHR('\0');
594
- this->done = 1;
595
- stringof(this->buf);
596
- }
597
-
598
- dtrace:helper:ustack:
599
- /!this->done && this->le_attrs != V8_IT_FIXEDARRAY/
600
- {
601
- /*
602
- * If the line number array was not a valid FixedArray, it's probably
603
- * undefined because V8 has not had to compute it yet. In this case we
604
- * just show the raw position and call it a day.
605
- */
606
- APPEND_CHR4(' ','p','o','s');
607
- APPEND_CHR(' ');
608
- APPEND_NUM(SMI_VALUE(this->position));
609
- APPEND_CHR('\0');
610
- this->done = 1;
611
- stringof(this->buf);
612
- }
613
-
614
- /*
615
- * At this point, we've got both a position in the script and an array
616
- * describing where each line of the file ends. We can use this to compute the
617
- * line number by binary searching the array. (This is also what V8 does when
618
- * computing stack traces.)
619
- */
620
- dtrace:helper:ustack:
621
- /!this->done/
622
- {
623
- /* initialize binary search */
624
- this->bsearch_line = this->position <
625
- SMI_VALUE(COPYIN_PTR(this->line_ends + V8_OFF_FA_DATA)) ? 1 : 0;
626
- this->bsearch_min = 0;
627
- this->bsearch_max = this->bsearch_line != 0 ? 0 :
628
- SMI_VALUE(COPYIN_PTR(this->line_ends + V8_OFF_FA_SIZE)) - 1;
629
- }
630
-
631
- /*
632
- * Of course, we can't iterate the binary search indefinitely, so we hardcode 15
633
- * iterations. That's enough to precisely identify the line number in files up
634
- * to 32768 lines of code.
635
- */
636
- #define BSEARCH_LOOP \
637
- dtrace:helper:ustack: \
638
- /!this->done && this->bsearch_max >= 1/ \
639
- { \
640
- this->ii = (this->bsearch_min + this->bsearch_max) >> 1; \
641
- } \
642
- \
643
- dtrace:helper:ustack: \
644
- /!this->done && this->bsearch_max >= 1 && \
645
- this->position > SMI_VALUE( \
646
- COPYIN_PTR(this->line_ends + V8_OFF_FA_DATA + \
647
- this->ii * sizeof (uint32_t)))/ \
648
- { \
649
- this->bsearch_min = this->ii + 1; \
650
- } \
651
- \
652
- dtrace:helper:ustack: \
653
- /!this->done && this->bsearch_max >= 1 && \
654
- this->position <= SMI_VALUE( \
655
- COPYIN_PTR(this->line_ends + V8_OFF_FA_DATA + \
656
- (this->ii - 1) * sizeof (uint32_t)))/ \
657
- { \
658
- this->bsearch_max = this->ii - 1; \
659
- }
660
-
661
- BSEARCH_LOOP
662
- BSEARCH_LOOP
663
- BSEARCH_LOOP
664
- BSEARCH_LOOP
665
- BSEARCH_LOOP
666
- BSEARCH_LOOP
667
- BSEARCH_LOOP
668
- BSEARCH_LOOP
669
- BSEARCH_LOOP
670
- BSEARCH_LOOP
671
- BSEARCH_LOOP
672
- BSEARCH_LOOP
673
- BSEARCH_LOOP
674
- BSEARCH_LOOP
675
- BSEARCH_LOOP
676
-
677
- dtrace:helper:ustack:
678
- /!this->done && !this->bsearch_line/
679
- {
680
- this->bsearch_line = this->ii + 1;
681
- }
682
-
683
- dtrace:helper:ustack:
684
- /!this->done/
685
- {
686
- APPEND_CHR(' ');
687
- APPEND_CHR4('l','i','n','e');
688
- APPEND_CHR(' ');
689
- APPEND_NUM(this->bsearch_line);
690
- APPEND_CHR('\0');
691
- this->done = 1;
692
- stringof(this->buf);
693
- }
694
-
695
- /* vim: set tabstop=8 softtabstop=8 shiftwidth=8 noexpandtab: */