visaljs 0.0.6 → 0.0.8

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 (428) hide show
  1. package/README.md +63 -2
  2. package/THIRD_PARTY_LICENSES +1216 -0
  3. package/cli.js +4414 -325
  4. package/node/include/js_node.h +57 -1
  5. package/node/include/js_uv.h +8 -1
  6. package/node/prelude/_stream_duplex.js +4 -0
  7. package/node/prelude/_stream_passthrough.js +4 -0
  8. package/node/prelude/_stream_readable.js +4 -0
  9. package/node/prelude/_stream_transform.js +4 -0
  10. package/node/prelude/_stream_writable.js +4 -0
  11. package/node/prelude/assert.js +1334 -0
  12. package/node/prelude/assert_strict.js +12 -0
  13. package/node/prelude/async_hooks.js +1 -1
  14. package/node/prelude/buffer.js +43 -3
  15. package/node/prelude/child_process.js +1098 -0
  16. package/node/prelude/cluster.js +52 -0
  17. package/node/prelude/console.js +328 -0
  18. package/node/prelude/constants.js +10 -0
  19. package/node/prelude/crypto.js +1 -1
  20. package/node/prelude/diagnostics_channel.js +1 -1
  21. package/node/prelude/dns.js +1 -1
  22. package/node/prelude/domain.js +115 -0
  23. package/node/prelude/events.js +144 -16
  24. package/node/prelude/fs.js +1138 -151
  25. package/node/prelude/fs_promises.js +117 -11
  26. package/node/prelude/http.js +104 -27
  27. package/node/prelude/http2.js +1 -1
  28. package/node/prelude/https.js +148 -0
  29. package/node/prelude/inspector.js +27 -0
  30. package/node/prelude/inspector_promises.js +4 -0
  31. package/node/prelude/internal/async_context.js +1 -1
  32. package/node/prelude/internal/buffer_transcode.js +44 -0
  33. package/node/prelude/internal/comparisons.js +916 -0
  34. package/node/prelude/internal/compression_streams.js +153 -0
  35. package/node/prelude/internal/crypto/asym.js +27 -14
  36. package/node/prelude/internal/crypto/cipher.js +16 -5
  37. package/node/prelude/internal/crypto/diffiehellman.js +3 -2
  38. package/node/prelude/internal/crypto/hash.js +2 -1
  39. package/node/prelude/internal/crypto/kdf.js +14 -9
  40. package/node/prelude/internal/crypto/keys.js +63 -50
  41. package/node/prelude/internal/crypto/random.js +2 -1
  42. package/node/prelude/internal/crypto/util.js +4 -4
  43. package/node/prelude/internal/dotenv.js +98 -0
  44. package/node/prelude/internal/errors.js +21 -5
  45. package/node/prelude/internal/events_extras.js +116 -0
  46. package/node/prelude/internal/events_on.js +100 -0
  47. package/node/prelude/internal/features.js +55 -0
  48. package/node/prelude/internal/fetch.js +364 -0
  49. package/node/prelude/internal/form_data.js +376 -0
  50. package/node/prelude/internal/fs_bigint_stats.js +41 -0
  51. package/node/prelude/internal/fs_blob.js +19 -0
  52. package/node/prelude/internal/fs_cp.js +709 -0
  53. package/node/prelude/internal/fs_dir.js +166 -0
  54. package/node/prelude/internal/fs_filehandle.js +287 -0
  55. package/node/prelude/internal/fs_glob.js +296 -0
  56. package/node/prelude/internal/fs_statfs.js +42 -0
  57. package/node/prelude/internal/fs_stats.js +89 -0
  58. package/node/prelude/internal/fs_streams.js +541 -0
  59. package/node/prelude/internal/fs_utils.js +286 -0
  60. package/node/prelude/internal/fs_watch.js +580 -0
  61. package/node/prelude/internal/http_agent.js +26 -0
  62. package/node/prelude/internal/mime.js +249 -0
  63. package/node/prelude/internal/net.js +1 -0
  64. package/node/prelude/internal/parse_args.js +288 -0
  65. package/node/prelude/internal/perf_histogram.js +435 -0
  66. package/node/prelude/internal/perf_observe.js +119 -0
  67. package/node/prelude/internal/performance_global.js +19 -0
  68. package/node/prelude/internal/process_events.js +49 -1
  69. package/node/prelude/internal/process_memory.js +14 -0
  70. package/node/prelude/internal/process_more.js +414 -0
  71. package/node/prelude/internal/process_signals.js +2 -1
  72. package/node/prelude/internal/process_stdin.js +52 -0
  73. package/node/prelude/internal/process_stdio.js +36 -0
  74. package/node/prelude/internal/querystring.js +0 -0
  75. package/node/prelude/internal/readline.js +338 -0
  76. package/node/prelude/internal/socketaddress.js +8 -4
  77. package/node/prelude/internal/source_map.js +122 -0
  78. package/node/prelude/internal/stream_compose.js +74 -0
  79. package/node/prelude/internal/stream_from.js +6 -0
  80. package/node/prelude/internal/stream_operators.js +23 -0
  81. package/node/prelude/internal/stream_pipeline.js +7 -0
  82. package/node/prelude/internal/stream_transform.js +10 -0
  83. package/node/prelude/internal/stream_web_adapters.js +143 -0
  84. package/node/prelude/internal/streams/add_abort_signal.js +58 -0
  85. package/node/prelude/internal/streams/compose.js +244 -0
  86. package/node/prelude/internal/streams/destroy.js +358 -0
  87. package/node/prelude/internal/streams/duplex.js +199 -0
  88. package/node/prelude/internal/streams/duplexify.js +378 -0
  89. package/node/prelude/internal/streams/end_of_stream.js +387 -0
  90. package/node/prelude/internal/streams/errors.js +216 -0
  91. package/node/prelude/internal/streams/from.js +211 -0
  92. package/node/prelude/internal/streams/legacy.js +120 -0
  93. package/node/prelude/internal/streams/operators.js +375 -0
  94. package/node/prelude/internal/streams/passthrough.js +45 -0
  95. package/node/prelude/internal/streams/pipeline.js +468 -0
  96. package/node/prelude/internal/streams/readable.js +1835 -0
  97. package/node/prelude/internal/streams/state.js +48 -0
  98. package/node/prelude/internal/streams/transform.js +203 -0
  99. package/node/prelude/internal/streams/utils.js +355 -0
  100. package/node/prelude/internal/streams/validators.js +108 -0
  101. package/node/prelude/internal/streams/writable.js +1160 -0
  102. package/node/prelude/internal/structured_clone.js +238 -0
  103. package/node/prelude/internal/system_errors.js +37 -0
  104. package/node/prelude/internal/test_runner/mock.js +431 -0
  105. package/node/prelude/internal/test_runner/reporters.js +404 -0
  106. package/node/prelude/internal/test_runner/test.js +1571 -0
  107. package/node/prelude/internal/timers.js +38 -7
  108. package/node/prelude/internal/timers_global.js +1 -1
  109. package/node/prelude/internal/tls/common.js +8 -2
  110. package/node/prelude/internal/tls/wrap.js +3 -15
  111. package/node/prelude/internal/tls/x509.js +1 -1
  112. package/node/prelude/internal/tty_read_stream.js +39 -0
  113. package/node/prelude/internal/tty_streams.js +3 -0
  114. package/node/prelude/internal/util_debuglog.js +68 -0
  115. package/node/prelude/internal/util_diff.js +63 -0
  116. package/node/prelude/internal/util_more.js +111 -0
  117. package/node/prelude/internal/util_styles.js +76 -0
  118. package/node/prelude/internal/zlib_engines.js +1 -1
  119. package/node/prelude/module.js +194 -7
  120. package/node/prelude/net.js +2 -1
  121. package/node/prelude/os.js +88 -11
  122. package/node/prelude/path.js +11 -7
  123. package/node/prelude/path_posix.js +1 -1
  124. package/node/prelude/path_win32.js +1 -1
  125. package/node/prelude/perf_hooks.js +147 -0
  126. package/node/prelude/process.js +36 -1
  127. package/node/prelude/punycode.js +188 -0
  128. package/node/prelude/querystring.js +1 -1
  129. package/node/prelude/readline.js +8 -0
  130. package/node/prelude/readline_promises.js +88 -0
  131. package/node/prelude/repl.js +38 -0
  132. package/node/prelude/sea.js +23 -0
  133. package/node/prelude/stream.js +70 -1332
  134. package/node/prelude/stream_consumers.js +34 -0
  135. package/node/prelude/stream_promises.js +1 -1
  136. package/node/prelude/stream_web.js +15 -2
  137. package/node/prelude/string_decoder.js +1 -1
  138. package/node/prelude/sys.js +7 -0
  139. package/node/prelude/test.js +56 -0
  140. package/node/prelude/test_reporters.js +269 -0
  141. package/node/prelude/timers.js +7 -84
  142. package/node/prelude/timers_promises.js +1 -1
  143. package/node/prelude/tls.js +2 -1
  144. package/node/prelude/trace_events.js +52 -0
  145. package/node/prelude/tty.js +10 -4
  146. package/node/prelude/url.js +88 -27
  147. package/node/prelude/util.js +121 -5
  148. package/node/prelude/util_types.js +4 -3
  149. package/node/prelude/v8.js +814 -0
  150. package/node/prelude/vm.js +86 -0
  151. package/node/prelude/wasi.js +10 -0
  152. package/node/prelude/worker_threads.js +56 -0
  153. package/node/prelude/zlib.js +58 -25
  154. package/node/src/host_brotli.c +59 -11
  155. package/node/src/host_fs.c +342 -11
  156. package/node/src/host_fswatch.c +170 -0
  157. package/node/src/host_http.c +143 -20
  158. package/node/src/host_loop.c +25 -2
  159. package/node/src/host_net.c +55 -7
  160. package/node/src/host_os.c +55 -1
  161. package/node/src/host_proc.c +291 -0
  162. package/node/src/host_process.c +488 -0
  163. package/node/src/host_sys.c +64 -2
  164. package/node/src/host_zlib.c +27 -7
  165. package/node/src/host_zstd.c +41 -6
  166. package/node/third_party/hdrhistogram/LICENSE +42 -0
  167. package/node/third_party/hdrhistogram/README.md +5 -0
  168. package/node/third_party/libuv/LICENSE +0 -0
  169. package/node/third_party/libuv/LICENSE-extra +36 -0
  170. package/node/third_party/libuv/include/uv/aix.h +0 -0
  171. package/node/third_party/libuv/include/uv/bsd.h +0 -0
  172. package/node/third_party/libuv/include/uv/darwin.h +0 -0
  173. package/node/third_party/libuv/include/uv/errno.h +0 -0
  174. package/node/third_party/libuv/include/uv/linux.h +0 -0
  175. package/node/third_party/libuv/include/uv/os390.h +0 -0
  176. package/node/third_party/libuv/include/uv/posix.h +0 -0
  177. package/node/third_party/libuv/include/uv/sunos.h +0 -0
  178. package/node/third_party/libuv/include/uv/threadpool.h +0 -0
  179. package/node/third_party/libuv/include/uv/tree.h +0 -0
  180. package/node/third_party/libuv/include/uv/unix.h +0 -0
  181. package/node/third_party/libuv/include/uv/version.h +0 -0
  182. package/node/third_party/libuv/include/uv/win.h +0 -0
  183. package/node/third_party/libuv/include/uv.h +0 -0
  184. package/node/third_party/libuv/src/fs-poll.c +0 -0
  185. package/node/third_party/libuv/src/heap-inl.h +0 -0
  186. package/node/third_party/libuv/src/idna.c +0 -0
  187. package/node/third_party/libuv/src/idna.h +0 -0
  188. package/node/third_party/libuv/src/inet.c +0 -0
  189. package/node/third_party/libuv/src/queue.h +0 -0
  190. package/node/third_party/libuv/src/random.c +0 -0
  191. package/node/third_party/libuv/src/strscpy.c +0 -0
  192. package/node/third_party/libuv/src/strscpy.h +0 -0
  193. package/node/third_party/libuv/src/strtok.c +0 -0
  194. package/node/third_party/libuv/src/strtok.h +0 -0
  195. package/node/third_party/libuv/src/thread-common.c +0 -0
  196. package/node/third_party/libuv/src/threadpool.c +0 -0
  197. package/node/third_party/libuv/src/timer.c +0 -0
  198. package/node/third_party/libuv/src/unix/async.c +0 -0
  199. package/node/third_party/libuv/src/unix/bsd-ifaddrs.c +0 -0
  200. package/node/third_party/libuv/src/unix/core.c +0 -0
  201. package/node/third_party/libuv/src/unix/darwin-proctitle.c +0 -0
  202. package/node/third_party/libuv/src/unix/darwin-stub.h +0 -0
  203. package/node/third_party/libuv/src/unix/darwin-syscalls.h +0 -0
  204. package/node/third_party/libuv/src/unix/darwin.c +0 -0
  205. package/node/third_party/libuv/src/unix/dl.c +0 -0
  206. package/node/third_party/libuv/src/unix/fs.c +0 -0
  207. package/node/third_party/libuv/src/unix/fsevents.c +0 -0
  208. package/node/third_party/libuv/src/unix/getaddrinfo.c +0 -0
  209. package/node/third_party/libuv/src/unix/getnameinfo.c +0 -0
  210. package/node/third_party/libuv/src/unix/internal.h +0 -0
  211. package/node/third_party/libuv/src/unix/kqueue.c +0 -0
  212. package/node/third_party/libuv/src/unix/linux.c +0 -0
  213. package/node/third_party/libuv/src/unix/loop-watcher.c +0 -0
  214. package/node/third_party/libuv/src/unix/loop.c +0 -0
  215. package/node/third_party/libuv/src/unix/pipe.c +0 -0
  216. package/node/third_party/libuv/src/unix/poll.c +0 -0
  217. package/node/third_party/libuv/src/unix/process.c +0 -0
  218. package/node/third_party/libuv/src/unix/procfs-exepath.c +0 -0
  219. package/node/third_party/libuv/src/unix/proctitle.c +0 -0
  220. package/node/third_party/libuv/src/unix/random-devurandom.c +0 -0
  221. package/node/third_party/libuv/src/unix/random-getentropy.c +0 -0
  222. package/node/third_party/libuv/src/unix/random-getrandom.c +0 -0
  223. package/node/third_party/libuv/src/unix/random-sysctl-linux.c +0 -0
  224. package/node/third_party/libuv/src/unix/signal.c +0 -0
  225. package/node/third_party/libuv/src/unix/stream.c +0 -0
  226. package/node/third_party/libuv/src/unix/tcp.c +0 -0
  227. package/node/third_party/libuv/src/unix/thread.c +0 -0
  228. package/node/third_party/libuv/src/unix/tty.c +0 -0
  229. package/node/third_party/libuv/src/unix/udp.c +0 -0
  230. package/node/third_party/libuv/src/uv-common.c +0 -0
  231. package/node/third_party/libuv/src/uv-common.h +0 -0
  232. package/node/third_party/libuv/src/uv-data-getter-setters.c +0 -0
  233. package/node/third_party/libuv/src/version.c +0 -0
  234. package/node/third_party/llhttp/LICENSE +0 -0
  235. package/node/third_party/llhttp/api.c +0 -0
  236. package/node/third_party/llhttp/http.c +0 -0
  237. package/node/third_party/llhttp/llhttp.c +0 -0
  238. package/node/third_party/llhttp/llhttp.h +0 -0
  239. package/node/third_party/nodejs/LICENSE +47 -0
  240. package/node/third_party/nodejs/README.md +5 -0
  241. package/node/third_party/parseargs/LICENSE +21 -0
  242. package/node/third_party/parseargs/README.md +5 -0
  243. package/node/third_party/punycode/LICENSE +20 -0
  244. package/node/third_party/punycode/README.md +5 -0
  245. package/node/third_party/zlib/LICENSE.chromium +27 -0
  246. package/package.json +1 -5
  247. package/prebuilt/darwin-arm64/boringssl-4a47438eaf7e73ba.a +0 -0
  248. package/prebuilt/darwin-arm64/brotli-7995bbdacc52e51c.a +0 -0
  249. package/prebuilt/darwin-arm64/uv-72ab666eae197cd8.a +0 -0
  250. package/prebuilt/darwin-arm64/zlib-4ce2317a4c3f5fb5.a +0 -0
  251. package/prebuilt/darwin-arm64/zstd-015315ac7c784c73.a +0 -0
  252. package/prebuilt/darwin-x64/boringssl-4a47438eaf7e73ba.a +0 -0
  253. package/prebuilt/darwin-x64/brotli-7995bbdacc52e51c.a +0 -0
  254. package/prebuilt/darwin-x64/uv-72ab666eae197cd8.a +0 -0
  255. package/prebuilt/darwin-x64/zlib-4ce2317a4c3f5fb5.a +0 -0
  256. package/prebuilt/darwin-x64/zstd-015315ac7c784c73.a +0 -0
  257. package/prebuilt/linux-arm64/boringssl-4a47438eaf7e73ba.a +0 -0
  258. package/prebuilt/linux-arm64/brotli-65481ff838ce9def.a +0 -0
  259. package/prebuilt/linux-arm64/uv-f1353f50ff983f3c.a +0 -0
  260. package/prebuilt/linux-arm64/zlib-4ce2317a4c3f5fb5.a +0 -0
  261. package/prebuilt/linux-arm64/zstd-015315ac7c784c73.a +0 -0
  262. package/prebuilt/linux-arm64-musl/boringssl-4a47438eaf7e73ba.a +0 -0
  263. package/prebuilt/linux-arm64-musl/brotli-65481ff838ce9def.a +0 -0
  264. package/prebuilt/linux-arm64-musl/uv-f1353f50ff983f3c.a +0 -0
  265. package/prebuilt/linux-arm64-musl/zlib-4ce2317a4c3f5fb5.a +0 -0
  266. package/prebuilt/linux-arm64-musl/zstd-015315ac7c784c73.a +0 -0
  267. package/prebuilt/linux-x64/boringssl-4a47438eaf7e73ba.a +0 -0
  268. package/prebuilt/linux-x64/brotli-65481ff838ce9def.a +0 -0
  269. package/prebuilt/linux-x64/uv-f1353f50ff983f3c.a +0 -0
  270. package/prebuilt/linux-x64/zlib-4ce2317a4c3f5fb5.a +0 -0
  271. package/prebuilt/linux-x64/zstd-015315ac7c784c73.a +0 -0
  272. package/prebuilt/linux-x64-musl/boringssl-4a47438eaf7e73ba.a +0 -0
  273. package/prebuilt/linux-x64-musl/brotli-65481ff838ce9def.a +0 -0
  274. package/prebuilt/linux-x64-musl/uv-f1353f50ff983f3c.a +0 -0
  275. package/prebuilt/linux-x64-musl/zlib-4ce2317a4c3f5fb5.a +0 -0
  276. package/prebuilt/linux-x64-musl/zstd-015315ac7c784c73.a +0 -0
  277. package/prebuilt/win32-x64/boringssl-ce573858472b7fc9.a +0 -0
  278. package/prebuilt/win32-x64/brotli-20d86a61f30baeb3.a +0 -0
  279. package/prebuilt/win32-x64/uv-b11bae65d7fced82.a +0 -0
  280. package/prebuilt/win32-x64/zlib-4ce2317a4c3f5fb5.a +0 -0
  281. package/prebuilt/win32-x64/zstd-015315ac7c784c73.a +0 -0
  282. package/runtime/include/js_atoms.gen.h +0 -0
  283. package/runtime/include/js_atoms.h +1 -1
  284. package/runtime/include/js_bigint.h +1 -1
  285. package/runtime/include/js_buffer.h +4 -4
  286. package/runtime/include/js_builtins.h +41 -3
  287. package/runtime/include/js_console.h +9 -4
  288. package/runtime/include/js_convert.h +1 -1
  289. package/runtime/include/js_core.def +5 -4
  290. package/runtime/include/js_crypto.h +1 -1
  291. package/runtime/include/js_error.h +1 -1
  292. package/runtime/include/js_exception.h +21 -1
  293. package/runtime/include/js_function.h +33 -9
  294. package/runtime/include/js_gc.h +172 -30
  295. package/runtime/include/js_generator.h +2 -2
  296. package/runtime/include/js_host.h +19 -1
  297. package/runtime/include/js_jobs.h +5 -5
  298. package/runtime/include/js_module.h +1 -1
  299. package/runtime/include/js_object.h +142 -15
  300. package/runtime/include/js_ops.h +107 -5
  301. package/runtime/include/js_promise.h +3 -3
  302. package/runtime/include/js_regexp.h +1 -1
  303. package/runtime/include/js_runtime.h +0 -0
  304. package/runtime/include/js_symbol.h +1 -1
  305. package/runtime/include/js_web.h +2 -1
  306. package/runtime/include/jscell.h +22 -15
  307. package/runtime/include/jscontext.h +74 -39
  308. package/runtime/include/jsnum.h +1 -1
  309. package/runtime/include/jsstring.h +19 -6
  310. package/runtime/include/jsvalue.h +7 -3
  311. package/runtime/src/arguments.c +2 -2
  312. package/runtime/src/array.c +4 -1
  313. package/runtime/src/arraybuffer.c +19 -7
  314. package/runtime/src/async_iter.c +4 -3
  315. package/runtime/src/atoms.c +1 -1
  316. package/runtime/src/base64.c +2 -2
  317. package/runtime/src/bigint.c +1 -1
  318. package/runtime/src/blob.c +22 -9
  319. package/runtime/src/boringssl_support.cc +1 -1
  320. package/runtime/src/buffer.c +299 -91
  321. package/runtime/src/builtin_table.c +1 -1
  322. package/runtime/src/builtins.c +30 -4
  323. package/runtime/src/builtins_util.h +0 -0
  324. package/runtime/src/collections.c +18 -3
  325. package/runtime/src/components.c +1 -1
  326. package/runtime/src/console.c +14 -7
  327. package/runtime/src/convert.c +0 -0
  328. package/runtime/src/core_all.c +1 -1
  329. package/runtime/src/crypto.c +1 -1
  330. package/runtime/src/crypto_asym.c +1 -1
  331. package/runtime/src/crypto_bn.c +1 -1
  332. package/runtime/src/crypto_cipher.c +10 -3
  333. package/runtime/src/crypto_hash.c +1 -1
  334. package/runtime/src/crypto_host.c +1 -1
  335. package/runtime/src/crypto_internal.h +1 -1
  336. package/runtime/src/crypto_kdf.c +1 -1
  337. package/runtime/src/crypto_key.c +14 -1
  338. package/runtime/src/crypto_pkey.c +1 -1
  339. package/runtime/src/crypto_subtle.c +142 -58
  340. package/runtime/src/crypto_tls.c +1 -1
  341. package/runtime/src/date.c +5 -2
  342. package/runtime/src/domexception.c +2 -2
  343. package/runtime/src/elements.c +56 -17
  344. package/runtime/src/elements.h +7 -2
  345. package/runtime/src/encoding.c +1 -1
  346. package/runtime/src/error.c +4 -4
  347. package/runtime/src/events.c +23 -14
  348. package/runtime/src/exception.c +1 -1
  349. package/runtime/src/fetch.c +241 -17
  350. package/runtime/src/function.c +31 -19
  351. package/runtime/src/gc.c +1716 -207
  352. package/runtime/src/gc_visit.h +87 -0
  353. package/runtime/src/generator.c +5 -3
  354. package/runtime/src/global.c +14 -6
  355. package/runtime/src/headers.c +10 -10
  356. package/runtime/src/inspect.c +76 -17
  357. package/runtime/src/internal.h +5 -2
  358. package/runtime/src/iterate.c +94 -2
  359. package/runtime/src/iterator.c +1 -1
  360. package/runtime/src/jobs.c +11 -5
  361. package/runtime/src/jsnum.c +2 -2
  362. package/runtime/src/json.c +1 -1
  363. package/runtime/src/math.c +9 -1
  364. package/runtime/src/module.c +3 -3
  365. package/runtime/src/number.c +0 -0
  366. package/runtime/src/object.c +107 -74
  367. package/runtime/src/ops.c +21 -3
  368. package/runtime/src/os.c +192 -1
  369. package/runtime/src/os.h +33 -2
  370. package/runtime/src/process.c +73 -8
  371. package/runtime/src/promise.c +4 -4
  372. package/runtime/src/proxy.c +1 -1
  373. package/runtime/src/reflect.c +1 -1
  374. package/runtime/src/regexp.c +134 -2
  375. package/runtime/src/regexp_anchor.h +1 -1
  376. package/runtime/src/regexp_message.h +1 -1
  377. package/runtime/src/shape.c +10 -19
  378. package/runtime/src/shape.h +0 -0
  379. package/runtime/src/streams.c +22 -8
  380. package/runtime/src/streams.h +0 -0
  381. package/runtime/src/string.c +64 -25
  382. package/runtime/src/string_builtins.c +7 -7
  383. package/runtime/src/symbol.c +2 -7
  384. package/runtime/src/test_host.c +3 -3
  385. package/runtime/src/tls_roots.gen.h +102 -620
  386. package/runtime/src/typedarray.c +8 -3
  387. package/runtime/src/tznames.gen.h +2 -1
  388. package/runtime/src/uri.c +1 -1
  389. package/runtime/src/url.c +42 -39
  390. package/runtime/src/weak.c +15 -12
  391. package/runtime/src/web.c +21 -3
  392. package/runtime/src/wrapper.c +0 -0
  393. package/runtime/src/writable.c +7 -6
  394. package/runtime/third_party/ada-idna/LICENSE-MIT +0 -0
  395. package/runtime/third_party/ada-idna/README.md +7 -7
  396. package/runtime/third_party/ada-idna/convert.mjs +89 -27
  397. package/runtime/third_party/ada-idna/idna.c +30 -31
  398. package/runtime/third_party/ada-idna/idna.h +0 -0
  399. package/runtime/third_party/ada-idna/idna_tables.h +2272 -1952
  400. package/runtime/third_party/boringssl/third_party/fiat/LICENSE +15 -0
  401. package/runtime/third_party/mozilla-ca/LICENSE +373 -0
  402. package/runtime/third_party/mozilla-ca/README.md +9 -0
  403. package/runtime/third_party/nodejs/LICENSE +47 -0
  404. package/runtime/third_party/nodejs/README.md +7 -0
  405. package/runtime/third_party/quickjs-dtoa/LICENSE +0 -0
  406. package/runtime/third_party/quickjs-dtoa/README.md +1 -1
  407. package/runtime/third_party/quickjs-dtoa/dtoa.c +0 -0
  408. package/runtime/third_party/quickjs-dtoa/dtoa.h +0 -0
  409. package/runtime/third_party/quickjs-dtoa/dtoa_compat.h +0 -0
  410. package/runtime/third_party/quickjs-regexp/LICENSE +0 -0
  411. package/runtime/third_party/quickjs-regexp/README.md +2 -2
  412. package/runtime/third_party/quickjs-regexp/cutils.c +0 -0
  413. package/runtime/third_party/quickjs-regexp/cutils.h +0 -0
  414. package/runtime/third_party/quickjs-regexp/libregexp-opcode.h +0 -0
  415. package/runtime/third_party/quickjs-regexp/libregexp.c +0 -0
  416. package/runtime/third_party/quickjs-regexp/libregexp.h +0 -0
  417. package/runtime/third_party/quickjs-regexp/libunicode-table.h +0 -0
  418. package/runtime/third_party/quickjs-regexp/libunicode.c +0 -0
  419. package/runtime/third_party/quickjs-regexp/libunicode.h +0 -0
  420. package/runtime/third_party/unicode/LICENSE +39 -0
  421. package/runtime/third_party/unicode/README.md +9 -0
  422. package/runtime/third_party/v8-ieee754/LICENSE +0 -0
  423. package/runtime/third_party/v8-ieee754/LICENSE.fdlibm +10 -0
  424. package/runtime/third_party/v8-ieee754/README.md +3 -2
  425. package/runtime/third_party/v8-ieee754/convert.py +0 -0
  426. package/runtime/third_party/v8-ieee754/ieee754.c +0 -0
  427. package/runtime/third_party/v8-ieee754/ieee754.h +0 -0
  428. package/runtime/tools/regexp_compile.c +2 -2
