@scriptc/cli-darwin-arm64 0.2.0 → 0.2.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.
- package/dist/THIRD_PARTY_NOTICES +1 -1
- package/dist/bin/scriptc +0 -0
- package/dist/bin/scriptc.json +1 -1
- package/dist/lib/declarations/scriptc-node-fallback.d.ts +25 -15
- package/dist/lib/llvm/bin/scriptc-llvm-codegen +0 -0
- package/dist/lib/llvm/package.json +1 -1
- package/dist/lib/runtime-darwin-arm64/artifacts/dev/runtime/default/scr_array.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/dev/runtime/default/scr_assert.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/dev/runtime/default/scr_async.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/dev/runtime/default/scr_async_dyn.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/dev/runtime/default/scr_bigint.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/dev/runtime/default/scr_bytes.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/dev/runtime/default/scr_bytes_io.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/dev/runtime/default/scr_child.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/dev/runtime/default/scr_console.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/dev/runtime/default/scr_console_native.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/dev/runtime/default/scr_dyn_invoke.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/dev/runtime/default/scr_error.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/dev/runtime/default/scr_events.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/dev/runtime/default/scr_exception.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/dev/runtime/default/scr_fetch.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/dev/runtime/default/scr_file_handle.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/dev/runtime/default/scr_grapheme.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/dev/runtime/default/scr_http.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/dev/runtime/default/scr_http2.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/dev/runtime/default/scr_json.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/dev/runtime/default/scr_lib.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/dev/runtime/default/scr_map.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/dev/runtime/default/scr_net.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/dev/runtime/default/scr_node_builtin.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/dev/runtime/default/scr_object.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/dev/runtime/default/scr_regex.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/dev/runtime/default/scr_stream.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/dev/runtime/default/scr_string.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/dev/runtime/default/scr_symbol.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/dev/runtime/default/scr_url.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/dev/runtime/dynamic/scr_array.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/dev/runtime/dynamic/scr_assert.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/dev/runtime/dynamic/scr_async.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/dev/runtime/dynamic/scr_async_dyn.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/dev/runtime/dynamic/scr_bigint.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/dev/runtime/dynamic/scr_bytes.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/dev/runtime/dynamic/scr_bytes_io.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/dev/runtime/dynamic/scr_child.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/dev/runtime/dynamic/scr_console.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/dev/runtime/dynamic/scr_console_native.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/dev/runtime/dynamic/scr_dyn_invoke.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/dev/runtime/dynamic/scr_error.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/dev/runtime/dynamic/scr_events.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/dev/runtime/dynamic/scr_exception.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/dev/runtime/dynamic/scr_file_handle.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/dev/runtime/dynamic/scr_grapheme.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/dev/runtime/dynamic/scr_http.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/dev/runtime/dynamic/scr_http2.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/dev/runtime/dynamic/scr_island.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/dev/runtime/dynamic/scr_json.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/dev/runtime/dynamic/scr_lib.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/dev/runtime/dynamic/scr_map.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/dev/runtime/dynamic/scr_net.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/dev/runtime/dynamic/scr_node_builtin.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/dev/runtime/dynamic/scr_object.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/dev/runtime/dynamic/scr_regex.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/dev/runtime/dynamic/scr_stream.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/dev/runtime/dynamic/scr_string.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/dev/runtime/dynamic/scr_symbol.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/dev/runtime/dynamic/scr_url.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/dev/runtime/dynamic-text-decoder-legacy/scr_bytes.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/dev/runtime/text-decoder-legacy/scr_bytes.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/library-dev/runtime/default/scr_array.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/library-dev/runtime/default/scr_assert.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/library-dev/runtime/default/scr_bigint.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/library-dev/runtime/default/scr_bytes.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/library-dev/runtime/default/scr_bytes_io.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/library-dev/runtime/default/scr_console_native.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/library-dev/runtime/default/scr_dyn_invoke.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/library-dev/runtime/default/scr_error.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/library-dev/runtime/default/scr_exception.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/library-dev/runtime/default/scr_grapheme.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/library-dev/runtime/default/scr_json.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/library-dev/runtime/default/scr_lib.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/library-dev/runtime/default/scr_map.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/library-dev/runtime/default/scr_node_builtin.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/library-dev/runtime/default/scr_object.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/library-dev/runtime/default/scr_regex.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/library-dev/runtime/default/scr_string.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/library-dev/runtime/default/scr_symbol.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/library-dev/runtime/default/scr_url.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/library-dev/runtime/text-decoder-legacy/scr_bytes.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/library-release/runtime/default/scr_array.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/library-release/runtime/default/scr_assert.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/library-release/runtime/default/scr_bigint.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/library-release/runtime/default/scr_bytes.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/library-release/runtime/default/scr_bytes_io.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/library-release/runtime/default/scr_console_native.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/library-release/runtime/default/scr_dyn_invoke.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/library-release/runtime/default/scr_error.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/library-release/runtime/default/scr_exception.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/library-release/runtime/default/scr_grapheme.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/library-release/runtime/default/scr_json.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/library-release/runtime/default/scr_lib.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/library-release/runtime/default/scr_map.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/library-release/runtime/default/scr_node_builtin.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/library-release/runtime/default/scr_object.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/library-release/runtime/default/scr_regex.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/library-release/runtime/default/scr_string.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/library-release/runtime/default/scr_symbol.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/library-release/runtime/default/scr_url.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/library-release/runtime/text-decoder-legacy/scr_bytes.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/library-thread-dev/runtime/default/scr_array.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/library-thread-dev/runtime/default/scr_assert.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/library-thread-dev/runtime/default/scr_bigint.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/library-thread-dev/runtime/default/scr_bytes.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/library-thread-dev/runtime/default/scr_bytes_io.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/library-thread-dev/runtime/default/scr_console_native.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/library-thread-dev/runtime/default/scr_dyn_invoke.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/library-thread-dev/runtime/default/scr_error.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/library-thread-dev/runtime/default/scr_exception.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/library-thread-dev/runtime/default/scr_grapheme.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/library-thread-dev/runtime/default/scr_json.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/library-thread-dev/runtime/default/scr_lib.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/library-thread-dev/runtime/default/scr_map.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/library-thread-dev/runtime/default/scr_node_builtin.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/library-thread-dev/runtime/default/scr_object.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/library-thread-dev/runtime/default/scr_regex.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/library-thread-dev/runtime/default/scr_string.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/library-thread-dev/runtime/default/scr_symbol.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/library-thread-dev/runtime/default/scr_url.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/library-thread-dev/runtime/text-decoder-legacy/scr_bytes.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/library-thread-release/runtime/default/scr_array.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/library-thread-release/runtime/default/scr_assert.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/library-thread-release/runtime/default/scr_bigint.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/library-thread-release/runtime/default/scr_bytes.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/library-thread-release/runtime/default/scr_bytes_io.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/library-thread-release/runtime/default/scr_console_native.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/library-thread-release/runtime/default/scr_dyn_invoke.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/library-thread-release/runtime/default/scr_error.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/library-thread-release/runtime/default/scr_exception.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/library-thread-release/runtime/default/scr_grapheme.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/library-thread-release/runtime/default/scr_json.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/library-thread-release/runtime/default/scr_lib.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/library-thread-release/runtime/default/scr_map.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/library-thread-release/runtime/default/scr_node_builtin.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/library-thread-release/runtime/default/scr_object.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/library-thread-release/runtime/default/scr_regex.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/library-thread-release/runtime/default/scr_string.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/library-thread-release/runtime/default/scr_symbol.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/library-thread-release/runtime/default/scr_url.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/library-thread-release/runtime/text-decoder-legacy/scr_bytes.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/licenses/v8-number-radix.txt +61 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/release/runtime/default/scr_array.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/release/runtime/default/scr_assert.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/release/runtime/default/scr_async.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/release/runtime/default/scr_async_dyn.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/release/runtime/default/scr_bigint.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/release/runtime/default/scr_bytes.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/release/runtime/default/scr_bytes_io.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/release/runtime/default/scr_child.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/release/runtime/default/scr_console.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/release/runtime/default/scr_console_native.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/release/runtime/default/scr_dyn_invoke.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/release/runtime/default/scr_error.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/release/runtime/default/scr_events.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/release/runtime/default/scr_exception.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/release/runtime/default/scr_fetch.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/release/runtime/default/scr_file_handle.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/release/runtime/default/scr_grapheme.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/release/runtime/default/scr_http.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/release/runtime/default/scr_http2.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/release/runtime/default/scr_json.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/release/runtime/default/scr_lib.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/release/runtime/default/scr_map.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/release/runtime/default/scr_net.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/release/runtime/default/scr_node_builtin.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/release/runtime/default/scr_object.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/release/runtime/default/scr_regex.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/release/runtime/default/scr_stream.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/release/runtime/default/scr_string.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/release/runtime/default/scr_symbol.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/release/runtime/default/scr_url.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/release/runtime/dynamic/scr_array.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/release/runtime/dynamic/scr_assert.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/release/runtime/dynamic/scr_async.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/release/runtime/dynamic/scr_async_dyn.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/release/runtime/dynamic/scr_bigint.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/release/runtime/dynamic/scr_bytes.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/release/runtime/dynamic/scr_bytes_io.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/release/runtime/dynamic/scr_child.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/release/runtime/dynamic/scr_console.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/release/runtime/dynamic/scr_console_native.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/release/runtime/dynamic/scr_dyn_invoke.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/release/runtime/dynamic/scr_error.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/release/runtime/dynamic/scr_events.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/release/runtime/dynamic/scr_exception.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/release/runtime/dynamic/scr_file_handle.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/release/runtime/dynamic/scr_grapheme.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/release/runtime/dynamic/scr_http.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/release/runtime/dynamic/scr_http2.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/release/runtime/dynamic/scr_island.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/release/runtime/dynamic/scr_json.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/release/runtime/dynamic/scr_lib.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/release/runtime/dynamic/scr_map.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/release/runtime/dynamic/scr_net.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/release/runtime/dynamic/scr_node_builtin.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/release/runtime/dynamic/scr_object.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/release/runtime/dynamic/scr_regex.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/release/runtime/dynamic/scr_stream.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/release/runtime/dynamic/scr_string.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/release/runtime/dynamic/scr_symbol.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/release/runtime/dynamic/scr_url.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/release/runtime/dynamic-text-decoder-legacy/scr_bytes.o +0 -0
- package/dist/lib/runtime-darwin-arm64/artifacts/release/runtime/text-decoder-legacy/scr_bytes.o +0 -0
- package/dist/lib/runtime-darwin-arm64/package.json +1 -1
- package/dist/lib/runtime-darwin-arm64/runtime-pack.json +529 -525
- package/dist/lib/runtime-sources/package.json +1 -1
- package/dist/lib/runtime-sources/src/scr_array.c +16 -0
- package/dist/lib/runtime-sources/src/scr_assert.c +1 -0
- package/dist/lib/runtime-sources/src/scr_async.c +26 -1
- package/dist/lib/runtime-sources/src/scr_async_dyn.c +90 -16
- package/dist/lib/runtime-sources/src/scr_bigint.c +8 -0
- package/dist/lib/runtime-sources/src/scr_bytes.c +205 -41
- package/dist/lib/runtime-sources/src/scr_bytes_io.c +581 -12
- package/dist/lib/runtime-sources/src/scr_child.c +544 -17
- package/dist/lib/runtime-sources/src/scr_console.c +1 -1
- package/dist/lib/runtime-sources/src/scr_dyn_invoke.c +164 -31
- package/dist/lib/runtime-sources/src/scr_error.c +52 -5
- package/dist/lib/runtime-sources/src/scr_exception.c +21 -5
- package/dist/lib/runtime-sources/src/scr_fetch.c +266 -2
- package/dist/lib/runtime-sources/src/scr_http.c +3 -0
- package/dist/lib/runtime-sources/src/scr_island.c +38 -13
- package/dist/lib/runtime-sources/src/scr_json.c +1149 -91
- package/dist/lib/runtime-sources/src/scr_map.c +47 -0
- package/dist/lib/runtime-sources/src/scr_node_builtin.c +10 -0
- package/dist/lib/runtime-sources/src/scr_object.c +11 -0
- package/dist/lib/runtime-sources/src/scr_regex.c +108 -69
- package/dist/lib/runtime-sources/src/scr_runtime.h +190 -33
- package/dist/lib/runtime-sources/src/scr_stream.c +197 -0
- package/dist/lib/runtime-sources/src/scr_string.c +16 -1
- package/dist/lib/runtime-sources/src/scr_symbol.c +5 -0
- package/dist/lib/runtime-sources/src/scr_text_decoder_labels.h +225 -0
- package/dist/lib/runtime-sources/src/scr_url.c +172 -3
- package/dist/lib/runtime-sources/vendor/v8-number-radix/LICENSE +61 -0
- package/package.json +1 -1
|
@@ -62,7 +62,7 @@ void scr_init(void);
|
|
|
62
62
|
/* Program objects emitted by the bundled LLVM helper reference this symbol.
|
|
63
63
|
* Its versioned spelling makes a mismatched manual runtime link fail before
|
|
64
64
|
* the program can start. */
|
|
65
|
-
void
|
|
65
|
+
void scr_runtime_abi_v6(void);
|
|
66
66
|
|
|
67
67
|
/* ── the trap funnel (scr_console.c; scr_library.c under -DSCR_LIB) ──────
|
|
68
68
|
* Every unrecoverable runtime trap — OOM, semantic range traps, internal-
|
|
@@ -78,6 +78,31 @@ void scr_runtime_abi_v5(void);
|
|
|
78
78
|
* structured trap-teaching form before delivery (a message that already
|
|
79
79
|
* begins with the 0x01 marker passes verbatim) — see ScrLibSinkFn below. */
|
|
80
80
|
_Noreturn void scr_trap(const char *msg);
|
|
81
|
+
|
|
82
|
+
/* glibc added arc4random_buf in 2.36. Older GNU targets use the same kernel
|
|
83
|
+
* CSPRNG as the musl shim, with no global state or persistent descriptor. */
|
|
84
|
+
#ifdef __GLIBC__
|
|
85
|
+
#if !__GLIBC_PREREQ(2, 36)
|
|
86
|
+
#include <errno.h>
|
|
87
|
+
#include <stdlib.h>
|
|
88
|
+
#include <sys/random.h>
|
|
89
|
+
static inline void scr_glibc_random_buf(void *buf, size_t n) {
|
|
90
|
+
unsigned char *p = buf;
|
|
91
|
+
while (n > 0) {
|
|
92
|
+
ssize_t got = getrandom(p, n, 0);
|
|
93
|
+
if (got > 0) {
|
|
94
|
+
p += (size_t)got;
|
|
95
|
+
n -= (size_t)got;
|
|
96
|
+
} else if (got < 0 && errno == EINTR) {
|
|
97
|
+
continue;
|
|
98
|
+
} else {
|
|
99
|
+
scr_trap("scriptc: getrandom failed\n");
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
#define arc4random_buf scr_glibc_random_buf
|
|
104
|
+
#endif
|
|
105
|
+
#endif
|
|
81
106
|
_Noreturn void scr_trap_fmt(const char *fmt, ...);
|
|
82
107
|
|
|
83
108
|
/* ── library mode (scr_library.c, linked only into library artifacts) ─────
|
|
@@ -472,6 +497,7 @@ typedef struct ScrClassObj {
|
|
|
472
497
|
size_t ncaps;
|
|
473
498
|
size_t length;
|
|
474
499
|
struct ScrBox *prototype_data;
|
|
500
|
+
struct ScrBox *static_data;
|
|
475
501
|
struct ScrBox *caps[];
|
|
476
502
|
} ScrClassObj;
|
|
477
503
|
|
|
@@ -483,6 +509,7 @@ static inline ScrClassObj *scr_classobj_retain(ScrClassObj *c) {
|
|
|
483
509
|
return c;
|
|
484
510
|
}
|
|
485
511
|
void scr_classobj_release(ScrClassObj *c);
|
|
512
|
+
void scr_classobj_clear_properties(ScrClassObj *c);
|
|
486
513
|
ScrClassObj *scr_classobj_new(const ScrClassObj *template, size_t ncaps);
|
|
487
514
|
void scr_classobj_trace_v(void *c, ScrTraceVisit visit, void *ctx);
|
|
488
515
|
/* void*-signature RC adapters (container slots) — scr_object.c. */
|
|
@@ -492,6 +519,7 @@ void scr_classobj_release_v(void *c);
|
|
|
492
519
|
ScrStr *scr_classobj_name(ScrClassObj *c);
|
|
493
520
|
struct ScrDyn *scr_dyn_class_prototype(struct ScrDyn *value, struct ScrDyn *base);
|
|
494
521
|
struct ScrDyn *scr_dyn_class_base_prototype(struct ScrDyn *constructor);
|
|
522
|
+
struct ScrDyn *scr_dyn_class_inherit(struct ScrDyn *constructor, struct ScrDyn *base);
|
|
495
523
|
void scr_dyn_class_super(struct ScrDyn *constructor, struct ScrDyn *receiver, struct ScrDyn *arguments);
|
|
496
524
|
struct ScrDyn *scr_dyn_assign_prototype(struct ScrDyn *target, struct ScrDyn *sources, struct ScrDyn *protected_keys);
|
|
497
525
|
/* The keyed-write miss on a fixed-shape record: throws the catchable
|
|
@@ -531,6 +559,10 @@ typedef struct ScrError {
|
|
|
531
559
|
* embed the slot and release it NULL-guarded. */
|
|
532
560
|
struct ScrDyn *error_cause; /* NULL = absent; dyn undefined = present */
|
|
533
561
|
bool cause_enumerable; /* assignment creates an enumerable own property */
|
|
562
|
+
bool message_present; /* super() leaves the inherited message property visible */
|
|
563
|
+
bool message_enumerable; /* assignment creates an enumerable own property */
|
|
564
|
+
bool name_present;
|
|
565
|
+
bool name_enumerable;
|
|
534
566
|
ScrStr *stack_frames; /* captured native source frames */
|
|
535
567
|
ScrStr *stack; /* lazily formatted, cached stack */
|
|
536
568
|
} ScrError;
|
|
@@ -564,6 +596,10 @@ typedef struct ScrDomException {
|
|
|
564
596
|
ScrStr *code; /* the Node string-code slot (stays NULL here) */
|
|
565
597
|
struct ScrDyn *error_cause; /* shared ScrError prefix; unused by DOMException */
|
|
566
598
|
bool cause_enumerable;
|
|
599
|
+
bool message_present;
|
|
600
|
+
bool message_enumerable;
|
|
601
|
+
bool name_present;
|
|
602
|
+
bool name_enumerable;
|
|
567
603
|
ScrStr *stack_frames;
|
|
568
604
|
ScrStr *stack;
|
|
569
605
|
double dom_code; /* the WebIDL legacy code (0 when the name is off-table) */
|
|
@@ -617,11 +653,15 @@ void scr_error_init_options(void *obj, int kind, const struct ScrDyn *message, c
|
|
|
617
653
|
void scr_error_install_cause_drop(void (*fn)(void *obj));
|
|
618
654
|
bool scr_error_has_cause(ScrError *e);
|
|
619
655
|
struct ScrDyn *scr_error_cause(ScrError *e); /* +1, undefined when absent */
|
|
656
|
+
void scr_error_define_cause(ScrError *e, struct ScrDyn *value);
|
|
620
657
|
void scr_error_set_cause(ScrError *e, struct ScrDyn *value); /* borrowed operands */
|
|
621
658
|
void scr_error_delete_cause(ScrError *e);
|
|
622
659
|
/* ECMA Error.prototype.toString: "", name, message, or "name: message".
|
|
623
660
|
* Borrows e, returns +1. */
|
|
624
661
|
ScrStr *scr_error_to_string(ScrError *e);
|
|
662
|
+
void scr_error_install_message_reader(ScrStr *(*reader)(ScrError *));
|
|
663
|
+
void scr_error_install_name_reader(ScrStr *(*reader)(ScrError *));
|
|
664
|
+
ScrStr *scr_error_default_name(const ScrError *e);
|
|
625
665
|
ScrStr *scr_error_stack(ScrError *e);
|
|
626
666
|
|
|
627
667
|
ScrError *scr_error_retain(ScrError *e);
|
|
@@ -813,6 +853,7 @@ ScrStr *scr_str_encode_uri_component(ScrStr *s);
|
|
|
813
853
|
* hex or an invalid sequence THROWS the spec's catchable URIError ("URI
|
|
814
854
|
* malformed") and returns NULL. Borrows s; result +1. */
|
|
815
855
|
ScrStr *scr_str_decode_uri_component(ScrStr *s);
|
|
856
|
+
ScrStr *scr_str_decode_uri(ScrStr *s);
|
|
816
857
|
|
|
817
858
|
/* The non-throwing core of decodeURIComponent: NULL on malformed input
|
|
818
859
|
* instead of the URIError — the try/catch shape node:querystring's
|
|
@@ -966,6 +1007,7 @@ typedef struct ScrArr {
|
|
|
966
1007
|
struct ScrArrProp *props; /* noncanonical numeric properties */
|
|
967
1008
|
size_t prop_len;
|
|
968
1009
|
size_t prop_cap;
|
|
1010
|
+
struct ScrDyn *metadata; /* heterogeneous named properties of match results */
|
|
969
1011
|
} ScrArr;
|
|
970
1012
|
|
|
971
1013
|
typedef struct ScrArrSparseSlot {
|
|
@@ -1003,6 +1045,7 @@ static inline ScrArr *scr_arr_retain(ScrArr *a) {
|
|
|
1003
1045
|
* NULL-tolerant (uninitialized locals). Cycle-capable arrays (elem_trace
|
|
1004
1046
|
* non-NULL) feed the candidate-root buffer like every headered type. */
|
|
1005
1047
|
void scr_arr_release(ScrArr *a);
|
|
1048
|
+
void scr_arr_copy_metadata(ScrArr *a, struct ScrDyn *target);
|
|
1006
1049
|
|
|
1007
1050
|
/* Trace entry point for cycle-capable arrays — stored in their collector
|
|
1008
1051
|
* header and passed wherever a container stores an ARRAY payload's RC entry
|
|
@@ -1161,16 +1204,15 @@ ScrStr *scr_str_raw(ScrArr *raw, ScrArr *subs);
|
|
|
1161
1204
|
/* ── regular expressions (scr_regex.c — linked ONLY when the program
|
|
1162
1205
|
* contains a regex literal; see native-toolchain.ts) ────────────────────────────────
|
|
1163
1206
|
* The engine is quickjs-ng's libregexp (the same bytecode interpreter the
|
|
1164
|
-
* dynamic island uses), compiled standalone.
|
|
1165
|
-
*
|
|
1166
|
-
* (pattern, flags) pair
|
|
1167
|
-
*
|
|
1207
|
+
* dynamic island uses), compiled standalone. Each regex literal evaluation
|
|
1208
|
+
* creates a fresh refcounted instance sharing an immortal template per
|
|
1209
|
+
* (pattern, flags) pair. Template bytecode compiles lazily on first use
|
|
1210
|
+
* and is freed at exit; constructed regexes own their bytecode.
|
|
1168
1211
|
* Subjects are matched as UTF-16 (converted per call from the UTF-8
|
|
1169
1212
|
* storage), so all observable index behavior is UTF-16-exact like Node.
|
|
1170
1213
|
*
|
|
1171
|
-
*
|
|
1172
|
-
*
|
|
1173
|
-
* test() on a g/y-flagged regex aborts with a clear message.
|
|
1214
|
+
* Global and sticky regexes carry numeric lastIndex. Exec/test update it
|
|
1215
|
+
* after matching; String methods apply their specified state rules.
|
|
1174
1216
|
*
|
|
1175
1217
|
* Ownership: subjects/replacements are BORROWED; string/array results
|
|
1176
1218
|
* return +1. replace_all without /g THROWS a catchable TypeError
|
|
@@ -1178,10 +1220,12 @@ ScrStr *scr_str_raw(ScrArr *raw, ScrArr *subs);
|
|
|
1178
1220
|
* checks); every other failure mode aborts.
|
|
1179
1221
|
*/
|
|
1180
1222
|
typedef struct ScrRegex {
|
|
1181
|
-
size_t rc; /* SIZE_MAX = immortal
|
|
1223
|
+
size_t rc; /* SIZE_MAX = immortal literal template */
|
|
1182
1224
|
ScrStr *source; /* pattern text between the slashes */
|
|
1183
1225
|
ScrStr *flags; /* flags text, source order (alphabet fenced to gimsuy) */
|
|
1184
1226
|
uint8_t *bc; /* lazily compiled libregexp bytecode; NULL until first use */
|
|
1227
|
+
double last_index;
|
|
1228
|
+
struct ScrRegex *literal; /* immutable bytecode owner for literal instances */
|
|
1185
1229
|
} ScrRegex;
|
|
1186
1230
|
|
|
1187
1231
|
static inline ScrRegex *scr_regex_retain(ScrRegex *re) {
|
|
@@ -1192,6 +1236,8 @@ static inline ScrRegex *scr_regex_retain(ScrRegex *re) {
|
|
|
1192
1236
|
void scr_regex_release(ScrRegex *re); /* NULL-tolerant */
|
|
1193
1237
|
void *scr_regex_retain_v(void *re);
|
|
1194
1238
|
void scr_regex_release_v(void *re);
|
|
1239
|
+
ScrRegex *scr_regex_literal(ScrRegex *literal); /* fresh state, shared cached bytecode */
|
|
1240
|
+
double scr_regex_last_index(ScrRegex *re);
|
|
1195
1241
|
|
|
1196
1242
|
/* new RegExp(pattern, flags): a heap ScrRegex over the same engine. The
|
|
1197
1243
|
* pattern compiles EAGERLY — an invalid pattern or flag throws Node's
|
|
@@ -1200,11 +1246,14 @@ void scr_regex_release_v(void *re);
|
|
|
1200
1246
|
* spec's "(?:)" source. Borrows both; +1, NULL after a throw. */
|
|
1201
1247
|
ScrRegex *scr_regex_new(ScrStr *pattern, ScrStr *flags);
|
|
1202
1248
|
|
|
1203
|
-
bool scr_regex_test(ScrRegex *re, ScrStr *s); /*
|
|
1204
|
-
/* s.match(re): +1 string[] of
|
|
1205
|
-
* captures hold ""
|
|
1206
|
-
*
|
|
1249
|
+
bool scr_regex_test(ScrRegex *re, ScrStr *s); /* exec state transitions */
|
|
1250
|
+
/* s.match(re): +1 string[] of whole matches under /g, otherwise
|
|
1251
|
+
* [whole, ...captures] (nonparticipating captures hold ""), or NULL for
|
|
1252
|
+
* no match. Non-global /y uses exec state transitions. Borrows both. */
|
|
1207
1253
|
ScrArr *scr_regex_match(ScrStr *s, ScrRegex *re);
|
|
1254
|
+
/* re.exec(s), string-first ABI: match slice with global/sticky lastIndex
|
|
1255
|
+
* transitions. Borrows both; +1 or NULL. */
|
|
1256
|
+
ScrArr *scr_regex_exec(ScrStr *s, ScrRegex *re);
|
|
1208
1257
|
/* s.search(re): the first match's UTF-16 index, or -1 — a fresh exec from
|
|
1209
1258
|
* position 0 (Symbol.search never touches lastIndex, so no flag fence:
|
|
1210
1259
|
* /g is irrelevant, /y anchors at 0). Borrows both; never throws. */
|
|
@@ -1277,6 +1326,17 @@ typedef struct {
|
|
|
1277
1326
|
bool live; /* false = tombstone (key/val already released) */
|
|
1278
1327
|
} ScrMapEntry;
|
|
1279
1328
|
|
|
1329
|
+
/* Checked views use the original storage. Slot converters borrow on reads
|
|
1330
|
+
* and return owned references on writes, just like typed Map operations. */
|
|
1331
|
+
typedef struct {
|
|
1332
|
+
const char *type;
|
|
1333
|
+
struct ScrDyn *(*key_box)(uint64_t);
|
|
1334
|
+
uint64_t (*key_unbox)(const struct ScrDyn *);
|
|
1335
|
+
bool (*key_matches)(const struct ScrDyn *);
|
|
1336
|
+
struct ScrDyn *(*val_box)(uint64_t);
|
|
1337
|
+
uint64_t (*val_unbox)(const struct ScrDyn *);
|
|
1338
|
+
} ScrMapDynOps;
|
|
1339
|
+
|
|
1280
1340
|
typedef struct ScrMap {
|
|
1281
1341
|
size_t rc; /* SIZE_MAX = immortal (unused for maps; kept per convention) */
|
|
1282
1342
|
ScrMapKeyKind key_kind;
|
|
@@ -1297,8 +1357,16 @@ typedef struct ScrMap {
|
|
|
1297
1357
|
size_t nbuckets; /* power of two; >= 2 * ecap so probes terminate */
|
|
1298
1358
|
size_t *buckets; /* entry indices; SIZE_MAX = empty */
|
|
1299
1359
|
size_t iter_depth; /* > 0: an iteration is active — no compaction */
|
|
1360
|
+
const ScrMapDynOps *dyn_ops;
|
|
1300
1361
|
} ScrMap;
|
|
1301
1362
|
|
|
1363
|
+
void scr_map_dyn_attach(ScrMap *map, const ScrMapDynOps *ops);
|
|
1364
|
+
struct ScrDyn *scr_map_dyn_key(const ScrMap *map, double index);
|
|
1365
|
+
struct ScrDyn *scr_map_dyn_value(const ScrMap *map, double index);
|
|
1366
|
+
struct ScrDyn *scr_map_dyn_get(ScrMap *map, const struct ScrDyn *key);
|
|
1367
|
+
bool scr_map_dyn_has(ScrMap *map, const struct ScrDyn *key, bool remove);
|
|
1368
|
+
void scr_map_dyn_set(ScrMap *map, const struct ScrDyn *key, const struct ScrDyn *value, bool set);
|
|
1369
|
+
|
|
1302
1370
|
/* retain/release/trace are NULL for scalar value kinds; retain/release are
|
|
1303
1371
|
* required for SCR_MAP_VAL_REF; trace is non-NULL iff the value type is
|
|
1304
1372
|
* cycle-capable (the map then allocates with the collector header). */
|
|
@@ -1997,7 +2065,9 @@ ScrStream *scr_stream_set_push_encoding(ScrStream *s, ScrStr *enc);
|
|
|
1997
2065
|
bool scr_stream_push_null(ScrStream *s);
|
|
1998
2066
|
void scr_stream_unshift(ScrStream *s, ScrBytes *chunk);
|
|
1999
2067
|
void scr_stream_unshift_str(ScrStream *s, ScrStr *str);
|
|
2000
|
-
ScrBytes *scr_stream_read(ScrStream *s, double size);
|
|
2068
|
+
ScrBytes *scr_stream_read(ScrStream *s, double size);
|
|
2069
|
+
ScrStream *scr_stream_on_dyn(ScrStream *s, ScrStr *name, ScrDyn *cb, bool once, bool prepend);
|
|
2070
|
+
ScrDyn *scr_stream_read_dyn(ScrStream *s, ScrDyn *size); /* +1 or NULL; size < 0 = all/first; throws once encoded (the static type is Buffer|null) */
|
|
2001
2071
|
/* setEncoding(enc): string-chunk mode — pushes decode through the
|
|
2002
2072
|
* StringDecoder, 'data' delivers strings (the emit ABI carries both
|
|
2003
2073
|
* payload slots; see scr_stream_emit_data), lengths count JS string
|
|
@@ -2212,10 +2282,8 @@ void scr_exc_clear(void);
|
|
|
2212
2282
|
* refcounted local, and every runtime question a catch body may ask —
|
|
2213
2283
|
* typeof-style kind tests (emitted as direct kind reads), instanceof over
|
|
2214
2284
|
* hierarchy payloads, payload extraction, rethrow — reads the box. The box
|
|
2215
|
-
*
|
|
2216
|
-
*
|
|
2217
|
-
* payload reference simply counts as an external edge — trial deletion
|
|
2218
|
-
* restores it on scan. */
|
|
2285
|
+
* participates in cycle collection because a closure may capture the
|
|
2286
|
+
* binding and its payload may retain that closure. */
|
|
2219
2287
|
typedef struct ScrCaught {
|
|
2220
2288
|
size_t rc;
|
|
2221
2289
|
ScrExcKind kind; /* never SCR_EXC_NONE */
|
|
@@ -2230,6 +2298,7 @@ typedef struct ScrCaught {
|
|
|
2230
2298
|
ScrCaught *scr_exc_take(void); /* moves the pending cell into a fresh box (+1) */
|
|
2231
2299
|
ScrCaught *scr_caught_retain(ScrCaught *c);
|
|
2232
2300
|
void scr_caught_release(ScrCaught *c); /* NULL-tolerant */
|
|
2301
|
+
void scr_caught_trace_v(void *c, ScrTraceVisit visit, void *ctx);
|
|
2233
2302
|
/* Replace the pending disposal error with a SuppressedError and consume the
|
|
2234
2303
|
* original body-error snapshot. The current exception cell must be pending. */
|
|
2235
2304
|
void scr_exc_suppress(ScrCaught *suppressed);
|
|
@@ -2814,7 +2883,11 @@ ScrChild *scr_fork(double target, ScrArr *args, double in_mode,
|
|
|
2814
2883
|
ScrChild *scr_spawn_opts(ScrStr *cmd, ScrArr *args, double in_mode,
|
|
2815
2884
|
double out_mode, double err_mode, double out_fd,
|
|
2816
2885
|
double err_fd, bool detached, bool shell, bool has_env,
|
|
2817
|
-
|
|
2886
|
+
ScrArr *env_pairs, ScrStr *cwd);
|
|
2887
|
+
/* Runtime options use the same spawn core; validation and explicit
|
|
2888
|
+
* unsupported-option refusals throw before starting a child. Borrows. */
|
|
2889
|
+
ScrChild *scr_spawn_dynamic(ScrStr *cmd, ScrArr *args, const ScrDyn *options);
|
|
2890
|
+
void scr_child_on_spawn(ScrChild *child, ScrClosure *cb); /* moves zero-argument callback */
|
|
2818
2891
|
/* The callback slice: file + args, default options. The returned child has
|
|
2819
2892
|
* all three stdio slots piped; stdout/stderr are captured internally and
|
|
2820
2893
|
* the callback moves into the child registry until settlement. */
|
|
@@ -2902,9 +2975,28 @@ bool scr_child_killed(ScrChild *c);
|
|
|
2902
2975
|
bool scr_child_kill(ScrChild *c, const ScrStr *signal);
|
|
2903
2976
|
bool scr_child_kill_num(ScrChild *c, double signum);
|
|
2904
2977
|
void scr_child_unref(ScrChild *c);
|
|
2978
|
+
void scr_child_ref(ScrChild *c);
|
|
2905
2979
|
/* Installs ChildProcess's checked-dynamic handle identity bridge. Emitted
|
|
2906
2980
|
* programs call this only when the child_process surface is present. */
|
|
2907
2981
|
void scr_child_dyn_install(void);
|
|
2982
|
+
void scr_child_on_dyn(ScrChild *child, ScrStr *event, ScrDyn *listener); /* borrowed */
|
|
2983
|
+
/* Optional native-stream bridge. The table avoids a stream dependency
|
|
2984
|
+
* in programs that only use the child-process surface. */
|
|
2985
|
+
typedef struct ScrChildStreamOps {
|
|
2986
|
+
ScrStream *(*readable)(void);
|
|
2987
|
+
ScrStream *(*writable)(ScrClosure *, ScrStreamChunkInv, ScrClosure *, ScrStreamPlainInv);
|
|
2988
|
+
void *(*retain)(void *);
|
|
2989
|
+
void (*release)(void *);
|
|
2990
|
+
ScrTraceFn trace;
|
|
2991
|
+
bool (*push)(ScrStream *, ScrBytes *);
|
|
2992
|
+
bool (*end)(ScrStream *);
|
|
2993
|
+
void (*write_done)(ScrStream *, ScrError *);
|
|
2994
|
+
void (*final_done)(ScrStream *, ScrError *);
|
|
2995
|
+
} ScrChildStreamOps;
|
|
2996
|
+
extern const ScrChildStreamOps scr_stream_child_ops;
|
|
2997
|
+
ScrDyn *scr_stream_dyn_view(ScrStream *stream); /* borrowed; +1 live method/property view */
|
|
2998
|
+
void scr_child_dyn_streams_install(const ScrChildStreamOps *ops,
|
|
2999
|
+
ScrDyn *(*readable_box)(void *), ScrDyn *(*writable_box)(void *));
|
|
2908
3000
|
bool scr_children_reffed_pending(void);
|
|
2909
3001
|
void scr_children_teardown(void);
|
|
2910
3002
|
/* Node's signal-name table (scr_lib.c), shared with child.kill: the
|
|
@@ -2943,6 +3035,7 @@ ScrStr *scr_crypto_hash_digest_str(ScrStr *alg, ScrStr *data, ScrStr *enc);
|
|
|
2943
3035
|
ScrStr *scr_crypto_hash_digest_bytes(ScrStr *alg, ScrBytes *data, ScrStr *enc);
|
|
2944
3036
|
typedef struct ScrCryptoHash ScrCryptoHash;
|
|
2945
3037
|
ScrCryptoHash *scr_crypto_hash_new(ScrStr *alg);
|
|
3038
|
+
ScrDyn *scr_crypto_native(void);
|
|
2946
3039
|
ScrCryptoHash *scr_crypto_hmac_new_str(ScrStr *alg, ScrStr *key);
|
|
2947
3040
|
ScrCryptoHash *scr_crypto_hmac_new_bytes(ScrStr *alg, ScrBytes *key);
|
|
2948
3041
|
ScrCryptoHash *scr_crypto_hash_retain(ScrCryptoHash *h);
|
|
@@ -3211,6 +3304,7 @@ ScrBigInt *scr_bigint_shl(ScrBigInt *a, ScrBigInt *count);
|
|
|
3211
3304
|
ScrBigInt *scr_bigint_shr(ScrBigInt *a, ScrBigInt *count);
|
|
3212
3305
|
bool scr_bigint_eq(ScrBigInt *a, ScrBigInt *b);
|
|
3213
3306
|
bool scr_bigint_eq_string(ScrBigInt *a, ScrStr *b); /* StringToBigInt failure is false */
|
|
3307
|
+
double scr_bigint_cmp_string(ScrBigInt *a, ScrStr *b); /* 2 = invalid StringToBigInt */
|
|
3214
3308
|
double scr_bigint_cmp_f64(ScrBigInt *a, ScrBigInt *b); /* -1, 0, 1 */
|
|
3215
3309
|
double scr_bigint_cmp_number(ScrBigInt *a, double b); /* -1, 0, 1; 2 = NaN */
|
|
3216
3310
|
bool scr_bigint_truthy(ScrBigInt *value);
|
|
@@ -3438,6 +3532,8 @@ typedef enum {
|
|
|
3438
3532
|
SCR_DYNH_DATE, /* JavaScript Date with stable native identity */
|
|
3439
3533
|
SCR_DYNH_ITERATOR, /* live native array/string/byte iterator */
|
|
3440
3534
|
SCR_DYNH_CONSOLE, /* stored global console value */
|
|
3535
|
+
SCR_DYNH_SEARCH_PARAMS, /* live WHATWG URLSearchParams */
|
|
3536
|
+
SCR_DYNH_FETCH_REQUEST,
|
|
3441
3537
|
SCR_DYNH_COUNT,
|
|
3442
3538
|
} ScrDynHandleTag;
|
|
3443
3539
|
|
|
@@ -3450,6 +3546,7 @@ typedef struct ScrDynTypedCast {
|
|
|
3450
3546
|
void *ptr;
|
|
3451
3547
|
void *(*retain)(void *);
|
|
3452
3548
|
void (*release)(void *);
|
|
3549
|
+
bool traced;
|
|
3453
3550
|
struct ScrDynTypedCast *next;
|
|
3454
3551
|
} ScrDynTypedCast;
|
|
3455
3552
|
typedef struct ScrJsval ScrJsval; /* opaque island cell (C11 repeat; the
|
|
@@ -3526,10 +3623,7 @@ struct ScrDyn {
|
|
|
3526
3623
|
/* SCR_DYN_FUNC: the boxed closure (owned) + its call descriptor. `sig`
|
|
3527
3624
|
* and `name` are static compiler-emitted literals (never freed); name
|
|
3528
3625
|
* may be NULL (anonymous — inspect prints [Function (anonymous)]).
|
|
3529
|
-
* The dyn→closure edge is
|
|
3530
|
-
* has no trace header): trial deletion treats it as an external root,
|
|
3531
|
-
* so nothing dangles — a cycle THROUGH a dyn-boxed function is merely
|
|
3532
|
-
* never collected (documented divergence). */
|
|
3626
|
+
* The dyn→closure ownership edge is traced by the cycle collector. */
|
|
3533
3627
|
struct { ScrClosure *clo; ScrDynThunk thunk; const char *sig; const char *name; uint32_t arity; ScrClassObj *class_obj; } fn;
|
|
3534
3628
|
/* Native handles normally keep conservative ownership edges. Sets
|
|
3535
3629
|
* backed by cycle-capable maps expose their edge to the collector.
|
|
@@ -3553,6 +3647,7 @@ struct ScrDyn {
|
|
|
3553
3647
|
ScrDyn *materialized;
|
|
3554
3648
|
ScrDynTypedCast *casts;
|
|
3555
3649
|
bool traced; /* native referent has a cycle header */
|
|
3650
|
+
bool observed; /* native release reports this identity's disposal */
|
|
3556
3651
|
} typed_ref;
|
|
3557
3652
|
/* SCR_DYN_PROMISE: the retained promise. The boundary contract: it
|
|
3558
3653
|
* settles with a dyn payload (SCR_EXC_REF ScrDyn fulfillment or a
|
|
@@ -3618,6 +3713,7 @@ ScrDyn *scr_dyn_obj_keys(const ScrDyn *v);
|
|
|
3618
3713
|
ScrDyn *scr_dyn_for_in_keys(const ScrDyn *v);
|
|
3619
3714
|
/* Snapshot all own string keys of a SCR_DYN_OBJ in JS order. Returns +1. */
|
|
3620
3715
|
ScrDyn *scr_dyn_obj_own_keys(const ScrDyn *v);
|
|
3716
|
+
ScrDyn *scr_dyn_own_keys(const ScrDyn *value);
|
|
3621
3717
|
ScrDyn *scr_dyn_get_own_property_names(const ScrDyn *value);
|
|
3622
3718
|
ScrDyn *scr_dyn_get_own_property_symbols(const ScrDyn *value);
|
|
3623
3719
|
/* Object.hasOwn over a dyn receiver: OBJ member presence, ARR index
|
|
@@ -3631,6 +3727,7 @@ bool scr_dyn_property_is_enumerable(const ScrDyn *value, const ScrStr *key);
|
|
|
3631
3727
|
* and scalar/function/handle sources copy nothing. */
|
|
3632
3728
|
ScrDyn *scr_dyn_assign(ScrDyn *target, const ScrDyn *src);
|
|
3633
3729
|
ScrDyn *scr_dyn_copy_data_properties(ScrDyn *target, const ScrDyn *src);
|
|
3730
|
+
ScrDyn *scr_dyn_object_rest(const ScrDyn *source, const ScrDyn *excluded);
|
|
3634
3731
|
ScrDyn *scr_dyn_copy_property_descriptors(ScrDyn *target, const ScrDyn *src);
|
|
3635
3732
|
/* Variadic Object.assign (the spread-source form): the compiler packs
|
|
3636
3733
|
* every source into one fresh dyn array — pack_push retains a plain
|
|
@@ -3665,9 +3762,12 @@ ScrDyn *scr_dyn_native_set(ScrMap *value); /* borrowed backing, +1 box */
|
|
|
3665
3762
|
bool scr_dyn_native_set_is(const ScrDyn *value);
|
|
3666
3763
|
ScrDyn *scr_dyn_native_map(ScrMap *value); /* borrowed backing, +1 box */
|
|
3667
3764
|
bool scr_dyn_native_map_is(const ScrDyn *value);
|
|
3765
|
+
void scr_regex_reset_last_index(ScrRegex *re, double index);
|
|
3668
3766
|
ScrRegex *scr_regex_new_checked(const ScrDyn *pattern, const ScrDyn *flags);
|
|
3669
3767
|
ScrDyn *scr_dyn_native_url(ScrUrl *value);
|
|
3670
3768
|
bool scr_dyn_native_url_is(const ScrDyn *value);
|
|
3769
|
+
ScrDyn *scr_dyn_native_search_params(ScrSearchParams *value);
|
|
3770
|
+
bool scr_dyn_native_search_params_is(const ScrDyn *value);
|
|
3671
3771
|
bool scr_dyn_native_date_is(const ScrDyn *value);
|
|
3672
3772
|
ScrDyn *scr_dyn_native_date_new(const ScrDyn *arguments);
|
|
3673
3773
|
double scr_dyn_native_date_value(const ScrDyn *value);
|
|
@@ -3695,7 +3795,9 @@ ScrDyn *scr_dyn_new_str(ScrStr *s);
|
|
|
3695
3795
|
ScrDyn *scr_dyn_new_arr(void);
|
|
3696
3796
|
ScrDyn *scr_dyn_new_obj(void);
|
|
3697
3797
|
ScrDyn *scr_dyn_iterator(const ScrDyn *value, const ScrStr *spell);
|
|
3798
|
+
ScrDyn *scr_dyn_iterator_optional(const ScrDyn *value);
|
|
3698
3799
|
void scr_dyn_install_iterator_symbol(ScrDyn *key);
|
|
3800
|
+
void scr_dyn_install_async_iterator_symbol(ScrDyn *key);
|
|
3699
3801
|
ScrDyn *scr_dyn_array_values_function(void);
|
|
3700
3802
|
ScrDyn *scr_dyn_array_from_iterator(const ScrDyn *value);
|
|
3701
3803
|
ScrDyn *scr_dyn_iterator_result(ScrDyn *value);
|
|
@@ -3730,6 +3832,11 @@ void scr_dyn_proxy_unsupported(const char *operation);
|
|
|
3730
3832
|
/* Retains the native view, preserving identity and its shared backing
|
|
3731
3833
|
* allocation across the checked-dynamic boundary. Borrows b. */
|
|
3732
3834
|
ScrDyn *scr_dyn_new_bytes(const ScrBytes *b);
|
|
3835
|
+
ScrDyn *scr_bytes_constructor(const ScrStr *name);
|
|
3836
|
+
bool scr_bytes_instanceof(const ScrDyn *value, const ScrDyn *callee);
|
|
3837
|
+
bool scr_dyn_data_view_is(const ScrDyn *value);
|
|
3838
|
+
ScrDyn *scr_dyn_construct(const ScrDyn *callee, const ScrDyn *args, const ScrStr *what);
|
|
3839
|
+
ScrDyn *scr_bytes_construct(const ScrDyn *callee, const ScrDyn *args, const ScrStr *what);
|
|
3733
3840
|
ScrDyn *scr_dyn_bytes_key_get(const ScrDyn *value, const ScrStr *key);
|
|
3734
3841
|
/* The Buffer-flavored twin (stream chunks): string coercion/toString
|
|
3735
3842
|
* decode utf8 instead of joining elements. */
|
|
@@ -3749,6 +3856,11 @@ ScrDyn *scr_dyn_new_typed_ref_traced(
|
|
|
3749
3856
|
const char *type_key, size_t type_key_len,
|
|
3750
3857
|
ScrDyn *(*materialize)(void *),
|
|
3751
3858
|
void (*commit)(void *, const ScrDyn *));
|
|
3859
|
+
ScrDyn *scr_dyn_new_typed_ref_observed(
|
|
3860
|
+
void *ptr, void *(*retain)(void *), void (*release)(void *),
|
|
3861
|
+
const char *type_key, size_t type_key_len,
|
|
3862
|
+
ScrDyn *(*materialize)(void *),
|
|
3863
|
+
void (*commit)(void *, const ScrDyn *));
|
|
3752
3864
|
bool scr_dyn_typed_ref_is(
|
|
3753
3865
|
const ScrDyn *d, const char *type_key, size_t type_key_len);
|
|
3754
3866
|
bool scr_dyn_typed_ref_is_key(const ScrDyn *d, const ScrStr *type_key);
|
|
@@ -3760,11 +3872,12 @@ void *scr_dyn_typed_ref_cached_cast(
|
|
|
3760
3872
|
const ScrDyn *d, const char *type_key, size_t type_key_len); /* +1/NULL */
|
|
3761
3873
|
void scr_dyn_typed_ref_cache_cast(
|
|
3762
3874
|
ScrDyn *d, const char *type_key, size_t type_key_len, void *ptr,
|
|
3763
|
-
void *(*retain)(void *), void (*release)(void *));
|
|
3875
|
+
void *(*retain)(void *), void (*release)(void *), bool traced);
|
|
3764
3876
|
/* Retains a SCR_DYN_BYTES view (+1) for checked extraction. */
|
|
3765
3877
|
ScrBytes *scr_dyn_bytes_unbox(const ScrDyn *d);
|
|
3766
3878
|
/* Exact numeric typed-array brand; elem is a ScrBytesElem tag. */
|
|
3767
3879
|
bool scr_dyn_bytes_is(const ScrDyn *d, int elem);
|
|
3880
|
+
bool scr_dyn_typed_array_is(const ScrDyn *d, int elem);
|
|
3768
3881
|
void scr_dyn_arr_push(ScrDyn *arr, ScrDyn *item);
|
|
3769
3882
|
/* Spread completion for a runtime-arity argument list (`f(...xs)` in the
|
|
3770
3883
|
* checked-dynamic tier): flattens `src` into `arr` per JS's spread over the
|
|
@@ -3780,6 +3893,7 @@ void scr_dyn_arr_push_spread(ScrDyn *arr, const ScrDyn *src, const char *what);
|
|
|
3780
3893
|
* compile-time source spelling), else the runtime kind wording. Borrows
|
|
3781
3894
|
* both; NULL with the exception pending on the throw. */
|
|
3782
3895
|
ScrDyn *scr_dyn_iter_pack(const ScrDyn *src, const ScrStr *msg);
|
|
3896
|
+
ScrDyn *scr_dyn_jsval_iter_n(const ScrDyn *src, double count);
|
|
3783
3897
|
/* Map constructor seeds: retain array inputs for live iteration, accept
|
|
3784
3898
|
* nullish inputs as empty, and validate each entry before reading 0/1. */
|
|
3785
3899
|
ScrDyn *scr_dyn_map_seed_entries(const ScrDyn *src);
|
|
@@ -3834,7 +3948,14 @@ ScrStr *scr_dyn_to_string(const ScrDyn *d, const ScrStr *enc);
|
|
|
3834
3948
|
* null-prototype dictionary throws "<what> is not a function" — its
|
|
3835
3949
|
* prototype chain has no toString (Node's answer). */
|
|
3836
3950
|
ScrStr *scr_dyn_to_string_method(const ScrDyn *d, const ScrStr *enc, const ScrStr *what);
|
|
3951
|
+
ScrDyn *scr_dyn_object_prototype(void);
|
|
3952
|
+
ScrDyn *scr_dyn_function_apply(void);
|
|
3953
|
+
ScrDyn *scr_dyn_reflect_apply(ScrDyn *target, ScrDyn *receiver, ScrDyn *arguments_list);
|
|
3954
|
+
ScrDyn *scr_dyn_apply_array_like(const ScrDyn *target, const ScrDyn *receiver, const ScrDyn *arguments, const char *what);
|
|
3955
|
+
bool scr_dyn_same_value(const ScrDyn *left, const ScrDyn *right);
|
|
3956
|
+
ScrDyn *scr_dyn_builtin_method(const ScrStr *prototype, const ScrStr *method);
|
|
3837
3957
|
ScrStr *scr_dyn_to_string_argument(const ScrDyn *d, const ScrDyn *argument, const ScrStr *what);
|
|
3958
|
+
ScrStr *scr_num_to_string_radix(double value, const ScrDyn *radix);
|
|
3838
3959
|
/* JS String() over the dyn kind (units render "null"/"undefined" where
|
|
3839
3960
|
* scr_dyn_to_string throws) — the web globals' WebIDL ToString. +1. */
|
|
3840
3961
|
ScrStr *scr_dyn_string_coerce(const ScrDyn *d);
|
|
@@ -3847,8 +3968,10 @@ bool scr_dyn_number_coerce_js(const ScrDyn *d, double *out);
|
|
|
3847
3968
|
* with the exception pending when an object hook throws/refuses. */
|
|
3848
3969
|
double scr_dyn_number_coerce(const ScrDyn *d);
|
|
3849
3970
|
double scr_dyn_number_constructor(const ScrDyn *d);
|
|
3971
|
+
ScrBigInt *scr_dyn_bigint_constructor(const ScrDyn *d);
|
|
3850
3972
|
ScrDyn *scr_dyn_add(const ScrDyn *left, const ScrDyn *right); /* borrowed; +1 or NULL/pending */
|
|
3851
3973
|
ScrDyn *scr_dyn_arithmetic(const ScrDyn *left, const ScrDyn *right, const ScrStr *operation);
|
|
3974
|
+
bool scr_dyn_compare(const ScrDyn *left, const ScrDyn *right, const ScrStr *operation);
|
|
3852
3975
|
ScrDyn *scr_dyn_bitwise(const ScrDyn *left, const ScrDyn *right, const ScrStr *operation);
|
|
3853
3976
|
|
|
3854
3977
|
/* `d instanceof TypeError` (and the other builtin error classes) on a
|
|
@@ -3880,6 +4003,9 @@ void scr_sc_validate_options(const ScrDyn *options);
|
|
|
3880
4003
|
/* An %Error as the boundary's dyn shape ({name, message[, code]}).
|
|
3881
4004
|
* Borrows; +1. */
|
|
3882
4005
|
ScrDyn *scr_dyn_from_error(const ScrError *e);
|
|
4006
|
+
void scr_error_register_dyn(const ScrVt *vt, ScrDyn *(*box)(void *));
|
|
4007
|
+
ScrDyn *scr_error_dyn_fields(const ScrError *e);
|
|
4008
|
+
void scr_error_commit_dyn(ScrError *e, const ScrDyn *view);
|
|
3883
4009
|
/* The reverse extraction, riding the same identity cache: a dyn error
|
|
3884
4010
|
* that came from a runtime ScrError answers THAT instance (+1;
|
|
3885
4011
|
* out-and-back crossings compare reference-equal); alien %error objects
|
|
@@ -3904,6 +4030,8 @@ bool scr_dyn_strict_eq(const ScrDyn *a, const ScrDyn *b);
|
|
|
3904
4030
|
* a name the kind's prototype lacks throws Node's "<what> is not a
|
|
3905
4031
|
* function"; OBJ receivers call the own member. recv/args borrowed,
|
|
3906
4032
|
* result owned (+1). MAY THROW (NULL with the exception pending). */
|
|
4033
|
+
ScrDyn *scr_dyn_prepare_method(ScrDyn *recv, const char *method);
|
|
4034
|
+
ScrDyn *scr_dyn_invoke_prepared(ScrDyn *recv, ScrDyn *callee, const char *method, ScrDyn *const *args, size_t argc, const char *what);
|
|
3907
4035
|
ScrDyn *scr_dyn_invoke(ScrDyn *recv, const char *method, ScrDyn *const *args, size_t argc, const char *what);
|
|
3908
4036
|
/* Keyed read on a FUNC node: the own-property table first (defineProperties
|
|
3909
4037
|
* writes land there), then "name" (the box's best-effort static name; ""
|
|
@@ -3922,6 +4050,7 @@ ScrDyn *scr_dyn_define_props(ScrDyn *target, ScrDyn *descs);
|
|
|
3922
4050
|
* must be static literals (the box never frees them; name may be NULL). */
|
|
3923
4051
|
ScrDyn *scr_dyn_new_func(ScrClosure *clo, ScrDynThunk thunk, uint32_t arity, const char *sig, const char *name);
|
|
3924
4052
|
ScrDyn *scr_dyn_new_class(ScrClassObj *cls, const char *type_key);
|
|
4053
|
+
bool scr_dyn_class_is_key(const ScrDyn *value, const ScrStr *type_key);
|
|
3925
4054
|
bool scr_dyn_class_is(const ScrDyn *value, const char *type_key);
|
|
3926
4055
|
/* Calls a dyn value: a non-function kind throws the catchable TypeError
|
|
3927
4056
|
* "<what> is not a function" (Node's wording — `what` is the call site's
|
|
@@ -3945,8 +4074,12 @@ typedef struct ScrDynPath {
|
|
|
3945
4074
|
const char *key;
|
|
3946
4075
|
size_t index;
|
|
3947
4076
|
} ScrDynPath;
|
|
4077
|
+
ScrSearchParams *scr_dyn_native_search_params_check(const ScrDyn *value, const ScrDynPath *path);
|
|
4078
|
+
ScrSearchParams *scr_sp_new_checked(const ScrDyn *value);
|
|
3948
4079
|
ScrMap *scr_dyn_native_set_check(const ScrDyn *value, const ScrDynPath *path);
|
|
3949
4080
|
ScrMap *scr_dyn_native_map_check(const ScrDyn *value, const ScrDynPath *path);
|
|
4081
|
+
bool scr_dyn_native_collection_is(const ScrDyn *value, int map, const char *type);
|
|
4082
|
+
ScrMap *scr_dyn_native_collection_check(const ScrDyn *value, int map, const char *type, const ScrDynPath *path);
|
|
3950
4083
|
ScrStr *scr_url_checked_to_path(const ScrDyn *value);
|
|
3951
4084
|
ScrUrl *scr_dyn_native_url_check(const ScrDyn *value, const ScrDynPath *path);
|
|
3952
4085
|
ScrRegex *scr_dyn_native_regex_check(const ScrDyn *value, const ScrDynPath *path);
|
|
@@ -3996,7 +4129,10 @@ typedef struct ScrDynHandleOps {
|
|
|
3996
4129
|
/* Immutable native iterables may drain into a fresh array. Mutable or
|
|
3997
4130
|
* effectful iterators need a separate step/close protocol. NULL = not iterable. */
|
|
3998
4131
|
ScrDyn *(*iter_pack)(void *h);
|
|
4132
|
+
/* A live native iterator step; index advances only when a value is emitted. */
|
|
4133
|
+
ScrDyn *(*iter_step)(void *h, double *index, unsigned selection);
|
|
3999
4134
|
} ScrDynHandleOps;
|
|
4135
|
+
ScrDyn *scr_dyn_native_handle_iterator(ScrDyn *source, unsigned selection);
|
|
4000
4136
|
|
|
4001
4137
|
ScrDyn *scr_intl_segmenter_new(void);
|
|
4002
4138
|
ScrStr *scr_process_builtin_id(ScrDyn *id, ScrArr *known);
|
|
@@ -4108,6 +4244,7 @@ typedef struct ScrDynJsvalOps {
|
|
|
4108
4244
|
* pending. */
|
|
4109
4245
|
ScrDyn *(*iter_drain)(ScrJsval *cell, bool spread, const ScrStr *spell);
|
|
4110
4246
|
ScrDyn *(*iterator)(ScrJsval *cell, const ScrStr *spell, bool array_from);
|
|
4247
|
+
ScrDyn *(*iter_n)(ScrJsval *cell, double count);
|
|
4111
4248
|
} ScrDynJsvalOps;
|
|
4112
4249
|
|
|
4113
4250
|
/* The allocator view the gated constructor uses (installs the ops);
|
|
@@ -4165,6 +4302,7 @@ void scr_dyn_this_pop(void);
|
|
|
4165
4302
|
* handle whose tag has no installed ops — a unit that fires without its
|
|
4166
4303
|
* dyn half never binds). */
|
|
4167
4304
|
ScrDyn *scr_dyn_this_get(void);
|
|
4305
|
+
ScrDyn *scr_gen_receiver(void);
|
|
4168
4306
|
|
|
4169
4307
|
/* The data-chunk encoding window (setEncoding — scr_json.c's note): the
|
|
4170
4308
|
* firing site opens/closes it around a 'data' pass; scr_dyn_new_chunk
|
|
@@ -4321,6 +4459,8 @@ long scr_obj_live_count(void);
|
|
|
4321
4459
|
* tiebreaks) drives everything after %main returns. See scr_async.c.
|
|
4322
4460
|
*/
|
|
4323
4461
|
ScrPromise *scr_promise_new(void);
|
|
4462
|
+
void scr_promise_share_identity(ScrPromise *dst, ScrPromise *src);
|
|
4463
|
+
bool scr_promise_identity_equal(ScrPromise *a, ScrPromise *b);
|
|
4324
4464
|
ScrPromise *scr_promise_retain(ScrPromise *p);
|
|
4325
4465
|
void scr_promise_release(ScrPromise *p);
|
|
4326
4466
|
void *scr_promise_retain_v(void *p);
|
|
@@ -4373,6 +4513,7 @@ void scr_promise_rethrow_top_level(ScrPromise *p);
|
|
|
4373
4513
|
* payload as a dyn value (+1; void fulfillments answer the undefined
|
|
4374
4514
|
* value), or NULL with the rejection re-thrown into the awaiter. */
|
|
4375
4515
|
ScrDyn *scr_await_dyn(ScrPromise *p);
|
|
4516
|
+
void scr_promise_resolve_dyn(ScrPromise *destination, ScrDyn *value);
|
|
4376
4517
|
/* `await v` over a checked-dynamic VALUE: dyn promises adopt, everything
|
|
4377
4518
|
* else takes JS's one-hop non-thenable await and answers itself (+1). */
|
|
4378
4519
|
ScrDyn *scr_await_dyn_value(ScrDyn *v);
|
|
@@ -4859,6 +5000,11 @@ long scr_promise_live_count(void);
|
|
|
4859
5000
|
* --dynamic the same TU boots the broader engine web surface. The
|
|
4860
5001
|
* emitted main calls scr_fetch_install in either form. */
|
|
4861
5002
|
void scr_fetch_install(void);
|
|
5003
|
+
ScrPromise *scr_fetch_input(ScrDyn *input, ScrDyn *init);
|
|
5004
|
+
ScrDyn *scr_fetch_function(void);
|
|
5005
|
+
void scr_global_fetch_install(ScrDyn *(*get)(void));
|
|
5006
|
+
ScrDyn *scr_fetch_request_new(ScrDyn *input, ScrDyn *init);
|
|
5007
|
+
ScrDyn *scr_fetch_headers_new(ScrDyn *init);
|
|
4862
5008
|
ScrPromise *scr_fetch_static(ScrStr *url, ScrDyn *init); /* +1 promise<Response handle> */
|
|
4863
5009
|
ScrDyn *scr_fetch_response_new(ScrDyn *body, ScrDyn *init); /* borrowed args; +1 Response handle or NULL pending */
|
|
4864
5010
|
ScrPromise *scr_fetch_response_json(ScrDyn *response); /* +1 promise<dyn> */
|
|
@@ -5437,8 +5583,8 @@ double scr_bit_not(double a);
|
|
|
5437
5583
|
* construction (owners point at nothing): never part of a cycle, no
|
|
5438
5584
|
* trace. Element reads widen to double; writes coerce JS-exactly (ToUint8
|
|
5439
5585
|
* / ToUint32 modular truncation, double→float rounding for f32).
|
|
5440
|
-
* Out-of-bounds ELEMENT
|
|
5441
|
-
*
|
|
5586
|
+
* Out-of-bounds typed ELEMENT reads trap like arrays; invalid writes are
|
|
5587
|
+
* ignored as in JavaScript. The Node-shaped operations
|
|
5442
5588
|
* (construction lengths, set(), the read/write numeric families, the
|
|
5443
5589
|
* DataView constructor and getters) THROW catchable RangeErrors exactly
|
|
5444
5590
|
* where Node throws. */
|
|
@@ -5466,6 +5612,7 @@ typedef struct ScrBytes {
|
|
|
5466
5612
|
* points into backing->data — released, never freed. */
|
|
5467
5613
|
struct ScrBytes *backing;
|
|
5468
5614
|
bool is_buffer; /* Buffer brand belongs to the view, not its backing. */
|
|
5615
|
+
bool is_data_view; /* DataView is distinct from a numeric typed array. */
|
|
5469
5616
|
bool external; /* Root aliases foreign memory; releasing it never frees data. */
|
|
5470
5617
|
} ScrBytes;
|
|
5471
5618
|
|
|
@@ -5511,6 +5658,7 @@ ScrBytes *scr_bytes_as_buffer(ScrBytes *bytes); /* borrows; +1, Buffer factory o
|
|
|
5511
5658
|
* byte storage, including when src is itself a subarray. */
|
|
5512
5659
|
ScrBytes *scr_bytes_buffer_view(ScrBytes *src, ScrBytesElem elem,
|
|
5513
5660
|
double offset, bool has_len, double length);
|
|
5661
|
+
ScrDyn *scr_array_buffer_constructor(void);
|
|
5514
5662
|
ScrDyn *scr_array_buffer_new(ScrDyn *length);
|
|
5515
5663
|
ScrDyn *scr_array_buffer_from_bytes(ScrBytes *view);
|
|
5516
5664
|
bool scr_array_buffer_is(const ScrDyn *value);
|
|
@@ -5594,9 +5742,8 @@ double scr_dataview_get(const ScrBytes *b, double byte_off, ScrDataViewGet kind,
|
|
|
5594
5742
|
* with the getters' one RangeError. */
|
|
5595
5743
|
void scr_dataview_set(ScrBytes *b, double byte_off, double value, ScrDataViewGet kind, bool le);
|
|
5596
5744
|
|
|
5597
|
-
/* Element read/write.
|
|
5598
|
-
*
|
|
5599
|
-
* the divergence from JS's undefined-read/ignored-write). Writes coerce
|
|
5745
|
+
/* Element read/write. Invalid typed reads trap; invalid writes are ignored.
|
|
5746
|
+
* Checked reads preserve JavaScript's undefined result. Valid writes coerce
|
|
5600
5747
|
* JS-exactly: u8/u32 by modular truncation (NaN/±Infinity → 0, truncate
|
|
5601
5748
|
* toward zero, wrap mod 2^8/2^32), f32 by double→float rounding. */
|
|
5602
5749
|
double scr_bytes_get(const ScrBytes *b, double i);
|
|
@@ -5673,6 +5820,12 @@ ScrStr *scr_bytes_to_str_checked_range(const ScrBytes *b, const ScrStr *enc, dou
|
|
|
5673
5820
|
* same replacement decode as toString("utf8") with the leading BOM
|
|
5674
5821
|
* stripped. Borrows; +1; never throws. */
|
|
5675
5822
|
ScrStr *scr_text_decode(const ScrBytes *b);
|
|
5823
|
+
double scr_text_decoder_encoding(const ScrDyn *label);
|
|
5824
|
+
ScrBytes *scr_bytes_buffer_source(const ScrDyn *value);
|
|
5825
|
+
ScrStr *scr_text_decode_buffer_source(const ScrDyn *value);
|
|
5826
|
+
ScrStr *scr_text_decode_options(const ScrBytes *b, bool fatal, bool ignore_bom);
|
|
5827
|
+
ScrStr *scr_text_decode_stream(ScrDyn *state, const ScrBytes *b, double encoding, bool fatal, bool ignore_bom, bool stream);
|
|
5828
|
+
ScrStr *scr_text_decode_legacy_options(const ScrBytes *b, double encoding, bool fatal, bool ignore_bom);
|
|
5676
5829
|
|
|
5677
5830
|
/* TextDecoder with a compile-time WHATWG legacy-encoding id. The frontend
|
|
5678
5831
|
* owns label canonicalization and emits only the ids understood by
|
|
@@ -5693,6 +5846,7 @@ ScrBytes *scr_bytes_from_str(const ScrStr *s, const ScrStr *enc);
|
|
|
5693
5846
|
* Buffer.isEncoding(name) (case-insensitive over Node's alias set).
|
|
5694
5847
|
* Borrow; never throw. */
|
|
5695
5848
|
double scr_bytes_byte_length_str(ScrStr *s, const ScrStr *enc);
|
|
5849
|
+
double scr_buffer_byte_length_dyn(ScrDyn *value, ScrStr *enc);
|
|
5696
5850
|
bool scr_bytes_is_encoding(const ScrStr *s);
|
|
5697
5851
|
|
|
5698
5852
|
/* equals / compare / indexOf-lastIndexOf / fill / copy / swap / write on
|
|
@@ -5868,6 +6022,8 @@ ScrBytes *scr_fs_read_file_bytes(ScrStr *path); /* +1 */
|
|
|
5868
6022
|
* value — a Buffer box for undefined/null, a string for utf8 — or NULL
|
|
5869
6023
|
* with the exception pending. */
|
|
5870
6024
|
ScrDyn *scr_fs_read_file_sync_dyn(ScrStr *path, const ScrDyn *enc);
|
|
6025
|
+
ScrDyn *scr_fs_callback_value(ScrStr *member);
|
|
6026
|
+
ScrDyn *scr_fs_callback_call(ScrStr *member, const ScrDyn *args);
|
|
5871
6027
|
ScrBytes *scr_fs_read_fd_bytes(double fd); /* +1; the fd form (scr_lib.c) */
|
|
5872
6028
|
void scr_fs_write_file_bytes(ScrStr *path, const ScrBytes *data);
|
|
5873
6029
|
void scr_fs_append_file_bytes(ScrStr *path, const ScrBytes *data);
|
|
@@ -7163,10 +7319,8 @@ void scr_assert_iferror_bool(bool b);
|
|
|
7163
7319
|
* %error-marked objects throw with the error's message, everything else
|
|
7164
7320
|
* with the inspection. */
|
|
7165
7321
|
void scr_assert_iferror_dyn(const ScrDyn *v);
|
|
7166
|
-
/* assert.match / assert.doesNotMatch (scr_regex.c):
|
|
7167
|
-
*
|
|
7168
|
-
* modeled (SEMANTICS.md's regex stance), so g/y-flagged regexes test like
|
|
7169
|
-
* their flag-free twins instead of aborting. */
|
|
7322
|
+
/* assert.match / assert.doesNotMatch (scr_regex.c): RegExp.test semantics,
|
|
7323
|
+
* including global/sticky lastIndex transitions. */
|
|
7170
7324
|
void scr_assert_match(ScrStr *s, ScrRegex *re, bool negated, ScrStr *msg, bool has_msg);
|
|
7171
7325
|
/* assert.throws(fn, /regex/) whose thrown ERROR did not match: Node tests
|
|
7172
7326
|
* String(actual) ("Name: message") and reports the regex-mismatch message
|
|
@@ -7204,4 +7358,7 @@ void scr_console_log(size_t n, const ScrLogArg *args);
|
|
|
7204
7358
|
* keeps source order. */
|
|
7205
7359
|
void scr_console_error(size_t n, const ScrLogArg *args);
|
|
7206
7360
|
|
|
7361
|
+
bool scr_fetch_web_is(const ScrDyn *value, const ScrStr *name);
|
|
7362
|
+
bool scr_fetch_stream_is(const ScrDyn *value);
|
|
7363
|
+
|
|
7207
7364
|
#endif /* SCR_RUNTIME_H */
|