node-bin-darwin-arm64 25.9.0 → 26.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 (229) hide show
  1. package/CHANGELOG.md +514 -1426
  2. package/README.md +4 -10
  3. package/bin/node +0 -0
  4. package/include/node/common.gypi +78 -2
  5. package/include/node/config.gypi +20 -10
  6. package/include/node/cppgc/allocation.h +6 -7
  7. package/include/node/cppgc/heap-statistics.h +6 -2
  8. package/include/node/cppgc/internal/api-constants.h +1 -1
  9. package/include/node/cppgc/visitor.h +1 -0
  10. package/include/node/js_native_api.h +10 -0
  11. package/include/node/js_native_api_types.h +4 -0
  12. package/include/node/libplatform/v8-tracing.h +13 -2
  13. package/include/node/node.h +1 -1
  14. package/include/node/node_object_wrap.h +4 -2
  15. package/include/node/node_version.h +3 -3
  16. package/include/node/openssl/archs/BSD-x86/asm/crypto/buildinf.h +1 -1
  17. package/include/node/openssl/archs/BSD-x86/asm/include/openssl/cmp.h +3 -1
  18. package/include/node/openssl/archs/BSD-x86/asm/include/openssl/opensslv.h +5 -5
  19. package/include/node/openssl/archs/BSD-x86/asm_avx2/crypto/buildinf.h +1 -1
  20. package/include/node/openssl/archs/BSD-x86/asm_avx2/include/openssl/cmp.h +3 -1
  21. package/include/node/openssl/archs/BSD-x86/asm_avx2/include/openssl/opensslv.h +5 -5
  22. package/include/node/openssl/archs/BSD-x86/no-asm/crypto/buildinf.h +1 -1
  23. package/include/node/openssl/archs/BSD-x86/no-asm/include/openssl/cmp.h +3 -1
  24. package/include/node/openssl/archs/BSD-x86/no-asm/include/openssl/opensslv.h +5 -5
  25. package/include/node/openssl/archs/BSD-x86_64/asm/crypto/buildinf.h +1 -1
  26. package/include/node/openssl/archs/BSD-x86_64/asm/include/openssl/cmp.h +3 -1
  27. package/include/node/openssl/archs/BSD-x86_64/asm/include/openssl/opensslv.h +5 -5
  28. package/include/node/openssl/archs/BSD-x86_64/asm_avx2/crypto/buildinf.h +1 -1
  29. package/include/node/openssl/archs/BSD-x86_64/asm_avx2/include/openssl/cmp.h +3 -1
  30. package/include/node/openssl/archs/BSD-x86_64/asm_avx2/include/openssl/opensslv.h +5 -5
  31. package/include/node/openssl/archs/BSD-x86_64/no-asm/crypto/buildinf.h +1 -1
  32. package/include/node/openssl/archs/BSD-x86_64/no-asm/include/openssl/cmp.h +3 -1
  33. package/include/node/openssl/archs/BSD-x86_64/no-asm/include/openssl/opensslv.h +5 -5
  34. package/include/node/openssl/archs/VC-WIN32/asm/crypto/buildinf.h +1 -1
  35. package/include/node/openssl/archs/VC-WIN32/asm/include/openssl/cmp.h +3 -1
  36. package/include/node/openssl/archs/VC-WIN32/asm/include/openssl/opensslv.h +5 -5
  37. package/include/node/openssl/archs/VC-WIN32/asm_avx2/crypto/buildinf.h +1 -1
  38. package/include/node/openssl/archs/VC-WIN32/asm_avx2/include/openssl/cmp.h +3 -1
  39. package/include/node/openssl/archs/VC-WIN32/asm_avx2/include/openssl/opensslv.h +5 -5
  40. package/include/node/openssl/archs/VC-WIN32/no-asm/crypto/buildinf.h +1 -1
  41. package/include/node/openssl/archs/VC-WIN32/no-asm/include/openssl/cmp.h +3 -1
  42. package/include/node/openssl/archs/VC-WIN32/no-asm/include/openssl/opensslv.h +5 -5
  43. package/include/node/openssl/archs/VC-WIN64-ARM/no-asm/crypto/buildinf.h +1 -1
  44. package/include/node/openssl/archs/VC-WIN64-ARM/no-asm/include/openssl/cmp.h +3 -1
  45. package/include/node/openssl/archs/VC-WIN64-ARM/no-asm/include/openssl/opensslv.h +5 -5
  46. package/include/node/openssl/archs/VC-WIN64A/asm/crypto/buildinf.h +1 -1
  47. package/include/node/openssl/archs/VC-WIN64A/asm/include/openssl/cmp.h +3 -1
  48. package/include/node/openssl/archs/VC-WIN64A/asm/include/openssl/opensslv.h +5 -5
  49. package/include/node/openssl/archs/VC-WIN64A/asm_avx2/crypto/buildinf.h +1 -1
  50. package/include/node/openssl/archs/VC-WIN64A/asm_avx2/include/openssl/cmp.h +3 -1
  51. package/include/node/openssl/archs/VC-WIN64A/asm_avx2/include/openssl/opensslv.h +5 -5
  52. package/include/node/openssl/archs/VC-WIN64A/no-asm/crypto/buildinf.h +1 -1
  53. package/include/node/openssl/archs/VC-WIN64A/no-asm/include/openssl/cmp.h +3 -1
  54. package/include/node/openssl/archs/VC-WIN64A/no-asm/include/openssl/opensslv.h +5 -5
  55. package/include/node/openssl/archs/aix64-gcc-as/asm/crypto/buildinf.h +1 -1
  56. package/include/node/openssl/archs/aix64-gcc-as/asm/include/openssl/cmp.h +3 -1
  57. package/include/node/openssl/archs/aix64-gcc-as/asm/include/openssl/opensslv.h +5 -5
  58. package/include/node/openssl/archs/aix64-gcc-as/asm_avx2/crypto/buildinf.h +1 -1
  59. package/include/node/openssl/archs/aix64-gcc-as/asm_avx2/include/openssl/cmp.h +3 -1
  60. package/include/node/openssl/archs/aix64-gcc-as/asm_avx2/include/openssl/opensslv.h +5 -5
  61. package/include/node/openssl/archs/aix64-gcc-as/no-asm/crypto/buildinf.h +1 -1
  62. package/include/node/openssl/archs/aix64-gcc-as/no-asm/include/openssl/cmp.h +3 -1
  63. package/include/node/openssl/archs/aix64-gcc-as/no-asm/include/openssl/opensslv.h +5 -5
  64. package/include/node/openssl/archs/darwin-i386-cc/asm/crypto/buildinf.h +1 -1
  65. package/include/node/openssl/archs/darwin-i386-cc/asm/include/openssl/cmp.h +3 -1
  66. package/include/node/openssl/archs/darwin-i386-cc/asm/include/openssl/opensslv.h +5 -5
  67. package/include/node/openssl/archs/darwin-i386-cc/asm_avx2/crypto/buildinf.h +1 -1
  68. package/include/node/openssl/archs/darwin-i386-cc/asm_avx2/include/openssl/cmp.h +3 -1
  69. package/include/node/openssl/archs/darwin-i386-cc/asm_avx2/include/openssl/opensslv.h +5 -5
  70. package/include/node/openssl/archs/darwin-i386-cc/no-asm/crypto/buildinf.h +1 -1
  71. package/include/node/openssl/archs/darwin-i386-cc/no-asm/include/openssl/cmp.h +3 -1
  72. package/include/node/openssl/archs/darwin-i386-cc/no-asm/include/openssl/opensslv.h +5 -5
  73. package/include/node/openssl/archs/darwin64-arm64-cc/asm/crypto/buildinf.h +1 -1
  74. package/include/node/openssl/archs/darwin64-arm64-cc/asm/include/openssl/cmp.h +3 -1
  75. package/include/node/openssl/archs/darwin64-arm64-cc/asm/include/openssl/opensslv.h +5 -5
  76. package/include/node/openssl/archs/darwin64-arm64-cc/asm_avx2/crypto/buildinf.h +1 -1
  77. package/include/node/openssl/archs/darwin64-arm64-cc/asm_avx2/include/openssl/cmp.h +3 -1
  78. package/include/node/openssl/archs/darwin64-arm64-cc/asm_avx2/include/openssl/opensslv.h +5 -5
  79. package/include/node/openssl/archs/darwin64-arm64-cc/no-asm/crypto/buildinf.h +1 -1
  80. package/include/node/openssl/archs/darwin64-arm64-cc/no-asm/include/openssl/cmp.h +3 -1
  81. package/include/node/openssl/archs/darwin64-arm64-cc/no-asm/include/openssl/opensslv.h +5 -5
  82. package/include/node/openssl/archs/darwin64-x86_64-cc/asm/crypto/buildinf.h +1 -1
  83. package/include/node/openssl/archs/darwin64-x86_64-cc/asm/include/openssl/cmp.h +3 -1
  84. package/include/node/openssl/archs/darwin64-x86_64-cc/asm/include/openssl/opensslv.h +5 -5
  85. package/include/node/openssl/archs/darwin64-x86_64-cc/asm_avx2/crypto/buildinf.h +1 -1
  86. package/include/node/openssl/archs/darwin64-x86_64-cc/asm_avx2/include/openssl/cmp.h +3 -1
  87. package/include/node/openssl/archs/darwin64-x86_64-cc/asm_avx2/include/openssl/opensslv.h +5 -5
  88. package/include/node/openssl/archs/darwin64-x86_64-cc/no-asm/crypto/buildinf.h +1 -1
  89. package/include/node/openssl/archs/darwin64-x86_64-cc/no-asm/include/openssl/cmp.h +3 -1
  90. package/include/node/openssl/archs/darwin64-x86_64-cc/no-asm/include/openssl/opensslv.h +5 -5
  91. package/include/node/openssl/archs/linux-aarch64/asm/crypto/buildinf.h +1 -1
  92. package/include/node/openssl/archs/linux-aarch64/asm/include/openssl/cmp.h +3 -1
  93. package/include/node/openssl/archs/linux-aarch64/asm/include/openssl/opensslv.h +5 -5
  94. package/include/node/openssl/archs/linux-aarch64/asm_avx2/crypto/buildinf.h +1 -1
  95. package/include/node/openssl/archs/linux-aarch64/asm_avx2/include/openssl/cmp.h +3 -1
  96. package/include/node/openssl/archs/linux-aarch64/asm_avx2/include/openssl/opensslv.h +5 -5
  97. package/include/node/openssl/archs/linux-aarch64/no-asm/crypto/buildinf.h +1 -1
  98. package/include/node/openssl/archs/linux-aarch64/no-asm/include/openssl/cmp.h +3 -1
  99. package/include/node/openssl/archs/linux-aarch64/no-asm/include/openssl/opensslv.h +5 -5
  100. package/include/node/openssl/archs/linux-armv4/asm/crypto/buildinf.h +1 -1
  101. package/include/node/openssl/archs/linux-armv4/asm/include/openssl/cmp.h +3 -1
  102. package/include/node/openssl/archs/linux-armv4/asm/include/openssl/opensslv.h +5 -5
  103. package/include/node/openssl/archs/linux-armv4/asm_avx2/crypto/buildinf.h +1 -1
  104. package/include/node/openssl/archs/linux-armv4/asm_avx2/include/openssl/cmp.h +3 -1
  105. package/include/node/openssl/archs/linux-armv4/asm_avx2/include/openssl/opensslv.h +5 -5
  106. package/include/node/openssl/archs/linux-armv4/no-asm/crypto/buildinf.h +1 -1
  107. package/include/node/openssl/archs/linux-armv4/no-asm/include/openssl/cmp.h +3 -1
  108. package/include/node/openssl/archs/linux-armv4/no-asm/include/openssl/opensslv.h +5 -5
  109. package/include/node/openssl/archs/linux-elf/asm/crypto/buildinf.h +1 -1
  110. package/include/node/openssl/archs/linux-elf/asm/include/openssl/cmp.h +3 -1
  111. package/include/node/openssl/archs/linux-elf/asm/include/openssl/opensslv.h +5 -5
  112. package/include/node/openssl/archs/linux-elf/asm_avx2/crypto/buildinf.h +1 -1
  113. package/include/node/openssl/archs/linux-elf/asm_avx2/include/openssl/cmp.h +3 -1
  114. package/include/node/openssl/archs/linux-elf/asm_avx2/include/openssl/opensslv.h +5 -5
  115. package/include/node/openssl/archs/linux-elf/no-asm/crypto/buildinf.h +1 -1
  116. package/include/node/openssl/archs/linux-elf/no-asm/include/openssl/cmp.h +3 -1
  117. package/include/node/openssl/archs/linux-elf/no-asm/include/openssl/opensslv.h +5 -5
  118. package/include/node/openssl/archs/linux-ppc64le/asm/crypto/buildinf.h +1 -1
  119. package/include/node/openssl/archs/linux-ppc64le/asm/include/openssl/cmp.h +3 -1
  120. package/include/node/openssl/archs/linux-ppc64le/asm/include/openssl/opensslv.h +5 -5
  121. package/include/node/openssl/archs/linux-ppc64le/asm_avx2/crypto/buildinf.h +1 -1
  122. package/include/node/openssl/archs/linux-ppc64le/asm_avx2/include/openssl/cmp.h +3 -1
  123. package/include/node/openssl/archs/linux-ppc64le/asm_avx2/include/openssl/opensslv.h +5 -5
  124. package/include/node/openssl/archs/linux-ppc64le/no-asm/crypto/buildinf.h +1 -1
  125. package/include/node/openssl/archs/linux-ppc64le/no-asm/include/openssl/cmp.h +3 -1
  126. package/include/node/openssl/archs/linux-ppc64le/no-asm/include/openssl/opensslv.h +5 -5
  127. package/include/node/openssl/archs/linux-x86_64/asm/crypto/buildinf.h +1 -1
  128. package/include/node/openssl/archs/linux-x86_64/asm/include/openssl/cmp.h +3 -1
  129. package/include/node/openssl/archs/linux-x86_64/asm/include/openssl/opensslv.h +5 -5
  130. package/include/node/openssl/archs/linux-x86_64/asm_avx2/crypto/buildinf.h +1 -1
  131. package/include/node/openssl/archs/linux-x86_64/asm_avx2/include/openssl/cmp.h +3 -1
  132. package/include/node/openssl/archs/linux-x86_64/asm_avx2/include/openssl/opensslv.h +5 -5
  133. package/include/node/openssl/archs/linux-x86_64/no-asm/crypto/buildinf.h +1 -1
  134. package/include/node/openssl/archs/linux-x86_64/no-asm/include/openssl/cmp.h +3 -1
  135. package/include/node/openssl/archs/linux-x86_64/no-asm/include/openssl/opensslv.h +5 -5
  136. package/include/node/openssl/archs/linux32-s390x/asm/crypto/buildinf.h +1 -1
  137. package/include/node/openssl/archs/linux32-s390x/asm/include/openssl/cmp.h +3 -1
  138. package/include/node/openssl/archs/linux32-s390x/asm/include/openssl/opensslv.h +5 -5
  139. package/include/node/openssl/archs/linux32-s390x/asm_avx2/crypto/buildinf.h +1 -1
  140. package/include/node/openssl/archs/linux32-s390x/asm_avx2/include/openssl/cmp.h +3 -1
  141. package/include/node/openssl/archs/linux32-s390x/asm_avx2/include/openssl/opensslv.h +5 -5
  142. package/include/node/openssl/archs/linux32-s390x/no-asm/crypto/buildinf.h +1 -1
  143. package/include/node/openssl/archs/linux32-s390x/no-asm/include/openssl/cmp.h +3 -1
  144. package/include/node/openssl/archs/linux32-s390x/no-asm/include/openssl/opensslv.h +5 -5
  145. package/include/node/openssl/archs/linux64-loongarch64/no-asm/crypto/buildinf.h +1 -1
  146. package/include/node/openssl/archs/linux64-loongarch64/no-asm/include/openssl/cmp.h +3 -1
  147. package/include/node/openssl/archs/linux64-loongarch64/no-asm/include/openssl/opensslv.h +5 -5
  148. package/include/node/openssl/archs/linux64-mips64/asm/crypto/buildinf.h +1 -1
  149. package/include/node/openssl/archs/linux64-mips64/asm/include/openssl/cmp.h +3 -1
  150. package/include/node/openssl/archs/linux64-mips64/asm/include/openssl/opensslv.h +5 -5
  151. package/include/node/openssl/archs/linux64-mips64/asm_avx2/crypto/buildinf.h +1 -1
  152. package/include/node/openssl/archs/linux64-mips64/asm_avx2/include/openssl/cmp.h +3 -1
  153. package/include/node/openssl/archs/linux64-mips64/asm_avx2/include/openssl/opensslv.h +5 -5
  154. package/include/node/openssl/archs/linux64-mips64/no-asm/crypto/buildinf.h +1 -1
  155. package/include/node/openssl/archs/linux64-mips64/no-asm/include/openssl/cmp.h +3 -1
  156. package/include/node/openssl/archs/linux64-mips64/no-asm/include/openssl/opensslv.h +5 -5
  157. package/include/node/openssl/archs/linux64-riscv64/no-asm/crypto/buildinf.h +1 -1
  158. package/include/node/openssl/archs/linux64-riscv64/no-asm/include/openssl/cmp.h +3 -1
  159. package/include/node/openssl/archs/linux64-riscv64/no-asm/include/openssl/opensslv.h +5 -5
  160. package/include/node/openssl/archs/linux64-s390x/asm/crypto/buildinf.h +1 -1
  161. package/include/node/openssl/archs/linux64-s390x/asm/include/openssl/cmp.h +3 -1
  162. package/include/node/openssl/archs/linux64-s390x/asm/include/openssl/opensslv.h +5 -5
  163. package/include/node/openssl/archs/linux64-s390x/asm_avx2/crypto/buildinf.h +1 -1
  164. package/include/node/openssl/archs/linux64-s390x/asm_avx2/include/openssl/cmp.h +3 -1
  165. package/include/node/openssl/archs/linux64-s390x/asm_avx2/include/openssl/opensslv.h +5 -5
  166. package/include/node/openssl/archs/linux64-s390x/no-asm/crypto/buildinf.h +1 -1
  167. package/include/node/openssl/archs/linux64-s390x/no-asm/include/openssl/cmp.h +3 -1
  168. package/include/node/openssl/archs/linux64-s390x/no-asm/include/openssl/opensslv.h +5 -5
  169. package/include/node/openssl/archs/solaris-x86-gcc/asm/crypto/buildinf.h +1 -1
  170. package/include/node/openssl/archs/solaris-x86-gcc/asm/include/openssl/cmp.h +3 -1
  171. package/include/node/openssl/archs/solaris-x86-gcc/asm/include/openssl/opensslv.h +5 -5
  172. package/include/node/openssl/archs/solaris-x86-gcc/asm_avx2/crypto/buildinf.h +1 -1
  173. package/include/node/openssl/archs/solaris-x86-gcc/asm_avx2/include/openssl/cmp.h +3 -1
  174. package/include/node/openssl/archs/solaris-x86-gcc/asm_avx2/include/openssl/opensslv.h +5 -5
  175. package/include/node/openssl/archs/solaris-x86-gcc/no-asm/crypto/buildinf.h +1 -1
  176. package/include/node/openssl/archs/solaris-x86-gcc/no-asm/include/openssl/cmp.h +3 -1
  177. package/include/node/openssl/archs/solaris-x86-gcc/no-asm/include/openssl/opensslv.h +5 -5
  178. package/include/node/openssl/archs/solaris64-x86_64-gcc/asm/crypto/buildinf.h +1 -1
  179. package/include/node/openssl/archs/solaris64-x86_64-gcc/asm/include/openssl/cmp.h +3 -1
  180. package/include/node/openssl/archs/solaris64-x86_64-gcc/asm/include/openssl/opensslv.h +5 -5
  181. package/include/node/openssl/archs/solaris64-x86_64-gcc/asm_avx2/crypto/buildinf.h +1 -1
  182. package/include/node/openssl/archs/solaris64-x86_64-gcc/asm_avx2/include/openssl/cmp.h +3 -1
  183. package/include/node/openssl/archs/solaris64-x86_64-gcc/asm_avx2/include/openssl/opensslv.h +5 -5
  184. package/include/node/openssl/archs/solaris64-x86_64-gcc/no-asm/crypto/buildinf.h +1 -1
  185. package/include/node/openssl/archs/solaris64-x86_64-gcc/no-asm/include/openssl/cmp.h +3 -1
  186. package/include/node/openssl/archs/solaris64-x86_64-gcc/no-asm/include/openssl/opensslv.h +5 -5
  187. package/include/node/openssl/core_dispatch.h +17 -17
  188. package/include/node/openssl/httperr.h +2 -1
  189. package/include/node/openssl/macros.h +2 -1
  190. package/include/node/openssl/rsa.h +3 -3
  191. package/include/node/openssl/types.h +3 -1
  192. package/include/node/uv/unix.h +1 -4
  193. package/include/node/uv/version.h +2 -2
  194. package/include/node/uv/win.h +1 -1
  195. package/include/node/uv.h +12 -8
  196. package/include/node/v8-array-buffer.h +10 -0
  197. package/include/node/v8-callbacks.h +15 -6
  198. package/include/node/v8-context.h +79 -27
  199. package/include/node/v8-data.h +7 -1
  200. package/include/node/v8-debug.h +23 -3
  201. package/include/node/v8-exception.h +7 -4
  202. package/include/node/v8-extension.h +0 -2
  203. package/include/node/v8-external.h +40 -4
  204. package/include/node/v8-function-callback.h +172 -183
  205. package/include/node/v8-function.h +2 -2
  206. package/include/node/v8-initialization.h +29 -0
  207. package/include/node/v8-internal.h +149 -142
  208. package/include/node/v8-isolate.h +35 -22
  209. package/include/node/v8-local-handle.h +1 -1
  210. package/include/node/v8-memory-span.h +4 -59
  211. package/include/node/v8-message.h +0 -8
  212. package/include/node/v8-object.h +85 -92
  213. package/include/node/v8-persistent-handle.h +2 -9
  214. package/include/node/v8-platform.h +167 -58
  215. package/include/node/v8-primitive.h +5 -57
  216. package/include/node/v8-profiler.h +69 -3
  217. package/include/node/v8-promise.h +16 -5
  218. package/include/node/v8-sandbox.h +34 -53
  219. package/include/node/v8-script.h +27 -0
  220. package/include/node/v8-source-location.h +9 -8
  221. package/include/node/v8-statistics.h +8 -0
  222. package/include/node/v8-template.h +44 -122
  223. package/include/node/v8-version.h +3 -3
  224. package/include/node/v8-wasm.h +118 -21
  225. package/include/node/v8config.h +10 -8
  226. package/package.json +1 -1
  227. package/share/doc/node/gdbinit +79 -0
  228. package/share/doc/node/lldb_commands.py +6 -0
  229. package/share/man/man1/node.1 +60 -10