@@ -1,4 +1,4 @@
1
- /* Shapes (ADR 0005): hidden classes, their transition tree and lookup tables. */
1
+ /* Shapes: hidden classes, their transition tree and lookup tables. */
2
2
  #include <stdlib.h>
3
3
  #include <string.h>
4
4
 
@@ -63,7 +63,7 @@ void js_prop_table_add(JSPropTable *t, JSValue key, uint32_t slot, uint8_t attrs
63
63
  reindex(t);
64
64
  }
65
65
  uint32_t i = t->count++;
66
- t->entries[i] = (JSPropEntry){ key, slot, attrs };
66
+ t->entries[i] = (JSPropEntry){ key, slot, attrs }; /* barrier: the caller's, on the shape */
67
67
  uint32_t h = key_hash(key) & (t->index_cap - 1);
68
68
  while (t->index[h] >= 0) h = (h + 1) & (t->index_cap - 1);
69
69
  t->index[h] = (int32_t)i;
@@ -84,17 +84,6 @@ JSPropTable *js_prop_table_clone(const JSPropTable *src) {
84
84
 
85
85
  /* ---- Shape cells ---------------------------------------------------------- */
86
86
 
87
- static void shape_visit(JSCell *c, JSTracer *trc) {
88
- JSShape *s = (JSShape *)c;
89
- js_trace_value(trc, s->proto);
90
- js_trace_value(trc, s->key);
91
- if (s->parent) js_trace_cell(trc, &s->parent->cell);
92
- /* a dictionary's keys exist only in its table; a shared table's keys are on the chain */
93
- if (s->table && (s->flags & JS_SHAPE_DICTIONARY))
94
- for (uint32_t i = 0; i < s->table->count; i++) js_trace_value(trc, s->table->entries[i].key);
95
- /* transitions are weak: children aren't traced (js_shapes_sweep) */
96
- }
97
-
98
87
  static void shape_finalize(JSRuntime *rt, JSCell *c) {
99
88
  (void)rt;
100
89
  JSShape *s = (JSShape *)c;
@@ -105,14 +94,15 @@ static void shape_finalize(JSRuntime *rt, JSCell *c) {
105
94
  }
106
95
  }
107
96
 
108
- const JSCellClass js_shape_cell_class = { "Shape", shape_visit, shape_finalize };
97
+ const JSCellClass js_shape_cell_class = { "Shape", NULL, shape_finalize, NULL } /* gc_visit.h visits it */;
109
98
 
110
99
  JSShape *js_alloc_shape(JSContext *ctx) {
111
100
  JSShape *s = (JSShape *)js_alloc_cell(ctx, JS_CELL_SHAPE, sizeof(JSShape));
112
101
  s->cell.flags |= JS_CELL_FINALIZABLE; /* tables and transitions are malloc'd */
113
102
  js_block_of(s)->has_finalizable = 1;
114
- s->proto = JS_NULL;
103
+ s->proto = JS_NULL; /* barrier: fresh cell */
115
104
  s->key = JS_EMPTY;
105
+ s->enum_keys = JS_EMPTY;
116
106
  return s;
117
107
  }
118
108
 
@@ -154,7 +144,8 @@ JSShape *js_shape_root(JSContext *ctx, const JSClass *cls, JSValue proto, uint16
154
144
  }
155
145
  JSShape *s = js_alloc_shape(ctx); /* may collect: nothing above is held across it */
156
146
  s->cls = cls;
157
- s->proto = proto;
147
+ s->proto = proto; /* barrier: fresh cell */
148
+ if (js_is_object(proto)) js_as_object(proto)->cell.flags |= JS_CELL_PROTOTYPE; /* its shape changes now bump proto_epoch */
158
149
  s->flags = JS_SHAPE_EXTENSIBLE;
159
150
  s->inline_cap = inline_cap;
160
151
  s->slot_offset = cls->instance_size;
@@ -178,8 +169,8 @@ JSShape *js_shape_add(JSContext *ctx, JSShape *shape, JSValue key, uint8_t attrs
178
169
 
179
170
  JSShape *child = js_alloc_shape(ctx); /* `shape` is kept alive by the caller */
180
171
  child->cls = shape->cls;
181
- child->proto = shape->proto;
182
- child->parent = shape;
172
+ child->proto = shape->proto; /* barrier: fresh cell */
173
+ child->parent = shape; /* barrier: fresh cell */
183
174
  child->key = key;
184
175
  child->attrs = attrs;
185
176
  child->flags = shape->flags;
@@ -210,7 +201,7 @@ JSShape *js_shape_add(JSContext *ctx, JSShape *shape, JSValue key, uint8_t attrs
210
201
 
211
202
  /* ---- Lookup ------------------------------------------------------------------- */
212
203
 
213
- #define WALK_LIMIT 8 /* above this many properties, build a table (ADR 0005) */
204
+ #define WALK_LIMIT 8 /* above this many properties, build a table */
214
205
 
215
206
  static void build_table(JSShape *s) {
216
207
  uint32_t n = s->prop_count;
File without changes
@@ -1,4 +1,4 @@
1
- /* ReadableStream (WHATWG Streams §4), the streams component (ADR 0012, layer 2), as Node has it:
1
+ /* ReadableStream (WHATWG Streams §4), the streams component, as Node has it:
2
2
  * default streams (an underlying source's start, pull and cancel, a queuing strategy's
3
3
  * highWaterMark and size), their default reader and controller, async iteration, and tee. Byte
4
4
  * streams' BYOB readers aren't provided yet; `type: 'bytes'` makes a default stream. WritableStream,
@@ -142,7 +142,7 @@ static JSValue rejected_with_exception(JSContext *ctx) { return rejected(ctx, js
142
142
 
143
143
  /* ---- The queue ------------------------------------------------------------------------------ */
144
144
 
145
- static void queue_push(ControllerObject *k, JSValue chunk, double size) {
145
+ static void queue_push(JSContext *ctx, ControllerObject *k, JSValue chunk, double size) {
146
146
  if (k->head > 0 && k->n == k->cap) { /* reclaim what reads consumed */
147
147
  memmove(k->queue, k->queue + k->head, (k->n - k->head) * sizeof *k->queue);
148
148
  k->n -= k->head;
@@ -155,8 +155,9 @@ static void queue_push(ControllerObject *k, JSValue chunk, double size) {
155
155
  k->queue = q;
156
156
  k->cap = cap;
157
157
  }
158
- k->queue[k->n++] = chunk;
159
- k->queue[k->n++] = js_number(size);
158
+ k->queue[k->n++] = chunk; /* barrier: below */
159
+ js_write_barrier(ctx, &k->obj.cell, NULL, chunk);
160
+ k->queue[k->n++] = js_number(size); /* barrier: not a cell */
160
161
  k->queue_size += size;
161
162
  }
162
163
 
@@ -310,7 +311,7 @@ static int enqueue(JSContext *ctx, ControllerObject *k, JSValue chunk) {
310
311
  return fail(js_throw(ctx, e));
311
312
  }
312
313
  }
313
- queue_push(k, chunk, size);
314
+ queue_push(ctx, k, chunk, size);
314
315
  }
315
316
  call_pull_if_needed(ctx, k);
316
317
  return 0;
@@ -463,15 +464,19 @@ JSValue js_new_readable_stream(JSContext *ctx, const JSStreamSource *source, JSV
463
464
  return js_rs_new(ctx, source, data, high_water_mark, JS_UNDEFINED, JS_UNDEFINED);
464
465
  }
465
466
 
466
- JSValue js_readable_stream_of_bytes(JSContext *ctx, JSValue chunk) {
467
+ /* A closed stream of one chunk (none when undefined): a byte stream, or not */
468
+ static JSValue stream_of(JSContext *ctx, JSValue chunk, bool bytes) {
467
469
  JSValue sv = new_stream(ctx, ctx->intrinsics[JS_INTRINSIC_READABLE_STREAM_PROTOTYPE], 0, JS_UNDEFINED);
468
- as_stream(sv)->bytes = 1;
470
+ as_stream(sv)->bytes = bytes;
469
471
  ControllerObject *k = controller_of(as_stream(sv));
470
472
  k->started = 1;
471
473
  if (!js_is_undefined(chunk) && enqueue(ctx, k, chunk) < 0) return JS_EXCEPTION;
472
474
  return close_controller(ctx, k) < 0 ? JS_EXCEPTION : sv;
473
475
  }
474
476
 
477
+ JSValue js_readable_stream_of_bytes(JSContext *ctx, JSValue chunk) { return stream_of(ctx, chunk, true); }
478
+ JSValue js_readable_stream_of_chunk(JSContext *ctx, JSValue chunk) { return stream_of(ctx, chunk, false); }
479
+
475
480
  /* ---- ReadableStream.prototype --------------------------------------------------------------- */
476
481
 
477
482
  #define THIS_STREAM() \
@@ -551,6 +556,15 @@ BUILTIN(reader_ctor) {
551
556
  return new_reader(ctx, proto, ARG(0));
552
557
  }
553
558
 
559
+ /* A chunk read at once from the queue: Node 24's fast path makes it { done: false, value }, where
560
+ * a read that waits for its chunk gets { value, done: false } */
561
+ static JSValue queued_result(JSContext *ctx, JSValue chunk) {
562
+ JSValue o = js_new_object(ctx);
563
+ js_define_data(ctx, js_as_object(o), JS_ATOM(done), JS_FALSE, JS_PROP_DEFAULT);
564
+ js_define_data(ctx, js_as_object(o), JS_ATOM(value), chunk, JS_PROP_DEFAULT);
565
+ return o;
566
+ }
567
+
554
568
  /* ReadableStreamDefaultReaderRead: a promise of { value, done } */
555
569
  static JSValue reader_read(JSContext *ctx, ReaderObject *r) {
556
570
  StreamObject *s = as_stream(r->stream);
@@ -567,7 +581,7 @@ static JSValue reader_read(JSContext *ctx, ReaderObject *r) {
567
581
  } else {
568
582
  call_pull_if_needed(ctx, k);
569
583
  }
570
- return resolved(ctx, js_iter_result(ctx, chunk, false));
584
+ return resolved(ctx, queued_result(ctx, chunk));
571
585
  }
572
586
  JSValue p = js_new_promise(ctx);
573
587
  if (js_array_push(ctx, js_as_object(r->requests), p) < 0) return JS_EXCEPTION;
File without changes
@@ -1,4 +1,4 @@
1
- /* Strings (ADR 0003). */
1
+ /* Strings. */
2
2
  #include "jsstring.h"
3
3
 
4
4
  #include <stdlib.h>
@@ -9,37 +9,24 @@
9
9
  #include "jscontext.h"
10
10
  #include "jsnum.h"
11
11
 
12
- /* ---- GC classes -------------------------------------------------------- */
12
+ /* ---- GC classes (gc_visit.h visits them) ------------------------------- */
13
13
 
14
- static void rope_visit(JSCell *c, JSTracer *trc) {
15
- JSRope *r = (JSRope *)c;
16
- js_trace_value(trc, r->left);
17
- js_trace_value(trc, r->right);
18
- }
19
-
20
- static void slice_visit(JSCell *c, JSTracer *trc) {
21
- js_trace_value(trc, ((JSSlice *)c)->parent);
22
- }
23
-
24
- const JSCellClass js_flat_string_class = { "String", NULL, NULL };
25
- const JSCellClass js_rope_class = { "Rope", rope_visit, NULL };
26
- const JSCellClass js_slice_class = { "Slice", slice_visit, NULL };
14
+ const JSCellClass js_flat_string_class = { "String", NULL, NULL, NULL };
15
+ const JSCellClass js_rope_class = { "Rope", NULL, NULL, NULL };
16
+ const JSCellClass js_slice_class = { "Slice", NULL, NULL, NULL };
27
17
 
28
18
  /* ---- Static cells: "" and every unit 0…255 ----------------------------- */
29
19
 
30
- typedef JS_STATIC_LATIN1_TYPE(1) JSStaticChar;
31
-
32
20
  #define CHAR_HASH(u) JS_HASH_FIX(JS_HASH_STEP(JS_HASH_INIT, (u)))
33
21
  #define C1(u) JS_STATIC_ATOM_INIT(1, CHAR_HASH(u), { (uint8_t)(u), 0 })
34
22
  #define C4(u) C1(u), C1((u) + 1), C1((u) + 2), C1((u) + 3)
35
23
  #define C16(u) C4(u), C4((u) + 4), C4((u) + 8), C4((u) + 12)
36
24
  #define C64(u) C16(u), C16((u) + 16), C16((u) + 32), C16((u) + 48)
37
25
 
38
- static const JSStaticChar char_strings[256] = { C64(0), C64(64), C64(128), C64(192) };
26
+ const JSStaticChar js_char_strings[256] = { C64(0), C64(64), C64(128), C64(192) };
39
27
  static const JS_STATIC_LATIN1_TYPE(0) empty_string = JS_STATIC_ATOM_INIT(0, JS_HASH_FIX(JS_HASH_INIT), { 0 });
40
28
 
41
29
  JSValue js_empty_string(void) { return js_cell((JSCell *)&empty_string); }
42
- JSValue js_char_string(uint8_t unit) { return js_cell((JSCell *)&char_strings[unit]); }
43
30
 
44
31
  /* ---- Flat strings ------------------------------------------------------ */
45
32
 
@@ -169,12 +156,8 @@ static unsigned depth_of(JSValue s) {
169
156
  return c->kind == JS_CELL_STR_ROPE && !rope_flattened((JSRope *)c) ? ((JSRope *)c)->depth : 0;
170
157
  }
171
158
 
172
- /* Copies the leaves into one flat string, iteratively (ropes can be deep),
173
- * and keeps it in the rope: left = result, right = EMPTY. */
174
- static JSString *flatten(JSContext *ctx, JSRope *rope) {
175
- if (rope_flattened(rope)) return (JSString *)js_as_cell(rope->left);
176
- JSString *out = alloc_flat(ctx, rope->length, cell_latin1(&rope->cell)); /* may GC; nothing moves */
177
-
159
+ /* Copies the leaves of `rope` into `out` from unit 0, iteratively (ropes can be deep). */
160
+ static void copy_rope(JSString *out, JSRope *rope) {
178
161
  size_t cap = (size_t)rope->depth + 2, sp = 0;
179
162
  JSValue small[64];
180
163
  JSValue *stack = cap <= 64 ? small : malloc(cap * sizeof *stack);
@@ -198,7 +181,13 @@ static JSString *flatten(JSContext *ctx, JSRope *rope) {
198
181
  at += v.length;
199
182
  }
200
183
  if (stack != small) free(stack);
184
+ }
201
185
 
186
+ /* Copies the leaves into one flat string and keeps it in the rope: left = result, right = EMPTY. */
187
+ static JSString *flatten(JSContext *ctx, JSRope *rope) {
188
+ if (rope_flattened(rope)) return (JSString *)js_as_cell(rope->left);
189
+ JSString *out = alloc_flat(ctx, rope->length, cell_latin1(&rope->cell)); /* may GC; nothing moves */
190
+ copy_rope(out, rope);
202
191
  js_store(ctx, &rope->cell, &rope->left, js_cell(&out->cell));
203
192
  js_store(ctx, &rope->cell, &rope->right, JS_EMPTY);
204
193
  return out;
@@ -213,12 +202,61 @@ JSStrView js_string_view(JSContext *ctx, JSValue s) {
213
202
  }
214
203
  }
215
204
 
205
+ /* ---- Append buffers ---------------------------------------------------- */
206
+
207
+ /* The buffer `a` is the newest string of (a slice ending at its fill mark), or NULL. */
208
+ static JSString *newest_in_buffer(JSValue a) {
209
+ JSCell *c = js_as_cell(a);
210
+ if (c->kind != JS_CELL_STR_SLICE) return NULL;
211
+ JSSlice *slice = (JSSlice *)c;
212
+ JSString *p = (JSString *)js_as_cell(slice->parent);
213
+ return (p->cell.flags & JS_STR_BUFFER) && slice->offset == 0 && slice->length == p->length ? p : NULL;
214
+ }
215
+
216
+ /* A zero-filled buffer with room for `capacity` units, `used` of them filled by the caller. */
217
+ static JSString *alloc_buffer(JSContext *ctx, uint32_t used, uint32_t capacity, bool latin1) {
218
+ JSString *s = alloc_flat(ctx, capacity, latin1);
219
+ s->cell.flags |= JS_STR_BUFFER;
220
+ s->cell.aux = capacity;
221
+ s->length = used;
222
+ return s;
223
+ }
224
+
225
+ /* a + b continuing in a buffer: in `buf` (the one `a` is the newest string of, or NULL) when `b`
226
+ * fits, else in a new one with twice the room. Each unit is copied O(1) times on average. */
227
+ static JSValue append(JSContext *ctx, JSString *buf, JSValue a, JSValue b, uint32_t length) {
228
+ JSStrView vb = js_string_view(ctx, b); /* may flatten b: a, and so buf, stay live */
229
+ if (!buf || length > buf->cell.aux || (cell_latin1(&buf->cell) && !vb.latin1)) {
230
+ uint32_t la = js_string_length(a);
231
+ JSCell *ca = js_as_cell(a);
232
+ bool rope = ca->kind == JS_CELL_STR_ROPE && !rope_flattened((JSRope *)ca);
233
+ bool latin1 = (rope ? cell_latin1(ca) : js_string_view(ctx, a).latin1) && vb.latin1;
234
+ uint64_t capacity = (uint64_t)length * 2;
235
+ if (capacity > JS_STRING_MAX_LENGTH) capacity = JS_STRING_MAX_LENGTH;
236
+ buf = alloc_buffer(ctx, la, (uint32_t)capacity, latin1); /* vb stays valid: nothing moves */
237
+ if (rope) copy_rope(buf, (JSRope *)ca); /* straight into the buffer: no flat copy first */
238
+ else copy_view(buf, 0, js_string_view(ctx, a));
239
+ }
240
+ copy_view(buf, buf->length, vb); /* past the fill mark: no string sees these units yet */
241
+ buf->length = length;
242
+ JSSlice *slice = (JSSlice *)js_alloc_cell(ctx, JS_CELL_STR_SLICE, sizeof(JSSlice)); /* buf is live */
243
+ slice->cell.flags = cell_latin1(&buf->cell) ? JS_STR_LATIN1 : 0;
244
+ slice->length = length;
245
+ slice->offset = 0;
246
+ js_init_slot(&slice->parent, js_cell(&buf->cell));
247
+ return js_cell(&slice->cell);
248
+ }
249
+
250
+ /* a + b: a short result is copied, appending to a buffer's newest string continues in it, a deep
251
+ * rope (an append loop) moves to a buffer, and anything else is a rope. */
216
252
  JSValue js_concat(JSContext *ctx, JSValue a, JSValue b) {
217
253
  uint32_t la = js_string_length(a), lb = js_string_length(b);
218
254
  if (la == 0) return b;
219
255
  if (lb == 0) return a;
220
256
  if ((uint64_t)la + lb > JS_STRING_MAX_LENGTH) return string_too_long(ctx);
221
257
  uint32_t length = la + lb;
258
+ JSString *buf = newest_in_buffer(a);
259
+ if (buf) return append(ctx, buf, a, b, length);
222
260
  bool latin1 = cell_latin1(js_as_cell(a)) && cell_latin1(js_as_cell(b));
223
261
 
224
262
  if (length < JS_ROPE_MIN) { /* copying is cheaper than a rope */
@@ -229,6 +267,7 @@ JSValue js_concat(JSContext *ctx, JSValue a, JSValue b) {
229
267
  return js_cell(&s->cell);
230
268
  }
231
269
 
270
+ if (depth_of(a) >= JS_BUFFER_MIN_DEPTH) return append(ctx, NULL, a, b, length);
232
271
  unsigned depth = (depth_of(a) > depth_of(b) ? depth_of(a) : depth_of(b)) + 1;
233
272
  if (depth > JS_ROPE_MAX_DEPTH) { /* bound the depth: flatten the deep side(s) */
234
273
  if (depth_of(a) >= JS_ROPE_MAX_DEPTH) (void)js_string_view(ctx, a);
@@ -1,7 +1,7 @@
1
- /* String and String.prototype (§22.1): core built-ins (ADR 0014). Case conversion and
2
- * normalization use QuickJS's libunicode (ADR 0015's vendored copy); the regex-based methods
1
+ /* String and String.prototype (§22.1): core built-ins. Case conversion and
2
+ * normalization use QuickJS's libunicode (vendored with libregexp); the regex-based methods
3
3
  * dispatch to @@match/@@replace/@@search/@@split on their argument as the spec makes them, and
4
- * create a RegExp (the RegExp component, ADR 0015) only where the spec does. */
4
+ * create a RegExp (the RegExp component) only where the spec does. */
5
5
  #include "builtins_util.h"
6
6
 
7
7
  #include <math.h>
@@ -128,7 +128,7 @@ static JSValue get_method(JSContext *ctx, JSValue v, JSValue key) {
128
128
  return f;
129
129
  }
130
130
 
131
- /* RegExpCreate (§22.2.3.1), through the RegExp component (ADR 0015). */
131
+ /* RegExpCreate (§22.2.3.1), through the RegExp component. */
132
132
  static JSValue regexp_create(JSContext *ctx, JSValue pattern, const char *flags, const char *method) {
133
133
  JSValue ctor = ctx->intrinsics[JS_INTRINSIC_REGEXP];
134
134
  if (!js_is_function(ctor)) return js_throw_type_error(ctx, "%s needs RegExp (not supported yet)", method);
@@ -368,8 +368,8 @@ CORE(string_proto_to_well_formed) {
368
368
  return finish(ctx, &b);
369
369
  }
370
370
 
371
- /* localeCompare without Intl (later, M7): by code units. Node compares by ICU collation,
372
- * which differs for mixed case and accents (plan/unsupported.md). */
371
+ /* localeCompare without Intl: by code units. Node compares by ICU collation,
372
+ * which differs for mixed case and accents. */
373
373
  CORE(string_proto_locale_compare) {
374
374
  UNUSED_ARGS;
375
375
  JSValue s = this_string(ctx, this_val, "String.prototype.localeCompare");
@@ -728,7 +728,7 @@ CORE(string_proto_to_upper_case) {
728
728
  return case_convert(ctx, this_val, false, "String.prototype.toUpperCase");
729
729
  }
730
730
 
731
- /* The locale variants without Intl (later, M7): the root locale's mapping. */
731
+ /* The locale variants without Intl: the root locale's mapping. */
732
732
  CORE(string_proto_to_locale_lower_case) {
733
733
  UNUSED_ARGS;
734
734
  return case_convert(ctx, this_val, true, "String.prototype.toLocaleLowerCase");
@@ -1,4 +1,4 @@
1
- /* Symbols (ECMAScript §6.1.5, §20.4; ADR 0001). */
1
+ /* Symbols (ECMAScript §6.1.5, §20.4). */
2
2
  #include "js_symbol.h"
3
3
 
4
4
  #include "internal.h"
@@ -13,12 +13,7 @@
13
13
  JS_WELL_KNOWN_SYMBOLS(JS_SYMBOL_DEF)
14
14
  #undef JS_SYMBOL_DEF
15
15
 
16
- static void symbol_visit(JSCell *c, JSTracer *trc) {
17
- const JSCell *d = ((JSSymbol *)c)->description;
18
- if (d) js_trace_value(trc, js_cell((JSCell *)d));
19
- }
20
-
21
- const JSCellClass js_symbol_cell_class = { "Symbol", symbol_visit, NULL };
16
+ const JSCellClass js_symbol_cell_class = { "Symbol", NULL, NULL, NULL }; /* gc_visit.h visits it */
22
17
 
23
18
  JSValue js_new_symbol(JSContext *ctx, JSValue description) {
24
19
  JSSymbol *s = (JSSymbol *)js_alloc_cell(ctx, JS_CELL_SYMBOL, sizeof(JSSymbol));
@@ -1,4 +1,4 @@
1
- /* The test262 host's $262 (ADR 0011). Only test262 units call js_test_host_init, so a
1
+ /* The test262 host's $262. Only test262 units call js_test_host_init, so a
2
2
  * program's binary never links this file. */
3
3
  #include "internal.h"
4
4
  #include "js_builtins.h"
@@ -15,7 +15,7 @@ static JSValue host_create_realm(JSContext *ctx, JSValue callee, JSValue this_va
15
15
  return js_test_host_init(js_context_new(ctx->rt));
16
16
  }
17
17
 
18
- /* $262.gc(): a full collection (ADR 0002). */
18
+ /* $262.gc(): a full collection. */
19
19
  static JSValue host_gc(JSContext *ctx, JSValue callee, JSValue this_val, uint32_t argc,
20
20
  const JSValue *argv, JSValue new_target) {
21
21
  (void)callee, (void)this_val, (void)argc, (void)argv, (void)new_target;
@@ -44,7 +44,7 @@ static JSValue host_detach_array_buffer(JSContext *ctx, JSValue callee, JSValue
44
44
  * (threads), IsHTMLDDA (browser annex). Tests using them fail or are skipped. */
45
45
  JSValue js_test_host_init(JSContext *ctx) {
46
46
  js_set_rejection_mode(ctx->rt, JS_REJECTIONS_NONE); /* tests leave rejected promises unhandled */
47
- if (!ctx->rt->components) js_install_components(ctx, js_all_components, js_all_components_count); /* all of them (ADR 0014) */
47
+ if (!ctx->rt->components) js_install_components(ctx, js_all_components, js_all_components_count); /* all of them */
48
48
  JSValue global = ctx->intrinsics[JS_INTRINSIC_GLOBAL_OBJECT];
49
49
  JSValue host = js_new_object(ctx);
50
50
  JSObject *h = js_as_object(host);