@scriptc/compiler 0.2.4 → 0.2.5
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/ambient/scriptc-node-fallback.d.ts +915 -215
- package/ambient/scriptc-overrides.d.ts +5 -1
- package/ambient/scriptc.d.ts +22 -2
- package/dist/backend/build-cache.d.ts +4 -0
- package/dist/backend/build-cache.js +16 -2
- package/dist/backend/build-cache.js.map +1 -1
- package/dist/backend/cycle-analysis.js +17 -5
- package/dist/backend/cycle-analysis.js.map +1 -1
- package/dist/backend/cycle-analysis.test.js +50 -11
- package/dist/backend/cycle-analysis.test.js.map +1 -1
- package/dist/backend/debug-symbols.js.map +1 -1
- package/dist/backend/executable-features.js +2 -1
- package/dist/backend/executable-features.js.map +1 -1
- package/dist/backend/external-c.d.ts +13 -6
- package/dist/backend/external-c.js +15 -3
- package/dist/backend/external-c.js.map +1 -1
- package/dist/backend/ffi-callbacks.js +6 -9
- package/dist/backend/ffi-callbacks.js.map +1 -1
- package/dist/backend/library-identity-markers.js.map +1 -1
- package/dist/backend/library-pack.d.ts +1 -1
- package/dist/backend/library-pack.js +81 -24
- package/dist/backend/library-pack.js.map +1 -1
- package/dist/backend/link-plan-core.js +9 -2
- package/dist/backend/link-plan-core.js.map +1 -1
- package/dist/backend/link-plan.d.ts +1 -1
- package/dist/backend/link-plan.js +4 -5
- package/dist/backend/link-plan.js.map +1 -1
- package/dist/backend/linker.d.ts +1 -1
- package/dist/backend/linker.js +42 -23
- package/dist/backend/linker.js.map +1 -1
- package/dist/backend/literals.js +5 -4
- package/dist/backend/literals.js.map +1 -1
- package/dist/backend/literals.test.js +30 -5
- package/dist/backend/literals.test.js.map +1 -1
- package/dist/backend/llvm/blocks.test.js +5 -2
- package/dist/backend/llvm/blocks.test.js.map +1 -1
- package/dist/backend/llvm/borrowed-inputs.js.map +1 -1
- package/dist/backend/llvm/borrowed-receivers.js +43 -19
- package/dist/backend/llvm/borrowed-receivers.js.map +1 -1
- package/dist/backend/llvm/byte-numbers.js +6 -1
- package/dist/backend/llvm/byte-numbers.js.map +1 -1
- package/dist/backend/llvm/bytes-bounds.js +73 -22
- package/dist/backend/llvm/bytes-bounds.js.map +1 -1
- package/dist/backend/llvm/call-lifetimes.d.ts +3 -0
- package/dist/backend/llvm/call-lifetimes.js +60 -17
- package/dist/backend/llvm/call-lifetimes.js.map +1 -1
- package/dist/backend/llvm/call-lifetimes.test.js +159 -28
- package/dist/backend/llvm/call-lifetimes.test.js.map +1 -1
- package/dist/backend/llvm/checked-value-lifetimes.d.ts +4 -0
- package/dist/backend/llvm/checked-value-lifetimes.js +14 -4
- package/dist/backend/llvm/checked-value-lifetimes.js.map +1 -1
- package/dist/backend/llvm/classes.js +16 -12
- package/dist/backend/llvm/classes.js.map +1 -1
- package/dist/backend/llvm/common.js +4 -1
- package/dist/backend/llvm/common.js.map +1 -1
- package/dist/backend/llvm/counted-loops.js +10 -3
- package/dist/backend/llvm/counted-loops.js.map +1 -1
- package/dist/backend/llvm/debug-info.js +33 -13
- package/dist/backend/llvm/debug-info.js.map +1 -1
- package/dist/backend/llvm/debug-info.test.js +28 -6
- package/dist/backend/llvm/debug-info.test.js.map +1 -1
- package/dist/backend/llvm/dyn.js +68 -22
- package/dist/backend/llvm/dyn.js.map +1 -1
- package/dist/backend/llvm/emitter.d.ts +9 -3
- package/dist/backend/llvm/emitter.js +238 -105
- package/dist/backend/llvm/emitter.js.map +1 -1
- package/dist/backend/llvm/emitter.test.js +233 -42
- package/dist/backend/llvm/emitter.test.js.map +1 -1
- package/dist/backend/llvm/expr-async.js +25 -6
- package/dist/backend/llvm/expr-async.js.map +1 -1
- package/dist/backend/llvm/expr-bytes.js +13 -4
- package/dist/backend/llvm/expr-bytes.js.map +1 -1
- package/dist/backend/llvm/expr-callbacks.js +10 -4
- package/dist/backend/llvm/expr-callbacks.js.map +1 -1
- package/dist/backend/llvm/expr-calls.js +20 -9
- package/dist/backend/llvm/expr-calls.js.map +1 -1
- package/dist/backend/llvm/expr-containers.d.ts +2 -0
- package/dist/backend/llvm/expr-containers.js +92 -33
- package/dist/backend/llvm/expr-containers.js.map +1 -1
- package/dist/backend/llvm/expr-control.js +1 -3
- package/dist/backend/llvm/expr-control.js.map +1 -1
- package/dist/backend/llvm/expr-dispatch.js +3 -1
- package/dist/backend/llvm/expr-dispatch.js.map +1 -1
- package/dist/backend/llvm/expr-dynamic.js +19 -4
- package/dist/backend/llvm/expr-dynamic.js.map +1 -1
- package/dist/backend/llvm/expr-island.js +26 -6
- package/dist/backend/llvm/expr-island.js.map +1 -1
- package/dist/backend/llvm/expr-primitives.js +88 -19
- package/dist/backend/llvm/expr-primitives.js.map +1 -1
- package/dist/backend/llvm/expr-primitives.test.js +43 -1
- package/dist/backend/llvm/expr-primitives.test.js.map +1 -1
- package/dist/backend/llvm/expr-records.js +10 -9
- package/dist/backend/llvm/expr-records.js.map +1 -1
- package/dist/backend/llvm/expr-stream-bridges.js +44 -26
- package/dist/backend/llvm/expr-stream-bridges.js.map +1 -1
- package/dist/backend/llvm/expr-stream-bridges.test.js +51 -14
- package/dist/backend/llvm/expr-stream-bridges.test.js.map +1 -1
- package/dist/backend/llvm/expr-stream-callbacks.js +34 -14
- package/dist/backend/llvm/expr-stream-callbacks.js.map +1 -1
- package/dist/backend/llvm/integer-values.js +15 -4
- package/dist/backend/llvm/integer-values.js.map +1 -1
- package/dist/backend/llvm/integer-views.js +23 -7
- package/dist/backend/llvm/integer-views.js.map +1 -1
- package/dist/backend/llvm/integer-views.test.js +42 -7
- package/dist/backend/llvm/integer-views.test.js.map +1 -1
- package/dist/backend/llvm/lib-abi.js +13 -4
- package/dist/backend/llvm/lib-abi.js.map +1 -1
- package/dist/backend/llvm/lib-connect.js +7 -1
- package/dist/backend/llvm/lib-connect.js.map +1 -1
- package/dist/backend/llvm/lib-datagram.js +35 -10
- package/dist/backend/llvm/lib-datagram.js.map +1 -1
- package/dist/backend/llvm/lib-dispatch.js +35 -16
- package/dist/backend/llvm/lib-dispatch.js.map +1 -1
- package/dist/backend/llvm/lib-filesystem.js +33 -18
- package/dist/backend/llvm/lib-filesystem.js.map +1 -1
- package/dist/backend/llvm/lib-http2.js +60 -15
- package/dist/backend/llvm/lib-http2.js.map +1 -1
- package/dist/backend/llvm/lib-lookup.js +12 -5
- package/dist/backend/llvm/lib-lookup.js.map +1 -1
- package/dist/backend/llvm/lib-network.js +97 -31
- package/dist/backend/llvm/lib-network.js.map +1 -1
- package/dist/backend/llvm/lib-process.js +57 -14
- package/dist/backend/llvm/lib-process.js.map +1 -1
- package/dist/backend/llvm/lib-shared.js +107 -31
- package/dist/backend/llvm/lib-shared.js.map +1 -1
- package/dist/backend/llvm/lib-stream.js +33 -14
- package/dist/backend/llvm/lib-stream.js.map +1 -1
- package/dist/backend/llvm/lib-test.js +21 -7
- package/dist/backend/llvm/lib-test.js.map +1 -1
- package/dist/backend/llvm/lib-tls.js +69 -20
- package/dist/backend/llvm/lib-tls.js.map +1 -1
- package/dist/backend/llvm/local-array-reads.d.ts +1 -0
- package/dist/backend/llvm/local-array-reads.js +96 -30
- package/dist/backend/llvm/local-array-reads.js.map +1 -1
- package/dist/backend/llvm/local-array-reads.test.js +368 -60
- package/dist/backend/llvm/local-array-reads.test.js.map +1 -1
- package/dist/backend/llvm/local-union-storage.d.ts +25 -0
- package/dist/backend/llvm/local-union-storage.js +109 -0
- package/dist/backend/llvm/local-union-storage.js.map +1 -0
- package/dist/backend/llvm/local-union-storage.test.d.ts +1 -0
- package/dist/backend/llvm/local-union-storage.test.js +210 -0
- package/dist/backend/llvm/local-union-storage.test.js.map +1 -0
- package/dist/backend/llvm/map-read-lifetimes.d.ts +6 -2
- package/dist/backend/llvm/map-read-lifetimes.js +44 -14
- package/dist/backend/llvm/map-read-lifetimes.js.map +1 -1
- package/dist/backend/llvm/map-read-lifetimes.test.js +89 -17
- package/dist/backend/llvm/map-read-lifetimes.test.js.map +1 -1
- package/dist/backend/llvm/reference-effects.d.ts +3 -2
- package/dist/backend/llvm/reference-effects.js +67 -36
- package/dist/backend/llvm/reference-effects.js.map +1 -1
- package/dist/backend/llvm/reference-effects.test.js +92 -9
- package/dist/backend/llvm/reference-effects.test.js.map +1 -1
- package/dist/backend/llvm/shapes.js +60 -17
- package/dist/backend/llvm/shapes.js.map +1 -1
- package/dist/backend/llvm/shapes.test.js +3 -1
- package/dist/backend/llvm/shapes.test.js.map +1 -1
- package/dist/backend/llvm/split.js +4 -4
- package/dist/backend/llvm/split.js.map +1 -1
- package/dist/backend/llvm/split.test.js +14 -6
- package/dist/backend/llvm/split.test.js.map +1 -1
- package/dist/backend/llvm/stack-unions.js +14 -5
- package/dist/backend/llvm/stack-unions.js.map +1 -1
- package/dist/backend/llvm/stack-unions.test.js +151 -32
- package/dist/backend/llvm/stack-unions.test.js.map +1 -1
- package/dist/backend/llvm/string-construction.js.map +1 -1
- package/dist/backend/llvm/string-construction.test.js +32 -7
- package/dist/backend/llvm/string-construction.test.js.map +1 -1
- package/dist/backend/llvm/string-lifetimes.js +14 -8
- package/dist/backend/llvm/string-lifetimes.js.map +1 -1
- package/dist/backend/llvm/string-lifetimes.test.js +112 -26
- package/dist/backend/llvm/string-lifetimes.test.js.map +1 -1
- package/dist/backend/llvm/switch-dispatch.d.ts +9 -0
- package/dist/backend/llvm/switch-dispatch.js +114 -0
- package/dist/backend/llvm/switch-dispatch.js.map +1 -0
- package/dist/backend/llvm/switch-dispatch.test.d.ts +1 -0
- package/dist/backend/llvm/switch-dispatch.test.js +83 -0
- package/dist/backend/llvm/switch-dispatch.test.js.map +1 -0
- package/dist/backend/llvm/unsupported.js.map +1 -1
- package/dist/backend/llvm/walkers.js +6 -3
- package/dist/backend/llvm/walkers.js.map +1 -1
- package/dist/backend/mangle.js +9 -3
- package/dist/backend/mangle.js.map +1 -1
- package/dist/backend/may-throw.js +18 -8
- package/dist/backend/may-throw.js.map +1 -1
- package/dist/backend/may-throw.test.js +118 -22
- package/dist/backend/may-throw.test.js.map +1 -1
- package/dist/backend/native/artifact-stamps.d.ts +39 -0
- package/dist/backend/native/artifact-stamps.js +371 -0
- package/dist/backend/native/artifact-stamps.js.map +1 -0
- package/dist/backend/native/cache-warm.d.ts +24 -0
- package/dist/backend/native/cache-warm.js +80 -0
- package/dist/backend/native/cache-warm.js.map +1 -0
- package/dist/backend/native/compiler-fingerprint.d.ts +19 -0
- package/dist/backend/native/compiler-fingerprint.js +357 -0
- package/dist/backend/native/compiler-fingerprint.js.map +1 -0
- package/dist/backend/native/contracts.d.ts +314 -0
- package/dist/backend/native/contracts.js +2 -0
- package/dist/backend/native/contracts.js.map +1 -0
- package/dist/backend/native/dependency-files.d.ts +5 -0
- package/dist/backend/native/dependency-files.js +83 -0
- package/dist/backend/native/dependency-files.js.map +1 -0
- package/dist/backend/native/driver.d.ts +50 -0
- package/dist/backend/native/driver.js +294 -0
- package/dist/backend/native/driver.js.map +1 -0
- package/dist/backend/native/executable.d.ts +18 -0
- package/dist/backend/native/executable.js +1267 -0
- package/dist/backend/native/executable.js.map +1 -0
- package/dist/backend/native/library.d.ts +2 -0
- package/dist/backend/native/library.js +614 -0
- package/dist/backend/native/library.js.map +1 -0
- package/dist/backend/native/linker-fingerprint.d.ts +8 -0
- package/dist/backend/native/linker-fingerprint.js +174 -0
- package/dist/backend/native/linker-fingerprint.js.map +1 -0
- package/dist/backend/native/object-merge.d.ts +2 -0
- package/dist/backend/native/object-merge.js +154 -0
- package/dist/backend/native/object-merge.js.map +1 -0
- package/dist/backend/native/process.d.ts +17 -0
- package/dist/backend/native/process.js +42 -0
- package/dist/backend/native/process.js.map +1 -0
- package/dist/backend/native/program-shards.d.ts +21 -0
- package/dist/backend/native/program-shards.js +99 -0
- package/dist/backend/native/program-shards.js.map +1 -0
- package/dist/backend/native/runtime-inputs.d.ts +12 -0
- package/dist/backend/native/runtime-inputs.js +163 -0
- package/dist/backend/native/runtime-inputs.js.map +1 -0
- package/dist/backend/native/runtime-inputs.test.d.ts +1 -0
- package/dist/backend/native/runtime-inputs.test.js +64 -0
- package/dist/backend/native/runtime-inputs.test.js.map +1 -0
- package/dist/backend/native/runtime-objects.d.ts +16 -0
- package/dist/backend/native/runtime-objects.js +122 -0
- package/dist/backend/native/runtime-objects.js.map +1 -0
- package/dist/backend/native/session.d.ts +12 -0
- package/dist/backend/native/session.js +31 -0
- package/dist/backend/native/session.js.map +1 -0
- package/dist/backend/native/tool-identity.d.ts +37 -0
- package/dist/backend/native/tool-identity.js +310 -0
- package/dist/backend/native/tool-identity.js.map +1 -0
- package/dist/backend/native/trace-paths.d.ts +12 -0
- package/dist/backend/native/trace-paths.js +73 -0
- package/dist/backend/native/trace-paths.js.map +1 -0
- package/dist/backend/native/vendor.d.ts +1 -0
- package/dist/backend/native/vendor.js +12 -0
- package/dist/backend/native/vendor.js.map +1 -0
- package/dist/backend/native-codegen-core.js +2 -1
- package/dist/backend/native-codegen-core.js.map +1 -1
- package/dist/backend/native-codegen.d.ts +1 -1
- package/dist/backend/native-codegen.js +24 -13
- package/dist/backend/native-codegen.js.map +1 -1
- package/dist/backend/native-codegen.test.js +12 -9
- package/dist/backend/native-codegen.test.js.map +1 -1
- package/dist/backend/native-link-info-core.js +9 -5
- package/dist/backend/native-link-info-core.js.map +1 -1
- package/dist/backend/native-link-info.js +14 -5
- package/dist/backend/native-link-info.js.map +1 -1
- package/dist/backend/native-link-info.test.js +58 -13
- package/dist/backend/native-link-info.test.js.map +1 -1
- package/dist/backend/native-toolchain.d.ts +17 -450
- package/dist/backend/native-toolchain.js +17 -3971
- package/dist/backend/native-toolchain.js.map +1 -1
- package/dist/backend/native-toolchain.test.js +103 -72
- package/dist/backend/native-toolchain.test.js.map +1 -1
- package/dist/backend/native-tools.js +27 -8
- package/dist/backend/native-tools.js.map +1 -1
- package/dist/backend/object-localize.js +17 -14
- package/dist/backend/object-localize.js.map +1 -1
- package/dist/backend/object-localize.test.js +59 -12
- package/dist/backend/object-localize.test.js.map +1 -1
- package/dist/backend/runtime-pack-core.js +96 -49
- package/dist/backend/runtime-pack-core.js.map +1 -1
- package/dist/backend/runtime-pack-native.js +5 -3
- package/dist/backend/runtime-pack-native.js.map +1 -1
- package/dist/backend/runtime-pack-targets.test.js +87 -15
- package/dist/backend/runtime-pack-targets.test.js.map +1 -1
- package/dist/backend/runtime-pack.d.ts +1 -1
- package/dist/backend/runtime-pack.js +11 -12
- package/dist/backend/runtime-pack.js.map +1 -1
- package/dist/backend/runtime-pack.test.js +40 -24
- package/dist/backend/runtime-pack.test.js.map +1 -1
- package/dist/backend/source-locations.js.map +1 -1
- package/dist/backend/source-locations.test.js +7 -2
- package/dist/backend/source-locations.test.js.map +1 -1
- package/dist/backend/target-diagnostics.js +44 -14
- package/dist/backend/target-diagnostics.js.map +1 -1
- package/dist/backend/target-diagnostics.test.js +93 -20
- package/dist/backend/target-diagnostics.test.js.map +1 -1
- package/dist/backend/targets.js +230 -86
- package/dist/backend/targets.js.map +1 -1
- package/dist/backend/targets.test.js +32 -18
- package/dist/backend/targets.test.js.map +1 -1
- package/dist/backend/toolchain-environment.js +5 -1
- package/dist/backend/toolchain-environment.js.map +1 -1
- package/dist/backend/vendor-archives.d.ts +2 -2
- package/dist/backend/vendor-archives.js +84 -35
- package/dist/backend/vendor-archives.js.map +1 -1
- package/dist/backend/vendor-inputs.js +13 -1
- package/dist/backend/vendor-inputs.js.map +1 -1
- package/dist/backend/warm-cache.d.ts +1 -1
- package/dist/backend/warm-cache.js +33 -9
- package/dist/backend/warm-cache.js.map +1 -1
- package/dist/cli/command.js +39 -9
- package/dist/cli/command.js.map +1 -1
- package/dist/cli/output-options.js +14 -4
- package/dist/cli/output-options.js.map +1 -1
- package/dist/cli/paths.js.map +1 -1
- package/dist/cli/wasi-runner.js.map +1 -1
- package/dist/compat/fetch-profile.js +36 -35
- package/dist/compat/fetch-profile.js.map +1 -1
- package/dist/coverage/report.js +16 -17
- package/dist/coverage/report.js.map +1 -1
- package/dist/coverage/surface-manifest.js +112 -26
- package/dist/coverage/surface-manifest.js.map +1 -1
- package/dist/diagnostics/diagnostic.js +55 -16
- package/dist/diagnostics/diagnostic.js.map +1 -1
- package/dist/executable/executable-cache.d.ts +1 -1
- package/dist/executable/executable-cache.js +78 -48
- package/dist/executable/executable-cache.js.map +1 -1
- package/dist/executable/executable-cache.test.js +75 -26
- package/dist/executable/executable-cache.test.js.map +1 -1
- package/dist/executable/prepare.js +2 -2
- package/dist/executable/prepare.js.map +1 -1
- package/dist/ffi/ffi-manifest.js +78 -20
- package/dist/ffi/ffi-manifest.js.map +1 -1
- package/dist/ffi/ffi-manifest.test.js +96 -16
- package/dist/ffi/ffi-manifest.test.js.map +1 -1
- package/dist/format-integer.js.map +1 -1
- package/dist/frontend/analysis.js +12 -2
- package/dist/frontend/analysis.js.map +1 -1
- package/dist/frontend/arguments-usage.js.map +1 -1
- package/dist/frontend/binding-source.js +9 -3
- package/dist/frontend/binding-source.js.map +1 -1
- package/dist/frontend/builtin-modules.js +46 -2
- package/dist/frontend/builtin-modules.js.map +1 -1
- package/dist/frontend/cjs-resolve.js +40 -17
- package/dist/frontend/cjs-resolve.js.map +1 -1
- package/dist/frontend/cjs-syntax.js +31 -10
- package/dist/frontend/cjs-syntax.js.map +1 -1
- package/dist/frontend/comptime-node.test.js +10 -11
- package/dist/frontend/comptime-node.test.js.map +1 -1
- package/dist/frontend/dts-paths.js +7 -3
- package/dist/frontend/dts-paths.js.map +1 -1
- package/dist/frontend/fork-target.js +17 -12
- package/dist/frontend/fork-target.js.map +1 -1
- package/dist/frontend/function-completion.js +11 -6
- package/dist/frontend/function-completion.js.map +1 -1
- package/dist/frontend/helper-tokens.js +53 -6
- package/dist/frontend/helper-tokens.js.map +1 -1
- package/dist/frontend/helper-tokens.test.js +18 -2
- package/dist/frontend/helper-tokens.test.js.map +1 -1
- package/dist/frontend/inferred-js-diagnostics.js +32 -12
- package/dist/frontend/inferred-js-diagnostics.js.map +1 -1
- package/dist/frontend/inferred-js-diagnostics.test.js +11 -15
- package/dist/frontend/inferred-js-diagnostics.test.js.map +1 -1
- package/dist/frontend/input-tracker.js +11 -11
- package/dist/frontend/input-tracker.js.map +1 -1
- package/dist/frontend/input-tracker.test.js +4 -1
- package/dist/frontend/input-tracker.test.js.map +1 -1
- package/dist/frontend/lib-contract.js +38 -9
- package/dist/frontend/lib-contract.js.map +1 -1
- package/dist/frontend/literal-values.js.map +1 -1
- package/dist/frontend/literal-values.test.js +28 -8
- package/dist/frontend/literal-values.test.js.map +1 -1
- package/dist/frontend/lowering/abstract-equality.js +53 -10
- package/dist/frontend/lowering/abstract-equality.js.map +1 -1
- package/dist/frontend/lowering/array-indexed-mutation.d.ts +1 -1
- package/dist/frontend/lowering/array-indexed-mutation.js +108 -106
- package/dist/frontend/lowering/array-indexed-mutation.js.map +1 -1
- package/dist/frontend/lowering/array-values.js +37 -14
- package/dist/frontend/lowering/array-values.js.map +1 -1
- package/dist/frontend/lowering/binding-analysis.d.ts +50 -0
- package/dist/frontend/lowering/binding-analysis.js +376 -0
- package/dist/frontend/lowering/binding-analysis.js.map +1 -0
- package/dist/frontend/lowering/builtin-calls.d.ts +9 -0
- package/dist/frontend/lowering/builtin-calls.js +60 -0
- package/dist/frontend/lowering/builtin-calls.js.map +1 -0
- package/dist/frontend/lowering/builtins/arguments.d.ts +43 -0
- package/dist/frontend/lowering/builtins/arguments.js +247 -0
- package/dist/frontend/lowering/builtins/arguments.js.map +1 -0
- package/dist/frontend/lowering/builtins/async-context.d.ts +52 -0
- package/dist/frontend/lowering/builtins/async-context.js +436 -0
- package/dist/frontend/lowering/builtins/async-context.js.map +1 -0
- package/dist/frontend/lowering/builtins/atomics.d.ts +15 -0
- package/dist/frontend/lowering/builtins/atomics.js +46 -0
- package/dist/frontend/lowering/builtins/atomics.js.map +1 -0
- package/dist/frontend/lowering/builtins/callable-aliases.d.ts +13 -0
- package/dist/frontend/lowering/builtins/callable-aliases.js +87 -0
- package/dist/frontend/lowering/builtins/callable-aliases.js.map +1 -0
- package/dist/frontend/lowering/builtins/child-process-async.d.ts +18 -0
- package/dist/frontend/lowering/builtins/child-process-async.js +245 -0
- package/dist/frontend/lowering/builtins/child-process-async.js.map +1 -0
- package/dist/frontend/lowering/builtins/child-process-methods.d.ts +21 -0
- package/dist/frontend/lowering/builtins/child-process-methods.js +362 -0
- package/dist/frontend/lowering/builtins/child-process-methods.js.map +1 -0
- package/dist/frontend/lowering/builtins/child-process-sync.d.ts +4 -0
- package/dist/frontend/lowering/builtins/child-process-sync.js +639 -0
- package/dist/frontend/lowering/builtins/child-process-sync.js.map +1 -0
- package/dist/frontend/lowering/builtins/child-process.d.ts +55 -0
- package/dist/frontend/lowering/builtins/child-process.js +669 -0
- package/dist/frontend/lowering/builtins/child-process.js.map +1 -0
- package/dist/frontend/lowering/builtins/compression.d.ts +7 -0
- package/dist/frontend/lowering/builtins/compression.js +115 -0
- package/dist/frontend/lowering/builtins/compression.js.map +1 -0
- package/dist/frontend/lowering/builtins/console.d.ts +10 -0
- package/dist/frontend/lowering/builtins/console.js +38 -0
- package/dist/frontend/lowering/builtins/console.js.map +1 -0
- package/dist/frontend/lowering/builtins/constants.d.ts +24 -0
- package/dist/frontend/lowering/builtins/constants.js +141 -0
- package/dist/frontend/lowering/builtins/constants.js.map +1 -0
- package/dist/frontend/lowering/builtins/crypto.d.ts +22 -0
- package/dist/frontend/lowering/builtins/crypto.js +517 -0
- package/dist/frontend/lowering/builtins/crypto.js.map +1 -0
- package/dist/frontend/lowering/builtins/dates.d.ts +7 -0
- package/dist/frontend/lowering/builtins/dates.js +101 -0
- package/dist/frontend/lowering/builtins/dates.js.map +1 -0
- package/dist/frontend/lowering/builtins/environment.d.ts +34 -0
- package/dist/frontend/lowering/builtins/environment.js +95 -0
- package/dist/frontend/lowering/builtins/environment.js.map +1 -0
- package/dist/frontend/lowering/builtins/errors.d.ts +14 -0
- package/dist/frontend/lowering/builtins/errors.js +83 -0
- package/dist/frontend/lowering/builtins/errors.js.map +1 -0
- package/dist/frontend/lowering/builtins/filesystem-calls.d.ts +32 -0
- package/dist/frontend/lowering/builtins/filesystem-calls.js +678 -0
- package/dist/frontend/lowering/builtins/filesystem-calls.js.map +1 -0
- package/dist/frontend/lowering/builtins/filesystem.d.ts +108 -0
- package/dist/frontend/lowering/builtins/filesystem.js +1061 -0
- package/dist/frontend/lowering/builtins/filesystem.js.map +1 -0
- package/dist/frontend/lowering/builtins/ipc.d.ts +8 -0
- package/dist/frontend/lowering/builtins/ipc.js +76 -0
- package/dist/frontend/lowering/builtins/ipc.js.map +1 -0
- package/dist/frontend/lowering/builtins/json.d.ts +12 -0
- package/dist/frontend/lowering/builtins/json.js +387 -0
- package/dist/frontend/lowering/builtins/json.js.map +1 -0
- package/dist/frontend/lowering/builtins/module-bindings.d.ts +85 -0
- package/dist/frontend/lowering/builtins/module-bindings.js +346 -0
- package/dist/frontend/lowering/builtins/module-bindings.js.map +1 -0
- package/dist/frontend/lowering/builtins/module-calls.d.ts +8 -0
- package/dist/frontend/lowering/builtins/module-calls.js +303 -0
- package/dist/frontend/lowering/builtins/module-calls.js.map +1 -0
- package/dist/frontend/lowering/builtins/module-resolution.d.ts +38 -0
- package/dist/frontend/lowering/builtins/module-resolution.js +344 -0
- package/dist/frontend/lowering/builtins/module-resolution.js.map +1 -0
- package/dist/frontend/lowering/builtins/numbers.d.ts +15 -0
- package/dist/frontend/lowering/builtins/numbers.js +124 -0
- package/dist/frontend/lowering/builtins/numbers.js.map +1 -0
- package/dist/frontend/lowering/builtins/operating-system.d.ts +13 -0
- package/dist/frontend/lowering/builtins/operating-system.js +148 -0
- package/dist/frontend/lowering/builtins/operating-system.js.map +1 -0
- package/dist/frontend/lowering/builtins/performance.d.ts +13 -0
- package/dist/frontend/lowering/builtins/performance.js +100 -0
- package/dist/frontend/lowering/builtins/performance.js.map +1 -0
- package/dist/frontend/lowering/builtins/process.d.ts +50 -0
- package/dist/frontend/lowering/builtins/process.js +1138 -0
- package/dist/frontend/lowering/builtins/process.js.map +1 -0
- package/dist/frontend/lowering/builtins/promises.d.ts +14 -0
- package/dist/frontend/lowering/builtins/promises.js +356 -0
- package/dist/frontend/lowering/builtins/promises.js.map +1 -0
- package/dist/frontend/lowering/builtins/properties.d.ts +11 -0
- package/dist/frontend/lowering/builtins/properties.js +186 -0
- package/dist/frontend/lowering/builtins/properties.js.map +1 -0
- package/dist/frontend/lowering/builtins/querystring.d.ts +19 -0
- package/dist/frontend/lowering/builtins/querystring.js +150 -0
- package/dist/frontend/lowering/builtins/querystring.js.map +1 -0
- package/dist/frontend/lowering/builtins/readline.d.ts +13 -0
- package/dist/frontend/lowering/builtins/readline.js +138 -0
- package/dist/frontend/lowering/builtins/readline.js.map +1 -0
- package/dist/frontend/lowering/builtins/receiver-types.d.ts +5 -0
- package/dist/frontend/lowering/builtins/receiver-types.js +15 -0
- package/dist/frontend/lowering/builtins/receiver-types.js.map +1 -0
- package/dist/frontend/lowering/builtins/reflection.d.ts +13 -0
- package/dist/frontend/lowering/builtins/reflection.js +95 -0
- package/dist/frontend/lowering/builtins/reflection.js.map +1 -0
- package/dist/frontend/lowering/builtins/strings.d.ts +14 -0
- package/dist/frontend/lowering/builtins/strings.js +121 -0
- package/dist/frontend/lowering/builtins/strings.js.map +1 -0
- package/dist/frontend/lowering/builtins/text-codecs.d.ts +29 -0
- package/dist/frontend/lowering/builtins/text-codecs.js +590 -0
- package/dist/frontend/lowering/builtins/text-codecs.js.map +1 -0
- package/dist/frontend/lowering/builtins/timers.d.ts +22 -0
- package/dist/frontend/lowering/builtins/timers.js +180 -0
- package/dist/frontend/lowering/builtins/timers.js.map +1 -0
- package/dist/frontend/lowering/builtins/url.d.ts +37 -0
- package/dist/frontend/lowering/builtins/url.js +596 -0
- package/dist/frontend/lowering/builtins/url.js.map +1 -0
- package/dist/frontend/lowering/builtins/util-types.d.ts +7 -0
- package/dist/frontend/lowering/builtins/util-types.js +31 -0
- package/dist/frontend/lowering/builtins/util-types.js.map +1 -0
- package/dist/frontend/lowering/call-arguments.d.ts +72 -0
- package/dist/frontend/lowering/call-arguments.js +618 -0
- package/dist/frontend/lowering/call-arguments.js.map +1 -0
- package/dist/frontend/lowering/call-signatures.d.ts +115 -0
- package/dist/frontend/lowering/call-signatures.js +719 -0
- package/dist/frontend/lowering/call-signatures.js.map +1 -0
- package/dist/frontend/lowering/callback-arg.js.map +1 -1
- package/dist/frontend/lowering/checked-iterable-spread.js +53 -10
- package/dist/frontend/lowering/checked-iterable-spread.js.map +1 -1
- package/dist/frontend/lowering/checked-promise-all.js +41 -9
- package/dist/frontend/lowering/checked-promise-all.js.map +1 -1
- package/dist/frontend/lowering/class-callbacks.d.ts +1 -1
- package/dist/frontend/lowering/class-callbacks.js +130 -27
- package/dist/frontend/lowering/class-callbacks.js.map +1 -1
- package/dist/frontend/lowering/class-construction.d.ts +1 -1
- package/dist/frontend/lowering/class-construction.js +247 -50
- package/dist/frontend/lowering/class-construction.js.map +1 -1
- package/dist/frontend/lowering/class-descriptors.js +109 -29
- package/dist/frontend/lowering/class-descriptors.js.map +1 -1
- package/dist/frontend/lowering/class-dynamic-dispatch.d.ts +6 -1
- package/dist/frontend/lowering/class-dynamic-dispatch.js +2471 -465
- package/dist/frontend/lowering/class-dynamic-dispatch.js.map +1 -1
- package/dist/frontend/lowering/class-dynamic-dispatch.test.js +284 -44
- package/dist/frontend/lowering/class-dynamic-dispatch.test.js.map +1 -1
- package/dist/frontend/lowering/class-instance-constructor.js +17 -5
- package/dist/frontend/lowering/class-instance-constructor.js.map +1 -1
- package/dist/frontend/lowering/class-method-values.js +199 -51
- package/dist/frontend/lowering/class-method-values.js.map +1 -1
- package/dist/frontend/lowering/class-prototypes.js +345 -86
- package/dist/frontend/lowering/class-prototypes.js.map +1 -1
- package/dist/frontend/lowering/class-runtime-statics.d.ts +1 -1
- package/dist/frontend/lowering/class-runtime-statics.js +80 -17
- package/dist/frontend/lowering/class-runtime-statics.js.map +1 -1
- package/dist/frontend/lowering/class-static-data.js +76 -16
- package/dist/frontend/lowering/class-static-data.js.map +1 -1
- package/dist/frontend/lowering/coercions/builders.d.ts +13 -0
- package/dist/frontend/lowering/coercions/builders.js +77 -0
- package/dist/frontend/lowering/coercions/builders.js.map +1 -0
- package/dist/frontend/lowering/coercions/function-adapters.d.ts +58 -0
- package/dist/frontend/lowering/coercions/function-adapters.js +430 -0
- package/dist/frontend/lowering/coercions/function-adapters.js.map +1 -0
- package/dist/frontend/lowering/coercions/island.d.ts +37 -0
- package/dist/frontend/lowering/coercions/island.js +350 -0
- package/dist/frontend/lowering/coercions/island.js.map +1 -0
- package/dist/frontend/lowering/coercions/state.d.ts +14 -0
- package/dist/frontend/lowering/coercions/state.js +16 -0
- package/dist/frontend/lowering/coercions/state.js.map +1 -0
- package/dist/frontend/lowering/coercions/structural-plans.d.ts +40 -0
- package/dist/frontend/lowering/coercions/structural-plans.js +447 -0
- package/dist/frontend/lowering/coercions/structural-plans.js.map +1 -0
- package/dist/frontend/lowering/coercions/structural.d.ts +63 -0
- package/dist/frontend/lowering/coercions/structural.js +616 -0
- package/dist/frontend/lowering/coercions/structural.js.map +1 -0
- package/dist/frontend/lowering/coercions/unions.d.ts +65 -0
- package/dist/frontend/lowering/coercions/unions.js +318 -0
- package/dist/frontend/lowering/coercions/unions.js.map +1 -0
- package/dist/frontend/lowering/collection-ingestion.js +355 -72
- package/dist/frontend/lowering/collection-ingestion.js.map +1 -1
- package/dist/frontend/lowering/containers/array-callbacks.d.ts +92 -0
- package/dist/frontend/lowering/containers/array-callbacks.js +1646 -0
- package/dist/frontend/lowering/containers/array-callbacks.js.map +1 -0
- package/dist/frontend/lowering/containers/array-construction.d.ts +42 -0
- package/dist/frontend/lowering/containers/array-construction.js +1044 -0
- package/dist/frontend/lowering/containers/array-construction.js.map +1 -0
- package/dist/frontend/lowering/containers/array-iteration.d.ts +16 -0
- package/dist/frontend/lowering/containers/array-iteration.js +95 -0
- package/dist/frontend/lowering/containers/array-iteration.js.map +1 -0
- package/dist/frontend/lowering/containers/array-methods.d.ts +27 -0
- package/dist/frontend/lowering/containers/array-methods.js +1854 -0
- package/dist/frontend/lowering/containers/array-methods.js.map +1 -0
- package/dist/frontend/lowering/containers/bytes.d.ts +17 -17
- package/dist/frontend/lowering/containers/bytes.js +419 -105
- package/dist/frontend/lowering/containers/bytes.js.map +1 -1
- package/dist/frontend/lowering/containers/callback-arguments.d.ts +26 -0
- package/dist/frontend/lowering/containers/callback-arguments.js +179 -0
- package/dist/frontend/lowering/containers/callback-arguments.js.map +1 -0
- package/dist/frontend/lowering/containers/collection-grouping.d.ts +19 -0
- package/dist/frontend/lowering/containers/collection-grouping.js +297 -0
- package/dist/frontend/lowering/containers/collection-grouping.js.map +1 -0
- package/dist/frontend/lowering/containers/collection-methods.d.ts +57 -0
- package/dist/frontend/lowering/containers/collection-methods.js +1314 -0
- package/dist/frontend/lowering/containers/collection-methods.js.map +1 -0
- package/dist/frontend/lowering/containers/dynamic-receivers.d.ts +18 -0
- package/dist/frontend/lowering/containers/dynamic-receivers.js +114 -0
- package/dist/frontend/lowering/containers/dynamic-receivers.js.map +1 -0
- package/dist/frontend/lowering/containers/for-of.d.ts +60 -0
- package/dist/frontend/lowering/containers/for-of.js +643 -0
- package/dist/frontend/lowering/containers/for-of.js.map +1 -0
- package/dist/frontend/lowering/containers/indexed-objects.d.ts +132 -0
- package/dist/frontend/lowering/containers/indexed-objects.js +1743 -0
- package/dist/frontend/lowering/containers/indexed-objects.js.map +1 -0
- package/dist/frontend/lowering/containers/iterator-helpers.d.ts +20 -0
- package/dist/frontend/lowering/containers/iterator-helpers.js +809 -0
- package/dist/frontend/lowering/containers/iterator-helpers.js.map +1 -0
- package/dist/frontend/lowering/containers/string-and-regexp.js +580 -158
- package/dist/frontend/lowering/containers/string-and-regexp.js.map +1 -1
- package/dist/frontend/lowering/containers/string-replacement.js +213 -63
- package/dist/frontend/lowering/containers/string-replacement.js.map +1 -1
- package/dist/frontend/lowering/crypto-tables.js +263 -64
- package/dist/frontend/lowering/crypto-tables.js.map +1 -1
- package/dist/frontend/lowering/deferred-module-initializers.js +172 -68
- package/dist/frontend/lowering/deferred-module-initializers.js.map +1 -1
- package/dist/frontend/lowering/deferred-module-initializers.test.js +41 -8
- package/dist/frontend/lowering/deferred-module-initializers.test.js.map +1 -1
- package/dist/frontend/lowering/error-methods.js +339 -65
- package/dist/frontend/lowering/error-methods.js.map +1 -1
- package/dist/frontend/lowering/expressions/evaluation-safety.js +3 -2
- package/dist/frontend/lowering/expressions/evaluation-safety.js.map +1 -1
- package/dist/frontend/lowering/expressions/global-symbols.js +2 -1
- package/dist/frontend/lowering/expressions/global-symbols.js.map +1 -1
- package/dist/frontend/lowering/expressions/native-proxy.js +11 -5
- package/dist/frontend/lowering/expressions/native-proxy.js.map +1 -1
- package/dist/frontend/lowering/expressions/nullish-assignment.js +67 -13
- package/dist/frontend/lowering/expressions/nullish-assignment.js.map +1 -1
- package/dist/frontend/lowering/expressions/object-literals.js +589 -162
- package/dist/frontend/lowering/expressions/object-literals.js.map +1 -1
- package/dist/frontend/lowering/expressions/optional-chains.d.ts +1 -1
- package/dist/frontend/lowering/expressions/optional-chains.js +68 -17
- package/dist/frontend/lowering/expressions/optional-chains.js.map +1 -1
- package/dist/frontend/lowering/expressions/union-field-write.js +45 -18
- package/dist/frontend/lowering/expressions/union-field-write.js.map +1 -1
- package/dist/frontend/lowering/function-context.js +5 -1
- package/dist/frontend/lowering/function-context.js.map +1 -1
- package/dist/frontend/lowering/function-returns.d.ts +67 -0
- package/dist/frontend/lowering/function-returns.js +392 -0
- package/dist/frontend/lowering/function-returns.js.map +1 -0
- package/dist/frontend/lowering/generator-delegation.d.ts +1 -1
- package/dist/frontend/lowering/generator-delegation.js +171 -39
- package/dist/frontend/lowering/generator-delegation.js.map +1 -1
- package/dist/frontend/lowering/generator-dynamic-dispatch.d.ts +1 -1
- package/dist/frontend/lowering/generator-dynamic-dispatch.js +176 -36
- package/dist/frontend/lowering/generator-dynamic-dispatch.js.map +1 -1
- package/dist/frontend/lowering/generic-functions.d.ts +274 -0
- package/dist/frontend/lowering/generic-functions.js +1727 -0
- package/dist/frontend/lowering/generic-functions.js.map +1 -0
- package/dist/frontend/lowering/import-meta.d.ts +1 -1
- package/dist/frontend/lowering/import-meta.js +37 -14
- package/dist/frontend/lowering/import-meta.js.map +1 -1
- package/dist/frontend/lowering/indexed-comparison.js +6 -2
- package/dist/frontend/lowering/indexed-comparison.js.map +1 -1
- package/dist/frontend/lowering/iterator-consumption.d.ts +9 -0
- package/dist/frontend/lowering/iterator-consumption.js +91 -0
- package/dist/frontend/lowering/iterator-consumption.js.map +1 -0
- package/dist/frontend/lowering/lib-boundary.js +40 -17
- package/dist/frontend/lowering/lib-boundary.js.map +1 -1
- package/dist/frontend/lowering/lib-boundary.test.js +49 -11
- package/dist/frontend/lowering/lib-boundary.test.js.map +1 -1
- package/dist/frontend/lowering/lower-array-sort.d.ts +0 -19
- package/dist/frontend/lowering/lower-array-sort.js +331 -566
- package/dist/frontend/lowering/lower-array-sort.js.map +1 -1
- package/dist/frontend/lowering/lower-assert.js +248 -43
- package/dist/frontend/lowering/lower-assert.js.map +1 -1
- package/dist/frontend/lowering/lower-async-iteration.js +71 -16
- package/dist/frontend/lowering/lower-async-iteration.js.map +1 -1
- package/dist/frontend/lowering/lower-builtin-values.js +420 -71
- package/dist/frontend/lowering/lower-builtin-values.js.map +1 -1
- package/dist/frontend/lowering/lower-calls.d.ts +39 -558
- package/dist/frontend/lowering/lower-calls.js +2593 -5667
- package/dist/frontend/lowering/lower-calls.js.map +1 -1
- package/dist/frontend/lowering/lower-classes.d.ts +243 -242
- package/dist/frontend/lowering/lower-classes.js +1701 -724
- package/dist/frontend/lowering/lower-classes.js.map +1 -1
- package/dist/frontend/lowering/lower-comptime.d.ts +35 -35
- package/dist/frontend/lowering/lower-comptime.js +39 -37
- package/dist/frontend/lowering/lower-comptime.js.map +1 -1
- package/dist/frontend/lowering/lower-dgram.js +59 -31
- package/dist/frontend/lowering/lower-dgram.js.map +1 -1
- package/dist/frontend/lowering/lower-enums.js +5 -2
- package/dist/frontend/lowering/lower-enums.js.map +1 -1
- package/dist/frontend/lowering/lower-event-emitter.js +322 -85
- package/dist/frontend/lowering/lower-event-emitter.js.map +1 -1
- package/dist/frontend/lowering/lower-expando.js +19 -7
- package/dist/frontend/lowering/lower-expando.js.map +1 -1
- package/dist/frontend/lowering/lower-exprs.d.ts +194 -194
- package/dist/frontend/lowering/lower-exprs.js +3446 -1154
- package/dist/frontend/lowering/lower-exprs.js.map +1 -1
- package/dist/frontend/lowering/lower-functions.d.ts +23 -0
- package/dist/frontend/lowering/lower-functions.js +449 -0
- package/dist/frontend/lowering/lower-functions.js.map +1 -0
- package/dist/frontend/lowering/lower-generators.js +121 -32
- package/dist/frontend/lowering/lower-generators.js.map +1 -1
- package/dist/frontend/lowering/lower-global-value.js +15 -4
- package/dist/frontend/lowering/lower-global-value.js.map +1 -1
- package/dist/frontend/lowering/lower-inspect.js +479 -89
- package/dist/frontend/lowering/lower-inspect.js.map +1 -1
- package/dist/frontend/lowering/lower-island.d.ts +79 -79
- package/dist/frontend/lowering/lower-island.js +365 -273
- package/dist/frontend/lowering/lower-island.js.map +1 -1
- package/dist/frontend/lowering/lower-island.test.js +7 -2
- package/dist/frontend/lowering/lower-island.test.js.map +1 -1
- package/dist/frontend/lowering/lower-mixins.js +17 -8
- package/dist/frontend/lowering/lower-mixins.js.map +1 -1
- package/dist/frontend/lowering/lower-modules.d.ts +94 -94
- package/dist/frontend/lowering/lower-modules.js +612 -321
- package/dist/frontend/lowering/lower-modules.js.map +1 -1
- package/dist/frontend/lowering/lower-modules.test.js +91 -20
- package/dist/frontend/lowering/lower-modules.test.js.map +1 -1
- package/dist/frontend/lowering/lower-namespaces.js +25 -8
- package/dist/frontend/lowering/lower-namespaces.js.map +1 -1
- package/dist/frontend/lowering/lower-node-module.js +115 -34
- package/dist/frontend/lowering/lower-node-module.js.map +1 -1
- package/dist/frontend/lowering/lower-server.js +1210 -290
- package/dist/frontend/lowering/lower-server.js.map +1 -1
- package/dist/frontend/lowering/lower-stmts.d.ts +148 -148
- package/dist/frontend/lowering/lower-stmts.js +2312 -984
- package/dist/frontend/lowering/lower-stmts.js.map +1 -1
- package/dist/frontend/lowering/lower-stmts.test.js +13 -5
- package/dist/frontend/lowering/lower-stmts.test.js.map +1 -1
- package/dist/frontend/lowering/lower-stream.js +362 -90
- package/dist/frontend/lowering/lower-stream.js.map +1 -1
- package/dist/frontend/lowering/lower-system-errors.js +30 -8
- package/dist/frontend/lowering/lower-system-errors.js.map +1 -1
- package/dist/frontend/lowering/lower-test.js +40 -13
- package/dist/frontend/lowering/lower-test.js.map +1 -1
- package/dist/frontend/lowering/lower-timers.d.ts +31 -0
- package/dist/frontend/lowering/lower-timers.js +336 -0
- package/dist/frontend/lowering/lower-timers.js.map +1 -0
- package/dist/frontend/lowering/lower-url.d.ts +1 -1
- package/dist/frontend/lowering/lower-url.js +46 -13
- package/dist/frontend/lowering/lower-url.js.map +1 -1
- package/dist/frontend/lowering/lowerer.d.ts +21 -351
- package/dist/frontend/lowering/lowerer.js +1024 -2704
- package/dist/frontend/lowering/lowerer.js.map +1 -1
- package/dist/frontend/lowering/lowerer.test.js +85 -17
- package/dist/frontend/lowering/lowerer.test.js.map +1 -1
- package/dist/frontend/lowering/module-namespace-elements.js +43 -8
- package/dist/frontend/lowering/module-namespace-elements.js.map +1 -1
- package/dist/frontend/lowering/native-ffi.d.ts +21 -1
- package/dist/frontend/lowering/native-ffi.js +487 -18
- package/dist/frontend/lowering/native-ffi.js.map +1 -1
- package/dist/frontend/lowering/object-enumeration-receiver.js +55 -10
- package/dist/frontend/lowering/object-enumeration-receiver.js.map +1 -1
- package/dist/frontend/lowering/object-factory-new.d.ts +1 -1
- package/dist/frontend/lowering/object-factory-new.js +36 -11
- package/dist/frontend/lowering/object-factory-new.js.map +1 -1
- package/dist/frontend/lowering/optional-arguments.js +49 -20
- package/dist/frontend/lowering/optional-arguments.js.map +1 -1
- package/dist/frontend/lowering/pairs-snapshot.js +66 -14
- package/dist/frontend/lowering/pairs-snapshot.js.map +1 -1
- package/dist/frontend/lowering/runtime-optional-locals.js +3 -1
- package/dist/frontend/lowering/runtime-optional-locals.js.map +1 -1
- package/dist/frontend/lowering/runtime-optional-locals.test.js.map +1 -1
- package/dist/frontend/lowering/sanitize-class-types.js +4 -1
- package/dist/frontend/lowering/sanitize-class-types.js.map +1 -1
- package/dist/frontend/lowering/sanitize-class-types.test.js +86 -18
- package/dist/frontend/lowering/sanitize-class-types.test.js.map +1 -1
- package/dist/frontend/lowering/static-this.js +13 -6
- package/dist/frontend/lowering/static-this.js.map +1 -1
- package/dist/frontend/lowering/string-index.js +32 -10
- package/dist/frontend/lowering/string-index.js.map +1 -1
- package/dist/frontend/lowering/surfaces.d.ts +42 -42
- package/dist/frontend/lowering/surfaces.js +1094 -249
- package/dist/frontend/lowering/surfaces.js.map +1 -1
- package/dist/frontend/lowering/symbol-fields.js +40 -15
- package/dist/frontend/lowering/symbol-fields.js.map +1 -1
- package/dist/frontend/lowering/symbol-methods.js.map +1 -1
- package/dist/frontend/lowering/text-decoder-encoding.js +236 -24
- package/dist/frontend/lowering/text-decoder-encoding.js.map +1 -1
- package/dist/frontend/lowering/text-decoder-encoding.test.js +84 -12
- package/dist/frontend/lowering/text-decoder-encoding.test.js.map +1 -1
- package/dist/frontend/lowering/union-narrow.js +59 -16
- package/dist/frontend/lowering/union-narrow.js.map +1 -1
- package/dist/frontend/lowering/union-narrow.test.js +24 -7
- package/dist/frontend/lowering/union-narrow.test.js.map +1 -1
- package/dist/frontend/lowering/union-retag.js +155 -40
- package/dist/frontend/lowering/union-retag.js.map +1 -1
- package/dist/frontend/lowering/union-retag.test.js +131 -33
- package/dist/frontend/lowering/union-retag.test.js.map +1 -1
- package/dist/frontend/lowering/unregistered-class-types.js.map +1 -1
- package/dist/frontend/lowering/unregistered-class-types.test.js +34 -8
- package/dist/frontend/lowering/unregistered-class-types.test.js.map +1 -1
- package/dist/frontend/module-syntax.js +21 -8
- package/dist/frontend/module-syntax.js.map +1 -1
- package/dist/frontend/module-syntax.test.js +37 -13
- package/dist/frontend/module-syntax.test.js.map +1 -1
- package/dist/frontend/npm-fetch-analysis.js +13 -4
- package/dist/frontend/npm-fetch-analysis.js.map +1 -1
- package/dist/frontend/npm-fetch-analysis.test.js +33 -10
- package/dist/frontend/npm-fetch-analysis.test.js.map +1 -1
- package/dist/frontend/npm-fetch-node.js.map +1 -1
- package/dist/frontend/npm-fetch-syntax.js +4 -9
- package/dist/frontend/npm-fetch-syntax.js.map +1 -1
- package/dist/frontend/npm-node.js +3 -1
- package/dist/frontend/npm-node.js.map +1 -1
- package/dist/frontend/npm-static-bundled-cjs.js +88 -29
- package/dist/frontend/npm-static-bundled-cjs.js.map +1 -1
- package/dist/frontend/npm-static-bundled-cjs.test.js +29 -10
- package/dist/frontend/npm-static-bundled-cjs.test.js.map +1 -1
- package/dist/frontend/npm-static-declaration-syntax.js +148 -56
- package/dist/frontend/npm-static-declaration-syntax.js.map +1 -1
- package/dist/frontend/npm-static-declarations.d.ts +1 -1
- package/dist/frontend/npm-static-declarations.js.map +1 -1
- package/dist/frontend/npm-static-declarations.test.js +33 -7
- package/dist/frontend/npm-static-declarations.test.js.map +1 -1
- package/dist/frontend/npm-static-prune.js +26 -12
- package/dist/frontend/npm-static-prune.js.map +1 -1
- package/dist/frontend/npm-static-prune.test.js +17 -3
- package/dist/frontend/npm-static-prune.test.js.map +1 -1
- package/dist/frontend/npm-static-rewrite-host.js +2 -3
- package/dist/frontend/npm-static-rewrite-host.js.map +1 -1
- package/dist/frontend/npm-static-rewrite-syntax.js +64 -21
- package/dist/frontend/npm-static-rewrite-syntax.js.map +1 -1
- package/dist/frontend/npm-static-rewrite.js.map +1 -1
- package/dist/frontend/npm-static-subtyping.js +9 -4
- package/dist/frontend/npm-static-subtyping.js.map +1 -1
- package/dist/frontend/npm-static-subtyping.test.js +30 -6
- package/dist/frontend/npm-static-subtyping.test.js.map +1 -1
- package/dist/frontend/npm-static.js +15 -4
- package/dist/frontend/npm-static.js.map +1 -1
- package/dist/frontend/npm.js +122 -36
- package/dist/frontend/npm.js.map +1 -1
- package/dist/frontend/npm.test.js +30 -10
- package/dist/frontend/npm.test.js.map +1 -1
- package/dist/frontend/pipeline-native.js.map +1 -1
- package/dist/frontend/pipeline.js +25 -8
- package/dist/frontend/pipeline.js.map +1 -1
- package/dist/frontend/pipeline.test.js +21 -7
- package/dist/frontend/pipeline.test.js.map +1 -1
- package/dist/frontend/program-node.js +5 -3
- package/dist/frontend/program-node.js.map +1 -1
- package/dist/frontend/program.d.ts +2 -2
- package/dist/frontend/program.js +234 -101
- package/dist/frontend/program.js.map +1 -1
- package/dist/frontend/program.test.js +27 -27
- package/dist/frontend/program.test.js.map +1 -1
- package/dist/frontend/provenance-core.js +8 -4
- package/dist/frontend/provenance-core.js.map +1 -1
- package/dist/frontend/provenance-registry.js +1 -4
- package/dist/frontend/provenance-registry.js.map +1 -1
- package/dist/frontend/resolve.js +32 -20
- package/dist/frontend/resolve.js.map +1 -1
- package/dist/frontend/resolve.test.js +1 -1
- package/dist/frontend/resolve.test.js.map +1 -1
- package/dist/frontend/runtime-resolve.js +13 -4
- package/dist/frontend/runtime-resolve.js.map +1 -1
- package/dist/frontend/runtime-resolve.test.js +25 -9
- package/dist/frontend/runtime-resolve.test.js.map +1 -1
- package/dist/frontend/services-node.js +6 -2
- package/dist/frontend/services-node.js.map +1 -1
- package/dist/frontend/services-node.test.js +18 -6
- package/dist/frontend/services-node.test.js.map +1 -1
- package/dist/frontend/services.js +8 -4
- package/dist/frontend/services.js.map +1 -1
- package/dist/frontend/services.test.js +6 -2
- package/dist/frontend/services.test.js.map +1 -1
- package/dist/frontend/ts7/api.js +12 -4
- package/dist/frontend/ts7/api.js.map +1 -1
- package/dist/frontend/ts7/ast-bytes.js +10 -3
- package/dist/frontend/ts7/ast-bytes.js.map +1 -1
- package/dist/frontend/ts7/ast-bytes.test.js +23 -4
- package/dist/frontend/ts7/ast-bytes.test.js.map +1 -1
- package/dist/frontend/ts7/ast-guards.test.js +14 -5
- package/dist/frontend/ts7/ast-guards.test.js.map +1 -1
- package/dist/frontend/ts7/ast-node.d.ts +6 -1
- package/dist/frontend/ts7/ast-node.js +484 -164
- package/dist/frontend/ts7/ast-node.js.map +1 -1
- package/dist/frontend/ts7/ast-node.test.js +109 -36
- package/dist/frontend/ts7/ast-node.test.js.map +1 -1
- package/dist/frontend/ts7/ast-text.js +13 -3
- package/dist/frontend/ts7/ast-text.js.map +1 -1
- package/dist/frontend/ts7/ast-text.test.js.map +1 -1
- package/dist/frontend/ts7/ast-types.js.map +1 -1
- package/dist/frontend/ts7/ast-wire.d.ts +1 -1
- package/dist/frontend/ts7/ast-wire.js +55 -20
- package/dist/frontend/ts7/ast-wire.js.map +1 -1
- package/dist/frontend/ts7/ast-wire.test.js +53 -8
- package/dist/frontend/ts7/ast-wire.test.js.map +1 -1
- package/dist/frontend/ts7/ast.js +47 -28
- package/dist/frontend/ts7/ast.js.map +1 -1
- package/dist/frontend/ts7/census-check.js +1 -1
- package/dist/frontend/ts7/census-check.js.map +1 -1
- package/dist/frontend/ts7/checker-cache.js.map +1 -1
- package/dist/frontend/ts7/checker.js +5 -3
- package/dist/frontend/ts7/checker.js.map +1 -1
- package/dist/frontend/ts7/checker.test.js +54 -17
- package/dist/frontend/ts7/checker.test.js.map +1 -1
- package/dist/frontend/ts7/enums.test.js +9 -4
- package/dist/frontend/ts7/enums.test.js.map +1 -1
- package/dist/frontend/ts7/native-api.js.map +1 -1
- package/dist/frontend/ts7/native-host.js.map +1 -1
- package/dist/frontend/ts7/native-process.js +9 -3
- package/dist/frontend/ts7/native-process.js.map +1 -1
- package/dist/frontend/ts7/program-adapter.js +1 -1
- package/dist/frontend/ts7/program-adapter.js.map +1 -1
- package/dist/frontend/ts7/program-host.js +7 -4
- package/dist/frontend/ts7/program-host.js.map +1 -1
- package/dist/frontend/ts7/program-host.test.js +43 -11
- package/dist/frontend/ts7/program-host.test.js.map +1 -1
- package/dist/frontend/ts7/rpc-api.js +3 -1
- package/dist/frontend/ts7/rpc-api.js.map +1 -1
- package/dist/frontend/ts7/rpc-client.js +15 -5
- package/dist/frontend/ts7/rpc-client.js.map +1 -1
- package/dist/frontend/ts7/rpc-client.test.js +26 -8
- package/dist/frontend/ts7/rpc-client.test.js.map +1 -1
- package/dist/frontend/ts7/rpc-filesystem.js.map +1 -1
- package/dist/frontend/ts7/rpc-filesystem.test.js +43 -10
- package/dist/frontend/ts7/rpc-filesystem.test.js.map +1 -1
- package/dist/frontend/ts7/rpc-process.js +16 -6
- package/dist/frontend/ts7/rpc-process.js.map +1 -1
- package/dist/frontend/ts7/rpc-process.test.js.map +1 -1
- package/dist/frontend/ts7/rpc-wire.d.ts +1 -0
- package/dist/frontend/ts7/rpc-wire.js +41 -14
- package/dist/frontend/ts7/rpc-wire.js.map +1 -1
- package/dist/frontend/ts7/rpc-wire.test.js +36 -6
- package/dist/frontend/ts7/rpc-wire.test.js.map +1 -1
- package/dist/frontend/ts7/semantic-checker.js +209 -68
- package/dist/frontend/ts7/semantic-checker.js.map +1 -1
- package/dist/frontend/ts7/semantic-checker.test.js +29 -14
- package/dist/frontend/ts7/semantic-checker.test.js.map +1 -1
- package/dist/frontend/ts7/semantic-json.js +7 -1
- package/dist/frontend/ts7/semantic-json.js.map +1 -1
- package/dist/frontend/ts7/semantic-json.test.js +17 -3
- package/dist/frontend/ts7/semantic-json.test.js.map +1 -1
- package/dist/frontend/ts7/semantic-model.js +147 -51
- package/dist/frontend/ts7/semantic-model.js.map +1 -1
- package/dist/frontend/ts7/semantic-model.test.js +72 -19
- package/dist/frontend/ts7/semantic-model.test.js.map +1 -1
- package/dist/frontend/ts7/semantic-types.d.ts +2 -2
- package/dist/frontend/ts7/session-cache.js +10 -3
- package/dist/frontend/ts7/session-cache.js.map +1 -1
- package/dist/frontend/ts7/session-cache.test.js +13 -4
- package/dist/frontend/ts7/session-cache.test.js.map +1 -1
- package/dist/frontend/ts7/session-path.js +25 -10
- package/dist/frontend/ts7/session-path.js.map +1 -1
- package/dist/frontend/ts7/session-path.test.js +47 -4
- package/dist/frontend/ts7/session-path.test.js.map +1 -1
- package/dist/frontend/ts7/session-timing.js +22 -3
- package/dist/frontend/ts7/session-timing.js.map +1 -1
- package/dist/frontend/ts7/session-timing.test.js +12 -3
- package/dist/frontend/ts7/session-timing.test.js.map +1 -1
- package/dist/frontend/ts7/session.d.ts +1 -0
- package/dist/frontend/ts7/session.js +109 -35
- package/dist/frontend/ts7/session.js.map +1 -1
- package/dist/frontend/ts7/session.test.js +69 -15
- package/dist/frontend/ts7/session.test.js.map +1 -1
- package/dist/frontend/ts7/source-parser.js +17 -6
- package/dist/frontend/ts7/source-parser.js.map +1 -1
- package/dist/frontend/ts7/source-parser.test.js +32 -9
- package/dist/frontend/ts7/source-parser.test.js.map +1 -1
- package/dist/frontend/tsc-codes.js +56 -11
- package/dist/frontend/tsc-codes.js.map +1 -1
- package/dist/frontend/tsc-codes.test.d.ts +1 -0
- package/dist/frontend/tsc-codes.test.js +16 -0
- package/dist/frontend/tsc-codes.test.js.map +1 -0
- package/dist/frontend/type-mapper.js +545 -204
- package/dist/frontend/type-mapper.js.map +1 -1
- package/dist/frontend/type-mapper.test.js +108 -33
- package/dist/frontend/type-mapper.test.js.map +1 -1
- package/dist/frontend/union-discriminants.js +8 -2
- package/dist/frontend/union-discriminants.js.map +1 -1
- package/dist/frontend/union-discriminants.test.js +77 -20
- package/dist/frontend/union-discriminants.test.js.map +1 -1
- package/dist/index.d.ts +9 -8
- package/dist/index.js +150 -81
- package/dist/index.js.map +1 -1
- package/dist/ir/analysis.js +95 -38
- package/dist/ir/analysis.js.map +1 -1
- package/dist/ir/analysis.test.js +91 -15
- package/dist/ir/analysis.test.js.map +1 -1
- package/dist/ir/api.d.ts +4 -0
- package/dist/ir/api.js +6 -0
- package/dist/ir/api.js.map +1 -0
- package/dist/ir/build.d.ts +7 -0
- package/dist/ir/build.js +27 -1
- package/dist/ir/build.js.map +1 -1
- package/dist/ir/builtin-effects.d.ts +9 -0
- package/dist/ir/builtin-effects.js +631 -0
- package/dist/ir/builtin-effects.js.map +1 -0
- package/dist/ir/builtin-signatures.d.ts +15 -0
- package/dist/ir/builtin-signatures.js +3396 -0
- package/dist/ir/builtin-signatures.js.map +1 -0
- package/dist/ir/byte-numbers.js +67 -16
- package/dist/ir/byte-numbers.js.map +1 -1
- package/dist/ir/byte-numbers.test.js +17 -4
- package/dist/ir/byte-numbers.test.js.map +1 -1
- package/dist/ir/constant-tables.js +13 -5
- package/dist/ir/constant-tables.js.map +1 -1
- package/dist/ir/constant-tables.test.js +47 -7
- package/dist/ir/constant-tables.test.js.map +1 -1
- package/dist/ir/control-flow.js +2 -1
- package/dist/ir/control-flow.js.map +1 -1
- package/dist/ir/control-flow.test.js +35 -11
- package/dist/ir/control-flow.test.js.map +1 -1
- package/dist/ir/initializer-bindings.d.ts +9 -0
- package/dist/ir/initializer-bindings.js +115 -0
- package/dist/ir/initializer-bindings.js.map +1 -0
- package/dist/ir/initializer-bindings.test.d.ts +1 -0
- package/dist/ir/initializer-bindings.test.js +118 -0
- package/dist/ir/initializer-bindings.test.js.map +1 -0
- package/dist/ir/integer-loop-facts.d.ts +12 -0
- package/dist/ir/integer-loop-facts.js +137 -0
- package/dist/ir/integer-loop-facts.js.map +1 -0
- package/dist/ir/integer-loops.js +85 -30
- package/dist/ir/integer-loops.js.map +1 -1
- package/dist/ir/integer-loops.test.js +76 -13
- package/dist/ir/integer-loops.test.js.map +1 -1
- package/dist/ir/integer-ranges.js +93 -21
- package/dist/ir/integer-ranges.js.map +1 -1
- package/dist/ir/integer-ranges.test.js +199 -21
- package/dist/ir/integer-ranges.test.js.map +1 -1
- package/dist/ir/intrinsic-signatures.d.ts +20 -0
- package/dist/ir/intrinsic-signatures.js +57 -0
- package/dist/ir/intrinsic-signatures.js.map +1 -0
- package/dist/ir/ir.d.ts +6 -2150
- package/dist/ir/ir.js +160 -1396
- package/dist/ir/ir.js.map +1 -1
- package/dist/ir/ir.test.js +98 -77
- package/dist/ir/ir.test.js.map +1 -1
- package/dist/ir/runtime-features.d.ts +221 -0
- package/dist/ir/runtime-features.js +551 -0
- package/dist/ir/runtime-features.js.map +1 -0
- package/dist/ir/runtime-features.test.d.ts +1 -0
- package/dist/ir/runtime-features.test.js +98 -0
- package/dist/ir/runtime-features.test.js.map +1 -0
- package/dist/ir/scalar-records.js +130 -40
- package/dist/ir/scalar-records.js.map +1 -1
- package/dist/ir/scalar-records.test.js +146 -27
- package/dist/ir/scalar-records.test.js.map +1 -1
- package/dist/ir/serialize.js +4 -2
- package/dist/ir/serialize.js.map +1 -1
- package/dist/ir/serialize.test.js +44 -9
- package/dist/ir/serialize.test.js.map +1 -1
- package/dist/ir/traverse.js +156 -43
- package/dist/ir/traverse.js.map +1 -1
- package/dist/ir/traverse.test.js +99 -24
- package/dist/ir/traverse.test.js.map +1 -1
- package/dist/ir/validate.d.ts +1 -31
- package/dist/ir/validate.js +782 -1889
- package/dist/ir/validate.js.map +1 -1
- package/dist/ir/validate.test.js +610 -114
- package/dist/ir/validate.test.js.map +1 -1
- package/dist/library/cache-primitives.js +9 -10
- package/dist/library/cache-primitives.js.map +1 -1
- package/dist/library/cache-reset.test.js +2 -1
- package/dist/library/cache-reset.test.js.map +1 -1
- package/dist/library/compiler-self-identity.js +11 -5
- package/dist/library/compiler-self-identity.js.map +1 -1
- package/dist/library/compiler-self-identity.test.js +10 -3
- package/dist/library/compiler-self-identity.test.js.map +1 -1
- package/dist/library/fence-eval.js +24 -7
- package/dist/library/fence-eval.js.map +1 -1
- package/dist/library/fence-eval.test.js +31 -7
- package/dist/library/fence-eval.test.js.map +1 -1
- package/dist/library/int-infer.js +199 -59
- package/dist/library/int-infer.js.map +1 -1
- package/dist/library/int-infer.test.js +133 -57
- package/dist/library/int-infer.test.js.map +1 -1
- package/dist/library/ir-policy.d.ts +27 -0
- package/dist/library/ir-policy.js +232 -0
- package/dist/library/ir-policy.js.map +1 -0
- package/dist/library/library-cache.js +40 -17
- package/dist/library/library-cache.js.map +1 -1
- package/dist/library/library-cache.test.js +24 -13
- package/dist/library/library-cache.test.js.map +1 -1
- package/dist/library/library-profile.js +68 -13
- package/dist/library/library-profile.js.map +1 -1
- package/dist/library/prepare.js +48 -20
- package/dist/library/prepare.js.map +1 -1
- package/dist/library/semantic-source.js +16 -14
- package/dist/library/semantic-source.js.map +1 -1
- package/dist/library/semantic-source.test.js +9 -14
- package/dist/library/semantic-source.test.js.map +1 -1
- package/dist/library/sidecar-validate.js +53 -12
- package/dist/library/sidecar-validate.js.map +1 -1
- package/dist/library/sidecar.js +85 -24
- package/dist/library/sidecar.js.map +1 -1
- package/dist/library/trap-teaching.js +11 -2
- package/dist/library/trap-teaching.js.map +1 -1
- package/dist/native/cache.js +10 -4
- package/dist/native/cache.js.map +1 -1
- package/dist/native/cli.js +34 -9
- package/dist/native/cli.js.map +1 -1
- package/dist/native/compiler.js +167 -43
- package/dist/native/compiler.js.map +1 -1
- package/dist/native/compiler.test.js +129 -32
- package/dist/native/compiler.test.js.map +1 -1
- package/dist/native/comptime.js +23 -7
- package/dist/native/comptime.js.map +1 -1
- package/dist/native/comptime.test.js +26 -6
- package/dist/native/comptime.test.js.map +1 -1
- package/dist/native/executable-cache.js +77 -27
- package/dist/native/executable-cache.js.map +1 -1
- package/dist/native/executable-cache.test.js +41 -6
- package/dist/native/executable-cache.test.js.map +1 -1
- package/dist/native/file-identity.js +9 -2
- package/dist/native/file-identity.js.map +1 -1
- package/dist/native/file-identity.test.js.map +1 -1
- package/dist/native/library.js +50 -12
- package/dist/native/library.js.map +1 -1
- package/dist/native/prepare.js +119 -34
- package/dist/native/prepare.js.map +1 -1
- package/dist/native/prepare.test.js +22 -6
- package/dist/native/prepare.test.js.map +1 -1
- package/dist/native/runtime-typescript.js +24 -11
- package/dist/native/runtime-typescript.js.map +1 -1
- package/dist/native/runtime-typescript.test.js.map +1 -1
- package/dist/native/sanitizer.js +71 -18
- package/dist/native/sanitizer.js.map +1 -1
- package/dist/native/sanitizer.test.js +77 -20
- package/dist/native/sanitizer.test.js.map +1 -1
- package/dist/native/task.js.map +1 -1
- package/dist/native/task.test.js +7 -2
- package/dist/native/task.test.js.map +1 -1
- package/dist/native/toolchain.js +68 -26
- package/dist/native/toolchain.js.map +1 -1
- package/dist/native/toolchain.test.js +59 -20
- package/dist/native/toolchain.test.js.map +1 -1
- package/dist/startup-cache.d.ts +1 -1
- package/dist/startup-cache.js +1 -1
- package/dist/startup-cache.js.map +1 -1
- package/dist/timing.js.map +1 -1
- package/package.json +20 -20
- package/surface-manifest.json +1 -1
- package/dist/frontend/lowering/lower-builtins.d.ts +0 -601
- package/dist/frontend/lowering/lower-builtins.js +0 -8986
- package/dist/frontend/lowering/lower-builtins.js.map +0 -1
- package/dist/frontend/lowering/lower-containers.d.ts +0 -382
- package/dist/frontend/lowering/lower-containers.js +0 -7344
- package/dist/frontend/lowering/lower-containers.js.map +0 -1
|
@@ -0,0 +1,3396 @@
|
|
|
1
|
+
import { BIGINT_T } from "./ir.js";
|
|
2
|
+
import { arrayOf, BOOL, BYTES_U8, bytesOf, CHILD_T, CHILDSTREAM_T, CHILDWRITER_T, CRYPTOHASH_T, CRYPTOHMAC_T, DATE_T, DGRAMSOCK_T, DYN, F64, FILEHANDLE_T, FSWATCHER_T, HTTP2SESSION_T, HTTP2STREAM_T, HTTPCLIENTREQ_T, HTTPREQ_T, HTTPRES_T, JSVAL, NETSERVER_T, NETSOCKET_T, PROCSTREAM_T, REGEX, SEARCH_PARAMS_T, SECURECTX_T, SPAWNRES_T, STATS_T, STRING, SYMBOL_T, TESTCTX_T, URL_T, VOID, } from "./ir.js";
|
|
3
|
+
/** Preserve the closed names while giving every entry the same slot type. */
|
|
4
|
+
function defineLibFnSignatures(signatures) {
|
|
5
|
+
return signatures;
|
|
6
|
+
}
|
|
7
|
+
/** The closed native builtin call surface. Keep a call's semantics and ABI
|
|
8
|
+
* together here; frontend coercion and IR validation consume the same table.
|
|
9
|
+
* All arguments are required. Lowering supplies optional-source defaults
|
|
10
|
+
* before this boundary and preserves their evaluation order. */
|
|
11
|
+
export const LIB_FN_SIGS = defineLibFnSignatures({
|
|
12
|
+
/** Native static fetch and its Web-platform companions. fetch.start
|
|
13
|
+
* answers once the response head arrives; the response body readers
|
|
14
|
+
* consume the native body stream. AbortSignal and ReadableStream values
|
|
15
|
+
* are opaque checked-dynamic handles. */
|
|
16
|
+
"fetch.start": { argTypes: [STRING, DYN], result: { kind: "promise", inner: DYN } },
|
|
17
|
+
"fetch.responseNew": { argTypes: [DYN, DYN], result: DYN },
|
|
18
|
+
"fetch.input": { argTypes: [DYN, DYN], result: { kind: "promise", inner: DYN } },
|
|
19
|
+
"abort.controllerNew": { argTypes: [], result: DYN },
|
|
20
|
+
"abort.timeout": { argTypes: [DYN], result: DYN },
|
|
21
|
+
"abort.now": { argTypes: [DYN], result: DYN },
|
|
22
|
+
"abort.any": { argTypes: [DYN], result: DYN },
|
|
23
|
+
"fetch.function": { argTypes: [], result: DYN },
|
|
24
|
+
"fetch.requestNew": { argTypes: [DYN, DYN], result: DYN },
|
|
25
|
+
"fetch.headersNew": { argTypes: [DYN], result: DYN },
|
|
26
|
+
"fetch.responseArrayBuffer": { argTypes: [DYN], result: { kind: "promise", inner: DYN } },
|
|
27
|
+
"fetch.responseJson": { argTypes: [DYN], result: { kind: "promise", inner: DYN } },
|
|
28
|
+
"fetch.responseText": { argTypes: [DYN], result: { kind: "promise", inner: STRING } },
|
|
29
|
+
"fetch.responseBytes": { argTypes: [DYN], result: { kind: "promise", inner: BYTES_U8 } },
|
|
30
|
+
"fetch.abortControllerNew": { argTypes: [], result: DYN },
|
|
31
|
+
"fetch.abortTimeout": { argTypes: [DYN], result: DYN },
|
|
32
|
+
"fetch.abortNow": { argTypes: [DYN], result: DYN },
|
|
33
|
+
"fetch.abortAny": { argTypes: [DYN], result: DYN },
|
|
34
|
+
"fetch.streamNew": { argTypes: [DYN], result: DYN },
|
|
35
|
+
// Program-dependent iterable: typed arrays/bytes/string stay intact so
|
|
36
|
+
// the native stream can pull lazily; checked-dynamic values are the
|
|
37
|
+
// fallback. The libCall validator in validate.ts checks the closed set.
|
|
38
|
+
"fetch.webIs": { argTypes: [DYN, STRING], result: BOOL },
|
|
39
|
+
"fetch.streamIs": { argTypes: [DYN], result: BOOL },
|
|
40
|
+
"fetch.streamFrom": { argTypes: [null], result: DYN },
|
|
41
|
+
// The chunk/result record depends on ReadableStream<T>; validated by validate.ts.
|
|
42
|
+
"fetch.readerRead": { argTypes: [DYN], result: VOID },
|
|
43
|
+
"island.eval": { argTypes: [STRING], result: STRING },
|
|
44
|
+
/** Load an embedded npm package's runtime entry in the island (cached by
|
|
45
|
+
* the engine's module registry) and take one export: args are the entry
|
|
46
|
+
* KEY (an embedded module's key, from IrModule.embedded) and the export
|
|
47
|
+
* name — "default" for default imports, "*" for the namespace object.
|
|
48
|
+
* --dynamic only, like island.eval; result is an owned jsval. May throw
|
|
49
|
+
* (a package's top-level code can), bridged catchably. */
|
|
50
|
+
"island.import": { argTypes: [STRING, STRING, STRING], result: JSVAL },
|
|
51
|
+
/** Dynamic `import(spec)`: load a module through the island's module
|
|
52
|
+
* system — an embedded module's key or a builtin shim's "node:x" key —
|
|
53
|
+
* and answer an ENGINE promise of its namespace object (always a
|
|
54
|
+
* promise, never a throw: load and evaluation failures REJECT it,
|
|
55
|
+
* Node's shape). The frontend wraps the result in jsBridgePromise, so
|
|
56
|
+
* awaiting parks the fiber and a rejection crosses catchably. --dynamic
|
|
57
|
+
* only; result is an owned jsval holding the engine promise. */
|
|
58
|
+
"island.importDyn": { argTypes: [STRING], result: JSVAL },
|
|
59
|
+
// Result is the cast's mapped PROMISE target (program-dependent) —
|
|
60
|
+
// checked in the libCall case, like error.new.
|
|
61
|
+
/** A checked cast the boundary can never satisfy, DEFERRED to runtime:
|
|
62
|
+
* `islandValue as Promise<T>` — the value is an ENGINE promise and T
|
|
63
|
+
* has no validated exit (Node-typed async APIs put class-shaped
|
|
64
|
+
* interfaces there), so instead of refusing the build the cast throws a
|
|
65
|
+
* catchable TypeError AT THE CAST naming the target type (args: the
|
|
66
|
+
* island value — evaluated, borrowed — and the type name). The result
|
|
67
|
+
* type is the cast's mapped target (a typed dummy; the exception is
|
|
68
|
+
* pending). Documented divergence: JS `as` never checks — like the dyn
|
|
69
|
+
* boundary, a conversion that cannot happen throws instead of lying.
|
|
70
|
+
* --dynamic only. */
|
|
71
|
+
"island.castFail": { argTypes: [JSVAL, STRING], result: VOID },
|
|
72
|
+
"json.parse": { argTypes: [STRING], result: DYN },
|
|
73
|
+
"json.parseReviver": { argTypes: [STRING, DYN], result: DYN },
|
|
74
|
+
"json.stringifyReplacer": { argTypes: [DYN, DYN, STRING], result: DYN },
|
|
75
|
+
"json.stringifyValue": { argTypes: [DYN, DYN, DYN], result: DYN },
|
|
76
|
+
/** Keyed WRITE on a dyn value — `h.onDone = cb` / `h["k"] = v` on a
|
|
77
|
+
* checked-dynamic object (args: receiver, key string, value — all
|
|
78
|
+
* borrowed; the runtime copies the key and retains the value in). An
|
|
79
|
+
* OBJ receiver sets the member (later writes win, insertion order
|
|
80
|
+
* preserved — JS exactly); undefined/null throws Node's catchable
|
|
81
|
+
* "Cannot set properties of undefined (setting 'k')"; every other kind
|
|
82
|
+
* throws Node's STRICT-mode "Cannot create property 'k' on <kind>" —
|
|
83
|
+
* primitives quoting their rendering, V8's "on number '5'"
|
|
84
|
+
* (sloppy mode would silently ignore — suite tests are 'use strict';
|
|
85
|
+
* SEMANTICS.md notes the sloppy divergence: loud, never silent). Void
|
|
86
|
+
* result; in the may-throw seed set. */
|
|
87
|
+
"dyn.keySet": { argTypes: [DYN, STRING, DYN], result: VOID },
|
|
88
|
+
"dyn.keySetComputed": { argTypes: [DYN, DYN, DYN], result: VOID },
|
|
89
|
+
/** Delete an ordinary checked-native object's own key. Borrows both
|
|
90
|
+
* arguments; other receiver representations retain a runtime refusal. */
|
|
91
|
+
"dyn.keyDelete": { argTypes: [DYN, STRING, BOOL], result: VOID },
|
|
92
|
+
"dyn.keyDeleteComputed": { argTypes: [DYN, DYN, BOOL], result: VOID },
|
|
93
|
+
"dyn.hasKeyComputed": { argTypes: [DYN, DYN], result: BOOL },
|
|
94
|
+
"dyn.hasOwnComputed": { argTypes: [DYN, DYN], result: BOOL },
|
|
95
|
+
"dyn.propertyIsEnumerableComputed": { argTypes: [DYN, DYN], result: BOOL },
|
|
96
|
+
/** Native own properties on globalThis keyed by symbol identity. */
|
|
97
|
+
"dyn.globalSymbolGet": { argTypes: [SYMBOL_T], result: DYN },
|
|
98
|
+
"dyn.globalSymbolSet": { argTypes: [SYMBOL_T, DYN], result: VOID },
|
|
99
|
+
"dyn.globalSymbolHas": { argTypes: [SYMBOL_T], result: BOOL },
|
|
100
|
+
"dyn.globalSymbolDelete": { argTypes: [SYMBOL_T], result: VOID },
|
|
101
|
+
/** Exact native class capsule identity, without materializing its fields. */
|
|
102
|
+
"dyn.typedRefIs": { argTypes: [DYN, STRING], result: BOOL },
|
|
103
|
+
"dyn.classIs": { argTypes: [DYN, STRING], result: BOOL },
|
|
104
|
+
/** Destructuring pack over a dyn source — `const [a, b] = d`, a
|
|
105
|
+
* destructured dyn callback param (args: the source and the STATIC
|
|
106
|
+
* TypeError spelling, "" when the source has none — both borrowed;
|
|
107
|
+
* result: a fresh dyn array, +1). Iterable kinds collect like spread
|
|
108
|
+
* (arrays element-by-element, strings by code point, bytes by byte);
|
|
109
|
+
* every other kind throws V8's destructuring TypeError — the spelling
|
|
110
|
+
* verbatim when non-empty, else the runtime kind wording ("number 5 is
|
|
111
|
+
* not iterable (cannot read property Symbol(Symbol.iterator))"). In the
|
|
112
|
+
* may-throw seed set. */
|
|
113
|
+
"dyn.iterPack": { argTypes: [DYN, STRING], result: DYN },
|
|
114
|
+
"dyn.arrayFromIterator": { argTypes: [DYN], result: DYN },
|
|
115
|
+
"dyn.iterator": { argTypes: [DYN, STRING], result: DYN },
|
|
116
|
+
"dyn.iteratorResult": { argTypes: [DYN], result: DYN },
|
|
117
|
+
"dyn.iteratorCanStep": { argTypes: [DYN, DYN], result: BOOL },
|
|
118
|
+
"dyn.iteratorStep": { argTypes: [DYN], result: DYN },
|
|
119
|
+
"dyn.iteratorStepDone": { argTypes: [DYN], result: BOOL },
|
|
120
|
+
"dyn.mapSeedEntries": { argTypes: [DYN], result: DYN },
|
|
121
|
+
"dyn.mapSeedEntry": { argTypes: [DYN], result: DYN },
|
|
122
|
+
/** The for-of-over-dyn pack accessors — the emitted index loop drives
|
|
123
|
+
* them over a dyn.iterPack result (ARR by construction). arrLen: the
|
|
124
|
+
* ARR length as f64 (0 for non-ARR kinds; arg borrowed). arrAt: the
|
|
125
|
+
* element at index (+1; the undefined singleton past the end). Neither
|
|
126
|
+
* throws. */
|
|
127
|
+
"dyn.arrLen": { argTypes: [DYN], result: F64 },
|
|
128
|
+
"dyn.arrAt": { argTypes: [DYN, F64], result: DYN },
|
|
129
|
+
/** `key in v` with a RUNTIME (string) key on a checked-dynamic
|
|
130
|
+
* receiver (args: value dyn, key string; result bool): OBJ answers
|
|
131
|
+
* own-member presence, ARR answers 'length'/a valid index — exactly
|
|
132
|
+
* the literal-key dynHasKey path. Proxy has traps may throw. */
|
|
133
|
+
"dyn.hasKey": { argTypes: [DYN, STRING], result: BOOL },
|
|
134
|
+
"dyn.freeze": { argTypes: [DYN], result: DYN },
|
|
135
|
+
"dyn.isFrozen": { argTypes: [DYN], result: BOOL },
|
|
136
|
+
"dyn.nativeSetNew": { argTypes: [DYN], result: DYN },
|
|
137
|
+
"dyn.nativeSetIs": { argTypes: [DYN], result: BOOL },
|
|
138
|
+
"dyn.nativeMapIs": { argTypes: [DYN], result: BOOL },
|
|
139
|
+
"dyn.nativeUrlIs": { argTypes: [DYN], result: BOOL },
|
|
140
|
+
"dyn.nativeDateIs": { argTypes: [DYN], result: BOOL },
|
|
141
|
+
"date.nativeNew": { argTypes: [DYN], result: DYN },
|
|
142
|
+
"date.checkedValue": { argTypes: [DYN], result: DATE_T },
|
|
143
|
+
"dyn.nativeRegexIs": { argTypes: [DYN], result: BOOL },
|
|
144
|
+
/** toString() on a checked-dynamic receiver: runtime kind dispatch
|
|
145
|
+
* (bytes decode per the literal encoding — utf8 default; strings,
|
|
146
|
+
* numbers, booleans, arrays, objects answer JS-exactly; undefined and
|
|
147
|
+
* null throw the catchable TypeError). */
|
|
148
|
+
"dyn.toString": { argTypes: [DYN, DYN, STRING], result: STRING },
|
|
149
|
+
/** Object.defineProperties over dyn values (args: target, descriptors —
|
|
150
|
+
* both borrowed dyn; result: the target, +1 — JS's return value).
|
|
151
|
+
* Value descriptors become own properties on OBJ and FUNC targets;
|
|
152
|
+
* OBJ targets preserve data attributes. get/set
|
|
153
|
+
* descriptors and non-object targets/descriptors throw catchably
|
|
154
|
+
* (Node's TypeError texts; accessors the loud unsupported Error). In
|
|
155
|
+
* the may-throw seed set. */
|
|
156
|
+
"dyn.defineProps": { argTypes: [DYN, DYN], result: DYN },
|
|
157
|
+
"dyn.defineProperty": { argTypes: [DYN, DYN, DYN], result: DYN },
|
|
158
|
+
"dyn.getOwnPropertyDescriptor": { argTypes: [DYN, DYN], result: DYN },
|
|
159
|
+
"dyn.arrayProtoCall": { argTypes: [DYN, STRING, DYN], result: DYN },
|
|
160
|
+
"dyn.promiseAll": { argTypes: [DYN], result: { kind: "promise", inner: DYN } },
|
|
161
|
+
/** Bare `typeof v` on a dyn value AS A STRING (arg: the dyn value,
|
|
162
|
+
* borrowed; result: an owned string) — the dyn kind's JS answer:
|
|
163
|
+
* undefined→"undefined", null/object/array/bytes→"object" (JS's oldest
|
|
164
|
+
* wart preserved), boolean/number/string by kind, function→"function".
|
|
165
|
+
* Never throws. */
|
|
166
|
+
"dyn.typeof": { argTypes: [DYN], result: STRING },
|
|
167
|
+
/** Object.prototype.toString.call on a checked-dynamic value. */
|
|
168
|
+
"dyn.objectTag": { argTypes: [DYN], result: STRING },
|
|
169
|
+
/** Engine-free CommonJS module graph. Module values are scalar f64
|
|
170
|
+
* handles; generated startup defines the registry, init wrappers update
|
|
171
|
+
* loading/cache state, and the read surface answers Node's live metadata. */
|
|
172
|
+
"module.registryInit": { argTypes: [F64], result: VOID },
|
|
173
|
+
"module.define": { argTypes: [F64, STRING, STRING, STRING, arrayOf(STRING), BOOL], result: VOID },
|
|
174
|
+
"module.enter": { argTypes: [F64], result: VOID },
|
|
175
|
+
"module.link": { argTypes: [F64, F64], result: VOID },
|
|
176
|
+
"module.finish": { argTypes: [F64], result: VOID },
|
|
177
|
+
"module.fail": { argTypes: [F64], result: VOID },
|
|
178
|
+
"module.filename": { argTypes: [F64], result: STRING },
|
|
179
|
+
"module.id": { argTypes: [F64], result: STRING },
|
|
180
|
+
"module.path": { argTypes: [F64], result: STRING },
|
|
181
|
+
"module.paths": { argTypes: [F64], result: arrayOf(STRING) },
|
|
182
|
+
"module.children": { argTypes: [F64], result: arrayOf(F64) },
|
|
183
|
+
"module.parent": { argTypes: [F64], result: F64 },
|
|
184
|
+
"module.loaded": { argTypes: [F64], result: BOOL },
|
|
185
|
+
"module.cacheGet": { argTypes: [STRING], result: F64 },
|
|
186
|
+
"module.cacheHas": { argTypes: [STRING], result: BOOL },
|
|
187
|
+
"module.cacheKeys": { argTypes: [], result: arrayOf(STRING) },
|
|
188
|
+
"timers.setTimeout": { argTypes: [{ kind: "func", params: [], ret: VOID }, F64], result: VOID },
|
|
189
|
+
/** The repeating timer pair. setInterval takes (callback, ms) like
|
|
190
|
+
* setTimeout and RETURNS the f64 handle the fallback declarations
|
|
191
|
+
* promise (ids start at 1, so truthiness narrowing works); the loop
|
|
192
|
+
* owns the callback until clearInterval removes the entry (eagerly — a
|
|
193
|
+
* live interval keeps the loop alive, a cleared one releases it, like
|
|
194
|
+
* Node). Neither throws; a throw ESCAPING an interval callback ends the
|
|
195
|
+
* program like a setTimeout throw. */
|
|
196
|
+
"timers.setInterval": { argTypes: [{ kind: "func", params: [], ret: VOID }, F64], result: F64 },
|
|
197
|
+
"timers.clearInterval": { argTypes: [F64], result: VOID },
|
|
198
|
+
/** setTimeout WITH a clear handle (the f64 id) — the clearable/unref-able
|
|
199
|
+
* one-shot; clearTimeout cancels it, .unref() drops it from loop
|
|
200
|
+
* liveness. The plain timers.setTimeout stays the handle-less
|
|
201
|
+
* fire-and-forget. */
|
|
202
|
+
"timers.setTimeoutHandle": {
|
|
203
|
+
argTypes: [{ kind: "func", params: [], ret: VOID }, F64],
|
|
204
|
+
result: F64,
|
|
205
|
+
},
|
|
206
|
+
"timers.clearTimeout": { argTypes: [F64], result: VOID },
|
|
207
|
+
/** Timeout.unref()/ref()/hasRef() — loop-liveness bookkeeping over the
|
|
208
|
+
* handle id. unref/ref RETURN the handle (f64) for chaining; hasRef
|
|
209
|
+
* returns bool. */
|
|
210
|
+
"timers.unref": { argTypes: [F64], result: F64 },
|
|
211
|
+
"timers.ref": { argTypes: [F64], result: F64 },
|
|
212
|
+
"timers.hasRef": { argTypes: [F64], result: BOOL },
|
|
213
|
+
/** Timeout.refresh() — re-arm to now + the original delay (from the
|
|
214
|
+
* heap or from inside the firing callback; a one-shot that fired on an
|
|
215
|
+
* earlier turn is gone and no-ops — documented divergence). Returns
|
|
216
|
+
* the handle for chaining like unref/ref. */
|
|
217
|
+
"timers.refresh": { argTypes: [F64], result: F64 },
|
|
218
|
+
/** setImmediate/clearImmediate — Node's check phase: callbacks run
|
|
219
|
+
* once per loop turn AFTER due timers, FIFO, and immediates queued
|
|
220
|
+
* mid-phase wait for the next turn. setImmediate returns the f64
|
|
221
|
+
* handle (its own id space — clearTimeout of an Immediate no-ops,
|
|
222
|
+
* like Node); the Immediate ref trio mirrors the Timeout one (an
|
|
223
|
+
* unref'd pending immediate neither keeps the loop alive nor fires
|
|
224
|
+
* once nothing reffed remains). */
|
|
225
|
+
"timers.setImmediate": { argTypes: [{ kind: "func", params: [], ret: VOID }], result: F64 },
|
|
226
|
+
/** queueMicrotask (scr_async.c): the callback enters the SAME FIFO
|
|
227
|
+
* promise continuations ride — one microtask order, like V8's queue —
|
|
228
|
+
* and a throw is an UNCAUGHT exception (never a rejection).
|
|
229
|
+
* timers.queueMicrotask takes an owned zero-param closure and never
|
|
230
|
+
* throws; the Dyn form (checked-dynamic arguments — the mustCall
|
|
231
|
+
* wrapper, the suite's invalid-input probes) throws Node's
|
|
232
|
+
* ERR_INVALID_ARG_TYPE synchronously on a non-function value and calls
|
|
233
|
+
* the function with zero arguments at drain. */
|
|
234
|
+
"timers.queueMicrotask": { argTypes: [{ kind: "func", params: [], ret: VOID }], result: VOID },
|
|
235
|
+
"timers.queueMicrotaskDyn": { argTypes: [DYN], result: VOID },
|
|
236
|
+
"timers.clearImmediate": { argTypes: [F64], result: VOID },
|
|
237
|
+
/** process.nextTick(cb, ...args) — the user tick queue. args: [cb
|
|
238
|
+
* (() => void; trailing call arguments ride the timer surface's
|
|
239
|
+
* interned dyn thunk)]. Ticks drain BEFORE promise jobs at every loop
|
|
240
|
+
* checkpoint, to joint exhaustion with them (Node's tick-then-
|
|
241
|
+
* microtask order); ticks enqueued by station listeners run at the
|
|
242
|
+
* NEXT checkpoint (the stream-tick station divergence, SEMANTICS.md).
|
|
243
|
+
* Pending ticks are always-ready work — the loop neither sleeps nor
|
|
244
|
+
* exits while any exist; ticks scheduled from 'exit' listeners never
|
|
245
|
+
* run (Node). The enqueue itself never throws. */
|
|
246
|
+
"process.nextTick": { argTypes: [{ kind: "func", params: [], ret: VOID }], result: VOID },
|
|
247
|
+
/** The process introspection statics. uptime: seconds since the
|
|
248
|
+
* binary's own start (fractional — a load-time monotonic anchor).
|
|
249
|
+
* availableMemory/constrainedMemory: libuv's numbers (free-ish bytes;
|
|
250
|
+
* the cgroup cap or 0). cpuUser/cpuSystem (+ threadCpu twins): the
|
|
251
|
+
* process/thread CPU clocks in microseconds — the frontend composes
|
|
252
|
+
* the {user, system} records. The *Diff forms answer current − prev
|
|
253
|
+
* for one field; cpuPrevValidate throws Node's ERR_INVALID_ARG_VALUE
|
|
254
|
+
* RangeError for negative/non-finite prev fields (user first, then
|
|
255
|
+
* system — Node's order; MAY THROW). rusage(idx): one
|
|
256
|
+
* process.resourceUsage() field by canonical index (Node's units).
|
|
257
|
+
* activeResources: the loop's own bookkeeping — 'Timeout' per armed
|
|
258
|
+
* (or firing, uncleared) timer, 'Immediate' per queued unfired
|
|
259
|
+
* immediate; unmodeled resource kinds are absent (SEMANTICS.md). */
|
|
260
|
+
"process.uptime": { argTypes: [], result: F64 },
|
|
261
|
+
/** perf_hooks performance.now(): fractional ms since process start. */
|
|
262
|
+
"perf.now": { argTypes: [], result: F64 },
|
|
263
|
+
"process.availableMemory": { argTypes: [], result: F64 },
|
|
264
|
+
"process.constrainedMemory": { argTypes: [], result: F64 },
|
|
265
|
+
"process.cpuUser": { argTypes: [], result: F64 },
|
|
266
|
+
"process.cpuSystem": { argTypes: [], result: F64 },
|
|
267
|
+
"process.cpuUserDiff": { argTypes: [F64], result: F64 },
|
|
268
|
+
"process.cpuSystemDiff": { argTypes: [F64], result: F64 },
|
|
269
|
+
"process.threadCpuUser": { argTypes: [], result: F64 },
|
|
270
|
+
"process.threadCpuSystem": { argTypes: [], result: F64 },
|
|
271
|
+
"process.threadCpuUserDiff": { argTypes: [F64], result: F64 },
|
|
272
|
+
"process.threadCpuSystemDiff": { argTypes: [F64], result: F64 },
|
|
273
|
+
"process.cpuPrevValidate": { argTypes: [F64, F64], result: VOID },
|
|
274
|
+
"process.rusage": { argTypes: [F64], result: F64 },
|
|
275
|
+
"process.activeResources": { argTypes: [], result: arrayOf(STRING) },
|
|
276
|
+
"timers.immediateUnref": { argTypes: [F64], result: F64 },
|
|
277
|
+
"timers.immediateRef": { argTypes: [F64], result: F64 },
|
|
278
|
+
"timers.immediateHasRef": { argTypes: [F64], result: BOOL },
|
|
279
|
+
/** The tolerated non-handle clear (`clearTimeout(null)`,
|
|
280
|
+
* `clearInterval({})`, zero-argument forms): Node silently ignores
|
|
281
|
+
* anything that is not a live handle — a VOID no-op the emitter drops
|
|
282
|
+
* (only syntactically side-effect-free arguments take this path). */
|
|
283
|
+
"timers.clearNoop": { argTypes: [], result: VOID },
|
|
284
|
+
// Signal listeners are zero-param (the ambient shape); exit/stdin
|
|
285
|
+
// callbacks carry program-dependent one-param shapes — null slots, the
|
|
286
|
+
// libCall case checks them (child.onExit precedent).
|
|
287
|
+
/** Named process signal events: [name string, callback dyn, once bool]
|
|
288
|
+
* or [name, callback] for removal. The runtime resolves platform signal
|
|
289
|
+
* numbers and delivers (name, number). Listeners do not keep the loop
|
|
290
|
+
* alive. Invalid callbacks and uncatchable signals throw. */
|
|
291
|
+
"process.onSignal": { argTypes: [STRING, DYN, BOOL], result: VOID },
|
|
292
|
+
"process.offSignal": { argTypes: [STRING, DYN], result: VOID },
|
|
293
|
+
/** The process 'exit' event — process.on/once/off("exit"). args: [cb,
|
|
294
|
+
* once bool] / [cb]. Listeners run SYNCHRONOUSLY at termination
|
|
295
|
+
* (normal exit, process.exit(), the uncaught/unhandled exit-1 paths)
|
|
296
|
+
* with the exit code; anything they schedule never runs, like Node.
|
|
297
|
+
* Callback shapes: () => void or (code: number) => void — the emitter
|
|
298
|
+
* picks the runtime adapter. Never throw. */
|
|
299
|
+
"process.onExit": { argTypes: [null, BOOL], result: VOID },
|
|
300
|
+
"process.offExit": { argTypes: [null], result: VOID },
|
|
301
|
+
/** process.stdin listener registration — stdin.on/once("data" | "end" |
|
|
302
|
+
* "error", cb). args: [cb, once bool]. data callbacks: () => void or
|
|
303
|
+
* (chunk: Uint8Array) => void; end: () => void; error: () => void or
|
|
304
|
+
* (err: Error) => void (the child error adapters are reused). While a
|
|
305
|
+
* data listener (or a parked for-await chunk promise) exists, stdin
|
|
306
|
+
* keeps the loop alive — Node's flowing-stdin keep-alive. Never
|
|
307
|
+
* throw. */
|
|
308
|
+
"stdin.onData": { argTypes: [null, BOOL], result: VOID },
|
|
309
|
+
"stdin.onEnd": { argTypes: [{ kind: "func", params: [], ret: VOID }, BOOL], result: VOID },
|
|
310
|
+
"stdin.onError": { argTypes: [null, BOOL], result: VOID },
|
|
311
|
+
/** The for-await chunk source over process.stdin: no args, result
|
|
312
|
+
* Promise<Uint8Array> (+1). Fulfills with the next arrived chunk; the
|
|
313
|
+
* EMPTY bytes value is the done sentinel (POSIX reads never deliver
|
|
314
|
+
* empty data chunks), which the for-await desugar turns into loop
|
|
315
|
+
* exit. Never throws itself; awaiting it re-throws nothing (stdin
|
|
316
|
+
* errors surface through 'error' listeners, not the iterator). */
|
|
317
|
+
"stdin.nextChunk": { argTypes: [], result: { kind: "promise", inner: BYTES_U8 } },
|
|
318
|
+
"fs.readFileSync": { argTypes: [STRING, STRING], result: STRING },
|
|
319
|
+
/** readFileSync(path) — the Buffer read (+1 bytes); throws catchably
|
|
320
|
+
* like the utf8 form. */
|
|
321
|
+
"fs.readFileSyncBuf": { argTypes: [STRING], result: BYTES_U8 },
|
|
322
|
+
/** readFileSync(path, enc) with a RUNTIME encoding (an untyped JS
|
|
323
|
+
* parameter): undefined/null answer Buffers, utf8 a string, other real
|
|
324
|
+
* encodings fence loudly, unknown names throw ERR_UNKNOWN_ENCODING. */
|
|
325
|
+
"fs.readFileSyncDyn": { argTypes: [STRING, DYN], result: DYN },
|
|
326
|
+
"fs.writeFileSync": { argTypes: [STRING, STRING], result: VOID },
|
|
327
|
+
"fs.appendFileSync": { argTypes: [STRING, STRING], result: VOID },
|
|
328
|
+
"fs.existsSync": { argTypes: [STRING], result: BOOL },
|
|
329
|
+
"fs.mkdirSync": { argTypes: [STRING], result: VOID },
|
|
330
|
+
"fs.rmSync": { argTypes: [STRING], result: VOID },
|
|
331
|
+
"fs.rmdirSync": { argTypes: [STRING], result: VOID },
|
|
332
|
+
"fs.readdirSync": { argTypes: [STRING], result: arrayOf(STRING) },
|
|
333
|
+
// Result is the call site's Dirent record array (VOID is the
|
|
334
|
+
// structure-checked sentinel, the os.networkInterfaces pattern).
|
|
335
|
+
/** `fs.readdirSync(path, { withFileTypes: true })` — Dirent rows over
|
|
336
|
+
* one readdir pass (scr_lib.c's scandir snapshot; DT_UNKNOWN falls back
|
|
337
|
+
* to lstat, Node's getDirents rule). The result type is the call site's
|
|
338
|
+
* interned Dirent record array (name, parentPath, hidden %dtype in
|
|
339
|
+
* libuv's UV_DIRENT encoding) — verified by the frontend; the emitter
|
|
340
|
+
* assembles the rows from the snapshot. OS order, no "."/"..". Throws
|
|
341
|
+
* Node's scandir errno error (may-throw seed set); fresh +1 array. */
|
|
342
|
+
"fs.readdirTypesSync": { argTypes: [STRING], result: VOID },
|
|
343
|
+
/** node:path (scr_path.c ports BOTH of Node's implementations
|
|
344
|
+
* function-by-function): the `path.*` family is posix, the
|
|
345
|
+
* `path.win32*` family is Node v24's path.win32 byte-for-byte — the
|
|
346
|
+
* frontend binds the bare module to the TARGET platform's family
|
|
347
|
+
* (Node on Windows IS path.win32) and the path.posix / path.win32
|
|
348
|
+
* namespaces to their own family everywhere. join and resolve take ONE
|
|
349
|
+
* string[] arg — the frontend packs the variadic call's arguments into
|
|
350
|
+
* an array literal. basename always receives its suffix (the frontend
|
|
351
|
+
* completes an omitted one with "", a Node no-op). toNamespacedPath is
|
|
352
|
+
* the posix identity and the win32 \\?\-prefixer. None of these throw;
|
|
353
|
+
* the resolves consult the process cwd like Node's. */
|
|
354
|
+
"path.join": { argTypes: [arrayOf(STRING)], result: STRING },
|
|
355
|
+
"path.resolve": { argTypes: [arrayOf(STRING)], result: STRING },
|
|
356
|
+
"path.normalize": { argTypes: [STRING], result: STRING },
|
|
357
|
+
"path.dirname": { argTypes: [STRING], result: STRING },
|
|
358
|
+
"path.basename": { argTypes: [STRING, STRING], result: STRING },
|
|
359
|
+
"path.extname": { argTypes: [STRING], result: STRING },
|
|
360
|
+
"path.isAbsolute": { argTypes: [STRING], result: BOOL },
|
|
361
|
+
"path.relative": { argTypes: [STRING, STRING], result: STRING },
|
|
362
|
+
"path.toNamespacedPath": { argTypes: [STRING], result: STRING },
|
|
363
|
+
"path.win32Join": { argTypes: [arrayOf(STRING)], result: STRING },
|
|
364
|
+
"path.win32Resolve": { argTypes: [arrayOf(STRING)], result: STRING },
|
|
365
|
+
"path.win32Normalize": { argTypes: [STRING], result: STRING },
|
|
366
|
+
"path.win32Dirname": { argTypes: [STRING], result: STRING },
|
|
367
|
+
"path.win32Basename": { argTypes: [STRING, STRING], result: STRING },
|
|
368
|
+
"path.win32Extname": { argTypes: [STRING], result: STRING },
|
|
369
|
+
"path.win32IsAbsolute": { argTypes: [STRING], result: BOOL },
|
|
370
|
+
"path.win32Relative": { argTypes: [STRING, STRING], result: STRING },
|
|
371
|
+
"path.win32ToNamespacedPath": { argTypes: [STRING], result: STRING },
|
|
372
|
+
/** node:os: homedir is $HOME else getpwuid(3); tmpdir is Node's env
|
|
373
|
+
* cascade ($TMPDIR/$TMP/$TEMP else /tmp, one trailing slash trimmed).
|
|
374
|
+
* os.platform() lowers to process.platform — one implementation. */
|
|
375
|
+
"os.homedir": { argTypes: [], result: STRING },
|
|
376
|
+
/** os.release(): uname(2)'s release field — Node's own implementation
|
|
377
|
+
* (the kernel version string, e.g. "24.6.0" on macOS 15). Interned; +1
|
|
378
|
+
* per read. Never throws. */
|
|
379
|
+
"os.release": { argTypes: [], result: STRING },
|
|
380
|
+
/** os.type(): uname(2)'s sysname ("Darwin", "Linux"; "Windows_NT" on
|
|
381
|
+
* win32) — Node's uv_os_uname answer. Interned per call; never throws. */
|
|
382
|
+
"os.type": { argTypes: [], result: STRING },
|
|
383
|
+
/** os.totalmem(): total physical memory in bytes. Never throws. */
|
|
384
|
+
"os.totalmem": { argTypes: [], result: F64 },
|
|
385
|
+
/** umask(2): arg < 0 reads without setting (umask has no read-only form
|
|
386
|
+
* — set 0, restore); otherwise sets and answers the PREVIOUS mask.
|
|
387
|
+
* Never throws. */
|
|
388
|
+
"process.umask": { argTypes: [F64], result: F64 },
|
|
389
|
+
/** chdir(2) — throws Node's fs-shaped error (ENOENT/EACCES/ENOTDIR,
|
|
390
|
+
* syscall "chdir") on failure. */
|
|
391
|
+
"process.chdir": { argTypes: [STRING], result: VOID },
|
|
392
|
+
"process.loadEnvFile": { argTypes: [DYN], result: VOID },
|
|
393
|
+
/** process._exiting: true once the exit sequence began (exit listeners
|
|
394
|
+
* running) — the runtime flag scr_run_exit_listeners/process.exit set.
|
|
395
|
+
* Never throws. */
|
|
396
|
+
"process.exiting": { argTypes: [], result: BOOL },
|
|
397
|
+
/** net's process-wide happy-eyeballs attempt budget (Node's default
|
|
398
|
+
* 250ms): one runtime double in the core unit, so reading/writing it
|
|
399
|
+
* never forces the net unit into the link. Never throw. */
|
|
400
|
+
"net.getAutoSelTimeout": { argTypes: [], result: F64 },
|
|
401
|
+
"net.setAutoSelTimeout": { argTypes: [F64], result: VOID },
|
|
402
|
+
/** realpath(3) with Node's error shape (syscall "lstat" in the message,
|
|
403
|
+
* Node's own spelling for realpathSync failures). +1 fresh string. */
|
|
404
|
+
"fs.realpathSync": { argTypes: [STRING], result: STRING },
|
|
405
|
+
/** Native realpath with syscall "realpath" on failure. +1 fresh string. */
|
|
406
|
+
"fs.realpathNativeSync": { argTypes: [STRING], result: STRING },
|
|
407
|
+
/** The os.userInfo() field trio (uv_os_get_passwd's slices): pw_name,
|
|
408
|
+
* pw_shell, pw_dir — the PASSWD homedir, not os.homedir's $HOME-first
|
|
409
|
+
* cascade (Node's own split). The frontend assembles the UserInfo
|
|
410
|
+
* record from these plus getuid/getgid. +1 fresh strings; a passwd
|
|
411
|
+
* lookup failure aborts (Node throws a system error there — no
|
|
412
|
+
* compiled program path reaches it for the running uid). */
|
|
413
|
+
"os.userName": { argTypes: [], result: STRING },
|
|
414
|
+
"os.userShell": { argTypes: [], result: STRING },
|
|
415
|
+
"os.userHomedir": { argTypes: [], result: STRING },
|
|
416
|
+
"os.tmpdir": { argTypes: [], result: STRING },
|
|
417
|
+
// Result is the call site's Dict<NetworkInterfaceInfo[]> record (VOID is
|
|
418
|
+
// the dgram.address sentinel — the libCall case checks the structure).
|
|
419
|
+
/** os.networkInterfaces(): getifaddrs(3) → the Dict<NetworkInterfaceInfo[]>
|
|
420
|
+
* record, built inline by the emitter from a runtime snapshot (scr_lib.c).
|
|
421
|
+
* The result type is the CALL SITE's mapped @types/node shape — a pure
|
|
422
|
+
* index-signature record whose value is `Info[] | undefined`, Info a
|
|
423
|
+
* two-record union (IPv4: scopeid `number | undefined` holding undefined;
|
|
424
|
+
* IPv6: scopeid number) — verified structurally by the frontend. Rows
|
|
425
|
+
* match libuv's filter (IFF_UP && IFF_RUNNING, AF_INET/AF_INET6; loopback
|
|
426
|
+
* = internal; MACs from the interface's link-level sibling entry, zeros
|
|
427
|
+
* when absent; cidr from the netmask's contiguous prefix, the null arm
|
|
428
|
+
* when it is missing or non-contiguous). Key/row order follows the OS's
|
|
429
|
+
* getifaddrs enumeration — Node itself does not guarantee an order.
|
|
430
|
+
* Fresh +1 record; never throws (a getifaddrs failure yields {}). */
|
|
431
|
+
"os.networkInterfaces": { argTypes: [], result: VOID },
|
|
432
|
+
/** `Math.max(...xs)` / `Math.min(...xs)` over one spread number[]
|
|
433
|
+
* (scr_number.c): the JS fold exactly — any NaN element poisons the
|
|
434
|
+
* result, ±0 order by the JS comparison (max prefers +0, min prefers
|
|
435
|
+
* -0), and the empty array yields -Infinity / +Infinity like the
|
|
436
|
+
* zero-argument calls. Borrows the array; never throws. */
|
|
437
|
+
"math.maxArr": { argTypes: [arrayOf(F64)], result: F64 },
|
|
438
|
+
"math.minArr": { argTypes: [arrayOf(F64)], result: F64 },
|
|
439
|
+
"math.hypotArr": { argTypes: [arrayOf(F64)], result: F64 },
|
|
440
|
+
/** `Math.floor(x)` — C floor() IS the JS operation (NaN/±0/±Infinity
|
|
441
|
+
* pass through bit-exactly). Never throws. */
|
|
442
|
+
"math.floor": { argTypes: [F64], result: F64 },
|
|
443
|
+
/** Math.abs (C fabs — IS the JS operation) and Math.round (scr_lib.c:
|
|
444
|
+
* ECMA half-toward-+Infinity with the exact-fraction comparison — C
|
|
445
|
+
* round() is half-away-from-zero and floor(x+0.5) drifts at the
|
|
446
|
+
* epsilon boundary). Borrow nothing; never throw. */
|
|
447
|
+
"math.abs": { argTypes: [F64], result: F64 },
|
|
448
|
+
"math.round": { argTypes: [F64], result: F64 },
|
|
449
|
+
/** Math.trunc / Math.ceil — C trunc()/ceil() ARE the JS operations
|
|
450
|
+
* (NaN/±0/±Infinity pass through bit-exactly; ceil(-0.5) is -0 in IEEE
|
|
451
|
+
* round-toward-+Infinity exactly as ECMA says). Static like floor —
|
|
452
|
+
* they are ask-4's wholeness-discharge operators, so the library
|
|
453
|
+
* inference needs them compiled, not island-served. Never throw. */
|
|
454
|
+
"math.trunc": { argTypes: [F64], result: F64 },
|
|
455
|
+
"math.ceil": { argTypes: [F64], result: F64 },
|
|
456
|
+
"math.sin": { argTypes: [F64], result: F64 },
|
|
457
|
+
"math.sinh": { argTypes: [F64], result: F64 },
|
|
458
|
+
"math.cos": { argTypes: [F64], result: F64 },
|
|
459
|
+
"math.cosh": { argTypes: [F64], result: F64 },
|
|
460
|
+
"math.tan": { argTypes: [F64], result: F64 },
|
|
461
|
+
"math.tanh": { argTypes: [F64], result: F64 },
|
|
462
|
+
"math.asin": { argTypes: [F64], result: F64 },
|
|
463
|
+
"math.asinh": { argTypes: [F64], result: F64 },
|
|
464
|
+
"math.acos": { argTypes: [F64], result: F64 },
|
|
465
|
+
"math.acosh": { argTypes: [F64], result: F64 },
|
|
466
|
+
"math.atan": { argTypes: [F64], result: F64 },
|
|
467
|
+
"math.atanh": { argTypes: [F64], result: F64 },
|
|
468
|
+
"math.cbrt": { argTypes: [F64], result: F64 },
|
|
469
|
+
"math.clz32": { argTypes: [F64], result: F64 },
|
|
470
|
+
/** Return -1, +1, or the original NaN/zero. In particular, -0 remains -0. */
|
|
471
|
+
"math.sign": { argTypes: [F64], result: F64 },
|
|
472
|
+
"math.exp": { argTypes: [F64], result: F64 },
|
|
473
|
+
"math.expm1": { argTypes: [F64], result: F64 },
|
|
474
|
+
"math.fround": { argTypes: [F64], result: F64 },
|
|
475
|
+
"math.sqrt": { argTypes: [F64], result: F64 },
|
|
476
|
+
"math.log": { argTypes: [F64], result: F64 },
|
|
477
|
+
"math.log1p": { argTypes: [F64], result: F64 },
|
|
478
|
+
"math.log2": { argTypes: [F64], result: F64 },
|
|
479
|
+
"math.log10": { argTypes: [F64], result: F64 },
|
|
480
|
+
"math.atan2": { argTypes: [F64, F64], result: F64 },
|
|
481
|
+
"math.pow": { argTypes: [F64, F64], result: F64 },
|
|
482
|
+
"math.imul": { argTypes: [F64, F64], result: F64 },
|
|
483
|
+
/** `Math.min(a, b)` / `Math.max(a, b)` — the two-argument scalar forms
|
|
484
|
+
* (scr_lib.c), JS-exact like the Arr folds: NaN poisons, max prefers +0
|
|
485
|
+
* over -0 (min the reverse). C fmin/fmax are NOT these (they drop NaN).
|
|
486
|
+
* Never throw. */
|
|
487
|
+
"math.min": { argTypes: [F64, F64], result: F64 },
|
|
488
|
+
"math.max": { argTypes: [F64, F64], result: F64 },
|
|
489
|
+
/** `Math.random()` — a uniform double in [0,1) with the spec's 53-bit
|
|
490
|
+
* granularity, drawn from arc4random_buf (the CSPRNG behind the crypto
|
|
491
|
+
* lowerings). Same distribution as Node, NECESSARILY different sequence
|
|
492
|
+
* (SEMANTICS.md 62 — no seeded sequence exists to match). Never throws. */
|
|
493
|
+
"math.random": { argTypes: [], result: F64 },
|
|
494
|
+
/** The static global parsers/tests (scr_string.c). num.parseInt is
|
|
495
|
+
* ECMA-262 19.2.5 exactly — JS whitespace, sign, ToInt32 radix (the
|
|
496
|
+
* frontend completes an omitted radix to 0 = the spec's "undefined":
|
|
497
|
+
* base 10 with the 0x hex escape), longest digit prefix, and the exact
|
|
498
|
+
* mathematical value correctly rounded (u64 fast path, bignum beyond —
|
|
499
|
+
* overflow is ±Infinity). num.isNaN is the NaN self-test on an
|
|
500
|
+
* already-number argument (tsc pins the argument to number, so no
|
|
501
|
+
* ToNumber coercion exists to model). Borrow; never throw. */
|
|
502
|
+
"num.parseInt": { argTypes: [STRING, F64], result: F64 },
|
|
503
|
+
/** ES parseFloat (scr_string.c): the longest StrDecimalLiteral prefix
|
|
504
|
+
* of the trimmed input (no hex, "Infinity" exact-case), NaN when none —
|
|
505
|
+
* ECMA-262 19.2.4 over a string argument (non-string arguments keep the
|
|
506
|
+
* fence: Node would ToNumber-coerce). Borrows; never throws. */
|
|
507
|
+
"num.parseFloat": { argTypes: [STRING], result: F64 },
|
|
508
|
+
/* ToNumber(string) — ECMA-262 7.1.4.1 StringToNumber (scr_string.c):
|
|
509
|
+
* trim the JS StrWhiteSpace set, empty/whitespace-only → +0, then the
|
|
510
|
+
* whole span must be one StrNumericLiteral — signed decimal (Infinity
|
|
511
|
+
* included, strtod-over-validated-span correct rounding) or unsigned
|
|
512
|
+
* 0x/0o/0b (exact value, nearest-even; signed forms are NaN) — with
|
|
513
|
+
* any trailing garbage answering NaN. Number(aString), unary + on
|
|
514
|
+
* strings, and util.format %d over strings lower here. Borrows; never
|
|
515
|
+
* throws. */
|
|
516
|
+
"num.fromString": { argTypes: [STRING], result: F64 },
|
|
517
|
+
"num.isNaN": { argTypes: [F64], result: BOOL },
|
|
518
|
+
/** The static URI component codecs (scr_string.c), ECMA-262 Encode/
|
|
519
|
+
* Decode with the component sets over the runtime's UTF-8 strings.
|
|
520
|
+
* str.encodeUriComponent percent-encodes every byte outside the
|
|
521
|
+
* unreserved component set (ALPHA/DIGIT/- _ . ! ~ * ' ( )) as uppercase
|
|
522
|
+
* %XX — the spec's per-code-point UTF-8 encoding IS a byte scan here —
|
|
523
|
+
* and never throws (the spec's URIError case is an unpaired surrogate,
|
|
524
|
+
* which cannot exist in well-formed UTF-8). str.decodeUriComponent
|
|
525
|
+
* decodes %XX escapes bytewise (raw non-escape bytes copy through) and
|
|
526
|
+
* requires the escaped bytes to form strictly valid UTF-8 (overlong
|
|
527
|
+
* forms, surrogate code points, and >U+10FFFF refused, per UTF8-decode
|
|
528
|
+
* without replacement); bad hex or an invalid sequence THROWS the
|
|
529
|
+
* spec's URIError ("URI malformed"), catchable. Borrow; results +1. */
|
|
530
|
+
"str.encodeUriComponent": { argTypes: [STRING], result: STRING },
|
|
531
|
+
// The base64 globals: the argument is a dyn value (WebIDL ToString
|
|
532
|
+
// runs in the runtime); the zero-argument form always throws.
|
|
533
|
+
/** The WHATWG base64 globals (scr_string.c), Node-global since v16.
|
|
534
|
+
* Arguments are borrowed dyn values — WebIDL ToString runs in the
|
|
535
|
+
* runtime over the dyn kind (String(null) is "null": the html spec's
|
|
536
|
+
* coercion, which Node's atob(null) exercises). str.atob decodes
|
|
537
|
+
* forgiving-base64 (ASCII whitespace stripped, %4==0 strips up to two
|
|
538
|
+
* '=', %4==1 refuses, leftover bits discarded) into the latin1 code
|
|
539
|
+
* points as a string; a malformed input THROWS the catchable
|
|
540
|
+
* DOMException InvalidCharacterError ("The string to be decoded is not
|
|
541
|
+
* correctly encoded."). str.btoa encodes the string's code points as
|
|
542
|
+
* base64; any code point over U+00FF THROWS InvalidCharacterError
|
|
543
|
+
* ("Invalid character"). str.b64Missing is the zero-argument call of
|
|
544
|
+
* either: always throws Node's TypeError [ERR_MISSING_ARGS] "The
|
|
545
|
+
* \"input\" argument must be specified". Results +1. */
|
|
546
|
+
"str.atob": { argTypes: [DYN], result: STRING },
|
|
547
|
+
"str.btoa": { argTypes: [DYN], result: STRING },
|
|
548
|
+
"str.b64Missing": { argTypes: [], result: STRING },
|
|
549
|
+
"str.decodeUriComponent": { argTypes: [STRING], result: STRING },
|
|
550
|
+
"str.decodeUri": { argTypes: [STRING], result: STRING },
|
|
551
|
+
/** encodeURI: the same Encode() keeping the reserved set and '#'
|
|
552
|
+
* unescaped — total like the component encoder. Borrow; result +1. */
|
|
553
|
+
"str.encodeUri": { argTypes: [STRING], result: STRING },
|
|
554
|
+
/** RegExp.escape (ES2025): per-code-point EncodeForRegExpEscape —
|
|
555
|
+
* leading ASCII alphanumeric hex-escapes, syntax characters and '/'
|
|
556
|
+
* take a backslash, other punctuators/whitespace/line terminators
|
|
557
|
+
* hex-escape, the rest passes through. Total; borrows; result +1. */
|
|
558
|
+
"regexp.escape": { argTypes: [STRING], result: STRING },
|
|
559
|
+
/** Number.prototype formatters (scr_lib.c), JS-exact:
|
|
560
|
+
* num.toExponential is toExponential() with the spec's "as many digits
|
|
561
|
+
* as necessary"; num.toFixed0 is the non-throwing omitted-argument
|
|
562
|
+
* toFixed() fast path; num.toFixed implements an explicit fractionDigits
|
|
563
|
+
* with exact binary-value rounding and THROWS RangeError outside 0..100.
|
|
564
|
+
* Successful results +1. */
|
|
565
|
+
"num.toExponential": { argTypes: [F64], result: STRING },
|
|
566
|
+
"num.toFixed0": { argTypes: [F64], result: STRING },
|
|
567
|
+
"num.toFixed": { argTypes: [F64, F64], result: STRING },
|
|
568
|
+
"num.toStringRadix": { argTypes: [F64, DYN], result: STRING },
|
|
569
|
+
/** Object.is over two numbers — the spec's SameValue on doubles: NaN
|
|
570
|
+
* equals NaN, +0 differs from -0, everything else is `===`. Plain bool
|
|
571
|
+
* result; never throws. (Union-armed operands take unionEq's sameValue
|
|
572
|
+
* flag instead — this is the both-f64 fast path.) */
|
|
573
|
+
"num.sameValue": { argTypes: [F64, F64], result: BOOL },
|
|
574
|
+
/** `new Intl.NumberFormat("en-US").format(x)` and
|
|
575
|
+
* `x.toLocaleString("en-US")` with DEFAULT options — the one locale
|
|
576
|
+
* whose data the runtime embeds (Node's default-build locale): decimal
|
|
577
|
+
* notation, 0–3 fraction digits rounded half-up on the SHORTEST
|
|
578
|
+
* round-tripping decimal (ICU's rounding input, probed vs Node —
|
|
579
|
+
* format(1.0005) is "1.001" though toFixed(3) answers "1.000"), ","
|
|
580
|
+
* grouping every three integer digits, "∞"/"NaN" texts, and "-0" for
|
|
581
|
+
* negative inputs rounding to zero. Result +1; never throws. */
|
|
582
|
+
"intl.numFormatEnUs": { argTypes: [F64], result: STRING },
|
|
583
|
+
/** ES Symbol values (scr_symbol.c — link-gated by moduleUsesSymbol).
|
|
584
|
+
* sym.new: `Symbol(desc)` — a fresh runtime-unique identity (+1) whose
|
|
585
|
+
* one arg is the description string (borrowed); sym.newAnon is the
|
|
586
|
+
* description-less `Symbol()` form. sym.for: the Symbol.for global
|
|
587
|
+
* registry — one interned symbol per key (borrowed), +1 on every call.
|
|
588
|
+
* sym.toString: "Symbol(desc)" (+1 string; "Symbol()" when absent).
|
|
589
|
+
* sym.desc / sym.keyFor answer the interned `string | undefined` union
|
|
590
|
+
* (the runtime returns +1-or-NULL; the backend builds the union arms —
|
|
591
|
+
* the child.stdout pattern). None of these throw. */
|
|
592
|
+
"sym.new": { argTypes: [STRING], result: SYMBOL_T },
|
|
593
|
+
"sym.newAnon": { argTypes: [], result: SYMBOL_T },
|
|
594
|
+
"sym.for": { argTypes: [STRING], result: SYMBOL_T },
|
|
595
|
+
"sym.wellKnown": { argTypes: [STRING], result: SYMBOL_T },
|
|
596
|
+
// Result is the interned `string | undefined` union — the libCall case
|
|
597
|
+
// checks the arms (the spawnRes.error pattern).
|
|
598
|
+
"sym.keyFor": { argTypes: [SYMBOL_T], result: VOID },
|
|
599
|
+
"sym.desc": { argTypes: [SYMBOL_T], result: VOID },
|
|
600
|
+
"sym.toString": { argTypes: [SYMBOL_T], result: STRING },
|
|
601
|
+
/** Engine-free arbitrary-precision bigint operations (scr_bigint.c).
|
|
602
|
+
* parse accepts the ECMAScript BigInt string grammar; fromF64 accepts
|
|
603
|
+
* finite integral Numbers. Arithmetic returns fresh immutable values.
|
|
604
|
+
* cmp returns -1/0/1 as f64; toString accepts a numeric radix. */
|
|
605
|
+
"bigint.parse": { argTypes: [STRING], result: BIGINT_T },
|
|
606
|
+
"bigint.fromF64": { argTypes: [F64], result: BIGINT_T },
|
|
607
|
+
"bigint.neg": { argTypes: [BIGINT_T], result: BIGINT_T },
|
|
608
|
+
"bigint.not": { argTypes: [BIGINT_T], result: BIGINT_T },
|
|
609
|
+
"bigint.add": { argTypes: [BIGINT_T, BIGINT_T], result: BIGINT_T },
|
|
610
|
+
"bigint.sub": { argTypes: [BIGINT_T, BIGINT_T], result: BIGINT_T },
|
|
611
|
+
"bigint.mul": { argTypes: [BIGINT_T, BIGINT_T], result: BIGINT_T },
|
|
612
|
+
"bigint.div": { argTypes: [BIGINT_T, BIGINT_T], result: BIGINT_T },
|
|
613
|
+
"bigint.mod": { argTypes: [BIGINT_T, BIGINT_T], result: BIGINT_T },
|
|
614
|
+
"bigint.pow": { argTypes: [BIGINT_T, BIGINT_T], result: BIGINT_T },
|
|
615
|
+
"bigint.and": { argTypes: [BIGINT_T, BIGINT_T], result: BIGINT_T },
|
|
616
|
+
"bigint.or": { argTypes: [BIGINT_T, BIGINT_T], result: BIGINT_T },
|
|
617
|
+
"bigint.xor": { argTypes: [BIGINT_T, BIGINT_T], result: BIGINT_T },
|
|
618
|
+
"bigint.shl": { argTypes: [BIGINT_T, BIGINT_T], result: BIGINT_T },
|
|
619
|
+
"bigint.shr": { argTypes: [BIGINT_T, BIGINT_T], result: BIGINT_T },
|
|
620
|
+
"bigint.eq": { argTypes: [BIGINT_T, BIGINT_T], result: BOOL },
|
|
621
|
+
"bigint.eqString": { argTypes: [BIGINT_T, STRING], result: BOOL },
|
|
622
|
+
"bigint.cmp": { argTypes: [BIGINT_T, BIGINT_T], result: F64 },
|
|
623
|
+
"bigint.cmpNumber": { argTypes: [BIGINT_T, F64], result: F64 },
|
|
624
|
+
"bigint.truthy": { argTypes: [BIGINT_T], result: BOOL },
|
|
625
|
+
"bigint.toString": { argTypes: [BIGINT_T, F64], result: STRING },
|
|
626
|
+
"bigint.inspect": { argTypes: [BIGINT_T], result: STRING },
|
|
627
|
+
"bigint.toF64": { argTypes: [BIGINT_T], result: F64 },
|
|
628
|
+
"bigint.asUintN": { argTypes: [F64, BIGINT_T], result: BIGINT_T },
|
|
629
|
+
"bigint.asIntN": { argTypes: [F64, BIGINT_T], result: BIGINT_T },
|
|
630
|
+
"bigint.bufferRead": { argTypes: [BYTES_U8, F64, BOOL, BOOL], result: BIGINT_T },
|
|
631
|
+
"bigint.bufferWrite": { argTypes: [BYTES_U8, BIGINT_T, F64, BOOL, BOOL], result: F64 },
|
|
632
|
+
"bigint.dataViewGet": { argTypes: [BYTES_U8, F64, BOOL, BOOL], result: BIGINT_T },
|
|
633
|
+
"bigint.dataViewSet": { argTypes: [BYTES_U8, F64, BIGINT_T, BOOL], result: VOID },
|
|
634
|
+
/** node:url + the URL class (scr_url.c). url.new parses one absolute
|
|
635
|
+
* URL string into a mutable URL value (+1) — invalid input THROWS a
|
|
636
|
+
* catchable TypeError ("Invalid URL"), like Node's constructor. The
|
|
637
|
+
* getters (borrowed receiver, +1 string) never throw; url.href doubles
|
|
638
|
+
* as toString(). fileURLToPath has one libFn per receiver form (URL
|
|
639
|
+
* value / string) — both THROW Node's TypeErrors on non-file schemes,
|
|
640
|
+
* encoded slashes, and non-empty hosts. url.pathToFileURL resolves the
|
|
641
|
+
* path (getcwd) and never throws. */
|
|
642
|
+
"url.new": { argTypes: [STRING], result: URL_T },
|
|
643
|
+
"url.newBase": { argTypes: [STRING, STRING], result: URL_T },
|
|
644
|
+
/** Factories consume already-converted input/base strings. canParse
|
|
645
|
+
* answers a boolean; parse returns a checked native URL or null (+1).
|
|
646
|
+
* Parser failures are suppressed; conversion occurs before these calls. */
|
|
647
|
+
"url.canParse": { argTypes: [STRING], result: BOOL },
|
|
648
|
+
"url.canParseBase": { argTypes: [STRING, STRING], result: BOOL },
|
|
649
|
+
"url.parse": { argTypes: [STRING], result: DYN },
|
|
650
|
+
"url.parseBase": { argTypes: [STRING, STRING], result: DYN },
|
|
651
|
+
"url.protocol": { argTypes: [URL_T], result: STRING },
|
|
652
|
+
"url.origin": { argTypes: [URL_T], result: STRING },
|
|
653
|
+
"url.username": { argTypes: [URL_T], result: STRING },
|
|
654
|
+
"url.password": { argTypes: [URL_T], result: STRING },
|
|
655
|
+
"url.host": { argTypes: [URL_T], result: STRING },
|
|
656
|
+
"url.hostname": { argTypes: [URL_T], result: STRING },
|
|
657
|
+
"url.port": { argTypes: [URL_T], result: STRING },
|
|
658
|
+
"url.pathname": { argTypes: [URL_T], result: STRING },
|
|
659
|
+
"url.href": { argTypes: [URL_T], result: STRING },
|
|
660
|
+
/** Selected component writes borrow the receiver and converted string.
|
|
661
|
+
* href replaces its parsed fields while retaining cached params identity. */
|
|
662
|
+
"url.set": { argTypes: [URL_T, STRING, STRING], result: VOID },
|
|
663
|
+
"url.setChecked": { argTypes: [URL_T, STRING, DYN], result: VOID },
|
|
664
|
+
"url.fileURLToPathUrl": { argTypes: [URL_T], result: STRING },
|
|
665
|
+
"url.fileURLToPathChecked": { argTypes: [DYN], result: STRING },
|
|
666
|
+
"url.fileURLToPathOptions": { argTypes: [DYN, DYN], result: STRING },
|
|
667
|
+
"url.fileURLToPathBuffer": { argTypes: [DYN, DYN], result: BYTES_U8 },
|
|
668
|
+
"url.pathToFileURLChecked": { argTypes: [DYN, DYN], result: URL_T },
|
|
669
|
+
"url.fileURLToPathStr": { argTypes: [STRING], result: STRING },
|
|
670
|
+
"url.pathToFileURL": { argTypes: [STRING], result: URL_T },
|
|
671
|
+
/** Explicit path syntax from the options.windows argument, independent
|
|
672
|
+
* of the executable's host platform. Windows UNC input can throw. */
|
|
673
|
+
"url.pathToFileURLPlatform": { argTypes: [STRING, BOOL], result: URL_T },
|
|
674
|
+
/** pathToFileURL under a win32 TARGET: the same scr_url_from_path call
|
|
675
|
+
* (the runtime selects the win32 arm by _WIN32), but a distinct IR name
|
|
676
|
+
* because that arm THROWS for malformed UNC inputs — may-throw seeds on
|
|
677
|
+
* it while posix pathToFileURL emission stays byte-identical. */
|
|
678
|
+
"url.pathToFileURLWin32": { argTypes: [STRING], result: URL_T },
|
|
679
|
+
/** URLSearchParams (scr_url.c — always linked with the url unit).
|
|
680
|
+
* Construction: sp.new (empty), sp.parse (one borrowed init string —
|
|
681
|
+
* a single leading '?' strips, Node's constructor), sp.copy (snapshot
|
|
682
|
+
* of another list), sp.fromPairs (a string[][] value — THROWS Node's
|
|
683
|
+
* ERR_INVALID_TUPLE TypeError on a non-[name, value] row; the one
|
|
684
|
+
* throwing entry in the family), sp.with (the record-literal init
|
|
685
|
+
* desugar: append one pair, answer the same list +1 — chains fold
|
|
686
|
+
* `new URLSearchParams({...})` into nested calls). url.searchParams
|
|
687
|
+
* answers the URL's LIVE cached view (+1, one identity per URL);
|
|
688
|
+
* url.search is the WHATWG search getter ("" for no/empty query).
|
|
689
|
+
* Methods mirror the WHATWG surface: sp.get answers +1-or-NULL (the
|
|
690
|
+
* sym.desc union pattern, null arm), sp.getAll a fresh string[];
|
|
691
|
+
* sp.append/sp.set/sp.delete/sp.deleteValue/sp.sort mutate and
|
|
692
|
+
* re-serialize a live view's URL query; sp.has/sp.hasValue answer
|
|
693
|
+
* bools; sp.size/sp.toString are pure reads. sp.keyAt/sp.valAt are
|
|
694
|
+
* the for-of/forEach desugar's index reads (live — the loop re-reads
|
|
695
|
+
* sp.size each pass). */
|
|
696
|
+
"sp.new": { argTypes: [], result: SEARCH_PARAMS_T },
|
|
697
|
+
"sp.newChecked": { argTypes: [DYN], result: SEARCH_PARAMS_T },
|
|
698
|
+
"sp.parse": { argTypes: [STRING], result: SEARCH_PARAMS_T },
|
|
699
|
+
"sp.copy": { argTypes: [SEARCH_PARAMS_T], result: SEARCH_PARAMS_T },
|
|
700
|
+
// The pairs argument is string[][] — checked structurally in validate.ts (the
|
|
701
|
+
// generic array-of slot has no named constant here).
|
|
702
|
+
"sp.fromPairs": { argTypes: [null], result: SEARCH_PARAMS_T },
|
|
703
|
+
"sp.with": { argTypes: [SEARCH_PARAMS_T, STRING, STRING], result: SEARCH_PARAMS_T },
|
|
704
|
+
"url.searchParams": { argTypes: [URL_T], result: SEARCH_PARAMS_T },
|
|
705
|
+
"url.search": { argTypes: [URL_T], result: STRING },
|
|
706
|
+
"url.hash": { argTypes: [URL_T], result: STRING },
|
|
707
|
+
// Result is the interned `string | null` union — the libCall case
|
|
708
|
+
// checks the arms (the spawnRes.signal pattern).
|
|
709
|
+
"sp.get": { argTypes: [SEARCH_PARAMS_T, STRING], result: VOID },
|
|
710
|
+
"sp.getAll": { argTypes: [SEARCH_PARAMS_T, STRING], result: arrayOf(STRING) },
|
|
711
|
+
"sp.append": { argTypes: [SEARCH_PARAMS_T, STRING, STRING], result: VOID },
|
|
712
|
+
"sp.set": { argTypes: [SEARCH_PARAMS_T, STRING, STRING], result: VOID },
|
|
713
|
+
"sp.delete": { argTypes: [SEARCH_PARAMS_T, STRING], result: VOID },
|
|
714
|
+
"sp.deleteValue": { argTypes: [SEARCH_PARAMS_T, STRING, STRING], result: VOID },
|
|
715
|
+
"sp.has": { argTypes: [SEARCH_PARAMS_T, STRING], result: BOOL },
|
|
716
|
+
"sp.hasValue": { argTypes: [SEARCH_PARAMS_T, STRING, STRING], result: BOOL },
|
|
717
|
+
"sp.sort": { argTypes: [SEARCH_PARAMS_T], result: VOID },
|
|
718
|
+
"sp.size": { argTypes: [SEARCH_PARAMS_T], result: F64 },
|
|
719
|
+
"sp.toString": { argTypes: [SEARCH_PARAMS_T], result: STRING },
|
|
720
|
+
"sp.keyAt": { argTypes: [SEARCH_PARAMS_T, F64], result: STRING },
|
|
721
|
+
"sp.valAt": { argTypes: [SEARCH_PARAMS_T, F64], result: STRING },
|
|
722
|
+
// node:querystring. qs.parse's result is the call site's ParsedUrlQuery
|
|
723
|
+
// dictionary record (VOID is the networkInterfaces sentinel — the
|
|
724
|
+
// libCall case checks the structure); qs.stringify's object argument
|
|
725
|
+
// is a dyn value (the frontend dynFroms typed records).
|
|
726
|
+
/** node:querystring (scr_qs.c — link-gated by moduleUsesQs; NOT
|
|
727
|
+
* URLSearchParams: the legacy codec's escaping and '+' rules differ).
|
|
728
|
+
* qs.escape is Node's qsEscape, which encodes exactly the component
|
|
729
|
+
* unreserved set — it emits the always-linked
|
|
730
|
+
* scr_str_encode_uri_component, so escape-only programs never pull the
|
|
731
|
+
* unit. qs.unescape is Node's qsUnescape: strict decodeURIComponent
|
|
732
|
+
* first, the lenient legacy unescapeBuffer fallback on failure (never
|
|
733
|
+
* throws). qs.parse takes (str, sep, eq, maxKeys) — the frontend
|
|
734
|
+
* completes omitted/null sep/eq to "&"/"=" and the omitted maxKeys
|
|
735
|
+
* option to Node's 1000 (0 and negatives mean unlimited, Node's rule) —
|
|
736
|
+
* and its result type is the CALL SITE's mapped ParsedUrlQuery shape (a
|
|
737
|
+
* pure index-signature record over `string | string[]`, an undefined
|
|
738
|
+
* arm tolerated — @types/node's Dict), verified structurally by the
|
|
739
|
+
* frontend (lowerQuerystringParseCall); the emitters construct the
|
|
740
|
+
* record and hand its overflow map to scr_qs_parse_into with the two
|
|
741
|
+
* union tags. qs.stringify takes (obj, sep, eq) with obj a dyn value
|
|
742
|
+
* (the frontend dynFroms the typed record; JS-world dyn values pass
|
|
743
|
+
* through) — Node's encodeStringified rules run in the runtime, so
|
|
744
|
+
* arrays expand to repeated keys and null/undefined/nested objects are
|
|
745
|
+
* empty values. Custom encoder/decoder options fence at compile time.
|
|
746
|
+
* All borrow; string results +1; none throw. */
|
|
747
|
+
"qs.parse": { argTypes: [STRING, STRING, STRING, F64], result: VOID },
|
|
748
|
+
"qs.stringify": { argTypes: [DYN, STRING, STRING], result: STRING },
|
|
749
|
+
"qs.escape": { argTypes: [STRING], result: STRING },
|
|
750
|
+
"qs.unescape": { argTypes: [STRING], result: STRING },
|
|
751
|
+
/** node:util.parseArgs: one checked-dynamic config object in, one
|
|
752
|
+
* checked-dynamic ParsedResults tree out. Statically typed member reads
|
|
753
|
+
* validate their values when leaving that tree. The native parser may
|
|
754
|
+
* throw Node's coded validation/grammar TypeErrors. */
|
|
755
|
+
"util.parseArgs": { argTypes: [DYN], result: DYN },
|
|
756
|
+
"util.parseEnv": { argTypes: [DYN], result: DYN },
|
|
757
|
+
"util.getSystemErrorName": { argTypes: [DYN], result: STRING },
|
|
758
|
+
"util.getSystemErrorMessage": { argTypes: [DYN], result: STRING },
|
|
759
|
+
"util.systemErrorEntries": { argTypes: [], result: DYN },
|
|
760
|
+
"util.stripVTControlCharacters": { argTypes: [DYN], result: STRING },
|
|
761
|
+
"util.toUSVString": { argTypes: [DYN], result: STRING },
|
|
762
|
+
"util.isDeepStrictEqual": { argTypes: [DYN, DYN, DYN], result: BOOL },
|
|
763
|
+
"util.styleText": { argTypes: [DYN, DYN, DYN], result: STRING },
|
|
764
|
+
"util.typeIs": { argTypes: [DYN, STRING], result: BOOL },
|
|
765
|
+
"util.typeValue": { argTypes: [DYN, STRING], result: DYN },
|
|
766
|
+
/** fs.statSync → a Stats value (may throw, like the other sync fs
|
|
767
|
+
* calls); the stats.* getters are pure reads on it. */
|
|
768
|
+
"fs.statSync": { argTypes: [STRING], result: STATS_T },
|
|
769
|
+
"fs.lstatSync": { argTypes: [STRING], result: STATS_T },
|
|
770
|
+
"fs.fstatSync": { argTypes: [F64], result: STATS_T },
|
|
771
|
+
"fs.fchmodSync": { argTypes: [F64, F64], result: VOID },
|
|
772
|
+
"fs.fsyncSync": { argTypes: [F64], result: VOID },
|
|
773
|
+
"fs.fdatasyncSync": { argTypes: [F64], result: VOID },
|
|
774
|
+
"fs.ftruncateSync": { argTypes: [F64, F64], result: VOID },
|
|
775
|
+
"fs.utimesSync": { argTypes: [DYN, DYN, DYN], result: VOID },
|
|
776
|
+
"fs.futimesSync": { argTypes: [DYN, DYN, DYN], result: VOID },
|
|
777
|
+
"fs.lutimesSync": { argTypes: [DYN, DYN, DYN], result: VOID },
|
|
778
|
+
"fs.readvSync": { argTypes: [F64, arrayOf(BYTES_U8), F64], result: F64 },
|
|
779
|
+
"fs.writevSync": { argTypes: [F64, arrayOf(BYTES_U8), F64], result: F64 },
|
|
780
|
+
"fs.linkSync": { argTypes: [DYN, DYN], result: VOID },
|
|
781
|
+
"fs.symlinkSync": { argTypes: [DYN, DYN, DYN], result: VOID },
|
|
782
|
+
"fs.readlinkSync": { argTypes: [DYN, DYN], result: DYN },
|
|
783
|
+
"fs.statfsSync": { argTypes: [DYN, DYN], result: DYN },
|
|
784
|
+
"fs.readlinkSyncStr": { argTypes: [DYN, DYN], result: STRING },
|
|
785
|
+
"fs.readlinkSyncBuffer": { argTypes: [DYN, DYN], result: BYTES_U8 },
|
|
786
|
+
/** fs.openSync(path, flags) → the raw fd as f64; fs.readSync/fs.writeSync
|
|
787
|
+
* over Buffer windows perform sequential I/O when position is -1 and
|
|
788
|
+
* offset-preserving positioned I/O otherwise; fs.writeStrSync is the
|
|
789
|
+
* utf8 string twin; and fs.closeSync(fd) closes the descriptor. This is
|
|
790
|
+
* the fd slice behind spawn/log-processing forms.
|
|
791
|
+
* flags is Node's string
|
|
792
|
+
* grammar ("r", "w", "a" and the +/x variants; unknown flags throw
|
|
793
|
+
* Node's ERR_INVALID_ARG_VALUE TypeError text). All throw Node-shaped
|
|
794
|
+
* fs errors (openSync ENOENT/EACCES..., readSync EBADF/range errors,
|
|
795
|
+
* closeSync EBADF). */
|
|
796
|
+
"fs.openSync": { argTypes: [STRING, STRING], result: F64 },
|
|
797
|
+
"fs.openNumericSync": { argTypes: [STRING, F64, F64], result: F64 },
|
|
798
|
+
"fs.readSync": { argTypes: [F64, BYTES_U8, F64, F64, F64], result: F64 },
|
|
799
|
+
"fs.writeSync": { argTypes: [F64, BYTES_U8, F64, F64, F64], result: F64 },
|
|
800
|
+
"fs.writeStrSync": { argTypes: [F64, STRING, F64, STRING], result: F64 },
|
|
801
|
+
// fs.watch's callback func type is program-dependent (zero params, or
|
|
802
|
+
// the eventType string) — the slot pins arity and the path/receiver.
|
|
803
|
+
/** fs.watch(path, listener?) → an FSWatcher handle (scr_watch.c —
|
|
804
|
+
* linked, and scr_watch_install() emitted, only when these appear on
|
|
805
|
+
* the IR; moduleUsesFsWatch is the switch). The path opens NOW —
|
|
806
|
+
* failure throws Node's fs error synchronously ("ENOENT: ..., watch
|
|
807
|
+
* 'x'", the polling-fallback catch shape) — and the unit's kqueue
|
|
808
|
+
* (EVFILT_VNODE) delivers "rename"/"change" through the loop's watch
|
|
809
|
+
* hook. The callback (nullable) MOVES in with an adapter per listener
|
|
810
|
+
* shape (zero-param, or the (eventType: string) form — runtime-
|
|
811
|
+
* provided); an open watcher keeps the loop alive until watcher.close()
|
|
812
|
+
* (idempotent, receiver borrowed, statement position only). */
|
|
813
|
+
"fs.watch": { argTypes: [STRING], result: FSWATCHER_T },
|
|
814
|
+
"fs.watchCb": { argTypes: [STRING, null], result: FSWATCHER_T },
|
|
815
|
+
"watcher.close": { argTypes: [FSWATCHER_T], result: VOID },
|
|
816
|
+
/** The composed `new crypto.X509Certificate(data).fingerprint` read
|
|
817
|
+
* (scr_lib.c — no certificate handle exists): the SHA-1 of the DER,
|
|
818
|
+
* uppercase colon-separated, over PEM or raw-DER Buffer input; other
|
|
819
|
+
* inputs throw Node's ERR_OSSL_PEM_NO_START_LINE Error (may-throw). */
|
|
820
|
+
"crypto.x509Fingerprint": { argTypes: [BYTES_U8], result: STRING },
|
|
821
|
+
"crypto.x509FingerprintStr": { argTypes: [STRING], result: STRING },
|
|
822
|
+
/** The certificate's Validity window (validFrom / validTo reads —
|
|
823
|
+
* scr_lib.c's minimal ASN.1 walk to the TBSCertificate validity
|
|
824
|
+
* SEQUENCE): UTCTime and GeneralizedTime render in Node's exact
|
|
825
|
+
* ASN1_TIME_print shape ("Jul 1 00:00:00 2026 GMT" — %2d space-padded
|
|
826
|
+
* day). Same input contract and PEM error as the fingerprint pair
|
|
827
|
+
* (may-throw). */
|
|
828
|
+
"crypto.x509ValidFrom": { argTypes: [BYTES_U8], result: STRING },
|
|
829
|
+
"crypto.x509ValidFromStr": { argTypes: [STRING], result: STRING },
|
|
830
|
+
"crypto.x509ValidTo": { argTypes: [BYTES_U8], result: STRING },
|
|
831
|
+
"crypto.x509ValidToStr": { argTypes: [STRING], result: STRING },
|
|
832
|
+
"fs.closeSync": { argTypes: [F64], result: VOID },
|
|
833
|
+
"stats.isFile": { argTypes: [STATS_T], result: BOOL },
|
|
834
|
+
"stats.isDirectory": { argTypes: [STATS_T], result: BOOL },
|
|
835
|
+
"stats.isSymbolicLink": { argTypes: [STATS_T], result: BOOL },
|
|
836
|
+
"stats.size": { argTypes: [STATS_T], result: F64 },
|
|
837
|
+
"stats.dev": { argTypes: [STATS_T], result: F64 },
|
|
838
|
+
"stats.ino": { argTypes: [STATS_T], result: F64 },
|
|
839
|
+
"stats.blocks": { argTypes: [STATS_T], result: F64 },
|
|
840
|
+
"stats.nlink": { argTypes: [STATS_T], result: F64 },
|
|
841
|
+
"stats.atimeMs": { argTypes: [STATS_T], result: F64 },
|
|
842
|
+
"stats.mtimeMs": { argTypes: [STATS_T], result: F64 },
|
|
843
|
+
"stats.ctimeMs": { argTypes: [STATS_T], result: F64 },
|
|
844
|
+
// The wider sync fs slice (unlink/chmod/chown/copyfile and the
|
|
845
|
+
// mode-carrying write/mkdir forms).
|
|
846
|
+
/** The wider sync fs slice (scr_lib.c), all throwing catchably with
|
|
847
|
+
* Node's errno message shapes and `.code` stamped like the rest of
|
|
848
|
+
* sync fs. unlink/chmod/chown wrap the syscalls 1:1 (Node reports the
|
|
849
|
+
* syscall's own name). copyFileSync copies contents into a fresh (or
|
|
850
|
+
* truncated) destination carrying the SOURCE's mode (libuv's
|
|
851
|
+
* uv_fs_copyfile behavior); its errors carry BOTH paths — Node's
|
|
852
|
+
* "copyfile 'src' -> 'dest'". lstatSync is statSync without following
|
|
853
|
+
* a trailing symlink (Node reports lstat); stats.isSymbolicLink /
|
|
854
|
+
* stats.dev / ino / blocks / nlink / atimeMs / mtimeMs / ctimeMs are pure reads on the widened
|
|
855
|
+
* snapshot (blocks is allocated 512-byte units; the times are milliseconds
|
|
856
|
+
* with their sub-second fractions, Node's arithmetic).
|
|
857
|
+
* writeFileModeSync is writeFileSync(path, data, { mode }): the mode
|
|
858
|
+
* applies at CREATION only (open(2) with O_CREAT, umask applying),
|
|
859
|
+
* exactly Node — an existing file keeps its permissions. mkdirModeSync
|
|
860
|
+
* / mkdirRecursiveModeSync are the mkdirSync option forms with an
|
|
861
|
+
* explicit mode (the recursive walk passes it to every directory it
|
|
862
|
+
* creates, like Node's). */
|
|
863
|
+
"fs.unlinkSync": { argTypes: [STRING], result: VOID },
|
|
864
|
+
"fs.chmodSync": { argTypes: [STRING, F64], result: VOID },
|
|
865
|
+
"fs.chownSync": { argTypes: [STRING, F64, F64], result: VOID },
|
|
866
|
+
"fs.copyFileSync": { argTypes: [STRING, STRING], result: VOID },
|
|
867
|
+
/** renameSync is the direct two-path syscall wrapper. renameCb defers
|
|
868
|
+
* the operation to the loop and fires a program-shaped Error | null
|
|
869
|
+
* callback through a backend-emitted adapter. */
|
|
870
|
+
"fs.renameSync": { argTypes: [STRING, STRING], result: VOID },
|
|
871
|
+
// Callback type is program-dependent (zero params or Error | null).
|
|
872
|
+
"fs.renameCb": { argTypes: [STRING, STRING, null], result: VOID },
|
|
873
|
+
"fs.writeFileModeSync": { argTypes: [STRING, STRING, F64], result: VOID },
|
|
874
|
+
"fs.mkdirModeSync": { argTypes: [STRING, F64], result: VOID },
|
|
875
|
+
"fs.mkdirRecursiveModeSync": { argTypes: [STRING, F64], result: VOID },
|
|
876
|
+
// Atomics.wait over an Int32Array — the synchronous-sleep idiom.
|
|
877
|
+
/** Atomics.wait(int32Array, idx, expected, timeoutMs) → "not-equal"
|
|
878
|
+
* when the element differs from `expected`, else a real nanosleep for
|
|
879
|
+
* the timeout and "timed-out" (scr_lib.c). scriptc has no threads —
|
|
880
|
+
* no other agent can ever notify, so for every compilable program this
|
|
881
|
+
* IS the spec's behavior, and "ok" is unreachable; the frontend
|
|
882
|
+
* REQUIRES the timeout argument (an infinite wait here is a certain
|
|
883
|
+
* deadlock, fenced). The SharedArrayBuffer the lib types demand exists
|
|
884
|
+
* only syntactically (new Int32Array(new SharedArrayBuffer(n)) lowers
|
|
885
|
+
* to a plain i32 typed array — sharing is unobservable without
|
|
886
|
+
* threads; SEMANTICS.md documents the stance). Never throws; +1 string
|
|
887
|
+
* result. */
|
|
888
|
+
"atomics.wait": { argTypes: [bytesOf("i32"), F64, F64, F64], result: STRING },
|
|
889
|
+
/** child_process.spawnSync (scr_child.c): posix_spawn + waitpid + piped
|
|
890
|
+
* utf8 capture — cmd borrowed, args one borrowed string[] (the frontend
|
|
891
|
+
* completes an omitted list to an empty literal), result an owned (+1)
|
|
892
|
+
* spawnRes. NEVER throws: spawn failure (nonexistent binary, EACCES) is
|
|
893
|
+
* data, like Node's error property — status null and empty outputs
|
|
894
|
+
* (SEMANTICS.md documents the divergence from Node's null stdout).
|
|
895
|
+
* The getters are pure reads: status is the interned `number | null`
|
|
896
|
+
* union (null = spawn failure or signal death, type-directed
|
|
897
|
+
* construction in the backend like process.envGet); stdout/stderr are
|
|
898
|
+
* +1 strings. */
|
|
899
|
+
"cp.spawnSync": { argTypes: [STRING, arrayOf(STRING)], result: SPAWNRES_T },
|
|
900
|
+
// spawnSync's options form: timeout, killSignal name ("" = SIGTERM),
|
|
901
|
+
// and the three stdio modes.
|
|
902
|
+
/** spawnSync with options (scr_child.c): the cp.spawnSync core plus the
|
|
903
|
+
* option slice portless-class CLIs pass — timeout (killSignal fires at
|
|
904
|
+
* the deadline and the result carries error: ETIMEDOUT + the signal,
|
|
905
|
+
* Node's shape), killSignal (a signal NAME; "" = the SIGTERM default),
|
|
906
|
+
* and per-fd stdio modes (in: 0 /dev/null, 1 ignore, 2 inherit; out/
|
|
907
|
+
* err: 0 capture, 1 ignore → "", 2 inherit → ""). NEVER throws — spawn
|
|
908
|
+
* failure and timeout are data on the result, like Node's error
|
|
909
|
+
* property. spawnRes.signal is the result's termination signal as the
|
|
910
|
+
* call site's `Signals | null` union (null = exited normally or spawn
|
|
911
|
+
* failure), constructed type-directedly like spawnRes.status. */
|
|
912
|
+
"cp.spawnSyncOpts": {
|
|
913
|
+
argTypes: [STRING, arrayOf(STRING), F64, STRING, F64, F64, F64],
|
|
914
|
+
result: SPAWNRES_T,
|
|
915
|
+
},
|
|
916
|
+
/** cp.spawnSyncOpts with the stdio carried as a RUNTIME string —
|
|
917
|
+
* "pipe" | "ignore" | "inherit", proven by the call site's TYPE (the
|
|
918
|
+
* defaultRunner idiom `stdio: options?.stdio ?? "pipe"`); the runtime
|
|
919
|
+
* maps the value to the three modes. Args (cmd, argv, timeout,
|
|
920
|
+
* killSignal, stdio). Never throws, like the other spawnSync forms. */
|
|
921
|
+
"cp.spawnSyncStdioStr": {
|
|
922
|
+
argTypes: [STRING, arrayOf(STRING), F64, STRING, STRING],
|
|
923
|
+
result: SPAWNRES_T,
|
|
924
|
+
},
|
|
925
|
+
// node:net (scr_net.c). Listener slots are program-dependent closures —
|
|
926
|
+
// null slots, checked in the libCall case (the child.onExit precedent);
|
|
927
|
+
// the zero-param callbacks pin the exact func type here. The trailing
|
|
928
|
+
// BOOL on registrations is the once flag.
|
|
929
|
+
/** node:net (scr_net.c — linked, and scr_net_install() emitted, only
|
|
930
|
+
* when one of these appears on the IR; moduleUsesNet is the switch).
|
|
931
|
+
* Receivers are borrowed; CALLBACKS MOVE into the handle's listener
|
|
932
|
+
* registry and are released at settlement (the child.onExit story).
|
|
933
|
+
* All listener registrations carry a trailing BOOL once-flag (`on` vs
|
|
934
|
+
* `once`) and are void — chaining is fenced. None of these throw:
|
|
935
|
+
* listen/connect failures are the async 'error' event, like Node.
|
|
936
|
+
*
|
|
937
|
+
* net.createServer's optional connection handler and the
|
|
938
|
+
* serverOnConnection listeners take the runtime-provided adapters
|
|
939
|
+
* (zero-param, or the one-param socket shape); sockOnData's adapters
|
|
940
|
+
* are the stdin pair's shapes (zero-param / bytes chunk); the error
|
|
941
|
+
* events reuse the child %Error adapters. net.listen/net.listenCb bind
|
|
942
|
+
* NOW and defer 'listening' to the next loop turn (Node's next-tick
|
|
943
|
+
* emit); net.serverPort is the composed `server.address().port` read.
|
|
944
|
+
* net.connect's host argument is a string ("localhost" pins to
|
|
945
|
+
* 127.0.0.1 — SEMANTICS.md); the connect callback is once('connect'). */
|
|
946
|
+
"net.createServer": { argTypes: [], result: NETSERVER_T },
|
|
947
|
+
"net.createServerCb": { argTypes: [null], result: NETSERVER_T },
|
|
948
|
+
"net.listen": { argTypes: [NETSERVER_T, F64], result: VOID },
|
|
949
|
+
"net.listenCb": {
|
|
950
|
+
argTypes: [NETSERVER_T, F64, { kind: "func", params: [], ret: VOID }],
|
|
951
|
+
result: VOID,
|
|
952
|
+
},
|
|
953
|
+
/** listen({ port, host, ipv6Only }[, cb]) — the explicit-interface bind
|
|
954
|
+
* (portless's listenOnProxyInterface): args [server, port, host,
|
|
955
|
+
* ipv6Only]. host is an IP literal string ("" = the host-less
|
|
956
|
+
* dual-stack any default); ipv6Only sets IPV6_V6ONLY before the bind.
|
|
957
|
+
* These are the old-shaped calls, retained for omitted reusePort so
|
|
958
|
+
* serialized IR remains compatible. Failures are the async 'error',
|
|
959
|
+
* message in Node's listen shape with the requested host. Never throws. */
|
|
960
|
+
"net.listenOpts": { argTypes: [NETSERVER_T, F64, STRING, BOOL], result: VOID },
|
|
961
|
+
// The callback slot is a zero-param void closure OR its
|
|
962
|
+
// `(() => void) | undefined` optional-binding union (checked specially).
|
|
963
|
+
"net.listenOptsCb": { argTypes: [NETSERVER_T, F64, STRING, BOOL, null], result: VOID },
|
|
964
|
+
/** Additive ABI for listen({ ..., reusePort }) — args
|
|
965
|
+
* [server, port, host, ipv6Only, reusePort], with the callback following
|
|
966
|
+
* those values in the callback form. The final BOOL is the requested
|
|
967
|
+
* kernel connection-distribution option; old spellings remain
|
|
968
|
+
* four/five-argument calls so serialized IR stays compatible. */
|
|
969
|
+
"net.listenOptsReusePort": { argTypes: [NETSERVER_T, F64, STRING, BOOL, BOOL], result: VOID },
|
|
970
|
+
// The callback is a zero-param void closure OR its optional-binding union;
|
|
971
|
+
// the callback follows the reusePort BOOL in this additive ABI.
|
|
972
|
+
"net.listenOptsReusePortCb": {
|
|
973
|
+
argTypes: [NETSERVER_T, F64, STRING, BOOL, BOOL, null],
|
|
974
|
+
result: VOID,
|
|
975
|
+
},
|
|
976
|
+
"net.serverPort": { argTypes: [NETSERVER_T], result: F64 },
|
|
977
|
+
"net.serverListening": { argTypes: [NETSERVER_T], result: BOOL },
|
|
978
|
+
// net.serverAddress's record result is shape-checked in the libCall case
|
|
979
|
+
// (the dgram.address sentinel pattern).
|
|
980
|
+
/** server.address() as the full AddressInfo record (the dgram.address
|
|
981
|
+
* materialization pattern: the emitter builds the record from the three
|
|
982
|
+
* runtime reads; the frontend pinned the shape). Never throws — before
|
|
983
|
+
* listen it answers the any-form defaults with port 0 where Node
|
|
984
|
+
* answers null (the serverPort stance). */
|
|
985
|
+
"net.serverAddress": { argTypes: [NETSERVER_T], result: VOID },
|
|
986
|
+
"net.serverClose": { argTypes: [NETSERVER_T], result: VOID },
|
|
987
|
+
"net.serverCloseCb": {
|
|
988
|
+
argTypes: [NETSERVER_T, { kind: "func", params: [], ret: VOID }],
|
|
989
|
+
result: VOID,
|
|
990
|
+
},
|
|
991
|
+
"net.serverOnError": { argTypes: [NETSERVER_T, null, BOOL], result: VOID },
|
|
992
|
+
"net.serverOnClose": {
|
|
993
|
+
argTypes: [NETSERVER_T, { kind: "func", params: [], ret: VOID }, BOOL],
|
|
994
|
+
result: VOID,
|
|
995
|
+
},
|
|
996
|
+
"net.serverOnConnection": { argTypes: [NETSERVER_T, null, BOOL], result: VOID },
|
|
997
|
+
/** 'secureConnection' — the TLS server's deferred 'connection' list
|
|
998
|
+
* (handshake-completion timing); on a server without deferred
|
|
999
|
+
* connections (a plain net server) the registration never fires,
|
|
1000
|
+
* exactly Node's split. */
|
|
1001
|
+
"net.serverOnSecureConnection": { argTypes: [NETSERVER_T, null, BOOL], result: VOID },
|
|
1002
|
+
"net.connect": { argTypes: [F64, STRING], result: NETSOCKET_T },
|
|
1003
|
+
/** connect with a validated autoSelectFamilyAttemptTimeout option (the
|
|
1004
|
+
* budget runs Node's validateInt32-from-1 ladder and is then inert —
|
|
1005
|
+
* the single dial has nothing to time). May-throw. */
|
|
1006
|
+
"net.connectAttempt": { argTypes: [F64, STRING, DYN], result: NETSOCKET_T },
|
|
1007
|
+
/** net.connect/createConnection over a RUNTIME option bag (computed
|
|
1008
|
+
* keys — the invalid-input probes): Node-order validation (the
|
|
1009
|
+
* objectMode trio's ERR_INVALID_ARG_VALUE, validatePort, host string,
|
|
1010
|
+
* autoSelectFamily boolean, the attempt budget), then the trailing
|
|
1011
|
+
* compiler-rendered fence — ALWAYS THROWS (the error.nodeThrow
|
|
1012
|
+
* polymorphic-result carve-out). May-throw seed. */
|
|
1013
|
+
"net.connectOptsChk": { argTypes: [DYN, STRING], result: VOID },
|
|
1014
|
+
"net.connectCb": {
|
|
1015
|
+
argTypes: [F64, STRING, { kind: "func", params: [], ret: VOID }],
|
|
1016
|
+
result: NETSOCKET_T,
|
|
1017
|
+
},
|
|
1018
|
+
// The lookup's exact func shape is program data (its answer callback's
|
|
1019
|
+
// union/record types) — checked specially in the libCall case.
|
|
1020
|
+
/** connect({ port, host, autoSelectFamily: true, lookup }) — the
|
|
1021
|
+
* caller-resolver dial (portless's createLoopbackConnection): args
|
|
1022
|
+
* [port, host, lookup]. The runtime creates the (connecting) socket
|
|
1023
|
+
* handle, invokes the lookup as Node does — lookup(hostname, options,
|
|
1024
|
+
* callback), options crossing as the dyn undefined — and the answer
|
|
1025
|
+
* closure (an emitter-synthesized per-shape thunk over a boxed socket,
|
|
1026
|
+
* the SNI-answer pattern) dials the answered addresses IN ORDER: each
|
|
1027
|
+
* connect failure tries the next, the LAST failure's message is the
|
|
1028
|
+
* socket's 'error' (Node's autoSelectFamily aggregate is a documented
|
|
1029
|
+
* divergence), and a lookup error surfaces as the deferred socket
|
|
1030
|
+
* 'error'. A synchronous throw INSIDE the lookup propagates out of the
|
|
1031
|
+
* connect call (may-throw seed). */
|
|
1032
|
+
"net.connectLookup": { argTypes: [F64, STRING, null], result: NETSOCKET_T },
|
|
1033
|
+
"net.sockWrite": { argTypes: [NETSOCKET_T, STRING], result: VOID },
|
|
1034
|
+
"net.sockWriteBytes": { argTypes: [NETSOCKET_T, BYTES_U8], result: VOID },
|
|
1035
|
+
"net.sockEnd": { argTypes: [NETSOCKET_T], result: VOID },
|
|
1036
|
+
"net.sockEndStr": { argTypes: [NETSOCKET_T, STRING], result: VOID },
|
|
1037
|
+
"net.sockEndBytes": { argTypes: [NETSOCKET_T, BYTES_U8], result: VOID },
|
|
1038
|
+
/** write/end with a CHECKED-DYNAMIC chunk (an untyped JS payload into a
|
|
1039
|
+
* typed socket): the runtime dispatches STR/BYTES and throws Node's
|
|
1040
|
+
* ERR_INVALID_ARG_TYPE chunk TypeError on any other kind. */
|
|
1041
|
+
"net.sockWriteDyn": { argTypes: [NETSOCKET_T, DYN], result: VOID },
|
|
1042
|
+
"net.sockEndDyn": { argTypes: [NETSOCKET_T, DYN], result: VOID },
|
|
1043
|
+
"net.sockDestroy": { argTypes: [NETSOCKET_T], result: VOID },
|
|
1044
|
+
"net.sockPipe": { argTypes: [NETSOCKET_T, NETSOCKET_T], result: VOID },
|
|
1045
|
+
/** socket.pipe(res) — raw socket chunks into a ServerResponse body
|
|
1046
|
+
* (the extended-CONNECT bridge leg): each chunk is a body write (the
|
|
1047
|
+
* response's own framing applies); source EOF end()s the response,
|
|
1048
|
+
* pipe's default. Borrows both. Never throws. */
|
|
1049
|
+
"net.sockPipeRes": { argTypes: [NETSOCKET_T, HTTPRES_T], result: VOID },
|
|
1050
|
+
"net.sockOnData": { argTypes: [NETSOCKET_T, null, BOOL], result: VOID },
|
|
1051
|
+
"net.sockOnEnd": {
|
|
1052
|
+
argTypes: [NETSOCKET_T, { kind: "func", params: [], ret: VOID }, BOOL],
|
|
1053
|
+
result: VOID,
|
|
1054
|
+
},
|
|
1055
|
+
"net.sockOnClose": {
|
|
1056
|
+
argTypes: [NETSOCKET_T, { kind: "func", params: [], ret: VOID }, BOOL],
|
|
1057
|
+
result: VOID,
|
|
1058
|
+
},
|
|
1059
|
+
"net.sockOnError": { argTypes: [NETSOCKET_T, null, BOOL], result: VOID },
|
|
1060
|
+
"net.sockOnConnect": {
|
|
1061
|
+
argTypes: [NETSOCKET_T, { kind: "func", params: [], ret: VOID }, BOOL],
|
|
1062
|
+
result: VOID,
|
|
1063
|
+
},
|
|
1064
|
+
// node:dgram + node:dns (scr_dgram.c). The message/error listeners and
|
|
1065
|
+
// dns.lookup's callback are program-dependent closures (null slots,
|
|
1066
|
+
// checked in the libCall case); dgram.address's record result is
|
|
1067
|
+
// program-dependent too (VOID here is the envGet sentinel — the libCall
|
|
1068
|
+
// case checks the {address, family, port} shape).
|
|
1069
|
+
/** node:dgram + node:dns (scr_dgram.c — linked, and
|
|
1070
|
+
* scr_dgram_install() emitted, only when one of these appears on the
|
|
1071
|
+
* IR; moduleUsesDgram is the switch — dns.lookup rides the same unit).
|
|
1072
|
+
* The net listener discipline verbatim: receivers borrowed, CALLBACKS
|
|
1073
|
+
* MOVE into the handle's registry and release at settlement, `on` vs
|
|
1074
|
+
* `once` is the trailing bool, registrations are void. bind/connect
|
|
1075
|
+
* bind NOW and defer 'listening'/'connect' to the next loop turn (the
|
|
1076
|
+
* net.listen story); their optional-host completions are ""
|
|
1077
|
+
* (bind → 0.0.0.0) and "127.0.0.1" (connect — udp4's Node default).
|
|
1078
|
+
* bind/connect/send/close/address THROW Node's state errors ("Socket
|
|
1079
|
+
* is already bound", "Already connected", "Not running") — may-throw
|
|
1080
|
+
* seeded. dgram.address returns the AddressInfo RECORD (the frontend
|
|
1081
|
+
* pins the {address, family, port} shape; the emitter builds it from
|
|
1082
|
+
* runtime parts). onMessage adapters are emitted per rinfo record
|
|
1083
|
+
* shape (the child.onExit precedent); onError reuses the child %Error
|
|
1084
|
+
* adapters. dns.lookup resolves via getaddrinfo AT CALL TIME and
|
|
1085
|
+
* defers the callback to the next turn (SEMANTICS.md documents the
|
|
1086
|
+
* blocking divergence); its per-union adapter builds the
|
|
1087
|
+
* `Error | null` first argument. */
|
|
1088
|
+
"dgram.createSocket": { argTypes: [BOOL], result: DGRAMSOCK_T },
|
|
1089
|
+
"dgram.bind": { argTypes: [DGRAMSOCK_T, F64, STRING], result: VOID },
|
|
1090
|
+
"dgram.bindCb": {
|
|
1091
|
+
argTypes: [DGRAMSOCK_T, F64, STRING, { kind: "func", params: [], ret: VOID }],
|
|
1092
|
+
result: VOID,
|
|
1093
|
+
},
|
|
1094
|
+
"dgram.connect": { argTypes: [DGRAMSOCK_T, F64, STRING], result: VOID },
|
|
1095
|
+
"dgram.connectCb": {
|
|
1096
|
+
argTypes: [DGRAMSOCK_T, F64, STRING, { kind: "func", params: [], ret: VOID }],
|
|
1097
|
+
result: VOID,
|
|
1098
|
+
},
|
|
1099
|
+
"dgram.sendStr": { argTypes: [DGRAMSOCK_T, STRING, F64, STRING], result: VOID },
|
|
1100
|
+
"dgram.sendBytes": { argTypes: [DGRAMSOCK_T, BYTES_U8, F64, STRING], result: VOID },
|
|
1101
|
+
/** The send argument-validation ladder over dyn arguments (Node's
|
|
1102
|
+
* signature shuffle: slice bounds, list/type contracts, port/address
|
|
1103
|
+
* validation, connected-state errors) — a fully-validated unconnected
|
|
1104
|
+
* single-payload send RUNS; callback/list/connected forms meet the
|
|
1105
|
+
* trailing fence. May-throw. */
|
|
1106
|
+
"dgram.sendChk": { argTypes: [DGRAMSOCK_T, DYN, DYN, DYN, DYN, DYN, STRING], result: VOID },
|
|
1107
|
+
"dgram.address": { argTypes: [DGRAMSOCK_T], result: VOID },
|
|
1108
|
+
"dgram.close": { argTypes: [DGRAMSOCK_T], result: VOID },
|
|
1109
|
+
"dgram.closeCb": {
|
|
1110
|
+
argTypes: [DGRAMSOCK_T, { kind: "func", params: [], ret: VOID }],
|
|
1111
|
+
result: VOID,
|
|
1112
|
+
},
|
|
1113
|
+
"dgram.unref": { argTypes: [DGRAMSOCK_T], result: VOID },
|
|
1114
|
+
"dgram.ref": { argTypes: [DGRAMSOCK_T], result: VOID },
|
|
1115
|
+
"dgram.onMessage": { argTypes: [DGRAMSOCK_T, null, BOOL], result: VOID },
|
|
1116
|
+
"dgram.onError": { argTypes: [DGRAMSOCK_T, null, BOOL], result: VOID },
|
|
1117
|
+
"dgram.onListening": {
|
|
1118
|
+
argTypes: [DGRAMSOCK_T, { kind: "func", params: [], ret: VOID }, BOOL],
|
|
1119
|
+
result: VOID,
|
|
1120
|
+
},
|
|
1121
|
+
"dgram.onClose": {
|
|
1122
|
+
argTypes: [DGRAMSOCK_T, { kind: "func", params: [], ret: VOID }, BOOL],
|
|
1123
|
+
result: VOID,
|
|
1124
|
+
},
|
|
1125
|
+
"dgram.onConnect": {
|
|
1126
|
+
argTypes: [DGRAMSOCK_T, { kind: "func", params: [], ret: VOID }, BOOL],
|
|
1127
|
+
result: VOID,
|
|
1128
|
+
},
|
|
1129
|
+
"dns.lookup": { argTypes: [STRING, F64, null], result: VOID },
|
|
1130
|
+
// node:test (scr_test.c). Bodies are program-dependent closures (0 or
|
|
1131
|
+
// 1 testCtx param, void or Promise<void> result — the spoke pinned the
|
|
1132
|
+
// shape): null slots. sub's result is the settled Promise<void> the
|
|
1133
|
+
// await consumes.
|
|
1134
|
+
/** node:test (scr_test.c — linked only when one of these appears on
|
|
1135
|
+
* the IR; moduleUsesNodeTest is the switch, and the main epilogue asks
|
|
1136
|
+
* scr_test_exit_code() for the process's exit status). Strings are
|
|
1137
|
+
* BORROWED, callbacks MOVE. register/suite/hook attach to the runner
|
|
1138
|
+
* tree (register: name, mode 0|1|2 run/skip/todo, directive message ""
|
|
1139
|
+
* = none, cb or absent via registerEmpty, flags 1 async | 2 takes-ctx
|
|
1140
|
+
* | 4 only, "file:line:col"); suite runs its body AT registration
|
|
1141
|
+
* (Node's collection phase). sub is t.test — runs the subtest INLINE
|
|
1142
|
+
* on the runner fiber and returns the settled promise the await
|
|
1143
|
+
* consumes. ctxSkip/ctxTodo mark the running test; ctxDiagnostic
|
|
1144
|
+
* queues an ℹ line; ctxName reads t.name. Every registration keeps
|
|
1145
|
+
* the loop-run emitted (usesTimers) so the runner fiber drains. */
|
|
1146
|
+
"test.register": { argTypes: [STRING, F64, STRING, null, F64, STRING], result: VOID },
|
|
1147
|
+
"test.registerEmpty": { argTypes: [STRING, F64, STRING, F64, STRING], result: VOID },
|
|
1148
|
+
"test.suite": {
|
|
1149
|
+
argTypes: [STRING, F64, STRING, { kind: "func", params: [], ret: VOID }, STRING],
|
|
1150
|
+
result: VOID,
|
|
1151
|
+
},
|
|
1152
|
+
"test.hook": { argTypes: [F64, null, F64], result: VOID },
|
|
1153
|
+
"test.sub": {
|
|
1154
|
+
argTypes: [TESTCTX_T, STRING, F64, STRING, null, F64, STRING],
|
|
1155
|
+
result: { kind: "promise", inner: VOID },
|
|
1156
|
+
},
|
|
1157
|
+
"test.subEmpty": { argTypes: [TESTCTX_T, STRING, F64, STRING, STRING], result: VOID },
|
|
1158
|
+
"test.ctxSkip": { argTypes: [TESTCTX_T, STRING], result: VOID },
|
|
1159
|
+
"test.ctxTodo": { argTypes: [TESTCTX_T, STRING], result: VOID },
|
|
1160
|
+
"test.ctxDiagnostic": { argTypes: [TESTCTX_T, STRING], result: VOID },
|
|
1161
|
+
"test.ctxName": { argTypes: [TESTCTX_T], result: STRING },
|
|
1162
|
+
// node:http (scr_http.c over scr_net.c). The handler and the data
|
|
1163
|
+
// listeners are program-dependent closures (null slots, checked in the
|
|
1164
|
+
// libCall case); reqHeader's result is the interned string|undefined
|
|
1165
|
+
// union, checked like process.envGet.
|
|
1166
|
+
/** node:http, the server slice (scr_http.c over scr_net.c — linked
|
|
1167
|
+
* only when these appear on the IR; moduleUsesHttpServer is the
|
|
1168
|
+
* switch, and any http.* libCall also counts as net use so scr_net.c
|
|
1169
|
+
* links and installs). http.createServer's handler MOVES in and takes
|
|
1170
|
+
* the runtime adapters for its (req, res) / (req) / () shapes; req
|
|
1171
|
+
* body listeners follow the net.sockOnData story (bytes chunks, once
|
|
1172
|
+
* flags); reqHeader answers the interned `string | undefined` union
|
|
1173
|
+
* exactly like process.envGet; the res writers are borrowed-argument
|
|
1174
|
+
* voids with Node's framing decided in the runtime (Content-Length
|
|
1175
|
+
* for end-before-head, chunked after an explicit writeHead/write). */
|
|
1176
|
+
"http.createServer": { argTypes: [null], result: NETSERVER_T },
|
|
1177
|
+
/** http.createServer() / http.Server() with no handler — the
|
|
1178
|
+
* on("request") route; option helpers set parser behavior on a fresh
|
|
1179
|
+
* server before the constructor/factory result is returned. */
|
|
1180
|
+
"http.createServerEmpty": { argTypes: [], result: NETSERVER_T },
|
|
1181
|
+
"http.validateHeaderName": { argTypes: [STRING, STRING], result: VOID },
|
|
1182
|
+
"http.validateHeaderValue": { argTypes: [STRING, DYN], result: VOID },
|
|
1183
|
+
"http.serverJoinDupHeaders": { argTypes: [NETSERVER_T], result: VOID },
|
|
1184
|
+
"http.serverAllowMissingHostHeader": { argTypes: [NETSERVER_T], result: VOID },
|
|
1185
|
+
/** The five writable numeric http.Server timeout fields use one
|
|
1186
|
+
* selector ABI: 0 timeout, 1 keepAliveTimeout, 2 headersTimeout,
|
|
1187
|
+
* 3 requestTimeout, 4 keepAliveTimeoutBuffer. These calls store/read
|
|
1188
|
+
* the property values; timer enforcement remains outside this surface.
|
|
1189
|
+
* The constructor-option setter takes dyn so explicit undefined remains
|
|
1190
|
+
* distinguishable from a numeric value until its Node validation ladder. */
|
|
1191
|
+
"http.serverTimeoutGet": { argTypes: [NETSERVER_T, F64], result: F64 },
|
|
1192
|
+
"http.serverSetTimeout": { argTypes: [NETSERVER_T, F64], result: VOID },
|
|
1193
|
+
"http.serverSetTimeoutCb": { argTypes: [NETSERVER_T, F64, null], result: VOID },
|
|
1194
|
+
"http.serverOnTimeout": { argTypes: [NETSERVER_T, null, BOOL], result: VOID },
|
|
1195
|
+
"http.serverCloseAllConnections": { argTypes: [NETSERVER_T], result: VOID },
|
|
1196
|
+
"http.serverCloseIdleConnections": { argTypes: [NETSERVER_T], result: VOID },
|
|
1197
|
+
"http.serverTimeoutSet": { argTypes: [NETSERVER_T, F64, F64], result: VOID },
|
|
1198
|
+
"http.serverTimeoutOptionSet": { argTypes: [NETSERVER_T, F64, DYN], result: VOID },
|
|
1199
|
+
/** server.on("listening", cb) — the deferred listen-callback list. */
|
|
1200
|
+
"net.serverOnListening": {
|
|
1201
|
+
argTypes: [NETSERVER_T, { kind: "func", params: [], ret: VOID }, BOOL],
|
|
1202
|
+
result: VOID,
|
|
1203
|
+
},
|
|
1204
|
+
/** The ServerResponse member surface: statusCode/statusMessage reads
|
|
1205
|
+
* and assignments (Node's writable properties), the header CRUD trio
|
|
1206
|
+
* (getHeader answers `string | undefined` like reqHeader), and
|
|
1207
|
+
* end(cb)'s finish slot (resOnFinish registers, the end call follows —
|
|
1208
|
+
* the callback fires deferred, Node's 'finish' emit). writeHead's
|
|
1209
|
+
* statusMessage forms compose in interned helpers: resStatusMsgSet
|
|
1210
|
+
* then the ordinary writeHead entry. */
|
|
1211
|
+
"http.resStatusGet": { argTypes: [HTTPRES_T], result: F64 },
|
|
1212
|
+
"http.resStatusSet": { argTypes: [HTTPRES_T, F64], result: VOID },
|
|
1213
|
+
"http.resStatusMsgGet": { argTypes: [HTTPRES_T], result: VOID },
|
|
1214
|
+
"http.resStatusMsgSet": { argTypes: [HTTPRES_T, STRING], result: VOID },
|
|
1215
|
+
"http.resRequest": { argTypes: [HTTPRES_T], result: HTTPREQ_T },
|
|
1216
|
+
"http.resSocket": { argTypes: [HTTPRES_T], result: VOID },
|
|
1217
|
+
"http.resWritableFinished": { argTypes: [HTTPRES_T], result: BOOL },
|
|
1218
|
+
"http.resSendDateGet": { argTypes: [HTTPRES_T], result: BOOL },
|
|
1219
|
+
"http.resSendDateSet": { argTypes: [HTTPRES_T, BOOL], result: VOID },
|
|
1220
|
+
"http.resStrictContentLengthGet": { argTypes: [HTTPRES_T], result: BOOL },
|
|
1221
|
+
"http.resStrictContentLengthSet": { argTypes: [HTTPRES_T, BOOL], result: VOID },
|
|
1222
|
+
"http.resSetTimeout": { argTypes: [HTTPRES_T, F64], result: VOID },
|
|
1223
|
+
"http.resSetTimeoutCb": {
|
|
1224
|
+
argTypes: [HTTPRES_T, F64, { kind: "func", params: [], ret: VOID }],
|
|
1225
|
+
result: VOID,
|
|
1226
|
+
},
|
|
1227
|
+
// resGetHeader answers the interned `string | undefined` union — the
|
|
1228
|
+
// reqHeader/envGet sentinel pattern (VOID here, checked specially).
|
|
1229
|
+
"http.resGetHeader": { argTypes: [HTTPRES_T, STRING], result: VOID },
|
|
1230
|
+
"http.resGetHeaderNames": { argTypes: [HTTPRES_T], result: arrayOf(STRING) },
|
|
1231
|
+
"http.resGetRawHeaderNames": { argTypes: [HTTPRES_T], result: arrayOf(STRING) },
|
|
1232
|
+
"http.resGetHeaders": { argTypes: [HTTPRES_T], result: DYN },
|
|
1233
|
+
"http.resHasHeader": { argTypes: [HTTPRES_T, STRING], result: BOOL },
|
|
1234
|
+
"http.resRemoveHeader": { argTypes: [HTTPRES_T, STRING], result: VOID },
|
|
1235
|
+
"http.resOnFinish": {
|
|
1236
|
+
argTypes: [HTTPRES_T, { kind: "func", params: [], ret: VOID }],
|
|
1237
|
+
result: VOID,
|
|
1238
|
+
},
|
|
1239
|
+
"http.reqUrl": { argTypes: [HTTPREQ_T], result: STRING },
|
|
1240
|
+
"http.reqMethod": { argTypes: [HTTPREQ_T], result: STRING },
|
|
1241
|
+
"http.reqHeader": { argTypes: [HTTPREQ_T, STRING], result: VOID },
|
|
1242
|
+
"http.reqTrailer": { argTypes: [HTTPREQ_T, STRING], result: VOID },
|
|
1243
|
+
"http.reqHeaderValues": { argTypes: [HTTPREQ_T, STRING], result: VOID },
|
|
1244
|
+
"http.reqTrailerValues": { argTypes: [HTTPREQ_T, STRING], result: VOID },
|
|
1245
|
+
"http.reqOnData": { argTypes: [HTTPREQ_T, null, BOOL], result: VOID },
|
|
1246
|
+
"http.reqOnEnd": {
|
|
1247
|
+
argTypes: [HTTPREQ_T, { kind: "func", params: [], ret: VOID }, BOOL],
|
|
1248
|
+
result: VOID,
|
|
1249
|
+
},
|
|
1250
|
+
"http.resSetHeader": { argTypes: [HTTPRES_T, STRING, STRING], result: VOID },
|
|
1251
|
+
"http.resWriteHead": { argTypes: [HTTPRES_T, F64], result: VOID },
|
|
1252
|
+
"http.resWriteHeadN": {
|
|
1253
|
+
argTypes: [HTTPRES_T, F64, arrayOf(STRING), arrayOf(STRING)],
|
|
1254
|
+
result: VOID,
|
|
1255
|
+
},
|
|
1256
|
+
/** HTTP/1.1 informational heads; early hints takes flat string pairs,
|
|
1257
|
+
* with a lowercase `link` key required to send anything. */
|
|
1258
|
+
"http.resWriteContinue": { argTypes: [HTTPRES_T], result: VOID },
|
|
1259
|
+
"http.resWriteProcessing": { argTypes: [HTTPRES_T], result: VOID },
|
|
1260
|
+
"http.resWriteEarlyHints": { argTypes: [HTTPRES_T, arrayOf(STRING)], result: VOID },
|
|
1261
|
+
"http.resWrite": { argTypes: [HTTPRES_T, STRING], result: VOID },
|
|
1262
|
+
"http.resWriteBytes": { argTypes: [HTTPRES_T, BYTES_U8], result: VOID },
|
|
1263
|
+
"http.resEnd": { argTypes: [HTTPRES_T], result: VOID },
|
|
1264
|
+
"http.resEndStr": { argTypes: [HTTPRES_T, STRING], result: VOID },
|
|
1265
|
+
"http.resEndBytes": { argTypes: [HTTPRES_T, BYTES_U8], result: VOID },
|
|
1266
|
+
/** The checked-dynamic chunk twins (the net.sockWriteDyn story). */
|
|
1267
|
+
"http.resWriteDyn": { argTypes: [HTTPRES_T, DYN], result: VOID },
|
|
1268
|
+
"http.resEndDyn": { argTypes: [HTTPRES_T, DYN], result: VOID },
|
|
1269
|
+
"http.resHeadersSent": { argTypes: [HTTPRES_T], result: BOOL },
|
|
1270
|
+
"http.resWritableEnded": { argTypes: [HTTPRES_T], result: BOOL },
|
|
1271
|
+
"http.resFlushHeaders": { argTypes: [HTTPRES_T], result: VOID },
|
|
1272
|
+
"http.resAddTrailers": { argTypes: [HTTPRES_T, arrayOf(STRING)], result: VOID },
|
|
1273
|
+
"http.resCork": { argTypes: [HTTPRES_T], result: VOID },
|
|
1274
|
+
"http.resUncork": { argTypes: [HTTPRES_T], result: VOID },
|
|
1275
|
+
"http.resWritableCorked": { argTypes: [HTTPRES_T], result: F64 },
|
|
1276
|
+
// The member follow-ups: reqStatusCode's `number | undefined` and
|
|
1277
|
+
// sockRemoteAddress's `string | undefined` results are shape-checked in
|
|
1278
|
+
// the special cases in validate.ts (like reqHeader/columns).
|
|
1279
|
+
/** The server-surface member follow-ups: reqStatusCode answers the
|
|
1280
|
+
* interned `number | undefined` union (negative = the undefined arm —
|
|
1281
|
+
* a SERVER request, where Node's statusCode is undefined; every client
|
|
1282
|
+
* response carries a real status); reqSocket is the underlying
|
|
1283
|
+
* connection (+1, the same handle net.connect would give);
|
|
1284
|
+
* sockRemoteAddress answers `string | undefined` (NULL after the fd
|
|
1285
|
+
* closed, Node's destroyed-socket undefined; a dual-stack accept of an
|
|
1286
|
+
* IPv4 peer reads "::ffff:a.b.c.d" like Node). reqResume/reqDestroy and
|
|
1287
|
+
* the req error/close listener slots complete the IncomingMessage
|
|
1288
|
+
* surface portless's client responses use; resDestroy/resOnClose and
|
|
1289
|
+
* resWriteHeadPairs ([k0,v0,k1,v1,...] — the env.pairs helper's flat
|
|
1290
|
+
* shape) complete ServerResponse. sockSetTimeout arms the idle
|
|
1291
|
+
* EVFILT_TIMER ('timeout' fires after ms of inactivity, once per idle
|
|
1292
|
+
* period, never destroying the socket — Node's semantics). */
|
|
1293
|
+
"http.reqStatusCode": { argTypes: [HTTPREQ_T], result: VOID },
|
|
1294
|
+
// reqStatusMessage's `string | undefined` is program-interned like
|
|
1295
|
+
// reqHeader's (the VOID here is the envGet sentinel).
|
|
1296
|
+
"http.reqStatusMessage": { argTypes: [HTTPREQ_T], result: VOID },
|
|
1297
|
+
/** req.rawHeaders — [name, value, name, value, ...] in arrival order,
|
|
1298
|
+
* names in their ORIGINAL case (Node's shape); a fresh string[] per
|
|
1299
|
+
* read. reqStatusMessage answers the interned `string | undefined`
|
|
1300
|
+
* union — the reason phrase on client responses ("" when the status
|
|
1301
|
+
* line carried none), the undefined arm on server requests (the
|
|
1302
|
+
* statusCode split). sockDestroyed is socket.destroyed — true once the
|
|
1303
|
+
* fd is gone (destroy() or full close). */
|
|
1304
|
+
"http.reqRawHeaders": { argTypes: [HTTPREQ_T], result: arrayOf(STRING) },
|
|
1305
|
+
/** The `{ ...req.headers }` snapshot feed: [lowercased name, value,
|
|
1306
|
+
* ...] pairs in arrival order — the interned %headers.snapshot helper
|
|
1307
|
+
* builds the record over it, exactly the process.envPairs pattern. */
|
|
1308
|
+
"http.reqHeaderPairs": { argTypes: [HTTPREQ_T], result: arrayOf(STRING) },
|
|
1309
|
+
"http.reqRawTrailers": { argTypes: [HTTPREQ_T], result: arrayOf(STRING) },
|
|
1310
|
+
"http.reqTrailerPairs": { argTypes: [HTTPREQ_T], result: arrayOf(STRING) },
|
|
1311
|
+
"net.sockDestroyed": { argTypes: [NETSOCKET_T], result: BOOL },
|
|
1312
|
+
/** socket.writable — the write half is open: no end() yet, no FIN sent,
|
|
1313
|
+
* fd alive (connecting sockets answer true; writes queue). Node's
|
|
1314
|
+
* stream flag. Borrows; never throws. */
|
|
1315
|
+
"net.sockWritable": { argTypes: [NETSOCKET_T], result: BOOL },
|
|
1316
|
+
// The 'upgrade' registrations: the callback shapes are program-typed
|
|
1317
|
+
// ((req, socket, head) and shorter prefixes — the libCall case checks).
|
|
1318
|
+
/** The 'upgrade' events, both sides (SEMANTICS.md — the WebSocket
|
|
1319
|
+
* proxying surface): serverOnUpgrade registers (req, socket, head)
|
|
1320
|
+
* listeners fired INSTEAD of 'request' for Connection: upgrade
|
|
1321
|
+
* requests (the parser steps aside; the socket is raw; `head` carries
|
|
1322
|
+
* bytes past the request head; no listener = the socket destroys,
|
|
1323
|
+
* Node's default). clientOnUpgrade is the client twin: a 101 response
|
|
1324
|
+
* fires (res, socket, head) INSTEAD of 'response'. */
|
|
1325
|
+
"http.serverOnUpgrade": { argTypes: [NETSERVER_T, null, BOOL], result: VOID },
|
|
1326
|
+
/** server.on("connect", ...) — HTTP CONNECT tunneling, the 'upgrade'
|
|
1327
|
+
* machinery's twin: (req, socket, head) fired INSTEAD of 'request' for
|
|
1328
|
+
* CONNECT-method requests (no listener = the socket destroys, Node's
|
|
1329
|
+
* default). The h2 compat server's 'connect' (portless's RFC 8441
|
|
1330
|
+
* handler) only ever sees the HTTP/1.1 arm under the allowHTTP1
|
|
1331
|
+
* lowering, so a listener whose second parameter is a UNION with a
|
|
1332
|
+
* netSocket arm takes the socket wrapped at that arm (an emitted
|
|
1333
|
+
* per-shape adapter — the tags are program data). */
|
|
1334
|
+
"http.serverOnConnect": { argTypes: [NETSERVER_T, null, BOOL], result: VOID },
|
|
1335
|
+
"http.clientOnUpgrade": { argTypes: [HTTPCLIENTREQ_T, null, BOOL], result: VOID },
|
|
1336
|
+
"http.reqSocket": { argTypes: [HTTPREQ_T], result: NETSOCKET_T },
|
|
1337
|
+
// reqH2Stream's program-interned Http2Stream | undefined result is
|
|
1338
|
+
// checked in the special libCall cases in validate.ts.
|
|
1339
|
+
"http.reqH2Stream": { argTypes: [HTTPREQ_T], result: VOID },
|
|
1340
|
+
"http.reqH2StreamOrThrow": { argTypes: [HTTPREQ_T, STRING], result: HTTP2STREAM_T },
|
|
1341
|
+
/** req.pipe(dest) — the IncomingMessage body streaming into a
|
|
1342
|
+
* ServerResponse (the proxy's response leg), a ClientRequest (the
|
|
1343
|
+
* request-body forward), or a raw socket (the upgrade-rejection leg);
|
|
1344
|
+
* chunk-for-chunk, natural end ends the destination (Node's pipe
|
|
1345
|
+
* default; no backpressure — divergence 54's stream model). */
|
|
1346
|
+
"http.reqPipeRes": { argTypes: [HTTPREQ_T, HTTPRES_T], result: VOID },
|
|
1347
|
+
"http.reqPipeClient": { argTypes: [HTTPREQ_T, HTTPCLIENTREQ_T], result: VOID },
|
|
1348
|
+
"http.reqPipeSock": { argTypes: [HTTPREQ_T, NETSOCKET_T], result: VOID },
|
|
1349
|
+
"http.reqResume": { argTypes: [HTTPREQ_T], result: VOID },
|
|
1350
|
+
"http.reqDestroy": { argTypes: [HTTPREQ_T], result: VOID },
|
|
1351
|
+
"http.reqOnError": { argTypes: [HTTPREQ_T, null, BOOL], result: VOID },
|
|
1352
|
+
"http.reqOnClose": {
|
|
1353
|
+
argTypes: [HTTPREQ_T, { kind: "func", params: [], ret: VOID }, BOOL],
|
|
1354
|
+
result: VOID,
|
|
1355
|
+
},
|
|
1356
|
+
"http.reqOnAborted": {
|
|
1357
|
+
argTypes: [HTTPREQ_T, { kind: "func", params: [], ret: VOID }, BOOL],
|
|
1358
|
+
result: VOID,
|
|
1359
|
+
},
|
|
1360
|
+
"http.reqHttpVersion": { argTypes: [HTTPREQ_T], result: STRING },
|
|
1361
|
+
"http.reqHttpVersionMajor": { argTypes: [HTTPREQ_T], result: F64 },
|
|
1362
|
+
"http.reqHttpVersionMinor": { argTypes: [HTTPREQ_T], result: F64 },
|
|
1363
|
+
"http.reqAborted": { argTypes: [HTTPREQ_T], result: BOOL },
|
|
1364
|
+
"http.reqComplete": { argTypes: [HTTPREQ_T], result: BOOL },
|
|
1365
|
+
"http.resDestroy": { argTypes: [HTTPRES_T], result: VOID },
|
|
1366
|
+
"http.resOnClose": {
|
|
1367
|
+
argTypes: [HTTPRES_T, { kind: "func", params: [], ret: VOID }, BOOL],
|
|
1368
|
+
result: VOID,
|
|
1369
|
+
},
|
|
1370
|
+
"http.resWriteHeadPairs": { argTypes: [HTTPRES_T, F64, arrayOf(STRING)], result: VOID },
|
|
1371
|
+
/** writeHead(status, headers) with a checked-dynamic headers value —
|
|
1372
|
+
* the runtime OBJ walk (string/number values; loud fences otherwise;
|
|
1373
|
+
* may throw). */
|
|
1374
|
+
"http.resWriteHeadDyn": { argTypes: [HTTPRES_T, F64, DYN], result: VOID },
|
|
1375
|
+
"net.sockSetTimeout": { argTypes: [NETSOCKET_T, F64], result: VOID },
|
|
1376
|
+
/** setEncoding('utf8') — 'data' delivers strings inside the chunk-encoding window; other real encodings fence loudly, unknown names throw ERR_UNKNOWN_ENCODING (may throw). */
|
|
1377
|
+
"net.sockSetEncoding": { argTypes: [NETSOCKET_T, STRING], result: VOID },
|
|
1378
|
+
"http.reqSetEncoding": { argTypes: [HTTPREQ_T, STRING], result: VOID },
|
|
1379
|
+
"net.sockOnTimeout": {
|
|
1380
|
+
argTypes: [NETSOCKET_T, { kind: "func", params: [], ret: VOID }, BOOL],
|
|
1381
|
+
result: VOID,
|
|
1382
|
+
},
|
|
1383
|
+
"net.sockRemoteAddress": { argTypes: [NETSOCKET_T], result: VOID },
|
|
1384
|
+
/** socket.encrypted — `boolean | undefined`: the true arm iff the
|
|
1385
|
+
* socket carries a TLS transport (Node types `encrypted: true` on
|
|
1386
|
+
* TLSSocket; plain sockets answer undefined — the proxy.ts isEncrypted
|
|
1387
|
+
* idiom reads it through a cast). */
|
|
1388
|
+
"net.sockEncrypted": { argTypes: [NETSOCKET_T], result: VOID },
|
|
1389
|
+
// node:http, the client slice. The response callback shapes are
|
|
1390
|
+
// program-dependent (checked by validate.ts); header pairs arrive flat.
|
|
1391
|
+
/** node:http, the CLIENT slice (http.request/http.get over the net
|
|
1392
|
+
* client machinery): request/requestCb take (host, port, path, method,
|
|
1393
|
+
* timeoutMs, headerPairs, autoEnd[, responseCb]) — headerPairs is the
|
|
1394
|
+
* flat [k0,v0,...] array (empty for none), autoEnd true is http.get's
|
|
1395
|
+
* eager end(). The handle owns one dialed connection (NO pooling — the
|
|
1396
|
+
* wire still carries Node's exact head: user headers, then Host,
|
|
1397
|
+
* Connection: keep-alive, and the framing header; the socket closes
|
|
1398
|
+
* when the response completes). The response delivered to responseCb /
|
|
1399
|
+
* 'response' listeners IS an httpReq (IncomingMessage), status and
|
|
1400
|
+
* headers parsed from the wire, body via reqOnData/reqOnEnd. Errors are
|
|
1401
|
+
* Node-shaped ('connect ECONNREFUSED ip:port', 'socket hang up') and
|
|
1402
|
+
* fire 'error' then 'close'; an unhandled 'error' exits 1 like every
|
|
1403
|
+
* net handle. clientWrite before end commits to chunked framing unless
|
|
1404
|
+
* the caller set content-length; clientEnd(data) before any write sends
|
|
1405
|
+
* Content-Length exactly like Node. */
|
|
1406
|
+
"http.request": {
|
|
1407
|
+
argTypes: [STRING, F64, STRING, STRING, F64, arrayOf(STRING), BOOL],
|
|
1408
|
+
result: HTTPCLIENTREQ_T,
|
|
1409
|
+
},
|
|
1410
|
+
"http.requestCb": {
|
|
1411
|
+
argTypes: [STRING, F64, STRING, STRING, F64, arrayOf(STRING), BOOL, null],
|
|
1412
|
+
result: HTTPCLIENTREQ_T,
|
|
1413
|
+
},
|
|
1414
|
+
/** new http.Agent(opts) / new https.Agent(opts): (secure, keepAlive,
|
|
1415
|
+
* keepAliveMsecs, maxSockets, maxFreeSockets, timeoutMs, port) — the
|
|
1416
|
+
* numeric options arrive < 0 for "unset" (Infinity/256/none; port
|
|
1417
|
+
* seeds the settable defaultPort, Node's option merge). Returns the
|
|
1418
|
+
* Agent as a checked-dynamic HANDLE (getName/destroy and the
|
|
1419
|
+
* sockets/requests/freeSockets counters dispatch through the dyn
|
|
1420
|
+
* handle ops). keepAlive: true THROWS the named construction fence —
|
|
1421
|
+
* socket POOLING is not modeled (one dial per request); maxSockets
|
|
1422
|
+
* accounting is real: over-limit requests defer their dial and queue.
|
|
1423
|
+
* MAY THROW. */
|
|
1424
|
+
"http.agentNew": { argTypes: [BOOL, BOOL, F64, F64, F64, F64, F64], result: DYN },
|
|
1425
|
+
/** The agent-threaded request rows: the http.request/https.request
|
|
1426
|
+
* shape with a trailing `agent` dyn argument (an Agent handle, false —
|
|
1427
|
+
* the one-shot Connection: close dial — or null/undefined for the
|
|
1428
|
+
* default path). port < 0 means "no port option": the agent's settable
|
|
1429
|
+
* defaultPort, then the scheme's. MAY THROW (a non-Agent value is
|
|
1430
|
+
* Node's ERR_INVALID_ARG_TYPE). */
|
|
1431
|
+
"http.requestAgent": {
|
|
1432
|
+
argTypes: [STRING, F64, STRING, STRING, F64, arrayOf(STRING), BOOL, DYN],
|
|
1433
|
+
result: HTTPCLIENTREQ_T,
|
|
1434
|
+
},
|
|
1435
|
+
"http.requestAgentCb": {
|
|
1436
|
+
argTypes: [STRING, F64, STRING, STRING, F64, arrayOf(STRING), BOOL, DYN, null],
|
|
1437
|
+
result: HTTPCLIENTREQ_T,
|
|
1438
|
+
},
|
|
1439
|
+
/** request/get with a URL-STRING first argument: the runtime parses it
|
|
1440
|
+
* (WHATWG) and dials — throws catchably on an unparsable input or a
|
|
1441
|
+
* non-http scheme. */
|
|
1442
|
+
"http.requestUrl": { argTypes: [STRING, STRING, BOOL], result: HTTPCLIENTREQ_T },
|
|
1443
|
+
"http.requestUrlCb": { argTypes: [STRING, STRING, BOOL, null], result: HTTPCLIENTREQ_T },
|
|
1444
|
+
/** The paused-mode demux surface (portless's first-byte TLS peek:
|
|
1445
|
+
* once('readable') + read(1) + unshift + emit('connection')).
|
|
1446
|
+
* sockOnReadable registers a zero-param listener (a consumer: arrived
|
|
1447
|
+
* bytes buffer instead of flowing, and EOF announces too); sockRead
|
|
1448
|
+
* answers `Buffer | null` (exactly n buffered bytes, or null — Node's
|
|
1449
|
+
* less-than-n answer; n <= 0 drains everything); sockUnshift returns
|
|
1450
|
+
* bytes to the front of the stream; serverEmitConnection routes a
|
|
1451
|
+
* socket into another server's protocol layer (a TLS target's
|
|
1452
|
+
* 'connection' waits for its handshake). */
|
|
1453
|
+
"net.sockOnReadable": { argTypes: [NETSOCKET_T, null, BOOL], result: VOID },
|
|
1454
|
+
// sockRead's result is the interned `Buffer | null` union — checked
|
|
1455
|
+
// specially in validate.ts (the reqHeader/envGet pattern; VOID here is a
|
|
1456
|
+
// placeholder the special case overrides).
|
|
1457
|
+
"net.sockRead": { argTypes: [NETSOCKET_T, F64], result: VOID },
|
|
1458
|
+
"net.sockUnshift": { argTypes: [NETSOCKET_T, BYTES_U8], result: VOID },
|
|
1459
|
+
/** Socket flow control and the compat surface: pause/resume (reads
|
|
1460
|
+
* gate off/on — kernel backpressure holds paused bytes; resume flows
|
|
1461
|
+
* and discards sans listeners) and setNoDelay answer the SOCKET (+1,
|
|
1462
|
+
* Node's chaining); destroySoon ends now and destroys once the FIN
|
|
1463
|
+
* flushed; bytesWritten counts accepted bytes; readable is true until
|
|
1464
|
+
* the read half ends. */
|
|
1465
|
+
"net.sockPause": { argTypes: [NETSOCKET_T], result: NETSOCKET_T },
|
|
1466
|
+
"net.sockResume": { argTypes: [NETSOCKET_T], result: NETSOCKET_T },
|
|
1467
|
+
"net.sockSetNoDelay": { argTypes: [NETSOCKET_T, BOOL], result: NETSOCKET_T },
|
|
1468
|
+
"net.sockDestroySoon": { argTypes: [NETSOCKET_T], result: VOID },
|
|
1469
|
+
"net.sockBytesWritten": { argTypes: [NETSOCKET_T], result: F64 },
|
|
1470
|
+
"net.sockReadable": { argTypes: [NETSOCKET_T], result: BOOL },
|
|
1471
|
+
/** socket.on('finish', cb) / end(cb): fires once when the FIN goes out
|
|
1472
|
+
* (sweep-deferred, never the registering stack). */
|
|
1473
|
+
"net.sockOnFinish": {
|
|
1474
|
+
argTypes: [NETSOCKET_T, { kind: "func", params: [], ret: VOID }],
|
|
1475
|
+
result: VOID,
|
|
1476
|
+
},
|
|
1477
|
+
"net.serverEmitConnection": { argTypes: [NETSERVER_T, NETSOCKET_T], result: VOID },
|
|
1478
|
+
// tls/https: cert/key/ca PEM arguments are strings OR Buffers (null =
|
|
1479
|
+
// both accepted; the emitter passes data+len either way).
|
|
1480
|
+
/** node:tls + node:https (scr_tls.c over scr_net.c/scr_http.c, with
|
|
1481
|
+
* the vendored mbedTLS archive — linked only when one of these appears
|
|
1482
|
+
* on the IR; moduleUsesTls is the switch, and every tls/https libCall
|
|
1483
|
+
* also counts as net AND http use so both units link and install).
|
|
1484
|
+
* tls.createServer takes (cert, key[, handler]) — cert/key are PEM
|
|
1485
|
+
* strings or Buffers (the emitter passes data+len for either); the
|
|
1486
|
+
* handler is Node's 'secureConnection' (fires post-handshake with a
|
|
1487
|
+
* socket that behaves exactly like a net socket, the same adapters as
|
|
1488
|
+
* net.createServer). https.createServer is (cert, key, handler) with
|
|
1489
|
+
* the http request-handler adapters. https.request/requestCb extend
|
|
1490
|
+
* the http client row with (…, rejectUnauthorized: bool, ca: PEM
|
|
1491
|
+
* string/Buffer — "" for none) and default port 443; everything else
|
|
1492
|
+
* (write/end/destroy/events, the response surface) IS the http client
|
|
1493
|
+
* surface — the handles are the same kinds. */
|
|
1494
|
+
"tls.createServer": { argTypes: [null, null], result: NETSERVER_T },
|
|
1495
|
+
"tls.createServerCb": { argTypes: [null, null, null], result: NETSERVER_T },
|
|
1496
|
+
// The runtime options records (divergence 66's stance): a dyn options
|
|
1497
|
+
// value whose members read at runtime; pemDyn extracts a runtime-valued
|
|
1498
|
+
// cert/key member (arg 1 is the precomposed fence label).
|
|
1499
|
+
/** RUNTIME options records (the divergence-66 stance): the *Dyn
|
|
1500
|
+
* creators take a checked-dynamic (dyn) options value whose members
|
|
1501
|
+
* read at runtime — cert/key extract like the literal path, members
|
|
1502
|
+
* whose literal forms fence THROW the catchable fence at runtime, and
|
|
1503
|
+
* undocumented keys drop like Node drops them. tls.pemDyn is the
|
|
1504
|
+
* literal walk's runtime-valued cert/key extraction: (value, whatLit)
|
|
1505
|
+
* → PEM bytes (strings/Buffers/one-element arrays of those) or the
|
|
1506
|
+
* thrown fence. All of them may throw. */
|
|
1507
|
+
"tls.pemDyn": { argTypes: [DYN, STRING], result: BYTES_U8 },
|
|
1508
|
+
"tls.createServerDyn": { argTypes: [DYN], result: NETSERVER_T },
|
|
1509
|
+
"tls.createServerDynCb": { argTypes: [DYN, null], result: NETSERVER_T },
|
|
1510
|
+
"https.createServerDyn": { argTypes: [DYN], result: NETSERVER_T },
|
|
1511
|
+
"https.createServerDynCb": { argTypes: [DYN, null], result: NETSERVER_T },
|
|
1512
|
+
/** createSecureServer(options, handler) — the eager COMPAT handler as
|
|
1513
|
+
* the first 'request' listener (Node's exact route), on both literal
|
|
1514
|
+
* flavors: Req is the dual ALPN allowHTTP1 server, H2Req the ALPN=h2-only
|
|
1515
|
+
* server (both use compat handles over h2 streams). Args are
|
|
1516
|
+
* (cert, key, cb, enableConnectProtocol). */
|
|
1517
|
+
"http2.createSecureServerReq": { argTypes: [null, null, null, BOOL], result: NETSERVER_T },
|
|
1518
|
+
"http2.createSecureServerH2Req": { argTypes: [null, null, null, BOOL], result: NETSERVER_T },
|
|
1519
|
+
/** createSecureServer with a RUNTIME options record (the divergence-66
|
|
1520
|
+
* stance): allowHTTP1/cert/key read at runtime — allowHTTP1 picks the
|
|
1521
|
+
* flavor, the TLS server walk fences its out-of-bounds members with
|
|
1522
|
+
* the catchable runtime fence, and h2 session-tuning keys drop exactly
|
|
1523
|
+
* like the literal walk ignores them. May throw. The Cb form carries
|
|
1524
|
+
* the eager compat handler. */
|
|
1525
|
+
"http2.createSecureServerDyn": { argTypes: [DYN], result: NETSERVER_T },
|
|
1526
|
+
"http2.createSecureServerDynCb": { argTypes: [DYN, null], result: NETSERVER_T },
|
|
1527
|
+
// tls.connect(port, host, opts[, cb]) — port -1 / host "" read the
|
|
1528
|
+
// options record; the callback fires post-handshake (secureConnect).
|
|
1529
|
+
/** tls.connect — the TLS client socket: (port, host, opts[, cb]) where
|
|
1530
|
+
* port -1 reads options.port, host "" reads options.host, and opts is
|
|
1531
|
+
* the runtime (dyn) options record (rejectUnauthorized/ca/servername
|
|
1532
|
+
* implemented; other documented members throw the runtime fence). The
|
|
1533
|
+
* callback fires post-handshake — Node's secureConnect timing. */
|
|
1534
|
+
"tls.connect": { argTypes: [F64, STRING, DYN], result: NETSOCKET_T },
|
|
1535
|
+
"tls.connectCb": { argTypes: [F64, STRING, DYN, null], result: NETSOCKET_T },
|
|
1536
|
+
// The TLSSocket member surface (authError's `string | null` union is
|
|
1537
|
+
// shape-checked in the special cases in validate.ts — the reqHeader pattern).
|
|
1538
|
+
/** The TLSSocket member surface on the socket kind: authorized (bool —
|
|
1539
|
+
* Node's verify verdict), authorizationError (the verify-failure CODE
|
|
1540
|
+
* STRING or null), the 'secureConnect' registration (a TLS socket's
|
|
1541
|
+
* conn list fires at establishment; plain sockets never fire it), and
|
|
1542
|
+
* the 'session' registration (fires once with the serialized session —
|
|
1543
|
+
* a Buffer; the received-ticket event). */
|
|
1544
|
+
"tls.sockAuthorized": { argTypes: [NETSOCKET_T], result: BOOL },
|
|
1545
|
+
"tls.sockAuthError": { argTypes: [NETSOCKET_T], result: VOID },
|
|
1546
|
+
"tls.sockOnSecureConnect": {
|
|
1547
|
+
argTypes: [NETSOCKET_T, { kind: "func", params: [], ret: VOID }, BOOL],
|
|
1548
|
+
result: VOID,
|
|
1549
|
+
},
|
|
1550
|
+
"tls.sockOnSession": { argTypes: [NETSOCKET_T, null, BOOL], result: VOID },
|
|
1551
|
+
// createSecureContext({ cert, key }) mints the opaque SNI-answer handle.
|
|
1552
|
+
/** tls.createSecureContext({ cert, key }) — parses the PEM pair into an
|
|
1553
|
+
* opaque SecureContext handle (secureCtx kind) for SNI callbacks to
|
|
1554
|
+
* answer with; cert/key are PEM strings or Buffers like createServer's. */
|
|
1555
|
+
"tls.createSecureContext": { argTypes: [null, null], result: SECURECTX_T },
|
|
1556
|
+
/** createSecureContext over a RUNTIME options record (the checked-
|
|
1557
|
+
* dynamic lane): Node's typed option validations first (the ciphers/
|
|
1558
|
+
* passphrase/engine/version/timeout/ticketKeys ladders), then the pem
|
|
1559
|
+
* walk — a validated { cert, key } bag builds the real context.
|
|
1560
|
+
* May-throw. */
|
|
1561
|
+
"tls.createSecureContextDyn": { argTypes: [DYN], result: SECURECTX_T },
|
|
1562
|
+
/** tls.getCACertificates(type): validateString + the documented name
|
|
1563
|
+
* set, then the trailing compiler-rendered fence — ALWAYS THROWS (the
|
|
1564
|
+
* error.nodeThrow polymorphic-result carve-out). May-throw seed. */
|
|
1565
|
+
"tls.caCertsChk": { argTypes: [DYN, STRING], result: VOID },
|
|
1566
|
+
// The CA-store introspection unit (scr_tls_ca.c): per-type cached PEM
|
|
1567
|
+
// string arrays and the default-set replacement.
|
|
1568
|
+
/** The CA-store introspection surface (scr_tls_ca.c — its own unit and
|
|
1569
|
+
* link gate, "tlsca." NOT "tls.", so a getCACertificates-only binary
|
|
1570
|
+
* never pulls mbedTLS): tlsca.get is tls.getCACertificates(type) — the
|
|
1571
|
+
* cached per-type string[] of PEM blocks (identity-stable across calls,
|
|
1572
|
+
* Node's caching; an unknown type throws Node's ERR_INVALID_ARG_VALUE
|
|
1573
|
+
* TypeError); tlsca.root is the tls.rootCertificates value read;
|
|
1574
|
+
* tlsca.set is tls.setDefaultCACertificates(certs) — replaces the
|
|
1575
|
+
* default set (deduped) and the anchors the TLS client verifies
|
|
1576
|
+
* against, throwing Node's ERR_CRYPTO_OPERATION_FAILED when no entry
|
|
1577
|
+
* carries a certificate block. */
|
|
1578
|
+
"tlsca.get": { argTypes: [STRING], result: arrayOf(STRING) },
|
|
1579
|
+
"tlsca.root": { argTypes: [], result: arrayOf(STRING) },
|
|
1580
|
+
"tlsca.set": { argTypes: [arrayOf(STRING)], result: VOID },
|
|
1581
|
+
"https.createServer": { argTypes: [null, null, null], result: NETSERVER_T },
|
|
1582
|
+
// http2's allowHTTP1 compatibility server (divergence 57): cert/key
|
|
1583
|
+
// like tls.createServer; the 'request' handler arrives separately via
|
|
1584
|
+
// http.serverOnRequest (shape checked in the libCall case, like
|
|
1585
|
+
// http.createServer's). sessionError callback shape is checked by validate.ts.
|
|
1586
|
+
/** node:http2 allowHTTP1: one TLS server advertises h2 + http/1.1 and
|
|
1587
|
+
* dispatches to the matching parser after ALPN. Request listeners mirror
|
|
1588
|
+
* into both compatibility lists; the remaining session/req.stream rows
|
|
1589
|
+
* below retain their explicitly limited behavior. */
|
|
1590
|
+
"http2.createSecureServer": { argTypes: [null, null, BOOL], result: NETSERVER_T },
|
|
1591
|
+
// The SNI-callback form: arg 2 is the JS SNICallback closure — a
|
|
1592
|
+
// `(servername, cb) => void` func, or its `| undefined` union from the
|
|
1593
|
+
// conditional-spread spelling (the libCall case checks the shape).
|
|
1594
|
+
/** createSecureServer with an SNI callback: args are (cert, key, sniCb)
|
|
1595
|
+
* where sniCb is the JS SNICallback — a `(servername, cb) => void`
|
|
1596
|
+
* closure, or the `SNICallback | undefined` union from the conditional-
|
|
1597
|
+
* spread spelling (`...(x ? { SNICallback: x } : {})`; the emitter
|
|
1598
|
+
* unwraps the union — the undefined arm means "no callback", exactly
|
|
1599
|
+
* the no-SNI server). The runtime parses each connection's ClientHello
|
|
1600
|
+
* for the server_name extension BEFORE the TLS handshake begins, calls
|
|
1601
|
+
* the callback with (servername, answer-closure), and resumes the
|
|
1602
|
+
* handshake when the answer arrives — cb(err) tears the socket down
|
|
1603
|
+
* silently (Node's 'tlsClientError' default), cb(null, ctx) serves
|
|
1604
|
+
* ctx's cert/key, cb(null, undefined) serves the default pair. */
|
|
1605
|
+
"http2.createSecureServerSni": { argTypes: [null, null, null, BOOL], result: NETSERVER_T },
|
|
1606
|
+
// The ALPN=h2 server (createSecureServer without allowHTTP1): the real
|
|
1607
|
+
// h2 session machinery behind the TLS handshake.
|
|
1608
|
+
/** The REAL h2-over-TLS server (createSecureServer WITHOUT allowHTTP1):
|
|
1609
|
+
* scr_http2_create_secure_server — the h2c session machinery behind an
|
|
1610
|
+
* mbedTLS handshake whose ALPN advertises h2 alone (an http/1.1-only
|
|
1611
|
+
* client fails the handshake with no_application_protocol, Node's
|
|
1612
|
+
* h2-only split). args are (cert, key) — PEM strings or Buffers. */
|
|
1613
|
+
"http2.createSecureServerH2": { argTypes: [null, null, BOOL], result: NETSERVER_T },
|
|
1614
|
+
"http.serverOnRequest": { argTypes: [NETSERVER_T, null, BOOL], result: VOID },
|
|
1615
|
+
"http2.serverOnSessionError": { argTypes: [NETSERVER_T, null, BOOL], result: VOID },
|
|
1616
|
+
/** The guarded absent-session compatibility call remains a no-op. */
|
|
1617
|
+
"http2.streamNoop": { argTypes: [], result: VOID },
|
|
1618
|
+
/** The UNGUARDED h2-only stream call (`req.stream.on(...)`): stream is
|
|
1619
|
+
* undefined on every connection the allowHTTP1 lowering accepts — and
|
|
1620
|
+
* on every HTTP/1.1 connection of Node's own allowHTTP1 server — so the
|
|
1621
|
+
* call IS Node's member read on undefined: throws the exact catchable
|
|
1622
|
+
* TypeError ("Cannot read properties of undefined (reading 'on')").
|
|
1623
|
+
* One arg: the read member's name (a string literal). Never returns. */
|
|
1624
|
+
"http2.streamUndefCall": { argTypes: [STRING], result: VOID },
|
|
1625
|
+
// The REAL h2c surface (scr_http2.c). Callback slots are null (the
|
|
1626
|
+
// emitter picks the thunk); pairs slots are string arrays; the
|
|
1627
|
+
// endStream tri-state and event flags ride as f64.
|
|
1628
|
+
/** node:http2, the REAL h2c surface (scr_http2.c — frame codec + HPACK
|
|
1629
|
+
* over the net loop; the design note atop that file has the story).
|
|
1630
|
+
* Sessions and streams are first-class handle kinds; 'stream'/'response'
|
|
1631
|
+
* payloads cross as flat [name, value, ...] pairs arrays and an EMITTED
|
|
1632
|
+
* adapter closure builds the program-side headers record (the response
|
|
1633
|
+
* :status rides separately as a number). */
|
|
1634
|
+
"http2.createServer": { argTypes: [], result: NETSERVER_T },
|
|
1635
|
+
"http2.createServerReq": { argTypes: [null], result: NETSERVER_T },
|
|
1636
|
+
"http2.serverOnStream": { argTypes: [NETSERVER_T, null, BOOL], result: VOID },
|
|
1637
|
+
"http2.serverOnSession": { argTypes: [NETSERVER_T, null, BOOL], result: VOID },
|
|
1638
|
+
// connect(authority, reject, ca[, cb]): the TLS client knobs an https
|
|
1639
|
+
// authority reads (inert on http ones, exactly Node); ca is a PEM
|
|
1640
|
+
// string/Buffer ("" = the system anchors).
|
|
1641
|
+
/** connect(authority[, listener]) — h2c prior knowledge; the listener
|
|
1642
|
+
* closure (if any) is the 'connect' once-listener. */
|
|
1643
|
+
"http2.connect": { argTypes: [STRING, BOOL, null], result: HTTP2SESSION_T },
|
|
1644
|
+
"http2.connectCb": { argTypes: [STRING, BOOL, null, null], result: HTTP2SESSION_T },
|
|
1645
|
+
/** session.request(pairs?, endStream) — endStream is a tri-state f64:
|
|
1646
|
+
* -1 the method's payload-meaningless default, 0/1 explicit. */
|
|
1647
|
+
"http2.sessionRequest": {
|
|
1648
|
+
argTypes: [HTTP2SESSION_T, arrayOf(STRING), F64],
|
|
1649
|
+
result: HTTP2STREAM_T,
|
|
1650
|
+
},
|
|
1651
|
+
"http2.sessionClose": { argTypes: [HTTP2SESSION_T], result: VOID },
|
|
1652
|
+
"http2.sessionCloseCb": { argTypes: [HTTP2SESSION_T, null], result: VOID },
|
|
1653
|
+
"http2.sessionDestroy": { argTypes: [HTTP2SESSION_T], result: VOID },
|
|
1654
|
+
"http2.sessionOnClose": { argTypes: [HTTP2SESSION_T, null, BOOL], result: VOID },
|
|
1655
|
+
"http2.sessionOnError": { argTypes: [HTTP2SESSION_T, null, BOOL], result: VOID },
|
|
1656
|
+
"http2.sessionOnConnect": { argTypes: [HTTP2SESSION_T, null, BOOL], result: VOID },
|
|
1657
|
+
"http2.sessionOnStream": { argTypes: [HTTP2SESSION_T, null, BOOL], result: VOID },
|
|
1658
|
+
"http2.sessionOnGoaway": { argTypes: [HTTP2SESSION_T, null, BOOL], result: VOID },
|
|
1659
|
+
"http2.sessionClosed": { argTypes: [HTTP2SESSION_T], result: BOOL },
|
|
1660
|
+
"http2.sessionDestroyed": { argTypes: [HTTP2SESSION_T], result: BOOL },
|
|
1661
|
+
"http2.sessionEncrypted": { argTypes: [HTTP2SESSION_T], result: BOOL },
|
|
1662
|
+
"http2.sessionType": { argTypes: [HTTP2SESSION_T], result: F64 },
|
|
1663
|
+
"http2.sessionAlpn": { argTypes: [HTTP2SESSION_T], result: STRING },
|
|
1664
|
+
"http2.sessionSocket": { argTypes: [HTTP2SESSION_T], result: NETSOCKET_T },
|
|
1665
|
+
/** stream.respond(pairs?, endStream) — the server answer. */
|
|
1666
|
+
"http2.streamRespond": { argTypes: [HTTP2STREAM_T, arrayOf(STRING), BOOL], result: VOID },
|
|
1667
|
+
"http2.streamWrite": { argTypes: [HTTP2STREAM_T, STRING], result: VOID },
|
|
1668
|
+
"http2.streamWriteBytes": { argTypes: [HTTP2STREAM_T, BYTES_U8], result: VOID },
|
|
1669
|
+
"http2.streamEnd": { argTypes: [HTTP2STREAM_T], result: VOID },
|
|
1670
|
+
"http2.streamEndStr": { argTypes: [HTTP2STREAM_T, STRING], result: VOID },
|
|
1671
|
+
"http2.streamEndBytes": { argTypes: [HTTP2STREAM_T, BYTES_U8], result: VOID },
|
|
1672
|
+
"http2.streamClose": { argTypes: [HTTP2STREAM_T, F64], result: VOID },
|
|
1673
|
+
"http2.streamCloseCb": { argTypes: [HTTP2STREAM_T, F64, null], result: VOID },
|
|
1674
|
+
"http2.streamDestroy": { argTypes: [HTTP2STREAM_T], result: VOID },
|
|
1675
|
+
"http2.sessionSettings0": { argTypes: [HTTP2SESSION_T], result: VOID },
|
|
1676
|
+
"http2.sessionSettings": { argTypes: [HTTP2SESSION_T, DYN], result: VOID },
|
|
1677
|
+
"http2.sessionSettingsDynCb": { argTypes: [HTTP2SESSION_T, DYN, DYN], result: VOID },
|
|
1678
|
+
"http2.sessionSettingsCb0": {
|
|
1679
|
+
argTypes: [HTTP2SESSION_T, DYN, { kind: "func", params: [], ret: VOID }],
|
|
1680
|
+
result: VOID,
|
|
1681
|
+
},
|
|
1682
|
+
"http2.sessionOnSettingsDyn": { argTypes: [HTTP2SESSION_T, DYN, BOOL, BOOL], result: VOID },
|
|
1683
|
+
"http2.sessionOnSettings0": {
|
|
1684
|
+
argTypes: [HTTP2SESSION_T, { kind: "func", params: [], ret: VOID }, BOOL, BOOL],
|
|
1685
|
+
result: VOID,
|
|
1686
|
+
},
|
|
1687
|
+
"http2.sessionSettingsGet": { argTypes: [HTTP2SESSION_T, BOOL], result: DYN },
|
|
1688
|
+
"http2.sessionPendingSettingsAck": { argTypes: [HTTP2SESSION_T], result: BOOL },
|
|
1689
|
+
"http2.getDefaultSettings": { argTypes: [], result: DYN },
|
|
1690
|
+
"http2.streamSetEncoding": { argTypes: [HTTP2STREAM_T, STRING], result: VOID },
|
|
1691
|
+
"http2.streamSetEncodingRet": { argTypes: [HTTP2STREAM_T, STRING], result: HTTP2STREAM_T },
|
|
1692
|
+
"http2.streamResume": { argTypes: [HTTP2STREAM_T], result: VOID },
|
|
1693
|
+
"http2.streamPause": { argTypes: [HTTP2STREAM_T], result: VOID },
|
|
1694
|
+
"http2.streamOnData": { argTypes: [HTTP2STREAM_T, null, BOOL], result: VOID },
|
|
1695
|
+
"http2.streamOnEnd": { argTypes: [HTTP2STREAM_T, null, BOOL], result: VOID },
|
|
1696
|
+
"http2.streamOnClose": { argTypes: [HTTP2STREAM_T, null, BOOL], result: VOID },
|
|
1697
|
+
"http2.streamOnAborted": { argTypes: [HTTP2STREAM_T, null, BOOL], result: VOID },
|
|
1698
|
+
"http2.streamOnError": { argTypes: [HTTP2STREAM_T, null, BOOL], result: VOID },
|
|
1699
|
+
"http2.streamOnResponse": { argTypes: [HTTP2STREAM_T, null, BOOL], result: VOID },
|
|
1700
|
+
"http2.streamId": { argTypes: [HTTP2STREAM_T], result: F64 },
|
|
1701
|
+
"http2.streamRstCode": { argTypes: [HTTP2STREAM_T], result: F64 },
|
|
1702
|
+
"http2.streamDestroyed": { argTypes: [HTTP2STREAM_T], result: BOOL },
|
|
1703
|
+
"http2.streamClosed": { argTypes: [HTTP2STREAM_T], result: BOOL },
|
|
1704
|
+
"http2.streamAborted": { argTypes: [HTTP2STREAM_T], result: BOOL },
|
|
1705
|
+
"http2.streamPending": { argTypes: [HTTP2STREAM_T], result: BOOL },
|
|
1706
|
+
"http2.streamSession": { argTypes: [HTTP2STREAM_T], result: HTTP2SESSION_T },
|
|
1707
|
+
// The createConnection forms: arg 0 is the dialer closure (() =>
|
|
1708
|
+
// Socket — the libCall case checks), then path/method/timeout/headers/
|
|
1709
|
+
// autoEnd like http.request.
|
|
1710
|
+
/** The createConnection form (the proxy's own dialer): args are
|
|
1711
|
+
* (connCb, path, method, timeout, headers, autoEnd[, cb]) — connCb is
|
|
1712
|
+
* a `() => net.Socket` closure the runtime invokes ONCE, synchronously
|
|
1713
|
+
* (Node's onSocket timing); everything else matches http.request. The
|
|
1714
|
+
* Host header defaults to "localhost" — a headers.host entry wins
|
|
1715
|
+
* verbatim, the proxy shape. */
|
|
1716
|
+
"http.requestConn": {
|
|
1717
|
+
argTypes: [null, STRING, STRING, F64, arrayOf(STRING), BOOL],
|
|
1718
|
+
result: HTTPCLIENTREQ_T,
|
|
1719
|
+
},
|
|
1720
|
+
"http.requestConnCb": {
|
|
1721
|
+
argTypes: [null, STRING, STRING, F64, arrayOf(STRING), BOOL, null],
|
|
1722
|
+
result: HTTPCLIENTREQ_T,
|
|
1723
|
+
},
|
|
1724
|
+
"https.request": {
|
|
1725
|
+
argTypes: [STRING, F64, STRING, STRING, F64, arrayOf(STRING), BOOL, BOOL, null],
|
|
1726
|
+
result: HTTPCLIENTREQ_T,
|
|
1727
|
+
},
|
|
1728
|
+
"https.requestCb": {
|
|
1729
|
+
argTypes: [STRING, F64, STRING, STRING, F64, arrayOf(STRING), BOOL, BOOL, null, null],
|
|
1730
|
+
result: HTTPCLIENTREQ_T,
|
|
1731
|
+
},
|
|
1732
|
+
/** The URL-string first argument, the http.requestUrl row over TLS:
|
|
1733
|
+
* no options means Node's defaults (verification on, default trust
|
|
1734
|
+
* anchors), and a non-https scheme is ERR_INVALID_PROTOCOL. */
|
|
1735
|
+
"https.requestUrl": { argTypes: [STRING, STRING, BOOL], result: HTTPCLIENTREQ_T },
|
|
1736
|
+
"https.requestUrlCb": { argTypes: [STRING, STRING, BOOL, null], result: HTTPCLIENTREQ_T },
|
|
1737
|
+
"https.requestAgent": {
|
|
1738
|
+
argTypes: [STRING, F64, STRING, STRING, F64, arrayOf(STRING), BOOL, BOOL, null, DYN],
|
|
1739
|
+
result: HTTPCLIENTREQ_T,
|
|
1740
|
+
},
|
|
1741
|
+
"https.requestAgentCb": {
|
|
1742
|
+
argTypes: [STRING, F64, STRING, STRING, F64, arrayOf(STRING), BOOL, BOOL, null, DYN, null],
|
|
1743
|
+
result: HTTPCLIENTREQ_T,
|
|
1744
|
+
},
|
|
1745
|
+
// The requestFn binding's runtime-secure rows: https.request's shape
|
|
1746
|
+
// with the leading `secure` bool.
|
|
1747
|
+
/** A call through a `const requestFn = tls ? https.request :
|
|
1748
|
+
* http.request` binding — the module-function-as-value ternary between
|
|
1749
|
+
* the two known clients: the https.request row with a leading `secure`
|
|
1750
|
+
* bool that picks the dial at RUNTIME (true = the TLS client, exactly
|
|
1751
|
+
* https.request; false = the plain client, exactly http.request —
|
|
1752
|
+
* rejectUnauthorized/ca ignored there like Node ignores TLS options on
|
|
1753
|
+
* http.request). The "https." prefix keeps the TLS unit linked. */
|
|
1754
|
+
"https.requestFn": {
|
|
1755
|
+
argTypes: [BOOL, STRING, F64, STRING, STRING, F64, arrayOf(STRING), BOOL, BOOL, null],
|
|
1756
|
+
result: HTTPCLIENTREQ_T,
|
|
1757
|
+
},
|
|
1758
|
+
"https.requestFnCb": {
|
|
1759
|
+
argTypes: [BOOL, STRING, F64, STRING, STRING, F64, arrayOf(STRING), BOOL, BOOL, null, null],
|
|
1760
|
+
result: HTTPCLIENTREQ_T,
|
|
1761
|
+
},
|
|
1762
|
+
"http.clientWrite": { argTypes: [HTTPCLIENTREQ_T, STRING], result: VOID },
|
|
1763
|
+
"http.clientSetHeader": { argTypes: [HTTPCLIENTREQ_T, STRING, STRING], result: VOID },
|
|
1764
|
+
"http.clientGetHeader": { argTypes: [HTTPCLIENTREQ_T, STRING], result: VOID },
|
|
1765
|
+
"http.clientHasHeader": { argTypes: [HTTPCLIENTREQ_T, STRING], result: BOOL },
|
|
1766
|
+
"http.clientRemoveHeader": { argTypes: [HTTPCLIENTREQ_T, STRING], result: VOID },
|
|
1767
|
+
"http.clientGetHeaderNames": { argTypes: [HTTPCLIENTREQ_T], result: arrayOf(STRING) },
|
|
1768
|
+
"http.clientGetRawHeaderNames": { argTypes: [HTTPCLIENTREQ_T], result: arrayOf(STRING) },
|
|
1769
|
+
"http.clientGetHeaders": { argTypes: [HTTPCLIENTREQ_T], result: DYN },
|
|
1770
|
+
"http.clientWriteBytes": { argTypes: [HTTPCLIENTREQ_T, BYTES_U8], result: VOID },
|
|
1771
|
+
"http.clientEnd": { argTypes: [HTTPCLIENTREQ_T], result: VOID },
|
|
1772
|
+
"http.clientEndStr": { argTypes: [HTTPCLIENTREQ_T, STRING], result: VOID },
|
|
1773
|
+
"http.clientEndBytes": { argTypes: [HTTPCLIENTREQ_T, BYTES_U8], result: VOID },
|
|
1774
|
+
/** The checked-dynamic chunk twins (the net.sockWriteDyn story). */
|
|
1775
|
+
"http.clientWriteDyn": { argTypes: [HTTPCLIENTREQ_T, DYN], result: VOID },
|
|
1776
|
+
"http.clientEndDyn": { argTypes: [HTTPCLIENTREQ_T, DYN], result: VOID },
|
|
1777
|
+
"http.clientFlushHeaders": { argTypes: [HTTPCLIENTREQ_T], result: VOID },
|
|
1778
|
+
"http.clientAddTrailers": { argTypes: [HTTPCLIENTREQ_T, arrayOf(STRING)], result: VOID },
|
|
1779
|
+
"http.clientCork": { argTypes: [HTTPCLIENTREQ_T], result: VOID },
|
|
1780
|
+
"http.clientUncork": { argTypes: [HTTPCLIENTREQ_T], result: VOID },
|
|
1781
|
+
"http.clientWritableCorked": { argTypes: [HTTPCLIENTREQ_T], result: F64 },
|
|
1782
|
+
"http.clientMethod": { argTypes: [HTTPCLIENTREQ_T], result: STRING },
|
|
1783
|
+
"http.clientPath": { argTypes: [HTTPCLIENTREQ_T], result: STRING },
|
|
1784
|
+
"http.clientHost": { argTypes: [HTTPCLIENTREQ_T], result: STRING },
|
|
1785
|
+
"http.clientProtocol": { argTypes: [HTTPCLIENTREQ_T], result: STRING },
|
|
1786
|
+
"http.clientHeadersSent": { argTypes: [HTTPCLIENTREQ_T], result: BOOL },
|
|
1787
|
+
"http.clientWritableEnded": { argTypes: [HTTPCLIENTREQ_T], result: BOOL },
|
|
1788
|
+
"http.clientWritableFinished": { argTypes: [HTTPCLIENTREQ_T], result: BOOL },
|
|
1789
|
+
"http.clientSocket": { argTypes: [HTTPCLIENTREQ_T], result: NETSOCKET_T },
|
|
1790
|
+
"http.clientReusedSocket": { argTypes: [HTTPCLIENTREQ_T], result: BOOL },
|
|
1791
|
+
"http.clientSetNoDelay": { argTypes: [HTTPCLIENTREQ_T, BOOL], result: VOID },
|
|
1792
|
+
"http.clientSetSocketKeepAlive": { argTypes: [HTTPCLIENTREQ_T, BOOL, F64], result: VOID },
|
|
1793
|
+
"http.clientSetTimeout": { argTypes: [HTTPCLIENTREQ_T, F64], result: VOID },
|
|
1794
|
+
"http.clientSetTimeoutCb": {
|
|
1795
|
+
argTypes: [HTTPCLIENTREQ_T, F64, { kind: "func", params: [], ret: VOID }],
|
|
1796
|
+
result: VOID,
|
|
1797
|
+
},
|
|
1798
|
+
"http.statusCodes": { argTypes: [], result: DYN },
|
|
1799
|
+
"http.methods": { argTypes: [], result: arrayOf(STRING) },
|
|
1800
|
+
"http.reqSetTimeout": { argTypes: [HTTPREQ_T, F64], result: VOID },
|
|
1801
|
+
"http.reqSetTimeoutCb": {
|
|
1802
|
+
argTypes: [HTTPREQ_T, F64, { kind: "func", params: [], ret: VOID }],
|
|
1803
|
+
result: VOID,
|
|
1804
|
+
},
|
|
1805
|
+
"http.clientDestroy": { argTypes: [HTTPCLIENTREQ_T], result: VOID },
|
|
1806
|
+
"http.clientAbort": { argTypes: [HTTPCLIENTREQ_T], result: VOID },
|
|
1807
|
+
"http.clientAborted": { argTypes: [HTTPCLIENTREQ_T], result: BOOL },
|
|
1808
|
+
"http.clientDestroyed": { argTypes: [HTTPCLIENTREQ_T], result: BOOL },
|
|
1809
|
+
"http.clientOnResponse": { argTypes: [HTTPCLIENTREQ_T, null, BOOL], result: VOID },
|
|
1810
|
+
"http.clientOnSocket": { argTypes: [HTTPCLIENTREQ_T, null, BOOL], result: VOID },
|
|
1811
|
+
"http.clientOnFinish": {
|
|
1812
|
+
argTypes: [HTTPCLIENTREQ_T, { kind: "func", params: [], ret: VOID }, BOOL],
|
|
1813
|
+
result: VOID,
|
|
1814
|
+
},
|
|
1815
|
+
"http.clientOnError": { argTypes: [HTTPCLIENTREQ_T, null, BOOL], result: VOID },
|
|
1816
|
+
"http.clientOnTimeout": {
|
|
1817
|
+
argTypes: [HTTPCLIENTREQ_T, { kind: "func", params: [], ret: VOID }, BOOL],
|
|
1818
|
+
result: VOID,
|
|
1819
|
+
},
|
|
1820
|
+
"http.clientOnClose": {
|
|
1821
|
+
argTypes: [HTTPCLIENTREQ_T, { kind: "func", params: [], ret: VOID }, BOOL],
|
|
1822
|
+
result: VOID,
|
|
1823
|
+
},
|
|
1824
|
+
"http.clientOnAbort": {
|
|
1825
|
+
argTypes: [HTTPCLIENTREQ_T, { kind: "func", params: [], ret: VOID }, BOOL],
|
|
1826
|
+
result: VOID,
|
|
1827
|
+
},
|
|
1828
|
+
/** execFileSync/execSync as ONE entry (args: cmd, argv, shell, input,
|
|
1829
|
+
* cwd, hasEnv, envPairs, timeoutMs, stdoutMode, stderrMode — see
|
|
1830
|
+
* scr_runtime.h). Throws Node's exact errors: "Command failed: <cmd>"
|
|
1831
|
+
* (+ captured stderr) on non-zero exit or signal death, "spawnSync
|
|
1832
|
+
* <file> ENOENT" on spawn failure, "spawnSync <file> ETIMEDOUT" after
|
|
1833
|
+
* the SIGTERM timeout. Result is the captured utf8 stdout (+1). */
|
|
1834
|
+
"cp.execSync": {
|
|
1835
|
+
argTypes: [
|
|
1836
|
+
STRING,
|
|
1837
|
+
arrayOf(STRING),
|
|
1838
|
+
BOOL,
|
|
1839
|
+
STRING,
|
|
1840
|
+
BOOL,
|
|
1841
|
+
STRING,
|
|
1842
|
+
BOOL,
|
|
1843
|
+
arrayOf(STRING),
|
|
1844
|
+
F64,
|
|
1845
|
+
F64,
|
|
1846
|
+
F64,
|
|
1847
|
+
],
|
|
1848
|
+
result: STRING,
|
|
1849
|
+
},
|
|
1850
|
+
/** The promisified-execFile capture (args: cmd, argv, cwd, hasEnv,
|
|
1851
|
+
* envPairs, timeoutMs): the same exec core in the async shape — both
|
|
1852
|
+
* streams captured, no echo, Node's ASYNC messages on the throw paths
|
|
1853
|
+
* ("Command failed: <cmd>\n<stderr>" with the unconditional newline,
|
|
1854
|
+
* "spawn <file> ENOENT" with .code, timeouts reporting as ordinary
|
|
1855
|
+
* SIGTERM command failures — never ETIMEDOUT). Result reuses the
|
|
1856
|
+
* ScrSpawnRes container (+1; stdout/stderr strings, status unused).
|
|
1857
|
+
* Called only from the frontend's interned %execFileAsync ASYNC helper,
|
|
1858
|
+
* whose fiber turns the throw into the rejection. */
|
|
1859
|
+
"cp.execCapture": {
|
|
1860
|
+
argTypes: [STRING, arrayOf(STRING), STRING, BOOL, arrayOf(STRING), F64],
|
|
1861
|
+
result: SPAWNRES_T,
|
|
1862
|
+
},
|
|
1863
|
+
/** child_process.spawn (scr_child.c + the scr_async.c loop): posix_spawnp
|
|
1864
|
+
* with per-slot ignore/inherit/pipe modes (and number output fds), the
|
|
1865
|
+
* all-piped Node default, and the child registered with the event loop,
|
|
1866
|
+
* which polls waitpid(WNOHANG) at quiescence like timers.
|
|
1867
|
+
* NEVER throws: spawn failure defers to the "error" event, Node-exact
|
|
1868
|
+
* (the error message is Node's "spawn <cmd> <ERRNO-NAME>"; an "error"
|
|
1869
|
+
* event with no listener prints it and exits 1 like an EventEmitter).
|
|
1870
|
+
* cmd/args borrowed; result an owned (+1) child handle. The loop will
|
|
1871
|
+
* not exhaust while any spawned child is unreaped — Node's keep-alive.
|
|
1872
|
+
*
|
|
1873
|
+
* child.onExit / child.onClose / child.onError — terminal listener
|
|
1874
|
+
* registration through child.on/once. Close uses the exit adapter shape
|
|
1875
|
+
* but fires only after every piped stdio handle reaches EOF. The
|
|
1876
|
+
* receiver is borrowed, the CALLBACK MOVES into the child's listener
|
|
1877
|
+
* registry (released after the terminal event fires, or at reap for
|
|
1878
|
+
* the event that never fires). Both are void (chaining is fenced).
|
|
1879
|
+
* onExit's third emitted ingredient is an ADAPTER the backend interns
|
|
1880
|
+
* per callback shape: the runtime invokes adapter(cb, has_code, code)
|
|
1881
|
+
* and the adapter builds the `number | null` union (tags are program-
|
|
1882
|
+
* dependent) or ignores the code for a zero-param callback. onError's
|
|
1883
|
+
* adapters are runtime-provided (zero-param, or the %Error one-param
|
|
1884
|
+
* shape — scr_error_new needs no program types). "exit" fires once
|
|
1885
|
+
* with the code (f64 arm) or null (signal death); "error" fires only
|
|
1886
|
+
* for spawn failure, exactly Node's split. */
|
|
1887
|
+
"cp.spawn": { argTypes: [STRING, arrayOf(STRING)], result: CHILD_T },
|
|
1888
|
+
/** Static-native fork startup and IPC. process.forkTarget initializes a
|
|
1889
|
+
* re-executed child's inherited channel and returns its embedded target id
|
|
1890
|
+
* (-1 in the parent). The remaining entries mirror Node's JSON channel. */
|
|
1891
|
+
"process.forkTarget": { argTypes: [F64], result: F64 },
|
|
1892
|
+
"cp.fork": {
|
|
1893
|
+
argTypes: [F64, arrayOf(STRING), F64, F64, F64, BOOL, arrayOf(STRING), STRING],
|
|
1894
|
+
result: CHILD_T,
|
|
1895
|
+
},
|
|
1896
|
+
"child.connected": { argTypes: [CHILD_T], result: BOOL },
|
|
1897
|
+
"child.send": { argTypes: [CHILD_T, STRING], result: BOOL },
|
|
1898
|
+
"child.sendCb": { argTypes: [CHILD_T, STRING, null], result: BOOL },
|
|
1899
|
+
"child.disconnect": { argTypes: [CHILD_T], result: VOID },
|
|
1900
|
+
"child.onMessage": { argTypes: [CHILD_T, null, BOOL], result: VOID },
|
|
1901
|
+
"child.onDisconnect": { argTypes: [CHILD_T, null, BOOL], result: VOID },
|
|
1902
|
+
"child.onSpawn": { argTypes: [CHILD_T, null], result: VOID },
|
|
1903
|
+
/** Rest listeners use the checked function bridge to pack event arguments. */
|
|
1904
|
+
"child.onDyn": { argTypes: [CHILD_T, STRING, DYN], result: VOID },
|
|
1905
|
+
"process.connected": { argTypes: [], result: BOOL },
|
|
1906
|
+
"process.send": { argTypes: [STRING], result: BOOL },
|
|
1907
|
+
"process.sendCb": { argTypes: [STRING, null], result: BOOL },
|
|
1908
|
+
"process.disconnect": { argTypes: [], result: VOID },
|
|
1909
|
+
"process.onMessage": { argTypes: [null, BOOL], result: VOID },
|
|
1910
|
+
"process.onDisconnect": { argTypes: [null, BOOL], result: VOID },
|
|
1911
|
+
/** child_process.execFile's callback slice: starts an all-piped child,
|
|
1912
|
+
* captures stdout/stderr, and moves the error-first callback into the
|
|
1913
|
+
* child registry. The callback shape is program-dependent and checked
|
|
1914
|
+
* by the validator/backends. */
|
|
1915
|
+
"cp.execFile": { argTypes: [STRING, arrayOf(STRING), null], result: CHILD_T },
|
|
1916
|
+
// spawn's options form: per-slot stdio modes (0 ignore / 1 inherit /
|
|
1917
|
+
// 2 fd) with the out/err fds for mode 2, detached, env replacement
|
|
1918
|
+
// pairs, cwd ("" = inherit).
|
|
1919
|
+
/** spawn with options (scr_child.c): the cp.spawn core plus PER-SLOT
|
|
1920
|
+
* stdio — args are (cmd, argv, inMode, outMode, errMode, outFd, errFd,
|
|
1921
|
+
* detached, hasEnv, envPairs, cwd); modes 0 ignore (/dev/null), 1
|
|
1922
|
+
* inherit, 2 fd (out/err only — the fd dup2s into the child's slot,
|
|
1923
|
+
* Node's stdio fd form; the daemon-log idiom ["ignore", logFd, logFd]).
|
|
1924
|
+
* detached is POSIX_SPAWN_SETSID (the child gets its own session and
|
|
1925
|
+
* process group, Node's semantics), env is a REPLACEMENT ([k,v,...]
|
|
1926
|
+
* pairs like cp.execSync's), cwd ""=inherit. Same event/loop story as
|
|
1927
|
+
* cp.spawn. */
|
|
1928
|
+
"cp.spawnOpts": {
|
|
1929
|
+
argTypes: [
|
|
1930
|
+
STRING,
|
|
1931
|
+
arrayOf(STRING),
|
|
1932
|
+
F64,
|
|
1933
|
+
F64,
|
|
1934
|
+
F64,
|
|
1935
|
+
F64,
|
|
1936
|
+
F64,
|
|
1937
|
+
BOOL,
|
|
1938
|
+
BOOL,
|
|
1939
|
+
BOOL,
|
|
1940
|
+
arrayOf(STRING),
|
|
1941
|
+
STRING,
|
|
1942
|
+
],
|
|
1943
|
+
result: CHILD_T,
|
|
1944
|
+
},
|
|
1945
|
+
/** Runtime options normalized into the native spawn core; unsupported
|
|
1946
|
+
* process features retain explicit refusals. (command, args, options). */
|
|
1947
|
+
"cp.spawnDynamic": { argTypes: [STRING, arrayOf(STRING), DYN], result: CHILD_T },
|
|
1948
|
+
// The callback's func type is program-dependent (zero params, or the
|
|
1949
|
+
// `number | null` union / the %Error class) — the libCall case checks
|
|
1950
|
+
// the shape; the slot here only pins arity and the child receiver.
|
|
1951
|
+
"child.onExit": { argTypes: [CHILD_T, null], result: VOID },
|
|
1952
|
+
"child.onClose": { argTypes: [CHILD_T, null], result: VOID },
|
|
1953
|
+
"child.onError": { argTypes: [CHILD_T, null], result: VOID },
|
|
1954
|
+
// Like process.envGet, spawnRes.status's result type is program-dependent
|
|
1955
|
+
// (the interned `number | null` union) — the libCall case checks the arms.
|
|
1956
|
+
"spawnRes.status": { argTypes: [SPAWNRES_T], result: VOID },
|
|
1957
|
+
// spawnRes.error's result is the interned `Error | undefined` union —
|
|
1958
|
+
// the libCall case checks the arms, the spawnRes.status pattern.
|
|
1959
|
+
/** Node's spawn-failure carrier `error?: Error`: a fresh +1 %Error
|
|
1960
|
+
* ("spawnSync <file> ENOENT", `code` stamped) when the spawn itself
|
|
1961
|
+
* failed, the interned undefined arm otherwise — the result type is the
|
|
1962
|
+
* call site's `Error | undefined` union, constructed type-directedly in
|
|
1963
|
+
* the backend (the envGet convention). Never throws. */
|
|
1964
|
+
"spawnRes.error": { argTypes: [SPAWNRES_T], result: VOID },
|
|
1965
|
+
// spawnRes.signal's result is the interned `string | null` union —
|
|
1966
|
+
// same pattern.
|
|
1967
|
+
"spawnRes.signal": { argTypes: [SPAWNRES_T], result: VOID },
|
|
1968
|
+
// The ChildProcess lifecycle members: pid/exitCode are program-dependent
|
|
1969
|
+
// unions (`number | undefined` / `number | null` — the libCall case
|
|
1970
|
+
// checks the arms, the spawnRes.status pattern).
|
|
1971
|
+
/** The ChildProcess lifecycle members (scr_child.c), Node's shapes
|
|
1972
|
+
* exactly (SEMANTICS.md has the pinned matrix). child.pid is the
|
|
1973
|
+
* checker's `number | undefined` (undefined = spawn failure) and
|
|
1974
|
+
* child.exitCode its `number | null` (null while running and after a
|
|
1975
|
+
* signal death; -errno once a spawn failure settled) — both unions are
|
|
1976
|
+
* type-directed constructions in the backend over a has/get runtime
|
|
1977
|
+
* pair, the spawnRes.status pattern. child.killed is Node's
|
|
1978
|
+
* sent-a-signal flag. child.kill sends while the child is un-reaped
|
|
1979
|
+
* (false after — Node's null-handle answer) and THROWS the
|
|
1980
|
+
* Unknown-signal TypeError on bad names (may-throw); killNum passes
|
|
1981
|
+
* numbers through (0 probes; never throws). child.unref drops the
|
|
1982
|
+
* child from the loop's keep-alive set — it is still reaped while the
|
|
1983
|
+
* loop runs for other reasons, and one the loop never reaps is left to
|
|
1984
|
+
* the OS at exit. All receivers borrowed. */
|
|
1985
|
+
"child.pid": { argTypes: [CHILD_T], result: VOID },
|
|
1986
|
+
"child.exitCode": { argTypes: [CHILD_T], result: VOID },
|
|
1987
|
+
// The close-override pair: the bound close's result func type and the
|
|
1988
|
+
// override's func argument are program-dependent (the callback union's
|
|
1989
|
+
// tags) — the slots pin the server receiver; the libCall case checks
|
|
1990
|
+
// the bound value's shape.
|
|
1991
|
+
/** The close-override pair (the portless close-proxy idiom).
|
|
1992
|
+
* serverCloseBind is `wrapper.close.bind(wrapper)` as a VALUE: a
|
|
1993
|
+
* compiler-emitted closure over the server whose invocation runs the
|
|
1994
|
+
* REAL close (scr_net_server_close_direct — never the override), so
|
|
1995
|
+
* the override body's `origClose(cb)` cannot recurse; its callback
|
|
1996
|
+
* argument (the `((err?: Error) => void) | undefined` union) registers
|
|
1997
|
+
* as a once-'close' listener, a one-param callback wrapped by an
|
|
1998
|
+
* emitted zero-arg trampoline firing the undefined arm (a clean close
|
|
1999
|
+
* carries no error). serverSetCloseOverride is `wrapper.close = fn`:
|
|
2000
|
+
* the override MOVES in behind an emitted zero-arg wrapper (it invokes
|
|
2001
|
+
* the user function with the undefined-arm callback — tags are program
|
|
2002
|
+
* data), and server.close() consults it before closing. */
|
|
2003
|
+
"net.serverCloseBind": { argTypes: [NETSERVER_T], result: VOID },
|
|
2004
|
+
"net.serverSetCloseOverride": { argTypes: [NETSERVER_T, null], result: VOID },
|
|
2005
|
+
// The piped-output stream reads: `Readable | null` unions (the libCall
|
|
2006
|
+
// case checks the arms — the child.pid pattern with a ref arm).
|
|
2007
|
+
/** The piped-output streams (stdio mode 3 — scr_child.c's stream
|
|
2008
|
+
* slice). child.stdout/child.stderr answer the checker's
|
|
2009
|
+
* `Readable | null` union (type-directed construction in the backend
|
|
2010
|
+
* over the +1-or-NULL runtime pair — the child.pid pattern with a ref
|
|
2011
|
+
* arm). stream.onData/onEnd register 'data'/'end' listeners (receiver
|
|
2012
|
+
* borrowed, CALLBACK MOVES, trailing once-flag, void — chaining
|
|
2013
|
+
* fenced): 'data' fires one Buffer chunk per read (zero-param and
|
|
2014
|
+
* Buffer/string adapters are runtime-provided; setEncoding threads
|
|
2015
|
+
* split multibyte sequences through the shared StringDecoder core. A
|
|
2016
|
+
* union-param listener —
|
|
2017
|
+
* ngrok's `Buffer | string` — gets a compiler-emitted adapter wrapping
|
|
2018
|
+
* the chunk at its Buffer arm), 'end' fires once at EOF, always BEFORE
|
|
2019
|
+
* the child's 'exit' (the pinned ordering). A flowing stream keeps the
|
|
2020
|
+
* loop alive: usesTimers. */
|
|
2021
|
+
"child.stdout": { argTypes: [CHILD_T], result: VOID },
|
|
2022
|
+
"child.stderr": { argTypes: [CHILD_T], result: VOID },
|
|
2023
|
+
/** The piped-input writer (stdio mode 3 on fd 0). child.stdin answers
|
|
2024
|
+
* `Writable | null`; writes copy borrowed data into the nonblocking
|
|
2025
|
+
* queue, end/destroy settle it, writable is a pure state read, and
|
|
2026
|
+
* listener callbacks move into the writer registry. */
|
|
2027
|
+
"child.stdin": { argTypes: [CHILD_T], result: VOID },
|
|
2028
|
+
// Listener registrations: callback func shapes are program-dependent
|
|
2029
|
+
// (zero-param / Buffer / Buffer-armed union) — the slots pin arity,
|
|
2030
|
+
// the stream receiver, and the once-flag.
|
|
2031
|
+
"stream.onData": { argTypes: [CHILDSTREAM_T, null, BOOL], result: VOID },
|
|
2032
|
+
"stream.onDataStr": { argTypes: [CHILDSTREAM_T, null, BOOL], result: VOID },
|
|
2033
|
+
"stream.onEnd": { argTypes: [CHILDSTREAM_T, null, BOOL], result: VOID },
|
|
2034
|
+
"stream.childSetEncoding": { argTypes: [CHILDSTREAM_T, STRING], result: CHILDSTREAM_T },
|
|
2035
|
+
"writer.writeString": { argTypes: [CHILDWRITER_T, STRING], result: BOOL },
|
|
2036
|
+
"writer.writeBytes": { argTypes: [CHILDWRITER_T, BYTES_U8], result: BOOL },
|
|
2037
|
+
"writer.end": { argTypes: [CHILDWRITER_T], result: VOID },
|
|
2038
|
+
"writer.destroy": { argTypes: [CHILDWRITER_T], result: VOID },
|
|
2039
|
+
"writer.writable": { argTypes: [CHILDWRITER_T], result: BOOL },
|
|
2040
|
+
"writer.onDrain": { argTypes: [CHILDWRITER_T, null, BOOL], result: VOID },
|
|
2041
|
+
"writer.onFinish": { argTypes: [CHILDWRITER_T, null, BOOL], result: VOID },
|
|
2042
|
+
"writer.onError": { argTypes: [CHILDWRITER_T, null, BOOL], result: VOID },
|
|
2043
|
+
/** The first-class WritableStream write (`output.write(line)` — the
|
|
2044
|
+
* prefixStream idiom): the receiver IS the fd scalar (process.stdout/
|
|
2045
|
+
* stderr reads mint 1/2), dispatched onto the exact stdoutWrite/
|
|
2046
|
+
* stderrWrite paths so buffering and ordering stay identical. Data
|
|
2047
|
+
* borrowed; the bool is Node's always-true backpressure signal. */
|
|
2048
|
+
"procStream.write": { argTypes: [PROCSTREAM_T, STRING], result: BOOL },
|
|
2049
|
+
"child.killed": { argTypes: [CHILD_T], result: BOOL },
|
|
2050
|
+
"child.kill": { argTypes: [CHILD_T, STRING], result: BOOL },
|
|
2051
|
+
"child.killNum": { argTypes: [CHILD_T, F64], result: BOOL },
|
|
2052
|
+
"child.unref": { argTypes: [CHILD_T], result: VOID },
|
|
2053
|
+
"child.ref": { argTypes: [CHILD_T], result: VOID },
|
|
2054
|
+
"spawnRes.stdout": { argTypes: [SPAWNRES_T], result: STRING },
|
|
2055
|
+
"spawnRes.stderr": { argTypes: [SPAWNRES_T], result: STRING },
|
|
2056
|
+
/** fs/promises (scr_lib.c over scr_async.c's settled minting): the SAME
|
|
2057
|
+
* sync syscalls, wrapped in an ALREADY-SETTLED promise — failure
|
|
2058
|
+
* REJECTS (catchable at the await) instead of throwing, so none of
|
|
2059
|
+
* these are in the may-throw seed. readFile is utf8-fenced like
|
|
2060
|
+
* readFileSync. The non-interleaving divergence is documented in
|
|
2061
|
+
* SEMANTICS.md. */
|
|
2062
|
+
/** node:crypto randomness: randomUUID plus randomBytes as either a real
|
|
2063
|
+
* Buffer or the fused randomBytes(n).toString("hex"|"base64") path.
|
|
2064
|
+
* The size-taking forms throw Node's RangeError on invalid values. */
|
|
2065
|
+
"crypto.randomUUID": { argTypes: [], result: STRING },
|
|
2066
|
+
"crypto.randomBytesToString": { argTypes: [F64, STRING], result: STRING },
|
|
2067
|
+
/** crypto.randomBytes(n) → a real u8 Buffer (+1). THROWS Node's
|
|
2068
|
+
* RangeError on out-of-range sizes, exactly like the composed
|
|
2069
|
+
* randomBytesToString (which keeps its one-libCall lowering — the two
|
|
2070
|
+
* coexist: the composed form never materializes the Buffer). */
|
|
2071
|
+
"crypto.randomBytes": { argTypes: [F64], result: BYTES_U8 },
|
|
2072
|
+
/** The fused createHash(alg).update(data).digest(enc) fast path and the
|
|
2073
|
+
* one-shot crypto.hash implementation. First-class Hash/Hmac handles use
|
|
2074
|
+
* the entries below; all paths share the incremental runtime core. */
|
|
2075
|
+
"crypto.hashDigestStr": { argTypes: [STRING, STRING, STRING], result: STRING },
|
|
2076
|
+
"crypto.hashDigestBytes": { argTypes: [STRING, BYTES_U8, STRING], result: STRING },
|
|
2077
|
+
/** First-class static Hash/Hmac handles. Constructors validate the
|
|
2078
|
+
* runtime algorithm string (MD5, SHA-1, or SHA-2); update returns the same
|
|
2079
|
+
* handle by retained identity, copy snapshots Hash state, and digest
|
|
2080
|
+
* finalizes the handle and returns either a Buffer or encoded string. */
|
|
2081
|
+
"crypto.native": { argTypes: [], result: DYN },
|
|
2082
|
+
"crypto.hashNew": { argTypes: [STRING], result: CRYPTOHASH_T },
|
|
2083
|
+
"crypto.hmacNewStr": { argTypes: [STRING, STRING], result: CRYPTOHMAC_T },
|
|
2084
|
+
"crypto.hmacNewBytes": { argTypes: [STRING, BYTES_U8], result: CRYPTOHMAC_T },
|
|
2085
|
+
"crypto.hashUpdateStr": { argTypes: [CRYPTOHASH_T, STRING], result: CRYPTOHASH_T },
|
|
2086
|
+
"crypto.hashUpdateBytes": { argTypes: [CRYPTOHASH_T, BYTES_U8], result: CRYPTOHASH_T },
|
|
2087
|
+
"crypto.hmacUpdateStr": { argTypes: [CRYPTOHMAC_T, STRING], result: CRYPTOHMAC_T },
|
|
2088
|
+
"crypto.hmacUpdateBytes": { argTypes: [CRYPTOHMAC_T, BYTES_U8], result: CRYPTOHMAC_T },
|
|
2089
|
+
"crypto.hashCopy": { argTypes: [CRYPTOHASH_T], result: CRYPTOHASH_T },
|
|
2090
|
+
"crypto.hashDigestString": { argTypes: [CRYPTOHASH_T, STRING], result: STRING },
|
|
2091
|
+
"crypto.hashDigestBuffer": { argTypes: [CRYPTOHASH_T], result: BYTES_U8 },
|
|
2092
|
+
"crypto.hmacDigestString": { argTypes: [CRYPTOHMAC_T, STRING], result: STRING },
|
|
2093
|
+
"crypto.hmacDigestBuffer": { argTypes: [CRYPTOHMAC_T], result: BYTES_U8 },
|
|
2094
|
+
"crypto.timingSafeEqual": { argTypes: [BYTES_U8, BYTES_U8], result: BOOL },
|
|
2095
|
+
"crypto.randomFill": { argTypes: [BYTES_U8, F64, F64], result: BYTES_U8 },
|
|
2096
|
+
"crypto.randomFillRest": { argTypes: [BYTES_U8, F64], result: BYTES_U8 },
|
|
2097
|
+
"crypto.randomInt": { argTypes: [F64, F64], result: F64 },
|
|
2098
|
+
"crypto.pbkdf2": { argTypes: [BYTES_U8, BYTES_U8, F64, F64, STRING], result: BYTES_U8 },
|
|
2099
|
+
"crypto.randomBytesCb": { argTypes: [F64, null], result: VOID },
|
|
2100
|
+
"crypto.pbkdf2Cb": { argTypes: [BYTES_U8, BYTES_U8, F64, F64, STRING, null], result: VOID },
|
|
2101
|
+
"crypto.hkdf": { argTypes: [STRING, BYTES_U8, BYTES_U8, BYTES_U8, F64], result: DYN },
|
|
2102
|
+
"crypto.hkdfCb": { argTypes: [STRING, BYTES_U8, BYTES_U8, BYTES_U8, F64, null], result: VOID },
|
|
2103
|
+
"crypto.scrypt": { argTypes: [BYTES_U8, BYTES_U8, F64, DYN], result: BYTES_U8 },
|
|
2104
|
+
"crypto.scryptCb": { argTypes: [BYTES_U8, BYTES_U8, F64, DYN, null], result: VOID },
|
|
2105
|
+
// The Buffer statics and the fs/zlib Buffer forms: fixed always-u8
|
|
2106
|
+
// signatures (Buffer IS a Uint8Array — one bytes kind).
|
|
2107
|
+
/** The Buffer statics with fixed (always-u8) signatures. fromStr is
|
|
2108
|
+
* `Buffer.from(string, enc)` — the frontend completes an omitted
|
|
2109
|
+
* encoding to "utf8" and fences non-literal/unsupported ones; hex and
|
|
2110
|
+
* base64 decode Node-leniently, so it never throws. concat takes ONE
|
|
2111
|
+
* bytes<u8>[] arg (the list) and returns a fresh copy. `Buffer.from(u8)`
|
|
2112
|
+
* and `Buffer.alloc(n)` need no libFn — they lower to bytesNew. */
|
|
2113
|
+
"buffer.fromStr": { argTypes: [STRING, STRING], result: BYTES_U8 },
|
|
2114
|
+
"buffer.fromStrChecked": { argTypes: [STRING, STRING], result: BYTES_U8 },
|
|
2115
|
+
"buffer.brand": { argTypes: [BYTES_U8], result: BYTES_U8 },
|
|
2116
|
+
/** Buffer.from on checked-native strings, bytes, arrays and data-only
|
|
2117
|
+
* array-like/Buffer-JSON objects. The encoding is a normalized literal;
|
|
2118
|
+
* non-string inputs ignore it. Copies the input and may throw during
|
|
2119
|
+
* element coercion or argument validation. Custom object valueOf and
|
|
2120
|
+
* opaque reference inputs retain explicit runtime refusals. */
|
|
2121
|
+
"buffer.fromDyn": { argTypes: [DYN, STRING], result: BYTES_U8 },
|
|
2122
|
+
"buffer.concat": { argTypes: [arrayOf(BYTES_U8)], result: BYTES_U8 },
|
|
2123
|
+
/** Buffer.byteLength(string, enc) — enc a NORMALIZED literal like
|
|
2124
|
+
* fromStr's — and Buffer.isEncoding(name) over a runtime string
|
|
2125
|
+
* (case-insensitive against Node's alias set). Pure; never throw. */
|
|
2126
|
+
"buffer.byteLenDyn": { argTypes: [DYN, STRING], result: F64 },
|
|
2127
|
+
"buffer.byteLenStr": { argTypes: [STRING, STRING], result: F64 },
|
|
2128
|
+
"buffer.isEncoding": { argTypes: [STRING], result: BOOL },
|
|
2129
|
+
/** Buffer.concat(list, totalLength): the concatenation truncated or
|
|
2130
|
+
* zero-padded to the total. THROWS Node's 'length' RangeError on a
|
|
2131
|
+
* negative/non-integer total (may-throw seed). */
|
|
2132
|
+
"buffer.concatLen": { argTypes: [arrayOf(BYTES_U8), F64], result: BYTES_U8 },
|
|
2133
|
+
// The checked-dynamic compare/equals validators (Node's argument
|
|
2134
|
+
// ladders over dyn-boxed invalid-input probes).
|
|
2135
|
+
/** The checked-dynamic compare/equals validators (scr_bytes_io.c) —
|
|
2136
|
+
* the lowered form when an argument is NOT statically bytes<u8> (the
|
|
2137
|
+
* invalid-input probes; a dyn from an untyped JS helper): Node's own
|
|
2138
|
+
* argument ladders run at runtime — ERR_INVALID_ARG_TYPE with the
|
|
2139
|
+
* API's argument name ("buf1"/"buf2", "otherBuffer", "target"; offsets
|
|
2140
|
+
* "of type number"), validateOffset's ERR_OUT_OF_RANGE for bad
|
|
2141
|
+
* numbers, undefined offsets taking their Node defaults — and a
|
|
2142
|
+
* well-typed value still computes the real answer. All args borrowed
|
|
2143
|
+
* dyn; compareChk's four offset slots pass the undefined dyn when
|
|
2144
|
+
* syntactically absent. May-throw seeds. */
|
|
2145
|
+
"buffer.compareChk": { argTypes: [DYN, DYN], result: F64 },
|
|
2146
|
+
"bytes.equalsChk": { argTypes: [BYTES_U8, DYN], result: BOOL },
|
|
2147
|
+
"bytes.compareChk": { argTypes: [BYTES_U8, DYN, DYN, DYN, DYN, DYN], result: F64 },
|
|
2148
|
+
/** The deprecated `new Buffer(number, 'enc')` string-arm rejection:
|
|
2149
|
+
* always throws Node's ERR_INVALID_ARG_TYPE ("The \"string\" argument
|
|
2150
|
+
* must be of type string. Received ..."). Borrowed dyn; may-throw. */
|
|
2151
|
+
"buffer.newStringFail": { argTypes: [DYN], result: BYTES_U8 },
|
|
2152
|
+
/** fs._toUnixTimestamp(time) over a dyn value: numeric strings and
|
|
2153
|
+
* finite numbers coerce (negatives answer now/1000, Node's shape);
|
|
2154
|
+
* everything else throws Node's ERR_INVALID_ARG_TYPE. May-throw. */
|
|
2155
|
+
"fs.toUnixTimestamp": { argTypes: [DYN], result: F64 },
|
|
2156
|
+
/** The fs argument-validation ladders (checked-dynamic lane): each Chk
|
|
2157
|
+
* replicates its API's Node-order validation over dyn values (Node's
|
|
2158
|
+
* exact typed errors — ERR_INVALID_ARG_TYPE/VALUE, ERR_OUT_OF_RANGE),
|
|
2159
|
+
* and a full pass meets the trailing compiler-rendered SC2020 fence
|
|
2160
|
+
* string — so the ALWAYS-THROW forms take the error.nodeThrow
|
|
2161
|
+
* polymorphic-result carve-out. mkdtempSyncChk and the lchmod sync/
|
|
2162
|
+
* promise pair run the REAL operation on a validated pass instead
|
|
2163
|
+
* (macOS lchmod(2); non-APPLE answers Node's not-a-function /
|
|
2164
|
+
* ERR_METHOD_NOT_IMPLEMENTED shapes). May-throw seeds, all of them. */
|
|
2165
|
+
"fs.existsChk": { argTypes: [DYN, DYN], result: DYN },
|
|
2166
|
+
"fs.mkdtempChk": { argTypes: [DYN, DYN, STRING], result: VOID },
|
|
2167
|
+
"fs.mkdtempSyncChk": { argTypes: [DYN, DYN, STRING], result: STRING },
|
|
2168
|
+
"fs.readFileChk": { argTypes: [DYN, DYN, DYN, STRING], result: VOID },
|
|
2169
|
+
"fs.opendirChk": { argTypes: [DYN, DYN, STRING], result: VOID },
|
|
2170
|
+
"fs.watchFileChk": { argTypes: [DYN, DYN, STRING], result: VOID },
|
|
2171
|
+
"fs.lchmodChk": { argTypes: [DYN, DYN, DYN, STRING], result: VOID },
|
|
2172
|
+
"fs.lchmodSyncChk": { argTypes: [DYN, DYN], result: DYN },
|
|
2173
|
+
"fsp.lchmodChk": { argTypes: [DYN, DYN], result: { kind: "promise", inner: VOID } },
|
|
2174
|
+
"fs.readChk": { argTypes: [DYN, DYN, DYN, DYN, DYN, STRING], result: VOID },
|
|
2175
|
+
"fs.streamOptsChk": { argTypes: [DYN, DYN, STRING], result: VOID },
|
|
2176
|
+
/** The compiler-resolved ERR_INVALID_ARG_TYPE throw with a RUNTIME-
|
|
2177
|
+
* rendered Received tail: args [argname, "of type ..." clause, the
|
|
2178
|
+
* offending dyn value]. ALWAYS THROWS; polymorphic result (the
|
|
2179
|
+
* error.nodeThrow pattern). May-throw seed. */
|
|
2180
|
+
"error.argTypeThrow": { argTypes: [STRING, STRING, DYN], result: VOID },
|
|
2181
|
+
/** The property flavor of argTypeThrow ("The \"options.x\" property
|
|
2182
|
+
* must be ..."): the option-bag ladders' provably-invalid arms. ALWAYS
|
|
2183
|
+
* THROWS; polymorphic result. May-throw seed. */
|
|
2184
|
+
"error.propTypeThrow": { argTypes: [STRING, STRING, DYN], result: VOID },
|
|
2185
|
+
/** The checked-dynamic max-listeners ladders: setMaxChk is the
|
|
2186
|
+
* instance form over a dyn n (non-numbers ERR_INVALID_ARG_TYPE,
|
|
2187
|
+
* negatives/NaN ERR_OUT_OF_RANGE; +1 receiver back — chaining);
|
|
2188
|
+
* setDefaultMaxChk is the static/property form, its second argument
|
|
2189
|
+
* naming the message slot ("setMaxListeners" for the static call,
|
|
2190
|
+
* "defaultMaxListeners" for the module-property assignment). */
|
|
2191
|
+
"emitter.setMaxChk": { argTypes: [null, DYN], result: VOID },
|
|
2192
|
+
"emitter.setDefaultMaxChk": { argTypes: [DYN, STRING], result: VOID },
|
|
2193
|
+
/** The Buffer forms of fs: readFileSync(path) with NO
|
|
2194
|
+
* encoding → bytes<u8> (+1), writeFileSync/appendFileSync(path, bytes), and the
|
|
2195
|
+
* fs/promises readFile(path) no-encoding form (an already-settled
|
|
2196
|
+
* promise, rejecting on failure like the other fsp members). The sync
|
|
2197
|
+
* forms THROW catchably on failure exactly like the utf8 forms. */
|
|
2198
|
+
"fs.readFileSyncBytes": { argTypes: [STRING], result: BYTES_U8 },
|
|
2199
|
+
"fs.writeFileSyncBytes": { argTypes: [STRING, BYTES_U8], result: VOID },
|
|
2200
|
+
"fs.appendFileSyncBytes": { argTypes: [STRING, BYTES_U8], result: VOID },
|
|
2201
|
+
"fsp.readFileBytes": { argTypes: [STRING], result: { kind: "promise", inner: BYTES_U8 } },
|
|
2202
|
+
/** node:zlib (scr_zlib.c — native-toolchain.ts compiles/links it ONLY when these
|
|
2203
|
+
* appear on the IR, the regex/libcurl gating precedent): one-shot zlib,
|
|
2204
|
+
* raw-DEFLATE, gzip, and auto-detect codecs over u8 bytes with Node's
|
|
2205
|
+
* default options, or a validated literal compression level from -1 to 9.
|
|
2206
|
+
* Compression never throws (OOM aborts); decompression
|
|
2207
|
+
* of corrupt input THROWS Node's error catchably. */
|
|
2208
|
+
"zlib.deflateSync": { argTypes: [BYTES_U8], result: BYTES_U8 },
|
|
2209
|
+
"zlib.inflateSync": { argTypes: [BYTES_U8], result: BYTES_U8 },
|
|
2210
|
+
"zlib.deflateRawSync": { argTypes: [BYTES_U8], result: BYTES_U8 },
|
|
2211
|
+
/** bytes, mode (0 zlib / 1 raw / 2 gzip), validated compression level. */
|
|
2212
|
+
"zlib.deflateLevelSync": { argTypes: [BYTES_U8, F64, F64], result: BYTES_U8 },
|
|
2213
|
+
"zlib.inflateRawSync": { argTypes: [BYTES_U8], result: BYTES_U8 },
|
|
2214
|
+
"zlib.gzipSync": { argTypes: [BYTES_U8], result: BYTES_U8 },
|
|
2215
|
+
"zlib.gunzipSync": { argTypes: [BYTES_U8], result: BYTES_U8 },
|
|
2216
|
+
"zlib.unzipSync": { argTypes: [BYTES_U8], result: BYTES_U8 },
|
|
2217
|
+
/** The default-options callback twins run on the executable's shared
|
|
2218
|
+
* native work pool and deliver (Error | null, Buffer) on a later loop
|
|
2219
|
+
* turn. crc32 validates its optional uint32 seed synchronously. */
|
|
2220
|
+
"zlib.deflateCb": { argTypes: [BYTES_U8, null], result: VOID },
|
|
2221
|
+
"zlib.inflateCb": { argTypes: [BYTES_U8, null], result: VOID },
|
|
2222
|
+
"zlib.deflateRawCb": { argTypes: [BYTES_U8, null], result: VOID },
|
|
2223
|
+
"zlib.inflateRawCb": { argTypes: [BYTES_U8, null], result: VOID },
|
|
2224
|
+
"zlib.gzipCb": { argTypes: [BYTES_U8, null], result: VOID },
|
|
2225
|
+
"zlib.gunzipCb": { argTypes: [BYTES_U8, null], result: VOID },
|
|
2226
|
+
"zlib.unzipCb": { argTypes: [BYTES_U8, null], result: VOID },
|
|
2227
|
+
"zlib.crc32": { argTypes: [BYTES_U8, F64], result: F64 },
|
|
2228
|
+
/** The Buffer overloads of the raw stream writes — same promptly
|
|
2229
|
+
* submitted streams as process.stdoutWrite/stderrWrite, constantly true.
|
|
2230
|
+
* The encoding arg is evaluated but ignored for bytes, like Node. The Cb
|
|
2231
|
+
* forms move their program-shaped completion callback to the tick queue. */
|
|
2232
|
+
"process.stdoutWriteBytes": { argTypes: [BYTES_U8, STRING], result: BOOL },
|
|
2233
|
+
"process.stderrWriteBytes": { argTypes: [BYTES_U8, STRING], result: BOOL },
|
|
2234
|
+
// Completion callback is program-dependent: zero params, checked-dynamic,
|
|
2235
|
+
// or an optional Error | null slot (same success shape as fs.rename).
|
|
2236
|
+
"process.stdoutWriteBytesCb": { argTypes: [BYTES_U8, STRING, null], result: BOOL },
|
|
2237
|
+
"process.stderrWriteBytesCb": { argTypes: [BYTES_U8, STRING, null], result: BOOL },
|
|
2238
|
+
"fsp.readFile": { argTypes: [STRING, STRING], result: { kind: "promise", inner: STRING } },
|
|
2239
|
+
"fsp.writeFile": { argTypes: [STRING, STRING], result: { kind: "promise", inner: VOID } },
|
|
2240
|
+
/** fs.promises.writeFile(path, data, { mode }): the settled-promise
|
|
2241
|
+
* twin of fs.writeFileModeSync. */
|
|
2242
|
+
"fsp.writeFileMode": {
|
|
2243
|
+
argTypes: [STRING, STRING, F64],
|
|
2244
|
+
result: { kind: "promise", inner: VOID },
|
|
2245
|
+
},
|
|
2246
|
+
"fsp.mkdir": { argTypes: [STRING], result: { kind: "promise", inner: VOID } },
|
|
2247
|
+
/** The fs/promises option/member tail the certs pipeline uses: mkdir's
|
|
2248
|
+
* literal { recursive?, mode? } options (the mkdirSync matrix behind
|
|
2249
|
+
* settled promises), unlink, chmod. Failures REJECT (catchable at the
|
|
2250
|
+
* await), like the rest of the fsp family. */
|
|
2251
|
+
"fsp.mkdirMode": { argTypes: [STRING, F64], result: { kind: "promise", inner: VOID } },
|
|
2252
|
+
"fsp.mkdirRecursive": { argTypes: [STRING], result: { kind: "promise", inner: VOID } },
|
|
2253
|
+
"fsp.mkdirRecursiveMode": { argTypes: [STRING, F64], result: { kind: "promise", inner: VOID } },
|
|
2254
|
+
"fsp.unlink": { argTypes: [STRING], result: { kind: "promise", inner: VOID } },
|
|
2255
|
+
"fsp.chmod": { argTypes: [STRING, F64], result: { kind: "promise", inner: VOID } },
|
|
2256
|
+
"fsp.link": { argTypes: [DYN, DYN], result: { kind: "promise", inner: VOID } },
|
|
2257
|
+
"fsp.symlink": { argTypes: [DYN, DYN, DYN], result: { kind: "promise", inner: VOID } },
|
|
2258
|
+
"fsp.readlink": { argTypes: [DYN, DYN], result: { kind: "promise", inner: DYN } },
|
|
2259
|
+
"fsp.statfs": { argTypes: [DYN, DYN], result: { kind: "promise", inner: DYN } },
|
|
2260
|
+
"fsp.readlinkStr": { argTypes: [DYN, DYN], result: { kind: "promise", inner: STRING } },
|
|
2261
|
+
"fsp.readlinkBuffer": { argTypes: [DYN, DYN], result: { kind: "promise", inner: BYTES_U8 } },
|
|
2262
|
+
"fsp.utimes": { argTypes: [DYN, DYN, DYN], result: { kind: "promise", inner: VOID } },
|
|
2263
|
+
"fsp.lutimes": { argTypes: [DYN, DYN, DYN], result: { kind: "promise", inner: VOID } },
|
|
2264
|
+
"fsp.rename": { argTypes: [STRING, STRING], result: { kind: "promise", inner: VOID } },
|
|
2265
|
+
"fsp.readdir": { argTypes: [STRING], result: { kind: "promise", inner: arrayOf(STRING) } },
|
|
2266
|
+
// Result is promise<call-site Dirent record array>; the libCall case
|
|
2267
|
+
// validates the program-dependent record shape in validate.ts.
|
|
2268
|
+
/** `fs.promises.readdir(path, { withFileTypes: true })` — the settled-
|
|
2269
|
+
* promise twin of fs.readdirTypesSync. The backends assemble the same
|
|
2270
|
+
* call-site-shaped Dirent rows, then move the array into a promise;
|
|
2271
|
+
* scandir failure becomes its rejection. */
|
|
2272
|
+
"fsp.readdirTypes": { argTypes: [STRING], result: { kind: "promise", inner: VOID } },
|
|
2273
|
+
"fsp.rm": { argTypes: [STRING], result: { kind: "promise", inner: VOID } },
|
|
2274
|
+
"fsp.stat": { argTypes: [STRING], result: { kind: "promise", inner: STATS_T } },
|
|
2275
|
+
"fsp.realpath": { argTypes: [STRING], result: { kind: "promise", inner: STRING } },
|
|
2276
|
+
"fsp.lstat": { argTypes: [STRING], result: { kind: "promise", inner: STATS_T } },
|
|
2277
|
+
/** fs/promises.open and the statically represented FileHandle surface.
|
|
2278
|
+
* Every operation returns an already-settled promise; syscall failures
|
|
2279
|
+
* become rejections rather than escaping synchronously. read/write
|
|
2280
|
+
* results are call-site record shapes ({ bytesRead/bytesWritten,
|
|
2281
|
+
* buffer }) assembled by the backends around the fixed runtime ABI. */
|
|
2282
|
+
"fsp.open": { argTypes: [STRING, STRING, F64], result: { kind: "promise", inner: FILEHANDLE_T } },
|
|
2283
|
+
"fileHandle.fd": { argTypes: [FILEHANDLE_T], result: F64 },
|
|
2284
|
+
"fileHandle.close": { argTypes: [FILEHANDLE_T], result: { kind: "promise", inner: VOID } },
|
|
2285
|
+
"fileHandle.sync": { argTypes: [FILEHANDLE_T], result: { kind: "promise", inner: VOID } },
|
|
2286
|
+
"fileHandle.datasync": { argTypes: [FILEHANDLE_T], result: { kind: "promise", inner: VOID } },
|
|
2287
|
+
"fileHandle.truncate": {
|
|
2288
|
+
argTypes: [FILEHANDLE_T, F64],
|
|
2289
|
+
result: { kind: "promise", inner: VOID },
|
|
2290
|
+
},
|
|
2291
|
+
"fileHandle.chmod": { argTypes: [FILEHANDLE_T, F64], result: { kind: "promise", inner: VOID } },
|
|
2292
|
+
"fileHandle.utimes": {
|
|
2293
|
+
argTypes: [FILEHANDLE_T, DYN, DYN],
|
|
2294
|
+
result: { kind: "promise", inner: VOID },
|
|
2295
|
+
},
|
|
2296
|
+
"fileHandle.readv": {
|
|
2297
|
+
argTypes: [FILEHANDLE_T, arrayOf(BYTES_U8), F64],
|
|
2298
|
+
result: { kind: "promise", inner: VOID },
|
|
2299
|
+
},
|
|
2300
|
+
"fileHandle.writev": {
|
|
2301
|
+
argTypes: [FILEHANDLE_T, arrayOf(BYTES_U8), F64],
|
|
2302
|
+
result: { kind: "promise", inner: VOID },
|
|
2303
|
+
},
|
|
2304
|
+
// read/write carry call-site result record shapes; the validator checks
|
|
2305
|
+
// those in validate.ts, so promise<void> is only a table sentinel.
|
|
2306
|
+
"fileHandle.read": {
|
|
2307
|
+
argTypes: [FILEHANDLE_T, BYTES_U8, F64, F64, F64, BOOL],
|
|
2308
|
+
result: { kind: "promise", inner: VOID },
|
|
2309
|
+
},
|
|
2310
|
+
"fileHandle.writeBytes": {
|
|
2311
|
+
argTypes: [FILEHANDLE_T, BYTES_U8, F64, F64, F64, BOOL],
|
|
2312
|
+
result: { kind: "promise", inner: VOID },
|
|
2313
|
+
},
|
|
2314
|
+
"fileHandle.writeStr": {
|
|
2315
|
+
argTypes: [FILEHANDLE_T, STRING, F64, STRING],
|
|
2316
|
+
result: { kind: "promise", inner: VOID },
|
|
2317
|
+
},
|
|
2318
|
+
"fileHandle.readFile": {
|
|
2319
|
+
argTypes: [FILEHANDLE_T, STRING],
|
|
2320
|
+
result: { kind: "promise", inner: STRING },
|
|
2321
|
+
},
|
|
2322
|
+
"fileHandle.readFileBytes": {
|
|
2323
|
+
argTypes: [FILEHANDLE_T, STRING],
|
|
2324
|
+
result: { kind: "promise", inner: BYTES_U8 },
|
|
2325
|
+
},
|
|
2326
|
+
"fileHandle.writeFile": {
|
|
2327
|
+
argTypes: [FILEHANDLE_T, STRING, STRING],
|
|
2328
|
+
result: { kind: "promise", inner: VOID },
|
|
2329
|
+
},
|
|
2330
|
+
"fileHandle.writeFileBytes": {
|
|
2331
|
+
argTypes: [FILEHANDLE_T, BYTES_U8, STRING],
|
|
2332
|
+
result: { kind: "promise", inner: VOID },
|
|
2333
|
+
},
|
|
2334
|
+
"fileHandle.stat": { argTypes: [FILEHANDLE_T], result: { kind: "promise", inner: STATS_T } },
|
|
2335
|
+
"process.argv": { argTypes: [], result: arrayOf(STRING) },
|
|
2336
|
+
"process.platform": { argTypes: [], result: STRING },
|
|
2337
|
+
// The one libCall whose result type is program-dependent (union ids are
|
|
2338
|
+
// per-module): the `result` here is a placeholder — the libCall case
|
|
2339
|
+
// checks the union's ARMS ([string, undefinedT] in canonical order)
|
|
2340
|
+
// against the module's registry instead.
|
|
2341
|
+
/** getenv(3): one string key arg → the interned `string | undefined`
|
|
2342
|
+
* union (present: +1 string wrapped into the string arm; absent: the
|
|
2343
|
+
* interned undefined-arm instance). BOTH source forms — `process.env.FOO`
|
|
2344
|
+
* and `process.env[expr]` — lower here. Purely static; never throws. */
|
|
2345
|
+
"process.envGet": { argTypes: [STRING], result: VOID },
|
|
2346
|
+
/** setenv(3): (name, value) string args → void. Later envGet reads and
|
|
2347
|
+
* spawned children observe the write, like Node (values are strings —
|
|
2348
|
+
* the frontend fences non-string RHS). Never throws. */
|
|
2349
|
+
"process.envSet": { argTypes: [STRING, STRING], result: VOID },
|
|
2350
|
+
/** `delete process.env[NAME]` — unsetenv(3): the mutation is visible to
|
|
2351
|
+
* every later read (process.envGet asks getenv fresh) and inherited by
|
|
2352
|
+
* spawned children, exactly Node. Statement position only (JS's boolean
|
|
2353
|
+
* result is constant true there). Borrows the name; never throws. */
|
|
2354
|
+
"process.envUnset": { argTypes: [STRING], result: VOID },
|
|
2355
|
+
/** The whole environment as alternating [k0, v0, k1, v1, ...] strings in
|
|
2356
|
+
* environ order — the raw material of the process.env SNAPSHOT record
|
|
2357
|
+
* (the frontend's interned %env.snapshot helper keyed-writes the pairs
|
|
2358
|
+
* into a fresh `{ [k: string]: string | undefined }` record). Fresh +1
|
|
2359
|
+
* array; never throws. */
|
|
2360
|
+
"process.envPairs": { argTypes: [], result: arrayOf(STRING) },
|
|
2361
|
+
"process.exit": { argTypes: [F64], result: VOID },
|
|
2362
|
+
/** Numeric process.exitCode write (integer validation, implicit exit status). */
|
|
2363
|
+
"process.setExitCode": { argTypes: [F64], result: VOID },
|
|
2364
|
+
/** The code for process.exit() with no argument, or zero when unset. */
|
|
2365
|
+
"process.currentExitCode": { argTypes: [], result: F64 },
|
|
2366
|
+
"process.cwd": { argTypes: [], result: STRING },
|
|
2367
|
+
/** getpid(2) / getuid(2): zero args → f64. POSIX-only target, so both
|
|
2368
|
+
* always answer (the checker's `getuid?` optionality covers Windows —
|
|
2369
|
+
* `process.getuid?.()` lowers as the plain call). Never throw. */
|
|
2370
|
+
"process.pid": { argTypes: [], result: F64 },
|
|
2371
|
+
"dyn.this": { argTypes: [], result: DYN },
|
|
2372
|
+
"dyn.generatorThis": { argTypes: [], result: DYN },
|
|
2373
|
+
"process.getuid": { argTypes: [], result: F64 },
|
|
2374
|
+
"process.getgid": { argTypes: [], result: F64 },
|
|
2375
|
+
/** process.execPath: the compiled binary's own resolved absolute path
|
|
2376
|
+
* (one interned string, +1 per read) — the honest answer where Node's
|
|
2377
|
+
* is the node executable's (SEMANTICS.md divergence 12). Never throws. */
|
|
2378
|
+
"process.execPath": { argTypes: [], result: STRING },
|
|
2379
|
+
/** process.arch: the compiled binary's OWN architecture ("arm64",
|
|
2380
|
+
* "x64") — Node's answer for its own build on the same machine.
|
|
2381
|
+
* Interned; +1 per read. Never throws. */
|
|
2382
|
+
"process.arch": { argTypes: [], result: STRING },
|
|
2383
|
+
/** Stable native version dictionary. node/openssl identify compatibility
|
|
2384
|
+
* targets; components absent from the native runtime are omitted. */
|
|
2385
|
+
"process.versions": { argTypes: [], result: DYN },
|
|
2386
|
+
"process.builtinId": { argTypes: [DYN, arrayOf(STRING)], result: STRING },
|
|
2387
|
+
"process.builtinModule": { argTypes: [STRING, DYN], result: DYN },
|
|
2388
|
+
"process.builtinUnsupported": { argTypes: [STRING, STRING], result: DYN },
|
|
2389
|
+
"fs.callbackValue": { argTypes: [STRING], result: DYN },
|
|
2390
|
+
"fs.callbackCall": { argTypes: [STRING, DYN], result: DYN },
|
|
2391
|
+
"process.hrtimeValue": { argTypes: [], result: DYN },
|
|
2392
|
+
/** process.versions.node: the runtime's Node COMPATIBILITY TARGET —
|
|
2393
|
+
* there is no Node under the binary, so this reports the version whose
|
|
2394
|
+
* semantics the runtime implements (SEMANTICS.md divergence 60, the
|
|
2395
|
+
* execPath stance). Interned; +1 per read. Never throws. */
|
|
2396
|
+
"process.versionsNode": { argTypes: [], result: STRING },
|
|
2397
|
+
"process.versionsOpenssl": { argTypes: [], result: STRING },
|
|
2398
|
+
/** kill(2) with Node's exact semantics and error shapes: the pid must be
|
|
2399
|
+
* an int32 (else the ERR_INVALID_ARG_TYPE TypeError text), the named
|
|
2400
|
+
* form resolves Node's signal-name table (unknown names throw the
|
|
2401
|
+
* ERR_UNKNOWN_SIGNAL TypeError), an omitted signal completes to
|
|
2402
|
+
* "SIGTERM" in the frontend, signal 0 probes, and a kill(2) failure
|
|
2403
|
+
* throws Node's `kill ESRCH`/`kill EPERM` Error. Result is Node's
|
|
2404
|
+
* constant true. */
|
|
2405
|
+
"process.kill": { argTypes: [F64, STRING], result: BOOL },
|
|
2406
|
+
"process.killNum": { argTypes: [F64, F64], result: BOOL },
|
|
2407
|
+
/** The raw byte writes: one borrowed string arg → bool (constantly true
|
|
2408
|
+
* — this synchronous runtime never queues backpressure). stdoutWrite
|
|
2409
|
+
* shares console.log's stream, each call is submitted promptly, and
|
|
2410
|
+
* interleaved output keeps source order. No newline, no formatting,
|
|
2411
|
+
* never throws. */
|
|
2412
|
+
"process.stdoutWrite": { argTypes: [STRING], result: BOOL },
|
|
2413
|
+
"process.stdio": { argTypes: [F64], result: DYN },
|
|
2414
|
+
"process.stderrWrite": { argTypes: [STRING], result: BOOL },
|
|
2415
|
+
// error.new's result and the receiver slots are builtin-error classes —
|
|
2416
|
+
// program-dependent object types, checked in the libCall case.
|
|
2417
|
+
/** The runtime-provided Error hierarchy's entry points (scr_error.c).
|
|
2418
|
+
* error.new: one borrowed string arg (the message), result an owned (+1)
|
|
2419
|
+
* builtin error instance — the result TYPE names which builtin class
|
|
2420
|
+
* (backends derive the runtime kind from it). error.ctor: the
|
|
2421
|
+
* super(message) call of an `extends Error` constructor — borrowed
|
|
2422
|
+
* receiver (already allocated by the derived class's new) + borrowed
|
|
2423
|
+
* message, void; the receiver's type names the builtin class whose name
|
|
2424
|
+
* field to stamp. error.toString: borrowed `%Error`-typed receiver, +1
|
|
2425
|
+
* string in Node's "name: message" shape. Formatting can invoke a user
|
|
2426
|
+
* message accessor, which can throw. */
|
|
2427
|
+
"error.new": { argTypes: [STRING], result: VOID },
|
|
2428
|
+
/** ECMAScript constructors with raw checked-dynamic message/options.
|
|
2429
|
+
* Options retain cause presence; constructor calls borrow their args.
|
|
2430
|
+
* Message coercion may throw before the cause is installed. */
|
|
2431
|
+
"error.newOptions": { argTypes: [DYN, DYN], result: VOID },
|
|
2432
|
+
"error.ctorOptions": { argTypes: [null, DYN, DYN], result: VOID },
|
|
2433
|
+
/** Borrowed Error receiver. cause returns an owned dyn value (undefined
|
|
2434
|
+
* when absent); hasCause distinguishes absence from present undefined. */
|
|
2435
|
+
"error.cause": { argTypes: [null], result: DYN },
|
|
2436
|
+
"error.hasCause": { argTypes: [null], result: BOOL },
|
|
2437
|
+
/** Assignment borrows both operands and retains the new cause. */
|
|
2438
|
+
"error.setCause": { argTypes: [null, DYN], result: VOID },
|
|
2439
|
+
"error.defineCause": { argTypes: [null, DYN], result: VOID },
|
|
2440
|
+
"error.deleteCause": { argTypes: [null], result: VOID },
|
|
2441
|
+
/** The compiler-resolved Node-parity throw for always-throwing lowered
|
|
2442
|
+
* arms (ERR_INVALID_THIS receivers, ERR_MISSING_ARGS arity ladders,
|
|
2443
|
+
* the symbol-to-string TypeError): args are [error-kind f64 (the
|
|
2444
|
+
* SCR_ERR_* index: 0 Error, 1 TypeError, 2 RangeError), code (empty =
|
|
2445
|
+
* no code slot), message]. ALWAYS THROWS catchably; the result type is
|
|
2446
|
+
* the replaced expression's own (never materialized — the
|
|
2447
|
+
* global.undefRead pattern). May-throw seed. */
|
|
2448
|
+
"error.nodeThrow": { argTypes: [F64, STRING, STRING], result: VOID },
|
|
2449
|
+
/** JS ToString over a dyn value WITH the object protocol (a user
|
|
2450
|
+
* toString/valueOf member is CALLED and its throw propagates;
|
|
2451
|
+
* exhaustion throws "Cannot convert object to primitive value"; units
|
|
2452
|
+
* render "null"/"undefined") — the WHATWG USVString conversions
|
|
2453
|
+
* (URLSearchParams names/values). Borrowed dyn; +1 string. May-throw. */
|
|
2454
|
+
"dyn.toStringCoerce": { argTypes: [DYN], result: STRING },
|
|
2455
|
+
"dyn.stringConstructor": { argTypes: [DYN], result: STRING },
|
|
2456
|
+
"dyn.propertyKey": { argTypes: [DYN], result: DYN },
|
|
2457
|
+
"dyn.toNumeric": { argTypes: [DYN], result: DYN },
|
|
2458
|
+
"dyn.increment": { argTypes: [DYN, BOOL], result: DYN },
|
|
2459
|
+
/** JS ToNumber over a dyn value WITH the object protocol (number-hint
|
|
2460
|
+
* valueOf/toString ordering; user throws propagate). Borrowed dyn;
|
|
2461
|
+
* f64 result, or a throw. Used by statically lowered numeric coercions
|
|
2462
|
+
* whose checker type remained any. */
|
|
2463
|
+
"dyn.numberConstructor": { argTypes: [DYN], result: F64 },
|
|
2464
|
+
"dyn.bigintConstructor": { argTypes: [DYN], result: BIGINT_T },
|
|
2465
|
+
"dyn.toNumberCoerce": { argTypes: [DYN], result: F64 },
|
|
2466
|
+
"dyn.add": { argTypes: [DYN, DYN], result: DYN },
|
|
2467
|
+
"dyn.arithmetic": { argTypes: [DYN, DYN, STRING], result: DYN },
|
|
2468
|
+
"dyn.compare": { argTypes: [DYN, DYN, STRING], result: BOOL },
|
|
2469
|
+
"dyn.bitwise": { argTypes: [DYN, DYN, STRING], result: DYN },
|
|
2470
|
+
"dyn.proxyNew": { argTypes: [DYN, DYN], result: DYN },
|
|
2471
|
+
// Always throws; the result is the READ's declared type (a typed dummy
|
|
2472
|
+
// the unwind abandons) — the libCall case skips the result check.
|
|
2473
|
+
/** A read of a `declare`d const NOTHING defines (the bundler-define
|
|
2474
|
+
* pattern — __VERSION__): always throws the catchable ReferenceError
|
|
2475
|
+
* Node raises at the access ("<name> is not defined"). args[0] is the
|
|
2476
|
+
* name; the result type is the read's declared type (a typed dummy the
|
|
2477
|
+
* unwind abandons — the value never exists). */
|
|
2478
|
+
"global.undefRead": { argTypes: [STRING], result: VOID },
|
|
2479
|
+
"console.native": { argTypes: [], result: DYN },
|
|
2480
|
+
/** A native reference to the global object; known names retain value fences. */
|
|
2481
|
+
"global.native": { argTypes: [arrayOf(STRING)], result: DYN },
|
|
2482
|
+
// `X.name` through a class value: the arg is a program-dependent
|
|
2483
|
+
// classval (a null slot; the libCall case checks the kind).
|
|
2484
|
+
/** `X.name` through a class VALUE (scr_object.c): args[0] is a borrowed
|
|
2485
|
+
* classval; the result is the class object's stored .name string,
|
|
2486
|
+
* retained (+1 — the string is an interned immortal, so the retain is a
|
|
2487
|
+
* no-op, kept for ownership uniformity). Never throws. A direct
|
|
2488
|
+
* `C.name` on the class name itself folds to a strLit instead. */
|
|
2489
|
+
"class.name": { argTypes: [null], result: STRING },
|
|
2490
|
+
"error.ctor": { argTypes: [null, STRING], result: VOID },
|
|
2491
|
+
"error.toString": { argTypes: [null], result: STRING },
|
|
2492
|
+
/** SameValue over checked values, including NaN, signed zero and reference identity. */
|
|
2493
|
+
"dyn.sameValue": { argTypes: [DYN, DYN], result: BOOL },
|
|
2494
|
+
"error.stack": { argTypes: [null], result: STRING },
|
|
2495
|
+
"error.stackLimitGet": { argTypes: [], result: F64 },
|
|
2496
|
+
"error.stackLimitSet": { argTypes: [F64], result: VOID },
|
|
2497
|
+
// Receiver (any error-hierarchy object) and the program-dependent
|
|
2498
|
+
// `string | undefined` result are checked in the libCall case.
|
|
2499
|
+
/** NodeJS.ErrnoException's `.code` read: borrowed error-hierarchy
|
|
2500
|
+
* receiver → the interned `string | undefined` union (type-directed
|
|
2501
|
+
* construction in the backend, the process.envGet pattern) — the errno
|
|
2502
|
+
* name where a throw site stamped one (fs, exec spawn/timeout,
|
|
2503
|
+
* process.kill, the spawn 'error' event), the undefined arm everywhere
|
|
2504
|
+
* else. Never throws. */
|
|
2505
|
+
"error.code": { argTypes: [null], result: VOID },
|
|
2506
|
+
// DOMException: construction takes the two dyn args (WebIDL's
|
|
2507
|
+
// resolution runs in the runtime); the %DOMException result is a
|
|
2508
|
+
// program-dependent object type, checked in the libCall case. The
|
|
2509
|
+
// read surface takes the %DOMException receiver (a null slot — the
|
|
2510
|
+
// libCall case checks the class name).
|
|
2511
|
+
/** `new DOMException(message?, nameOrOptions?)` (scr_error.c): both args
|
|
2512
|
+
* are borrowed dyn values (the lowering passes the dyn undefined for an
|
|
2513
|
+
* absent argument, so WebIDL's optionality lives in one place). The
|
|
2514
|
+
* runtime ToStrings the message ("" for absent/undefined), resolves the
|
|
2515
|
+
* name — absent/undefined → "Error", a non-null object → ToString of its
|
|
2516
|
+
* `name` member plus the `cause` own-property record, anything else →
|
|
2517
|
+
* ToString — and stamps the legacy code from the WebIDL name table (0
|
|
2518
|
+
* off-table). Result is an owned (+1) %DOMException. Never throws (dyn
|
|
2519
|
+
* ToString is total). */
|
|
2520
|
+
"error.newDom": { argTypes: [DYN, DYN], result: VOID },
|
|
2521
|
+
/** DOMException's own read surface (scr_error.c; %DOMException receivers
|
|
2522
|
+
* only — borrowed). domCode: the legacy numeric code. domHasCause: the
|
|
2523
|
+
* options form's own-property record (`'cause' in e`). domCause: the
|
|
2524
|
+
* cause value, +1 (the dyn undefined when absent — matching Node's
|
|
2525
|
+
* undefined read). None throws. */
|
|
2526
|
+
"error.domCode": { argTypes: [null], result: F64 },
|
|
2527
|
+
"error.domHasCause": { argTypes: [null], result: BOOL },
|
|
2528
|
+
"error.domCause": { argTypes: [null], result: DYN },
|
|
2529
|
+
/** structuredClone of a %DOMException receiver (scr_error.c): WebIDL
|
|
2530
|
+
* serialization — name/message copy, the legacy code re-derives, cause
|
|
2531
|
+
* does not serialize. args are the borrowed receiver and the borrowed
|
|
2532
|
+
* options dyn value (the dyn undefined when absent — the shared
|
|
2533
|
+
* validation throws Node's exact option errors; any non-empty transfer
|
|
2534
|
+
* list throws DataCloneError, nothing static is transferable). Result
|
|
2535
|
+
* +1 %DOMException. */
|
|
2536
|
+
"error.domClone": { argTypes: [null, DYN], result: VOID },
|
|
2537
|
+
/** `d instanceof TypeError` (and the other BUILTIN error classes) on a
|
|
2538
|
+
* checked-dynamic value (scr_json.c): the from_error cache holds the
|
|
2539
|
+
* dyn↔error identity edge, so the test resolves the runtime error and
|
|
2540
|
+
* asks its vtable's stamped preorder interval — exact for every error
|
|
2541
|
+
* that crossed the boundary. A dyn object that never came from an
|
|
2542
|
+
* error (a hand-built {%error} literal) answers false: subclass
|
|
2543
|
+
* identity is unknowable there (the root keeps dynTest's marker
|
|
2544
|
+
* answer). args are the borrowed dyn and the SCR_ERR_* kind literal.
|
|
2545
|
+
* Never throws. */
|
|
2546
|
+
"dyn.errInstanceof": { argTypes: [DYN, F64], result: BOOL },
|
|
2547
|
+
"weakMap.is": { argTypes: [DYN], result: BOOL },
|
|
2548
|
+
"weakSet.is": { argTypes: [DYN], result: BOOL },
|
|
2549
|
+
"weakMap.new": { argTypes: [DYN], result: DYN },
|
|
2550
|
+
"weakSet.new": { argTypes: [DYN], result: DYN },
|
|
2551
|
+
"dyn.fromEntries": { argTypes: [DYN], result: DYN },
|
|
2552
|
+
"bytes.constructor": { argTypes: [STRING], result: DYN },
|
|
2553
|
+
"bytes.instanceOf": { argTypes: [DYN, DYN], result: BOOL },
|
|
2554
|
+
"bytes.construct": { argTypes: [DYN, DYN, STRING], result: DYN },
|
|
2555
|
+
/** The ambient receiver — JS `this` in a plain (non-method) function
|
|
2556
|
+
* body: the innermost binding the current firing/dispatch window
|
|
2557
|
+
* pushed (Node's listener receiver, a dyn OBJ method's object, an
|
|
2558
|
+
* apply/call thisArg), or the undefined dyn singleton with none bound
|
|
2559
|
+
* (the strict-mode plain-call answer, the old constant). Zero args →
|
|
2560
|
+
* dyn (+1). Never throws. */
|
|
2561
|
+
"dyn.dataViewIs": { argTypes: [DYN], result: BOOL },
|
|
2562
|
+
"dyn.construct": { argTypes: [DYN, DYN, STRING], result: DYN },
|
|
2563
|
+
"arrayBuffer.constructor": { argTypes: [], result: DYN },
|
|
2564
|
+
"arrayBuffer.new": { argTypes: [DYN], result: DYN },
|
|
2565
|
+
"ffi.argument": { argTypes: [DYN, STRING], result: DYN },
|
|
2566
|
+
"ffi.memoryModule": { argTypes: [DYN], result: DYN },
|
|
2567
|
+
"intl.segmenterNew": { argTypes: [], result: DYN },
|
|
2568
|
+
"arrayBuffer.is": { argTypes: [DYN], result: BOOL },
|
|
2569
|
+
"arrayBuffer.isView": { argTypes: [DYN], result: BOOL },
|
|
2570
|
+
"arrayBuffer.byteLengthGetter": { argTypes: [], result: F64 },
|
|
2571
|
+
"arrayBuffer.byteLengthDescriptor": { argTypes: [DYN], result: DYN },
|
|
2572
|
+
"arrayBuffer.viewU8C": { argTypes: [DYN, DYN, DYN], result: bytesOf("u8c") },
|
|
2573
|
+
"arrayBuffer.viewI8": { argTypes: [DYN, DYN, DYN], result: bytesOf("i8") },
|
|
2574
|
+
"arrayBuffer.viewU16": { argTypes: [DYN, DYN, DYN], result: bytesOf("u16") },
|
|
2575
|
+
"arrayBuffer.viewI16": { argTypes: [DYN, DYN, DYN], result: bytesOf("i16") },
|
|
2576
|
+
"arrayBuffer.viewU8": { argTypes: [DYN, DYN, DYN], result: BYTES_U8 },
|
|
2577
|
+
"arrayBuffer.viewU32": { argTypes: [DYN, DYN, DYN], result: bytesOf("u32") },
|
|
2578
|
+
"arrayBuffer.viewI32": { argTypes: [DYN, DYN, DYN], result: bytesOf("i32") },
|
|
2579
|
+
"arrayBuffer.viewF32": { argTypes: [DYN, DYN, DYN], result: bytesOf("f32") },
|
|
2580
|
+
"arrayBuffer.viewF64": { argTypes: [DYN, DYN, DYN], result: bytesOf("f64") },
|
|
2581
|
+
"arrayBuffer.viewDV": { argTypes: [DYN, DYN, DYN], result: BYTES_U8 },
|
|
2582
|
+
/** Object.keys/values/entries over a CHECKED-DYNAMIC receiver
|
|
2583
|
+
* (scr_json.c): the runtime walks the dyn node's own members in JS
|
|
2584
|
+
* own-key order (array-index keys ascending first, then insertion
|
|
2585
|
+
* order) and answers a dyn array (entries: an array of [key, value]
|
|
2586
|
+
* pairs; values RETAIN the member nodes — reference semantics, like
|
|
2587
|
+
* JS). Strings/arrays/bytes answer their index keys; other scalars an
|
|
2588
|
+
* empty array; null/undefined throw Node's catchable TypeError
|
|
2589
|
+
* ("Cannot convert undefined or null to object"). */
|
|
2590
|
+
"dyn.objKeys": { argTypes: [DYN], result: DYN },
|
|
2591
|
+
"dyn.forInKeys": { argTypes: [DYN], result: DYN },
|
|
2592
|
+
"dyn.hasOwn": { argTypes: [DYN, STRING], result: BOOL },
|
|
2593
|
+
"dyn.propertyIsEnumerable": { argTypes: [DYN, STRING], result: BOOL },
|
|
2594
|
+
"dyn.assign": { argTypes: [DYN, DYN], result: DYN },
|
|
2595
|
+
"dyn.copyDataProperties": { argTypes: [DYN, DYN], result: DYN },
|
|
2596
|
+
"dyn.objectRest": { argTypes: [DYN, DYN], result: DYN },
|
|
2597
|
+
/** Variadic Object.assign over CHECKED-DYNAMIC targets (`Object.assign(
|
|
2598
|
+
* {}, ...arr.map(f), tail)` — the option-table merge): the lowering
|
|
2599
|
+
* builds one fresh dyn pack of sources (packPush retains a plain source
|
|
2600
|
+
* in; packPushSpread flattens a spread source through the spread-call
|
|
2601
|
+
* walk — V8's exact TypeError texts, the string arg spelling the spread
|
|
2602
|
+
* expression for the nullish form), so every source evaluates and
|
|
2603
|
+
* flattens BEFORE any copying (JS's ArgumentListEvaluation), then
|
|
2604
|
+
* assignAll copies each pack element's own enumerable keys onto the
|
|
2605
|
+
* target left to right and answers the TARGET (+1) — identity, like JS.
|
|
2606
|
+
* assignAll throws Node's ToObject TypeError on a nullish target. */
|
|
2607
|
+
"dyn.packPush": { argTypes: [DYN, DYN], result: VOID },
|
|
2608
|
+
"dyn.packPushSpread": { argTypes: [DYN, DYN, STRING], result: VOID },
|
|
2609
|
+
/** The iterated-path spread twin: V8 spells the optimized apply-path
|
|
2610
|
+
* texts (packPushSpread's — the expression named for nullish sources)
|
|
2611
|
+
* only for the SINGLE LAST argument's spread; any other spread position
|
|
2612
|
+
* drives the real iterator protocol, whose failure describes the VALUE
|
|
2613
|
+
* ("object null is not iterable (cannot read property
|
|
2614
|
+
* Symbol(Symbol.iterator))"). The frontend picks by position. */
|
|
2615
|
+
"dyn.packPushSpreadIter": { argTypes: [DYN, DYN], result: VOID },
|
|
2616
|
+
"dyn.reflectApply": { argTypes: [DYN, DYN, DYN], result: DYN },
|
|
2617
|
+
"dyn.reflectGet": { argTypes: [DYN, DYN, DYN], result: DYN },
|
|
2618
|
+
"dyn.reflectSet": { argTypes: [DYN, DYN, DYN, DYN], result: BOOL },
|
|
2619
|
+
"dyn.reflectDefine": { argTypes: [DYN, DYN, DYN], result: BOOL },
|
|
2620
|
+
"dyn.abstractEq": { argTypes: [DYN, DYN], result: BOOL },
|
|
2621
|
+
"dyn.assignAll": { argTypes: [DYN, DYN], result: DYN },
|
|
2622
|
+
/** `Object.create(null)` (scr_json.c): a fresh NULL-PROTOTYPE dyn
|
|
2623
|
+
* dictionary. The checked-dynamic tree's OBJ dispatch is already own-member-only —
|
|
2624
|
+
* Node's null-proto answer — so the flag's whole job is the observations
|
|
2625
|
+
* that SEE the prototype: inspect's "[Object: null prototype]" prefix
|
|
2626
|
+
* and deepStrictEqual's prototype gate. Never throws. Static builds
|
|
2627
|
+
* only; --dynamic routes Object.create through the engine instead. */
|
|
2628
|
+
"dyn.objCreateNullProto": { argTypes: [], result: DYN },
|
|
2629
|
+
"dyn.arrayPrototype": { argTypes: [], result: DYN },
|
|
2630
|
+
"dyn.arrayConstructor": { argTypes: [], result: DYN },
|
|
2631
|
+
"dyn.objectPrototype": { argTypes: [], result: DYN },
|
|
2632
|
+
"dyn.functionApply": { argTypes: [], result: DYN },
|
|
2633
|
+
"dyn.builtinMethod": { argTypes: [STRING, STRING], result: DYN },
|
|
2634
|
+
"dyn.classPrototype": { argTypes: [DYN, DYN], result: DYN },
|
|
2635
|
+
"dyn.classBasePrototype": { argTypes: [DYN], result: DYN },
|
|
2636
|
+
"dyn.classInherit": { argTypes: [DYN, DYN], result: DYN },
|
|
2637
|
+
"dyn.classSuper": { argTypes: [DYN, DYN, DYN], result: VOID },
|
|
2638
|
+
"dyn.assignPrototype": { argTypes: [DYN, DYN, DYN], result: DYN },
|
|
2639
|
+
"dyn.definePrototypeProps": { argTypes: [DYN, DYN, DYN], result: DYN },
|
|
2640
|
+
"dyn.bagGet": { argTypes: [DYN, STRING, DYN], result: DYN },
|
|
2641
|
+
"dyn.bagSet": { argTypes: [DYN, STRING, DYN, DYN], result: VOID },
|
|
2642
|
+
"dyn.objCreate": { argTypes: [DYN], result: DYN },
|
|
2643
|
+
"dyn.objCreateWithProperties": { argTypes: [DYN, DYN], result: DYN },
|
|
2644
|
+
"dyn.getPrototype": { argTypes: [DYN], result: DYN },
|
|
2645
|
+
"dyn.setPrototype": { argTypes: [DYN, DYN], result: DYN },
|
|
2646
|
+
"dyn.getOwnPropertyNames": { argTypes: [DYN], result: DYN },
|
|
2647
|
+
"dyn.ownKeys": { argTypes: [DYN], result: DYN },
|
|
2648
|
+
"dyn.getOwnPropertySymbols": { argTypes: [DYN], result: DYN },
|
|
2649
|
+
"dyn.getOwnPropertyDescriptors": { argTypes: [DYN], result: DYN },
|
|
2650
|
+
"dyn.preventExtensions": { argTypes: [DYN], result: DYN },
|
|
2651
|
+
"dyn.isExtensible": { argTypes: [DYN], result: BOOL },
|
|
2652
|
+
"dyn.seal": { argTypes: [DYN], result: DYN },
|
|
2653
|
+
"dyn.isSealed": { argTypes: [DYN], result: BOOL },
|
|
2654
|
+
"dyn.objValues": { argTypes: [DYN], result: DYN },
|
|
2655
|
+
"dyn.objEntries": { argTypes: [DYN], result: DYN },
|
|
2656
|
+
/** structuredClone over the checked-dynamic tree (scr_json.c): the JSON-safe subset plus
|
|
2657
|
+
* bytes (a fresh copy — a Buffer clones as a plain Uint8Array, like
|
|
2658
|
+
* Node), deep. Functions and handle kinds throw the spec's catchable
|
|
2659
|
+
* DataCloneError; CYCLES throw the scriptc fence (the checked-dynamic tree cannot
|
|
2660
|
+
* represent them — Node clones cycles; documented divergence). The
|
|
2661
|
+
* options dyn value validates with Node's exact errors (dictionary
|
|
2662
|
+
* conversion, the transfer-sequence member; any non-empty transfer
|
|
2663
|
+
* list throws DataCloneError). dyn.cloneMissing is the zero-argument
|
|
2664
|
+
* call: always throws Node's TypeError [ERR_MISSING_ARGS] with Node's
|
|
2665
|
+
* own (verbatim, doubly-wrapped) message. */
|
|
2666
|
+
"dyn.structuredClone": { argTypes: [DYN, DYN], result: DYN },
|
|
2667
|
+
"dyn.cloneMissing": { argTypes: [], result: DYN },
|
|
2668
|
+
/** structuredClone with a NON-EMPTY transfer array of static values:
|
|
2669
|
+
* nothing static is transferable, so the call always throws Node's
|
|
2670
|
+
* catchable DataCloneError ("Found invalid value in transferList.") —
|
|
2671
|
+
* lowered directly (the list's values need no dyn representation to
|
|
2672
|
+
* fail). */
|
|
2673
|
+
"dyn.cloneTransferFail": { argTypes: [], result: DYN },
|
|
2674
|
+
/** `new RegExp(pattern, flags?)` (scr_regex.c): a heap regex over the
|
|
2675
|
+
* same libregexp engine the literals use. The pattern compiles EAGERLY
|
|
2676
|
+
* so an invalid pattern (or an unknown flag letter) throws Node's
|
|
2677
|
+
* catchable SyntaxError at construction — Node's message shape with
|
|
2678
|
+
* libregexp's detail text (approximate fidelity; e.name exact). An
|
|
2679
|
+
* empty pattern stores the spec's "(?:)" source. Both args borrowed
|
|
2680
|
+
* strings (the lowering completes an absent flags to ""); result +1.
|
|
2681
|
+
* The result TYPE is the regex kind, so the link switch pulls the
|
|
2682
|
+
* engine exactly like a literal. */
|
|
2683
|
+
"regex.new": { argTypes: [STRING, STRING], result: REGEX },
|
|
2684
|
+
"regex.resetLastIndex": { argTypes: [REGEX, F64], result: VOID },
|
|
2685
|
+
"regex.newChecked": { argTypes: [DYN, DYN], result: REGEX },
|
|
2686
|
+
// node:events EventEmitter: receivers are emitter-hierarchy objects and
|
|
2687
|
+
// the chaining forms (on/off/removeAll/setMax) return the receiver's
|
|
2688
|
+
// own class — program-dependent object types, checked in the libCall
|
|
2689
|
+
// case. emitter.emit is the one VARIADIC libCall: args beyond
|
|
2690
|
+
// (recv, name) are the event's frontend-unified tuple, any borrowable
|
|
2691
|
+
// kind — the count check admits a longer list for it alone.
|
|
2692
|
+
/** node:events EventEmitter (scr_events_emitter.c, link-gated by
|
|
2693
|
+
* moduleUsesEmitter). The receiver of every instance form is a borrowed
|
|
2694
|
+
* emitter-hierarchy object (`%EventEmitter` or a user subclass — the
|
|
2695
|
+
* backend reinterprets to ScrEmitter*, the identical prefix); event
|
|
2696
|
+
* names are borrowed strings (compile-time literals — the frontend
|
|
2697
|
+
* fences non-literals and unifies each event's argument tuple program-
|
|
2698
|
+
* wide). The chaining forms (on/off/removeAll/setMax) return the
|
|
2699
|
+
* receiver +1 typed as its static class, Node's `return this`.
|
|
2700
|
+
*
|
|
2701
|
+
* emitter.new: `new EventEmitter()` → a +1 bare emitter. emitter.ctor:
|
|
2702
|
+
* super() into the prefix of an emitted subclass (borrowed receiver,
|
|
2703
|
+
* void — allocation already initialized the prefix). emitter.on:
|
|
2704
|
+
* (recv, name, cb /moves/, once, prepend) — the backend synthesizes the
|
|
2705
|
+
* per-signature va_list invoke adapter from the cb's func type.
|
|
2706
|
+
* emitter.emit: (recv, name, ...tuple) — VARIADIC, the one libCall
|
|
2707
|
+
* whose arg count exceeds its signature; args are borrowed, result is
|
|
2708
|
+
* the had-listeners bool. emitter.emitError: emit('error', err) —
|
|
2709
|
+
* throws err when unhandled. count/countFn/names/listeners/getMax/
|
|
2710
|
+
* setMax/setDefaultMax/getDefaultMax are the introspection surface. */
|
|
2711
|
+
"emitter.new": { argTypes: [], result: VOID },
|
|
2712
|
+
"emitter.ctor": { argTypes: [null], result: VOID },
|
|
2713
|
+
"emitter.on": { argTypes: [null, STRING, null, BOOL, BOOL], result: VOID },
|
|
2714
|
+
"emitter.off": { argTypes: [null, STRING, null], result: VOID },
|
|
2715
|
+
// The dyn-adapted registration family (JS-lane checked-dynamic
|
|
2716
|
+
// listeners): checkListener has NO receiver (it validates the listener
|
|
2717
|
+
// argument alone); onDyn carries (recv, name, cb dyn, adapter func,
|
|
2718
|
+
// once, prepend), offDyn (recv, name, cb dyn).
|
|
2719
|
+
"emitter.checkListener": { argTypes: [DYN], result: VOID },
|
|
2720
|
+
"emitter.onDyn": { argTypes: [null, STRING, DYN, null, BOOL, BOOL], result: VOID },
|
|
2721
|
+
"emitter.onFlex": { argTypes: [null, STRING, DYN, BOOL, BOOL], result: VOID },
|
|
2722
|
+
"emitter.offDyn": { argTypes: [null, STRING, DYN], result: VOID },
|
|
2723
|
+
"emitter.removeAll": { argTypes: [null, STRING, BOOL], result: VOID },
|
|
2724
|
+
"emitter.emit": { argTypes: [null, STRING], result: BOOL },
|
|
2725
|
+
"emitter.emitFlex": { argTypes: [null, STRING], result: BOOL },
|
|
2726
|
+
"emitter.emitError": { argTypes: [null, STRING, null], result: BOOL },
|
|
2727
|
+
"emitter.count": { argTypes: [null, STRING], result: F64 },
|
|
2728
|
+
"emitter.countFn": { argTypes: [null, STRING, null], result: F64 },
|
|
2729
|
+
"emitter.countDyn": { argTypes: [null, STRING, DYN], result: F64 },
|
|
2730
|
+
"emitter.names": { argTypes: [null], result: VOID },
|
|
2731
|
+
"emitter.listeners": { argTypes: [null, STRING], result: VOID },
|
|
2732
|
+
/** Stream-'data' registration twins of emitter.on/onDyn (same args):
|
|
2733
|
+
* chosen at registration sites whose receiver is stream-rooted, so the
|
|
2734
|
+
* backend emits DATA thunks — the runtime's 'data' emission carries
|
|
2735
|
+
* BOTH payload slots (bytes, string; exactly one non-NULL — encoded
|
|
2736
|
+
* streams deliver strings), and the thunk unwraps the listener's
|
|
2737
|
+
* declared side (typed) or boxes by tag (dyn). emitter.emitData is the
|
|
2738
|
+
* user-emit form: (recv, name, chunk) with a bytes OR string chunk. */
|
|
2739
|
+
"emitter.onData": { argTypes: [null, STRING, null, BOOL, BOOL], result: VOID },
|
|
2740
|
+
"emitter.onDataDyn": { argTypes: [null, STRING, DYN, null, BOOL, BOOL], result: VOID },
|
|
2741
|
+
"emitter.emitData": { argTypes: [null, STRING, null], result: BOOL },
|
|
2742
|
+
"emitter.setMax": { argTypes: [null, F64], result: VOID },
|
|
2743
|
+
"emitter.getMax": { argTypes: [null], result: F64 },
|
|
2744
|
+
"emitter.setDefaultMax": { argTypes: [F64], result: VOID },
|
|
2745
|
+
"emitter.getDefaultMax": { argTypes: [], result: F64 },
|
|
2746
|
+
// node:stream: receivers are stream-hierarchy objects and several
|
|
2747
|
+
// results are program-dependent (the receiver's class, unions) — the
|
|
2748
|
+
// libCall case owns those checks. The constructors and a few methods
|
|
2749
|
+
// are VARIADIC (trailing option callbacks / the optional chunk+cb tail):
|
|
2750
|
+
// argTypes here is the fixed prefix, VARIADIC_LIB_FNS admits the rest.
|
|
2751
|
+
/** node:stream (scr_stream.c, link-gated by moduleUsesStream — which
|
|
2752
|
+
* implies the emitter unit: stream events dispatch through the embedded
|
|
2753
|
+
* ScrEmitter registry). Receivers are borrowed stream-class objects
|
|
2754
|
+
* (`%Readable`/`%Writable`/`%Duplex`/`%Transform`/`%PassThrough` — one
|
|
2755
|
+
* runtime layout, reinterpreted by side).
|
|
2756
|
+
*
|
|
2757
|
+
* Constructors (`readable.new` et al): args are [hwmR, hwmW, flags]
|
|
2758
|
+
* followed by the PRESENT user callbacks in canonical order (read,
|
|
2759
|
+
* write, final, destroy, transform, flush — the flags f64 is a bitmask
|
|
2760
|
+
* naming which follow; absent ones emit NULL). Every callback closure
|
|
2761
|
+
* MOVES and carries a leading `this` param (the stream), invoked
|
|
2762
|
+
* through compiler-emitted adapters. Results are +1.
|
|
2763
|
+
*
|
|
2764
|
+
* readable.push / readable.pushStr / readable.pushNull: Node's push —
|
|
2765
|
+
* buffers or delivers (bytes chunk borrowed; string converted utf8);
|
|
2766
|
+
* returns the below-hwm answer. readable.read: (recv, size — -1 for
|
|
2767
|
+
* absent) → Buffer|null union. pause/resume return recv +1 (`this`);
|
|
2768
|
+
* isPaused answers the flag. readable.pipe: (recv, dst, end) → dst +1,
|
|
2769
|
+
* fires 'pipe' on dst; readable.unpipe (recv[, dst]) → recv +1.
|
|
2770
|
+
* writable.write/writeStr: (recv, chunk[, cb]) → below-hwm bool (cb
|
|
2771
|
+
* MOVES when present, called after the user write completes).
|
|
2772
|
+
* writable.end: (recv, flags[, chunk][, cb]) → recv +1. cork/uncork are
|
|
2773
|
+
* void. stream.destroy/destroyErr: (recv[, err]) → recv +1.
|
|
2774
|
+
* stream.prop: (recv, name-literal) → the flag/number the name asks
|
|
2775
|
+
* for; stream.errored → Error|null union; readable.flowing →
|
|
2776
|
+
* bool|null union. All may leave a listener's exception pending
|
|
2777
|
+
* (dispatch runs user code synchronously, like emit). */
|
|
2778
|
+
"readable.new": { argTypes: [F64, BOOL, BOOL, F64], result: VOID },
|
|
2779
|
+
"writable.new": { argTypes: [F64, BOOL, BOOL, F64], result: VOID },
|
|
2780
|
+
"duplex.new": { argTypes: [F64, F64, BOOL, BOOL, BOOL, BOOL, BOOL, F64], result: VOID },
|
|
2781
|
+
"transform.new": { argTypes: [F64, F64, BOOL, BOOL, BOOL, BOOL, BOOL, F64], result: VOID },
|
|
2782
|
+
"passthrough.new": { argTypes: [F64, F64, BOOL, BOOL, BOOL, BOOL, BOOL, F64], result: VOID },
|
|
2783
|
+
// The subclass-initialization twins: the borrowed receiver leads, then
|
|
2784
|
+
// the .new tail (variadic callbacks likewise).
|
|
2785
|
+
// The dyn-options twins: newDyn takes the record, initDyn the borrowed
|
|
2786
|
+
// receiver + record + fallback flags (trailing wrapper closures ride
|
|
2787
|
+
// the variadic tail like the static forms).
|
|
2788
|
+
/** The underscore-method assignment surface (`r._read = fn` after
|
|
2789
|
+
* construction — Node's own-property shadow of the prototype method):
|
|
2790
|
+
* args [stream receiver (borrowed), callback closure (+1 moves)]. The
|
|
2791
|
+
* runtime slot the matching option callback fills swaps its closure
|
|
2792
|
+
* and invoke thunk; the next dispatch uses it (Node's timing). The
|
|
2793
|
+
* setters themselves never throw. */
|
|
2794
|
+
"stream.setRead": { argTypes: [null, null], result: VOID },
|
|
2795
|
+
"stream.setWrite": { argTypes: [null, null], result: VOID },
|
|
2796
|
+
"stream.setFinal": { argTypes: [null, null], result: VOID },
|
|
2797
|
+
"stream.setDestroy": { argTypes: [null, null], result: VOID },
|
|
2798
|
+
"stream.setTransform": { argTypes: [null, null], result: VOID },
|
|
2799
|
+
"stream.setFlush": { argTypes: [null, null], result: VOID },
|
|
2800
|
+
/** The dyn-options twins (a checked-dynamic options record — the JS
|
|
2801
|
+
* lane's `super(options)` forwarding and `new Readable(dynVar)`): the
|
|
2802
|
+
* option walk runs at RUNTIME with Node's reading rules. newDyn:
|
|
2803
|
+
* (optsDyn) → the fresh stream; initDyn: (recv, optsDyn, flags,
|
|
2804
|
+
* ...fallback wrapper closures in canonical order — the flags literal
|
|
2805
|
+
* names which ride, exactly the .init callback ABI). MAY THROW (a
|
|
2806
|
+
* consumed-but-unlowered option is the compile fence's runtime twin). */
|
|
2807
|
+
/** stream.finished(s, cb) — the callback form: the watcher fires once
|
|
2808
|
+
* at the terminal point with the finish status; the result is the +1
|
|
2809
|
+
* cleanup closure. stream.pipeline(count, s1..sn, cb): chains pipes,
|
|
2810
|
+
* propagates the first error by destroying the rest, calls cb after the
|
|
2811
|
+
* last 'close'; answers the destination +1. The Dyn twins take the
|
|
2812
|
+
* callback as a checked-dynamic VALUE (mustCall wrappers). */
|
|
2813
|
+
"stream.finished": { argTypes: [null, null], result: VOID },
|
|
2814
|
+
"stream.finishedDyn": { argTypes: [null, DYN], result: VOID },
|
|
2815
|
+
"stream.pipeline": { argTypes: [F64], result: VOID },
|
|
2816
|
+
"stream.pipelineDyn": { argTypes: [F64], result: VOID },
|
|
2817
|
+
/** node:stream/promises — the promise forms over the same machinery:
|
|
2818
|
+
* sp.finished: (s) → a pending void promise the terminal watcher
|
|
2819
|
+
* settles; sp.pipeline: (count, s1..sn) → the callback pipeline's
|
|
2820
|
+
* chaining/destroyer semantics settling a void promise (fulfilled on a
|
|
2821
|
+
* clean finish, rejected with the finish status otherwise). */
|
|
2822
|
+
"sp.finished": { argTypes: [null], result: { kind: "promise", inner: VOID } },
|
|
2823
|
+
"sp.pipeline": { argTypes: [F64], result: { kind: "promise", inner: VOID } },
|
|
2824
|
+
/** node:stream/consumers — the promise consumers over the readable
|
|
2825
|
+
* machinery: (s) → a pending promise settled at the terminal point
|
|
2826
|
+
* with the accumulated result (sc.text: the utf8 decode, sc.json: the
|
|
2827
|
+
* parsed dyn — malformed input rejects with the parse's SyntaxError,
|
|
2828
|
+
* sc.buffer: the concatenated bytes) or rejected with the stream's
|
|
2829
|
+
* error / ERR_STREAM_PREMATURE_CLOSE. */
|
|
2830
|
+
"sc.text": { argTypes: [null], result: { kind: "promise", inner: STRING } },
|
|
2831
|
+
"sc.json": { argTypes: [null], result: { kind: "promise", inner: DYN } },
|
|
2832
|
+
"sc.buffer": { argTypes: [null], result: { kind: "promise", inner: BYTES_U8 } },
|
|
2833
|
+
"readable.newDyn": { argTypes: [DYN], result: VOID },
|
|
2834
|
+
"writable.newDyn": { argTypes: [DYN], result: VOID },
|
|
2835
|
+
"duplex.newDyn": { argTypes: [DYN], result: VOID },
|
|
2836
|
+
"transform.newDyn": { argTypes: [DYN], result: VOID },
|
|
2837
|
+
"passthrough.newDyn": { argTypes: [DYN], result: VOID },
|
|
2838
|
+
"readable.initDyn": { argTypes: [null, DYN, F64], result: VOID },
|
|
2839
|
+
"writable.initDyn": { argTypes: [null, DYN, F64], result: VOID },
|
|
2840
|
+
"duplex.initDyn": { argTypes: [null, DYN, F64], result: VOID },
|
|
2841
|
+
"transform.initDyn": { argTypes: [null, DYN, F64], result: VOID },
|
|
2842
|
+
"passthrough.initDyn": { argTypes: [null, DYN, F64], result: VOID },
|
|
2843
|
+
/** Subclass initialization (`super(options?)` in a user `extends
|
|
2844
|
+
* Readable` constructor): same tail as the `.new` forms, prefixed with
|
|
2845
|
+
* the BORROWED receiver (the emitted subclass allocation — vtable and
|
|
2846
|
+
* display name stamped, state NULL until here). Overridden underscore
|
|
2847
|
+
* methods arrive as synthesized wrapper closures dispatching through
|
|
2848
|
+
* the vtable. Void result. */
|
|
2849
|
+
"readable.init": { argTypes: [null, F64, BOOL, BOOL, F64], result: VOID },
|
|
2850
|
+
"writable.init": { argTypes: [null, F64, BOOL, BOOL, F64], result: VOID },
|
|
2851
|
+
"duplex.init": { argTypes: [null, F64, F64, BOOL, BOOL, BOOL, BOOL, BOOL, F64], result: VOID },
|
|
2852
|
+
"transform.init": { argTypes: [null, F64, F64, BOOL, BOOL, BOOL, BOOL, BOOL, F64], result: VOID },
|
|
2853
|
+
"passthrough.init": {
|
|
2854
|
+
argTypes: [null, F64, F64, BOOL, BOOL, BOOL, BOOL, BOOL, F64],
|
|
2855
|
+
result: VOID,
|
|
2856
|
+
},
|
|
2857
|
+
"readable.push": { argTypes: [null, BYTES_U8], result: BOOL },
|
|
2858
|
+
"readable.pushStr": { argTypes: [null, STRING], result: BOOL },
|
|
2859
|
+
"readable.pushNull": { argTypes: [null], result: BOOL },
|
|
2860
|
+
"readable.pushU": { argTypes: [null, null], result: BOOL },
|
|
2861
|
+
"readable.pushDyn": { argTypes: [null, DYN], result: BOOL },
|
|
2862
|
+
"readable.unshift": { argTypes: [null, BYTES_U8], result: VOID },
|
|
2863
|
+
"readable.unshiftStr": { argTypes: [null, STRING], result: VOID },
|
|
2864
|
+
"stream.onDyn": { argTypes: [null, STRING, DYN, BOOL, BOOL], result: VOID },
|
|
2865
|
+
"readable.readDyn": { argTypes: [null, DYN], result: DYN },
|
|
2866
|
+
"readable.read": { argTypes: [null, F64], result: VOID },
|
|
2867
|
+
"readable.pause": { argTypes: [null], result: VOID },
|
|
2868
|
+
"readable.setEncoding": { argTypes: [null, STRING], result: VOID },
|
|
2869
|
+
/** push(chunk, enc) with a literal non-utf8 encoding, and the
|
|
2870
|
+
* defaultEncoding option's push side (how push(string) decodes —
|
|
2871
|
+
* Buffer.from(chunk, enc)); both carry the CANONICAL literal. */
|
|
2872
|
+
"readable.pushStrEnc": { argTypes: [null, STRING, STRING], result: BOOL },
|
|
2873
|
+
"readable.pushEncoding": { argTypes: [null, STRING], result: VOID },
|
|
2874
|
+
/** for-await over a readable (the desugared loop's per-pass promise):
|
|
2875
|
+
* +1 promise of the next chunk — buffered content, the EOF sentinel
|
|
2876
|
+
* (empty Buffer / dyn undefined), or a rejection with the stream's
|
|
2877
|
+
* error. The Dyn twin boxes chunks by runtime tag (the JS lane).
|
|
2878
|
+
* readable.fromArr is Readable.from(array): a fully-seeded object-
|
|
2879
|
+
* entry stream (one whole chunk per element; strings per the flag). */
|
|
2880
|
+
"readable.nextChunk": { argTypes: [null], result: VOID },
|
|
2881
|
+
"readable.nextChunkDyn": { argTypes: [null], result: VOID },
|
|
2882
|
+
"readable.fromArr": { argTypes: [null, BOOL], result: VOID },
|
|
2883
|
+
"readable.resume": { argTypes: [null], result: VOID },
|
|
2884
|
+
"readable.isPaused": { argTypes: [null], result: BOOL },
|
|
2885
|
+
"readable.pipe": { argTypes: [null, null, BOOL], result: VOID },
|
|
2886
|
+
"readable.unpipe": { argTypes: [null], result: VOID },
|
|
2887
|
+
"readable.flowing": { argTypes: [null], result: VOID },
|
|
2888
|
+
"writable.write": { argTypes: [null, BYTES_U8], result: BOOL },
|
|
2889
|
+
"writable.writeStr": { argTypes: [null, STRING], result: BOOL },
|
|
2890
|
+
"writable.writeU": { argTypes: [null, null], result: BOOL },
|
|
2891
|
+
"writable.writeDyn": { argTypes: [null, DYN], result: BOOL },
|
|
2892
|
+
"writable.end": { argTypes: [null, F64], result: VOID },
|
|
2893
|
+
"writable.cork": { argTypes: [null], result: VOID },
|
|
2894
|
+
"writable.uncork": { argTypes: [null], result: VOID },
|
|
2895
|
+
"stream.destroy": { argTypes: [null], result: VOID },
|
|
2896
|
+
"stream.destroyErr": { argTypes: [null, null], result: VOID },
|
|
2897
|
+
/** AsyncIteratorClose for Readable[Symbol.asyncIterator](): destroy with
|
|
2898
|
+
* Node's AbortError/ABORT_ERR payload while the iterator's internal error
|
|
2899
|
+
* consumer prevents an unhandled-error crash. */
|
|
2900
|
+
"stream.iteratorClose": { argTypes: [null], result: VOID },
|
|
2901
|
+
"stream.prop": { argTypes: [null, STRING], result: VOID },
|
|
2902
|
+
"stream.errored": { argTypes: [null], result: VOID },
|
|
2903
|
+
// node:assert: pass/negated/deep/hasMsg are frontend-computed bools; the
|
|
2904
|
+
// message slot always carries a string ("" when hasMsg is false).
|
|
2905
|
+
/** node:assert (scr_assert.c; assert.match in scr_regex.c — every call
|
|
2906
|
+
* site carries a regex value, so the regex link switch is already on).
|
|
2907
|
+
* Failures throw a catchable AssertionError — a runtime %Error whose
|
|
2908
|
+
* name is "AssertionError" and whose code slot is "ERR_ASSERTION" — so
|
|
2909
|
+
* `instanceof Error`, `.name`, `.message`, and `.code` all answer like
|
|
2910
|
+
* Node's. Generated messages are Node's assertion_error.js scalar forms
|
|
2911
|
+
* byte-exactly (the short `a !== b` form, the stacked `+ actual
|
|
2912
|
+
* - expected` diff with the string `^` indicator, the inline-vs-block
|
|
2913
|
+
* not-equal split); composite deep failures carry the header line
|
|
2914
|
+
* without the rendered inspect diff (documented divergence).
|
|
2915
|
+
*
|
|
2916
|
+
* assert.ok: (pass, message) — the frontend computed the truthiness AND
|
|
2917
|
+
* the full message (the user's, or the compile-time source-text form —
|
|
2918
|
+
* assert.fail lowers here too with pass=false). assert.eqF64/eqBigInt/
|
|
2919
|
+
* eqStr/eqBool: (a, b, negated, deep, msg, hasMsg) — Object.is comparison,
|
|
2920
|
+
* covering strictEqual/notStrictEqual and the scalar deepStrictEqual
|
|
2921
|
+
* pair; msg is a typed dummy ("" literal) when hasMsg is false (Node
|
|
2922
|
+
* distinguishes an omitted message from an empty one per operator).
|
|
2923
|
+
* assert.deepResult: (equal, negated, msg, hasMsg) — the verdict of a
|
|
2924
|
+
* frontend-synthesized structural comparison, turned into Node's throw.
|
|
2925
|
+
* assert.sameValue: Object.is over doubles (the deep-equal helpers'
|
|
2926
|
+
* number leaf; never throws). assert.match: (s, regex, negated, msg,
|
|
2927
|
+
* hasMsg) — a fresh exec from index 0. assert.throwsNone: (rejection,
|
|
2928
|
+
* ename, hasEname, msg, hasMsg) — the "Missing expected
|
|
2929
|
+
* exception|rejection" throw of assert.throws/rejects whose callback
|
|
2930
|
+
* returned (fulfilled) normally, with Node's ` (${expected.name})`
|
|
2931
|
+
* detail when the expected class or shape carries a name.
|
|
2932
|
+
* assert.throwsMismatch: (expectedName, error) — the wrong-class throw
|
|
2933
|
+
* of the assert.throws(fn, ErrorClass) form. assert.eqSym:
|
|
2934
|
+
* (a, b, negated, deep, msg, hasMsg) — strict equality over symbol
|
|
2935
|
+
* values, pointer identity with v24's "Symbol(desc)" stacked-diff
|
|
2936
|
+
* messages (scr_symbol.c, the assert.match pattern — symbol-typed
|
|
2937
|
+
* slots already flip the symbol link switch). assert.eqDyn:
|
|
2938
|
+
* (a, b, negated, deep, msg, hasMsg) — the whole quartet over
|
|
2939
|
+
* checked-dynamic operands (both slots dyn; the frontend boxes a
|
|
2940
|
+
* static side with dynFrom first): SameValue for the strict pair over
|
|
2941
|
+
* the dyn kinds (boxed-closure identity for functions), the structural
|
|
2942
|
+
* dyn walk for the deep pair, with assertion_error.js's messages —
|
|
2943
|
+
* scalar forms byte-exact, composites rendered compact:false/sorted
|
|
2944
|
+
* through the checked-dynamic tree and diffed with the real myers line printer.
|
|
2945
|
+
*
|
|
2946
|
+
* The assert.throws(fn, {name/code/message}) shape check
|
|
2947
|
+
* (expectedException over the static error surface): shapeBegin
|
|
2948
|
+
* stashes the caught error, shapeStr/shapeRe add one expected key each
|
|
2949
|
+
* (key ids 0 code / 1 message / 2 name; shapeRe lives in scr_regex.c —
|
|
2950
|
+
* its regex argument flips the regex link switch — and tests eagerly
|
|
2951
|
+
* so scr_assert.c stays libregexp-free), then shapeEnd throws Node's
|
|
2952
|
+
* deep-equal Comparison diff BYTE-EXACTLY (the bounded key set makes
|
|
2953
|
+
* the rendering enumerable) or the custom message.
|
|
2954
|
+
* assert.throwsRegex: (regex, error, msg, hasMsg) — the
|
|
2955
|
+
* assert.throws(fn, /re/) check over String(error), Node's
|
|
2956
|
+
* regex-mismatch message. assert.regexErrTest: doesNotReject's silent
|
|
2957
|
+
* regex predicate over String(error) (never throws).
|
|
2958
|
+
* assert.unwantedRejection: (error, msg, hasMsg) — doesNotReject's
|
|
2959
|
+
* "Got unwanted rejection" throw.
|
|
2960
|
+
* assert.ifErrorErr/F64/Str/Bool: assert.ifError's per-type throws
|
|
2961
|
+
* ("ifError got unwanted exception: " + the error's message/name or
|
|
2962
|
+
* the value's inspection) — the frontend routes null/undefined to a
|
|
2963
|
+
* no-op and everything else here (Node throws for falsy values too).
|
|
2964
|
+
* All arguments are borrowed. */
|
|
2965
|
+
"assert.ok": { argTypes: [BOOL, STRING], result: VOID },
|
|
2966
|
+
"assert.eqF64": { argTypes: [F64, F64, BOOL, BOOL, STRING, BOOL], result: VOID },
|
|
2967
|
+
"assert.eqBigInt": { argTypes: [BIGINT_T, BIGINT_T, BOOL, BOOL, STRING, BOOL], result: VOID },
|
|
2968
|
+
"assert.eqStr": { argTypes: [STRING, STRING, BOOL, BOOL, STRING, BOOL], result: VOID },
|
|
2969
|
+
"assert.eqBool": { argTypes: [BOOL, BOOL, BOOL, BOOL, STRING, BOOL], result: VOID },
|
|
2970
|
+
"assert.deepResult": { argTypes: [BOOL, BOOL, STRING, BOOL], result: VOID },
|
|
2971
|
+
"assert.sameValue": { argTypes: [F64, F64], result: BOOL },
|
|
2972
|
+
// The deep-equality pair memo: both slots are program-dependent
|
|
2973
|
+
// (any cycle-capable record/array/map type).
|
|
2974
|
+
/* deepStrictEqual's pair memo over cycle-capable types: enter answers
|
|
2975
|
+
* true for a pair already being compared (Node's memo — equal cyclic
|
|
2976
|
+
* structures compare true); leave pops. */
|
|
2977
|
+
"assert.deqEnter": { argTypes: [null, null], result: BOOL },
|
|
2978
|
+
"assert.deqLeave": { argTypes: [], result: VOID },
|
|
2979
|
+
"assert.match": { argTypes: [STRING, REGEX, BOOL, STRING, BOOL], result: VOID },
|
|
2980
|
+
"assert.throwsNone": { argTypes: [BOOL, STRING, BOOL, STRING, BOOL], result: VOID },
|
|
2981
|
+
"assert.throwsMismatch": {
|
|
2982
|
+
argTypes: [STRING, { kind: "object", className: "%Error" }, STRING, BOOL],
|
|
2983
|
+
result: VOID,
|
|
2984
|
+
},
|
|
2985
|
+
"assert.throwsRegex": {
|
|
2986
|
+
argTypes: [REGEX, { kind: "object", className: "%Error" }, STRING, BOOL],
|
|
2987
|
+
result: VOID,
|
|
2988
|
+
},
|
|
2989
|
+
// Symbol strict equality (pointer identity; scr_symbol.c).
|
|
2990
|
+
"assert.eqSym": {
|
|
2991
|
+
argTypes: [{ kind: "symbol" }, { kind: "symbol" }, BOOL, BOOL, STRING, BOOL],
|
|
2992
|
+
result: VOID,
|
|
2993
|
+
},
|
|
2994
|
+
// The equality quartet over checked-dynamic operands (the frontend
|
|
2995
|
+
// boxes a static side into the checked-dynamic tree first).
|
|
2996
|
+
"assert.eqDyn": { argTypes: [DYN, DYN, BOOL, BOOL, STRING, BOOL], result: VOID },
|
|
2997
|
+
"assert.looseResult": { argTypes: [BOOL, BOOL, STRING, STRING, STRING, BOOL], result: VOID },
|
|
2998
|
+
// The throws(fn, {shape}) accumulator: begin/slot calls never throw;
|
|
2999
|
+
// shapeEnd throws the Comparison diff. The error slot is the
|
|
3000
|
+
// %Error-narrowed caught value.
|
|
3001
|
+
"assert.shapeBegin": { argTypes: [{ kind: "object", className: "%Error" }], result: VOID },
|
|
3002
|
+
"assert.shapeStr": { argTypes: [F64, STRING], result: VOID },
|
|
3003
|
+
"assert.shapeRe": { argTypes: [F64, REGEX], result: VOID },
|
|
3004
|
+
"assert.shapeEnd": { argTypes: [STRING, BOOL], result: VOID },
|
|
3005
|
+
"assert.regexErrTest": {
|
|
3006
|
+
argTypes: [REGEX, { kind: "object", className: "%Error" }],
|
|
3007
|
+
result: BOOL,
|
|
3008
|
+
},
|
|
3009
|
+
"assert.unwantedRejection": {
|
|
3010
|
+
argTypes: [{ kind: "object", className: "%Error" }, STRING, BOOL],
|
|
3011
|
+
result: VOID,
|
|
3012
|
+
},
|
|
3013
|
+
"assert.unwantedError": { argTypes: [STRING, BOOL, STRING, BOOL], result: VOID },
|
|
3014
|
+
"assert.noErrorPredicate": { argTypes: [DYN, DYN], result: BOOL },
|
|
3015
|
+
"assert.regexDynTest": { argTypes: [REGEX, DYN], result: BOOL },
|
|
3016
|
+
/** Node's expectsError over an error-INSTANCE expected (assert.throws/
|
|
3017
|
+
* rejects second argument): walk the expected dyn error's keys (name,
|
|
3018
|
+
* message, code — the %error marker skipped) and deep-compare each
|
|
3019
|
+
* against the caught value's; a mismatch throws the deep-equal
|
|
3020
|
+
* AssertionError (scr_assert.c). MAY THROW by design. */
|
|
3021
|
+
"assert.expectsErrDyn": { argTypes: [DYN, DYN, STRING, BOOL], result: VOID },
|
|
3022
|
+
// assert.ifError's typed entries (always throw; unit args never
|
|
3023
|
+
// lower). The error slot is program-dependent — any %Error-hierarchy
|
|
3024
|
+
// class, root or subclass (the insp.error precedent, null slot).
|
|
3025
|
+
"assert.ifErrorErr": { argTypes: [null], result: VOID },
|
|
3026
|
+
"assert.ifErrorF64": { argTypes: [F64], result: VOID },
|
|
3027
|
+
"assert.ifErrorStr": { argTypes: [STRING], result: VOID },
|
|
3028
|
+
"assert.ifErrorBool": { argTypes: [BOOL], result: VOID },
|
|
3029
|
+
"assert.ifErrorDyn": { argTypes: [DYN], result: VOID },
|
|
3030
|
+
// Bytes equality: the two value slots are any bytes kind (the frontend
|
|
3031
|
+
// gates both sides to ONE static bytes type; the libCall case checks
|
|
3032
|
+
// the kind and the pair below).
|
|
3033
|
+
"assert.refEqBytes": { argTypes: [null, null, BOOL, BOOL, STRING, BOOL], result: VOID },
|
|
3034
|
+
"assert.refEqFn": { argTypes: [null, null, BOOL, STRING, BOOL], result: VOID },
|
|
3035
|
+
"assert.bytesDeepEq": { argTypes: [null, null, BOOL], result: BOOL },
|
|
3036
|
+
// util.inspect: the error receiver is program-dependent (a builtin or
|
|
3037
|
+
// user error class — the error.toString precedent, null slot).
|
|
3038
|
+
/** util.inspect (scr_inspect.c — its own link switch, moduleUsesInspect):
|
|
3039
|
+
* the runtime half of the static rendering. Scalar formatters return +1
|
|
3040
|
+
* strings (insp.f64: JS ToString except -0; insp.str: the quoting
|
|
3041
|
+
* ladder + line splitting; insp.regex: /source/flags; insp.buffer:
|
|
3042
|
+
* <Buffer aa ..>). insp.error renders the STACKLESS [Name: message]
|
|
3043
|
+
* form with the code slot as its one property. insp.dyn walks the
|
|
3044
|
+
* checked-dynamic tree entirely in the runtime (its shape lives in the
|
|
3045
|
+
* value); insp.dynS is format's %s twin (dyn strings pass verbatim).
|
|
3046
|
+
* insp.jsval ([value, recurse, depth], --dynamic only) renders the
|
|
3047
|
+
* island scalars and THROWS a catchable TypeError on composites (the
|
|
3048
|
+
* may-throw seed set). begin/entry/moreItems/end drive the frame
|
|
3049
|
+
* engine from the compiler-synthesized per-type traversal helpers
|
|
3050
|
+
* (%util.insp.N — the deepStrictEqual precedent). */
|
|
3051
|
+
"insp.f64": { argTypes: [F64], result: STRING },
|
|
3052
|
+
/** util.format %j over a checked-dynamic argument: the runtime dyn
|
|
3053
|
+
* walk (JS-exact stringify; root undefined/function prints
|
|
3054
|
+
* "undefined"; a handle in the tree throws the loud fence). */
|
|
3055
|
+
"insp.jsonDyn": { argTypes: [DYN], result: STRING },
|
|
3056
|
+
"insp.str": { argTypes: [STRING], result: STRING },
|
|
3057
|
+
"insp.regex": { argTypes: [REGEX], result: STRING },
|
|
3058
|
+
"insp.buffer": { argTypes: [BYTES_U8], result: STRING },
|
|
3059
|
+
"insp.error": { argTypes: [null, F64, F64], result: STRING },
|
|
3060
|
+
"insp.dyn": { argTypes: [DYN, F64, F64], result: STRING },
|
|
3061
|
+
"insp.dynS": { argTypes: [DYN, F64], result: STRING },
|
|
3062
|
+
"insp.jsval": { argTypes: [JSVAL, F64, F64], result: STRING },
|
|
3063
|
+
"insp.begin": { argTypes: [F64], result: VOID },
|
|
3064
|
+
"insp.entry": { argTypes: [STRING, BOOL], result: VOID },
|
|
3065
|
+
// Circular references: the receiver slot is program-dependent (any
|
|
3066
|
+
// cycle-capable record/array/map/class type — the insp.error precedent).
|
|
3067
|
+
/* Circular references over cycle-capable composites (recursive record/
|
|
3068
|
+
* class types): circCheck answers a value's circular id when it is
|
|
3069
|
+
* already on the traversal stack (0 otherwise), seenPush/refWrap
|
|
3070
|
+
* bracket the frame (refWrap adds Node's "<ref *N> " prefix to values
|
|
3071
|
+
* the walk found circular), circular renders "[Circular *N]". */
|
|
3072
|
+
"insp.circCheck": { argTypes: [null], result: F64 },
|
|
3073
|
+
"insp.seenPush": { argTypes: [null], result: VOID },
|
|
3074
|
+
"insp.refWrap": { argTypes: [null, STRING], result: STRING },
|
|
3075
|
+
"insp.circular": { argTypes: [F64], result: STRING },
|
|
3076
|
+
"insp.key": { argTypes: [STRING], result: STRING },
|
|
3077
|
+
"insp.moreItems": { argTypes: [F64], result: STRING },
|
|
3078
|
+
"insp.end": { argTypes: [STRING, STRING, STRING, F64, BOOL, BOOL], result: STRING },
|
|
3079
|
+
/** node:string_decoder's utf8 StringDecoder (scr_string.c): the decoder
|
|
3080
|
+
* value is a one-field record whose f64 PACKS the pending partial
|
|
3081
|
+
* sequence (count + up to 3 raw bytes — Node buffers at most 3 for
|
|
3082
|
+
* every encoding); the frontend's interned %strdec helpers thread it,
|
|
3083
|
+
* with the decoder's CANONICAL encoding name first, through these pure
|
|
3084
|
+
* functions. write: (enc, pending, chunk) → the decoded complete
|
|
3085
|
+
* prefix of pending+chunk (+1); next: (enc, pending, chunk) → the
|
|
3086
|
+
* packed NEW pending; end: (enc, pending) → the buffered partial's
|
|
3087
|
+
* flush (+1). Node-exact per encoding (oracle-pinned); none throws. */
|
|
3088
|
+
"strdec.write": { argTypes: [STRING, F64, BYTES_U8], result: STRING },
|
|
3089
|
+
"strdec.next": { argTypes: [STRING, F64, BYTES_U8], result: F64 },
|
|
3090
|
+
"strdec.end": { argTypes: [STRING, F64], result: STRING },
|
|
3091
|
+
// node:readline: the interface handle is f64; the callbacks' func types
|
|
3092
|
+
// are program-dependent (zero-param or (answer: string) — the emitter
|
|
3093
|
+
// picks the adapter), so those slots are null like child.onExit's.
|
|
3094
|
+
/** node:readline's question/close slice (scr_readline.c, linked under
|
|
3095
|
+
* the events gate — these fns imply moduleUsesProcessEvents). The
|
|
3096
|
+
* interface value is an f64 handle (the Timeout-id precedent).
|
|
3097
|
+
* rl.create: [] → f64 — createInterface({ input: process.stdin,
|
|
3098
|
+
* output: process.stdout }), registering the unit's shared stdin
|
|
3099
|
+
* consumer (an OPEN interface keeps the loop alive until close/EOF,
|
|
3100
|
+
* Node's semantics). rl.question: [handle, query, cb] — writes the
|
|
3101
|
+
* query to stdout (Node writes under pipes too) and delivers the next
|
|
3102
|
+
* line's text through a backend-picked adapter (zero-param or
|
|
3103
|
+
* (answer: string)); THROWS Node's "readline was closed" on a closed
|
|
3104
|
+
* interface (may-throw). rl.close: [handle] — fires 'close' listeners
|
|
3105
|
+
* SYNCHRONOUSLY (Node's inline emit) and detaches the consumer (the
|
|
3106
|
+
* loop stops waiting on fd 0). rl.onClose: [handle, cb] — a zero-arg
|
|
3107
|
+
* listener (moves); stdin EOF closes every open interface with the
|
|
3108
|
+
* buffered partial line DISCARDED, like Node. */
|
|
3109
|
+
"rl.create": { argTypes: [], result: F64 },
|
|
3110
|
+
"rl.question": { argTypes: [F64, STRING, null], result: VOID },
|
|
3111
|
+
"rl.close": { argTypes: [F64], result: VOID },
|
|
3112
|
+
"rl.onClose": { argTypes: [F64, null], result: VOID },
|
|
3113
|
+
/** node:timers/promises — the promisified pair (scr_async.c, beside
|
|
3114
|
+
* the timer heap they ride): tp.setTimeout: [ms] → a pending void
|
|
3115
|
+
* promise a one-shot heap timer fulfills (the loop's timer phase, FIFO
|
|
3116
|
+
* against equal deadlines like Node); tp.setImmediate: [] → the same
|
|
3117
|
+
* through the immediate queue (fires before due timers of later loop
|
|
3118
|
+
* turns, Node's check phase). Neither throws. */
|
|
3119
|
+
"tp.setTimeout": { argTypes: [F64], result: { kind: "promise", inner: VOID } },
|
|
3120
|
+
"tp.setImmediate": { argTypes: [], result: { kind: "promise", inner: VOID } },
|
|
3121
|
+
/** node:diagnostics_channel (scr_dc.c, linked when any dc.* appears —
|
|
3122
|
+
* the zlib gating precedent): a process-global name→channel registry;
|
|
3123
|
+
* channel values are f64 handles (type-mapper.ts maps Channel to F64, the
|
|
3124
|
+
* readline.Interface pattern). Subscribers are dyn function values —
|
|
3125
|
+
* identity-compared by unsubscribe, called (message, name) by publish
|
|
3126
|
+
* over a SNAPSHOT of the list (a subscriber unsubscribing itself
|
|
3127
|
+
* mid-publish still lets its siblings fire, Node's behavior). dc.publish
|
|
3128
|
+
* MAY THROW: a subscriber's throw propagates out of publish (catchable
|
|
3129
|
+
* there) where Node routes it to triggerUncaughtException — the
|
|
3130
|
+
* documented divergence. subscribe/unsubscribe throw Node's
|
|
3131
|
+
* ERR_INVALID_ARG_TYPE TypeError for non-function subscribers. */
|
|
3132
|
+
"dc.channel": { argTypes: [STRING], result: F64 },
|
|
3133
|
+
"dc.subscribe": { argTypes: [STRING, DYN], result: VOID },
|
|
3134
|
+
"dc.unsubscribe": { argTypes: [STRING, DYN], result: BOOL },
|
|
3135
|
+
"dc.hasSubscribers": { argTypes: [STRING], result: BOOL },
|
|
3136
|
+
"dc.publish": { argTypes: [F64, DYN], result: VOID },
|
|
3137
|
+
"dc.chanSubscribe": { argTypes: [F64, DYN], result: VOID },
|
|
3138
|
+
"dc.chanUnsubscribe": { argTypes: [F64, DYN], result: BOOL },
|
|
3139
|
+
"dc.chanHasSubscribers": { argTypes: [F64], result: BOOL },
|
|
3140
|
+
"dc.chanName": { argTypes: [F64], result: STRING },
|
|
3141
|
+
/** TracingChannel (dc.tracingChannel): a registry entry of the five
|
|
3142
|
+
* event channels, an f64 handle like Channel (type-mapper.ts). tcSubscribe/
|
|
3143
|
+
* tcUnsubscribe walk a dyn handlers object's five event keys (truthy
|
|
3144
|
+
* non-function slots throw the per-channel ERR_INVALID_ARG_TYPE);
|
|
3145
|
+
* tcTraceSync/tcTraceCallback/tcTracePromise run Node's publish choreography in C over
|
|
3146
|
+
* dyn values (fn, ctx, thisArg, args-array) with thisArg bound as the
|
|
3147
|
+
* ambient receiver — the traced call's throw and any subscriber throw
|
|
3148
|
+
* both propagate (MAY THROW). tcTraceCallback wraps args[position] in a
|
|
3149
|
+
* native error/result + asyncStart/asyncEnd publisher and throws Node's
|
|
3150
|
+
* TypeError when that slot is not callable. tracingChannelOf is the
|
|
3151
|
+
* five-Channel collection form of the constructor. */
|
|
3152
|
+
/** setImmediate as a first-class dyn value (scr_async.c): a minted dyn
|
|
3153
|
+
* callable scheduling args[0](args[1..]) on the immediate queue — the
|
|
3154
|
+
* Node-suite traceCallback shape (`traceCallback(setImmediate, ...)`).
|
|
3155
|
+
* Calling it validates the callback (the dyn call machinery); minting
|
|
3156
|
+
* never throws. */
|
|
3157
|
+
"timers.setImmediateFnValue": { argTypes: [], result: DYN },
|
|
3158
|
+
/** `new Promise(setImmediate)` (the Node-suite early-exit shape): a
|
|
3159
|
+
* fresh promise an immediate fulfills with the undefined dyn value —
|
|
3160
|
+
* the executor IS setImmediate, so resolve rides the immediate queue
|
|
3161
|
+
* (scr_async.c). Never throws. */
|
|
3162
|
+
"timers.immediatePromise": { argTypes: [], result: { kind: "promise", inner: DYN } },
|
|
3163
|
+
"dc.tracingChannel": { argTypes: [STRING], result: F64 },
|
|
3164
|
+
"dc.tracingChannelOf": { argTypes: [F64, F64, F64, F64, F64], result: F64 },
|
|
3165
|
+
"dc.tcChannel": { argTypes: [F64, F64], result: F64 },
|
|
3166
|
+
"dc.tcHasSubscribers": { argTypes: [F64], result: BOOL },
|
|
3167
|
+
"dc.tcSubscribe": { argTypes: [F64, DYN], result: VOID },
|
|
3168
|
+
"dc.tcUnsubscribe": { argTypes: [F64, DYN], result: BOOL },
|
|
3169
|
+
"dc.tcTraceSync": { argTypes: [F64, DYN, DYN, DYN, DYN], result: DYN },
|
|
3170
|
+
"dc.tcTraceCallback": { argTypes: [F64, DYN, F64, DYN, DYN, DYN], result: DYN },
|
|
3171
|
+
/** tracePromise (scr_dc.c): start publish, the traced call, a wrap of
|
|
3172
|
+
* non-promise results, the end publish, and a REACTION FIBER that
|
|
3173
|
+
* awaits the traced promise and publishes asyncStart/asyncEnd (error
|
|
3174
|
+
* first on rejection) before settling the returned promise<dyn> with
|
|
3175
|
+
* the passed-through outcome. MAY THROW (the traced call and the
|
|
3176
|
+
* synchronous publishes). */
|
|
3177
|
+
"dc.tcTracePromise": {
|
|
3178
|
+
argTypes: [F64, DYN, DYN, DYN, DYN],
|
|
3179
|
+
result: { kind: "promise", inner: DYN },
|
|
3180
|
+
},
|
|
3181
|
+
/** process.on/once('unhandledRejection', fn): registers a dyn listener
|
|
3182
|
+
* the checkpoint report dispatches per never-observed rejection —
|
|
3183
|
+
* (reason, promise) — instead of printing and exiting 1 (scr_async.c).
|
|
3184
|
+
* The bool second arg is `once` (auto-removed after one delivery,
|
|
3185
|
+
* Node's once); off/removeListener remove by closure identity, the
|
|
3186
|
+
* offWarning stance. Throws Node's ERR_INVALID_ARG_TYPE on a
|
|
3187
|
+
* non-function. */
|
|
3188
|
+
/** Uncaught exception handlers and monitors: [callback dyn, once, monitor]. */
|
|
3189
|
+
"process.onUncaughtException": { argTypes: [DYN, BOOL, BOOL], result: VOID },
|
|
3190
|
+
"process.offUncaughtException": { argTypes: [DYN, BOOL], result: VOID },
|
|
3191
|
+
"process.onUnhandledRejection": { argTypes: [DYN, BOOL], result: VOID },
|
|
3192
|
+
"process.offUnhandledRejection": { argTypes: [DYN], result: VOID },
|
|
3193
|
+
/** process.on/once/off('rejectionHandled', fn): the sibling registry.
|
|
3194
|
+
* A handler attached after unhandledRejection delivery fires the event
|
|
3195
|
+
* once. Dispatch is synchronous at the attach, with the promise,
|
|
3196
|
+
* Node's payload. */
|
|
3197
|
+
"process.onRejectionHandled": { argTypes: [DYN, BOOL], result: VOID },
|
|
3198
|
+
"process.offRejectionHandled": { argTypes: [DYN], result: VOID },
|
|
3199
|
+
/** process warnings (scr_lib.c): onWarning/offWarning register dyn
|
|
3200
|
+
* listeners; emitWarning applies Node's full argument grammar over the
|
|
3201
|
+
* call's dyn argument vector (ERR_INVALID_ARG_TYPE TypeErrors — MAY
|
|
3202
|
+
* THROW; a listener throw propagates too) and always prints Node's
|
|
3203
|
+
* stderr report. Emission is synchronous (SEMANTICS.md). */
|
|
3204
|
+
"process.onWarning": { argTypes: [DYN], result: VOID },
|
|
3205
|
+
"process.offWarning": { argTypes: [DYN], result: VOID },
|
|
3206
|
+
"process.emitWarning": { argTypes: [DYN], result: VOID },
|
|
3207
|
+
/** AsyncLocalStorage (node:async_hooks — scr_async.c): stores are f64
|
|
3208
|
+
* handles; contexts are immutable fiber-carried snapshots (spawned
|
|
3209
|
+
* fibers inherit the spawner's — Node's init-time capture). run/exit
|
|
3210
|
+
* enter (or clear) the store, call the dyn function with forwarded
|
|
3211
|
+
* arguments, and restore (the finally); getStore answers the current
|
|
3212
|
+
* dyn value or undefined; enterWith installs with no restore point.
|
|
3213
|
+
* run/exit MAY THROW (the callback's own throws propagate). */
|
|
3214
|
+
/** `await v` over a checked-dynamic VALUE (scr_async.c): a dyn promise
|
|
3215
|
+
* adopts (rejections re-throw — MAY THROW), anything else takes JS's
|
|
3216
|
+
* one-microtask non-thenable await and answers itself. Only emitted
|
|
3217
|
+
* inside async bodies (the frontend's isAsync gate). */
|
|
3218
|
+
"async.awaitDyn": { argTypes: [DYN], result: DYN },
|
|
3219
|
+
/** The bare one-microtask hop (scr_await_hop): `await v` over a typed
|
|
3220
|
+
* NON-promise value — JS awaits non-thenables through exactly one
|
|
3221
|
+
* microtask turn and yields the value itself. Never throws. */
|
|
3222
|
+
"async.hop": { argTypes: [], result: VOID },
|
|
3223
|
+
"als.new": { argTypes: [], result: F64 },
|
|
3224
|
+
"als.get": { argTypes: [F64], result: DYN },
|
|
3225
|
+
"als.run": { argTypes: [F64, DYN, DYN, DYN], result: DYN },
|
|
3226
|
+
"als.exitRun": { argTypes: [F64, DYN, DYN], result: DYN },
|
|
3227
|
+
"als.enterWith": { argTypes: [F64, DYN], result: VOID },
|
|
3228
|
+
"als.disable": { argTypes: [F64], result: VOID },
|
|
3229
|
+
/** Channel.bindStore/unbindStore/runStores (scr_dc.c): the
|
|
3230
|
+
* AsyncLocalStorage integration — set-semantics bindings per store,
|
|
3231
|
+
* runStores entering every bound store with transform(data) around the
|
|
3232
|
+
* publish and the callback (MAY THROW: transforms, subscribers, and
|
|
3233
|
+
* the callback all run). */
|
|
3234
|
+
"dc.chanBindStore": { argTypes: [F64, F64, DYN], result: VOID },
|
|
3235
|
+
"dc.chanUnbindStore": { argTypes: [F64, F64], result: BOOL },
|
|
3236
|
+
"dc.chanRunStores": { argTypes: [F64, DYN, DYN, DYN, DYN], result: DYN },
|
|
3237
|
+
/** The Number statics with a static C implementation (scr_lib.c): one
|
|
3238
|
+
* f64 arg → bool, JS-exact BY CONSTRUCTION — Number.isFinite/isNaN/
|
|
3239
|
+
* isInteger/isSafeInteger never coerce, and the frontend routes only
|
|
3240
|
+
* f64-typed arguments here (other static types fence). None throws. */
|
|
3241
|
+
"number.isFinite": { argTypes: [F64], result: BOOL },
|
|
3242
|
+
"number.isNaN": { argTypes: [F64], result: BOOL },
|
|
3243
|
+
"number.isInteger": { argTypes: [F64], result: BOOL },
|
|
3244
|
+
"number.isSafeInteger": { argTypes: [F64], result: BOOL },
|
|
3245
|
+
/** Date (scr_lib.c). Values are TimeClip'd epoch-millisecond scalars:
|
|
3246
|
+
* construction/store/pass/getters are exact while identity and mutation
|
|
3247
|
+
* remain fenced. date.now is Node's integer milliseconds since epoch;
|
|
3248
|
+
* date.toISOString formats one raw f64 millisecond time value and
|
|
3249
|
+
* date.toISOStringValue formats a stored Date, both with Node's rules (UTC,
|
|
3250
|
+
* YYYY-MM-DDTHH:mm:ss.sssZ, expanded ±YYYYYY years outside 0–9999,
|
|
3251
|
+
* ToInteger truncation of fractional ms) and THROWS Node's "Invalid
|
|
3252
|
+
* time value" RangeError on NaN / out-of-range input (may-throw seed).
|
|
3253
|
+
* Results: f64 / owned (+1) string. */
|
|
3254
|
+
"date.now": { argTypes: [], result: F64 },
|
|
3255
|
+
"date.newNow": { argTypes: [], result: DATE_T },
|
|
3256
|
+
"date.newMs": { argTypes: [F64], result: DATE_T },
|
|
3257
|
+
"date.newString": { argTypes: [STRING], result: DATE_T },
|
|
3258
|
+
/** Date.parse(dateString), with its own reach witness for exact fences. */
|
|
3259
|
+
"date.parse": { argTypes: [STRING], result: F64 },
|
|
3260
|
+
"date.getTime": { argTypes: [DATE_T], result: F64 },
|
|
3261
|
+
"date.valueOf": { argTypes: [DATE_T], result: F64 },
|
|
3262
|
+
"date.toISOString": { argTypes: [F64], result: STRING },
|
|
3263
|
+
"date.toISOStringValue": { argTypes: [DATE_T], result: STRING },
|
|
3264
|
+
"date.getFullYear": { argTypes: [DATE_T], result: F64 },
|
|
3265
|
+
"date.getUTCFullYear": { argTypes: [DATE_T], result: F64 },
|
|
3266
|
+
"date.getMonth": { argTypes: [DATE_T], result: F64 },
|
|
3267
|
+
"date.getUTCMonth": { argTypes: [DATE_T], result: F64 },
|
|
3268
|
+
"date.getDate": { argTypes: [DATE_T], result: F64 },
|
|
3269
|
+
"date.getUTCDate": { argTypes: [DATE_T], result: F64 },
|
|
3270
|
+
"date.getDay": { argTypes: [DATE_T], result: F64 },
|
|
3271
|
+
"date.getUTCDay": { argTypes: [DATE_T], result: F64 },
|
|
3272
|
+
"date.getHours": { argTypes: [DATE_T], result: F64 },
|
|
3273
|
+
"date.getUTCHours": { argTypes: [DATE_T], result: F64 },
|
|
3274
|
+
"date.getMinutes": { argTypes: [DATE_T], result: F64 },
|
|
3275
|
+
"date.getUTCMinutes": { argTypes: [DATE_T], result: F64 },
|
|
3276
|
+
"date.getSeconds": { argTypes: [DATE_T], result: F64 },
|
|
3277
|
+
"date.getUTCSeconds": { argTypes: [DATE_T], result: F64 },
|
|
3278
|
+
"date.getMilliseconds": { argTypes: [DATE_T], result: F64 },
|
|
3279
|
+
"date.getUTCMilliseconds": { argTypes: [DATE_T], result: F64 },
|
|
3280
|
+
"date.getTimezoneOffset": { argTypes: [DATE_T], result: F64 },
|
|
3281
|
+
/** The composed `new Date(dateString).getTime()` read: one borrowed
|
|
3282
|
+
* string, f64 milliseconds since epoch. The parsed grammar is BOUNDED
|
|
3283
|
+
* (documented divergence — V8's parser accepts far more): the ASN.1
|
|
3284
|
+
* validity shape X509Certificate.validFrom/validTo answer ("Jul 1
|
|
3285
|
+
* 00:00:00 2026 GMT" — the portless cert-expiry read), and ECMA's own
|
|
3286
|
+
* date-time string format (YYYY-MM-DD[THH:mm[:ss[.sss]]][Z|±HH:MM] —
|
|
3287
|
+
* date-only forms are UTC, exactly the spec). Anything else is NaN,
|
|
3288
|
+
* Node's invalid-date getTime. Never throws. */
|
|
3289
|
+
"date.parseGetTime": { argTypes: [STRING], result: F64 },
|
|
3290
|
+
/** `Date.UTC(...)` — seven f64 arguments (the frontend completes the
|
|
3291
|
+
* spec's defaults for omitted trailing parts: month 0, date 1, time
|
|
3292
|
+
* parts 0), the spec's MakeDay/MakeTime/TimeClip exactly: 0–99 years
|
|
3293
|
+
* map to 1900+year, out-of-range months/dates roll over, non-finite
|
|
3294
|
+
* parts and out-of-range results answer NaN. Never throws. */
|
|
3295
|
+
"date.utc": { argTypes: [F64, F64, F64, F64, F64, F64, F64], result: F64 },
|
|
3296
|
+
/** WHATWG TextDecoder.decode over u8 bytes (scr_bytes.c): utf-8 with
|
|
3297
|
+
* default options — the same maximal-subpart replacement decode as
|
|
3298
|
+
* Buffer.toString("utf8"), with the leading BOM stripped (the one
|
|
3299
|
+
* behavioral difference; ignoreBOM defaults to false). Inline calls
|
|
3300
|
+
* lower directly; stored decoder records dispatch by encoding id.
|
|
3301
|
+
* TextEncoder.encode needs no libFn: its matching forms
|
|
3302
|
+
* lower to buffer.fromStr(s, "utf8") (identical bytes — ScrStr storage
|
|
3303
|
+
* is well-formed UTF-8). Borrowed arg; owned (+1) string; never throws. */
|
|
3304
|
+
"text.decode": { argTypes: [BYTES_U8], result: STRING },
|
|
3305
|
+
"bytes.bufferSource": { argTypes: [DYN], result: BYTES_U8 },
|
|
3306
|
+
"text.decodeBufferSource": { argTypes: [DYN], result: STRING },
|
|
3307
|
+
"text.decodeOptions": { argTypes: [BYTES_U8, BOOL, BOOL], result: STRING },
|
|
3308
|
+
"text.decodeStream": { argTypes: [DYN, BYTES_U8, F64, BOOL, BOOL, BOOL], result: STRING },
|
|
3309
|
+
"text.decodeLegacyOptions": { argTypes: [BYTES_U8, F64, BOOL, BOOL], result: STRING },
|
|
3310
|
+
/** TextDecoder.decode for a compile-time non-UTF-8 WHATWG label. The
|
|
3311
|
+
* second f64 is the frontend-owned encoding id consumed by scr_bytes.c;
|
|
3312
|
+
* label aliases/case/ASCII whitespace are canonicalized before IR. The
|
|
3313
|
+
* mapping tables are generated from the pinned Node 24 oracle, keeping
|
|
3314
|
+
* output portable without an ICU/iconv dependency. Borrowed args; owned
|
|
3315
|
+
* (+1) string; never throws. */
|
|
3316
|
+
"text.decodeLegacy": { argTypes: [BYTES_U8, F64], result: STRING },
|
|
3317
|
+
"text.decoderEncoding": { argTypes: [DYN], result: F64 },
|
|
3318
|
+
"text.decoderName": { argTypes: [F64], result: STRING },
|
|
3319
|
+
"text.encodeInto": { argTypes: [DYN, DYN], result: DYN },
|
|
3320
|
+
"buffer.isAscii": { argTypes: [DYN], result: BOOL },
|
|
3321
|
+
"buffer.isUtf8": { argTypes: [DYN], result: BOOL },
|
|
3322
|
+
"buffer.transcode": { argTypes: [DYN, DYN, DYN], result: BYTES_U8 },
|
|
3323
|
+
/** The fs option forms and friends (scr_lib.c), all throwing catchably
|
|
3324
|
+
* like the rest of sync fs. mkdirRecursiveSync is Node's recursive
|
|
3325
|
+
* algorithm (try mkdir, EEXIST-dir is fine, ENOENT creates the parent
|
|
3326
|
+
* first — errors report Node's errno at Node's path, EEXIST at a file
|
|
3327
|
+
* target, ENOTDIR at the full path past a file); the first-created-dir
|
|
3328
|
+
* return value has no lowering (statement position only, frontend-
|
|
3329
|
+
* fenced). rmOptsSync is rmSync with (recursive, force) bools: force
|
|
3330
|
+
* swallows ENOENT, recursive removes trees post-order, a directory
|
|
3331
|
+
* without recursive throws the EISDIR-worded error (divergence 13's
|
|
3332
|
+
* wording note). mkdtempSync appends the six X's and returns the
|
|
3333
|
+
* created path (+1). accessSync takes the F_OK/R_OK/W_OK/X_OK bits as
|
|
3334
|
+
* one f64 (the frontend bakes fs.constants.* as literals and completes
|
|
3335
|
+
* an omitted mode to 0). readFdSync/readFdSyncBytes are the
|
|
3336
|
+
* readFileSync(fd[, "utf8"]) forms — a read(2) loop to EOF on the fd
|
|
3337
|
+
* (the stdin path); errors carry Node's no-path message shape. */
|
|
3338
|
+
"fs.mkdirRecursiveSync": { argTypes: [STRING], result: VOID },
|
|
3339
|
+
"fs.rmOptsSync": { argTypes: [STRING, BOOL, BOOL], result: VOID },
|
|
3340
|
+
/** rmOptsSync's maxRetries/retryDelay form (path, recursive, force,
|
|
3341
|
+
* maxRetries, retryDelay): Node's linear-backoff retry on
|
|
3342
|
+
* EBUSY/EMFILE/ENFILE/ENOTEMPTY/EPERM — the tmpdir-harness shape
|
|
3343
|
+
* rmSync(p, { maxRetries: 3, recursive: true, force: true }). */
|
|
3344
|
+
"fs.rmRetrySync": { argTypes: [STRING, BOOL, BOOL, F64, F64], result: VOID },
|
|
3345
|
+
"fs.mkdtempSync": { argTypes: [STRING], result: STRING },
|
|
3346
|
+
"fs.accessSync": { argTypes: [STRING, F64], result: VOID },
|
|
3347
|
+
"fs.readFdSync": { argTypes: [F64, STRING], result: STRING },
|
|
3348
|
+
"fs.readFdSyncBytes": { argTypes: [F64], result: BYTES_U8 },
|
|
3349
|
+
/** isatty(3) over an fd literal (0/1/2 — process.stdin/stdout/stderr
|
|
3350
|
+
* .isTTY reads). A real boolean: false where Node's non-TTY streams
|
|
3351
|
+
* expose undefined (documented divergence). Never throws. */
|
|
3352
|
+
"process.isTTY": { argTypes: [F64], result: BOOL },
|
|
3353
|
+
// Like process.envGet: the result is the module's interned
|
|
3354
|
+
// `number | undefined` union — checked by arms in the libCall case.
|
|
3355
|
+
/** Terminal width over an fd literal (1/2 — process.stdout/stderr
|
|
3356
|
+
* .columns): ioctl(TIOCGWINSZ). The result is the module's interned
|
|
3357
|
+
* `number | undefined` union — a non-TTY stream (or an ioctl refusal)
|
|
3358
|
+
* yields the undefined arm, exactly Node's missing `.columns`. Never
|
|
3359
|
+
* throws. */
|
|
3360
|
+
"process.columns": { argTypes: [F64], result: VOID },
|
|
3361
|
+
/** Terminal height, with the same fd and optional-number contract. */
|
|
3362
|
+
"process.rows": { argTypes: [F64], result: VOID },
|
|
3363
|
+
/** process.stdin.destroy(): a deliberate no-op (no stream machinery
|
|
3364
|
+
* exists to tear down; documented in SEMANTICS.md). */
|
|
3365
|
+
"process.stdinDestroy": { argTypes: [], result: VOID },
|
|
3366
|
+
/** process.stdin.setRawMode(mode) — one borrowed bool arg, void. On a
|
|
3367
|
+
* TTY stdin: termios raw mode on/off (libuv's UV_TTY_MODE_RAW flag set,
|
|
3368
|
+
* the mode Node's setRawMode(true) applies; false restores the entry
|
|
3369
|
+
* state). On a NON-TTY stdin Node's process.stdin has no such method at
|
|
3370
|
+
* all, so the call throws Node's exact catchable TypeError
|
|
3371
|
+
* ("process.stdin.setRawMode is not a function") — the may-throw seed
|
|
3372
|
+
* carries it. */
|
|
3373
|
+
"process.stdinSetRawMode": { argTypes: [BOOL], result: VOID },
|
|
3374
|
+
// Arg 0 is a packed f64[] OR a bytes value (the spread-typed-array
|
|
3375
|
+
// form) — checked in the libCall case.
|
|
3376
|
+
/** fromCharCode takes one packed f64[] or bytes arg and builds a string
|
|
3377
|
+
* from UTF-16 code units. Adjacent surrogate pairs combine; lone
|
|
3378
|
+
* surrogates follow the runtime's replacement policy. */
|
|
3379
|
+
"string.fromCharCode": { argTypes: [null], result: STRING },
|
|
3380
|
+
/** Numeric code points, with catchable RangeError for non-integers or
|
|
3381
|
+
* values outside 0..0x10ffff. Uses the same UTF-8 surrogate policy. */
|
|
3382
|
+
"string.fromCodePoint": { argTypes: [null], result: STRING },
|
|
3383
|
+
/** lastIndexOf returns the last UTF-16 start index, or -1. The two-arg
|
|
3384
|
+
* form searches at or before its numeric position; NaN starts at the end.
|
|
3385
|
+
* String arguments are borrowed and neither form throws. */
|
|
3386
|
+
"string.lastIndexOf": { argTypes: [STRING, STRING], result: F64 },
|
|
3387
|
+
"string.lastIndexOfFrom": { argTypes: [STRING, STRING, F64], result: F64 },
|
|
3388
|
+
/** String.raw(template, ...subs): the raw literals array (a string[]
|
|
3389
|
+
* read off the template record) interleaved with the PRE-STRINGIFIED
|
|
3390
|
+
* substitutions (the frontend applies the static ToString and packs
|
|
3391
|
+
* them into one string[] literal) — extra substitutions drop, missing
|
|
3392
|
+
* ones skip, the spec's loop exactly (scr_array.c). Borrowed args;
|
|
3393
|
+
* +1 string; never throws. */
|
|
3394
|
+
"string.raw": { argTypes: [arrayOf(STRING), arrayOf(STRING)], result: STRING },
|
|
3395
|
+
});
|
|
3396
|
+
//# sourceMappingURL=builtin-signatures.js.map
|