@@ -8,6 +8,7 @@
8
8
  #include <functional>
9
9
  #include <memory>
10
10
  #include <string>
11
+ #include <variant>
11
12
 
12
13
  #include "v8-internal.h" // NOLINT(build/include_directory)
13
14
  #include "v8-local-handle.h" // NOLINT(build/include_directory)
@@ -20,12 +21,9 @@ namespace v8 {
20
21
  class ArrayBuffer;
21
22
  class Promise;
22
23
 
23
- namespace internal {
24
- namespace wasm {
24
+ namespace internal::wasm {
25
25
  class NativeModule;
26
- class StreamingDecoder;
27
- } // namespace wasm
28
- } // namespace internal
26
+ } // namespace internal::wasm
29
27
 
30
28
  /**
31
29
  * An owned byte buffer with associated size.
@@ -38,8 +36,10 @@ struct OwnedBuffer {
38
36
  OwnedBuffer() = default;
39
37
  };
40
38
 
41
- // Wrapper around a compiled WebAssembly module, which is potentially shared by
42
- // different WasmModuleObjects.
39
+ /**
40
+ * Wrapper around a compiled WebAssembly module, which is potentially shared by
41
+ * different WasmModuleObjects.
42
+ */
43
43
  class V8_EXPORT CompiledWasmModule {
44
44
  public:
45
45
  /**
@@ -56,11 +56,12 @@ class V8_EXPORT CompiledWasmModule {
56
56
  const std::string& source_url() const { return source_url_; }
57
57
 
58
58
  private:
59
+ friend class WasmModuleCompilation;
59
60
  friend class WasmModuleObject;
60
61
  friend class WasmStreaming;
61
62
 
62
63
  explicit CompiledWasmModule(std::shared_ptr<internal::wasm::NativeModule>,
63
- const char* source_url, size_t url_length);
64
+ std::string source_url);
64
65
 
65
66
  const std::shared_ptr<internal::wasm::NativeModule> native_module_;
66
67
  const std::string source_url_;
@@ -134,6 +135,22 @@ class V8_EXPORT WasmStreaming final {
134
135
  internal::kWasmWasmStreamingTag;
135
136
  class WasmStreamingImpl;
136
137
 
138
+ class ModuleCachingInterface {
139
+ public:
140
+ // Get the full wire bytes, to check against the cached version.
141
+ virtual MemorySpan<const uint8_t> GetWireBytes() const = 0;
142
+ // Pass serialized (cached) compiled module bytes, to be deserialized and
143
+ // used as the result of this streaming compilation.
144
+ // The passed bytes will only be accessed inside this callback, i.e.
145
+ // lifetime can end after the call.
146
+ // The return value indicates whether V8 could use the passed bytes; {false}
147
+ // would be returned on e.g. version mismatch.
148
+ // This method can only be called once.
149
+ virtual bool SetCachedCompiledModuleBytes(MemorySpan<const uint8_t>) = 0;
150
+ };
151
+
152
+ using ModuleCachingCallback = std::function<void(ModuleCachingInterface&)>;
153
+
137
154
  explicit WasmStreaming(std::unique_ptr<WasmStreamingImpl> impl);
138
155
 
139
156
  ~WasmStreaming();
@@ -148,12 +165,12 @@ class V8_EXPORT WasmStreaming final {
148
165
  * {Finish} should be called after all received bytes where passed to
149
166
  * {OnBytesReceived} to tell V8 that there will be no more bytes. {Finish}
150
167
  * must not be called after {Abort} has been called already.
151
- * If {can_use_compiled_module} is true and {SetCompiledModuleBytes} was
152
- * previously called, the compiled module bytes can be used.
153
- * If {can_use_compiled_module} is false, the compiled module bytes previously
154
- * set by {SetCompiledModuleBytes} should not be used.
168
+ * If {SetHasCompiledModuleBytes()} was called before, a {caching_callback}
169
+ * can be passed which can inspect the full received wire bytes and set cached
170
+ * module bytes which will be deserialized then. This callback will happen
171
+ * synchronously within this call; the callback is not stored.
155
172
  */
156
- void Finish(bool can_use_compiled_module = true);
173
+ void Finish(const ModuleCachingCallback& caching_callback);
157
174
 
158
175
  /**
159
176
  * Abort streaming compilation. If {exception} has a value, then the promise
@@ -164,15 +181,14 @@ class V8_EXPORT WasmStreaming final {
164
181
  void Abort(MaybeLocal<Value> exception);
165
182
 
166
183
  /**
167
- * Passes previously compiled module bytes. This must be called before
168
- * {OnBytesReceived}, {Finish}, or {Abort}. Returns true if the module bytes
169
- * can be used, false otherwise. The buffer passed via {bytes} and {size}
170
- * is owned by the caller. If {SetCompiledModuleBytes} returns true, the
171
- * buffer must remain valid until either {Finish} or {Abort} completes.
172
- * The compiled module bytes should not be used until {Finish(true)} is
173
- * called, because they can be invalidated later by {Finish(false)}.
184
+ * Mark that the embedder has (potentially) cached compiled module bytes (i.e.
185
+ * a serialized {CompiledWasmModule}) that could match this streaming request.
186
+ * This will cause V8 to skip streaming compilation.
187
+ * The embedder should then pass a callback to the {Finish} method to pass the
188
+ * serialized bytes, after potentially checking their validity against the
189
+ * full received wire bytes.
174
190
  */
175
- bool SetCompiledModuleBytes(const uint8_t* bytes, size_t size);
191
+ void SetHasCompiledModuleBytes();
176
192
 
177
193
  /**
178
194
  * Sets a callback which is called whenever a significant number of new
@@ -199,6 +215,87 @@ class V8_EXPORT WasmStreaming final {
199
215
  std::unique_ptr<WasmStreamingImpl> impl_;
200
216
  };
201
217
 
218
+ /**
219
+ * An interface for asynchronous WebAssembly module compilation, to be used e.g.
220
+ * for implementing source phase imports.
221
+ * Note: This interface is experimental and can change or be removed without
222
+ * notice.
223
+ */
224
+ class V8_EXPORT WasmModuleCompilation final {
225
+ public:
226
+ using ModuleCachingCallback = WasmStreaming::ModuleCachingCallback;
227
+
228
+ /**
229
+ * Start an asynchronous module compilation. This can be called on any thread.
230
+ * TODO(clemensb): Add some way to pass enabled features.
231
+ * TODO(clemensb): Add some way to pass compile time imports.
232
+ */
233
+ WasmModuleCompilation();
234
+
235
+ ~WasmModuleCompilation();
236
+
237
+ WasmModuleCompilation(const WasmModuleCompilation&) = delete;
238
+ WasmModuleCompilation& operator=(const WasmModuleCompilation&) = delete;
239
+
240
+ /**
241
+ * Pass a new chunk of bytes to WebAssembly compilation.
242
+ * The buffer passed into {OnBytesReceived} is owned by the caller and will
243
+ * not be accessed any more after this call returns.
244
+ */
245
+ void OnBytesReceived(const uint8_t* bytes, size_t size);
246
+
247
+ /**
248
+ * {Finish} must be called on the main thread after all bytes were passed to
249
+ * {OnBytesReceived}.
250
+ * It eventually calls the provided callback to deliver the compiled module or
251
+ * an error. This callback will also be called in foreground, but not
252
+ * necessarily within this call.
253
+ * {Finish} must not be called after {Abort} has been called already.
254
+ * If {SetHasCompiledModuleBytes()} was called before, a {caching_callback}
255
+ * can be passed which can inspect the full received wire bytes and set cached
256
+ * module bytes which will be deserialized then. This callback will happen
257
+ * synchronously within this call; the callback is not stored.
258
+ */
259
+ void Finish(
260
+ Isolate*, const ModuleCachingCallback& caching_callback,
261
+ const std::function<void(
262
+ std::variant<Local<WasmModuleObject>, Local<Value>> module_or_error)>&
263
+ resolution_callback);
264
+
265
+ /**
266
+ * Abort compilation. This can be called from any thread.
267
+ * {Abort} must not be called repeatedly, or after {Finish}.
268
+ */
269
+ void Abort();
270
+
271
+ /**
272
+ * Mark that the embedder has (potentially) cached compiled module bytes (i.e.
273
+ * a serialized {CompiledWasmModule}) that could match this streaming request.
274
+ * This will cause V8 to skip streaming compilation.
275
+ * The embedder should then pass a callback to the {Finish} method to pass the
276
+ * serialized bytes, after potentially checking their validity against the
277
+ * full received wire bytes.
278
+ */
279
+ void SetHasCompiledModuleBytes();
280
+
281
+ /**
282
+ * Sets a callback which is called whenever a significant number of new
283
+ * functions are ready for serialization.
284
+ */
285
+ void SetMoreFunctionsCanBeSerializedCallback(
286
+ std::function<void(CompiledWasmModule)>);
287
+
288
+ /*
289
+ * Sets the UTF-8 encoded source URL for the {Script} object. This must be
290
+ * called before {Finish}.
291
+ */
292
+ void SetUrl(const char* url, size_t length);
293
+
294
+ private:
295
+ class Impl;
296
+ const std::unique_ptr<Impl> impl_;
297
+ };
298
+
202
299
  /**
203
300
  * The V8 interface for a WebAssembly memory map descriptor. This is an
204
301
  * experimental feature that may change and be removed without further
@@ -335,7 +335,6 @@ path. Add it with -I<path> to the command line
335
335
  // - [[no_unique_address]] supported
336
336
  // V8_HAS_CPP_ATTRIBUTE_LIFETIME_BOUND - [[clang::lifetimebound]] supported
337
337
  // V8_HAS_BUILTIN_ADD_OVERFLOW - __builtin_add_overflow() supported
338
- // V8_HAS_BUILTIN_BIT_CAST - __builtin_bit_cast() supported
339
338
  // V8_HAS_BUILTIN_BSWAP16 - __builtin_bswap16() supported
340
339
  // V8_HAS_BUILTIN_BSWAP32 - __builtin_bswap32() supported
341
340
  // V8_HAS_BUILTIN_BSWAP64 - __builtin_bswap64() supported
@@ -418,7 +417,6 @@ path. Add it with -I<path> to the command line
418
417
  # define V8_HAS_BUILTIN_ADD_OVERFLOW (__has_builtin(__builtin_add_overflow))
419
418
  # define V8_HAS_BUILTIN_ASSUME (__has_builtin(__builtin_assume))
420
419
  # define V8_HAS_BUILTIN_ASSUME_ALIGNED (__has_builtin(__builtin_assume_aligned))
421
- # define V8_HAS_BUILTIN_BIT_CAST (__has_builtin(__builtin_bit_cast))
422
420
  # define V8_HAS_BUILTIN_BSWAP16 (__has_builtin(__builtin_bswap16))
423
421
  # define V8_HAS_BUILTIN_BSWAP32 (__has_builtin(__builtin_bswap32))
424
422
  # define V8_HAS_BUILTIN_BSWAP64 (__has_builtin(__builtin_bswap64))
@@ -473,9 +471,6 @@ path. Add it with -I<path> to the command line
473
471
  // for V8_HAS_CPP_ATTRIBUTE_NODISCARD. See https://crbug.com/v8/11707.
474
472
 
475
473
  # define V8_HAS_BUILTIN_ASSUME_ALIGNED 1
476
- # if __GNUC__ >= 11
477
- # define V8_HAS_BUILTIN_BIT_CAST 1
478
- # endif
479
474
  # define V8_HAS_BUILTIN_CLZ 1
480
475
  # define V8_HAS_BUILTIN_CTZ 1
481
476
  # define V8_HAS_BUILTIN_EXPECT 1
@@ -546,9 +541,8 @@ path. Add it with -I<path> to the command line
546
541
  # define V8_ASSUME USE
547
542
  #endif
548
543
 
549
- // Prefer c++20 std::assume_aligned. Don't use it on MSVC though, because it's
550
- // not happy with our large 4GB alignment values.
551
- #if __cplusplus >= 202002L && defined(__cpp_lib_assume_aligned) && !V8_CC_MSVC
544
+ // Prefer c++20 std::assume_aligned.
545
+ #if __cplusplus >= 202002L && defined(__cpp_lib_assume_aligned)
552
546
  # define V8_ASSUME_ALIGNED(ptr, alignment) \
553
547
  std::assume_aligned<(alignment)>(ptr)
554
548
  #elif V8_HAS_BUILTIN_ASSUME_ALIGNED
@@ -1072,4 +1066,12 @@ arm64 host
1072
1066
  #define V8_TARGET_BIG_ENDIAN_BOOL false
1073
1067
  #endif
1074
1068
 
1069
+ // V8_USE_PERFETTO_SDK and V8_USE_PERFETTO_JSON_EXPORT must imply
1070
+ // V8_USE_PERFETTO.
1071
+ #if (defined(V8_USE_PERFETTO_SDK) || defined(V8_USE_PERFETTO_JSON_EXPORT)) && \
1072
+ !defined(V8_USE_PERFETTO)
1073
+ #error Inconsistent build configuration: To build the V8 with Perfetto \
1074
+ features, set V8_USE_PERFETTO as well.
1075
+ #endif
1076
+
1075
1077
  #endif // V8CONFIG_H_
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-bin-darwin-arm64",
3
- "version": "25.9.0",
3
+ "version": "26.1.0",
4
4
  "description": "node",
5
5
  "repository": {
6
6
  "url": "git+https://github.com/aredridel/node-bin-gen.git"
@@ -182,6 +182,15 @@ Print the current JavaScript stack trace
182
182
  Usage: jst
183
183
  end
184
184
 
185
+ # Print JavaScript stack trace in concise format
186
+ define jstc
187
+ call (void) _v8_internal_Print_StackTraceConcise()
188
+ end
189
+ document jstc
190
+ Print the current JavaScript stack trace in concise format
191
+ Usage: jstc
192
+ end
193
+
185
194
  # Print TurboFan graph node.
186
195
  define pn
187
196
  call _v8_internal_Node_Print((void*)($arg0))
@@ -733,3 +742,73 @@ def direct_handle_pretty_printers(val):
733
742
  gdb.pretty_printers.append(direct_handle_pretty_printers)
734
743
 
735
744
  end
745
+
746
+ python
747
+
748
+ # V8 JIT-compiled frame unwinder for x86-64.
749
+ # See https://sourceware.org/gdb/current/onlinedocs/gdb.html/Unwinding-Frames-in-Python.html
750
+
751
+ from gdb.unwinder import Unwinder, FrameId
752
+
753
+ class V8Unwinder(Unwinder):
754
+ """Unwinder for V8 JIT-compiled frames by following the RBP chain on x86-64."""
755
+
756
+ PTR_SIZE = 8 # x86-64
757
+
758
+ @staticmethod
759
+ def read_u64(addr):
760
+ """Return little-endian uint64 from inferior memory, or raise gdb.MemoryError."""
761
+ inferior = gdb.selected_inferior()
762
+ data = inferior.read_memory(addr, V8Unwinder.PTR_SIZE)
763
+ return int.from_bytes(data.tobytes(), byteorder="little", signed=False)
764
+
765
+ def __init__(self):
766
+ super(V8Unwinder, self).__init__("V8Unwinder")
767
+ self.enabled = True
768
+
769
+ def __call__(self, pending_frame):
770
+ try:
771
+ arch = pending_frame.architecture()
772
+ if arch.name() != "i386:x86-64":
773
+ return None # Don't use this unwinder if not on x86-64.
774
+ if pending_frame.name() is not None:
775
+ return None # gdb can already symbolicate this, likely not a JIT frame.
776
+
777
+ fp = int(pending_frame.read_register("rbp"))
778
+
779
+ if fp == 0 or (fp & 0x7) != 0: # Chain ends or misaligned.
780
+ return None
781
+
782
+ # Now we know we are likely in a V8 JIT-compiled frame.
783
+ # Stack layout:
784
+ # rbp+16 <-- caller's rsp before `call`
785
+ # rbp+8 [ return address (saved rip) ]
786
+ # rbp+0 [ saved rbp ] <-- current frame pointer
787
+ prev_rsp = fp + self.PTR_SIZE * 2
788
+ ret_addr = self.read_u64(fp + self.PTR_SIZE)
789
+ prev_rbp = self.read_u64(fp)
790
+
791
+ if ret_addr == 0 or prev_rbp == 0:
792
+ return None # Invalid frame.
793
+
794
+ # GDB needs a Frame ID to identify the frame.
795
+ # 1. A stack address that is stable across the lifetime of a frame.
796
+ # We use the previous frame's rsp.
797
+ # 2. A code address that is stable across the lifetime of a frame.
798
+ # Ideally, the function's start address. We don't have symbols here,
799
+ # so it's not easy to find out. Use the return address as an
800
+ # approximation.
801
+ # See https://sourceware.org/git/?p=binutils-gdb.git;a=blob;f=gdb/frame-id.h
802
+ frame_id = FrameId(prev_rsp, ret_addr)
803
+ unwind_info = pending_frame.create_unwind_info(frame_id)
804
+ unwind_info.add_saved_register("rsp", gdb.Value(prev_rsp))
805
+ unwind_info.add_saved_register("rip", gdb.Value(ret_addr))
806
+ unwind_info.add_saved_register("rbp", gdb.Value(prev_rbp))
807
+ return unwind_info
808
+
809
+ except Exception:
810
+ return None # Give up unwinding on errors.
811
+
812
+ gdb.unwinder.register_unwinder(None, V8Unwinder(), replace=True)
813
+
814
+ end
@@ -218,6 +218,12 @@ def jst(debugger, *args):
218
218
  no_arg_cmd(debugger, "_v8_internal_Print_StackTrace()")
219
219
 
220
220
 
221
+ @lldbCommand
222
+ def jstc(debugger, *args):
223
+ """Print the current JavaScript stack trace in a concise format"""
224
+ no_arg_cmd(debugger, "_v8_internal_Print_StackTraceConcise()")
225
+
226
+
221
227
  @lldbCommand
222
228
  def pn(debugger, param, *args):
223
229
  """Print a v8 TurboFan graph node"""
@@ -38,7 +38,7 @@
38
38
  .Op Ar arguments ...
39
39
  .
40
40
  .Nm node
41
- .Cm inspect,
41
+ .Cm inspect
42
42
  .Op Ar <program-entry-point> | Fl e Ar string | Ar <host>:<port>
43
43
  .Ar ...
44
44
  .
@@ -135,6 +135,27 @@ This behavior also applies to \fBchild_process.spawn()\fR, but in that case, the
135
135
  flags are propagated via the \fBNODE_OPTIONS\fR environment variable rather than
136
136
  directly through the process arguments.
137
137
  .
138
+ .It Fl -allow-ffi
139
+ When using the Permission Model, the process will not be able to use
140
+ \fBnode:ffi\fR by default.
141
+ Attempts to use FFI APIs will throw an \fBERR_ACCESS_DENIED\fR exception unless
142
+ the user explicitly passes the \fB--allow-ffi\fR flag when starting Node.js.
143
+ The \fBnode:ffi\fR module also requires the \fB--experimental-ffi\fR flag and
144
+ is only available in builds with FFI support.
145
+ Example:
146
+ .Bd -literal
147
+ const { DynamicLibrary } = require('node:ffi');
148
+ const lib = new DynamicLibrary('mylib.so');
149
+ .Ed
150
+ .Bd -literal
151
+ $ node --permission --experimental-ffi index.js
152
+ Error: Access to this API has been restricted. Use --allow-ffi to manage permissions.
153
+ at node:internal/main/run_main_module:17:47 {
154
+ code: 'ERR_ACCESS_DENIED',
155
+ permission: 'FFI'
156
+ }
157
+ .Ed
158
+ .
138
159
  .It Fl -allow-fs-read
139
160
  This flag configures file system read permissions using
140
161
  the Permission Model.
@@ -602,8 +623,12 @@ It is possible to run code containing inline types unless the
602
623
  .It Fl -experimental-addon-modules
603
624
  Enable experimental import support for \fB.node\fR addons.
604
625
  .
605
- .It Fl -experimental-config-file Ns = Ns Ar config
626
+ .It Fl -experimental-config-file= Ns Ar config , Fl -experimental-config-file , Fl -experimental-default-config-file
606
627
  If present, Node.js will look for a configuration file at the specified path.
628
+ If the path is not specified, Node.js will look for a \fBnode.config.json\fR file
629
+ in the current working directory.
630
+ To specify a custom path, use the \fB--experimental-config-file=\fR\fBpath\fR form.
631
+ The space-separated \fB--experimental-config-file path\fR form is not supported.
607
632
  Node.js will read the configuration file and apply the settings. The
608
633
  configuration file should be a JSON file with the following structure. \fBvX.Y.Z\fR
609
634
  in the \fB$schema\fR must be replaced with the version of Node.js you are using.
@@ -689,13 +714,18 @@ Node.js will not sanitize or perform validation on the user-provided configurati
689
714
  so \fBNEVER\fR use untrusted configuration files.
690
715
  .
691
716
  .It Fl -experimental-default-config-file
692
- If the \fB--experimental-default-config-file\fR flag is present, Node.js will look for a
717
+ This flag is an alias for \fB--experimental-config-file\fR without an argument.
718
+ If present, Node.js will look for a
693
719
  \fBnode.config.json\fR file in the current working directory and load it as a
694
- as configuration file.
720
+ configuration file.
695
721
  .
696
722
  .It Fl -experimental-eventsource
697
723
  Enable exposition of EventSource Web API on the global scope.
698
724
  .
725
+ .It Fl -experimental-ffi
726
+ Enable the experimental \fBnode:ffi\fR module.
727
+ This flag is only available in builds with FFI support.
728
+ .
699
729
  .It Fl -experimental-import-meta-resolve
700
730
  Enable experimental \fBimport.meta.resolve()\fR parent URL support, which allows
701
731
  passing a second \fBparentURL\fR argument for contextual resolution.
@@ -746,10 +776,6 @@ collecting code coverage from tests for more details.
746
776
  Enable module mocking in the test runner.
747
777
  This feature requires \fB--allow-worker\fR if used with the Permission Model.
748
778
  .
749
- .It Fl -experimental-transform-types
750
- Enables the transformation of TypeScript-only syntax into JavaScript code.
751
- Implies \fB--enable-source-maps\fR.
752
- .
753
779
  .It Fl -experimental-vm-modules
754
780
  Enable experimental ES Module support in the \fBnode:vm\fR module.
755
781
  .
@@ -1118,6 +1144,8 @@ Worker Threads - manageable through \fB--allow-worker\fR flag
1118
1144
  WASI - manageable through \fB--allow-wasi\fR flag
1119
1145
  .It
1120
1146
  Addons - manageable through \fB--allow-addons\fR flag
1147
+ .It
1148
+ FFI - manageable through \fB--allow-ffi\fR flag
1121
1149
  .El
1122
1150
  .
1123
1151
  .It Fl -permission-audit
@@ -1367,6 +1395,22 @@ tests must satisfy \fBboth\fR requirements in order to be executed.
1367
1395
  Configures the test runner to only execute top level tests that have the \fBonly\fR
1368
1396
  option set. This flag is not necessary when test isolation is disabled.
1369
1397
  .
1398
+ .It Fl -test-random-seed
1399
+ Set the seed used to randomize test execution order.
1400
+ This applies to both test file execution order and queued tests within each file.
1401
+ Providing this flag enables randomization implicitly, even without
1402
+ \fB--test-randomize\fR.
1403
+ The value must be an integer between 0 and 4294967295.
1404
+ This flag cannot be used with \fB--watch\fR or \fB--test-rerun-failures\fR.
1405
+ .
1406
+ .It Fl -test-randomize
1407
+ Randomize test execution order.
1408
+ This applies to both test file execution order and queued tests within each file.
1409
+ This can help detect tests that rely on shared state or execution order.
1410
+ The seed used for randomization is printed in the test summary and can be
1411
+ reused with \fB--test-random-seed\fR.
1412
+ This flag cannot be used with \fB--watch\fR or \fB--test-rerun-failures\fR.
1413
+ .
1370
1414
  .It Fl -test-reporter
1371
1415
  A test reporter to use when running tests. See the documentation on
1372
1416
  test reporters for more details.
@@ -1816,6 +1860,8 @@ one is included in the list below.
1816
1860
  .It
1817
1861
  \fB--allow-child-process\fR
1818
1862
  .It
1863
+ \fB--allow-ffi\fR
1864
+ .It
1819
1865
  \fB--allow-fs-read\fR
1820
1866
  .It
1821
1867
  \fB--allow-fs-write\fR
@@ -1866,6 +1912,8 @@ one is included in the list below.
1866
1912
  .It
1867
1913
  \fB--experimental-eventsource\fR
1868
1914
  .It
1915
+ \fB--experimental-ffi\fR
1916
+ .It
1869
1917
  \fB--experimental-import-meta-resolve\fR
1870
1918
  .It
1871
1919
  \fB--experimental-json-modules\fR
@@ -1888,8 +1936,6 @@ one is included in the list below.
1888
1936
  .It
1889
1937
  \fB--experimental-top-level-await\fR
1890
1938
  .It
1891
- \fB--experimental-transform-types\fR
1892
- .It
1893
1939
  \fB--experimental-vm-modules\fR
1894
1940
  .It
1895
1941
  \fB--experimental-wasi-unstable-preview1\fR
@@ -2046,6 +2092,10 @@ one is included in the list below.
2046
2092
  .It
2047
2093
  \fB--test-reporter-destination\fR
2048
2094
  .It
2095
+ \fB--test-randomize\fR
2096
+ .It
2097
+ \fB--test-random-seed\fR
2098
+ .It
2049
2099
  \fB--test-reporter\fR
2050
2100
  .It
2051
2101
  \fB--test-rerun-failures\fR