@scriptc/compiler 0.2.4 → 0.2.6
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 +972 -245
- 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 +3 -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.d.ts +2 -0
- package/dist/backend/link-plan-core.js +10 -2
- package/dist/backend/link-plan-core.js.map +1 -1
- package/dist/backend/link-plan.d.ts +2 -1
- package/dist/backend/link-plan.js +7 -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 +38 -5
- package/dist/backend/llvm/byte-numbers.js.map +1 -1
- package/dist/backend/llvm/byte-windows.d.ts +31 -0
- package/dist/backend/llvm/byte-windows.js +334 -0
- package/dist/backend/llvm/byte-windows.js.map +1 -0
- package/dist/backend/llvm/byte-windows.test.d.ts +1 -0
- package/dist/backend/llvm/byte-windows.test.js +244 -0
- package/dist/backend/llvm/byte-windows.test.js.map +1 -0
- 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 +5 -2
- package/dist/backend/llvm/call-lifetimes.js +72 -19
- 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.d.ts +14 -1
- package/dist/backend/llvm/classes.js +94 -19
- package/dist/backend/llvm/classes.js.map +1 -1
- package/dist/backend/llvm/classes.test.d.ts +1 -0
- package/dist/backend/llvm/classes.test.js +99 -0
- package/dist/backend/llvm/classes.test.js.map +1 -0
- package/dist/backend/llvm/common.js +4 -1
- package/dist/backend/llvm/common.js.map +1 -1
- package/dist/backend/llvm/constant-callbacks.d.ts +11 -0
- package/dist/backend/llvm/constant-callbacks.js +213 -0
- package/dist/backend/llvm/constant-callbacks.js.map +1 -0
- package/dist/backend/llvm/constant-callbacks.test.d.ts +1 -0
- package/dist/backend/llvm/constant-callbacks.test.js +124 -0
- package/dist/backend/llvm/constant-callbacks.test.js.map +1 -0
- 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.d.ts +1 -1
- package/dist/backend/llvm/dyn.js +75 -56
- package/dist/backend/llvm/dyn.js.map +1 -1
- package/dist/backend/llvm/emitter.d.ts +28 -3
- package/dist/backend/llvm/emitter.js +506 -145
- package/dist/backend/llvm/emitter.js.map +1 -1
- package/dist/backend/llvm/emitter.test.js +247 -50
- 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 +24 -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 +110 -31
- 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 +112 -41
- 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 +55 -7
- 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 +95 -19
- package/dist/backend/llvm/expr-primitives.js.map +1 -1
- package/dist/backend/llvm/expr-primitives.test.js +44 -2
- 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-remainder.d.ts +7 -0
- package/dist/backend/llvm/integer-remainder.js +26 -0
- package/dist/backend/llvm/integer-remainder.js.map +1 -0
- 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/layouts.js +1 -1
- package/dist/backend/llvm/layouts.js.map +1 -1
- package/dist/backend/llvm/lib-abi.js +20 -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 +42 -38
- 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 +122 -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 +9 -2
- package/dist/backend/llvm/local-array-reads.js +176 -89
- package/dist/backend/llvm/local-array-reads.js.map +1 -1
- package/dist/backend/llvm/local-array-reads.test.js +394 -62
- 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/loop-array-borrows.d.ts +11 -0
- package/dist/backend/llvm/loop-array-borrows.js +70 -0
- package/dist/backend/llvm/loop-array-borrows.js.map +1 -0
- package/dist/backend/llvm/loop-array-borrows.test.d.ts +1 -0
- package/dist/backend/llvm/loop-array-borrows.test.js +145 -0
- package/dist/backend/llvm/loop-array-borrows.test.js.map +1 -0
- package/dist/backend/llvm/map-read-lifetimes.d.ts +11 -2
- package/dist/backend/llvm/map-read-lifetimes.js +64 -19
- 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 +5 -3
- package/dist/backend/llvm/reference-effects.js +74 -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.d.ts +4 -1
- package/dist/backend/llvm/shapes.js +82 -24
- 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-loops.d.ts +48 -0
- package/dist/backend/llvm/split-loops.js +183 -0
- package/dist/backend/llvm/split-loops.js.map +1 -0
- package/dist/backend/llvm/split.js +4 -11
- package/dist/backend/llvm/split.js.map +1 -1
- package/dist/backend/llvm/split.test.js +80 -8
- package/dist/backend/llvm/split.test.js.map +1 -1
- package/dist/backend/llvm/stack-callbacks.d.ts +14 -0
- package/dist/backend/llvm/stack-callbacks.js +73 -0
- package/dist/backend/llvm/stack-callbacks.js.map +1 -0
- package/dist/backend/llvm/stack-captures.d.ts +25 -0
- package/dist/backend/llvm/stack-captures.js +150 -0
- package/dist/backend/llvm/stack-captures.js.map +1 -0
- 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 +119 -29
- package/dist/backend/llvm/string-lifetimes.test.js.map +1 -1
- package/dist/backend/llvm/string-slices.d.ts +20 -0
- package/dist/backend/llvm/string-slices.js +87 -0
- package/dist/backend/llvm/string-slices.js.map +1 -0
- package/dist/backend/llvm/string-slices.test.d.ts +1 -0
- package/dist/backend/llvm/string-slices.test.js +98 -0
- package/dist/backend/llvm/string-slices.test.js.map +1 -0
- 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.d.ts +4 -14
- package/dist/backend/llvm/walkers.js +58 -313
- 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 +119 -23
- 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 +316 -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 +1275 -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 +165 -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.d.ts +6 -0
- package/dist/backend/native-codegen-core.js +23 -1
- package/dist/backend/native-codegen-core.js.map +1 -1
- package/dist/backend/native-codegen.d.ts +5 -1
- package/dist/backend/native-codegen.js +52 -25
- package/dist/backend/native-codegen.js.map +1 -1
- package/dist/backend/native-codegen.test.js +59 -11
- package/dist/backend/native-codegen.test.js.map +1 -1
- package/dist/backend/native-link-info-core.d.ts +1 -0
- 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.d.ts +3 -1
- package/dist/backend/native-tools.js +30 -9
- 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-abi.d.ts +2 -2
- package/dist/backend/runtime-abi.js +2 -2
- package/dist/backend/runtime-pack-core.d.ts +1 -0
- package/dist/backend/runtime-pack-core.js +104 -50
- 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 +126 -17
- 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 +51 -25
- 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 +2 -1
- package/dist/executable/executable-cache.js +79 -48
- package/dist/executable/executable-cache.js.map +1 -1
- package/dist/executable/executable-cache.test.js +90 -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.d.ts +5 -0
- package/dist/frontend/fork-target.js +55 -18
- package/dist/frontend/fork-target.js.map +1 -1
- package/dist/frontend/fork-target.test.d.ts +1 -0
- package/dist/frontend/fork-target.test.js +59 -0
- package/dist/frontend/fork-target.test.js.map +1 -0
- 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 +6 -0
- package/dist/frontend/lowering/builtins/atomics.js +82 -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 +35 -0
- package/dist/frontend/lowering/builtins/filesystem-calls.js +725 -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 +308 -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/builtins/workers.d.ts +5 -0
- package/dist/frontend/lowering/builtins/workers.js +65 -0
- package/dist/frontend/lowering/builtins/workers.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-assertions.d.ts +7 -0
- package/dist/frontend/lowering/class-assertions.js +96 -0
- package/dist/frontend/lowering/class-assertions.js.map +1 -0
- 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-protocols.d.ts +17 -0
- package/dist/frontend/lowering/class-protocols.js +126 -0
- package/dist/frontend/lowering/class-protocols.js.map +1 -0
- 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 +88 -0
- package/dist/frontend/lowering/containers/array-callbacks.js +1611 -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 +430 -138
- 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 +601 -160
- 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 +588 -165
- 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 +271 -0
- package/dist/frontend/lowering/generic-functions.js +1730 -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/instantiation-path.d.ts +8 -0
- package/dist/frontend/lowering/instantiation-path.js +10 -0
- package/dist/frontend/lowering/instantiation-path.js.map +1 -0
- package/dist/frontend/lowering/instantiation-path.test.d.ts +1 -0
- package/dist/frontend/lowering/instantiation-path.test.js +23 -0
- package/dist/frontend/lowering/instantiation-path.test.js.map +1 -0
- 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 +430 -77
- 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 +2628 -5669
- package/dist/frontend/lowering/lower-calls.js.map +1 -1
- package/dist/frontend/lowering/lower-classes.d.ts +248 -242
- package/dist/frontend/lowering/lower-classes.js +1820 -775
- 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 +323 -86
- 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 +3473 -1160
- 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 +366 -274
- 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 +95 -94
- package/dist/frontend/lowering/lower-modules.js +655 -329
- 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 +2324 -994
- 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 +363 -91
- 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 +34 -352
- package/dist/frontend/lowering/lowerer.js +1074 -2712
- 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/split-consumers.d.ts +7 -0
- package/dist/frontend/lowering/split-consumers.js +64 -0
- package/dist/frontend/lowering/split-consumers.js.map +1 -0
- 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 +45 -46
- package/dist/frontend/lowering/surfaces.js +1129 -256
- 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-source-candidates.d.ts +10 -0
- package/dist/frontend/module-source-candidates.js +40 -0
- package/dist/frontend/module-source-candidates.js.map +1 -0
- package/dist/frontend/module-source-candidates.test.d.ts +1 -0
- package/dist/frontend/module-source-candidates.test.js +53 -0
- package/dist/frontend/module-source-candidates.test.js.map +1 -0
- 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-analysis.d.ts +2 -0
- package/dist/frontend/program-analysis.js +2 -0
- package/dist/frontend/program-analysis.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 +248 -127
- 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 +490 -172
- package/dist/frontend/ts7/ast-node.js.map +1 -1
- package/dist/frontend/ts7/ast-node.test.js +150 -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 +5 -1
- package/dist/frontend/ts7/ast-wire.js +83 -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.d.ts +2 -1
- package/dist/frontend/ts7/ast.js +53 -30
- 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.d.ts +8 -2
- package/dist/frontend/ts7/checker.js +46 -8
- package/dist/frontend/ts7/checker.js.map +1 -1
- package/dist/frontend/ts7/checker.test.js +96 -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.d.ts +7 -0
- package/dist/frontend/ts7/program-host.js +33 -6
- package/dist/frontend/ts7/program-host.js.map +1 -1
- package/dist/frontend/ts7/program-host.test.js +72 -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.d.ts +3 -0
- package/dist/frontend/type-mapper.js +589 -206
- 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/frontend/worker-target.d.ts +6 -0
- package/dist/frontend/worker-target.js +108 -0
- package/dist/frontend/worker-target.js.map +1 -0
- package/dist/frontend/worker-target.test.d.ts +1 -0
- package/dist/frontend/worker-target.test.js +71 -0
- package/dist/frontend/worker-target.test.js.map +1 -0
- package/dist/index.d.ts +9 -8
- package/dist/index.js +174 -88
- 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 +643 -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 +3397 -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 +15 -2160
- 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/numeric-call-specialization.d.ts +8 -0
- package/dist/ir/numeric-call-specialization.js +198 -0
- package/dist/ir/numeric-call-specialization.js.map +1 -0
- package/dist/ir/runtime-features.d.ts +221 -0
- package/dist/ir/runtime-features.js +552 -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.d.ts +1 -1
- package/dist/ir/serialize.js +7 -5
- 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 +869 -1910
- package/dist/ir/validate.js.map +1 -1
- package/dist/ir/validate.test.js +697 -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 +137 -61
- 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 +234 -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 +29 -18
- 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 +191 -54
- package/dist/native/compiler.js.map +1 -1
- package/dist/native/compiler.test.js +134 -33
- 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 +121 -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 +78 -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 +30 -2
- 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
package/dist/ir/validate.js
CHANGED
|
@@ -4,1588 +4,12 @@
|
|
|
4
4
|
* an ICE that points at source is a gift to whoever debugs it.
|
|
5
5
|
*/
|
|
6
6
|
import { validByteNumberToken } from "./byte-numbers.js";
|
|
7
|
-
import { arrayOf, BYTES_ELEMENT_NAME, BOOL, BYTES_U8, bytesOf, canAdaptDynFuncTo, canDynCheckTo, canConvertToDyn, canExitIslandToType, canMarshalIntoIsland, canMarshalTypedFuncIntoIsland,
|
|
8
|
-
import {
|
|
7
|
+
import { arrayOf, BYTES_ELEMENT_NAME, BOOL, BYTES_U8, bytesOf, canAdaptDynFuncTo, canDynCheckTo, canConvertToDyn, canExitIslandToType, canMarshalIntoIsland, canMarshalTypedFuncIntoIsland, DYN, DYN_HANDLE_KINDS, F64, ffiClassType, ffiSourceParamTypes, islandPromisePayloadTag, isDynTypedRefType, isFfiCallbackParam, isFfiContextParam, isFfiReleaseParam, isJsonSafeType, isJsonStringifySafeType, isRefCounted, isSupportedArrayElem, isSupportedIndexValue, isSupportedMapKey, isSupportedMapValue, isSupportedSetElem, isUnitType, jsOpResultKind, JSVAL, REF_TRUTHY_KINDS, RUNTIME_EMITTER_CLASS, RUNTIME_ERROR_CLASSES, RUNTIME_STREAM_CLASSES, shapeHasAccessorSlots, STRING, typeEquals, typeKey, unionContainerArmsOk, VOID, } from "./ir.js";
|
|
8
|
+
import { DYN_CLASS_PROPERTIES } from "./ir.js";
|
|
9
9
|
import { unionWideningTags } from "./analysis.js";
|
|
10
10
|
import { alwaysReturns } from "./control-flow.js";
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
* from the end (backends fill the documented defaults). Exported for the
|
|
14
|
-
* frontend's lib-boundary pass (lib-boundary.ts), which coerces or fences
|
|
15
|
-
* checked-dynamic arguments against the same table the validator enforces. */
|
|
16
|
-
export const STR_INTRINSIC_SIGS = {
|
|
17
|
-
length: { argTypes: [], minArgs: 0, result: F64 },
|
|
18
|
-
charCodeAt: { argTypes: [F64], minArgs: 1, result: F64 },
|
|
19
|
-
charAt: { argTypes: [F64], minArgs: 1, result: STRING },
|
|
20
|
-
indexOf: { argTypes: [STRING, F64], minArgs: 1, result: F64 },
|
|
21
|
-
includes: { argTypes: [STRING, F64], minArgs: 1, result: BOOL },
|
|
22
|
-
startsWith: { argTypes: [STRING, F64], minArgs: 1, result: BOOL },
|
|
23
|
-
endsWith: { argTypes: [STRING, F64], minArgs: 1, result: BOOL },
|
|
24
|
-
slice: { argTypes: [F64, F64], minArgs: 0, result: STRING },
|
|
25
|
-
substring: { argTypes: [F64, F64], minArgs: 1, result: STRING },
|
|
26
|
-
repeat: { argTypes: [F64], minArgs: 1, result: STRING },
|
|
27
|
-
trim: { argTypes: [], minArgs: 0, result: STRING },
|
|
28
|
-
trimStart: { argTypes: [], minArgs: 0, result: STRING },
|
|
29
|
-
trimEnd: { argTypes: [], minArgs: 0, result: STRING },
|
|
30
|
-
split: { argTypes: [STRING, F64], minArgs: 2, result: arrayOf(STRING) },
|
|
31
|
-
padStart: { argTypes: [F64, STRING], minArgs: 2, result: STRING },
|
|
32
|
-
padEnd: { argTypes: [F64, STRING], minArgs: 2, result: STRING },
|
|
33
|
-
toLowerCase: { argTypes: [], minArgs: 0, result: STRING },
|
|
34
|
-
toUpperCase: { argTypes: [], minArgs: 0, result: STRING },
|
|
35
|
-
normalize: { argTypes: [STRING], minArgs: 1, result: STRING },
|
|
36
|
-
isWellFormed: { argTypes: [], minArgs: 0, result: BOOL },
|
|
37
|
-
toWellFormed: { argTypes: [], minArgs: 0, result: STRING },
|
|
38
|
-
cpAt: { argTypes: [F64], minArgs: 1, result: STRING },
|
|
39
|
-
};
|
|
40
|
-
/** Per-method signature for regexIntrinsic. test/source/flags take the
|
|
41
|
-
* regex as receiver; replace/replaceAll/split take the STRING as receiver
|
|
42
|
-
* with the regex as args[0] (mirroring the source syntax). All positions
|
|
43
|
-
* are required — the surface has no optionals. */
|
|
44
|
-
export const REGEX_INTRINSIC_SIGS = {
|
|
45
|
-
test: { receiver: REGEX, argTypes: [STRING], result: BOOL },
|
|
46
|
-
// match's result is the program-dependent `string[] | null` union —
|
|
47
|
-
// VOID here is the process.envGet sentinel; the regexIntrinsic case
|
|
48
|
-
// checks the union's arms.
|
|
49
|
-
match: { receiver: STRING, argTypes: [REGEX], result: VOID },
|
|
50
|
-
exec: { receiver: STRING, argTypes: [REGEX], result: VOID },
|
|
51
|
-
lastIndex: { receiver: REGEX, argTypes: [], result: F64 },
|
|
52
|
-
matchAll: { receiver: STRING, argTypes: [REGEX], result: arrayOf(arrayOf(STRING)) },
|
|
53
|
-
matchAllInto: { receiver: STRING, argTypes: [REGEX, arrayOf(F64)], result: arrayOf(arrayOf(STRING)) },
|
|
54
|
-
search: { receiver: STRING, argTypes: [REGEX], result: F64 },
|
|
55
|
-
source: { receiver: REGEX, argTypes: [], result: STRING },
|
|
56
|
-
flags: { receiver: REGEX, argTypes: [], result: STRING },
|
|
57
|
-
toString: { receiver: REGEX, argTypes: [], result: STRING },
|
|
58
|
-
replace: { receiver: STRING, argTypes: [REGEX, STRING], result: STRING },
|
|
59
|
-
replaceAll: { receiver: STRING, argTypes: [REGEX, STRING], result: STRING },
|
|
60
|
-
split: { receiver: STRING, argTypes: [REGEX, F64], result: arrayOf(STRING) },
|
|
61
|
-
};
|
|
62
|
-
/** Closed-union signature table for `libCall` (mirrors ambient/scriptc.d.ts).
|
|
63
|
-
* All argument positions are required — the surface has no optionals.
|
|
64
|
-
* readFileSync's second argument is the (always-"utf8") encoding: it is
|
|
65
|
-
* evaluated for JS-exact side-effect order and ignored by the runtime.
|
|
66
|
-
* A `null` argument slot is program-dependent (a builtin-error receiver) —
|
|
67
|
-
* the libCall case checks it specially, like process.envGet's result.
|
|
68
|
-
* Exported for the frontend's lib-boundary pass (lib-boundary.ts). */
|
|
69
|
-
export const LIB_FN_SIGS = {
|
|
70
|
-
"fetch.start": { argTypes: [STRING, DYN], result: { kind: "promise", inner: DYN } },
|
|
71
|
-
"fetch.responseNew": { argTypes: [DYN, DYN], result: DYN },
|
|
72
|
-
"fetch.input": { argTypes: [DYN, DYN], result: { kind: "promise", inner: DYN } },
|
|
73
|
-
"abort.controllerNew": { argTypes: [], result: DYN },
|
|
74
|
-
"abort.timeout": { argTypes: [DYN], result: DYN },
|
|
75
|
-
"abort.now": { argTypes: [DYN], result: DYN },
|
|
76
|
-
"abort.any": { argTypes: [DYN], result: DYN },
|
|
77
|
-
"fetch.function": { argTypes: [], result: DYN },
|
|
78
|
-
"fetch.requestNew": { argTypes: [DYN, DYN], result: DYN },
|
|
79
|
-
"fetch.headersNew": { argTypes: [DYN], result: DYN },
|
|
80
|
-
"fetch.responseArrayBuffer": { argTypes: [DYN], result: { kind: "promise", inner: DYN } },
|
|
81
|
-
"fetch.responseJson": { argTypes: [DYN], result: { kind: "promise", inner: DYN } },
|
|
82
|
-
"fetch.responseText": { argTypes: [DYN], result: { kind: "promise", inner: STRING } },
|
|
83
|
-
"fetch.responseBytes": { argTypes: [DYN], result: { kind: "promise", inner: BYTES_U8 } },
|
|
84
|
-
"fetch.abortControllerNew": { argTypes: [], result: DYN },
|
|
85
|
-
"fetch.abortTimeout": { argTypes: [DYN], result: DYN },
|
|
86
|
-
"fetch.abortNow": { argTypes: [DYN], result: DYN },
|
|
87
|
-
"fetch.abortAny": { argTypes: [DYN], result: DYN },
|
|
88
|
-
"fetch.streamNew": { argTypes: [DYN], result: DYN },
|
|
89
|
-
// Program-dependent iterable: typed arrays/bytes/string stay intact so
|
|
90
|
-
// the native stream can pull lazily; checked-dynamic values are the
|
|
91
|
-
// fallback. The libCall validator below checks the closed set.
|
|
92
|
-
"fetch.webIs": { argTypes: [DYN, STRING], result: BOOL },
|
|
93
|
-
"fetch.streamIs": { argTypes: [DYN], result: BOOL },
|
|
94
|
-
"fetch.streamFrom": { argTypes: [null], result: DYN },
|
|
95
|
-
// The chunk/result record depends on ReadableStream<T>; validated below.
|
|
96
|
-
"fetch.readerRead": { argTypes: [DYN], result: VOID },
|
|
97
|
-
"island.eval": { argTypes: [STRING], result: STRING },
|
|
98
|
-
"island.import": { argTypes: [STRING, STRING, STRING], result: JSVAL },
|
|
99
|
-
"island.importDyn": { argTypes: [STRING], result: JSVAL },
|
|
100
|
-
// Result is the cast's mapped PROMISE target (program-dependent) —
|
|
101
|
-
// checked in the libCall case, like error.new.
|
|
102
|
-
"island.castFail": { argTypes: [JSVAL, STRING], result: VOID },
|
|
103
|
-
"json.parse": { argTypes: [STRING], result: DYN },
|
|
104
|
-
"json.parseReviver": { argTypes: [STRING, DYN], result: DYN },
|
|
105
|
-
"json.stringifyReplacer": { argTypes: [DYN, DYN, STRING], result: DYN },
|
|
106
|
-
"json.stringifyValue": { argTypes: [DYN, DYN, DYN], result: DYN },
|
|
107
|
-
"dyn.keySet": { argTypes: [DYN, STRING, DYN], result: VOID },
|
|
108
|
-
"dyn.keySetComputed": { argTypes: [DYN, DYN, DYN], result: VOID },
|
|
109
|
-
"dyn.keyDelete": { argTypes: [DYN, STRING, BOOL], result: VOID },
|
|
110
|
-
"dyn.keyDeleteComputed": { argTypes: [DYN, DYN, BOOL], result: VOID },
|
|
111
|
-
"dyn.hasKeyComputed": { argTypes: [DYN, DYN], result: BOOL },
|
|
112
|
-
"dyn.hasOwnComputed": { argTypes: [DYN, DYN], result: BOOL },
|
|
113
|
-
"dyn.propertyIsEnumerableComputed": { argTypes: [DYN, DYN], result: BOOL },
|
|
114
|
-
"dyn.globalSymbolGet": { argTypes: [SYMBOL_T], result: DYN },
|
|
115
|
-
"dyn.globalSymbolSet": { argTypes: [SYMBOL_T, DYN], result: VOID },
|
|
116
|
-
"dyn.globalSymbolHas": { argTypes: [SYMBOL_T], result: BOOL },
|
|
117
|
-
"dyn.globalSymbolDelete": { argTypes: [SYMBOL_T], result: VOID },
|
|
118
|
-
"dyn.typedRefIs": { argTypes: [DYN, STRING], result: BOOL },
|
|
119
|
-
"dyn.classIs": { argTypes: [DYN, STRING], result: BOOL },
|
|
120
|
-
"dyn.iterPack": { argTypes: [DYN, STRING], result: DYN },
|
|
121
|
-
"dyn.arrayFromIterator": { argTypes: [DYN], result: DYN },
|
|
122
|
-
"dyn.iterator": { argTypes: [DYN, STRING], result: DYN },
|
|
123
|
-
"dyn.iteratorResult": { argTypes: [DYN], result: DYN },
|
|
124
|
-
"dyn.mapSeedEntries": { argTypes: [DYN], result: DYN },
|
|
125
|
-
"dyn.mapSeedEntry": { argTypes: [DYN], result: DYN },
|
|
126
|
-
"dyn.arrLen": { argTypes: [DYN], result: F64 },
|
|
127
|
-
"dyn.arrAt": { argTypes: [DYN, F64], result: DYN },
|
|
128
|
-
"dyn.hasKey": { argTypes: [DYN, STRING], result: BOOL },
|
|
129
|
-
"dyn.freeze": { argTypes: [DYN], result: DYN },
|
|
130
|
-
"dyn.isFrozen": { argTypes: [DYN], result: BOOL },
|
|
131
|
-
"dyn.nativeSetNew": { argTypes: [DYN], result: DYN },
|
|
132
|
-
"dyn.nativeSetIs": { argTypes: [DYN], result: BOOL },
|
|
133
|
-
"dyn.nativeMapIs": { argTypes: [DYN], result: BOOL },
|
|
134
|
-
"dyn.nativeUrlIs": { argTypes: [DYN], result: BOOL },
|
|
135
|
-
"dyn.nativeDateIs": { argTypes: [DYN], result: BOOL },
|
|
136
|
-
"date.nativeNew": { argTypes: [DYN], result: DYN },
|
|
137
|
-
"date.checkedValue": { argTypes: [DYN], result: DATE_T },
|
|
138
|
-
"dyn.nativeRegexIs": { argTypes: [DYN], result: BOOL },
|
|
139
|
-
"dyn.toString": { argTypes: [DYN, DYN, STRING], result: STRING },
|
|
140
|
-
"dyn.defineProps": { argTypes: [DYN, DYN], result: DYN },
|
|
141
|
-
"dyn.defineProperty": { argTypes: [DYN, DYN, DYN], result: DYN },
|
|
142
|
-
"dyn.getOwnPropertyDescriptor": { argTypes: [DYN, DYN], result: DYN },
|
|
143
|
-
"dyn.arrayProtoCall": { argTypes: [DYN, STRING, DYN], result: DYN },
|
|
144
|
-
"dyn.promiseAll": { argTypes: [DYN], result: { kind: "promise", inner: DYN } },
|
|
145
|
-
"dyn.typeof": { argTypes: [DYN], result: STRING },
|
|
146
|
-
"dyn.objectTag": { argTypes: [DYN], result: STRING },
|
|
147
|
-
"module.registryInit": { argTypes: [F64], result: VOID },
|
|
148
|
-
"module.define": { argTypes: [F64, STRING, STRING, STRING, arrayOf(STRING), BOOL], result: VOID },
|
|
149
|
-
"module.enter": { argTypes: [F64], result: VOID },
|
|
150
|
-
"module.link": { argTypes: [F64, F64], result: VOID },
|
|
151
|
-
"module.finish": { argTypes: [F64], result: VOID },
|
|
152
|
-
"module.fail": { argTypes: [F64], result: VOID },
|
|
153
|
-
"module.filename": { argTypes: [F64], result: STRING },
|
|
154
|
-
"module.id": { argTypes: [F64], result: STRING },
|
|
155
|
-
"module.path": { argTypes: [F64], result: STRING },
|
|
156
|
-
"module.paths": { argTypes: [F64], result: arrayOf(STRING) },
|
|
157
|
-
"module.children": { argTypes: [F64], result: arrayOf(F64) },
|
|
158
|
-
"module.parent": { argTypes: [F64], result: F64 },
|
|
159
|
-
"module.loaded": { argTypes: [F64], result: BOOL },
|
|
160
|
-
"module.cacheGet": { argTypes: [STRING], result: F64 },
|
|
161
|
-
"module.cacheHas": { argTypes: [STRING], result: BOOL },
|
|
162
|
-
"module.cacheKeys": { argTypes: [], result: arrayOf(STRING) },
|
|
163
|
-
"timers.setTimeout": { argTypes: [{ kind: "func", params: [], ret: VOID }, F64], result: VOID },
|
|
164
|
-
"timers.setInterval": { argTypes: [{ kind: "func", params: [], ret: VOID }, F64], result: F64 },
|
|
165
|
-
"timers.clearInterval": { argTypes: [F64], result: VOID },
|
|
166
|
-
"timers.setTimeoutHandle": { argTypes: [{ kind: "func", params: [], ret: VOID }, F64], result: F64 },
|
|
167
|
-
"timers.clearTimeout": { argTypes: [F64], result: VOID },
|
|
168
|
-
"timers.unref": { argTypes: [F64], result: F64 },
|
|
169
|
-
"timers.ref": { argTypes: [F64], result: F64 },
|
|
170
|
-
"timers.hasRef": { argTypes: [F64], result: BOOL },
|
|
171
|
-
"timers.refresh": { argTypes: [F64], result: F64 },
|
|
172
|
-
"timers.setImmediate": { argTypes: [{ kind: "func", params: [], ret: VOID }], result: F64 },
|
|
173
|
-
"timers.queueMicrotask": { argTypes: [{ kind: "func", params: [], ret: VOID }], result: VOID },
|
|
174
|
-
"timers.queueMicrotaskDyn": { argTypes: [DYN], result: VOID },
|
|
175
|
-
"timers.clearImmediate": { argTypes: [F64], result: VOID },
|
|
176
|
-
"process.nextTick": { argTypes: [{ kind: "func", params: [], ret: VOID }], result: VOID },
|
|
177
|
-
"process.uptime": { argTypes: [], result: F64 },
|
|
178
|
-
"perf.now": { argTypes: [], result: F64 },
|
|
179
|
-
"process.availableMemory": { argTypes: [], result: F64 },
|
|
180
|
-
"process.constrainedMemory": { argTypes: [], result: F64 },
|
|
181
|
-
"process.cpuUser": { argTypes: [], result: F64 },
|
|
182
|
-
"process.cpuSystem": { argTypes: [], result: F64 },
|
|
183
|
-
"process.cpuUserDiff": { argTypes: [F64], result: F64 },
|
|
184
|
-
"process.cpuSystemDiff": { argTypes: [F64], result: F64 },
|
|
185
|
-
"process.threadCpuUser": { argTypes: [], result: F64 },
|
|
186
|
-
"process.threadCpuSystem": { argTypes: [], result: F64 },
|
|
187
|
-
"process.threadCpuUserDiff": { argTypes: [F64], result: F64 },
|
|
188
|
-
"process.threadCpuSystemDiff": { argTypes: [F64], result: F64 },
|
|
189
|
-
"process.cpuPrevValidate": { argTypes: [F64, F64], result: VOID },
|
|
190
|
-
"process.rusage": { argTypes: [F64], result: F64 },
|
|
191
|
-
"process.activeResources": { argTypes: [], result: arrayOf(STRING) },
|
|
192
|
-
"timers.immediateUnref": { argTypes: [F64], result: F64 },
|
|
193
|
-
"timers.immediateRef": { argTypes: [F64], result: F64 },
|
|
194
|
-
"timers.immediateHasRef": { argTypes: [F64], result: BOOL },
|
|
195
|
-
"timers.clearNoop": { argTypes: [], result: VOID },
|
|
196
|
-
// Signal listeners are zero-param (the ambient shape); exit/stdin
|
|
197
|
-
// callbacks carry program-dependent one-param shapes — null slots, the
|
|
198
|
-
// libCall case checks them (child.onExit precedent).
|
|
199
|
-
"process.onSignal": { argTypes: [STRING, DYN, BOOL], result: VOID },
|
|
200
|
-
"process.offSignal": { argTypes: [STRING, DYN], result: VOID },
|
|
201
|
-
"process.onExit": { argTypes: [null, BOOL], result: VOID },
|
|
202
|
-
"process.offExit": { argTypes: [null], result: VOID },
|
|
203
|
-
"stdin.onData": { argTypes: [null, BOOL], result: VOID },
|
|
204
|
-
"stdin.onEnd": { argTypes: [{ kind: "func", params: [], ret: VOID }, BOOL], result: VOID },
|
|
205
|
-
"stdin.onError": { argTypes: [null, BOOL], result: VOID },
|
|
206
|
-
"stdin.nextChunk": { argTypes: [], result: { kind: "promise", inner: BYTES_U8 } },
|
|
207
|
-
"fs.readFileSync": { argTypes: [STRING, STRING], result: STRING },
|
|
208
|
-
"fs.readFileSyncBuf": { argTypes: [STRING], result: BYTES_U8 },
|
|
209
|
-
"fs.readFileSyncDyn": { argTypes: [STRING, DYN], result: DYN },
|
|
210
|
-
"fs.writeFileSync": { argTypes: [STRING, STRING], result: VOID },
|
|
211
|
-
"fs.appendFileSync": { argTypes: [STRING, STRING], result: VOID },
|
|
212
|
-
"fs.existsSync": { argTypes: [STRING], result: BOOL },
|
|
213
|
-
"fs.mkdirSync": { argTypes: [STRING], result: VOID },
|
|
214
|
-
"fs.rmSync": { argTypes: [STRING], result: VOID },
|
|
215
|
-
"fs.rmdirSync": { argTypes: [STRING], result: VOID },
|
|
216
|
-
"fs.readdirSync": { argTypes: [STRING], result: arrayOf(STRING) },
|
|
217
|
-
// Result is the call site's Dirent record array (VOID is the
|
|
218
|
-
// structure-checked sentinel, the os.networkInterfaces pattern).
|
|
219
|
-
"fs.readdirTypesSync": { argTypes: [STRING], result: VOID },
|
|
220
|
-
"path.join": { argTypes: [arrayOf(STRING)], result: STRING },
|
|
221
|
-
"path.resolve": { argTypes: [arrayOf(STRING)], result: STRING },
|
|
222
|
-
"path.normalize": { argTypes: [STRING], result: STRING },
|
|
223
|
-
"path.dirname": { argTypes: [STRING], result: STRING },
|
|
224
|
-
"path.basename": { argTypes: [STRING, STRING], result: STRING },
|
|
225
|
-
"path.extname": { argTypes: [STRING], result: STRING },
|
|
226
|
-
"path.isAbsolute": { argTypes: [STRING], result: BOOL },
|
|
227
|
-
"path.relative": { argTypes: [STRING, STRING], result: STRING },
|
|
228
|
-
"path.toNamespacedPath": { argTypes: [STRING], result: STRING },
|
|
229
|
-
"path.win32Join": { argTypes: [arrayOf(STRING)], result: STRING },
|
|
230
|
-
"path.win32Resolve": { argTypes: [arrayOf(STRING)], result: STRING },
|
|
231
|
-
"path.win32Normalize": { argTypes: [STRING], result: STRING },
|
|
232
|
-
"path.win32Dirname": { argTypes: [STRING], result: STRING },
|
|
233
|
-
"path.win32Basename": { argTypes: [STRING, STRING], result: STRING },
|
|
234
|
-
"path.win32Extname": { argTypes: [STRING], result: STRING },
|
|
235
|
-
"path.win32IsAbsolute": { argTypes: [STRING], result: BOOL },
|
|
236
|
-
"path.win32Relative": { argTypes: [STRING, STRING], result: STRING },
|
|
237
|
-
"path.win32ToNamespacedPath": { argTypes: [STRING], result: STRING },
|
|
238
|
-
"os.homedir": { argTypes: [], result: STRING },
|
|
239
|
-
"os.release": { argTypes: [], result: STRING },
|
|
240
|
-
"os.type": { argTypes: [], result: STRING },
|
|
241
|
-
"os.totalmem": { argTypes: [], result: F64 },
|
|
242
|
-
"process.umask": { argTypes: [F64], result: F64 },
|
|
243
|
-
"process.chdir": { argTypes: [STRING], result: VOID },
|
|
244
|
-
"process.loadEnvFile": { argTypes: [DYN], result: VOID },
|
|
245
|
-
"process.exiting": { argTypes: [], result: BOOL },
|
|
246
|
-
"net.getAutoSelTimeout": { argTypes: [], result: F64 },
|
|
247
|
-
"net.setAutoSelTimeout": { argTypes: [F64], result: VOID },
|
|
248
|
-
"fs.realpathSync": { argTypes: [STRING], result: STRING },
|
|
249
|
-
"fs.realpathNativeSync": { argTypes: [STRING], result: STRING },
|
|
250
|
-
"os.userName": { argTypes: [], result: STRING },
|
|
251
|
-
"os.userShell": { argTypes: [], result: STRING },
|
|
252
|
-
"os.userHomedir": { argTypes: [], result: STRING },
|
|
253
|
-
"os.tmpdir": { argTypes: [], result: STRING },
|
|
254
|
-
// Result is the call site's Dict<NetworkInterfaceInfo[]> record (VOID is
|
|
255
|
-
// the dgram.address sentinel — the libCall case checks the structure).
|
|
256
|
-
"os.networkInterfaces": { argTypes: [], result: VOID },
|
|
257
|
-
"math.maxArr": { argTypes: [arrayOf(F64)], result: F64 },
|
|
258
|
-
"math.minArr": { argTypes: [arrayOf(F64)], result: F64 },
|
|
259
|
-
"math.hypotArr": { argTypes: [arrayOf(F64)], result: F64 },
|
|
260
|
-
"math.floor": { argTypes: [F64], result: F64 },
|
|
261
|
-
"math.abs": { argTypes: [F64], result: F64 },
|
|
262
|
-
"math.round": { argTypes: [F64], result: F64 },
|
|
263
|
-
"math.trunc": { argTypes: [F64], result: F64 },
|
|
264
|
-
"math.ceil": { argTypes: [F64], result: F64 },
|
|
265
|
-
"math.sin": { argTypes: [F64], result: F64 },
|
|
266
|
-
"math.sinh": { argTypes: [F64], result: F64 },
|
|
267
|
-
"math.cos": { argTypes: [F64], result: F64 },
|
|
268
|
-
"math.cosh": { argTypes: [F64], result: F64 },
|
|
269
|
-
"math.tan": { argTypes: [F64], result: F64 },
|
|
270
|
-
"math.tanh": { argTypes: [F64], result: F64 },
|
|
271
|
-
"math.asin": { argTypes: [F64], result: F64 },
|
|
272
|
-
"math.asinh": { argTypes: [F64], result: F64 },
|
|
273
|
-
"math.acos": { argTypes: [F64], result: F64 },
|
|
274
|
-
"math.acosh": { argTypes: [F64], result: F64 },
|
|
275
|
-
"math.atan": { argTypes: [F64], result: F64 },
|
|
276
|
-
"math.atanh": { argTypes: [F64], result: F64 },
|
|
277
|
-
"math.cbrt": { argTypes: [F64], result: F64 },
|
|
278
|
-
"math.clz32": { argTypes: [F64], result: F64 },
|
|
279
|
-
"math.sign": { argTypes: [F64], result: F64 },
|
|
280
|
-
"math.exp": { argTypes: [F64], result: F64 },
|
|
281
|
-
"math.expm1": { argTypes: [F64], result: F64 },
|
|
282
|
-
"math.fround": { argTypes: [F64], result: F64 },
|
|
283
|
-
"math.sqrt": { argTypes: [F64], result: F64 },
|
|
284
|
-
"math.log": { argTypes: [F64], result: F64 },
|
|
285
|
-
"math.log1p": { argTypes: [F64], result: F64 },
|
|
286
|
-
"math.log2": { argTypes: [F64], result: F64 },
|
|
287
|
-
"math.log10": { argTypes: [F64], result: F64 },
|
|
288
|
-
"math.atan2": { argTypes: [F64, F64], result: F64 },
|
|
289
|
-
"math.pow": { argTypes: [F64, F64], result: F64 },
|
|
290
|
-
"math.imul": { argTypes: [F64, F64], result: F64 },
|
|
291
|
-
"math.min": { argTypes: [F64, F64], result: F64 },
|
|
292
|
-
"math.max": { argTypes: [F64, F64], result: F64 },
|
|
293
|
-
"math.random": { argTypes: [], result: F64 },
|
|
294
|
-
"num.parseInt": { argTypes: [STRING, F64], result: F64 },
|
|
295
|
-
"num.parseFloat": { argTypes: [STRING], result: F64 },
|
|
296
|
-
"num.fromString": { argTypes: [STRING], result: F64 },
|
|
297
|
-
"num.isNaN": { argTypes: [F64], result: BOOL },
|
|
298
|
-
"str.encodeUriComponent": { argTypes: [STRING], result: STRING },
|
|
299
|
-
// The base64 globals: the argument is a dyn value (WebIDL ToString
|
|
300
|
-
// runs in the runtime); the zero-argument form always throws.
|
|
301
|
-
"str.atob": { argTypes: [DYN], result: STRING },
|
|
302
|
-
"str.btoa": { argTypes: [DYN], result: STRING },
|
|
303
|
-
"str.b64Missing": { argTypes: [], result: STRING },
|
|
304
|
-
"str.decodeUriComponent": { argTypes: [STRING], result: STRING },
|
|
305
|
-
"str.decodeUri": { argTypes: [STRING], result: STRING },
|
|
306
|
-
"str.encodeUri": { argTypes: [STRING], result: STRING },
|
|
307
|
-
"regexp.escape": { argTypes: [STRING], result: STRING },
|
|
308
|
-
"num.toExponential": { argTypes: [F64], result: STRING },
|
|
309
|
-
"num.toFixed0": { argTypes: [F64], result: STRING },
|
|
310
|
-
"num.toFixed": { argTypes: [F64, F64], result: STRING },
|
|
311
|
-
"num.toStringRadix": { argTypes: [F64, DYN], result: STRING },
|
|
312
|
-
"num.sameValue": { argTypes: [F64, F64], result: BOOL },
|
|
313
|
-
"intl.numFormatEnUs": { argTypes: [F64], result: STRING },
|
|
314
|
-
"sym.new": { argTypes: [STRING], result: SYMBOL_T },
|
|
315
|
-
"sym.newAnon": { argTypes: [], result: SYMBOL_T },
|
|
316
|
-
"sym.for": { argTypes: [STRING], result: SYMBOL_T },
|
|
317
|
-
"sym.wellKnown": { argTypes: [STRING], result: SYMBOL_T },
|
|
318
|
-
// Result is the interned `string | undefined` union — the libCall case
|
|
319
|
-
// checks the arms (the spawnRes.error pattern).
|
|
320
|
-
"sym.keyFor": { argTypes: [SYMBOL_T], result: VOID },
|
|
321
|
-
"sym.desc": { argTypes: [SYMBOL_T], result: VOID },
|
|
322
|
-
"sym.toString": { argTypes: [SYMBOL_T], result: STRING },
|
|
323
|
-
"bigint.parse": { argTypes: [STRING], result: BIGINT_T },
|
|
324
|
-
"bigint.fromF64": { argTypes: [F64], result: BIGINT_T },
|
|
325
|
-
"bigint.neg": { argTypes: [BIGINT_T], result: BIGINT_T },
|
|
326
|
-
"bigint.not": { argTypes: [BIGINT_T], result: BIGINT_T },
|
|
327
|
-
"bigint.add": { argTypes: [BIGINT_T, BIGINT_T], result: BIGINT_T },
|
|
328
|
-
"bigint.sub": { argTypes: [BIGINT_T, BIGINT_T], result: BIGINT_T },
|
|
329
|
-
"bigint.mul": { argTypes: [BIGINT_T, BIGINT_T], result: BIGINT_T },
|
|
330
|
-
"bigint.div": { argTypes: [BIGINT_T, BIGINT_T], result: BIGINT_T },
|
|
331
|
-
"bigint.mod": { argTypes: [BIGINT_T, BIGINT_T], result: BIGINT_T },
|
|
332
|
-
"bigint.pow": { argTypes: [BIGINT_T, BIGINT_T], result: BIGINT_T },
|
|
333
|
-
"bigint.and": { argTypes: [BIGINT_T, BIGINT_T], result: BIGINT_T },
|
|
334
|
-
"bigint.or": { argTypes: [BIGINT_T, BIGINT_T], result: BIGINT_T },
|
|
335
|
-
"bigint.xor": { argTypes: [BIGINT_T, BIGINT_T], result: BIGINT_T },
|
|
336
|
-
"bigint.shl": { argTypes: [BIGINT_T, BIGINT_T], result: BIGINT_T },
|
|
337
|
-
"bigint.shr": { argTypes: [BIGINT_T, BIGINT_T], result: BIGINT_T },
|
|
338
|
-
"bigint.eq": { argTypes: [BIGINT_T, BIGINT_T], result: BOOL },
|
|
339
|
-
"bigint.eqString": { argTypes: [BIGINT_T, STRING], result: BOOL },
|
|
340
|
-
"bigint.cmp": { argTypes: [BIGINT_T, BIGINT_T], result: F64 },
|
|
341
|
-
"bigint.cmpNumber": { argTypes: [BIGINT_T, F64], result: F64 },
|
|
342
|
-
"bigint.truthy": { argTypes: [BIGINT_T], result: BOOL },
|
|
343
|
-
"bigint.toString": { argTypes: [BIGINT_T, F64], result: STRING },
|
|
344
|
-
"bigint.inspect": { argTypes: [BIGINT_T], result: STRING },
|
|
345
|
-
"bigint.toF64": { argTypes: [BIGINT_T], result: F64 },
|
|
346
|
-
"bigint.asUintN": { argTypes: [F64, BIGINT_T], result: BIGINT_T },
|
|
347
|
-
"bigint.asIntN": { argTypes: [F64, BIGINT_T], result: BIGINT_T },
|
|
348
|
-
"bigint.bufferRead": { argTypes: [BYTES_U8, F64, BOOL, BOOL], result: BIGINT_T },
|
|
349
|
-
"bigint.bufferWrite": { argTypes: [BYTES_U8, BIGINT_T, F64, BOOL, BOOL], result: F64 },
|
|
350
|
-
"bigint.dataViewGet": { argTypes: [BYTES_U8, F64, BOOL, BOOL], result: BIGINT_T },
|
|
351
|
-
"bigint.dataViewSet": { argTypes: [BYTES_U8, F64, BIGINT_T, BOOL], result: VOID },
|
|
352
|
-
"url.new": { argTypes: [STRING], result: URL_T },
|
|
353
|
-
"url.newBase": { argTypes: [STRING, STRING], result: URL_T },
|
|
354
|
-
"url.canParse": { argTypes: [STRING], result: BOOL },
|
|
355
|
-
"url.canParseBase": { argTypes: [STRING, STRING], result: BOOL },
|
|
356
|
-
"url.parse": { argTypes: [STRING], result: DYN },
|
|
357
|
-
"url.parseBase": { argTypes: [STRING, STRING], result: DYN },
|
|
358
|
-
"url.protocol": { argTypes: [URL_T], result: STRING },
|
|
359
|
-
"url.origin": { argTypes: [URL_T], result: STRING },
|
|
360
|
-
"url.username": { argTypes: [URL_T], result: STRING },
|
|
361
|
-
"url.password": { argTypes: [URL_T], result: STRING },
|
|
362
|
-
"url.host": { argTypes: [URL_T], result: STRING },
|
|
363
|
-
"url.hostname": { argTypes: [URL_T], result: STRING },
|
|
364
|
-
"url.port": { argTypes: [URL_T], result: STRING },
|
|
365
|
-
"url.pathname": { argTypes: [URL_T], result: STRING },
|
|
366
|
-
"url.href": { argTypes: [URL_T], result: STRING },
|
|
367
|
-
"url.set": { argTypes: [URL_T, STRING, STRING], result: VOID },
|
|
368
|
-
"url.setChecked": { argTypes: [URL_T, STRING, DYN], result: VOID },
|
|
369
|
-
"url.fileURLToPathUrl": { argTypes: [URL_T], result: STRING },
|
|
370
|
-
"url.fileURLToPathChecked": { argTypes: [DYN], result: STRING },
|
|
371
|
-
"url.fileURLToPathOptions": { argTypes: [DYN, DYN], result: STRING },
|
|
372
|
-
"url.fileURLToPathBuffer": { argTypes: [DYN, DYN], result: BYTES_U8 },
|
|
373
|
-
"url.pathToFileURLChecked": { argTypes: [DYN, DYN], result: URL_T },
|
|
374
|
-
"url.fileURLToPathStr": { argTypes: [STRING], result: STRING },
|
|
375
|
-
"url.pathToFileURL": { argTypes: [STRING], result: URL_T },
|
|
376
|
-
"url.pathToFileURLPlatform": { argTypes: [STRING, BOOL], result: URL_T },
|
|
377
|
-
"url.pathToFileURLWin32": { argTypes: [STRING], result: URL_T },
|
|
378
|
-
"sp.new": { argTypes: [], result: SEARCH_PARAMS_T },
|
|
379
|
-
"sp.newChecked": { argTypes: [DYN], result: SEARCH_PARAMS_T },
|
|
380
|
-
"sp.parse": { argTypes: [STRING], result: SEARCH_PARAMS_T },
|
|
381
|
-
"sp.copy": { argTypes: [SEARCH_PARAMS_T], result: SEARCH_PARAMS_T },
|
|
382
|
-
// The pairs argument is string[][] — checked structurally below (the
|
|
383
|
-
// generic array-of slot has no named constant here).
|
|
384
|
-
"sp.fromPairs": { argTypes: [null], result: SEARCH_PARAMS_T },
|
|
385
|
-
"sp.with": { argTypes: [SEARCH_PARAMS_T, STRING, STRING], result: SEARCH_PARAMS_T },
|
|
386
|
-
"url.searchParams": { argTypes: [URL_T], result: SEARCH_PARAMS_T },
|
|
387
|
-
"url.search": { argTypes: [URL_T], result: STRING },
|
|
388
|
-
"url.hash": { argTypes: [URL_T], result: STRING },
|
|
389
|
-
// Result is the interned `string | null` union — the libCall case
|
|
390
|
-
// checks the arms (the spawnRes.signal pattern).
|
|
391
|
-
"sp.get": { argTypes: [SEARCH_PARAMS_T, STRING], result: VOID },
|
|
392
|
-
"sp.getAll": { argTypes: [SEARCH_PARAMS_T, STRING], result: arrayOf(STRING) },
|
|
393
|
-
"sp.append": { argTypes: [SEARCH_PARAMS_T, STRING, STRING], result: VOID },
|
|
394
|
-
"sp.set": { argTypes: [SEARCH_PARAMS_T, STRING, STRING], result: VOID },
|
|
395
|
-
"sp.delete": { argTypes: [SEARCH_PARAMS_T, STRING], result: VOID },
|
|
396
|
-
"sp.deleteValue": { argTypes: [SEARCH_PARAMS_T, STRING, STRING], result: VOID },
|
|
397
|
-
"sp.has": { argTypes: [SEARCH_PARAMS_T, STRING], result: BOOL },
|
|
398
|
-
"sp.hasValue": { argTypes: [SEARCH_PARAMS_T, STRING, STRING], result: BOOL },
|
|
399
|
-
"sp.sort": { argTypes: [SEARCH_PARAMS_T], result: VOID },
|
|
400
|
-
"sp.size": { argTypes: [SEARCH_PARAMS_T], result: F64 },
|
|
401
|
-
"sp.toString": { argTypes: [SEARCH_PARAMS_T], result: STRING },
|
|
402
|
-
"sp.keyAt": { argTypes: [SEARCH_PARAMS_T, F64], result: STRING },
|
|
403
|
-
"sp.valAt": { argTypes: [SEARCH_PARAMS_T, F64], result: STRING },
|
|
404
|
-
// node:querystring. qs.parse's result is the call site's ParsedUrlQuery
|
|
405
|
-
// dictionary record (VOID is the networkInterfaces sentinel — the
|
|
406
|
-
// libCall case checks the structure); qs.stringify's object argument
|
|
407
|
-
// is a dyn value (the frontend dynFroms typed records).
|
|
408
|
-
"qs.parse": { argTypes: [STRING, STRING, STRING, F64], result: VOID },
|
|
409
|
-
"qs.stringify": { argTypes: [DYN, STRING, STRING], result: STRING },
|
|
410
|
-
"qs.escape": { argTypes: [STRING], result: STRING },
|
|
411
|
-
"qs.unescape": { argTypes: [STRING], result: STRING },
|
|
412
|
-
"util.parseArgs": { argTypes: [DYN], result: DYN },
|
|
413
|
-
"util.parseEnv": { argTypes: [DYN], result: DYN },
|
|
414
|
-
"util.getSystemErrorName": { argTypes: [DYN], result: STRING },
|
|
415
|
-
"util.getSystemErrorMessage": { argTypes: [DYN], result: STRING },
|
|
416
|
-
"util.systemErrorEntries": { argTypes: [], result: DYN },
|
|
417
|
-
"util.stripVTControlCharacters": { argTypes: [DYN], result: STRING },
|
|
418
|
-
"util.toUSVString": { argTypes: [DYN], result: STRING },
|
|
419
|
-
"util.isDeepStrictEqual": { argTypes: [DYN, DYN, DYN], result: BOOL },
|
|
420
|
-
"util.styleText": { argTypes: [DYN, DYN, DYN], result: STRING },
|
|
421
|
-
"util.typeIs": { argTypes: [DYN, STRING], result: BOOL },
|
|
422
|
-
"util.typeValue": { argTypes: [DYN, STRING], result: DYN },
|
|
423
|
-
"fs.statSync": { argTypes: [STRING], result: STATS_T },
|
|
424
|
-
"fs.lstatSync": { argTypes: [STRING], result: STATS_T },
|
|
425
|
-
"fs.fstatSync": { argTypes: [F64], result: STATS_T },
|
|
426
|
-
"fs.fchmodSync": { argTypes: [F64, F64], result: VOID },
|
|
427
|
-
"fs.fsyncSync": { argTypes: [F64], result: VOID },
|
|
428
|
-
"fs.fdatasyncSync": { argTypes: [F64], result: VOID },
|
|
429
|
-
"fs.ftruncateSync": { argTypes: [F64, F64], result: VOID },
|
|
430
|
-
"fs.utimesSync": { argTypes: [DYN, DYN, DYN], result: VOID },
|
|
431
|
-
"fs.futimesSync": { argTypes: [DYN, DYN, DYN], result: VOID },
|
|
432
|
-
"fs.lutimesSync": { argTypes: [DYN, DYN, DYN], result: VOID },
|
|
433
|
-
"fs.readvSync": { argTypes: [F64, arrayOf(BYTES_U8), F64], result: F64 },
|
|
434
|
-
"fs.writevSync": { argTypes: [F64, arrayOf(BYTES_U8), F64], result: F64 },
|
|
435
|
-
"fs.linkSync": { argTypes: [DYN, DYN], result: VOID },
|
|
436
|
-
"fs.symlinkSync": { argTypes: [DYN, DYN, DYN], result: VOID },
|
|
437
|
-
"fs.readlinkSync": { argTypes: [DYN, DYN], result: DYN },
|
|
438
|
-
"fs.statfsSync": { argTypes: [DYN, DYN], result: DYN },
|
|
439
|
-
"fs.readlinkSyncStr": { argTypes: [DYN, DYN], result: STRING },
|
|
440
|
-
"fs.readlinkSyncBuffer": { argTypes: [DYN, DYN], result: BYTES_U8 },
|
|
441
|
-
"fs.openSync": { argTypes: [STRING, STRING], result: F64 },
|
|
442
|
-
"fs.openNumericSync": { argTypes: [STRING, F64, F64], result: F64 },
|
|
443
|
-
"fs.readSync": { argTypes: [F64, BYTES_U8, F64, F64, F64], result: F64 },
|
|
444
|
-
"fs.writeSync": { argTypes: [F64, BYTES_U8, F64, F64, F64], result: F64 },
|
|
445
|
-
"fs.writeStrSync": { argTypes: [F64, STRING, F64, STRING], result: F64 },
|
|
446
|
-
// fs.watch's callback func type is program-dependent (zero params, or
|
|
447
|
-
// the eventType string) — the slot pins arity and the path/receiver.
|
|
448
|
-
"fs.watch": { argTypes: [STRING], result: FSWATCHER_T },
|
|
449
|
-
"fs.watchCb": { argTypes: [STRING, null], result: FSWATCHER_T },
|
|
450
|
-
"watcher.close": { argTypes: [FSWATCHER_T], result: VOID },
|
|
451
|
-
"crypto.x509Fingerprint": { argTypes: [BYTES_U8], result: STRING },
|
|
452
|
-
"crypto.x509FingerprintStr": { argTypes: [STRING], result: STRING },
|
|
453
|
-
"crypto.x509ValidFrom": { argTypes: [BYTES_U8], result: STRING },
|
|
454
|
-
"crypto.x509ValidFromStr": { argTypes: [STRING], result: STRING },
|
|
455
|
-
"crypto.x509ValidTo": { argTypes: [BYTES_U8], result: STRING },
|
|
456
|
-
"crypto.x509ValidToStr": { argTypes: [STRING], result: STRING },
|
|
457
|
-
"fs.closeSync": { argTypes: [F64], result: VOID },
|
|
458
|
-
"stats.isFile": { argTypes: [STATS_T], result: BOOL },
|
|
459
|
-
"stats.isDirectory": { argTypes: [STATS_T], result: BOOL },
|
|
460
|
-
"stats.isSymbolicLink": { argTypes: [STATS_T], result: BOOL },
|
|
461
|
-
"stats.size": { argTypes: [STATS_T], result: F64 },
|
|
462
|
-
"stats.dev": { argTypes: [STATS_T], result: F64 },
|
|
463
|
-
"stats.ino": { argTypes: [STATS_T], result: F64 },
|
|
464
|
-
"stats.blocks": { argTypes: [STATS_T], result: F64 },
|
|
465
|
-
"stats.nlink": { argTypes: [STATS_T], result: F64 },
|
|
466
|
-
"stats.atimeMs": { argTypes: [STATS_T], result: F64 },
|
|
467
|
-
"stats.mtimeMs": { argTypes: [STATS_T], result: F64 },
|
|
468
|
-
"stats.ctimeMs": { argTypes: [STATS_T], result: F64 },
|
|
469
|
-
// The wider sync fs slice (unlink/chmod/chown/copyfile and the
|
|
470
|
-
// mode-carrying write/mkdir forms).
|
|
471
|
-
"fs.unlinkSync": { argTypes: [STRING], result: VOID },
|
|
472
|
-
"fs.chmodSync": { argTypes: [STRING, F64], result: VOID },
|
|
473
|
-
"fs.chownSync": { argTypes: [STRING, F64, F64], result: VOID },
|
|
474
|
-
"fs.copyFileSync": { argTypes: [STRING, STRING], result: VOID },
|
|
475
|
-
"fs.renameSync": { argTypes: [STRING, STRING], result: VOID },
|
|
476
|
-
// Callback type is program-dependent (zero params or Error | null).
|
|
477
|
-
"fs.renameCb": { argTypes: [STRING, STRING, null], result: VOID },
|
|
478
|
-
"fs.writeFileModeSync": { argTypes: [STRING, STRING, F64], result: VOID },
|
|
479
|
-
"fs.mkdirModeSync": { argTypes: [STRING, F64], result: VOID },
|
|
480
|
-
"fs.mkdirRecursiveModeSync": { argTypes: [STRING, F64], result: VOID },
|
|
481
|
-
// Atomics.wait over an Int32Array — the synchronous-sleep idiom.
|
|
482
|
-
"atomics.wait": { argTypes: [bytesOf("i32"), F64, F64, F64], result: STRING },
|
|
483
|
-
"cp.spawnSync": { argTypes: [STRING, arrayOf(STRING)], result: SPAWNRES_T },
|
|
484
|
-
// spawnSync's options form: timeout, killSignal name ("" = SIGTERM),
|
|
485
|
-
// and the three stdio modes.
|
|
486
|
-
"cp.spawnSyncOpts": {
|
|
487
|
-
argTypes: [STRING, arrayOf(STRING), F64, STRING, F64, F64, F64],
|
|
488
|
-
result: SPAWNRES_T,
|
|
489
|
-
},
|
|
490
|
-
"cp.spawnSyncStdioStr": {
|
|
491
|
-
argTypes: [STRING, arrayOf(STRING), F64, STRING, STRING],
|
|
492
|
-
result: SPAWNRES_T,
|
|
493
|
-
},
|
|
494
|
-
// node:net (scr_net.c). Listener slots are program-dependent closures —
|
|
495
|
-
// null slots, checked in the libCall case (the child.onExit precedent);
|
|
496
|
-
// the zero-param callbacks pin the exact func type here. The trailing
|
|
497
|
-
// BOOL on registrations is the once flag.
|
|
498
|
-
"net.createServer": { argTypes: [], result: NETSERVER_T },
|
|
499
|
-
"net.createServerCb": { argTypes: [null], result: NETSERVER_T },
|
|
500
|
-
"net.listen": { argTypes: [NETSERVER_T, F64], result: VOID },
|
|
501
|
-
"net.listenCb": { argTypes: [NETSERVER_T, F64, { kind: "func", params: [], ret: VOID }], result: VOID },
|
|
502
|
-
"net.listenOpts": { argTypes: [NETSERVER_T, F64, STRING, BOOL], result: VOID },
|
|
503
|
-
// The callback slot is a zero-param void closure OR its
|
|
504
|
-
// `(() => void) | undefined` optional-binding union (checked specially).
|
|
505
|
-
"net.listenOptsCb": { argTypes: [NETSERVER_T, F64, STRING, BOOL, null], result: VOID },
|
|
506
|
-
"net.listenOptsReusePort": { argTypes: [NETSERVER_T, F64, STRING, BOOL, BOOL], result: VOID },
|
|
507
|
-
// The callback is a zero-param void closure OR its optional-binding union;
|
|
508
|
-
// the callback follows the reusePort BOOL in this additive ABI.
|
|
509
|
-
"net.listenOptsReusePortCb": { argTypes: [NETSERVER_T, F64, STRING, BOOL, BOOL, null], result: VOID },
|
|
510
|
-
"net.serverPort": { argTypes: [NETSERVER_T], result: F64 },
|
|
511
|
-
"net.serverListening": { argTypes: [NETSERVER_T], result: BOOL },
|
|
512
|
-
// net.serverAddress's record result is shape-checked in the libCall case
|
|
513
|
-
// (the dgram.address sentinel pattern).
|
|
514
|
-
"net.serverAddress": { argTypes: [NETSERVER_T], result: VOID },
|
|
515
|
-
"net.serverClose": { argTypes: [NETSERVER_T], result: VOID },
|
|
516
|
-
"net.serverCloseCb": { argTypes: [NETSERVER_T, { kind: "func", params: [], ret: VOID }], result: VOID },
|
|
517
|
-
"net.serverOnError": { argTypes: [NETSERVER_T, null, BOOL], result: VOID },
|
|
518
|
-
"net.serverOnClose": { argTypes: [NETSERVER_T, { kind: "func", params: [], ret: VOID }, BOOL], result: VOID },
|
|
519
|
-
"net.serverOnConnection": { argTypes: [NETSERVER_T, null, BOOL], result: VOID },
|
|
520
|
-
"net.serverOnSecureConnection": { argTypes: [NETSERVER_T, null, BOOL], result: VOID },
|
|
521
|
-
"net.connect": { argTypes: [F64, STRING], result: NETSOCKET_T },
|
|
522
|
-
"net.connectAttempt": { argTypes: [F64, STRING, DYN], result: NETSOCKET_T },
|
|
523
|
-
"net.connectOptsChk": { argTypes: [DYN, STRING], result: VOID },
|
|
524
|
-
"net.connectCb": { argTypes: [F64, STRING, { kind: "func", params: [], ret: VOID }], result: NETSOCKET_T },
|
|
525
|
-
// The lookup's exact func shape is program data (its answer callback's
|
|
526
|
-
// union/record types) — checked specially in the libCall case.
|
|
527
|
-
"net.connectLookup": { argTypes: [F64, STRING, null], result: NETSOCKET_T },
|
|
528
|
-
"net.sockWrite": { argTypes: [NETSOCKET_T, STRING], result: VOID },
|
|
529
|
-
"net.sockWriteBytes": { argTypes: [NETSOCKET_T, BYTES_U8], result: VOID },
|
|
530
|
-
"net.sockEnd": { argTypes: [NETSOCKET_T], result: VOID },
|
|
531
|
-
"net.sockEndStr": { argTypes: [NETSOCKET_T, STRING], result: VOID },
|
|
532
|
-
"net.sockEndBytes": { argTypes: [NETSOCKET_T, BYTES_U8], result: VOID },
|
|
533
|
-
"net.sockWriteDyn": { argTypes: [NETSOCKET_T, DYN], result: VOID },
|
|
534
|
-
"net.sockEndDyn": { argTypes: [NETSOCKET_T, DYN], result: VOID },
|
|
535
|
-
"net.sockDestroy": { argTypes: [NETSOCKET_T], result: VOID },
|
|
536
|
-
"net.sockPipe": { argTypes: [NETSOCKET_T, NETSOCKET_T], result: VOID },
|
|
537
|
-
"net.sockPipeRes": { argTypes: [NETSOCKET_T, HTTPRES_T], result: VOID },
|
|
538
|
-
"net.sockOnData": { argTypes: [NETSOCKET_T, null, BOOL], result: VOID },
|
|
539
|
-
"net.sockOnEnd": { argTypes: [NETSOCKET_T, { kind: "func", params: [], ret: VOID }, BOOL], result: VOID },
|
|
540
|
-
"net.sockOnClose": { argTypes: [NETSOCKET_T, { kind: "func", params: [], ret: VOID }, BOOL], result: VOID },
|
|
541
|
-
"net.sockOnError": { argTypes: [NETSOCKET_T, null, BOOL], result: VOID },
|
|
542
|
-
"net.sockOnConnect": { argTypes: [NETSOCKET_T, { kind: "func", params: [], ret: VOID }, BOOL], result: VOID },
|
|
543
|
-
// node:dgram + node:dns (scr_dgram.c). The message/error listeners and
|
|
544
|
-
// dns.lookup's callback are program-dependent closures (null slots,
|
|
545
|
-
// checked in the libCall case); dgram.address's record result is
|
|
546
|
-
// program-dependent too (VOID here is the envGet sentinel — the libCall
|
|
547
|
-
// case checks the {address, family, port} shape).
|
|
548
|
-
"dgram.createSocket": { argTypes: [BOOL], result: DGRAMSOCK_T },
|
|
549
|
-
"dgram.bind": { argTypes: [DGRAMSOCK_T, F64, STRING], result: VOID },
|
|
550
|
-
"dgram.bindCb": { argTypes: [DGRAMSOCK_T, F64, STRING, { kind: "func", params: [], ret: VOID }], result: VOID },
|
|
551
|
-
"dgram.connect": { argTypes: [DGRAMSOCK_T, F64, STRING], result: VOID },
|
|
552
|
-
"dgram.connectCb": { argTypes: [DGRAMSOCK_T, F64, STRING, { kind: "func", params: [], ret: VOID }], result: VOID },
|
|
553
|
-
"dgram.sendStr": { argTypes: [DGRAMSOCK_T, STRING, F64, STRING], result: VOID },
|
|
554
|
-
"dgram.sendBytes": { argTypes: [DGRAMSOCK_T, BYTES_U8, F64, STRING], result: VOID },
|
|
555
|
-
"dgram.sendChk": { argTypes: [DGRAMSOCK_T, DYN, DYN, DYN, DYN, DYN, STRING], result: VOID },
|
|
556
|
-
"dgram.address": { argTypes: [DGRAMSOCK_T], result: VOID },
|
|
557
|
-
"dgram.close": { argTypes: [DGRAMSOCK_T], result: VOID },
|
|
558
|
-
"dgram.closeCb": { argTypes: [DGRAMSOCK_T, { kind: "func", params: [], ret: VOID }], result: VOID },
|
|
559
|
-
"dgram.unref": { argTypes: [DGRAMSOCK_T], result: VOID },
|
|
560
|
-
"dgram.ref": { argTypes: [DGRAMSOCK_T], result: VOID },
|
|
561
|
-
"dgram.onMessage": { argTypes: [DGRAMSOCK_T, null, BOOL], result: VOID },
|
|
562
|
-
"dgram.onError": { argTypes: [DGRAMSOCK_T, null, BOOL], result: VOID },
|
|
563
|
-
"dgram.onListening": { argTypes: [DGRAMSOCK_T, { kind: "func", params: [], ret: VOID }, BOOL], result: VOID },
|
|
564
|
-
"dgram.onClose": { argTypes: [DGRAMSOCK_T, { kind: "func", params: [], ret: VOID }, BOOL], result: VOID },
|
|
565
|
-
"dgram.onConnect": { argTypes: [DGRAMSOCK_T, { kind: "func", params: [], ret: VOID }, BOOL], result: VOID },
|
|
566
|
-
"dns.lookup": { argTypes: [STRING, F64, null], result: VOID },
|
|
567
|
-
// node:test (scr_test.c). Bodies are program-dependent closures (0 or
|
|
568
|
-
// 1 testCtx param, void or Promise<void> result — the spoke pinned the
|
|
569
|
-
// shape): null slots. sub's result is the settled Promise<void> the
|
|
570
|
-
// await consumes.
|
|
571
|
-
"test.register": { argTypes: [STRING, F64, STRING, null, F64, STRING], result: VOID },
|
|
572
|
-
"test.registerEmpty": { argTypes: [STRING, F64, STRING, F64, STRING], result: VOID },
|
|
573
|
-
"test.suite": { argTypes: [STRING, F64, STRING, { kind: "func", params: [], ret: VOID }, STRING], result: VOID },
|
|
574
|
-
"test.hook": { argTypes: [F64, null, F64], result: VOID },
|
|
575
|
-
"test.sub": { argTypes: [TESTCTX_T, STRING, F64, STRING, null, F64, STRING], result: { kind: "promise", inner: VOID } },
|
|
576
|
-
"test.subEmpty": { argTypes: [TESTCTX_T, STRING, F64, STRING, STRING], result: VOID },
|
|
577
|
-
"test.ctxSkip": { argTypes: [TESTCTX_T, STRING], result: VOID },
|
|
578
|
-
"test.ctxTodo": { argTypes: [TESTCTX_T, STRING], result: VOID },
|
|
579
|
-
"test.ctxDiagnostic": { argTypes: [TESTCTX_T, STRING], result: VOID },
|
|
580
|
-
"test.ctxName": { argTypes: [TESTCTX_T], result: STRING },
|
|
581
|
-
// node:http (scr_http.c over scr_net.c). The handler and the data
|
|
582
|
-
// listeners are program-dependent closures (null slots, checked in the
|
|
583
|
-
// libCall case); reqHeader's result is the interned string|undefined
|
|
584
|
-
// union, checked like process.envGet.
|
|
585
|
-
"http.createServer": { argTypes: [null], result: NETSERVER_T },
|
|
586
|
-
"http.createServerEmpty": { argTypes: [], result: NETSERVER_T },
|
|
587
|
-
"http.validateHeaderName": { argTypes: [STRING, STRING], result: VOID },
|
|
588
|
-
"http.validateHeaderValue": { argTypes: [STRING, DYN], result: VOID },
|
|
589
|
-
"http.serverJoinDupHeaders": { argTypes: [NETSERVER_T], result: VOID },
|
|
590
|
-
"http.serverAllowMissingHostHeader": { argTypes: [NETSERVER_T], result: VOID },
|
|
591
|
-
"http.serverTimeoutGet": { argTypes: [NETSERVER_T, F64], result: F64 },
|
|
592
|
-
"http.serverSetTimeout": { argTypes: [NETSERVER_T, F64], result: VOID },
|
|
593
|
-
"http.serverSetTimeoutCb": { argTypes: [NETSERVER_T, F64, null], result: VOID },
|
|
594
|
-
"http.serverOnTimeout": { argTypes: [NETSERVER_T, null, BOOL], result: VOID },
|
|
595
|
-
"http.serverCloseAllConnections": { argTypes: [NETSERVER_T], result: VOID },
|
|
596
|
-
"http.serverCloseIdleConnections": { argTypes: [NETSERVER_T], result: VOID },
|
|
597
|
-
"http.serverTimeoutSet": { argTypes: [NETSERVER_T, F64, F64], result: VOID },
|
|
598
|
-
"http.serverTimeoutOptionSet": { argTypes: [NETSERVER_T, F64, DYN], result: VOID },
|
|
599
|
-
"net.serverOnListening": { argTypes: [NETSERVER_T, { kind: "func", params: [], ret: VOID }, BOOL], result: VOID },
|
|
600
|
-
"http.resStatusGet": { argTypes: [HTTPRES_T], result: F64 },
|
|
601
|
-
"http.resStatusSet": { argTypes: [HTTPRES_T, F64], result: VOID },
|
|
602
|
-
"http.resStatusMsgGet": { argTypes: [HTTPRES_T], result: VOID },
|
|
603
|
-
"http.resStatusMsgSet": { argTypes: [HTTPRES_T, STRING], result: VOID },
|
|
604
|
-
"http.resRequest": { argTypes: [HTTPRES_T], result: HTTPREQ_T },
|
|
605
|
-
"http.resSocket": { argTypes: [HTTPRES_T], result: VOID },
|
|
606
|
-
"http.resWritableFinished": { argTypes: [HTTPRES_T], result: BOOL },
|
|
607
|
-
"http.resSendDateGet": { argTypes: [HTTPRES_T], result: BOOL },
|
|
608
|
-
"http.resSendDateSet": { argTypes: [HTTPRES_T, BOOL], result: VOID },
|
|
609
|
-
"http.resStrictContentLengthGet": { argTypes: [HTTPRES_T], result: BOOL },
|
|
610
|
-
"http.resStrictContentLengthSet": { argTypes: [HTTPRES_T, BOOL], result: VOID },
|
|
611
|
-
"http.resSetTimeout": { argTypes: [HTTPRES_T, F64], result: VOID },
|
|
612
|
-
"http.resSetTimeoutCb": { argTypes: [HTTPRES_T, F64, { kind: "func", params: [], ret: VOID }], result: VOID },
|
|
613
|
-
// resGetHeader answers the interned `string | undefined` union — the
|
|
614
|
-
// reqHeader/envGet sentinel pattern (VOID here, checked specially).
|
|
615
|
-
"http.resGetHeader": { argTypes: [HTTPRES_T, STRING], result: VOID },
|
|
616
|
-
"http.resGetHeaderNames": { argTypes: [HTTPRES_T], result: arrayOf(STRING) },
|
|
617
|
-
"http.resGetRawHeaderNames": { argTypes: [HTTPRES_T], result: arrayOf(STRING) },
|
|
618
|
-
"http.resGetHeaders": { argTypes: [HTTPRES_T], result: DYN },
|
|
619
|
-
"http.resHasHeader": { argTypes: [HTTPRES_T, STRING], result: BOOL },
|
|
620
|
-
"http.resRemoveHeader": { argTypes: [HTTPRES_T, STRING], result: VOID },
|
|
621
|
-
"http.resOnFinish": { argTypes: [HTTPRES_T, { kind: "func", params: [], ret: VOID }], result: VOID },
|
|
622
|
-
"http.reqUrl": { argTypes: [HTTPREQ_T], result: STRING },
|
|
623
|
-
"http.reqMethod": { argTypes: [HTTPREQ_T], result: STRING },
|
|
624
|
-
"http.reqHeader": { argTypes: [HTTPREQ_T, STRING], result: VOID },
|
|
625
|
-
"http.reqTrailer": { argTypes: [HTTPREQ_T, STRING], result: VOID },
|
|
626
|
-
"http.reqHeaderValues": { argTypes: [HTTPREQ_T, STRING], result: VOID },
|
|
627
|
-
"http.reqTrailerValues": { argTypes: [HTTPREQ_T, STRING], result: VOID },
|
|
628
|
-
"http.reqOnData": { argTypes: [HTTPREQ_T, null, BOOL], result: VOID },
|
|
629
|
-
"http.reqOnEnd": { argTypes: [HTTPREQ_T, { kind: "func", params: [], ret: VOID }, BOOL], result: VOID },
|
|
630
|
-
"http.resSetHeader": { argTypes: [HTTPRES_T, STRING, STRING], result: VOID },
|
|
631
|
-
"http.resWriteHead": { argTypes: [HTTPRES_T, F64], result: VOID },
|
|
632
|
-
"http.resWriteHeadN": { argTypes: [HTTPRES_T, F64, arrayOf(STRING), arrayOf(STRING)], result: VOID },
|
|
633
|
-
"http.resWriteContinue": { argTypes: [HTTPRES_T], result: VOID },
|
|
634
|
-
"http.resWriteProcessing": { argTypes: [HTTPRES_T], result: VOID },
|
|
635
|
-
"http.resWriteEarlyHints": { argTypes: [HTTPRES_T, arrayOf(STRING)], result: VOID },
|
|
636
|
-
"http.resWrite": { argTypes: [HTTPRES_T, STRING], result: VOID },
|
|
637
|
-
"http.resWriteBytes": { argTypes: [HTTPRES_T, BYTES_U8], result: VOID },
|
|
638
|
-
"http.resEnd": { argTypes: [HTTPRES_T], result: VOID },
|
|
639
|
-
"http.resEndStr": { argTypes: [HTTPRES_T, STRING], result: VOID },
|
|
640
|
-
"http.resEndBytes": { argTypes: [HTTPRES_T, BYTES_U8], result: VOID },
|
|
641
|
-
"http.resWriteDyn": { argTypes: [HTTPRES_T, DYN], result: VOID },
|
|
642
|
-
"http.resEndDyn": { argTypes: [HTTPRES_T, DYN], result: VOID },
|
|
643
|
-
"http.resHeadersSent": { argTypes: [HTTPRES_T], result: BOOL },
|
|
644
|
-
"http.resWritableEnded": { argTypes: [HTTPRES_T], result: BOOL },
|
|
645
|
-
"http.resFlushHeaders": { argTypes: [HTTPRES_T], result: VOID },
|
|
646
|
-
"http.resAddTrailers": { argTypes: [HTTPRES_T, arrayOf(STRING)], result: VOID },
|
|
647
|
-
"http.resCork": { argTypes: [HTTPRES_T], result: VOID },
|
|
648
|
-
"http.resUncork": { argTypes: [HTTPRES_T], result: VOID },
|
|
649
|
-
"http.resWritableCorked": { argTypes: [HTTPRES_T], result: F64 },
|
|
650
|
-
// The member follow-ups: reqStatusCode's `number | undefined` and
|
|
651
|
-
// sockRemoteAddress's `string | undefined` results are shape-checked in
|
|
652
|
-
// the special cases below (like reqHeader/columns).
|
|
653
|
-
"http.reqStatusCode": { argTypes: [HTTPREQ_T], result: VOID },
|
|
654
|
-
// reqStatusMessage's `string | undefined` is program-interned like
|
|
655
|
-
// reqHeader's (the VOID here is the envGet sentinel).
|
|
656
|
-
"http.reqStatusMessage": { argTypes: [HTTPREQ_T], result: VOID },
|
|
657
|
-
"http.reqRawHeaders": { argTypes: [HTTPREQ_T], result: arrayOf(STRING) },
|
|
658
|
-
"http.reqHeaderPairs": { argTypes: [HTTPREQ_T], result: arrayOf(STRING) },
|
|
659
|
-
"http.reqRawTrailers": { argTypes: [HTTPREQ_T], result: arrayOf(STRING) },
|
|
660
|
-
"http.reqTrailerPairs": { argTypes: [HTTPREQ_T], result: arrayOf(STRING) },
|
|
661
|
-
"net.sockDestroyed": { argTypes: [NETSOCKET_T], result: BOOL },
|
|
662
|
-
"net.sockWritable": { argTypes: [NETSOCKET_T], result: BOOL },
|
|
663
|
-
// The 'upgrade' registrations: the callback shapes are program-typed
|
|
664
|
-
// ((req, socket, head) and shorter prefixes — the libCall case checks).
|
|
665
|
-
"http.serverOnUpgrade": { argTypes: [NETSERVER_T, null, BOOL], result: VOID },
|
|
666
|
-
"http.serverOnConnect": { argTypes: [NETSERVER_T, null, BOOL], result: VOID },
|
|
667
|
-
"http.clientOnUpgrade": { argTypes: [HTTPCLIENTREQ_T, null, BOOL], result: VOID },
|
|
668
|
-
"http.reqSocket": { argTypes: [HTTPREQ_T], result: NETSOCKET_T },
|
|
669
|
-
// reqH2Stream's program-interned Http2Stream | undefined result is
|
|
670
|
-
// checked in the special libCall cases below.
|
|
671
|
-
"http.reqH2Stream": { argTypes: [HTTPREQ_T], result: VOID },
|
|
672
|
-
"http.reqH2StreamOrThrow": { argTypes: [HTTPREQ_T, STRING], result: HTTP2STREAM_T },
|
|
673
|
-
"http.reqPipeRes": { argTypes: [HTTPREQ_T, HTTPRES_T], result: VOID },
|
|
674
|
-
"http.reqPipeClient": { argTypes: [HTTPREQ_T, HTTPCLIENTREQ_T], result: VOID },
|
|
675
|
-
"http.reqPipeSock": { argTypes: [HTTPREQ_T, NETSOCKET_T], result: VOID },
|
|
676
|
-
"http.reqResume": { argTypes: [HTTPREQ_T], result: VOID },
|
|
677
|
-
"http.reqDestroy": { argTypes: [HTTPREQ_T], result: VOID },
|
|
678
|
-
"http.reqOnError": { argTypes: [HTTPREQ_T, null, BOOL], result: VOID },
|
|
679
|
-
"http.reqOnClose": { argTypes: [HTTPREQ_T, { kind: "func", params: [], ret: VOID }, BOOL], result: VOID },
|
|
680
|
-
"http.reqOnAborted": { argTypes: [HTTPREQ_T, { kind: "func", params: [], ret: VOID }, BOOL], result: VOID },
|
|
681
|
-
"http.reqHttpVersion": { argTypes: [HTTPREQ_T], result: STRING },
|
|
682
|
-
"http.reqHttpVersionMajor": { argTypes: [HTTPREQ_T], result: F64 },
|
|
683
|
-
"http.reqHttpVersionMinor": { argTypes: [HTTPREQ_T], result: F64 },
|
|
684
|
-
"http.reqAborted": { argTypes: [HTTPREQ_T], result: BOOL },
|
|
685
|
-
"http.reqComplete": { argTypes: [HTTPREQ_T], result: BOOL },
|
|
686
|
-
"http.resDestroy": { argTypes: [HTTPRES_T], result: VOID },
|
|
687
|
-
"http.resOnClose": { argTypes: [HTTPRES_T, { kind: "func", params: [], ret: VOID }, BOOL], result: VOID },
|
|
688
|
-
"http.resWriteHeadPairs": { argTypes: [HTTPRES_T, F64, arrayOf(STRING)], result: VOID },
|
|
689
|
-
"http.resWriteHeadDyn": { argTypes: [HTTPRES_T, F64, DYN], result: VOID },
|
|
690
|
-
"net.sockSetTimeout": { argTypes: [NETSOCKET_T, F64], result: VOID },
|
|
691
|
-
"net.sockSetEncoding": { argTypes: [NETSOCKET_T, STRING], result: VOID },
|
|
692
|
-
"http.reqSetEncoding": { argTypes: [HTTPREQ_T, STRING], result: VOID },
|
|
693
|
-
"net.sockOnTimeout": { argTypes: [NETSOCKET_T, { kind: "func", params: [], ret: VOID }, BOOL], result: VOID },
|
|
694
|
-
"net.sockRemoteAddress": { argTypes: [NETSOCKET_T], result: VOID },
|
|
695
|
-
"net.sockEncrypted": { argTypes: [NETSOCKET_T], result: VOID },
|
|
696
|
-
// node:http, the client slice. The response callback shapes are
|
|
697
|
-
// program-dependent (checked below); header pairs arrive flat.
|
|
698
|
-
"http.request": { argTypes: [STRING, F64, STRING, STRING, F64, arrayOf(STRING), BOOL], result: HTTPCLIENTREQ_T },
|
|
699
|
-
"http.requestCb": { argTypes: [STRING, F64, STRING, STRING, F64, arrayOf(STRING), BOOL, null], result: HTTPCLIENTREQ_T },
|
|
700
|
-
"http.agentNew": { argTypes: [BOOL, BOOL, F64, F64, F64, F64, F64], result: DYN },
|
|
701
|
-
"http.requestAgent": { argTypes: [STRING, F64, STRING, STRING, F64, arrayOf(STRING), BOOL, DYN], result: HTTPCLIENTREQ_T },
|
|
702
|
-
"http.requestAgentCb": { argTypes: [STRING, F64, STRING, STRING, F64, arrayOf(STRING), BOOL, DYN, null], result: HTTPCLIENTREQ_T },
|
|
703
|
-
"http.requestUrl": { argTypes: [STRING, STRING, BOOL], result: HTTPCLIENTREQ_T },
|
|
704
|
-
"http.requestUrlCb": { argTypes: [STRING, STRING, BOOL, null], result: HTTPCLIENTREQ_T },
|
|
705
|
-
"net.sockOnReadable": { argTypes: [NETSOCKET_T, null, BOOL], result: VOID },
|
|
706
|
-
// sockRead's result is the interned `Buffer | null` union — checked
|
|
707
|
-
// specially below (the reqHeader/envGet pattern; VOID here is a
|
|
708
|
-
// placeholder the special case overrides).
|
|
709
|
-
"net.sockRead": { argTypes: [NETSOCKET_T, F64], result: VOID },
|
|
710
|
-
"net.sockUnshift": { argTypes: [NETSOCKET_T, BYTES_U8], result: VOID },
|
|
711
|
-
"net.sockPause": { argTypes: [NETSOCKET_T], result: NETSOCKET_T },
|
|
712
|
-
"net.sockResume": { argTypes: [NETSOCKET_T], result: NETSOCKET_T },
|
|
713
|
-
"net.sockSetNoDelay": { argTypes: [NETSOCKET_T, BOOL], result: NETSOCKET_T },
|
|
714
|
-
"net.sockDestroySoon": { argTypes: [NETSOCKET_T], result: VOID },
|
|
715
|
-
"net.sockBytesWritten": { argTypes: [NETSOCKET_T], result: F64 },
|
|
716
|
-
"net.sockReadable": { argTypes: [NETSOCKET_T], result: BOOL },
|
|
717
|
-
"net.sockOnFinish": { argTypes: [NETSOCKET_T, { kind: "func", params: [], ret: VOID }], result: VOID },
|
|
718
|
-
"net.serverEmitConnection": { argTypes: [NETSERVER_T, NETSOCKET_T], result: VOID },
|
|
719
|
-
// tls/https: cert/key/ca PEM arguments are strings OR Buffers (null =
|
|
720
|
-
// both accepted; the emitter passes data+len either way).
|
|
721
|
-
"tls.createServer": { argTypes: [null, null], result: NETSERVER_T },
|
|
722
|
-
"tls.createServerCb": { argTypes: [null, null, null], result: NETSERVER_T },
|
|
723
|
-
// The runtime options records (divergence 66's stance): a dyn options
|
|
724
|
-
// value whose members read at runtime; pemDyn extracts a runtime-valued
|
|
725
|
-
// cert/key member (arg 1 is the precomposed fence label).
|
|
726
|
-
"tls.pemDyn": { argTypes: [DYN, STRING], result: BYTES_U8 },
|
|
727
|
-
"tls.createServerDyn": { argTypes: [DYN], result: NETSERVER_T },
|
|
728
|
-
"tls.createServerDynCb": { argTypes: [DYN, null], result: NETSERVER_T },
|
|
729
|
-
"https.createServerDyn": { argTypes: [DYN], result: NETSERVER_T },
|
|
730
|
-
"https.createServerDynCb": { argTypes: [DYN, null], result: NETSERVER_T },
|
|
731
|
-
"http2.createSecureServerReq": { argTypes: [null, null, null, BOOL], result: NETSERVER_T },
|
|
732
|
-
"http2.createSecureServerH2Req": { argTypes: [null, null, null, BOOL], result: NETSERVER_T },
|
|
733
|
-
"http2.createSecureServerDyn": { argTypes: [DYN], result: NETSERVER_T },
|
|
734
|
-
"http2.createSecureServerDynCb": { argTypes: [DYN, null], result: NETSERVER_T },
|
|
735
|
-
// tls.connect(port, host, opts[, cb]) — port -1 / host "" read the
|
|
736
|
-
// options record; the callback fires post-handshake (secureConnect).
|
|
737
|
-
"tls.connect": { argTypes: [F64, STRING, DYN], result: NETSOCKET_T },
|
|
738
|
-
"tls.connectCb": { argTypes: [F64, STRING, DYN, null], result: NETSOCKET_T },
|
|
739
|
-
// The TLSSocket member surface (authError's `string | null` union is
|
|
740
|
-
// shape-checked in the special cases below — the reqHeader pattern).
|
|
741
|
-
"tls.sockAuthorized": { argTypes: [NETSOCKET_T], result: BOOL },
|
|
742
|
-
"tls.sockAuthError": { argTypes: [NETSOCKET_T], result: VOID },
|
|
743
|
-
"tls.sockOnSecureConnect": { argTypes: [NETSOCKET_T, { kind: "func", params: [], ret: VOID }, BOOL], result: VOID },
|
|
744
|
-
"tls.sockOnSession": { argTypes: [NETSOCKET_T, null, BOOL], result: VOID },
|
|
745
|
-
// createSecureContext({ cert, key }) mints the opaque SNI-answer handle.
|
|
746
|
-
"tls.createSecureContext": { argTypes: [null, null], result: SECURECTX_T },
|
|
747
|
-
"tls.createSecureContextDyn": { argTypes: [DYN], result: SECURECTX_T },
|
|
748
|
-
"tls.caCertsChk": { argTypes: [DYN, STRING], result: VOID },
|
|
749
|
-
// The CA-store introspection unit (scr_tls_ca.c): per-type cached PEM
|
|
750
|
-
// string arrays and the default-set replacement.
|
|
751
|
-
"tlsca.get": { argTypes: [STRING], result: arrayOf(STRING) },
|
|
752
|
-
"tlsca.root": { argTypes: [], result: arrayOf(STRING) },
|
|
753
|
-
"tlsca.set": { argTypes: [arrayOf(STRING)], result: VOID },
|
|
754
|
-
"https.createServer": { argTypes: [null, null, null], result: NETSERVER_T },
|
|
755
|
-
// http2's allowHTTP1 compatibility server (divergence 57): cert/key
|
|
756
|
-
// like tls.createServer; the 'request' handler arrives separately via
|
|
757
|
-
// http.serverOnRequest (shape checked in the libCall case, like
|
|
758
|
-
// http.createServer's). sessionError callback shape is checked below.
|
|
759
|
-
"http2.createSecureServer": { argTypes: [null, null, BOOL], result: NETSERVER_T },
|
|
760
|
-
// The SNI-callback form: arg 2 is the JS SNICallback closure — a
|
|
761
|
-
// `(servername, cb) => void` func, or its `| undefined` union from the
|
|
762
|
-
// conditional-spread spelling (the libCall case checks the shape).
|
|
763
|
-
"http2.createSecureServerSni": { argTypes: [null, null, null, BOOL], result: NETSERVER_T },
|
|
764
|
-
// The ALPN=h2 server (createSecureServer without allowHTTP1): the real
|
|
765
|
-
// h2 session machinery behind the TLS handshake.
|
|
766
|
-
"http2.createSecureServerH2": { argTypes: [null, null, BOOL], result: NETSERVER_T },
|
|
767
|
-
"http.serverOnRequest": { argTypes: [NETSERVER_T, null, BOOL], result: VOID },
|
|
768
|
-
"http2.serverOnSessionError": { argTypes: [NETSERVER_T, null, BOOL], result: VOID },
|
|
769
|
-
"http2.streamNoop": { argTypes: [], result: VOID },
|
|
770
|
-
"http2.streamUndefCall": { argTypes: [STRING], result: VOID },
|
|
771
|
-
// The REAL h2c surface (scr_http2.c). Callback slots are null (the
|
|
772
|
-
// emitter picks the thunk); pairs slots are string arrays; the
|
|
773
|
-
// endStream tri-state and event flags ride as f64.
|
|
774
|
-
"http2.createServer": { argTypes: [], result: NETSERVER_T },
|
|
775
|
-
"http2.createServerReq": { argTypes: [null], result: NETSERVER_T },
|
|
776
|
-
"http2.serverOnStream": { argTypes: [NETSERVER_T, null, BOOL], result: VOID },
|
|
777
|
-
"http2.serverOnSession": { argTypes: [NETSERVER_T, null, BOOL], result: VOID },
|
|
778
|
-
// connect(authority, reject, ca[, cb]): the TLS client knobs an https
|
|
779
|
-
// authority reads (inert on http ones, exactly Node); ca is a PEM
|
|
780
|
-
// string/Buffer ("" = the system anchors).
|
|
781
|
-
"http2.connect": { argTypes: [STRING, BOOL, null], result: HTTP2SESSION_T },
|
|
782
|
-
"http2.connectCb": { argTypes: [STRING, BOOL, null, null], result: HTTP2SESSION_T },
|
|
783
|
-
"http2.sessionRequest": { argTypes: [HTTP2SESSION_T, arrayOf(STRING), F64], result: HTTP2STREAM_T },
|
|
784
|
-
"http2.sessionClose": { argTypes: [HTTP2SESSION_T], result: VOID },
|
|
785
|
-
"http2.sessionCloseCb": { argTypes: [HTTP2SESSION_T, null], result: VOID },
|
|
786
|
-
"http2.sessionDestroy": { argTypes: [HTTP2SESSION_T], result: VOID },
|
|
787
|
-
"http2.sessionOnClose": { argTypes: [HTTP2SESSION_T, null, BOOL], result: VOID },
|
|
788
|
-
"http2.sessionOnError": { argTypes: [HTTP2SESSION_T, null, BOOL], result: VOID },
|
|
789
|
-
"http2.sessionOnConnect": { argTypes: [HTTP2SESSION_T, null, BOOL], result: VOID },
|
|
790
|
-
"http2.sessionOnStream": { argTypes: [HTTP2SESSION_T, null, BOOL], result: VOID },
|
|
791
|
-
"http2.sessionOnGoaway": { argTypes: [HTTP2SESSION_T, null, BOOL], result: VOID },
|
|
792
|
-
"http2.sessionClosed": { argTypes: [HTTP2SESSION_T], result: BOOL },
|
|
793
|
-
"http2.sessionDestroyed": { argTypes: [HTTP2SESSION_T], result: BOOL },
|
|
794
|
-
"http2.sessionEncrypted": { argTypes: [HTTP2SESSION_T], result: BOOL },
|
|
795
|
-
"http2.sessionType": { argTypes: [HTTP2SESSION_T], result: F64 },
|
|
796
|
-
"http2.sessionAlpn": { argTypes: [HTTP2SESSION_T], result: STRING },
|
|
797
|
-
"http2.sessionSocket": { argTypes: [HTTP2SESSION_T], result: NETSOCKET_T },
|
|
798
|
-
"http2.streamRespond": { argTypes: [HTTP2STREAM_T, arrayOf(STRING), BOOL], result: VOID },
|
|
799
|
-
"http2.streamWrite": { argTypes: [HTTP2STREAM_T, STRING], result: VOID },
|
|
800
|
-
"http2.streamWriteBytes": { argTypes: [HTTP2STREAM_T, BYTES_U8], result: VOID },
|
|
801
|
-
"http2.streamEnd": { argTypes: [HTTP2STREAM_T], result: VOID },
|
|
802
|
-
"http2.streamEndStr": { argTypes: [HTTP2STREAM_T, STRING], result: VOID },
|
|
803
|
-
"http2.streamEndBytes": { argTypes: [HTTP2STREAM_T, BYTES_U8], result: VOID },
|
|
804
|
-
"http2.streamClose": { argTypes: [HTTP2STREAM_T, F64], result: VOID },
|
|
805
|
-
"http2.streamCloseCb": { argTypes: [HTTP2STREAM_T, F64, null], result: VOID },
|
|
806
|
-
"http2.streamDestroy": { argTypes: [HTTP2STREAM_T], result: VOID },
|
|
807
|
-
"http2.sessionSettings0": { argTypes: [HTTP2SESSION_T], result: VOID },
|
|
808
|
-
"http2.sessionSettings": { argTypes: [HTTP2SESSION_T, DYN], result: VOID },
|
|
809
|
-
"http2.sessionSettingsDynCb": { argTypes: [HTTP2SESSION_T, DYN, DYN], result: VOID },
|
|
810
|
-
"http2.sessionSettingsCb0": { argTypes: [HTTP2SESSION_T, DYN, { kind: "func", params: [], ret: VOID }], result: VOID },
|
|
811
|
-
"http2.sessionOnSettingsDyn": { argTypes: [HTTP2SESSION_T, DYN, BOOL, BOOL], result: VOID },
|
|
812
|
-
"http2.sessionOnSettings0": { argTypes: [HTTP2SESSION_T, { kind: "func", params: [], ret: VOID }, BOOL, BOOL], result: VOID },
|
|
813
|
-
"http2.sessionSettingsGet": { argTypes: [HTTP2SESSION_T, BOOL], result: DYN },
|
|
814
|
-
"http2.sessionPendingSettingsAck": { argTypes: [HTTP2SESSION_T], result: BOOL },
|
|
815
|
-
"http2.getDefaultSettings": { argTypes: [], result: DYN },
|
|
816
|
-
"http2.streamSetEncoding": { argTypes: [HTTP2STREAM_T, STRING], result: VOID },
|
|
817
|
-
"http2.streamSetEncodingRet": { argTypes: [HTTP2STREAM_T, STRING], result: HTTP2STREAM_T },
|
|
818
|
-
"http2.streamResume": { argTypes: [HTTP2STREAM_T], result: VOID },
|
|
819
|
-
"http2.streamPause": { argTypes: [HTTP2STREAM_T], result: VOID },
|
|
820
|
-
"http2.streamOnData": { argTypes: [HTTP2STREAM_T, null, BOOL], result: VOID },
|
|
821
|
-
"http2.streamOnEnd": { argTypes: [HTTP2STREAM_T, null, BOOL], result: VOID },
|
|
822
|
-
"http2.streamOnClose": { argTypes: [HTTP2STREAM_T, null, BOOL], result: VOID },
|
|
823
|
-
"http2.streamOnAborted": { argTypes: [HTTP2STREAM_T, null, BOOL], result: VOID },
|
|
824
|
-
"http2.streamOnError": { argTypes: [HTTP2STREAM_T, null, BOOL], result: VOID },
|
|
825
|
-
"http2.streamOnResponse": { argTypes: [HTTP2STREAM_T, null, BOOL], result: VOID },
|
|
826
|
-
"http2.streamId": { argTypes: [HTTP2STREAM_T], result: F64 },
|
|
827
|
-
"http2.streamRstCode": { argTypes: [HTTP2STREAM_T], result: F64 },
|
|
828
|
-
"http2.streamDestroyed": { argTypes: [HTTP2STREAM_T], result: BOOL },
|
|
829
|
-
"http2.streamClosed": { argTypes: [HTTP2STREAM_T], result: BOOL },
|
|
830
|
-
"http2.streamAborted": { argTypes: [HTTP2STREAM_T], result: BOOL },
|
|
831
|
-
"http2.streamPending": { argTypes: [HTTP2STREAM_T], result: BOOL },
|
|
832
|
-
"http2.streamSession": { argTypes: [HTTP2STREAM_T], result: HTTP2SESSION_T },
|
|
833
|
-
// The createConnection forms: arg 0 is the dialer closure (() =>
|
|
834
|
-
// Socket — the libCall case checks), then path/method/timeout/headers/
|
|
835
|
-
// autoEnd like http.request.
|
|
836
|
-
"http.requestConn": { argTypes: [null, STRING, STRING, F64, arrayOf(STRING), BOOL], result: HTTPCLIENTREQ_T },
|
|
837
|
-
"http.requestConnCb": { argTypes: [null, STRING, STRING, F64, arrayOf(STRING), BOOL, null], result: HTTPCLIENTREQ_T },
|
|
838
|
-
"https.request": { argTypes: [STRING, F64, STRING, STRING, F64, arrayOf(STRING), BOOL, BOOL, null], result: HTTPCLIENTREQ_T },
|
|
839
|
-
"https.requestCb": { argTypes: [STRING, F64, STRING, STRING, F64, arrayOf(STRING), BOOL, BOOL, null, null], result: HTTPCLIENTREQ_T },
|
|
840
|
-
"https.requestUrl": { argTypes: [STRING, STRING, BOOL], result: HTTPCLIENTREQ_T },
|
|
841
|
-
"https.requestUrlCb": { argTypes: [STRING, STRING, BOOL, null], result: HTTPCLIENTREQ_T },
|
|
842
|
-
"https.requestAgent": { argTypes: [STRING, F64, STRING, STRING, F64, arrayOf(STRING), BOOL, BOOL, null, DYN], result: HTTPCLIENTREQ_T },
|
|
843
|
-
"https.requestAgentCb": { argTypes: [STRING, F64, STRING, STRING, F64, arrayOf(STRING), BOOL, BOOL, null, DYN, null], result: HTTPCLIENTREQ_T },
|
|
844
|
-
// The requestFn binding's runtime-secure rows: https.request's shape
|
|
845
|
-
// with the leading `secure` bool.
|
|
846
|
-
"https.requestFn": { argTypes: [BOOL, STRING, F64, STRING, STRING, F64, arrayOf(STRING), BOOL, BOOL, null], result: HTTPCLIENTREQ_T },
|
|
847
|
-
"https.requestFnCb": { argTypes: [BOOL, STRING, F64, STRING, STRING, F64, arrayOf(STRING), BOOL, BOOL, null, null], result: HTTPCLIENTREQ_T },
|
|
848
|
-
"http.clientWrite": { argTypes: [HTTPCLIENTREQ_T, STRING], result: VOID },
|
|
849
|
-
"http.clientSetHeader": { argTypes: [HTTPCLIENTREQ_T, STRING, STRING], result: VOID },
|
|
850
|
-
"http.clientGetHeader": { argTypes: [HTTPCLIENTREQ_T, STRING], result: VOID },
|
|
851
|
-
"http.clientHasHeader": { argTypes: [HTTPCLIENTREQ_T, STRING], result: BOOL },
|
|
852
|
-
"http.clientRemoveHeader": { argTypes: [HTTPCLIENTREQ_T, STRING], result: VOID },
|
|
853
|
-
"http.clientGetHeaderNames": { argTypes: [HTTPCLIENTREQ_T], result: arrayOf(STRING) },
|
|
854
|
-
"http.clientGetRawHeaderNames": { argTypes: [HTTPCLIENTREQ_T], result: arrayOf(STRING) },
|
|
855
|
-
"http.clientGetHeaders": { argTypes: [HTTPCLIENTREQ_T], result: DYN },
|
|
856
|
-
"http.clientWriteBytes": { argTypes: [HTTPCLIENTREQ_T, BYTES_U8], result: VOID },
|
|
857
|
-
"http.clientEnd": { argTypes: [HTTPCLIENTREQ_T], result: VOID },
|
|
858
|
-
"http.clientEndStr": { argTypes: [HTTPCLIENTREQ_T, STRING], result: VOID },
|
|
859
|
-
"http.clientEndBytes": { argTypes: [HTTPCLIENTREQ_T, BYTES_U8], result: VOID },
|
|
860
|
-
"http.clientWriteDyn": { argTypes: [HTTPCLIENTREQ_T, DYN], result: VOID },
|
|
861
|
-
"http.clientEndDyn": { argTypes: [HTTPCLIENTREQ_T, DYN], result: VOID },
|
|
862
|
-
"http.clientFlushHeaders": { argTypes: [HTTPCLIENTREQ_T], result: VOID },
|
|
863
|
-
"http.clientAddTrailers": { argTypes: [HTTPCLIENTREQ_T, arrayOf(STRING)], result: VOID },
|
|
864
|
-
"http.clientCork": { argTypes: [HTTPCLIENTREQ_T], result: VOID },
|
|
865
|
-
"http.clientUncork": { argTypes: [HTTPCLIENTREQ_T], result: VOID },
|
|
866
|
-
"http.clientWritableCorked": { argTypes: [HTTPCLIENTREQ_T], result: F64 },
|
|
867
|
-
"http.clientMethod": { argTypes: [HTTPCLIENTREQ_T], result: STRING },
|
|
868
|
-
"http.clientPath": { argTypes: [HTTPCLIENTREQ_T], result: STRING },
|
|
869
|
-
"http.clientHost": { argTypes: [HTTPCLIENTREQ_T], result: STRING },
|
|
870
|
-
"http.clientProtocol": { argTypes: [HTTPCLIENTREQ_T], result: STRING },
|
|
871
|
-
"http.clientHeadersSent": { argTypes: [HTTPCLIENTREQ_T], result: BOOL },
|
|
872
|
-
"http.clientWritableEnded": { argTypes: [HTTPCLIENTREQ_T], result: BOOL },
|
|
873
|
-
"http.clientWritableFinished": { argTypes: [HTTPCLIENTREQ_T], result: BOOL },
|
|
874
|
-
"http.clientSocket": { argTypes: [HTTPCLIENTREQ_T], result: NETSOCKET_T },
|
|
875
|
-
"http.clientReusedSocket": { argTypes: [HTTPCLIENTREQ_T], result: BOOL },
|
|
876
|
-
"http.clientSetNoDelay": { argTypes: [HTTPCLIENTREQ_T, BOOL], result: VOID },
|
|
877
|
-
"http.clientSetSocketKeepAlive": { argTypes: [HTTPCLIENTREQ_T, BOOL, F64], result: VOID },
|
|
878
|
-
"http.clientSetTimeout": { argTypes: [HTTPCLIENTREQ_T, F64], result: VOID },
|
|
879
|
-
"http.clientSetTimeoutCb": { argTypes: [HTTPCLIENTREQ_T, F64, { kind: "func", params: [], ret: VOID }], result: VOID },
|
|
880
|
-
"http.statusCodes": { argTypes: [], result: DYN },
|
|
881
|
-
"http.methods": { argTypes: [], result: arrayOf(STRING) },
|
|
882
|
-
"http.reqSetTimeout": { argTypes: [HTTPREQ_T, F64], result: VOID },
|
|
883
|
-
"http.reqSetTimeoutCb": { argTypes: [HTTPREQ_T, F64, { kind: "func", params: [], ret: VOID }], result: VOID },
|
|
884
|
-
"http.clientDestroy": { argTypes: [HTTPCLIENTREQ_T], result: VOID },
|
|
885
|
-
"http.clientAbort": { argTypes: [HTTPCLIENTREQ_T], result: VOID },
|
|
886
|
-
"http.clientAborted": { argTypes: [HTTPCLIENTREQ_T], result: BOOL },
|
|
887
|
-
"http.clientDestroyed": { argTypes: [HTTPCLIENTREQ_T], result: BOOL },
|
|
888
|
-
"http.clientOnResponse": { argTypes: [HTTPCLIENTREQ_T, null, BOOL], result: VOID },
|
|
889
|
-
"http.clientOnSocket": { argTypes: [HTTPCLIENTREQ_T, null, BOOL], result: VOID },
|
|
890
|
-
"http.clientOnFinish": { argTypes: [HTTPCLIENTREQ_T, { kind: "func", params: [], ret: VOID }, BOOL], result: VOID },
|
|
891
|
-
"http.clientOnError": { argTypes: [HTTPCLIENTREQ_T, null, BOOL], result: VOID },
|
|
892
|
-
"http.clientOnTimeout": { argTypes: [HTTPCLIENTREQ_T, { kind: "func", params: [], ret: VOID }, BOOL], result: VOID },
|
|
893
|
-
"http.clientOnClose": { argTypes: [HTTPCLIENTREQ_T, { kind: "func", params: [], ret: VOID }, BOOL], result: VOID },
|
|
894
|
-
"http.clientOnAbort": { argTypes: [HTTPCLIENTREQ_T, { kind: "func", params: [], ret: VOID }, BOOL], result: VOID },
|
|
895
|
-
"cp.execSync": {
|
|
896
|
-
argTypes: [STRING, arrayOf(STRING), BOOL, STRING, BOOL, STRING, BOOL, arrayOf(STRING), F64, F64, F64],
|
|
897
|
-
result: STRING,
|
|
898
|
-
},
|
|
899
|
-
"cp.execCapture": {
|
|
900
|
-
argTypes: [STRING, arrayOf(STRING), STRING, BOOL, arrayOf(STRING), F64],
|
|
901
|
-
result: SPAWNRES_T,
|
|
902
|
-
},
|
|
903
|
-
"cp.spawn": { argTypes: [STRING, arrayOf(STRING)], result: CHILD_T },
|
|
904
|
-
"process.forkTarget": { argTypes: [F64], result: F64 },
|
|
905
|
-
"cp.fork": {
|
|
906
|
-
argTypes: [F64, arrayOf(STRING), F64, F64, F64, BOOL, arrayOf(STRING), STRING],
|
|
907
|
-
result: CHILD_T,
|
|
908
|
-
},
|
|
909
|
-
"child.connected": { argTypes: [CHILD_T], result: BOOL },
|
|
910
|
-
"child.send": { argTypes: [CHILD_T, STRING], result: BOOL },
|
|
911
|
-
"child.sendCb": { argTypes: [CHILD_T, STRING, null], result: BOOL },
|
|
912
|
-
"child.disconnect": { argTypes: [CHILD_T], result: VOID },
|
|
913
|
-
"child.onMessage": { argTypes: [CHILD_T, null, BOOL], result: VOID },
|
|
914
|
-
"child.onDisconnect": { argTypes: [CHILD_T, null, BOOL], result: VOID },
|
|
915
|
-
"child.onSpawn": { argTypes: [CHILD_T, null], result: VOID },
|
|
916
|
-
"child.onDyn": { argTypes: [CHILD_T, STRING, DYN], result: VOID },
|
|
917
|
-
"process.connected": { argTypes: [], result: BOOL },
|
|
918
|
-
"process.send": { argTypes: [STRING], result: BOOL },
|
|
919
|
-
"process.sendCb": { argTypes: [STRING, null], result: BOOL },
|
|
920
|
-
"process.disconnect": { argTypes: [], result: VOID },
|
|
921
|
-
"process.onMessage": { argTypes: [null, BOOL], result: VOID },
|
|
922
|
-
"process.onDisconnect": { argTypes: [null, BOOL], result: VOID },
|
|
923
|
-
"cp.execFile": { argTypes: [STRING, arrayOf(STRING), null], result: CHILD_T },
|
|
924
|
-
// spawn's options form: per-slot stdio modes (0 ignore / 1 inherit /
|
|
925
|
-
// 2 fd) with the out/err fds for mode 2, detached, env replacement
|
|
926
|
-
// pairs, cwd ("" = inherit).
|
|
927
|
-
"cp.spawnOpts": {
|
|
928
|
-
argTypes: [STRING, arrayOf(STRING), F64, F64, F64, F64, F64, BOOL, BOOL, BOOL, arrayOf(STRING), STRING],
|
|
929
|
-
result: CHILD_T,
|
|
930
|
-
},
|
|
931
|
-
"cp.spawnDynamic": { argTypes: [STRING, arrayOf(STRING), DYN], result: CHILD_T },
|
|
932
|
-
// The callback's func type is program-dependent (zero params, or the
|
|
933
|
-
// `number | null` union / the %Error class) — the libCall case checks
|
|
934
|
-
// the shape; the slot here only pins arity and the child receiver.
|
|
935
|
-
"child.onExit": { argTypes: [CHILD_T, null], result: VOID },
|
|
936
|
-
"child.onClose": { argTypes: [CHILD_T, null], result: VOID },
|
|
937
|
-
"child.onError": { argTypes: [CHILD_T, null], result: VOID },
|
|
938
|
-
// Like process.envGet, spawnRes.status's result type is program-dependent
|
|
939
|
-
// (the interned `number | null` union) — the libCall case checks the arms.
|
|
940
|
-
"spawnRes.status": { argTypes: [SPAWNRES_T], result: VOID },
|
|
941
|
-
// spawnRes.error's result is the interned `Error | undefined` union —
|
|
942
|
-
// the libCall case checks the arms, the spawnRes.status pattern.
|
|
943
|
-
"spawnRes.error": { argTypes: [SPAWNRES_T], result: VOID },
|
|
944
|
-
// spawnRes.signal's result is the interned `string | null` union —
|
|
945
|
-
// same pattern.
|
|
946
|
-
"spawnRes.signal": { argTypes: [SPAWNRES_T], result: VOID },
|
|
947
|
-
// The ChildProcess lifecycle members: pid/exitCode are program-dependent
|
|
948
|
-
// unions (`number | undefined` / `number | null` — the libCall case
|
|
949
|
-
// checks the arms, the spawnRes.status pattern).
|
|
950
|
-
"child.pid": { argTypes: [CHILD_T], result: VOID },
|
|
951
|
-
"child.exitCode": { argTypes: [CHILD_T], result: VOID },
|
|
952
|
-
// The close-override pair: the bound close's result func type and the
|
|
953
|
-
// override's func argument are program-dependent (the callback union's
|
|
954
|
-
// tags) — the slots pin the server receiver; the libCall case checks
|
|
955
|
-
// the bound value's shape.
|
|
956
|
-
"net.serverCloseBind": { argTypes: [NETSERVER_T], result: VOID },
|
|
957
|
-
"net.serverSetCloseOverride": { argTypes: [NETSERVER_T, null], result: VOID },
|
|
958
|
-
// The piped-output stream reads: `Readable | null` unions (the libCall
|
|
959
|
-
// case checks the arms — the child.pid pattern with a ref arm).
|
|
960
|
-
"child.stdout": { argTypes: [CHILD_T], result: VOID },
|
|
961
|
-
"child.stderr": { argTypes: [CHILD_T], result: VOID },
|
|
962
|
-
"child.stdin": { argTypes: [CHILD_T], result: VOID },
|
|
963
|
-
// Listener registrations: callback func shapes are program-dependent
|
|
964
|
-
// (zero-param / Buffer / Buffer-armed union) — the slots pin arity,
|
|
965
|
-
// the stream receiver, and the once-flag.
|
|
966
|
-
"stream.onData": { argTypes: [CHILDSTREAM_T, null, BOOL], result: VOID },
|
|
967
|
-
"stream.onDataStr": { argTypes: [CHILDSTREAM_T, null, BOOL], result: VOID },
|
|
968
|
-
"stream.onEnd": { argTypes: [CHILDSTREAM_T, null, BOOL], result: VOID },
|
|
969
|
-
"stream.childSetEncoding": { argTypes: [CHILDSTREAM_T, STRING], result: CHILDSTREAM_T },
|
|
970
|
-
"writer.writeString": { argTypes: [CHILDWRITER_T, STRING], result: BOOL },
|
|
971
|
-
"writer.writeBytes": { argTypes: [CHILDWRITER_T, BYTES_U8], result: BOOL },
|
|
972
|
-
"writer.end": { argTypes: [CHILDWRITER_T], result: VOID },
|
|
973
|
-
"writer.destroy": { argTypes: [CHILDWRITER_T], result: VOID },
|
|
974
|
-
"writer.writable": { argTypes: [CHILDWRITER_T], result: BOOL },
|
|
975
|
-
"writer.onDrain": { argTypes: [CHILDWRITER_T, null, BOOL], result: VOID },
|
|
976
|
-
"writer.onFinish": { argTypes: [CHILDWRITER_T, null, BOOL], result: VOID },
|
|
977
|
-
"writer.onError": { argTypes: [CHILDWRITER_T, null, BOOL], result: VOID },
|
|
978
|
-
"procStream.write": { argTypes: [PROCSTREAM_T, STRING], result: BOOL },
|
|
979
|
-
"child.killed": { argTypes: [CHILD_T], result: BOOL },
|
|
980
|
-
"child.kill": { argTypes: [CHILD_T, STRING], result: BOOL },
|
|
981
|
-
"child.killNum": { argTypes: [CHILD_T, F64], result: BOOL },
|
|
982
|
-
"child.unref": { argTypes: [CHILD_T], result: VOID },
|
|
983
|
-
"child.ref": { argTypes: [CHILD_T], result: VOID },
|
|
984
|
-
"spawnRes.stdout": { argTypes: [SPAWNRES_T], result: STRING },
|
|
985
|
-
"spawnRes.stderr": { argTypes: [SPAWNRES_T], result: STRING },
|
|
986
|
-
"crypto.randomUUID": { argTypes: [], result: STRING },
|
|
987
|
-
"crypto.randomBytesToString": { argTypes: [F64, STRING], result: STRING },
|
|
988
|
-
"crypto.randomBytes": { argTypes: [F64], result: BYTES_U8 },
|
|
989
|
-
"crypto.hashDigestStr": { argTypes: [STRING, STRING, STRING], result: STRING },
|
|
990
|
-
"crypto.hashDigestBytes": { argTypes: [STRING, BYTES_U8, STRING], result: STRING },
|
|
991
|
-
"crypto.native": { argTypes: [], result: DYN },
|
|
992
|
-
"crypto.hashNew": { argTypes: [STRING], result: CRYPTOHASH_T },
|
|
993
|
-
"crypto.hmacNewStr": { argTypes: [STRING, STRING], result: CRYPTOHMAC_T },
|
|
994
|
-
"crypto.hmacNewBytes": { argTypes: [STRING, BYTES_U8], result: CRYPTOHMAC_T },
|
|
995
|
-
"crypto.hashUpdateStr": { argTypes: [CRYPTOHASH_T, STRING], result: CRYPTOHASH_T },
|
|
996
|
-
"crypto.hashUpdateBytes": { argTypes: [CRYPTOHASH_T, BYTES_U8], result: CRYPTOHASH_T },
|
|
997
|
-
"crypto.hmacUpdateStr": { argTypes: [CRYPTOHMAC_T, STRING], result: CRYPTOHMAC_T },
|
|
998
|
-
"crypto.hmacUpdateBytes": { argTypes: [CRYPTOHMAC_T, BYTES_U8], result: CRYPTOHMAC_T },
|
|
999
|
-
"crypto.hashCopy": { argTypes: [CRYPTOHASH_T], result: CRYPTOHASH_T },
|
|
1000
|
-
"crypto.hashDigestString": { argTypes: [CRYPTOHASH_T, STRING], result: STRING },
|
|
1001
|
-
"crypto.hashDigestBuffer": { argTypes: [CRYPTOHASH_T], result: BYTES_U8 },
|
|
1002
|
-
"crypto.hmacDigestString": { argTypes: [CRYPTOHMAC_T, STRING], result: STRING },
|
|
1003
|
-
"crypto.hmacDigestBuffer": { argTypes: [CRYPTOHMAC_T], result: BYTES_U8 },
|
|
1004
|
-
"crypto.timingSafeEqual": { argTypes: [BYTES_U8, BYTES_U8], result: BOOL },
|
|
1005
|
-
"crypto.randomFill": { argTypes: [BYTES_U8, F64, F64], result: BYTES_U8 },
|
|
1006
|
-
"crypto.randomFillRest": { argTypes: [BYTES_U8, F64], result: BYTES_U8 },
|
|
1007
|
-
"crypto.randomInt": { argTypes: [F64, F64], result: F64 },
|
|
1008
|
-
"crypto.pbkdf2": { argTypes: [BYTES_U8, BYTES_U8, F64, F64, STRING], result: BYTES_U8 },
|
|
1009
|
-
"crypto.randomBytesCb": { argTypes: [F64, null], result: VOID },
|
|
1010
|
-
"crypto.pbkdf2Cb": { argTypes: [BYTES_U8, BYTES_U8, F64, F64, STRING, null], result: VOID },
|
|
1011
|
-
"crypto.hkdf": { argTypes: [STRING, BYTES_U8, BYTES_U8, BYTES_U8, F64], result: DYN },
|
|
1012
|
-
"crypto.hkdfCb": { argTypes: [STRING, BYTES_U8, BYTES_U8, BYTES_U8, F64, null], result: VOID },
|
|
1013
|
-
"crypto.scrypt": { argTypes: [BYTES_U8, BYTES_U8, F64, DYN], result: BYTES_U8 },
|
|
1014
|
-
"crypto.scryptCb": { argTypes: [BYTES_U8, BYTES_U8, F64, DYN, null], result: VOID },
|
|
1015
|
-
// The Buffer statics and the fs/zlib Buffer forms: fixed always-u8
|
|
1016
|
-
// signatures (Buffer IS a Uint8Array — one bytes kind).
|
|
1017
|
-
"buffer.fromStr": { argTypes: [STRING, STRING], result: BYTES_U8 },
|
|
1018
|
-
"buffer.brand": { argTypes: [BYTES_U8], result: BYTES_U8 },
|
|
1019
|
-
"buffer.fromDyn": { argTypes: [DYN, STRING], result: BYTES_U8 },
|
|
1020
|
-
"buffer.concat": { argTypes: [arrayOf(BYTES_U8)], result: BYTES_U8 },
|
|
1021
|
-
"buffer.byteLenDyn": { argTypes: [DYN, STRING], result: F64 },
|
|
1022
|
-
"buffer.byteLenStr": { argTypes: [STRING, STRING], result: F64 },
|
|
1023
|
-
"buffer.isEncoding": { argTypes: [STRING], result: BOOL },
|
|
1024
|
-
"buffer.concatLen": { argTypes: [arrayOf(BYTES_U8), F64], result: BYTES_U8 },
|
|
1025
|
-
// The checked-dynamic compare/equals validators (Node's argument
|
|
1026
|
-
// ladders over dyn-boxed invalid-input probes).
|
|
1027
|
-
"buffer.compareChk": { argTypes: [DYN, DYN], result: F64 },
|
|
1028
|
-
"bytes.equalsChk": { argTypes: [BYTES_U8, DYN], result: BOOL },
|
|
1029
|
-
"bytes.compareChk": { argTypes: [BYTES_U8, DYN, DYN, DYN, DYN, DYN], result: F64 },
|
|
1030
|
-
"buffer.newStringFail": { argTypes: [DYN], result: BYTES_U8 },
|
|
1031
|
-
"fs.toUnixTimestamp": { argTypes: [DYN], result: F64 },
|
|
1032
|
-
"fs.existsChk": { argTypes: [DYN, DYN], result: DYN },
|
|
1033
|
-
"fs.mkdtempChk": { argTypes: [DYN, DYN, STRING], result: VOID },
|
|
1034
|
-
"fs.mkdtempSyncChk": { argTypes: [DYN, DYN, STRING], result: STRING },
|
|
1035
|
-
"fs.readFileChk": { argTypes: [DYN, DYN, DYN, STRING], result: VOID },
|
|
1036
|
-
"fs.opendirChk": { argTypes: [DYN, DYN, STRING], result: VOID },
|
|
1037
|
-
"fs.watchFileChk": { argTypes: [DYN, DYN, STRING], result: VOID },
|
|
1038
|
-
"fs.lchmodChk": { argTypes: [DYN, DYN, DYN, STRING], result: VOID },
|
|
1039
|
-
"fs.lchmodSyncChk": { argTypes: [DYN, DYN], result: DYN },
|
|
1040
|
-
"fsp.lchmodChk": { argTypes: [DYN, DYN], result: { kind: "promise", inner: VOID } },
|
|
1041
|
-
"fs.readChk": { argTypes: [DYN, DYN, DYN, DYN, DYN, STRING], result: VOID },
|
|
1042
|
-
"fs.streamOptsChk": { argTypes: [DYN, DYN, STRING], result: VOID },
|
|
1043
|
-
"error.argTypeThrow": { argTypes: [STRING, STRING, DYN], result: VOID },
|
|
1044
|
-
"error.propTypeThrow": { argTypes: [STRING, STRING, DYN], result: VOID },
|
|
1045
|
-
"emitter.setMaxChk": { argTypes: [null, DYN], result: VOID },
|
|
1046
|
-
"emitter.setDefaultMaxChk": { argTypes: [DYN, STRING], result: VOID },
|
|
1047
|
-
"fs.readFileSyncBytes": { argTypes: [STRING], result: BYTES_U8 },
|
|
1048
|
-
"fs.writeFileSyncBytes": { argTypes: [STRING, BYTES_U8], result: VOID },
|
|
1049
|
-
"fs.appendFileSyncBytes": { argTypes: [STRING, BYTES_U8], result: VOID },
|
|
1050
|
-
"fsp.readFileBytes": { argTypes: [STRING], result: { kind: "promise", inner: BYTES_U8 } },
|
|
1051
|
-
"zlib.deflateSync": { argTypes: [BYTES_U8], result: BYTES_U8 },
|
|
1052
|
-
"zlib.inflateSync": { argTypes: [BYTES_U8], result: BYTES_U8 },
|
|
1053
|
-
"zlib.deflateRawSync": { argTypes: [BYTES_U8], result: BYTES_U8 },
|
|
1054
|
-
"zlib.deflateLevelSync": { argTypes: [BYTES_U8, F64, F64], result: BYTES_U8 },
|
|
1055
|
-
"zlib.inflateRawSync": { argTypes: [BYTES_U8], result: BYTES_U8 },
|
|
1056
|
-
"zlib.gzipSync": { argTypes: [BYTES_U8], result: BYTES_U8 },
|
|
1057
|
-
"zlib.gunzipSync": { argTypes: [BYTES_U8], result: BYTES_U8 },
|
|
1058
|
-
"zlib.unzipSync": { argTypes: [BYTES_U8], result: BYTES_U8 },
|
|
1059
|
-
"zlib.deflateCb": { argTypes: [BYTES_U8, null], result: VOID },
|
|
1060
|
-
"zlib.inflateCb": { argTypes: [BYTES_U8, null], result: VOID },
|
|
1061
|
-
"zlib.deflateRawCb": { argTypes: [BYTES_U8, null], result: VOID },
|
|
1062
|
-
"zlib.inflateRawCb": { argTypes: [BYTES_U8, null], result: VOID },
|
|
1063
|
-
"zlib.gzipCb": { argTypes: [BYTES_U8, null], result: VOID },
|
|
1064
|
-
"zlib.gunzipCb": { argTypes: [BYTES_U8, null], result: VOID },
|
|
1065
|
-
"zlib.unzipCb": { argTypes: [BYTES_U8, null], result: VOID },
|
|
1066
|
-
"zlib.crc32": { argTypes: [BYTES_U8, F64], result: F64 },
|
|
1067
|
-
"process.stdoutWriteBytes": { argTypes: [BYTES_U8, STRING], result: BOOL },
|
|
1068
|
-
"process.stderrWriteBytes": { argTypes: [BYTES_U8, STRING], result: BOOL },
|
|
1069
|
-
// Completion callback is program-dependent: zero params, checked-dynamic,
|
|
1070
|
-
// or an optional Error | null slot (same success shape as fs.rename).
|
|
1071
|
-
"process.stdoutWriteBytesCb": { argTypes: [BYTES_U8, STRING, null], result: BOOL },
|
|
1072
|
-
"process.stderrWriteBytesCb": { argTypes: [BYTES_U8, STRING, null], result: BOOL },
|
|
1073
|
-
"fsp.readFile": { argTypes: [STRING, STRING], result: { kind: "promise", inner: STRING } },
|
|
1074
|
-
"fsp.writeFile": { argTypes: [STRING, STRING], result: { kind: "promise", inner: VOID } },
|
|
1075
|
-
"fsp.writeFileMode": { argTypes: [STRING, STRING, F64], result: { kind: "promise", inner: VOID } },
|
|
1076
|
-
"fsp.mkdir": { argTypes: [STRING], result: { kind: "promise", inner: VOID } },
|
|
1077
|
-
"fsp.mkdirMode": { argTypes: [STRING, F64], result: { kind: "promise", inner: VOID } },
|
|
1078
|
-
"fsp.mkdirRecursive": { argTypes: [STRING], result: { kind: "promise", inner: VOID } },
|
|
1079
|
-
"fsp.mkdirRecursiveMode": { argTypes: [STRING, F64], result: { kind: "promise", inner: VOID } },
|
|
1080
|
-
"fsp.unlink": { argTypes: [STRING], result: { kind: "promise", inner: VOID } },
|
|
1081
|
-
"fsp.chmod": { argTypes: [STRING, F64], result: { kind: "promise", inner: VOID } },
|
|
1082
|
-
"fsp.link": { argTypes: [DYN, DYN], result: { kind: "promise", inner: VOID } },
|
|
1083
|
-
"fsp.symlink": { argTypes: [DYN, DYN, DYN], result: { kind: "promise", inner: VOID } },
|
|
1084
|
-
"fsp.readlink": { argTypes: [DYN, DYN], result: { kind: "promise", inner: DYN } },
|
|
1085
|
-
"fsp.statfs": { argTypes: [DYN, DYN], result: { kind: "promise", inner: DYN } },
|
|
1086
|
-
"fsp.readlinkStr": { argTypes: [DYN, DYN], result: { kind: "promise", inner: STRING } },
|
|
1087
|
-
"fsp.readlinkBuffer": { argTypes: [DYN, DYN], result: { kind: "promise", inner: BYTES_U8 } },
|
|
1088
|
-
"fsp.utimes": { argTypes: [DYN, DYN, DYN], result: { kind: "promise", inner: VOID } },
|
|
1089
|
-
"fsp.lutimes": { argTypes: [DYN, DYN, DYN], result: { kind: "promise", inner: VOID } },
|
|
1090
|
-
"fsp.rename": { argTypes: [STRING, STRING], result: { kind: "promise", inner: VOID } },
|
|
1091
|
-
"fsp.readdir": { argTypes: [STRING], result: { kind: "promise", inner: arrayOf(STRING) } },
|
|
1092
|
-
// Result is promise<call-site Dirent record array>; the libCall case
|
|
1093
|
-
// validates the program-dependent record shape below.
|
|
1094
|
-
"fsp.readdirTypes": { argTypes: [STRING], result: { kind: "promise", inner: VOID } },
|
|
1095
|
-
"fsp.rm": { argTypes: [STRING], result: { kind: "promise", inner: VOID } },
|
|
1096
|
-
"fsp.stat": { argTypes: [STRING], result: { kind: "promise", inner: STATS_T } },
|
|
1097
|
-
"fsp.realpath": { argTypes: [STRING], result: { kind: "promise", inner: STRING } },
|
|
1098
|
-
"fsp.lstat": { argTypes: [STRING], result: { kind: "promise", inner: STATS_T } },
|
|
1099
|
-
"fsp.open": { argTypes: [STRING, STRING, F64], result: { kind: "promise", inner: FILEHANDLE_T } },
|
|
1100
|
-
"fileHandle.fd": { argTypes: [FILEHANDLE_T], result: F64 },
|
|
1101
|
-
"fileHandle.close": { argTypes: [FILEHANDLE_T], result: { kind: "promise", inner: VOID } },
|
|
1102
|
-
"fileHandle.sync": { argTypes: [FILEHANDLE_T], result: { kind: "promise", inner: VOID } },
|
|
1103
|
-
"fileHandle.datasync": { argTypes: [FILEHANDLE_T], result: { kind: "promise", inner: VOID } },
|
|
1104
|
-
"fileHandle.truncate": { argTypes: [FILEHANDLE_T, F64], result: { kind: "promise", inner: VOID } },
|
|
1105
|
-
"fileHandle.chmod": { argTypes: [FILEHANDLE_T, F64], result: { kind: "promise", inner: VOID } },
|
|
1106
|
-
"fileHandle.utimes": { argTypes: [FILEHANDLE_T, DYN, DYN], result: { kind: "promise", inner: VOID } },
|
|
1107
|
-
"fileHandle.readv": { argTypes: [FILEHANDLE_T, arrayOf(BYTES_U8), F64], result: { kind: "promise", inner: VOID } },
|
|
1108
|
-
"fileHandle.writev": { argTypes: [FILEHANDLE_T, arrayOf(BYTES_U8), F64], result: { kind: "promise", inner: VOID } },
|
|
1109
|
-
// read/write carry call-site result record shapes; the validator checks
|
|
1110
|
-
// those below, so promise<void> is only a table sentinel.
|
|
1111
|
-
"fileHandle.read": { argTypes: [FILEHANDLE_T, BYTES_U8, F64, F64, F64, BOOL], result: { kind: "promise", inner: VOID } },
|
|
1112
|
-
"fileHandle.writeBytes": { argTypes: [FILEHANDLE_T, BYTES_U8, F64, F64, F64, BOOL], result: { kind: "promise", inner: VOID } },
|
|
1113
|
-
"fileHandle.writeStr": { argTypes: [FILEHANDLE_T, STRING, F64, STRING], result: { kind: "promise", inner: VOID } },
|
|
1114
|
-
"fileHandle.readFile": { argTypes: [FILEHANDLE_T, STRING], result: { kind: "promise", inner: STRING } },
|
|
1115
|
-
"fileHandle.readFileBytes": { argTypes: [FILEHANDLE_T, STRING], result: { kind: "promise", inner: BYTES_U8 } },
|
|
1116
|
-
"fileHandle.writeFile": { argTypes: [FILEHANDLE_T, STRING, STRING], result: { kind: "promise", inner: VOID } },
|
|
1117
|
-
"fileHandle.writeFileBytes": { argTypes: [FILEHANDLE_T, BYTES_U8, STRING], result: { kind: "promise", inner: VOID } },
|
|
1118
|
-
"fileHandle.stat": { argTypes: [FILEHANDLE_T], result: { kind: "promise", inner: STATS_T } },
|
|
1119
|
-
"process.argv": { argTypes: [], result: arrayOf(STRING) },
|
|
1120
|
-
"process.platform": { argTypes: [], result: STRING },
|
|
1121
|
-
// The one libCall whose result type is program-dependent (union ids are
|
|
1122
|
-
// per-module): the `result` here is a placeholder — the libCall case
|
|
1123
|
-
// checks the union's ARMS ([string, undefinedT] in canonical order)
|
|
1124
|
-
// against the module's registry instead.
|
|
1125
|
-
"process.envGet": { argTypes: [STRING], result: VOID },
|
|
1126
|
-
"process.envSet": { argTypes: [STRING, STRING], result: VOID },
|
|
1127
|
-
"process.envUnset": { argTypes: [STRING], result: VOID },
|
|
1128
|
-
"process.envPairs": { argTypes: [], result: arrayOf(STRING) },
|
|
1129
|
-
"process.exit": { argTypes: [F64], result: VOID },
|
|
1130
|
-
"process.setExitCode": { argTypes: [F64], result: VOID },
|
|
1131
|
-
"process.currentExitCode": { argTypes: [], result: F64 },
|
|
1132
|
-
"process.cwd": { argTypes: [], result: STRING },
|
|
1133
|
-
"process.pid": { argTypes: [], result: F64 },
|
|
1134
|
-
"dyn.this": { argTypes: [], result: DYN },
|
|
1135
|
-
"dyn.generatorThis": { argTypes: [], result: DYN },
|
|
1136
|
-
"process.getuid": { argTypes: [], result: F64 },
|
|
1137
|
-
"process.getgid": { argTypes: [], result: F64 },
|
|
1138
|
-
"process.execPath": { argTypes: [], result: STRING },
|
|
1139
|
-
"process.arch": { argTypes: [], result: STRING },
|
|
1140
|
-
"process.versions": { argTypes: [], result: DYN },
|
|
1141
|
-
"process.builtinId": { argTypes: [DYN, arrayOf(STRING)], result: STRING },
|
|
1142
|
-
"process.builtinModule": { argTypes: [STRING, DYN], result: DYN },
|
|
1143
|
-
"process.builtinUnsupported": { argTypes: [STRING, STRING], result: DYN },
|
|
1144
|
-
"fs.callbackValue": { argTypes: [STRING], result: DYN },
|
|
1145
|
-
"fs.callbackCall": { argTypes: [STRING, DYN], result: DYN },
|
|
1146
|
-
"process.hrtimeValue": { argTypes: [], result: DYN },
|
|
1147
|
-
"process.versionsNode": { argTypes: [], result: STRING },
|
|
1148
|
-
"process.versionsOpenssl": { argTypes: [], result: STRING },
|
|
1149
|
-
"process.kill": { argTypes: [F64, STRING], result: BOOL },
|
|
1150
|
-
"process.killNum": { argTypes: [F64, F64], result: BOOL },
|
|
1151
|
-
"process.stdoutWrite": { argTypes: [STRING], result: BOOL },
|
|
1152
|
-
"process.stdio": { argTypes: [F64], result: DYN },
|
|
1153
|
-
"process.stderrWrite": { argTypes: [STRING], result: BOOL },
|
|
1154
|
-
// error.new's result and the receiver slots are builtin-error classes —
|
|
1155
|
-
// program-dependent object types, checked in the libCall case.
|
|
1156
|
-
"error.new": { argTypes: [STRING], result: VOID },
|
|
1157
|
-
"error.newOptions": { argTypes: [DYN, DYN], result: VOID },
|
|
1158
|
-
"error.ctorOptions": { argTypes: [null, DYN, DYN], result: VOID },
|
|
1159
|
-
"error.cause": { argTypes: [null], result: DYN },
|
|
1160
|
-
"error.hasCause": { argTypes: [null], result: BOOL },
|
|
1161
|
-
"error.setCause": { argTypes: [null, DYN], result: VOID },
|
|
1162
|
-
"error.defineCause": { argTypes: [null, DYN], result: VOID },
|
|
1163
|
-
"error.deleteCause": { argTypes: [null], result: VOID },
|
|
1164
|
-
"error.nodeThrow": { argTypes: [F64, STRING, STRING], result: VOID },
|
|
1165
|
-
"dyn.toStringCoerce": { argTypes: [DYN], result: STRING },
|
|
1166
|
-
"dyn.stringConstructor": { argTypes: [DYN], result: STRING },
|
|
1167
|
-
"dyn.propertyKey": { argTypes: [DYN], result: DYN },
|
|
1168
|
-
"dyn.toNumeric": { argTypes: [DYN], result: DYN },
|
|
1169
|
-
"dyn.increment": { argTypes: [DYN, BOOL], result: DYN },
|
|
1170
|
-
"dyn.numberConstructor": { argTypes: [DYN], result: F64 },
|
|
1171
|
-
"dyn.bigintConstructor": { argTypes: [DYN], result: BIGINT_T },
|
|
1172
|
-
"dyn.toNumberCoerce": { argTypes: [DYN], result: F64 },
|
|
1173
|
-
"dyn.add": { argTypes: [DYN, DYN], result: DYN },
|
|
1174
|
-
"dyn.arithmetic": { argTypes: [DYN, DYN, STRING], result: DYN },
|
|
1175
|
-
"dyn.compare": { argTypes: [DYN, DYN, STRING], result: BOOL },
|
|
1176
|
-
"dyn.bitwise": { argTypes: [DYN, DYN, STRING], result: DYN },
|
|
1177
|
-
"dyn.proxyNew": { argTypes: [DYN, DYN], result: DYN },
|
|
1178
|
-
// Always throws; the result is the READ's declared type (a typed dummy
|
|
1179
|
-
// the unwind abandons) — the libCall case skips the result check.
|
|
1180
|
-
"global.undefRead": { argTypes: [STRING], result: VOID },
|
|
1181
|
-
"console.native": { argTypes: [], result: DYN },
|
|
1182
|
-
"global.native": { argTypes: [arrayOf(STRING)], result: DYN },
|
|
1183
|
-
// `X.name` through a class value: the arg is a program-dependent
|
|
1184
|
-
// classval (a null slot; the libCall case checks the kind).
|
|
1185
|
-
"class.name": { argTypes: [null], result: STRING },
|
|
1186
|
-
"error.ctor": { argTypes: [null, STRING], result: VOID },
|
|
1187
|
-
"error.toString": { argTypes: [null], result: STRING },
|
|
1188
|
-
"dyn.sameValue": { argTypes: [DYN, DYN], result: BOOL },
|
|
1189
|
-
"error.stack": { argTypes: [null], result: STRING },
|
|
1190
|
-
"error.stackLimitGet": { argTypes: [], result: F64 },
|
|
1191
|
-
"error.stackLimitSet": { argTypes: [F64], result: VOID },
|
|
1192
|
-
// Receiver (any error-hierarchy object) and the program-dependent
|
|
1193
|
-
// `string | undefined` result are checked in the libCall case.
|
|
1194
|
-
"error.code": { argTypes: [null], result: VOID },
|
|
1195
|
-
// DOMException: construction takes the two dyn args (WebIDL's
|
|
1196
|
-
// resolution runs in the runtime); the %DOMException result is a
|
|
1197
|
-
// program-dependent object type, checked in the libCall case. The
|
|
1198
|
-
// read surface takes the %DOMException receiver (a null slot — the
|
|
1199
|
-
// libCall case checks the class name).
|
|
1200
|
-
"error.newDom": { argTypes: [DYN, DYN], result: VOID },
|
|
1201
|
-
"error.domCode": { argTypes: [null], result: F64 },
|
|
1202
|
-
"error.domHasCause": { argTypes: [null], result: BOOL },
|
|
1203
|
-
"error.domCause": { argTypes: [null], result: DYN },
|
|
1204
|
-
"error.domClone": { argTypes: [null, DYN], result: VOID },
|
|
1205
|
-
"dyn.errInstanceof": { argTypes: [DYN, F64], result: BOOL },
|
|
1206
|
-
"weakMap.is": { argTypes: [DYN], result: BOOL },
|
|
1207
|
-
"weakSet.is": { argTypes: [DYN], result: BOOL },
|
|
1208
|
-
"weakMap.new": { argTypes: [DYN], result: DYN },
|
|
1209
|
-
"weakSet.new": { argTypes: [DYN], result: DYN },
|
|
1210
|
-
"dyn.fromEntries": { argTypes: [DYN], result: DYN },
|
|
1211
|
-
"bytes.constructor": { argTypes: [STRING], result: DYN },
|
|
1212
|
-
"bytes.instanceOf": { argTypes: [DYN, DYN], result: BOOL },
|
|
1213
|
-
"bytes.construct": { argTypes: [DYN, DYN, STRING], result: DYN },
|
|
1214
|
-
"dyn.dataViewIs": { argTypes: [DYN], result: BOOL },
|
|
1215
|
-
"dyn.construct": { argTypes: [DYN, DYN, STRING], result: DYN },
|
|
1216
|
-
"arrayBuffer.constructor": { argTypes: [], result: DYN },
|
|
1217
|
-
"arrayBuffer.new": { argTypes: [DYN], result: DYN },
|
|
1218
|
-
"ffi.argument": { argTypes: [DYN, STRING], result: DYN },
|
|
1219
|
-
"ffi.memoryModule": { argTypes: [DYN], result: DYN },
|
|
1220
|
-
"intl.segmenterNew": { argTypes: [], result: DYN },
|
|
1221
|
-
"arrayBuffer.is": { argTypes: [DYN], result: BOOL },
|
|
1222
|
-
"arrayBuffer.isView": { argTypes: [DYN], result: BOOL },
|
|
1223
|
-
"arrayBuffer.byteLengthGetter": { argTypes: [], result: F64 },
|
|
1224
|
-
"arrayBuffer.byteLengthDescriptor": { argTypes: [DYN], result: DYN },
|
|
1225
|
-
"arrayBuffer.viewU8C": { argTypes: [DYN, DYN, DYN], result: bytesOf("u8c") },
|
|
1226
|
-
"arrayBuffer.viewI8": { argTypes: [DYN, DYN, DYN], result: bytesOf("i8") },
|
|
1227
|
-
"arrayBuffer.viewU16": { argTypes: [DYN, DYN, DYN], result: bytesOf("u16") },
|
|
1228
|
-
"arrayBuffer.viewI16": { argTypes: [DYN, DYN, DYN], result: bytesOf("i16") },
|
|
1229
|
-
"arrayBuffer.viewU8": { argTypes: [DYN, DYN, DYN], result: BYTES_U8 },
|
|
1230
|
-
"arrayBuffer.viewU32": { argTypes: [DYN, DYN, DYN], result: bytesOf("u32") },
|
|
1231
|
-
"arrayBuffer.viewI32": { argTypes: [DYN, DYN, DYN], result: bytesOf("i32") },
|
|
1232
|
-
"arrayBuffer.viewF32": { argTypes: [DYN, DYN, DYN], result: bytesOf("f32") },
|
|
1233
|
-
"arrayBuffer.viewF64": { argTypes: [DYN, DYN, DYN], result: bytesOf("f64") },
|
|
1234
|
-
"arrayBuffer.viewDV": { argTypes: [DYN, DYN, DYN], result: BYTES_U8 },
|
|
1235
|
-
"dyn.objKeys": { argTypes: [DYN], result: DYN },
|
|
1236
|
-
"dyn.forInKeys": { argTypes: [DYN], result: DYN },
|
|
1237
|
-
"dyn.hasOwn": { argTypes: [DYN, STRING], result: BOOL },
|
|
1238
|
-
"dyn.propertyIsEnumerable": { argTypes: [DYN, STRING], result: BOOL },
|
|
1239
|
-
"dyn.assign": { argTypes: [DYN, DYN], result: DYN },
|
|
1240
|
-
"dyn.copyDataProperties": { argTypes: [DYN, DYN], result: DYN },
|
|
1241
|
-
"dyn.objectRest": { argTypes: [DYN, DYN], result: DYN },
|
|
1242
|
-
"dyn.packPush": { argTypes: [DYN, DYN], result: VOID },
|
|
1243
|
-
"dyn.packPushSpread": { argTypes: [DYN, DYN, STRING], result: VOID },
|
|
1244
|
-
"dyn.packPushSpreadIter": { argTypes: [DYN, DYN], result: VOID },
|
|
1245
|
-
"dyn.reflectApply": { argTypes: [DYN, DYN, DYN], result: DYN },
|
|
1246
|
-
"dyn.reflectGet": { argTypes: [DYN, DYN, DYN], result: DYN },
|
|
1247
|
-
"dyn.reflectSet": { argTypes: [DYN, DYN, DYN, DYN], result: BOOL },
|
|
1248
|
-
"dyn.reflectDefine": { argTypes: [DYN, DYN, DYN], result: BOOL },
|
|
1249
|
-
"dyn.abstractEq": { argTypes: [DYN, DYN], result: BOOL },
|
|
1250
|
-
"dyn.assignAll": { argTypes: [DYN, DYN], result: DYN },
|
|
1251
|
-
"dyn.objCreateNullProto": { argTypes: [], result: DYN },
|
|
1252
|
-
"dyn.arrayPrototype": { argTypes: [], result: DYN },
|
|
1253
|
-
"dyn.arrayConstructor": { argTypes: [], result: DYN },
|
|
1254
|
-
"dyn.objectPrototype": { argTypes: [], result: DYN },
|
|
1255
|
-
"dyn.functionApply": { argTypes: [], result: DYN },
|
|
1256
|
-
"dyn.builtinMethod": { argTypes: [STRING, STRING], result: DYN },
|
|
1257
|
-
"dyn.classPrototype": { argTypes: [DYN, DYN], result: DYN },
|
|
1258
|
-
"dyn.classBasePrototype": { argTypes: [DYN], result: DYN },
|
|
1259
|
-
"dyn.classInherit": { argTypes: [DYN, DYN], result: DYN },
|
|
1260
|
-
"dyn.classSuper": { argTypes: [DYN, DYN, DYN], result: VOID },
|
|
1261
|
-
"dyn.assignPrototype": { argTypes: [DYN, DYN, DYN], result: DYN },
|
|
1262
|
-
"dyn.definePrototypeProps": { argTypes: [DYN, DYN, DYN], result: DYN },
|
|
1263
|
-
"dyn.bagGet": { argTypes: [DYN, STRING, DYN], result: DYN },
|
|
1264
|
-
"dyn.bagSet": { argTypes: [DYN, STRING, DYN, DYN], result: VOID },
|
|
1265
|
-
"dyn.objCreate": { argTypes: [DYN], result: DYN },
|
|
1266
|
-
"dyn.objCreateWithProperties": { argTypes: [DYN, DYN], result: DYN },
|
|
1267
|
-
"dyn.getPrototype": { argTypes: [DYN], result: DYN },
|
|
1268
|
-
"dyn.setPrototype": { argTypes: [DYN, DYN], result: DYN },
|
|
1269
|
-
"dyn.getOwnPropertyNames": { argTypes: [DYN], result: DYN },
|
|
1270
|
-
"dyn.ownKeys": { argTypes: [DYN], result: DYN },
|
|
1271
|
-
"dyn.getOwnPropertySymbols": { argTypes: [DYN], result: DYN },
|
|
1272
|
-
"dyn.getOwnPropertyDescriptors": { argTypes: [DYN], result: DYN },
|
|
1273
|
-
"dyn.preventExtensions": { argTypes: [DYN], result: DYN },
|
|
1274
|
-
"dyn.isExtensible": { argTypes: [DYN], result: BOOL },
|
|
1275
|
-
"dyn.seal": { argTypes: [DYN], result: DYN },
|
|
1276
|
-
"dyn.isSealed": { argTypes: [DYN], result: BOOL },
|
|
1277
|
-
"dyn.objValues": { argTypes: [DYN], result: DYN },
|
|
1278
|
-
"dyn.objEntries": { argTypes: [DYN], result: DYN },
|
|
1279
|
-
"dyn.structuredClone": { argTypes: [DYN, DYN], result: DYN },
|
|
1280
|
-
"dyn.cloneMissing": { argTypes: [], result: DYN },
|
|
1281
|
-
"dyn.cloneTransferFail": { argTypes: [], result: DYN },
|
|
1282
|
-
"regex.new": { argTypes: [STRING, STRING], result: REGEX },
|
|
1283
|
-
"regex.resetLastIndex": { argTypes: [REGEX, F64], result: VOID },
|
|
1284
|
-
"regex.newChecked": { argTypes: [DYN, DYN], result: REGEX },
|
|
1285
|
-
// node:events EventEmitter: receivers are emitter-hierarchy objects and
|
|
1286
|
-
// the chaining forms (on/off/removeAll/setMax) return the receiver's
|
|
1287
|
-
// own class — program-dependent object types, checked in the libCall
|
|
1288
|
-
// case. emitter.emit is the one VARIADIC libCall: args beyond
|
|
1289
|
-
// (recv, name) are the event's frontend-unified tuple, any borrowable
|
|
1290
|
-
// kind — the count check admits a longer list for it alone.
|
|
1291
|
-
"emitter.new": { argTypes: [], result: VOID },
|
|
1292
|
-
"emitter.ctor": { argTypes: [null], result: VOID },
|
|
1293
|
-
"emitter.on": { argTypes: [null, STRING, null, BOOL, BOOL], result: VOID },
|
|
1294
|
-
"emitter.off": { argTypes: [null, STRING, null], result: VOID },
|
|
1295
|
-
// The dyn-adapted registration family (JS-lane checked-dynamic
|
|
1296
|
-
// listeners): checkListener has NO receiver (it validates the listener
|
|
1297
|
-
// argument alone); onDyn carries (recv, name, cb dyn, adapter func,
|
|
1298
|
-
// once, prepend), offDyn (recv, name, cb dyn).
|
|
1299
|
-
"emitter.checkListener": { argTypes: [DYN], result: VOID },
|
|
1300
|
-
"emitter.onDyn": { argTypes: [null, STRING, DYN, null, BOOL, BOOL], result: VOID },
|
|
1301
|
-
"emitter.onFlex": { argTypes: [null, STRING, DYN, BOOL, BOOL], result: VOID },
|
|
1302
|
-
"emitter.offDyn": { argTypes: [null, STRING, DYN], result: VOID },
|
|
1303
|
-
"emitter.removeAll": { argTypes: [null, STRING, BOOL], result: VOID },
|
|
1304
|
-
"emitter.emit": { argTypes: [null, STRING], result: BOOL },
|
|
1305
|
-
"emitter.emitFlex": { argTypes: [null, STRING], result: BOOL },
|
|
1306
|
-
"emitter.emitError": { argTypes: [null, STRING, null], result: BOOL },
|
|
1307
|
-
"emitter.count": { argTypes: [null, STRING], result: F64 },
|
|
1308
|
-
"emitter.countFn": { argTypes: [null, STRING, null], result: F64 },
|
|
1309
|
-
"emitter.countDyn": { argTypes: [null, STRING, DYN], result: F64 },
|
|
1310
|
-
"emitter.names": { argTypes: [null], result: VOID },
|
|
1311
|
-
"emitter.listeners": { argTypes: [null, STRING], result: VOID },
|
|
1312
|
-
"emitter.onData": { argTypes: [null, STRING, null, BOOL, BOOL], result: VOID },
|
|
1313
|
-
"emitter.onDataDyn": { argTypes: [null, STRING, DYN, null, BOOL, BOOL], result: VOID },
|
|
1314
|
-
"emitter.emitData": { argTypes: [null, STRING, null], result: BOOL },
|
|
1315
|
-
"emitter.setMax": { argTypes: [null, F64], result: VOID },
|
|
1316
|
-
"emitter.getMax": { argTypes: [null], result: F64 },
|
|
1317
|
-
"emitter.setDefaultMax": { argTypes: [F64], result: VOID },
|
|
1318
|
-
"emitter.getDefaultMax": { argTypes: [], result: F64 },
|
|
1319
|
-
// node:stream: receivers are stream-hierarchy objects and several
|
|
1320
|
-
// results are program-dependent (the receiver's class, unions) — the
|
|
1321
|
-
// libCall case owns those checks. The constructors and a few methods
|
|
1322
|
-
// are VARIADIC (trailing option callbacks / the optional chunk+cb tail):
|
|
1323
|
-
// argTypes here is the fixed prefix, VARIADIC_LIB_FNS admits the rest.
|
|
1324
|
-
"readable.new": { argTypes: [F64, BOOL, BOOL, F64], result: VOID },
|
|
1325
|
-
"writable.new": { argTypes: [F64, BOOL, BOOL, F64], result: VOID },
|
|
1326
|
-
"duplex.new": { argTypes: [F64, F64, BOOL, BOOL, BOOL, BOOL, BOOL, F64], result: VOID },
|
|
1327
|
-
"transform.new": { argTypes: [F64, F64, BOOL, BOOL, BOOL, BOOL, BOOL, F64], result: VOID },
|
|
1328
|
-
"passthrough.new": { argTypes: [F64, F64, BOOL, BOOL, BOOL, BOOL, BOOL, F64], result: VOID },
|
|
1329
|
-
// The subclass-initialization twins: the borrowed receiver leads, then
|
|
1330
|
-
// the .new tail (variadic callbacks likewise).
|
|
1331
|
-
// The dyn-options twins: newDyn takes the record, initDyn the borrowed
|
|
1332
|
-
// receiver + record + fallback flags (trailing wrapper closures ride
|
|
1333
|
-
// the variadic tail like the static forms).
|
|
1334
|
-
"stream.setRead": { argTypes: [null, null], result: VOID },
|
|
1335
|
-
"stream.setWrite": { argTypes: [null, null], result: VOID },
|
|
1336
|
-
"stream.setFinal": { argTypes: [null, null], result: VOID },
|
|
1337
|
-
"stream.setDestroy": { argTypes: [null, null], result: VOID },
|
|
1338
|
-
"stream.setTransform": { argTypes: [null, null], result: VOID },
|
|
1339
|
-
"stream.setFlush": { argTypes: [null, null], result: VOID },
|
|
1340
|
-
"stream.finished": { argTypes: [null, null], result: VOID },
|
|
1341
|
-
"stream.finishedDyn": { argTypes: [null, DYN], result: VOID },
|
|
1342
|
-
"stream.pipeline": { argTypes: [F64], result: VOID },
|
|
1343
|
-
"stream.pipelineDyn": { argTypes: [F64], result: VOID },
|
|
1344
|
-
"sp.finished": { argTypes: [null], result: { kind: "promise", inner: VOID } },
|
|
1345
|
-
"sp.pipeline": { argTypes: [F64], result: { kind: "promise", inner: VOID } },
|
|
1346
|
-
"sc.text": { argTypes: [null], result: { kind: "promise", inner: STRING } },
|
|
1347
|
-
"sc.json": { argTypes: [null], result: { kind: "promise", inner: DYN } },
|
|
1348
|
-
"sc.buffer": { argTypes: [null], result: { kind: "promise", inner: BYTES_U8 } },
|
|
1349
|
-
"readable.newDyn": { argTypes: [DYN], result: VOID },
|
|
1350
|
-
"writable.newDyn": { argTypes: [DYN], result: VOID },
|
|
1351
|
-
"duplex.newDyn": { argTypes: [DYN], result: VOID },
|
|
1352
|
-
"transform.newDyn": { argTypes: [DYN], result: VOID },
|
|
1353
|
-
"passthrough.newDyn": { argTypes: [DYN], result: VOID },
|
|
1354
|
-
"readable.initDyn": { argTypes: [null, DYN, F64], result: VOID },
|
|
1355
|
-
"writable.initDyn": { argTypes: [null, DYN, F64], result: VOID },
|
|
1356
|
-
"duplex.initDyn": { argTypes: [null, DYN, F64], result: VOID },
|
|
1357
|
-
"transform.initDyn": { argTypes: [null, DYN, F64], result: VOID },
|
|
1358
|
-
"passthrough.initDyn": { argTypes: [null, DYN, F64], result: VOID },
|
|
1359
|
-
"readable.init": { argTypes: [null, F64, BOOL, BOOL, F64], result: VOID },
|
|
1360
|
-
"writable.init": { argTypes: [null, F64, BOOL, BOOL, F64], result: VOID },
|
|
1361
|
-
"duplex.init": { argTypes: [null, F64, F64, BOOL, BOOL, BOOL, BOOL, BOOL, F64], result: VOID },
|
|
1362
|
-
"transform.init": { argTypes: [null, F64, F64, BOOL, BOOL, BOOL, BOOL, BOOL, F64], result: VOID },
|
|
1363
|
-
"passthrough.init": { argTypes: [null, F64, F64, BOOL, BOOL, BOOL, BOOL, BOOL, F64], result: VOID },
|
|
1364
|
-
"readable.push": { argTypes: [null, BYTES_U8], result: BOOL },
|
|
1365
|
-
"readable.pushStr": { argTypes: [null, STRING], result: BOOL },
|
|
1366
|
-
"readable.pushNull": { argTypes: [null], result: BOOL },
|
|
1367
|
-
"readable.pushU": { argTypes: [null, null], result: BOOL },
|
|
1368
|
-
"readable.pushDyn": { argTypes: [null, DYN], result: BOOL },
|
|
1369
|
-
"readable.unshift": { argTypes: [null, BYTES_U8], result: VOID },
|
|
1370
|
-
"readable.unshiftStr": { argTypes: [null, STRING], result: VOID },
|
|
1371
|
-
"stream.onDyn": { argTypes: [null, STRING, DYN, BOOL, BOOL], result: VOID },
|
|
1372
|
-
"readable.readDyn": { argTypes: [null, DYN], result: DYN },
|
|
1373
|
-
"readable.read": { argTypes: [null, F64], result: VOID },
|
|
1374
|
-
"readable.pause": { argTypes: [null], result: VOID },
|
|
1375
|
-
"readable.setEncoding": { argTypes: [null, STRING], result: VOID },
|
|
1376
|
-
"readable.pushStrEnc": { argTypes: [null, STRING, STRING], result: BOOL },
|
|
1377
|
-
"readable.pushEncoding": { argTypes: [null, STRING], result: VOID },
|
|
1378
|
-
"readable.nextChunk": { argTypes: [null], result: VOID },
|
|
1379
|
-
"readable.nextChunkDyn": { argTypes: [null], result: VOID },
|
|
1380
|
-
"readable.fromArr": { argTypes: [null, BOOL], result: VOID },
|
|
1381
|
-
"readable.resume": { argTypes: [null], result: VOID },
|
|
1382
|
-
"readable.isPaused": { argTypes: [null], result: BOOL },
|
|
1383
|
-
"readable.pipe": { argTypes: [null, null, BOOL], result: VOID },
|
|
1384
|
-
"readable.unpipe": { argTypes: [null], result: VOID },
|
|
1385
|
-
"readable.flowing": { argTypes: [null], result: VOID },
|
|
1386
|
-
"writable.write": { argTypes: [null, BYTES_U8], result: BOOL },
|
|
1387
|
-
"writable.writeStr": { argTypes: [null, STRING], result: BOOL },
|
|
1388
|
-
"writable.writeU": { argTypes: [null, null], result: BOOL },
|
|
1389
|
-
"writable.writeDyn": { argTypes: [null, DYN], result: BOOL },
|
|
1390
|
-
"writable.end": { argTypes: [null, F64], result: VOID },
|
|
1391
|
-
"writable.cork": { argTypes: [null], result: VOID },
|
|
1392
|
-
"writable.uncork": { argTypes: [null], result: VOID },
|
|
1393
|
-
"stream.destroy": { argTypes: [null], result: VOID },
|
|
1394
|
-
"stream.destroyErr": { argTypes: [null, null], result: VOID },
|
|
1395
|
-
"stream.iteratorClose": { argTypes: [null], result: VOID },
|
|
1396
|
-
"stream.prop": { argTypes: [null, STRING], result: VOID },
|
|
1397
|
-
"stream.errored": { argTypes: [null], result: VOID },
|
|
1398
|
-
// node:assert: pass/negated/deep/hasMsg are frontend-computed bools; the
|
|
1399
|
-
// message slot always carries a string ("" when hasMsg is false).
|
|
1400
|
-
"assert.ok": { argTypes: [BOOL, STRING], result: VOID },
|
|
1401
|
-
"assert.eqF64": { argTypes: [F64, F64, BOOL, BOOL, STRING, BOOL], result: VOID },
|
|
1402
|
-
"assert.eqBigInt": { argTypes: [BIGINT_T, BIGINT_T, BOOL, BOOL, STRING, BOOL], result: VOID },
|
|
1403
|
-
"assert.eqStr": { argTypes: [STRING, STRING, BOOL, BOOL, STRING, BOOL], result: VOID },
|
|
1404
|
-
"assert.eqBool": { argTypes: [BOOL, BOOL, BOOL, BOOL, STRING, BOOL], result: VOID },
|
|
1405
|
-
"assert.deepResult": { argTypes: [BOOL, BOOL, STRING, BOOL], result: VOID },
|
|
1406
|
-
"assert.sameValue": { argTypes: [F64, F64], result: BOOL },
|
|
1407
|
-
// The deep-equality pair memo: both slots are program-dependent
|
|
1408
|
-
// (any cycle-capable record/array/map type).
|
|
1409
|
-
"assert.deqEnter": { argTypes: [null, null], result: BOOL },
|
|
1410
|
-
"assert.deqLeave": { argTypes: [], result: VOID },
|
|
1411
|
-
"assert.match": { argTypes: [STRING, REGEX, BOOL, STRING, BOOL], result: VOID },
|
|
1412
|
-
"assert.throwsNone": { argTypes: [BOOL, STRING, BOOL, STRING, BOOL], result: VOID },
|
|
1413
|
-
"assert.throwsMismatch": { argTypes: [STRING, { kind: "object", className: "%Error" }, STRING, BOOL], result: VOID },
|
|
1414
|
-
"assert.throwsRegex": { argTypes: [REGEX, { kind: "object", className: "%Error" }, STRING, BOOL], result: VOID },
|
|
1415
|
-
// Symbol strict equality (pointer identity; scr_symbol.c).
|
|
1416
|
-
"assert.eqSym": { argTypes: [{ kind: "symbol" }, { kind: "symbol" }, BOOL, BOOL, STRING, BOOL], result: VOID },
|
|
1417
|
-
// The equality quartet over checked-dynamic operands (the frontend
|
|
1418
|
-
// boxes a static side into the checked-dynamic tree first).
|
|
1419
|
-
"assert.eqDyn": { argTypes: [DYN, DYN, BOOL, BOOL, STRING, BOOL], result: VOID },
|
|
1420
|
-
"assert.looseResult": { argTypes: [BOOL, BOOL, STRING, STRING, STRING, BOOL], result: VOID },
|
|
1421
|
-
// The throws(fn, {shape}) accumulator: begin/slot calls never throw;
|
|
1422
|
-
// shapeEnd throws the Comparison diff. The error slot is the
|
|
1423
|
-
// %Error-narrowed caught value.
|
|
1424
|
-
"assert.shapeBegin": { argTypes: [{ kind: "object", className: "%Error" }], result: VOID },
|
|
1425
|
-
"assert.shapeStr": { argTypes: [F64, STRING], result: VOID },
|
|
1426
|
-
"assert.shapeRe": { argTypes: [F64, REGEX], result: VOID },
|
|
1427
|
-
"assert.shapeEnd": { argTypes: [STRING, BOOL], result: VOID },
|
|
1428
|
-
"assert.regexErrTest": { argTypes: [REGEX, { kind: "object", className: "%Error" }], result: BOOL },
|
|
1429
|
-
"assert.unwantedRejection": { argTypes: [{ kind: "object", className: "%Error" }, STRING, BOOL], result: VOID },
|
|
1430
|
-
"assert.unwantedError": { argTypes: [STRING, BOOL, STRING, BOOL], result: VOID },
|
|
1431
|
-
"assert.noErrorPredicate": { argTypes: [DYN, DYN], result: BOOL },
|
|
1432
|
-
"assert.regexDynTest": { argTypes: [REGEX, DYN], result: BOOL },
|
|
1433
|
-
"assert.expectsErrDyn": { argTypes: [DYN, DYN, STRING, BOOL], result: VOID },
|
|
1434
|
-
// assert.ifError's typed entries (always throw; unit args never
|
|
1435
|
-
// lower). The error slot is program-dependent — any %Error-hierarchy
|
|
1436
|
-
// class, root or subclass (the insp.error precedent, null slot).
|
|
1437
|
-
"assert.ifErrorErr": { argTypes: [null], result: VOID },
|
|
1438
|
-
"assert.ifErrorF64": { argTypes: [F64], result: VOID },
|
|
1439
|
-
"assert.ifErrorStr": { argTypes: [STRING], result: VOID },
|
|
1440
|
-
"assert.ifErrorBool": { argTypes: [BOOL], result: VOID },
|
|
1441
|
-
"assert.ifErrorDyn": { argTypes: [DYN], result: VOID },
|
|
1442
|
-
// Bytes equality: the two value slots are any bytes kind (the frontend
|
|
1443
|
-
// gates both sides to ONE static bytes type; the libCall case checks
|
|
1444
|
-
// the kind and the pair below).
|
|
1445
|
-
"assert.refEqBytes": { argTypes: [null, null, BOOL, BOOL, STRING, BOOL], result: VOID },
|
|
1446
|
-
"assert.refEqFn": { argTypes: [null, null, BOOL, STRING, BOOL], result: VOID },
|
|
1447
|
-
"assert.bytesDeepEq": { argTypes: [null, null, BOOL], result: BOOL },
|
|
1448
|
-
// util.inspect: the error receiver is program-dependent (a builtin or
|
|
1449
|
-
// user error class — the error.toString precedent, null slot).
|
|
1450
|
-
"insp.f64": { argTypes: [F64], result: STRING },
|
|
1451
|
-
"insp.jsonDyn": { argTypes: [DYN], result: STRING },
|
|
1452
|
-
"insp.str": { argTypes: [STRING], result: STRING },
|
|
1453
|
-
"insp.regex": { argTypes: [REGEX], result: STRING },
|
|
1454
|
-
"insp.buffer": { argTypes: [BYTES_U8], result: STRING },
|
|
1455
|
-
"insp.error": { argTypes: [null, F64, F64], result: STRING },
|
|
1456
|
-
"insp.dyn": { argTypes: [DYN, F64, F64], result: STRING },
|
|
1457
|
-
"insp.dynS": { argTypes: [DYN, F64], result: STRING },
|
|
1458
|
-
"insp.jsval": { argTypes: [JSVAL, F64, F64], result: STRING },
|
|
1459
|
-
"insp.begin": { argTypes: [F64], result: VOID },
|
|
1460
|
-
"insp.entry": { argTypes: [STRING, BOOL], result: VOID },
|
|
1461
|
-
// Circular references: the receiver slot is program-dependent (any
|
|
1462
|
-
// cycle-capable record/array/map/class type — the insp.error precedent).
|
|
1463
|
-
"insp.circCheck": { argTypes: [null], result: F64 },
|
|
1464
|
-
"insp.seenPush": { argTypes: [null], result: VOID },
|
|
1465
|
-
"insp.refWrap": { argTypes: [null, STRING], result: STRING },
|
|
1466
|
-
"insp.circular": { argTypes: [F64], result: STRING },
|
|
1467
|
-
"insp.key": { argTypes: [STRING], result: STRING },
|
|
1468
|
-
"insp.moreItems": { argTypes: [F64], result: STRING },
|
|
1469
|
-
"insp.end": { argTypes: [STRING, STRING, STRING, F64, BOOL, BOOL], result: STRING },
|
|
1470
|
-
"strdec.write": { argTypes: [STRING, F64, BYTES_U8], result: STRING },
|
|
1471
|
-
"strdec.next": { argTypes: [STRING, F64, BYTES_U8], result: F64 },
|
|
1472
|
-
"strdec.end": { argTypes: [STRING, F64], result: STRING },
|
|
1473
|
-
// node:readline: the interface handle is f64; the callbacks' func types
|
|
1474
|
-
// are program-dependent (zero-param or (answer: string) — the emitter
|
|
1475
|
-
// picks the adapter), so those slots are null like child.onExit's.
|
|
1476
|
-
"rl.create": { argTypes: [], result: F64 },
|
|
1477
|
-
"rl.question": { argTypes: [F64, STRING, null], result: VOID },
|
|
1478
|
-
"rl.close": { argTypes: [F64], result: VOID },
|
|
1479
|
-
"rl.onClose": { argTypes: [F64, null], result: VOID },
|
|
1480
|
-
"tp.setTimeout": { argTypes: [F64], result: { kind: "promise", inner: VOID } },
|
|
1481
|
-
"tp.setImmediate": { argTypes: [], result: { kind: "promise", inner: VOID } },
|
|
1482
|
-
"dc.channel": { argTypes: [STRING], result: F64 },
|
|
1483
|
-
"dc.subscribe": { argTypes: [STRING, DYN], result: VOID },
|
|
1484
|
-
"dc.unsubscribe": { argTypes: [STRING, DYN], result: BOOL },
|
|
1485
|
-
"dc.hasSubscribers": { argTypes: [STRING], result: BOOL },
|
|
1486
|
-
"dc.publish": { argTypes: [F64, DYN], result: VOID },
|
|
1487
|
-
"dc.chanSubscribe": { argTypes: [F64, DYN], result: VOID },
|
|
1488
|
-
"dc.chanUnsubscribe": { argTypes: [F64, DYN], result: BOOL },
|
|
1489
|
-
"dc.chanHasSubscribers": { argTypes: [F64], result: BOOL },
|
|
1490
|
-
"dc.chanName": { argTypes: [F64], result: STRING },
|
|
1491
|
-
"timers.setImmediateFnValue": { argTypes: [], result: DYN },
|
|
1492
|
-
"timers.immediatePromise": { argTypes: [], result: { kind: "promise", inner: DYN } },
|
|
1493
|
-
"dc.tracingChannel": { argTypes: [STRING], result: F64 },
|
|
1494
|
-
"dc.tracingChannelOf": { argTypes: [F64, F64, F64, F64, F64], result: F64 },
|
|
1495
|
-
"dc.tcChannel": { argTypes: [F64, F64], result: F64 },
|
|
1496
|
-
"dc.tcHasSubscribers": { argTypes: [F64], result: BOOL },
|
|
1497
|
-
"dc.tcSubscribe": { argTypes: [F64, DYN], result: VOID },
|
|
1498
|
-
"dc.tcUnsubscribe": { argTypes: [F64, DYN], result: BOOL },
|
|
1499
|
-
"dc.tcTraceSync": { argTypes: [F64, DYN, DYN, DYN, DYN], result: DYN },
|
|
1500
|
-
"dc.tcTraceCallback": { argTypes: [F64, DYN, F64, DYN, DYN, DYN], result: DYN },
|
|
1501
|
-
"dc.tcTracePromise": { argTypes: [F64, DYN, DYN, DYN, DYN], result: { kind: "promise", inner: DYN } },
|
|
1502
|
-
"process.onUncaughtException": { argTypes: [DYN, BOOL, BOOL], result: VOID },
|
|
1503
|
-
"process.offUncaughtException": { argTypes: [DYN, BOOL], result: VOID },
|
|
1504
|
-
"process.onUnhandledRejection": { argTypes: [DYN, BOOL], result: VOID },
|
|
1505
|
-
"process.offUnhandledRejection": { argTypes: [DYN], result: VOID },
|
|
1506
|
-
"process.onRejectionHandled": { argTypes: [DYN, BOOL], result: VOID },
|
|
1507
|
-
"process.offRejectionHandled": { argTypes: [DYN], result: VOID },
|
|
1508
|
-
"process.onWarning": { argTypes: [DYN], result: VOID },
|
|
1509
|
-
"process.offWarning": { argTypes: [DYN], result: VOID },
|
|
1510
|
-
"process.emitWarning": { argTypes: [DYN], result: VOID },
|
|
1511
|
-
"async.awaitDyn": { argTypes: [DYN], result: DYN },
|
|
1512
|
-
"async.hop": { argTypes: [], result: VOID },
|
|
1513
|
-
"als.new": { argTypes: [], result: F64 },
|
|
1514
|
-
"als.get": { argTypes: [F64], result: DYN },
|
|
1515
|
-
"als.run": { argTypes: [F64, DYN, DYN, DYN], result: DYN },
|
|
1516
|
-
"als.exitRun": { argTypes: [F64, DYN, DYN], result: DYN },
|
|
1517
|
-
"als.enterWith": { argTypes: [F64, DYN], result: VOID },
|
|
1518
|
-
"als.disable": { argTypes: [F64], result: VOID },
|
|
1519
|
-
"dc.chanBindStore": { argTypes: [F64, F64, DYN], result: VOID },
|
|
1520
|
-
"dc.chanUnbindStore": { argTypes: [F64, F64], result: BOOL },
|
|
1521
|
-
"dc.chanRunStores": { argTypes: [F64, DYN, DYN, DYN, DYN], result: DYN },
|
|
1522
|
-
"number.isFinite": { argTypes: [F64], result: BOOL },
|
|
1523
|
-
"number.isNaN": { argTypes: [F64], result: BOOL },
|
|
1524
|
-
"number.isInteger": { argTypes: [F64], result: BOOL },
|
|
1525
|
-
"number.isSafeInteger": { argTypes: [F64], result: BOOL },
|
|
1526
|
-
"date.now": { argTypes: [], result: F64 },
|
|
1527
|
-
"date.newNow": { argTypes: [], result: DATE_T },
|
|
1528
|
-
"date.newMs": { argTypes: [F64], result: DATE_T },
|
|
1529
|
-
"date.newString": { argTypes: [STRING], result: DATE_T },
|
|
1530
|
-
"date.parse": { argTypes: [STRING], result: F64 },
|
|
1531
|
-
"date.getTime": { argTypes: [DATE_T], result: F64 },
|
|
1532
|
-
"date.valueOf": { argTypes: [DATE_T], result: F64 },
|
|
1533
|
-
"date.toISOString": { argTypes: [F64], result: STRING },
|
|
1534
|
-
"date.toISOStringValue": { argTypes: [DATE_T], result: STRING },
|
|
1535
|
-
"date.getFullYear": { argTypes: [DATE_T], result: F64 },
|
|
1536
|
-
"date.getUTCFullYear": { argTypes: [DATE_T], result: F64 },
|
|
1537
|
-
"date.getMonth": { argTypes: [DATE_T], result: F64 },
|
|
1538
|
-
"date.getUTCMonth": { argTypes: [DATE_T], result: F64 },
|
|
1539
|
-
"date.getDate": { argTypes: [DATE_T], result: F64 },
|
|
1540
|
-
"date.getUTCDate": { argTypes: [DATE_T], result: F64 },
|
|
1541
|
-
"date.getDay": { argTypes: [DATE_T], result: F64 },
|
|
1542
|
-
"date.getUTCDay": { argTypes: [DATE_T], result: F64 },
|
|
1543
|
-
"date.getHours": { argTypes: [DATE_T], result: F64 },
|
|
1544
|
-
"date.getUTCHours": { argTypes: [DATE_T], result: F64 },
|
|
1545
|
-
"date.getMinutes": { argTypes: [DATE_T], result: F64 },
|
|
1546
|
-
"date.getUTCMinutes": { argTypes: [DATE_T], result: F64 },
|
|
1547
|
-
"date.getSeconds": { argTypes: [DATE_T], result: F64 },
|
|
1548
|
-
"date.getUTCSeconds": { argTypes: [DATE_T], result: F64 },
|
|
1549
|
-
"date.getMilliseconds": { argTypes: [DATE_T], result: F64 },
|
|
1550
|
-
"date.getUTCMilliseconds": { argTypes: [DATE_T], result: F64 },
|
|
1551
|
-
"date.getTimezoneOffset": { argTypes: [DATE_T], result: F64 },
|
|
1552
|
-
"date.parseGetTime": { argTypes: [STRING], result: F64 },
|
|
1553
|
-
"date.utc": { argTypes: [F64, F64, F64, F64, F64, F64, F64], result: F64 },
|
|
1554
|
-
"text.decode": { argTypes: [BYTES_U8], result: STRING },
|
|
1555
|
-
"bytes.bufferSource": { argTypes: [DYN], result: BYTES_U8 },
|
|
1556
|
-
"text.decodeBufferSource": { argTypes: [DYN], result: STRING },
|
|
1557
|
-
"text.decodeOptions": { argTypes: [BYTES_U8, BOOL, BOOL], result: STRING },
|
|
1558
|
-
"text.decodeStream": { argTypes: [DYN, BYTES_U8, F64, BOOL, BOOL, BOOL], result: STRING },
|
|
1559
|
-
"text.decodeLegacyOptions": { argTypes: [BYTES_U8, F64, BOOL, BOOL], result: STRING },
|
|
1560
|
-
"text.decodeLegacy": { argTypes: [BYTES_U8, F64], result: STRING },
|
|
1561
|
-
"text.decoderEncoding": { argTypes: [DYN], result: F64 },
|
|
1562
|
-
"text.decoderName": { argTypes: [F64], result: STRING },
|
|
1563
|
-
"text.encodeInto": { argTypes: [DYN, DYN], result: DYN },
|
|
1564
|
-
"buffer.isAscii": { argTypes: [DYN], result: BOOL },
|
|
1565
|
-
"buffer.isUtf8": { argTypes: [DYN], result: BOOL },
|
|
1566
|
-
"buffer.transcode": { argTypes: [DYN, DYN, DYN], result: BYTES_U8 },
|
|
1567
|
-
"fs.mkdirRecursiveSync": { argTypes: [STRING], result: VOID },
|
|
1568
|
-
"fs.rmOptsSync": { argTypes: [STRING, BOOL, BOOL], result: VOID },
|
|
1569
|
-
"fs.rmRetrySync": { argTypes: [STRING, BOOL, BOOL, F64, F64], result: VOID },
|
|
1570
|
-
"fs.mkdtempSync": { argTypes: [STRING], result: STRING },
|
|
1571
|
-
"fs.accessSync": { argTypes: [STRING, F64], result: VOID },
|
|
1572
|
-
"fs.readFdSync": { argTypes: [F64, STRING], result: STRING },
|
|
1573
|
-
"fs.readFdSyncBytes": { argTypes: [F64], result: BYTES_U8 },
|
|
1574
|
-
"process.isTTY": { argTypes: [F64], result: BOOL },
|
|
1575
|
-
// Like process.envGet: the result is the module's interned
|
|
1576
|
-
// `number | undefined` union — checked by arms in the libCall case.
|
|
1577
|
-
"process.columns": { argTypes: [F64], result: VOID },
|
|
1578
|
-
"process.rows": { argTypes: [F64], result: VOID },
|
|
1579
|
-
"process.stdinDestroy": { argTypes: [], result: VOID },
|
|
1580
|
-
"process.stdinSetRawMode": { argTypes: [BOOL], result: VOID },
|
|
1581
|
-
// Arg 0 is a packed f64[] OR a bytes value (the spread-typed-array
|
|
1582
|
-
// form) — checked in the libCall case.
|
|
1583
|
-
"string.fromCharCode": { argTypes: [null], result: STRING },
|
|
1584
|
-
"string.fromCodePoint": { argTypes: [null], result: STRING },
|
|
1585
|
-
"string.lastIndexOf": { argTypes: [STRING, STRING], result: F64 },
|
|
1586
|
-
"string.lastIndexOfFrom": { argTypes: [STRING, STRING, F64], result: F64 },
|
|
1587
|
-
"string.raw": { argTypes: [arrayOf(STRING), arrayOf(STRING)], result: STRING },
|
|
1588
|
-
};
|
|
11
|
+
import { LIB_FN_SIGS } from "./builtin-signatures.js";
|
|
12
|
+
import { REGEX_INTRINSIC_SIGS, STR_INTRINSIC_SIGS } from "./intrinsic-signatures.js";
|
|
1589
13
|
/** True for an object type naming a runtime-provided error class. */
|
|
1590
14
|
function isBuiltinErrorObject(t) {
|
|
1591
15
|
return t.kind === "object" && RUNTIME_ERROR_CLASSES.has(t.className);
|
|
@@ -1597,12 +21,23 @@ function isBuiltinErrorObject(t) {
|
|
|
1597
21
|
* the body/call-site split is spelled out in the validator. */
|
|
1598
22
|
function callSiteReturnType(fn) {
|
|
1599
23
|
if (fn.async && fn.generator !== undefined) {
|
|
1600
|
-
return {
|
|
24
|
+
return {
|
|
25
|
+
kind: "generator",
|
|
26
|
+
async: true,
|
|
27
|
+
yieldT: fn.generator.yieldT,
|
|
28
|
+
retT: fn.returnType,
|
|
29
|
+
nextT: fn.generator.nextT,
|
|
30
|
+
};
|
|
1601
31
|
}
|
|
1602
32
|
if (fn.async)
|
|
1603
33
|
return { kind: "promise", inner: fn.returnType };
|
|
1604
34
|
if (fn.generator !== undefined) {
|
|
1605
|
-
return {
|
|
35
|
+
return {
|
|
36
|
+
kind: "generator",
|
|
37
|
+
yieldT: fn.generator.yieldT,
|
|
38
|
+
retT: fn.returnType,
|
|
39
|
+
nextT: fn.generator.nextT,
|
|
40
|
+
};
|
|
1606
41
|
}
|
|
1607
42
|
return fn.returnType;
|
|
1608
43
|
}
|
|
@@ -1618,7 +53,20 @@ export function validateModule(mod) {
|
|
|
1618
53
|
const ffiByName = new Map();
|
|
1619
54
|
const ffiSymbols = new Set();
|
|
1620
55
|
const moduleLoc = { file: mod.sourceFile, start: 0, end: 0 };
|
|
56
|
+
if (mod.workers !== undefined && typeof mod.workers !== "boolean")
|
|
57
|
+
errors.push({ message: "worker execution mode must be a boolean", loc: moduleLoc });
|
|
58
|
+
if (mod.workers && (mod.lib !== undefined || mod.embedded !== undefined))
|
|
59
|
+
errors.push({
|
|
60
|
+
message: "worker execution requires a native static executable",
|
|
61
|
+
loc: moduleLoc,
|
|
62
|
+
});
|
|
1621
63
|
for (const entry of mod.ffiImports ?? []) {
|
|
64
|
+
if (mod.workers &&
|
|
65
|
+
entry.params.some((parameter) => isFfiCallbackParam(parameter) && parameter.callback.invoke === "foreign"))
|
|
66
|
+
errors.push({
|
|
67
|
+
message: "worker execution cannot install foreign-thread callbacks",
|
|
68
|
+
loc: moduleLoc,
|
|
69
|
+
});
|
|
1622
70
|
if (ffiByName.has(entry.name)) {
|
|
1623
71
|
errors.push({ message: `duplicate FFI binding "${entry.name}"`, loc: moduleLoc });
|
|
1624
72
|
}
|
|
@@ -1631,20 +79,32 @@ export function validateModule(mod) {
|
|
|
1631
79
|
const retainedFfiCallbacks = new Map();
|
|
1632
80
|
for (const entry of mod.ffiImports ?? []) {
|
|
1633
81
|
if (entry.callbackOperation !== undefined) {
|
|
1634
|
-
const fail = (detail) => {
|
|
82
|
+
const fail = (detail) => {
|
|
83
|
+
errors.push({
|
|
84
|
+
message: `FFI callback operation "${entry.name}" ${detail}`,
|
|
85
|
+
loc: moduleLoc,
|
|
86
|
+
});
|
|
87
|
+
};
|
|
1635
88
|
if (!entry.library || entry.library.includes("\0"))
|
|
1636
89
|
fail("requires a library name");
|
|
1637
90
|
if (entry.callbackOperation === "register") {
|
|
1638
91
|
const param = entry.params[0];
|
|
1639
|
-
if (entry.params.length !== 1 ||
|
|
1640
|
-
param
|
|
1641
|
-
param
|
|
1642
|
-
|
|
92
|
+
if (entry.params.length !== 1 ||
|
|
93
|
+
!param ||
|
|
94
|
+
!isFfiCallbackParam(param) ||
|
|
95
|
+
param.callback.id !== "callback" ||
|
|
96
|
+
param.callback.lifetime !== "retained" ||
|
|
97
|
+
param.callback.invoke !== "script-thread" ||
|
|
98
|
+
param.callback.params.some((p) => typeof p !== "string" || ["cstring", "string", "bytes"].includes(p)) ||
|
|
99
|
+
entry.returns !== "pointer" ||
|
|
100
|
+
entry.callbackTarget !== undefined)
|
|
1643
101
|
fail("has an invalid registration ABI");
|
|
1644
102
|
}
|
|
1645
103
|
else if (entry.callbackOperation === "release") {
|
|
1646
104
|
const target = entry.callbackTarget ? ffiByName.get(entry.callbackTarget) : undefined;
|
|
1647
|
-
if (entry.params.length !== 0 ||
|
|
105
|
+
if (entry.params.length !== 0 ||
|
|
106
|
+
entry.returns !== "void" ||
|
|
107
|
+
target?.callbackOperation !== "register" ||
|
|
1648
108
|
target.library !== entry.library)
|
|
1649
109
|
fail("has an invalid release target or ABI");
|
|
1650
110
|
}
|
|
@@ -1652,31 +112,52 @@ export function validateModule(mod) {
|
|
|
1652
112
|
fail("has an invalid operation");
|
|
1653
113
|
}
|
|
1654
114
|
else if (entry.callbackTarget !== undefined) {
|
|
1655
|
-
errors.push({
|
|
115
|
+
errors.push({
|
|
116
|
+
message: `FFI binding "${entry.name}" has a callback target without a release operation`,
|
|
117
|
+
loc: moduleLoc,
|
|
118
|
+
});
|
|
1656
119
|
}
|
|
1657
120
|
const ids = new Set();
|
|
1658
121
|
for (const param of entry.params) {
|
|
1659
122
|
if (!isFfiCallbackParam(param))
|
|
1660
123
|
continue;
|
|
1661
124
|
if (ids.has(param.callback.id)) {
|
|
1662
|
-
errors.push({
|
|
125
|
+
errors.push({
|
|
126
|
+
message: `FFI binding "${entry.name}" has duplicate callback id "${param.callback.id}"`,
|
|
127
|
+
loc: moduleLoc,
|
|
128
|
+
});
|
|
1663
129
|
}
|
|
1664
130
|
ids.add(param.callback.id);
|
|
1665
131
|
if (param.callback.invoke !== "script-thread" && param.callback.invoke !== "foreign") {
|
|
1666
|
-
errors.push({
|
|
132
|
+
errors.push({
|
|
133
|
+
message: `FFI callback "${entry.name}:${param.callback.id}" has invalid invoke mode`,
|
|
134
|
+
loc: moduleLoc,
|
|
135
|
+
});
|
|
1667
136
|
}
|
|
1668
137
|
if (param.callback.invoke === "foreign") {
|
|
1669
138
|
if (param.callback.params.some((p) => p === "i64" || p === "u64" || p === "pointer")) {
|
|
1670
|
-
errors.push({
|
|
139
|
+
errors.push({
|
|
140
|
+
message: `FFI foreign callback "${entry.name}:${param.callback.id}" has unsupported 64-bit or pointer arguments`,
|
|
141
|
+
loc: moduleLoc,
|
|
142
|
+
});
|
|
1671
143
|
}
|
|
1672
144
|
if (param.callback.lifetime !== "retained") {
|
|
1673
|
-
errors.push({
|
|
145
|
+
errors.push({
|
|
146
|
+
message: `FFI foreign callback "${entry.name}:${param.callback.id}" is not retained`,
|
|
147
|
+
loc: moduleLoc,
|
|
148
|
+
});
|
|
1674
149
|
}
|
|
1675
150
|
if (param.callback.returns !== "void") {
|
|
1676
|
-
errors.push({
|
|
151
|
+
errors.push({
|
|
152
|
+
message: `FFI foreign callback "${entry.name}:${param.callback.id}" does not return void`,
|
|
153
|
+
loc: moduleLoc,
|
|
154
|
+
});
|
|
1677
155
|
}
|
|
1678
156
|
if (!param.callback.params.some(isFfiContextParam)) {
|
|
1679
|
-
errors.push({
|
|
157
|
+
errors.push({
|
|
158
|
+
message: `FFI foreign callback "${entry.name}:${param.callback.id}" has no context`,
|
|
159
|
+
loc: moduleLoc,
|
|
160
|
+
});
|
|
1680
161
|
}
|
|
1681
162
|
}
|
|
1682
163
|
if (param.callback.lifetime === "retained") {
|
|
@@ -1685,7 +166,10 @@ export function validateModule(mod) {
|
|
|
1685
166
|
const hasInnerContext = param.callback.params.some(isFfiContextParam);
|
|
1686
167
|
const outerContexts = entry.params.filter((candidate) => isFfiContextParam(candidate) && candidate.context === param.callback.id).length;
|
|
1687
168
|
if (hasInnerContext !== (outerContexts === 1)) {
|
|
1688
|
-
errors.push({
|
|
169
|
+
errors.push({
|
|
170
|
+
message: `FFI callback "${entry.name}:${param.callback.id}" has inconsistent context slots`,
|
|
171
|
+
loc: moduleLoc,
|
|
172
|
+
});
|
|
1689
173
|
}
|
|
1690
174
|
}
|
|
1691
175
|
}
|
|
@@ -1695,7 +179,10 @@ export function validateModule(mod) {
|
|
|
1695
179
|
continue;
|
|
1696
180
|
const target = retainedFfiCallbacks.get(param.callback.release);
|
|
1697
181
|
if (target === undefined) {
|
|
1698
|
-
errors.push({
|
|
182
|
+
errors.push({
|
|
183
|
+
message: `FFI release "${entry.name}:${param.callback.release}" has no retained target`,
|
|
184
|
+
loc: moduleLoc,
|
|
185
|
+
});
|
|
1699
186
|
continue;
|
|
1700
187
|
}
|
|
1701
188
|
// A call registering its own release target defeats the emitted
|
|
@@ -1704,7 +191,10 @@ export function validateModule(mod) {
|
|
|
1704
191
|
const registeredBySameCall = entry.params.some((candidate) => isFfiCallbackParam(candidate) &&
|
|
1705
192
|
`${entry.name}:${candidate.callback.id}` === param.callback.release);
|
|
1706
193
|
if (registeredBySameCall) {
|
|
1707
|
-
errors.push({
|
|
194
|
+
errors.push({
|
|
195
|
+
message: `FFI release "${entry.name}:${param.callback.release}" targets a retained callback registered by the same call`,
|
|
196
|
+
loc: moduleLoc,
|
|
197
|
+
});
|
|
1708
198
|
}
|
|
1709
199
|
// Structural ABI comparison: a params entry is a value-class string
|
|
1710
200
|
// or a {context} object. Key order and incidental object shape must
|
|
@@ -1719,12 +209,18 @@ export function validateModule(mod) {
|
|
|
1719
209
|
}) &&
|
|
1720
210
|
param.callback.returns === target.returns;
|
|
1721
211
|
if (!inherited) {
|
|
1722
|
-
errors.push({
|
|
212
|
+
errors.push({
|
|
213
|
+
message: `FFI release "${entry.name}:${param.callback.release}" does not inherit its target ABI`,
|
|
214
|
+
loc: moduleLoc,
|
|
215
|
+
});
|
|
1723
216
|
}
|
|
1724
217
|
const hasInnerContext = target.params.some(isFfiContextParam);
|
|
1725
218
|
const outerContexts = entry.params.filter((candidate) => isFfiContextParam(candidate) && candidate.context === param.callback.release).length;
|
|
1726
219
|
if (hasInnerContext !== (outerContexts === 1)) {
|
|
1727
|
-
errors.push({
|
|
220
|
+
errors.push({
|
|
221
|
+
message: `FFI release "${entry.name}:${param.callback.release}" has inconsistent context slots`,
|
|
222
|
+
loc: moduleLoc,
|
|
223
|
+
});
|
|
1728
224
|
}
|
|
1729
225
|
}
|
|
1730
226
|
}
|
|
@@ -1737,14 +233,23 @@ export function validateModule(mod) {
|
|
|
1737
233
|
for (const e of mod.lib.exports) {
|
|
1738
234
|
const fn = functionsByName.get(e.fnName);
|
|
1739
235
|
if (!fn) {
|
|
1740
|
-
errors.push({
|
|
236
|
+
errors.push({
|
|
237
|
+
message: `library export "${e.symbol}": missing function "${e.fnName}"`,
|
|
238
|
+
loc: entryLoc,
|
|
239
|
+
});
|
|
1741
240
|
continue;
|
|
1742
241
|
}
|
|
1743
242
|
if (fn.async === true || fn.generator !== undefined) {
|
|
1744
|
-
errors.push({
|
|
243
|
+
errors.push({
|
|
244
|
+
message: `library export "${e.symbol}": "${e.fnName}" is async/generator`,
|
|
245
|
+
loc: fn.loc,
|
|
246
|
+
});
|
|
1745
247
|
}
|
|
1746
248
|
if (fn.captures !== undefined) {
|
|
1747
|
-
errors.push({
|
|
249
|
+
errors.push({
|
|
250
|
+
message: `library export "${e.symbol}": "${e.fnName}" captures an environment`,
|
|
251
|
+
loc: fn.loc,
|
|
252
|
+
});
|
|
1748
253
|
}
|
|
1749
254
|
if (fn.params.length !== e.params.length) {
|
|
1750
255
|
errors.push({
|
|
@@ -1776,27 +281,39 @@ export function validateModule(mod) {
|
|
|
1776
281
|
}
|
|
1777
282
|
}
|
|
1778
283
|
if (!functionsByName.has(mod.entry)) {
|
|
1779
|
-
errors.push({
|
|
284
|
+
errors.push({
|
|
285
|
+
message: `library module missing its entry function "${mod.entry}"`,
|
|
286
|
+
loc: entryLoc,
|
|
287
|
+
});
|
|
1780
288
|
}
|
|
1781
289
|
// Host-callback channels: the register symbol and the channel list are
|
|
1782
290
|
// paired (the profile loader refuses otherwise, so a miss here is a
|
|
1783
291
|
// compiler bug), slots are the declaration order, and every channel
|
|
1784
292
|
// has its matching ffiImport (the lowering recognizes calls by it).
|
|
1785
293
|
const cbs = mod.lib.callbacks ?? [];
|
|
1786
|
-
if (
|
|
1787
|
-
errors.push({
|
|
294
|
+
if (cbs.length > 0 !== (mod.lib.callbackRegisterSymbol !== undefined)) {
|
|
295
|
+
errors.push({
|
|
296
|
+
message: "library callbacks and callbackRegisterSymbol must be present together",
|
|
297
|
+
loc: entryLoc,
|
|
298
|
+
});
|
|
1788
299
|
}
|
|
1789
300
|
const cbNames = new Set();
|
|
1790
301
|
cbs.forEach((cb, i) => {
|
|
1791
302
|
if (cb.slot !== i) {
|
|
1792
|
-
errors.push({
|
|
303
|
+
errors.push({
|
|
304
|
+
message: `library callback "${cb.name}": slot ${cb.slot} out of declaration order (expected ${i})`,
|
|
305
|
+
loc: entryLoc,
|
|
306
|
+
});
|
|
1793
307
|
}
|
|
1794
308
|
if (cbNames.has(cb.name)) {
|
|
1795
309
|
errors.push({ message: `duplicate library callback channel "${cb.name}"`, loc: entryLoc });
|
|
1796
310
|
}
|
|
1797
311
|
cbNames.add(cb.name);
|
|
1798
312
|
if (!(mod.ffiImports ?? []).some((f) => f.name === cb.name)) {
|
|
1799
|
-
errors.push({
|
|
313
|
+
errors.push({
|
|
314
|
+
message: `library callback "${cb.name}" has no matching ffiImport`,
|
|
315
|
+
loc: entryLoc,
|
|
316
|
+
});
|
|
1800
317
|
}
|
|
1801
318
|
});
|
|
1802
319
|
}
|
|
@@ -1808,49 +325,81 @@ export function validateModule(mod) {
|
|
|
1808
325
|
}
|
|
1809
326
|
classesByName.set(cls.name, cls);
|
|
1810
327
|
if (cls.localCaptures !== undefined && (cls.runtime || cls.genericOf !== undefined)) {
|
|
1811
|
-
errors.push({
|
|
328
|
+
errors.push({
|
|
329
|
+
message: `class ${cls.name}: local class cannot use a runtime or generic family layout`,
|
|
330
|
+
loc: cls.loc,
|
|
331
|
+
});
|
|
1812
332
|
}
|
|
1813
333
|
if (cls.localCaptures !== undefined) {
|
|
1814
334
|
const environment = cls.fields.find((field) => field.name === `%classEnvironment:${cls.name}`);
|
|
1815
335
|
if (environment?.type.kind !== "classval" || environment.type.className !== cls.name) {
|
|
1816
|
-
errors.push({
|
|
336
|
+
errors.push({
|
|
337
|
+
message: `class ${cls.name}: local class requires its constructor environment field`,
|
|
338
|
+
loc: cls.loc,
|
|
339
|
+
});
|
|
1817
340
|
}
|
|
1818
341
|
}
|
|
1819
342
|
if (cls.localBaseCapture !== undefined) {
|
|
1820
343
|
const base = cls.localCaptures?.[cls.localBaseCapture];
|
|
1821
|
-
if (!Number.isInteger(cls.localBaseCapture) ||
|
|
344
|
+
if (!Number.isInteger(cls.localBaseCapture) ||
|
|
345
|
+
base?.type.kind !== "classval" ||
|
|
346
|
+
base.type.className !== cls.base) {
|
|
1822
347
|
errors.push({ message: `class ${cls.name}: invalid local base capture`, loc: cls.loc });
|
|
1823
348
|
}
|
|
1824
349
|
}
|
|
1825
350
|
if (cls.baseValueGlobal !== undefined) {
|
|
1826
351
|
const global = mod.globals?.find((global) => global.id === cls.baseValueGlobal);
|
|
1827
|
-
if (cls.localBaseCapture !== undefined ||
|
|
352
|
+
if (cls.localBaseCapture !== undefined ||
|
|
353
|
+
!cls.base ||
|
|
354
|
+
global?.type.kind !== "classval" ||
|
|
355
|
+
global.type.className !== cls.base) {
|
|
1828
356
|
errors.push({ message: `class ${cls.name}: invalid computed base global`, loc: cls.loc });
|
|
1829
357
|
}
|
|
1830
358
|
}
|
|
1831
359
|
if (cls.jsLength !== undefined && (!Number.isSafeInteger(cls.jsLength) || cls.jsLength < 0)) {
|
|
1832
360
|
errors.push({ message: `class ${cls.name}: invalid constructor length`, loc: cls.loc });
|
|
1833
361
|
}
|
|
1834
|
-
if (cls.tracksOwnFields &&
|
|
1835
|
-
|
|
362
|
+
if (cls.tracksOwnFields &&
|
|
363
|
+
(cls.runtime ||
|
|
364
|
+
cls.fields.find((field) => field.name === DYN_CLASS_PROPERTIES)?.type.kind !== "dyn")) {
|
|
365
|
+
errors.push({
|
|
366
|
+
message: `class ${cls.name}: field presence tracking requires a native dyn property bag`,
|
|
367
|
+
loc: cls.loc,
|
|
368
|
+
});
|
|
1836
369
|
}
|
|
1837
370
|
if (cls.prototypeDataHelper !== undefined) {
|
|
1838
371
|
const helper = functionsByName.get(cls.prototypeDataHelper);
|
|
1839
|
-
if (!helper ||
|
|
1840
|
-
|
|
372
|
+
if (!helper ||
|
|
373
|
+
helper.params.length !== 0 ||
|
|
374
|
+
helper.returnType.kind !== "dyn" ||
|
|
375
|
+
helper.captures !== undefined ||
|
|
376
|
+
helper.classCaptures !== undefined) {
|
|
377
|
+
errors.push({
|
|
378
|
+
message: `class ${cls.name}: prototype data helper must be a noncapturing () => dyn function`,
|
|
379
|
+
loc: cls.loc,
|
|
380
|
+
});
|
|
1841
381
|
}
|
|
1842
382
|
}
|
|
1843
383
|
if (cls.instancePrototypeHelper !== undefined) {
|
|
1844
384
|
const helper = functionsByName.get(cls.instancePrototypeHelper);
|
|
1845
385
|
const receiver = helper?.params[0]?.type;
|
|
1846
|
-
if (!helper ||
|
|
1847
|
-
helper.
|
|
1848
|
-
|
|
386
|
+
if (!helper ||
|
|
387
|
+
helper.params.length !== 1 ||
|
|
388
|
+
receiver?.kind !== "object" ||
|
|
389
|
+
receiver.className !== cls.name ||
|
|
390
|
+
helper.returnType.kind !== "dyn" ||
|
|
391
|
+
helper.captures !== undefined ||
|
|
392
|
+
helper.classCaptures !== undefined) {
|
|
393
|
+
errors.push({
|
|
394
|
+
message: `class ${cls.name}: instance prototype helper must be a noncapturing (instance) => dyn function`,
|
|
395
|
+
loc: cls.loc,
|
|
396
|
+
});
|
|
1849
397
|
}
|
|
1850
398
|
}
|
|
1851
399
|
for (const symbol of cls.symbolFields ?? []) {
|
|
1852
400
|
const global = mod.globals?.find((global) => global.id === symbol.globalId);
|
|
1853
|
-
if (global?.type.kind !== "symbol" ||
|
|
401
|
+
if (global?.type.kind !== "symbol" ||
|
|
402
|
+
!cls.fields.some((field) => field.name === symbol.field)) {
|
|
1854
403
|
errors.push({ message: `class ${cls.name}: invalid symbol field metadata`, loc: cls.loc });
|
|
1855
404
|
}
|
|
1856
405
|
}
|
|
@@ -1864,7 +413,10 @@ export function validateModule(mod) {
|
|
|
1864
413
|
else
|
|
1865
414
|
seen.set(f.name, f.type);
|
|
1866
415
|
if (isUnitType(f.type)) {
|
|
1867
|
-
errors.push({
|
|
416
|
+
errors.push({
|
|
417
|
+
message: `class ${cls.name}: field "${f.name}" is ${f.type.kind}`,
|
|
418
|
+
loc: cls.loc,
|
|
419
|
+
});
|
|
1868
420
|
}
|
|
1869
421
|
}
|
|
1870
422
|
// Duplicate class names, like classesByName, select the last declaration.
|
|
@@ -1879,10 +431,16 @@ export function validateModule(mod) {
|
|
|
1879
431
|
// module function exists for them (and must not).
|
|
1880
432
|
for (const m of cls.abstractMethods ?? []) {
|
|
1881
433
|
if (!cls.methods?.includes(m)) {
|
|
1882
|
-
errors.push({
|
|
434
|
+
errors.push({
|
|
435
|
+
message: `class ${cls.name}: abstract method "${m}" not in methods`,
|
|
436
|
+
loc: cls.loc,
|
|
437
|
+
});
|
|
1883
438
|
}
|
|
1884
439
|
if (functionsByName.has(`%${cls.name}.${m}`)) {
|
|
1885
|
-
errors.push({
|
|
440
|
+
errors.push({
|
|
441
|
+
message: `class ${cls.name}: abstract method "${m}" has a function`,
|
|
442
|
+
loc: cls.loc,
|
|
443
|
+
});
|
|
1886
444
|
}
|
|
1887
445
|
}
|
|
1888
446
|
for (const m of cls.methods ?? []) {
|
|
@@ -1904,8 +462,13 @@ export function validateModule(mod) {
|
|
|
1904
462
|
errors.push({ message: `class ${cls.name}: undeclared base "${cls.base}"`, loc: cls.loc });
|
|
1905
463
|
continue;
|
|
1906
464
|
}
|
|
1907
|
-
if (base.localCaptures !== undefined &&
|
|
1908
|
-
|
|
465
|
+
if (base.localCaptures !== undefined &&
|
|
466
|
+
cls.localBaseCapture === undefined &&
|
|
467
|
+
cls.baseValueGlobal === undefined) {
|
|
468
|
+
errors.push({
|
|
469
|
+
message: `class ${cls.name}: local base requires a captured constructor`,
|
|
470
|
+
loc: cls.loc,
|
|
471
|
+
});
|
|
1909
472
|
}
|
|
1910
473
|
const seen = new Set([cls.name]);
|
|
1911
474
|
for (let c = base; c; c = c.base !== undefined ? classesByName.get(c.base) : undefined) {
|
|
@@ -1923,27 +486,47 @@ export function validateModule(mod) {
|
|
|
1923
486
|
});
|
|
1924
487
|
}
|
|
1925
488
|
}
|
|
1926
|
-
//
|
|
1927
|
-
//
|
|
489
|
+
// Family membership is nominal; an instance may have a separately
|
|
490
|
+
// specialized base. The family's inherited prefix must remain valid.
|
|
491
|
+
const physicalRoot = (cls) => {
|
|
492
|
+
const seen = new Set();
|
|
493
|
+
let current = cls;
|
|
494
|
+
while (current?.base !== undefined) {
|
|
495
|
+
if (seen.has(current.name))
|
|
496
|
+
return undefined;
|
|
497
|
+
seen.add(current.name);
|
|
498
|
+
current = classesByName.get(current.base);
|
|
499
|
+
}
|
|
500
|
+
return current;
|
|
501
|
+
};
|
|
1928
502
|
for (const cls of mod.classes ?? []) {
|
|
1929
503
|
if (cls.genericOf === undefined)
|
|
1930
504
|
continue;
|
|
1931
505
|
const family = classesByName.get(cls.genericOf);
|
|
1932
506
|
if (!family) {
|
|
1933
|
-
errors.push({
|
|
1934
|
-
|
|
507
|
+
errors.push({
|
|
508
|
+
message: `class ${cls.name}: undeclared generic family "${cls.genericOf}"`,
|
|
509
|
+
loc: cls.loc,
|
|
510
|
+
});
|
|
1935
511
|
}
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
512
|
+
else if (family === cls || family.genericOf !== undefined) {
|
|
513
|
+
errors.push({
|
|
514
|
+
message: `class ${cls.name}: generic family "${cls.genericOf}" must name an erased declaration`,
|
|
515
|
+
loc: cls.loc,
|
|
516
|
+
});
|
|
517
|
+
}
|
|
518
|
+
else if (physicalRoot(cls) !== physicalRoot(family)) {
|
|
519
|
+
errors.push({
|
|
520
|
+
message: `class ${cls.name}: generic family "${cls.genericOf}" has a different storage root`,
|
|
521
|
+
loc: cls.loc,
|
|
522
|
+
});
|
|
1944
523
|
}
|
|
1945
|
-
if (
|
|
1946
|
-
|
|
524
|
+
else if (family.fields.some((field, index) => cls.fields[index]?.name !== field.name ||
|
|
525
|
+
!typeEquals(cls.fields[index].type, field.type))) {
|
|
526
|
+
errors.push({
|
|
527
|
+
message: `class ${cls.name}: generic family "${cls.genericOf}" has an incompatible prefix`,
|
|
528
|
+
loc: cls.loc,
|
|
529
|
+
});
|
|
1947
530
|
}
|
|
1948
531
|
}
|
|
1949
532
|
const noLoc = { file: mod.sourceFile, start: 0, end: 0 };
|
|
@@ -1966,7 +549,10 @@ export function validateModule(mod) {
|
|
|
1966
549
|
// unit field is as malformed as a void one. dyn and jsval slots
|
|
1967
550
|
// are valid; both are refcounted values held by the record shape.
|
|
1968
551
|
if (f.type.kind === "void" || isUnitType(f.type)) {
|
|
1969
|
-
errors.push({
|
|
552
|
+
errors.push({
|
|
553
|
+
message: `record ${rec.id}: field "${f.name}" is ${f.type.kind}`,
|
|
554
|
+
loc: noLoc,
|
|
555
|
+
});
|
|
1970
556
|
}
|
|
1971
557
|
if (f.type.kind === "record" && !recordIds.has(f.type.shapeId)) {
|
|
1972
558
|
errors.push({
|
|
@@ -1980,13 +566,18 @@ export function validateModule(mod) {
|
|
|
1980
566
|
// shapes share one index. All indexes belong to this validation call.
|
|
1981
567
|
recordValidation.set(rec.id, {
|
|
1982
568
|
fields,
|
|
1983
|
-
initializationFields: fields.size === rec.fields.length
|
|
569
|
+
initializationFields: fields.size === rec.fields.length
|
|
570
|
+
? fields
|
|
571
|
+
: new Map(rec.fields.map((field) => [field.name, field.type])),
|
|
1984
572
|
hasAccessorSlots: shapeHasAccessorSlots(rec),
|
|
1985
573
|
});
|
|
1986
574
|
// Canonical order is the shape's identity — enforce it.
|
|
1987
575
|
const sorted = [...rec.fields].map((f) => f.name).sort();
|
|
1988
576
|
if (rec.fields.some((f, i) => f.name !== sorted[i])) {
|
|
1989
|
-
errors.push({
|
|
577
|
+
errors.push({
|
|
578
|
+
message: `record ${rec.id}: fields are not in canonical (sorted) order`,
|
|
579
|
+
loc: noLoc,
|
|
580
|
+
});
|
|
1990
581
|
}
|
|
1991
582
|
// Tuple shapes carry exactly the positional fields "0".."n-1" (arity =
|
|
1992
583
|
// field count) — anything else has no honest index/JSON story.
|
|
@@ -1999,13 +590,17 @@ export function validateModule(mod) {
|
|
|
1999
590
|
break;
|
|
2000
591
|
}
|
|
2001
592
|
}
|
|
2002
|
-
if (rec.fields.length === 0 ||
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
593
|
+
if (rec.fields.length === 0 || names.size !== rec.fields.length || !positionsComplete) {
|
|
594
|
+
errors.push({
|
|
595
|
+
message: `record ${rec.id}: tuple fields are not "0".."${rec.fields.length - 1}"`,
|
|
596
|
+
loc: noLoc,
|
|
597
|
+
});
|
|
2006
598
|
}
|
|
2007
599
|
if (rec.indexValue) {
|
|
2008
|
-
errors.push({
|
|
600
|
+
errors.push({
|
|
601
|
+
message: `record ${rec.id}: a tuple cannot carry an index signature`,
|
|
602
|
+
loc: noLoc,
|
|
603
|
+
});
|
|
2009
604
|
}
|
|
2010
605
|
}
|
|
2011
606
|
// Index-signature shapes: the overflow value type is fenced to the map
|
|
@@ -2036,12 +631,21 @@ export function validateModule(mod) {
|
|
|
2036
631
|
const arm = u.arms[candidate.tag];
|
|
2037
632
|
const record = arm?.kind === "record" ? recordsById.get(arm.shapeId) : undefined;
|
|
2038
633
|
const member = record ? recordValidation.get(record.id)?.fields.get(field) : undefined;
|
|
2039
|
-
if (!Number.isInteger(candidate.tag) ||
|
|
2040
|
-
|
|
634
|
+
if (!Number.isInteger(candidate.tag) ||
|
|
635
|
+
candidate.tag < 0 ||
|
|
636
|
+
!member ||
|
|
637
|
+
tags.has(candidate.tag)) {
|
|
638
|
+
errors.push({
|
|
639
|
+
message: `union ${u.id}: invalid discriminant tag ${candidate.tag}`,
|
|
640
|
+
loc: noLoc,
|
|
641
|
+
});
|
|
2041
642
|
}
|
|
2042
643
|
tags.add(candidate.tag);
|
|
2043
644
|
if (candidate.values.length === 0) {
|
|
2044
|
-
errors.push({
|
|
645
|
+
errors.push({
|
|
646
|
+
message: `union ${u.id}: empty discriminant values for tag ${candidate.tag}`,
|
|
647
|
+
loc: noLoc,
|
|
648
|
+
});
|
|
2045
649
|
}
|
|
2046
650
|
for (const value of candidate.values) {
|
|
2047
651
|
if (value === undefined) {
|
|
@@ -2049,20 +653,31 @@ export function validateModule(mod) {
|
|
|
2049
653
|
continue;
|
|
2050
654
|
}
|
|
2051
655
|
const fieldTypes = member?.kind === "union"
|
|
2052
|
-
? unionsById.get(member.unionId)?.arms ?? []
|
|
2053
|
-
|
|
2054
|
-
|
|
656
|
+
? (unionsById.get(member.unionId)?.arms ?? [])
|
|
657
|
+
: member
|
|
658
|
+
? [member]
|
|
659
|
+
: [];
|
|
660
|
+
const valid = fieldTypes.some((type) => typeof value === "string"
|
|
661
|
+
? type.kind === "string"
|
|
662
|
+
: typeof value === "boolean"
|
|
663
|
+
? type.kind === "bool"
|
|
2055
664
|
: typeof value === "number" && Number.isFinite(value) && type.kind === "f64");
|
|
2056
665
|
const key = typeof value + ":" + String(value);
|
|
2057
666
|
if (!valid || values.has(key)) {
|
|
2058
|
-
errors.push({
|
|
667
|
+
errors.push({
|
|
668
|
+
message: `union ${u.id}: invalid or repeated discriminant value ${key}`,
|
|
669
|
+
loc: noLoc,
|
|
670
|
+
});
|
|
2059
671
|
}
|
|
2060
672
|
values.add(key);
|
|
2061
673
|
}
|
|
2062
674
|
}
|
|
2063
675
|
for (let tag = 0; tag < u.arms.length; tag++) {
|
|
2064
676
|
if (u.arms[tag].kind === "record" && !tags.has(tag)) {
|
|
2065
|
-
errors.push({
|
|
677
|
+
errors.push({
|
|
678
|
+
message: `union ${u.id}: missing discriminant for record arm ${tag}`,
|
|
679
|
+
loc: noLoc,
|
|
680
|
+
});
|
|
2066
681
|
}
|
|
2067
682
|
}
|
|
2068
683
|
}
|
|
@@ -2081,7 +696,10 @@ export function validateModule(mod) {
|
|
|
2081
696
|
}
|
|
2082
697
|
if ((arm.kind === "map" || arm.kind === "set" || arm.kind === "promise") &&
|
|
2083
698
|
!unionContainerArmsOk(u.arms)) {
|
|
2084
|
-
errors.push({
|
|
699
|
+
errors.push({
|
|
700
|
+
message: `union ${u.id}: ${arm.kind} arm ${i} beside non-unit arms`,
|
|
701
|
+
loc: noLoc,
|
|
702
|
+
});
|
|
2085
703
|
}
|
|
2086
704
|
if (arm.kind === "record" && !recordsById.has(arm.shapeId)) {
|
|
2087
705
|
errors.push({
|
|
@@ -2173,7 +791,10 @@ export function validateModule(mod) {
|
|
|
2173
791
|
};
|
|
2174
792
|
for (const g of mod.globals ?? []) {
|
|
2175
793
|
if (g.tdz && g.type.kind !== "record" && g.type.kind !== "func" && g.type.kind !== "dyn") {
|
|
2176
|
-
errors.push({
|
|
794
|
+
errors.push({
|
|
795
|
+
message: `TDZ global "${g.name}" must have record, function, or checked-value storage`,
|
|
796
|
+
loc: noLoc,
|
|
797
|
+
});
|
|
2177
798
|
}
|
|
2178
799
|
if (isUnitType(g.type)) {
|
|
2179
800
|
errors.push({ message: `global "${g.name}" has bare unit type ${g.type.kind}`, loc: noLoc });
|
|
@@ -2216,7 +837,9 @@ export function validateModule(mod) {
|
|
|
2216
837
|
// membership, and virtual-call resolution local to this validation invocation.
|
|
2217
838
|
const classValidation = {
|
|
2218
839
|
fields: classFields,
|
|
2219
|
-
hierarchy: new Set(),
|
|
840
|
+
hierarchy: new Set(),
|
|
841
|
+
implementations: new Map(),
|
|
842
|
+
virtualCalls: new Map(),
|
|
2220
843
|
};
|
|
2221
844
|
for (const cls of classesByName.values()) {
|
|
2222
845
|
if (cls.base !== undefined) {
|
|
@@ -2235,11 +858,11 @@ export function validateModule(mod) {
|
|
|
2235
858
|
}
|
|
2236
859
|
}
|
|
2237
860
|
for (const fn of mod.functions) {
|
|
2238
|
-
validateFunction(fn, functionsByName, ffiByName, classesByName, recordsById, recordValidation, unionsById, globalsById, classValidation, errors);
|
|
861
|
+
validateFunction(fn, functionsByName, ffiByName, classesByName, recordsById, recordValidation, unionsById, globalsById, classValidation, errors, mod.workers === true);
|
|
2239
862
|
}
|
|
2240
863
|
return errors;
|
|
2241
864
|
}
|
|
2242
|
-
function validateFunction(fn, functions, ffiByName, classes, records, recordValidation, unions, globals, classValidation, errors) {
|
|
865
|
+
function validateFunction(fn, functions, ffiByName, classes, records, recordValidation, unions, globals, classValidation, errors, workers) {
|
|
2243
866
|
const locals = new Map(fn.locals.map((l) => [l.id, l]));
|
|
2244
867
|
const err = (message, loc) => errors.push({ message: `in ${fn.name}: ${message}`, loc });
|
|
2245
868
|
const asyncCaches = [
|
|
@@ -2272,13 +895,37 @@ function validateFunction(fn, functions, ffiByName, classes, records, recordVali
|
|
|
2272
895
|
if (fn.asyncCycleCacheGlobal !== undefined && fn.asyncCacheGlobal === undefined) {
|
|
2273
896
|
err("an asyncCycleCacheGlobal requires a module asyncCacheGlobal", fn.loc);
|
|
2274
897
|
}
|
|
2275
|
-
//
|
|
2276
|
-
//
|
|
2277
|
-
|
|
898
|
+
// Virtual slots and constructor ABIs follow physical inheritance only.
|
|
899
|
+
// Erased family identity does not supply their specialized layout or ABI.
|
|
900
|
+
const isPhysicalSubclass = (sub, sup) => {
|
|
901
|
+
const seen = new Set([sub]);
|
|
902
|
+
for (let c = classes.get(sub)?.base; c !== undefined; c = classes.get(c)?.base) {
|
|
903
|
+
if (seen.has(c))
|
|
904
|
+
return false;
|
|
905
|
+
seen.add(c);
|
|
906
|
+
if (c === sup)
|
|
907
|
+
return true;
|
|
908
|
+
}
|
|
909
|
+
return false;
|
|
910
|
+
};
|
|
911
|
+
// Object casts may also recover an erased family. The module-level
|
|
912
|
+
// prefix check validates the fields exposed by that view.
|
|
2278
913
|
const isStrictSubclass = (sub, sup) => {
|
|
2279
|
-
|
|
2280
|
-
|
|
914
|
+
const seen = new Set();
|
|
915
|
+
for (let c = classes.get(sub); c; c = c.base === undefined ? undefined : classes.get(c.base)) {
|
|
916
|
+
if (seen.has(c.name))
|
|
917
|
+
return false;
|
|
918
|
+
seen.add(c.name);
|
|
919
|
+
if (c.name !== sub && c.name === sup)
|
|
2281
920
|
return true;
|
|
921
|
+
const families = new Set();
|
|
922
|
+
for (let family = c.genericOf === undefined ? undefined : classes.get(c.genericOf); family; family = family.base === undefined ? undefined : classes.get(family.base)) {
|
|
923
|
+
if (families.has(family.name))
|
|
924
|
+
return false;
|
|
925
|
+
families.add(family.name);
|
|
926
|
+
if (family.name === sup)
|
|
927
|
+
return true;
|
|
928
|
+
}
|
|
2282
929
|
}
|
|
2283
930
|
return false;
|
|
2284
931
|
};
|
|
@@ -2305,7 +952,7 @@ function validateFunction(fn, functions, ffiByName, classes, records, recordVali
|
|
|
2305
952
|
if (declared) {
|
|
2306
953
|
// Preserve class-table order when choosing an abstract slot's ABI.
|
|
2307
954
|
for (const c of classValidation.implementations.get(method) ?? []) {
|
|
2308
|
-
if (!
|
|
955
|
+
if (!isPhysicalSubclass(c.name, className))
|
|
2309
956
|
continue;
|
|
2310
957
|
hasOverride = true;
|
|
2311
958
|
implementation ??= functions.get(`%${c.name}.${method}`);
|
|
@@ -2366,7 +1013,9 @@ function validateFunction(fn, functions, ffiByName, classes, records, recordVali
|
|
|
2366
1013
|
// Same-kind mismatches (func vs func, record vs record) would be
|
|
2367
1014
|
// unreadable as bare kinds — the structural keys show WHERE the two
|
|
2368
1015
|
// types diverge.
|
|
2369
|
-
const detail = want.kind === expr.type.kind
|
|
1016
|
+
const detail = want.kind === expr.type.kind
|
|
1017
|
+
? ` (expected ${typeKey(want)}, got ${typeKey(expr.type)})`
|
|
1018
|
+
: "";
|
|
2370
1019
|
err(`${what}: expected ${want.kind}, got ${expr.type.kind}${detail}`, expr.loc);
|
|
2371
1020
|
}
|
|
2372
1021
|
};
|
|
@@ -2465,8 +1114,12 @@ function validateFunction(fn, functions, ffiByName, classes, records, recordVali
|
|
|
2465
1114
|
continue;
|
|
2466
1115
|
}
|
|
2467
1116
|
if (e.kind === "logical") {
|
|
2468
|
-
if (e.type.kind !== "f64" &&
|
|
2469
|
-
e.type.kind !== "
|
|
1117
|
+
if (e.type.kind !== "f64" &&
|
|
1118
|
+
e.type.kind !== "string" &&
|
|
1119
|
+
e.type.kind !== "bool" &&
|
|
1120
|
+
e.type.kind !== "jsval" &&
|
|
1121
|
+
e.type.kind !== "union" &&
|
|
1122
|
+
e.type.kind !== "dyn") {
|
|
2470
1123
|
err(`logical ${e.op} must be f64|string|bool|jsval|union|dyn, got ${e.type.kind}`, e.loc);
|
|
2471
1124
|
}
|
|
2472
1125
|
if (e.type.kind === "union")
|
|
@@ -2616,7 +1269,8 @@ function validateFunction(fn, functions, ffiByName, classes, records, recordVali
|
|
|
2616
1269
|
// procStream is the ONE non-f64 numLit: process.stdout/stderr as
|
|
2617
1270
|
// first-class values mint the stream's fd (1/2) as the scalar —
|
|
2618
1271
|
// the prefixStream idiom.
|
|
2619
|
-
if (e.type.kind !== "f64" &&
|
|
1272
|
+
if (e.type.kind !== "f64" &&
|
|
1273
|
+
!(e.type.kind === "procStream" && (e.value === 1 || e.value === 2))) {
|
|
2620
1274
|
err("numLit must be f64", e.loc);
|
|
2621
1275
|
}
|
|
2622
1276
|
break;
|
|
@@ -2783,7 +1437,22 @@ function validateFunction(fn, functions, ffiByName, classes, records, recordVali
|
|
|
2783
1437
|
// choose ARRAY_VALUE versus ARRAY_UNDEFINED before the final result
|
|
2784
1438
|
// is evaluated. Delegation also needs a local loop. Nested control
|
|
2785
1439
|
// flow is checked recursively; jumps still cannot leave the region.
|
|
2786
|
-
const allowed = new Set([
|
|
1440
|
+
const allowed = new Set([
|
|
1441
|
+
"varDecl",
|
|
1442
|
+
"assign",
|
|
1443
|
+
"exprStmt",
|
|
1444
|
+
"fieldSet",
|
|
1445
|
+
"recordSet",
|
|
1446
|
+
"recordKeySet",
|
|
1447
|
+
"arraySet",
|
|
1448
|
+
"arraySetLength",
|
|
1449
|
+
"arraySetUndefined",
|
|
1450
|
+
"arrayDelete",
|
|
1451
|
+
"bytesSet",
|
|
1452
|
+
"block",
|
|
1453
|
+
"if",
|
|
1454
|
+
"while",
|
|
1455
|
+
]);
|
|
2787
1456
|
if (e.generatorDelegate) {
|
|
2788
1457
|
if (!fn.generator || fn.async)
|
|
2789
1458
|
err("delegation sequence outside a synchronous generator", e.loc);
|
|
@@ -3024,7 +1693,8 @@ function validateFunction(fn, functions, ffiByName, classes, records, recordVali
|
|
|
3024
1693
|
if (!helper) {
|
|
3025
1694
|
err(`orDefault retag calls undeclared function "${e.retag}"`, e.loc);
|
|
3026
1695
|
}
|
|
3027
|
-
else if (helper.params.length !== 1 ||
|
|
1696
|
+
else if (helper.params.length !== 1 ||
|
|
1697
|
+
!typeEquals(helper.params[0].type, e.left.type)) {
|
|
3028
1698
|
err(`orDefault retag ${e.retag} must take exactly the left union`, e.loc);
|
|
3029
1699
|
}
|
|
3030
1700
|
else if (!typeEquals(callSiteReturnType(helper), e.type)) {
|
|
@@ -3049,8 +1719,12 @@ function validateFunction(fn, functions, ffiByName, classes, records, recordVali
|
|
|
3049
1719
|
if (!def) {
|
|
3050
1720
|
err(`toString of unknown union ${e.operand.type.unionId}`, e.loc);
|
|
3051
1721
|
}
|
|
3052
|
-
else if (!def.arms.every((a) => a.kind === "undefinedT" ||
|
|
3053
|
-
a.kind === "
|
|
1722
|
+
else if (!def.arms.every((a) => a.kind === "undefinedT" ||
|
|
1723
|
+
a.kind === "nullT" ||
|
|
1724
|
+
a.kind === "string" ||
|
|
1725
|
+
a.kind === "f64" ||
|
|
1726
|
+
a.kind === "bigint" ||
|
|
1727
|
+
a.kind === "bool" ||
|
|
3054
1728
|
(a.kind === "bytes" && a.elem === "u8"))) {
|
|
3055
1729
|
err("toString union operand has a non-stringable arm (frontend must fence)", e.loc);
|
|
3056
1730
|
}
|
|
@@ -3250,11 +1924,29 @@ function validateFunction(fn, functions, ffiByName, classes, records, recordVali
|
|
|
3250
1924
|
// view; dataViewNew and byteOffset take ANY elem kind (views form
|
|
3251
1925
|
// over any typed array's storage, owners answer byteOffset 0).
|
|
3252
1926
|
const isDv = e.method.startsWith("dvGet") || e.method.startsWith("dvSet");
|
|
3253
|
-
const isNum = e.method === "readNum" ||
|
|
1927
|
+
const isNum = e.method === "readNum" ||
|
|
1928
|
+
e.method === "writeNum" ||
|
|
1929
|
+
e.method === "readNumVar" ||
|
|
1930
|
+
e.method === "writeNumVar";
|
|
3254
1931
|
const U8_ONLY_EXTRA = new Set([
|
|
3255
|
-
"toString",
|
|
3256
|
-
"
|
|
3257
|
-
"
|
|
1932
|
+
"toString",
|
|
1933
|
+
"toStringVar",
|
|
1934
|
+
"equals",
|
|
1935
|
+
"compareBuf",
|
|
1936
|
+
"indexOf",
|
|
1937
|
+
"lastIndexOf",
|
|
1938
|
+
"includes",
|
|
1939
|
+
"indexOfNum",
|
|
1940
|
+
"lastIndexOfNum",
|
|
1941
|
+
"includesNum",
|
|
1942
|
+
"fill",
|
|
1943
|
+
"fillNum",
|
|
1944
|
+
"fillStr",
|
|
1945
|
+
"copy",
|
|
1946
|
+
"swap16",
|
|
1947
|
+
"swap32",
|
|
1948
|
+
"swap64",
|
|
1949
|
+
"writeStr",
|
|
3258
1950
|
]);
|
|
3259
1951
|
const u8Only = U8_ONLY_EXTRA.has(e.method) || isNum || isDv;
|
|
3260
1952
|
if (u8Only && recv.elem !== "u8") {
|
|
@@ -3266,7 +1958,9 @@ function validateFunction(fn, functions, ffiByName, classes, records, recordVali
|
|
|
3266
1958
|
if (isNum && e.args[0]?.kind !== "strLit") {
|
|
3267
1959
|
err(`bytesIntrinsic ${e.method} args[0] must be a strLit kind token`, e.loc);
|
|
3268
1960
|
}
|
|
3269
|
-
else if (isNum &&
|
|
1961
|
+
else if (isNum &&
|
|
1962
|
+
e.args[0]?.kind === "strLit" &&
|
|
1963
|
+
!validByteNumberToken(e.method, e.args[0].value)) {
|
|
3270
1964
|
err(`bytesIntrinsic ${e.method} invalid kind token '${e.args[0].value}'`, e.loc);
|
|
3271
1965
|
}
|
|
3272
1966
|
// fillStr/writeStr carry their NORMALIZED encoding as args[1],
|
|
@@ -3302,49 +1996,61 @@ function validateFunction(fn, functions, ffiByName, classes, records, recordVali
|
|
|
3302
1996
|
// Object.hasOwn: "toString" is a real method name here and must
|
|
3303
1997
|
// not answer from Object.prototype.
|
|
3304
1998
|
const extraSig = Object.hasOwn(EXTRA_SIGS, e.method) ? EXTRA_SIGS[e.method] : undefined;
|
|
3305
|
-
const sig = extraSig ??
|
|
3306
|
-
|
|
3307
|
-
|
|
3308
|
-
|
|
3309
|
-
|
|
3310
|
-
|
|
3311
|
-
|
|
3312
|
-
|
|
3313
|
-
|
|
3314
|
-
|
|
3315
|
-
|
|
3316
|
-
|
|
3317
|
-
|
|
3318
|
-
|
|
3319
|
-
|
|
3320
|
-
|
|
3321
|
-
|
|
3322
|
-
|
|
3323
|
-
|
|
3324
|
-
|
|
3325
|
-
|
|
3326
|
-
|
|
3327
|
-
|
|
1999
|
+
const sig = extraSig ??
|
|
2000
|
+
(e.method === "length" || e.method === "byteLength" || e.method === "byteOffset"
|
|
2001
|
+
? { argTypes: [], minArgs: 0, result: F64 }
|
|
2002
|
+
: e.method === "get"
|
|
2003
|
+
? { argTypes: [F64], minArgs: 1, result: F64 }
|
|
2004
|
+
: e.method === "slice" || e.method === "subarray"
|
|
2005
|
+
? { argTypes: [F64, F64], minArgs: 0, result: bytesOf(recv.elem) }
|
|
2006
|
+
: e.method === "toReversed"
|
|
2007
|
+
? { argTypes: [], minArgs: 0, result: bytesOf(recv.elem) }
|
|
2008
|
+
: e.method === "with"
|
|
2009
|
+
? { argTypes: [F64, F64], minArgs: 2, result: bytesOf(recv.elem) }
|
|
2010
|
+
: e.method === "join"
|
|
2011
|
+
? { argTypes: [STRING], minArgs: 1, result: STRING }
|
|
2012
|
+
: e.method === "toArray"
|
|
2013
|
+
? { argTypes: [], minArgs: 0, result: arrayOf(F64) }
|
|
2014
|
+
: e.method === "setFrom"
|
|
2015
|
+
? {
|
|
2016
|
+
argTypes: [
|
|
2017
|
+
e.args[0]?.type.kind === "bytes"
|
|
2018
|
+
? e.args[0].type
|
|
2019
|
+
: bytesOf(recv.elem),
|
|
2020
|
+
F64,
|
|
2021
|
+
],
|
|
2022
|
+
minArgs: 1,
|
|
2023
|
+
result: VOID,
|
|
2024
|
+
}
|
|
2025
|
+
: e.method === "toString" || e.method === "toStringVar"
|
|
2026
|
+
? { argTypes: [STRING, F64, F64], minArgs: 1, result: STRING }
|
|
2027
|
+
: e.method === "readNum"
|
|
2028
|
+
? { argTypes: [STRING, F64], minArgs: 2, result: F64 }
|
|
2029
|
+
: e.method === "writeNum"
|
|
3328
2030
|
? { argTypes: [STRING, F64, F64], minArgs: 3, result: F64 }
|
|
3329
|
-
: e.method === "
|
|
3330
|
-
? { argTypes: [STRING, F64, F64
|
|
3331
|
-
: e.method === "
|
|
3332
|
-
? { argTypes: [F64, F64], minArgs:
|
|
3333
|
-
: e.method
|
|
3334
|
-
? {
|
|
3335
|
-
|
|
3336
|
-
|
|
3337
|
-
|
|
3338
|
-
:
|
|
3339
|
-
|
|
3340
|
-
|
|
3341
|
-
|
|
3342
|
-
|
|
3343
|
-
|
|
3344
|
-
|
|
3345
|
-
|
|
3346
|
-
|
|
3347
|
-
|
|
2031
|
+
: e.method === "readNumVar"
|
|
2032
|
+
? { argTypes: [STRING, F64, F64], minArgs: 3, result: F64 }
|
|
2033
|
+
: e.method === "writeNumVar"
|
|
2034
|
+
? { argTypes: [STRING, F64, F64, F64], minArgs: 4, result: F64 }
|
|
2035
|
+
: e.method === "dataViewNew"
|
|
2036
|
+
? { argTypes: [F64, F64], minArgs: 0, result: BYTES_U8 }
|
|
2037
|
+
: e.method.startsWith("dvSet")
|
|
2038
|
+
? {
|
|
2039
|
+
// dvSet*: [offset, value], the 8-bit setters take no littleEndian.
|
|
2040
|
+
argTypes: e.method === "dvSetUint8" || e.method === "dvSetInt8"
|
|
2041
|
+
? [F64, F64]
|
|
2042
|
+
: [F64, F64, BOOL],
|
|
2043
|
+
minArgs: 2,
|
|
2044
|
+
result: VOID,
|
|
2045
|
+
}
|
|
2046
|
+
: {
|
|
2047
|
+
// dvGet*: the 8-bit getters take no littleEndian.
|
|
2048
|
+
argTypes: e.method === "dvGetUint8" || e.method === "dvGetInt8"
|
|
2049
|
+
? [F64]
|
|
2050
|
+
: [F64, BOOL],
|
|
2051
|
+
minArgs: 1,
|
|
2052
|
+
result: F64,
|
|
2053
|
+
});
|
|
3348
2054
|
if (e.args.length < sig.minArgs || e.args.length > sig.argTypes.length) {
|
|
3349
2055
|
err(`bytesIntrinsic ${e.method}: ${e.args.length} args`, e.loc);
|
|
3350
2056
|
}
|
|
@@ -3366,47 +2072,72 @@ function validateFunction(fn, functions, ffiByName, classes, records, recordVali
|
|
|
3366
2072
|
break;
|
|
3367
2073
|
}
|
|
3368
2074
|
const elem = e.receiver.type.elem;
|
|
3369
|
-
const sig = e.method === "
|
|
3370
|
-
? { argTypes:
|
|
3371
|
-
: e.method === "
|
|
3372
|
-
? { argTypes: [
|
|
3373
|
-
: e.method === "
|
|
3374
|
-
? { argTypes: [F64], result:
|
|
3375
|
-
: e.method === "
|
|
3376
|
-
? { argTypes:
|
|
3377
|
-
: e.method === "
|
|
3378
|
-
|
|
3379
|
-
|
|
3380
|
-
|
|
3381
|
-
|
|
3382
|
-
|
|
3383
|
-
|
|
3384
|
-
|
|
3385
|
-
|
|
3386
|
-
|
|
3387
|
-
|
|
3388
|
-
|
|
3389
|
-
|
|
3390
|
-
|
|
3391
|
-
|
|
3392
|
-
|
|
3393
|
-
|
|
3394
|
-
|
|
3395
|
-
|
|
3396
|
-
|
|
3397
|
-
|
|
3398
|
-
|
|
3399
|
-
|
|
3400
|
-
|
|
3401
|
-
|
|
3402
|
-
|
|
3403
|
-
|
|
3404
|
-
|
|
3405
|
-
|
|
2075
|
+
const sig = e.method === "copyWithin"
|
|
2076
|
+
? { argTypes: [F64, F64, F64], result: e.receiver.type }
|
|
2077
|
+
: e.method === "fill"
|
|
2078
|
+
? { argTypes: [elem, F64, F64], result: e.receiver.type }
|
|
2079
|
+
: e.method === "fillUndefined"
|
|
2080
|
+
? { argTypes: [F64, F64], result: e.receiver.type }
|
|
2081
|
+
: e.method === "push" || e.method === "unshift"
|
|
2082
|
+
? { argTypes: e.args.map(() => elem), result: F64 }
|
|
2083
|
+
: e.method === "pushSpread" ||
|
|
2084
|
+
e.method === "concatSpread" ||
|
|
2085
|
+
e.method === "unshiftSpread"
|
|
2086
|
+
? { argTypes: [e.receiver.type], result: F64 }
|
|
2087
|
+
: e.method === "nextPresent" || e.method === "getNumber"
|
|
2088
|
+
? { argTypes: [F64], result: F64 }
|
|
2089
|
+
: e.method === "indexEq"
|
|
2090
|
+
? { argTypes: [F64, e.receiver.type, F64], result: BOOL }
|
|
2091
|
+
: e.method === "pop"
|
|
2092
|
+
? { argTypes: [], result: e.type } // union-checked below
|
|
2093
|
+
: e.method === "indexOf"
|
|
2094
|
+
? { argTypes: [elem], result: F64 }
|
|
2095
|
+
: e.method === "includes"
|
|
2096
|
+
? { argTypes: [elem], result: BOOL }
|
|
2097
|
+
: e.method === "join"
|
|
2098
|
+
? { argTypes: [STRING], result: STRING }
|
|
2099
|
+
: e.method === "slice"
|
|
2100
|
+
? { argTypes: [F64, F64], result: e.receiver.type }
|
|
2101
|
+
: e.method === "toReversed" ||
|
|
2102
|
+
e.method === "sortPrimitive" ||
|
|
2103
|
+
e.method === "toSortedPrimitive"
|
|
2104
|
+
? { argTypes: [], result: e.receiver.type }
|
|
2105
|
+
: e.method === "reverse"
|
|
2106
|
+
? { argTypes: [], result: e.receiver.type }
|
|
2107
|
+
: e.method === "toSpliced"
|
|
2108
|
+
? {
|
|
2109
|
+
argTypes: [F64, F64, e.receiver.type],
|
|
2110
|
+
result: e.receiver.type,
|
|
2111
|
+
}
|
|
2112
|
+
: e.method === "with"
|
|
2113
|
+
? { argTypes: [F64, elem], result: e.receiver.type }
|
|
2114
|
+
: e.method === "withUndefined"
|
|
2115
|
+
? { argTypes: [F64], result: e.receiver.type }
|
|
2116
|
+
: e.method === "splice"
|
|
2117
|
+
? { argTypes: [F64, F64], result: e.receiver.type }
|
|
2118
|
+
: e.method === "spliceInsert"
|
|
2119
|
+
? {
|
|
2120
|
+
argTypes: [F64, F64, e.receiver.type],
|
|
2121
|
+
result: e.receiver.type,
|
|
2122
|
+
}
|
|
2123
|
+
: e.method === "flatCopy" || e.method === "flatOne"
|
|
2124
|
+
? { argTypes: [e.type], result: e.type }
|
|
2125
|
+
: e.method === "shift"
|
|
2126
|
+
? { argTypes: [], result: e.type } // union-checked below
|
|
2127
|
+
: { argTypes: [], result: F64 }; // length
|
|
2128
|
+
if ((e.method === "sortPrimitive" || e.method === "toSortedPrimitive") &&
|
|
2129
|
+
elem.kind !== "string" &&
|
|
2130
|
+
elem.kind !== "f64" &&
|
|
2131
|
+
elem.kind !== "bool") {
|
|
2132
|
+
err(`arrIntrinsic ${e.method} requires primitive elements, got ${elem.kind}`, e.loc);
|
|
2133
|
+
}
|
|
3406
2134
|
if (e.method === "getNumber" && elem.kind !== "f64") {
|
|
3407
2135
|
err(`arrIntrinsic getNumber requires f64 elements, got ${elem.kind}`, e.loc);
|
|
3408
2136
|
}
|
|
3409
|
-
if (e.method === "indexEq" &&
|
|
2137
|
+
if (e.method === "indexEq" &&
|
|
2138
|
+
elem.kind !== "f64" &&
|
|
2139
|
+
elem.kind !== "bool" &&
|
|
2140
|
+
elem.kind !== "string") {
|
|
3410
2141
|
err(`arrIntrinsic indexEq requires primitive elements, got ${elem.kind}`, e.loc);
|
|
3411
2142
|
}
|
|
3412
2143
|
if (e.method === "flatCopy" && !typeEquals(e.type, e.receiver.type)) {
|
|
@@ -3416,7 +2147,9 @@ function validateFunction(fn, functions, ffiByName, classes, records, recordVali
|
|
|
3416
2147
|
err("arrIntrinsic flatOne result must match the nested array type", e.loc);
|
|
3417
2148
|
}
|
|
3418
2149
|
if (e.method === "join" &&
|
|
3419
|
-
elem.kind !== "f64" &&
|
|
2150
|
+
elem.kind !== "f64" &&
|
|
2151
|
+
elem.kind !== "string" &&
|
|
2152
|
+
elem.kind !== "bool" &&
|
|
3420
2153
|
!(elem.kind === "union" &&
|
|
3421
2154
|
(unions
|
|
3422
2155
|
.get(elem.unionId)
|
|
@@ -3429,11 +2162,14 @@ function validateFunction(fn, functions, ffiByName, classes, records, recordVali
|
|
|
3429
2162
|
// misjudge JS ===; the frontend fences these.
|
|
3430
2163
|
err(`arrIntrinsic ${e.method} on union elements (frontend must reject)`, e.loc);
|
|
3431
2164
|
}
|
|
3432
|
-
if ((e.method === "shift" || e.method === "pop") &&
|
|
2165
|
+
if ((e.method === "shift" || e.method === "pop") &&
|
|
2166
|
+
!(elem.kind === "dyn" && e.type.kind === "dyn")) {
|
|
3433
2167
|
const rdef = e.type.kind === "union" ? unions.get(e.type.unionId) : undefined;
|
|
3434
2168
|
if (!rdef ||
|
|
3435
2169
|
!rdef.arms.some((arm) => arm.kind === "undefinedT") ||
|
|
3436
|
-
!(elem.kind === "union"
|
|
2170
|
+
!(elem.kind === "union"
|
|
2171
|
+
? typeEquals(elem, e.type)
|
|
2172
|
+
: rdef.arms.some((arm) => typeEquals(arm, elem)))) {
|
|
3437
2173
|
err(`arrIntrinsic ${e.method} result must be the elem|undefined union`, e.loc);
|
|
3438
2174
|
}
|
|
3439
2175
|
}
|
|
@@ -3523,13 +2259,17 @@ function validateFunction(fn, functions, ffiByName, classes, records, recordVali
|
|
|
3523
2259
|
}
|
|
3524
2260
|
break;
|
|
3525
2261
|
}
|
|
3526
|
-
if (e.method === "valueSet" &&
|
|
2262
|
+
if (e.method === "valueSet" &&
|
|
2263
|
+
!isSupportedSetElem(value, value.kind === "union" ? unions.get(value.unionId)?.arms : undefined)) {
|
|
3527
2264
|
err(`mapIntrinsic valueSet element kind ${value.kind} (frontend must fence)`, e.loc);
|
|
3528
2265
|
}
|
|
3529
2266
|
const sig = e.method === "clone"
|
|
3530
2267
|
? { argTypes: [], result: e.receiver.type }
|
|
3531
2268
|
: e.method === "keySet" || e.method === "valueSet"
|
|
3532
|
-
? {
|
|
2269
|
+
? {
|
|
2270
|
+
argTypes: [],
|
|
2271
|
+
result: { kind: "set", elem: e.method === "keySet" ? key : value },
|
|
2272
|
+
}
|
|
3533
2273
|
: e.method === "set"
|
|
3534
2274
|
? { argTypes: [key, value], result: VOID }
|
|
3535
2275
|
: e.method === "has" || e.method === "delete"
|
|
@@ -3824,7 +2564,7 @@ function validateFunction(fn, functions, ffiByName, classes, records, recordVali
|
|
|
3824
2564
|
checkExpr(e.value);
|
|
3825
2565
|
if (e.kind === "upcast" && e.type.kind === "classval" && e.value.type.kind === "classval") {
|
|
3826
2566
|
const [sub, sup] = [e.value.type.className, e.type.className];
|
|
3827
|
-
if (!
|
|
2567
|
+
if (!isPhysicalSubclass(sub, sup)) {
|
|
3828
2568
|
err(`upcast: "${sub}" does not extend "${sup}"`, e.loc);
|
|
3829
2569
|
break;
|
|
3830
2570
|
}
|
|
@@ -3929,7 +2669,8 @@ function validateFunction(fn, functions, ffiByName, classes, records, recordVali
|
|
|
3929
2669
|
// word to read; a standalone target class has one possible value
|
|
3930
2670
|
// and the frontend folds it statically.
|
|
3931
2671
|
if (classes.get(e.classValue.type.className)?.localCaptures !== undefined &&
|
|
3932
|
-
e.value.type.kind === "object" &&
|
|
2672
|
+
e.value.type.kind === "object" &&
|
|
2673
|
+
classes.get(e.value.type.className)?.localCaptures !== undefined)
|
|
3933
2674
|
break;
|
|
3934
2675
|
if (!hierarchy.has(e.classValue.type.className)) {
|
|
3935
2676
|
err(`instanceOfValue against standalone class "${e.classValue.type.className}"`, e.loc);
|
|
@@ -4120,12 +2861,14 @@ function validateFunction(fn, functions, ffiByName, classes, records, recordVali
|
|
|
4120
2861
|
// literal key naming no declared field) skip the declared check
|
|
4121
2862
|
// and require the overflow to exist.
|
|
4122
2863
|
const surfaces = (t) => typeEquals(t, e.type) ||
|
|
4123
|
-
(e.type.kind === "union" &&
|
|
4124
|
-
|
|
4125
|
-
|
|
4126
|
-
|
|
4127
|
-
(!!
|
|
4128
|
-
|
|
2864
|
+
(e.type.kind === "union" &&
|
|
2865
|
+
(() => {
|
|
2866
|
+
const result = unions.get(e.type.unionId);
|
|
2867
|
+
const source = t.kind === "union" ? unions.get(t.unionId) : undefined;
|
|
2868
|
+
return (!!result &&
|
|
2869
|
+
(result.arms.some((a) => typeEquals(a, t)) ||
|
|
2870
|
+
(!!source && unionWideningTags(source.arms, result.arms) !== null)));
|
|
2871
|
+
})()) ||
|
|
4129
2872
|
e.type.kind === "dyn";
|
|
4130
2873
|
if (e.overflowOnly && !shape.indexValue) {
|
|
4131
2874
|
err(`recordKeyGet on ${e.shapeId}: overflowOnly read of a shape without an index signature`, e.loc);
|
|
@@ -4336,7 +3079,8 @@ function validateFunction(fn, functions, ffiByName, classes, records, recordVali
|
|
|
4336
3079
|
expectType(e.value, { kind: "dyn" }, "dynTest operand");
|
|
4337
3080
|
if (e.type.kind !== "bool")
|
|
4338
3081
|
err("dynTest must be bool", e.loc);
|
|
4339
|
-
if (e.bytesElem !== undefined &&
|
|
3082
|
+
if (e.bytesElem !== undefined &&
|
|
3083
|
+
(e.test !== "bytes" || !Object.hasOwn(BYTES_ELEMENT_NAME, e.bytesElem))) {
|
|
4340
3084
|
err("dynTest bytesElem requires a valid bytes test", e.loc);
|
|
4341
3085
|
}
|
|
4342
3086
|
break;
|
|
@@ -4414,7 +3158,9 @@ function validateFunction(fn, functions, ffiByName, classes, records, recordVali
|
|
|
4414
3158
|
checkExpr(e.value);
|
|
4415
3159
|
expectType(e.value, { kind: "caught" }, "caughtNarrow operand");
|
|
4416
3160
|
const t = e.type;
|
|
4417
|
-
const ok = t.kind === "f64" ||
|
|
3161
|
+
const ok = t.kind === "f64" ||
|
|
3162
|
+
t.kind === "bool" ||
|
|
3163
|
+
t.kind === "string" ||
|
|
4418
3164
|
(t.kind === "object" && hierarchy.has(t.className));
|
|
4419
3165
|
if (!ok) {
|
|
4420
3166
|
err(`caughtNarrow to ${t.kind === "object" ? `non-hierarchy class "${t.className}"` : t.kind}`, e.loc);
|
|
@@ -4502,11 +3248,14 @@ function validateFunction(fn, functions, ffiByName, classes, records, recordVali
|
|
|
4502
3248
|
// non-unit arms have no keyed read at all. Number keys read ARRAY
|
|
4503
3249
|
// arms; string keys read RECORD arms.
|
|
4504
3250
|
const resultUnion = e.type.kind === "union" ? unions.get(e.type.unionId) : undefined;
|
|
4505
|
-
const surfaces = (t) => typeEquals(t, e.type) ||
|
|
4506
|
-
|
|
4507
|
-
|
|
4508
|
-
|
|
4509
|
-
|
|
3251
|
+
const surfaces = (t) => typeEquals(t, e.type) ||
|
|
3252
|
+
!!resultUnion?.arms.some((a) => typeEquals(a, t)) ||
|
|
3253
|
+
(t.kind === "union" &&
|
|
3254
|
+
!!resultUnion &&
|
|
3255
|
+
(() => {
|
|
3256
|
+
const source = unions.get(t.unionId);
|
|
3257
|
+
return !!source && unionWideningTags(source.arms, resultUnion.arms) !== null;
|
|
3258
|
+
})());
|
|
4510
3259
|
def.arms.forEach((arm, i) => {
|
|
4511
3260
|
if (arm.kind === "undefinedT" || arm.kind === "nullT") {
|
|
4512
3261
|
if (!resultUnion?.arms.some((a) => a.kind === "undefinedT")) {
|
|
@@ -4675,6 +3424,13 @@ function validateFunction(fn, functions, ffiByName, classes, records, recordVali
|
|
|
4675
3424
|
err(`${e.name} must be void`, e.loc);
|
|
4676
3425
|
}
|
|
4677
3426
|
function checkLibCall(e) {
|
|
3427
|
+
if (e.fn === "atomics.op" &&
|
|
3428
|
+
(e.args[0]?.type.kind !== "bytes" ||
|
|
3429
|
+
!["u8", "i8", "u16", "i16", "u32", "i32"].includes(e.args[0].type.elem))) {
|
|
3430
|
+
errors.push({ message: "integer Atomics require an integer typed array", loc: e.loc });
|
|
3431
|
+
}
|
|
3432
|
+
if (e.fn === "worker.new" && !workers)
|
|
3433
|
+
errors.push({ message: "Worker construction requires worker execution mode", loc: e.loc });
|
|
4678
3434
|
const sig = LIB_FN_SIGS[e.fn];
|
|
4679
3435
|
if (!sig) {
|
|
4680
3436
|
err(`libCall of unknown library function "${e.fn}"`, e.loc);
|
|
@@ -4684,25 +3440,32 @@ function validateFunction(fn, functions, ffiByName, classes, records, recordVali
|
|
|
4684
3440
|
// The stream constructors (trailing option callbacks), write/end
|
|
4685
3441
|
// (the optional chunk/cb tail), and unpipe (the optional
|
|
4686
3442
|
// destination) admit a longer list the same way.
|
|
4687
|
-
const variadic = e.fn === "emitter.emit" ||
|
|
4688
|
-
e.fn === "
|
|
4689
|
-
e.fn === "
|
|
3443
|
+
const variadic = e.fn === "emitter.emit" ||
|
|
3444
|
+
e.fn === "emitter.emitFlex" ||
|
|
3445
|
+
e.fn === "readable.new" ||
|
|
3446
|
+
e.fn === "writable.new" ||
|
|
3447
|
+
e.fn === "duplex.new" ||
|
|
3448
|
+
e.fn === "transform.new" ||
|
|
4690
3449
|
e.fn === "passthrough.new" ||
|
|
4691
|
-
e.fn === "readable.init" ||
|
|
4692
|
-
e.fn === "
|
|
3450
|
+
e.fn === "readable.init" ||
|
|
3451
|
+
e.fn === "writable.init" ||
|
|
3452
|
+
e.fn === "duplex.init" ||
|
|
3453
|
+
e.fn === "transform.init" ||
|
|
4693
3454
|
e.fn === "passthrough.init" ||
|
|
4694
|
-
e.fn === "readable.initDyn" ||
|
|
4695
|
-
e.fn === "
|
|
3455
|
+
e.fn === "readable.initDyn" ||
|
|
3456
|
+
e.fn === "writable.initDyn" ||
|
|
3457
|
+
e.fn === "duplex.initDyn" ||
|
|
3458
|
+
e.fn === "transform.initDyn" ||
|
|
4696
3459
|
e.fn === "passthrough.initDyn" ||
|
|
4697
|
-
e.fn === "stream.pipeline" ||
|
|
3460
|
+
e.fn === "stream.pipeline" ||
|
|
3461
|
+
e.fn === "stream.pipelineDyn" ||
|
|
4698
3462
|
e.fn === "sp.pipeline" ||
|
|
4699
3463
|
e.fn === "writable.write" ||
|
|
4700
|
-
e.fn === "writable.writeStr" ||
|
|
3464
|
+
e.fn === "writable.writeStr" ||
|
|
3465
|
+
e.fn === "writable.writeU" ||
|
|
4701
3466
|
e.fn === "writable.end" ||
|
|
4702
3467
|
e.fn === "readable.unpipe";
|
|
4703
|
-
if (variadic
|
|
4704
|
-
? e.args.length < sig.argTypes.length
|
|
4705
|
-
: e.args.length !== sig.argTypes.length) {
|
|
3468
|
+
if (variadic ? e.args.length < sig.argTypes.length : e.args.length !== sig.argTypes.length) {
|
|
4706
3469
|
err(`libCall ${e.fn}: ${e.args.length} args, expected ${sig.argTypes.length}`, e.loc);
|
|
4707
3470
|
}
|
|
4708
3471
|
e.args.forEach((a, i) => {
|
|
@@ -4725,7 +3488,12 @@ function validateFunction(fn, functions, ffiByName, classes, records, recordVali
|
|
|
4725
3488
|
return;
|
|
4726
3489
|
if (checkLibEmitterCall(e, sig.result))
|
|
4727
3490
|
return;
|
|
4728
|
-
if (e.fn === "error.stack" ||
|
|
3491
|
+
if (e.fn === "error.stack" ||
|
|
3492
|
+
e.fn === "error.cause" ||
|
|
3493
|
+
e.fn === "error.hasCause" ||
|
|
3494
|
+
e.fn === "error.setCause" ||
|
|
3495
|
+
e.fn === "error.defineCause" ||
|
|
3496
|
+
e.fn === "error.deleteCause") {
|
|
4729
3497
|
const recv = e.args[0];
|
|
4730
3498
|
let cls = recv?.type.kind === "object" ? classes.get(recv.type.className) : undefined;
|
|
4731
3499
|
while (cls?.base)
|
|
@@ -4748,7 +3516,11 @@ function validateFunction(fn, functions, ffiByName, classes, records, recordVali
|
|
|
4748
3516
|
}
|
|
4749
3517
|
}
|
|
4750
3518
|
function checkLibValueCall(e) {
|
|
4751
|
-
if (e.fn === "fileHandle.read" ||
|
|
3519
|
+
if (e.fn === "fileHandle.read" ||
|
|
3520
|
+
e.fn === "fileHandle.writeBytes" ||
|
|
3521
|
+
e.fn === "fileHandle.writeStr" ||
|
|
3522
|
+
e.fn === "fileHandle.readv" ||
|
|
3523
|
+
e.fn === "fileHandle.writev") {
|
|
4752
3524
|
const inner = e.type.kind === "promise" ? e.type.inner : undefined;
|
|
4753
3525
|
const shape = inner?.kind === "record" ? records.get(inner.shapeId) : undefined;
|
|
4754
3526
|
const countName = e.fn === "fileHandle.read" || e.fn === "fileHandle.readv" ? "bytesRead" : "bytesWritten";
|
|
@@ -4756,8 +3528,13 @@ function validateFunction(fn, functions, ffiByName, classes, records, recordVali
|
|
|
4756
3528
|
const payload = e.args[1]?.type;
|
|
4757
3529
|
const count = shape ? recordValidation.get(shape.id)?.fields.get(countName) : undefined;
|
|
4758
3530
|
const buffer = shape ? recordValidation.get(shape.id)?.fields.get(payloadName) : undefined;
|
|
4759
|
-
const ok = shape !== undefined &&
|
|
4760
|
-
|
|
3531
|
+
const ok = shape !== undefined &&
|
|
3532
|
+
!shape.tuple &&
|
|
3533
|
+
shape.indexValue === undefined &&
|
|
3534
|
+
shape.fields.length === 2 &&
|
|
3535
|
+
count?.kind === "f64" &&
|
|
3536
|
+
payload !== undefined &&
|
|
3537
|
+
buffer !== undefined &&
|
|
4761
3538
|
typeEquals(buffer, payload);
|
|
4762
3539
|
if (!ok) {
|
|
4763
3540
|
err(`libCall ${e.fn} must return a promise of { ${countName}: number, ${payloadName} }`, e.loc);
|
|
@@ -4787,8 +3564,7 @@ function validateFunction(fn, functions, ffiByName, classes, records, recordVali
|
|
|
4787
3564
|
const inner = e.type.kind === "promise" ? e.type.inner : null;
|
|
4788
3565
|
const union = inner?.kind === "union" ? unions.get(inner.unionId) : undefined;
|
|
4789
3566
|
if (inner === null ||
|
|
4790
|
-
(!typeEquals(inner, valueType) &&
|
|
4791
|
-
!union?.arms.some((arm) => typeEquals(arm, valueType)))) {
|
|
3567
|
+
(!typeEquals(inner, valueType) && !union?.arms.some((arm) => typeEquals(arm, valueType)))) {
|
|
4792
3568
|
err(`libCall ${e.fn} must return a promise whose value includes ${valueType.kind}`, e.loc);
|
|
4793
3569
|
}
|
|
4794
3570
|
return true;
|
|
@@ -4864,7 +3640,8 @@ function validateFunction(fn, functions, ffiByName, classes, records, recordVali
|
|
|
4864
3640
|
}
|
|
4865
3641
|
if (e.fn === "http2.serverOnSessionError") {
|
|
4866
3642
|
const cbT = e.args[1]?.type;
|
|
4867
|
-
const ok = cbT?.kind === "func" &&
|
|
3643
|
+
const ok = cbT?.kind === "func" &&
|
|
3644
|
+
cbT.ret.kind === "void" &&
|
|
4868
3645
|
cbT.params.length <= 2 &&
|
|
4869
3646
|
(cbT.params[0] === undefined ||
|
|
4870
3647
|
(cbT.params[0].kind === "object" && cbT.params[0].className === "%Error")) &&
|
|
@@ -4937,16 +3714,24 @@ function validateFunction(fn, functions, ffiByName, classes, records, recordVali
|
|
|
4937
3714
|
}
|
|
4938
3715
|
return true;
|
|
4939
3716
|
}
|
|
4940
|
-
if (e.fn === "http.requestCb" ||
|
|
4941
|
-
e.fn === "
|
|
4942
|
-
e.fn === "http.
|
|
3717
|
+
if (e.fn === "http.requestCb" ||
|
|
3718
|
+
e.fn === "https.requestCb" ||
|
|
3719
|
+
e.fn === "http.requestUrlCb" ||
|
|
3720
|
+
e.fn === "http.clientOnResponse" ||
|
|
3721
|
+
e.fn === "http.requestAgentCb" ||
|
|
3722
|
+
e.fn === "https.requestAgentCb" ||
|
|
4943
3723
|
e.fn === "https.requestUrlCb") {
|
|
4944
3724
|
// The response listener: void, no params or exactly (res: httpReq).
|
|
4945
|
-
const cbT = e.args[e.fn === "http.requestCb"
|
|
4946
|
-
|
|
4947
|
-
|
|
4948
|
-
|
|
4949
|
-
|
|
3725
|
+
const cbT = e.args[e.fn === "http.requestCb"
|
|
3726
|
+
? 7
|
|
3727
|
+
: e.fn === "https.requestCb"
|
|
3728
|
+
? 9
|
|
3729
|
+
: e.fn === "http.requestUrlCb" || e.fn === "https.requestUrlCb"
|
|
3730
|
+
? 3
|
|
3731
|
+
: e.fn === "http.requestAgentCb"
|
|
3732
|
+
? 8
|
|
3733
|
+
: e.fn === "https.requestAgentCb"
|
|
3734
|
+
? 10
|
|
4950
3735
|
: 1]?.type;
|
|
4951
3736
|
let ok = cbT?.kind === "func" && cbT.ret.kind === "void" && cbT.params.length <= 1;
|
|
4952
3737
|
if (ok && cbT?.kind === "func" && cbT.params.length === 1) {
|
|
@@ -4982,7 +3767,8 @@ function validateFunction(fn, functions, ffiByName, classes, records, recordVali
|
|
|
4982
3767
|
}
|
|
4983
3768
|
return true;
|
|
4984
3769
|
}
|
|
4985
|
-
if (e.fn === "http.serverOnUpgrade" ||
|
|
3770
|
+
if (e.fn === "http.serverOnUpgrade" ||
|
|
3771
|
+
e.fn === "http.clientOnUpgrade" ||
|
|
4986
3772
|
e.fn === "http.serverOnConnect") {
|
|
4987
3773
|
// (req, socket, head) or any shorter prefix, void return. The
|
|
4988
3774
|
// 'connect' registration additionally admits a socket slot
|
|
@@ -5019,8 +3805,11 @@ function validateFunction(fn, functions, ffiByName, classes, records, recordVali
|
|
|
5019
3805
|
let ok = funcOk(t);
|
|
5020
3806
|
if (!ok && t?.kind === "union") {
|
|
5021
3807
|
const def = unions.get(t.unionId);
|
|
5022
|
-
ok =
|
|
5023
|
-
def
|
|
3808
|
+
ok =
|
|
3809
|
+
!!def &&
|
|
3810
|
+
def.arms.length === 2 &&
|
|
3811
|
+
def.arms.some((a) => funcOk(a)) &&
|
|
3812
|
+
def.arms.some((a) => a.kind === "undefinedT");
|
|
5024
3813
|
}
|
|
5025
3814
|
if (!ok) {
|
|
5026
3815
|
err(`libCall ${e.fn} callback shape (frontend must fence)`, e.loc);
|
|
@@ -5033,13 +3822,20 @@ function validateFunction(fn, functions, ffiByName, classes, records, recordVali
|
|
|
5033
3822
|
// void — the emitter synthesizes the answer thunk from these
|
|
5034
3823
|
// types, so the structure must hold.
|
|
5035
3824
|
const t = e.args[2]?.type;
|
|
5036
|
-
let ok = t?.kind === "func" &&
|
|
5037
|
-
t.
|
|
3825
|
+
let ok = t?.kind === "func" &&
|
|
3826
|
+
t.ret.kind === "void" &&
|
|
3827
|
+
t.params.length === 3 &&
|
|
3828
|
+
t.params[0].kind === "string" &&
|
|
3829
|
+
t.params[1].kind === "dyn";
|
|
5038
3830
|
if (ok && t?.kind === "func") {
|
|
5039
3831
|
const cbT = t.params[2];
|
|
5040
|
-
ok =
|
|
5041
|
-
cbT.
|
|
5042
|
-
|
|
3832
|
+
ok =
|
|
3833
|
+
cbT.kind === "func" &&
|
|
3834
|
+
cbT.ret.kind === "void" &&
|
|
3835
|
+
cbT.params.length === 2 &&
|
|
3836
|
+
cbT.params[0].kind === "union" &&
|
|
3837
|
+
cbT.params[1].kind === "array" &&
|
|
3838
|
+
cbT.params[1].elem.kind === "record";
|
|
5043
3839
|
}
|
|
5044
3840
|
if (!ok) {
|
|
5045
3841
|
err(`libCall net.connectLookup resolver shape (frontend must fence)`, e.loc);
|
|
@@ -5054,7 +3850,9 @@ function validateFunction(fn, functions, ffiByName, classes, records, recordVali
|
|
|
5054
3850
|
}
|
|
5055
3851
|
if (e.fn === "http.requestConnCb") {
|
|
5056
3852
|
const cbT = e.args[6]?.type;
|
|
5057
|
-
const ok = cbT?.kind === "func" &&
|
|
3853
|
+
const ok = cbT?.kind === "func" &&
|
|
3854
|
+
cbT.ret.kind === "void" &&
|
|
3855
|
+
cbT.params.length <= 1 &&
|
|
5058
3856
|
(cbT.params[0] === undefined || cbT.params[0].kind === "httpReq");
|
|
5059
3857
|
if (!ok)
|
|
5060
3858
|
err(`libCall ${e.fn} callback shape (frontend must fence)`, e.loc);
|
|
@@ -5075,7 +3873,8 @@ function validateFunction(fn, functions, ffiByName, classes, records, recordVali
|
|
|
5075
3873
|
}
|
|
5076
3874
|
if (e.fn === "http.resSocket") {
|
|
5077
3875
|
const def = e.type.kind === "union" ? unions.get(e.type.unionId) : undefined;
|
|
5078
|
-
const ok = def &&
|
|
3876
|
+
const ok = def &&
|
|
3877
|
+
def.arms.length === 2 &&
|
|
5079
3878
|
def.arms.some((a) => a.kind === "netSocket") &&
|
|
5080
3879
|
def.arms.some((a) => a.kind === "nullT");
|
|
5081
3880
|
if (!ok)
|
|
@@ -5084,14 +3883,18 @@ function validateFunction(fn, functions, ffiByName, classes, records, recordVali
|
|
|
5084
3883
|
}
|
|
5085
3884
|
if (e.fn === "http.reqH2Stream") {
|
|
5086
3885
|
const def = e.type.kind === "union" ? unions.get(e.type.unionId) : undefined;
|
|
5087
|
-
const ok = def &&
|
|
3886
|
+
const ok = def &&
|
|
3887
|
+
def.arms.length === 2 &&
|
|
5088
3888
|
def.arms.some((a) => a.kind === "http2Stream") &&
|
|
5089
3889
|
def.arms.some((a) => a.kind === "undefinedT");
|
|
5090
3890
|
if (!ok)
|
|
5091
3891
|
err(`libCall http.reqH2Stream must return the 'Http2Stream | undefined' union`, e.loc);
|
|
5092
3892
|
return true;
|
|
5093
3893
|
}
|
|
5094
|
-
if (e.fn === "http.reqHeader" ||
|
|
3894
|
+
if (e.fn === "http.reqHeader" ||
|
|
3895
|
+
e.fn === "http.reqTrailer" ||
|
|
3896
|
+
e.fn === "http.resGetHeader" ||
|
|
3897
|
+
e.fn === "http.clientGetHeader") {
|
|
5095
3898
|
// Result is the interned `string | undefined` union (envGet's).
|
|
5096
3899
|
const def = e.type.kind === "union" ? unions.get(e.type.unionId) : undefined;
|
|
5097
3900
|
const ok = def &&
|
|
@@ -5105,24 +3908,30 @@ function validateFunction(fn, functions, ffiByName, classes, records, recordVali
|
|
|
5105
3908
|
}
|
|
5106
3909
|
if (e.fn === "http.reqHeaderValues" || e.fn === "http.reqTrailerValues") {
|
|
5107
3910
|
const def = e.type.kind === "union" ? unions.get(e.type.unionId) : undefined;
|
|
5108
|
-
const ok = def &&
|
|
5109
|
-
def.arms
|
|
3911
|
+
const ok = def &&
|
|
3912
|
+
def.arms.length === 2 &&
|
|
3913
|
+
def.arms[0].kind === "array" &&
|
|
3914
|
+
def.arms[0].elem.kind === "string" &&
|
|
5110
3915
|
def.arms[1].kind === "undefinedT";
|
|
5111
3916
|
if (!ok)
|
|
5112
3917
|
err(`libCall ${e.fn} must return the 'string[] | undefined' union`, e.loc);
|
|
5113
3918
|
return true;
|
|
5114
3919
|
}
|
|
5115
|
-
if (e.fn === "net.createServerCb" ||
|
|
3920
|
+
if (e.fn === "net.createServerCb" ||
|
|
3921
|
+
e.fn === "net.serverOnConnection" ||
|
|
5116
3922
|
e.fn === "net.serverOnSecureConnection" ||
|
|
5117
|
-
e.fn === "http.serverSetTimeoutCb" ||
|
|
3923
|
+
e.fn === "http.serverSetTimeoutCb" ||
|
|
3924
|
+
e.fn === "http.serverOnTimeout" ||
|
|
5118
3925
|
e.fn === "http.clientOnSocket" ||
|
|
5119
|
-
e.fn === "net.sockOnData" ||
|
|
3926
|
+
e.fn === "net.sockOnData" ||
|
|
3927
|
+
e.fn === "net.serverOnError" ||
|
|
5120
3928
|
e.fn === "net.sockOnError") {
|
|
5121
3929
|
// The program-dependent listener shapes: a void closure with no
|
|
5122
3930
|
// params, or exactly the one supported parameter per event
|
|
5123
3931
|
// (socket handle / data chunk bytes / error %Error). The
|
|
5124
3932
|
// callback slot is arg 0 for createServerCb, arg 1 otherwise.
|
|
5125
|
-
const cbT = e.args[e.fn === "net.createServerCb" ? 0 : e.fn === "http.serverSetTimeoutCb" ? 2 : 1]
|
|
3933
|
+
const cbT = e.args[e.fn === "net.createServerCb" ? 0 : e.fn === "http.serverSetTimeoutCb" ? 2 : 1]
|
|
3934
|
+
?.type;
|
|
5126
3935
|
let ok = cbT?.kind === "func" && cbT.ret.kind === "void" && cbT.params.length <= 1;
|
|
5127
3936
|
if (ok && cbT?.kind === "func" && cbT.params.length === 1) {
|
|
5128
3937
|
const p = cbT.params[0];
|
|
@@ -5147,15 +3956,20 @@ function validateFunction(fn, functions, ffiByName, classes, records, recordVali
|
|
|
5147
3956
|
// (Error|null, SecureContext|undefined) whose arms the emitted
|
|
5148
3957
|
// answer thunk decodes; here the structural func shape is what
|
|
5149
3958
|
// the validator can pin.
|
|
5150
|
-
const sniOk = (t) => t?.kind === "func" &&
|
|
5151
|
-
t.
|
|
3959
|
+
const sniOk = (t) => t?.kind === "func" &&
|
|
3960
|
+
t.ret.kind === "void" &&
|
|
3961
|
+
t.params.length === 2 &&
|
|
3962
|
+
t.params[0].kind === "string" &&
|
|
3963
|
+
t.params[1].kind === "func";
|
|
5152
3964
|
const argT = e.args[2]?.type;
|
|
5153
3965
|
let ok = sniOk(argT);
|
|
5154
3966
|
if (!ok && argT?.kind === "union") {
|
|
5155
3967
|
const def = unions.get(argT.unionId);
|
|
5156
|
-
ok =
|
|
5157
|
-
def
|
|
5158
|
-
|
|
3968
|
+
ok =
|
|
3969
|
+
def !== undefined &&
|
|
3970
|
+
def.arms.length === 2 &&
|
|
3971
|
+
def.arms.some((a) => a.kind === "undefinedT") &&
|
|
3972
|
+
def.arms.some((a) => sniOk(a));
|
|
5159
3973
|
}
|
|
5160
3974
|
if (!ok) {
|
|
5161
3975
|
err(`libCall ${e.fn} SNI callback shape (frontend must fence)`, e.loc);
|
|
@@ -5215,20 +4029,26 @@ function validateFunction(fn, functions, ffiByName, classes, records, recordVali
|
|
|
5215
4029
|
return false;
|
|
5216
4030
|
}
|
|
5217
4031
|
function checkLibFileCall(e) {
|
|
5218
|
-
if (e.fn === "zlib.deflateCb" ||
|
|
5219
|
-
e.fn === "zlib.
|
|
5220
|
-
e.fn === "zlib.
|
|
4032
|
+
if (e.fn === "zlib.deflateCb" ||
|
|
4033
|
+
e.fn === "zlib.inflateCb" ||
|
|
4034
|
+
e.fn === "zlib.deflateRawCb" ||
|
|
4035
|
+
e.fn === "zlib.inflateRawCb" ||
|
|
4036
|
+
e.fn === "zlib.gzipCb" ||
|
|
4037
|
+
e.fn === "zlib.gunzipCb" ||
|
|
4038
|
+
e.fn === "zlib.unzipCb") {
|
|
5221
4039
|
const cbT = e.args[1]?.type;
|
|
5222
4040
|
let ok = cbT?.kind === "func" && cbT.ret.kind === "void" && cbT.params.length <= 2;
|
|
5223
4041
|
if (ok && cbT?.kind === "func" && cbT.params.length >= 1) {
|
|
5224
4042
|
const error = cbT.params[0];
|
|
5225
4043
|
if (error.kind !== "dyn") {
|
|
5226
4044
|
const def = error.kind === "union" ? unions.get(error.unionId) : undefined;
|
|
5227
|
-
ok =
|
|
5228
|
-
def
|
|
5229
|
-
|
|
5230
|
-
|
|
5231
|
-
(arm
|
|
4045
|
+
ok =
|
|
4046
|
+
def !== undefined &&
|
|
4047
|
+
def.arms.some((arm) => arm.kind === "nullT") &&
|
|
4048
|
+
def.arms.some((arm) => arm.kind === "object" && arm.className === "%Error") &&
|
|
4049
|
+
def.arms.every((arm) => arm.kind === "nullT" ||
|
|
4050
|
+
arm.kind === "undefinedT" ||
|
|
4051
|
+
(arm.kind === "object" && arm.className === "%Error"));
|
|
5232
4052
|
}
|
|
5233
4053
|
}
|
|
5234
4054
|
if (ok && cbT?.kind === "func" && cbT.params.length === 2) {
|
|
@@ -5258,7 +4078,8 @@ function validateFunction(fn, functions, ffiByName, classes, records, recordVali
|
|
|
5258
4078
|
def !== undefined &&
|
|
5259
4079
|
def.arms.some((a) => a.kind === "nullT") &&
|
|
5260
4080
|
def.arms.some((a) => a.kind === "object" && a.className === "%Error") &&
|
|
5261
|
-
def.arms.every((a) => a.kind === "nullT" ||
|
|
4081
|
+
def.arms.every((a) => a.kind === "nullT" ||
|
|
4082
|
+
a.kind === "undefinedT" ||
|
|
5262
4083
|
(a.kind === "object" && a.className === "%Error"));
|
|
5263
4084
|
}
|
|
5264
4085
|
}
|
|
@@ -5273,9 +4094,12 @@ function validateFunction(fn, functions, ffiByName, classes, records, recordVali
|
|
|
5273
4094
|
const shape = e.type.kind === "record" ? records.get(e.type.shapeId) : undefined;
|
|
5274
4095
|
const ok = shape !== undefined &&
|
|
5275
4096
|
shape.fields.length === 3 &&
|
|
5276
|
-
shape.fields[0].name === "address" &&
|
|
5277
|
-
shape.fields[
|
|
5278
|
-
shape.fields[
|
|
4097
|
+
shape.fields[0].name === "address" &&
|
|
4098
|
+
shape.fields[0].type.kind === "string" &&
|
|
4099
|
+
shape.fields[1].name === "family" &&
|
|
4100
|
+
shape.fields[1].type.kind === "string" &&
|
|
4101
|
+
shape.fields[2].name === "port" &&
|
|
4102
|
+
shape.fields[2].type.kind === "f64";
|
|
5279
4103
|
if (!ok) {
|
|
5280
4104
|
err(`libCall net.serverAddress must return the {address, family, port} record`, e.loc);
|
|
5281
4105
|
}
|
|
@@ -5286,9 +4110,12 @@ function validateFunction(fn, functions, ffiByName, classes, records, recordVali
|
|
|
5286
4110
|
const shape = e.type.kind === "record" ? records.get(e.type.shapeId) : undefined;
|
|
5287
4111
|
const ok = shape !== undefined &&
|
|
5288
4112
|
shape.fields.length === 3 &&
|
|
5289
|
-
shape.fields[0].name === "address" &&
|
|
5290
|
-
shape.fields[
|
|
5291
|
-
shape.fields[
|
|
4113
|
+
shape.fields[0].name === "address" &&
|
|
4114
|
+
shape.fields[0].type.kind === "string" &&
|
|
4115
|
+
shape.fields[1].name === "family" &&
|
|
4116
|
+
shape.fields[1].type.kind === "string" &&
|
|
4117
|
+
shape.fields[2].name === "port" &&
|
|
4118
|
+
shape.fields[2].type.kind === "f64";
|
|
5292
4119
|
if (!ok) {
|
|
5293
4120
|
err(`libCall dgram.address must return the {address, family, port} record`, e.loc);
|
|
5294
4121
|
}
|
|
@@ -5299,7 +4126,9 @@ function validateFunction(fn, functions, ffiByName, classes, records, recordVali
|
|
|
5299
4126
|
// name: string, parentPath: string} rows (canonical field
|
|
5300
4127
|
// order; the structure lowerFsReaddirTypesCall pinned).
|
|
5301
4128
|
const result = e.fn === "fsp.readdirTypes"
|
|
5302
|
-
? e.type.kind === "promise"
|
|
4129
|
+
? e.type.kind === "promise"
|
|
4130
|
+
? e.type.inner
|
|
4131
|
+
: undefined
|
|
5303
4132
|
: e.type;
|
|
5304
4133
|
const shape = result?.kind === "array" && result.elem.kind === "record"
|
|
5305
4134
|
? records.get(result.elem.shapeId)
|
|
@@ -5308,9 +4137,12 @@ function validateFunction(fn, functions, ffiByName, classes, records, recordVali
|
|
|
5308
4137
|
!shape.tuple &&
|
|
5309
4138
|
shape.indexValue === undefined &&
|
|
5310
4139
|
shape.fields.length === 3 &&
|
|
5311
|
-
shape.fields[0].name === "%dtype" &&
|
|
5312
|
-
shape.fields[
|
|
5313
|
-
shape.fields[
|
|
4140
|
+
shape.fields[0].name === "%dtype" &&
|
|
4141
|
+
shape.fields[0].type.kind === "f64" &&
|
|
4142
|
+
shape.fields[1].name === "name" &&
|
|
4143
|
+
shape.fields[1].type.kind === "string" &&
|
|
4144
|
+
shape.fields[2].name === "parentPath" &&
|
|
4145
|
+
shape.fields[2].type.kind === "string";
|
|
5314
4146
|
if (!ok) {
|
|
5315
4147
|
err(`libCall ${e.fn} must return ${e.fn === "fsp.readdirTypes" ? "a promise of " : ""}the Dirent record array`, e.loc);
|
|
5316
4148
|
}
|
|
@@ -5322,12 +4154,28 @@ function validateFunction(fn, functions, ffiByName, classes, records, recordVali
|
|
|
5322
4154
|
// scopeid f64, the other's `number | undefined`) — the structure
|
|
5323
4155
|
// lowerOsNetworkInterfacesCall pinned.
|
|
5324
4156
|
const shape = e.type.kind === "record" ? records.get(e.type.shapeId) : undefined;
|
|
5325
|
-
let ok = shape !== undefined &&
|
|
5326
|
-
|
|
4157
|
+
let ok = shape !== undefined &&
|
|
4158
|
+
!shape.tuple &&
|
|
4159
|
+
shape.fields.length === 0 &&
|
|
4160
|
+
shape.indexValue !== undefined;
|
|
4161
|
+
const ivDef = ok && shape.indexValue.kind === "union"
|
|
4162
|
+
? unions.get(shape.indexValue.unionId)
|
|
4163
|
+
: undefined;
|
|
5327
4164
|
const arrArm = ivDef?.arms.find((a) => a.kind === "array");
|
|
5328
|
-
ok =
|
|
5329
|
-
|
|
5330
|
-
|
|
4165
|
+
ok =
|
|
4166
|
+
ok &&
|
|
4167
|
+
ivDef !== undefined &&
|
|
4168
|
+
ivDef.arms.length === 2 &&
|
|
4169
|
+
arrArm !== undefined &&
|
|
4170
|
+
ivDef.arms.some((a) => a.kind === "undefinedT");
|
|
4171
|
+
const infoDef = ok && arrArm.kind === "array" && arrArm.elem.kind === "union"
|
|
4172
|
+
? unions.get(arrArm.elem.unionId)
|
|
4173
|
+
: undefined;
|
|
4174
|
+
ok =
|
|
4175
|
+
ok &&
|
|
4176
|
+
infoDef !== undefined &&
|
|
4177
|
+
infoDef.arms.length === 2 &&
|
|
4178
|
+
infoDef.arms.every((a) => a.kind === "record");
|
|
5331
4179
|
if (!ok) {
|
|
5332
4180
|
err(`libCall os.networkInterfaces must return the NetworkInterfaceInfo dictionary record`, e.loc);
|
|
5333
4181
|
}
|
|
@@ -5341,12 +4189,22 @@ function validateFunction(fn, functions, ffiByName, classes, records, recordVali
|
|
|
5341
4189
|
// number arm, type-level only) — the structure
|
|
5342
4190
|
// lowerQuerystringParseCall pinned.
|
|
5343
4191
|
const shape = e.type.kind === "record" ? records.get(e.type.shapeId) : undefined;
|
|
5344
|
-
let ok = shape !== undefined &&
|
|
5345
|
-
|
|
5346
|
-
|
|
5347
|
-
|
|
5348
|
-
|
|
5349
|
-
|
|
4192
|
+
let ok = shape !== undefined &&
|
|
4193
|
+
!shape.tuple &&
|
|
4194
|
+
shape.fields.length === 0 &&
|
|
4195
|
+
shape.indexValue !== undefined;
|
|
4196
|
+
const ivDef = ok && shape.indexValue.kind === "union"
|
|
4197
|
+
? unions.get(shape.indexValue.unionId)
|
|
4198
|
+
: undefined;
|
|
4199
|
+
ok =
|
|
4200
|
+
ok &&
|
|
4201
|
+
ivDef !== undefined &&
|
|
4202
|
+
ivDef.arms.some((a) => a.kind === "string") &&
|
|
4203
|
+
ivDef.arms.some((a) => a.kind === "array" && a.elem.kind === "string") &&
|
|
4204
|
+
ivDef.arms.every((a) => a.kind === "string" ||
|
|
4205
|
+
a.kind === "array" ||
|
|
4206
|
+
a.kind === "undefinedT" ||
|
|
4207
|
+
a.kind === "f64");
|
|
5350
4208
|
if (!ok) {
|
|
5351
4209
|
err(`libCall qs.parse must return the ParsedUrlQuery dictionary record`, e.loc);
|
|
5352
4210
|
}
|
|
@@ -5357,14 +4215,18 @@ function validateFunction(fn, functions, ffiByName, classes, records, recordVali
|
|
|
5357
4215
|
function checkLibProcessCall(e) {
|
|
5358
4216
|
if (e.fn === "cp.execFile") {
|
|
5359
4217
|
const cb = e.args[2]?.type;
|
|
5360
|
-
if (cb?.kind !== "func" ||
|
|
4218
|
+
if (cb?.kind !== "func" ||
|
|
4219
|
+
cb.rest === true ||
|
|
4220
|
+
cb.params.length > 3 ||
|
|
4221
|
+
cb.ret.kind !== "void") {
|
|
5361
4222
|
err(`libCall cp.execFile callback must be a non-rest void function with at most three parameters`, e.loc);
|
|
5362
4223
|
}
|
|
5363
4224
|
else {
|
|
5364
4225
|
const error = cb.params[0];
|
|
5365
4226
|
if (error !== undefined) {
|
|
5366
4227
|
const def = error.kind === "union" ? unions.get(error.unionId) : undefined;
|
|
5367
|
-
if (!def ||
|
|
4228
|
+
if (!def ||
|
|
4229
|
+
def.arms.length !== 2 ||
|
|
5368
4230
|
!def.arms.some((arm) => arm.kind === "nullT") ||
|
|
5369
4231
|
!def.arms.some((arm) => arm.kind === "object" && arm.className === "%Error")) {
|
|
5370
4232
|
err(`libCall cp.execFile callback error parameter must be Error | null`, e.loc);
|
|
@@ -5382,7 +4244,10 @@ function validateFunction(fn, functions, ffiByName, classes, records, recordVali
|
|
|
5382
4244
|
}
|
|
5383
4245
|
if (e.fn === "child.onSpawn") {
|
|
5384
4246
|
const cb = e.args[1];
|
|
5385
|
-
if (!cb ||
|
|
4247
|
+
if (!cb ||
|
|
4248
|
+
cb.type.kind !== "func" ||
|
|
4249
|
+
cb.type.params.length !== 0 ||
|
|
4250
|
+
cb.type.ret.kind !== "void")
|
|
5386
4251
|
err("child.onSpawn callback must be () => void", e.loc);
|
|
5387
4252
|
}
|
|
5388
4253
|
if (e.fn === "child.onExit" || e.fn === "child.onClose" || e.fn === "child.onError") {
|
|
@@ -5434,8 +4299,10 @@ function validateFunction(fn, functions, ffiByName, classes, records, recordVali
|
|
|
5434
4299
|
err(`libCall ${e.fn} callback shape (frontend must fence)`, e.loc);
|
|
5435
4300
|
return true;
|
|
5436
4301
|
}
|
|
5437
|
-
if (e.fn === "process.onExit" ||
|
|
5438
|
-
e.fn === "
|
|
4302
|
+
if (e.fn === "process.onExit" ||
|
|
4303
|
+
e.fn === "process.offExit" ||
|
|
4304
|
+
e.fn === "stdin.onData" ||
|
|
4305
|
+
e.fn === "stdin.onError") {
|
|
5439
4306
|
// The listener: a void closure with no params, or exactly the
|
|
5440
4307
|
// one supported parameter shape per event (code number / data
|
|
5441
4308
|
// chunk bytes / error %Error).
|
|
@@ -5544,7 +4411,8 @@ function validateFunction(fn, functions, ffiByName, classes, records, recordVali
|
|
|
5544
4411
|
const t = e.type;
|
|
5545
4412
|
const cbU = t.kind === "func" && t.params.length === 1 ? t.params[0] : null;
|
|
5546
4413
|
const def = cbU?.kind === "union" ? unions.get(cbU.unionId) : undefined;
|
|
5547
|
-
const ok = t.kind === "func" &&
|
|
4414
|
+
const ok = t.kind === "func" &&
|
|
4415
|
+
(t.ret.kind === "netServer" || t.ret.kind === "void") &&
|
|
5548
4416
|
def &&
|
|
5549
4417
|
def.arms.some((a) => a.kind === "func" && a.params.length <= 1 && a.ret.kind === "void") &&
|
|
5550
4418
|
def.arms.some((a) => a.kind === "undefinedT");
|
|
@@ -5581,10 +4449,17 @@ function validateFunction(fn, functions, ffiByName, classes, records, recordVali
|
|
|
5581
4449
|
// of the undefined global mapped to (never materialized).
|
|
5582
4450
|
return true;
|
|
5583
4451
|
}
|
|
5584
|
-
if (e.fn === "error.nodeThrow" ||
|
|
5585
|
-
e.fn === "
|
|
5586
|
-
e.fn === "
|
|
5587
|
-
e.fn === "fs.
|
|
4452
|
+
if (e.fn === "error.nodeThrow" ||
|
|
4453
|
+
e.fn === "error.argTypeThrow" ||
|
|
4454
|
+
e.fn === "error.propTypeThrow" ||
|
|
4455
|
+
e.fn === "fs.mkdtempChk" ||
|
|
4456
|
+
e.fn === "fs.readFileChk" ||
|
|
4457
|
+
e.fn === "fs.opendirChk" ||
|
|
4458
|
+
e.fn === "fs.watchFileChk" ||
|
|
4459
|
+
e.fn === "fs.lchmodChk" ||
|
|
4460
|
+
e.fn === "fs.readChk" ||
|
|
4461
|
+
e.fn === "fs.streamOptsChk" ||
|
|
4462
|
+
e.fn === "net.connectOptsChk" ||
|
|
5588
4463
|
e.fn === "tls.caCertsChk") {
|
|
5589
4464
|
// Always throws — the result type is the replaced expression's
|
|
5590
4465
|
// own (never materialized; the global.undefRead pattern). The
|
|
@@ -5606,7 +4481,10 @@ function validateFunction(fn, functions, ffiByName, classes, records, recordVali
|
|
|
5606
4481
|
}
|
|
5607
4482
|
return true;
|
|
5608
4483
|
}
|
|
5609
|
-
if (e.fn === "error.domCode" ||
|
|
4484
|
+
if (e.fn === "error.domCode" ||
|
|
4485
|
+
e.fn === "error.domHasCause" ||
|
|
4486
|
+
e.fn === "error.domCause" ||
|
|
4487
|
+
e.fn === "error.domClone") {
|
|
5610
4488
|
// Receiver: exactly %DOMException (subclassing is fenced — the
|
|
5611
4489
|
// hidden runtime slots admit no other layout).
|
|
5612
4490
|
const recv = e.args[0];
|
|
@@ -5664,12 +4542,19 @@ function validateFunction(fn, functions, ffiByName, classes, records, recordVali
|
|
|
5664
4542
|
return false;
|
|
5665
4543
|
}
|
|
5666
4544
|
function checkLibStreamCall(e, fixedArgs, result) {
|
|
5667
|
-
if (e.fn.startsWith("readable.") ||
|
|
5668
|
-
e.fn.startsWith("
|
|
5669
|
-
e.fn.startsWith("
|
|
5670
|
-
e.fn
|
|
5671
|
-
e.fn
|
|
5672
|
-
e.fn === "stream.
|
|
4545
|
+
if (e.fn.startsWith("readable.") ||
|
|
4546
|
+
e.fn.startsWith("writable.") ||
|
|
4547
|
+
e.fn.startsWith("duplex.") ||
|
|
4548
|
+
e.fn.startsWith("transform.") ||
|
|
4549
|
+
e.fn.startsWith("passthrough.") ||
|
|
4550
|
+
e.fn === "stream.destroy" ||
|
|
4551
|
+
e.fn === "stream.destroyErr" ||
|
|
4552
|
+
e.fn === "stream.iteratorClose" ||
|
|
4553
|
+
e.fn === "stream.prop" ||
|
|
4554
|
+
e.fn === "stream.errored" ||
|
|
4555
|
+
e.fn === "stream.finished" ||
|
|
4556
|
+
e.fn === "stream.finishedDyn" ||
|
|
4557
|
+
e.fn === "stream.pipeline" ||
|
|
5673
4558
|
e.fn === "stream.pipelineDyn") {
|
|
5674
4559
|
// Receiver/result: stream-hierarchy objects (a class whose base
|
|
5675
4560
|
// chain reaches a runtime stream class). Constructors have no
|
|
@@ -5772,10 +4657,14 @@ function validateFunction(fn, functions, ffiByName, classes, records, recordVali
|
|
|
5772
4657
|
}
|
|
5773
4658
|
return true;
|
|
5774
4659
|
}
|
|
5775
|
-
if (e.fn === "readable.pause" ||
|
|
5776
|
-
e.fn === "readable.
|
|
5777
|
-
e.fn === "readable.
|
|
5778
|
-
e.fn === "
|
|
4660
|
+
if (e.fn === "readable.pause" ||
|
|
4661
|
+
e.fn === "readable.resume" ||
|
|
4662
|
+
e.fn === "readable.unpipe" ||
|
|
4663
|
+
e.fn === "writable.end" ||
|
|
4664
|
+
e.fn === "readable.setEncoding" ||
|
|
4665
|
+
e.fn === "readable.pushEncoding" ||
|
|
4666
|
+
e.fn === "stream.destroy" ||
|
|
4667
|
+
e.fn === "stream.destroyErr" ||
|
|
5779
4668
|
e.fn === "stream.iteratorClose") {
|
|
5780
4669
|
if (!typeEquals(e.type, e.args[0].type)) {
|
|
5781
4670
|
err(`libCall ${e.fn} must return its receiver's type (the chaining 'this')`, e.loc);
|
|
@@ -5790,11 +4679,15 @@ function validateFunction(fn, functions, ffiByName, classes, records, recordVali
|
|
|
5790
4679
|
}
|
|
5791
4680
|
if (e.fn === "readable.read" || e.fn === "readable.flowing" || e.fn === "stream.errored") {
|
|
5792
4681
|
const def = e.type.kind === "union" ? unions.get(e.type.unionId) : undefined;
|
|
5793
|
-
const wantArm = (t) => e.fn === "readable.read"
|
|
5794
|
-
|
|
5795
|
-
|
|
5796
|
-
|
|
5797
|
-
|
|
4682
|
+
const wantArm = (t) => e.fn === "readable.read"
|
|
4683
|
+
? t.kind === "bytes"
|
|
4684
|
+
: e.fn === "readable.flowing"
|
|
4685
|
+
? t.kind === "bool"
|
|
4686
|
+
: t.kind === "object";
|
|
4687
|
+
const ok = def &&
|
|
4688
|
+
def.arms.length === 2 &&
|
|
4689
|
+
def.arms.some(wantArm) &&
|
|
4690
|
+
def.arms.some((a) => a.kind === "nullT");
|
|
5798
4691
|
if (!ok)
|
|
5799
4692
|
err(`libCall ${e.fn} must return its nullable union`, e.loc);
|
|
5800
4693
|
return true;
|
|
@@ -5813,9 +4706,11 @@ function validateFunction(fn, functions, ffiByName, classes, records, recordVali
|
|
|
5813
4706
|
return false;
|
|
5814
4707
|
}
|
|
5815
4708
|
function checkLibEmitterCall(e, result) {
|
|
5816
|
-
if ((e.fn.startsWith("emitter.") || e.fn === "stream.onDyn") &&
|
|
4709
|
+
if ((e.fn.startsWith("emitter.") || e.fn === "stream.onDyn") &&
|
|
4710
|
+
e.fn !== "emitter.setDefaultMax" &&
|
|
5817
4711
|
e.fn !== "emitter.setDefaultMaxChk" &&
|
|
5818
|
-
e.fn !== "emitter.getDefaultMax" &&
|
|
4712
|
+
e.fn !== "emitter.getDefaultMax" &&
|
|
4713
|
+
e.fn !== "emitter.checkListener") {
|
|
5819
4714
|
// Receiver: an emitter-hierarchy object (the %EventEmitter class
|
|
5820
4715
|
// itself, or a class whose base chain reaches it). emitter.new
|
|
5821
4716
|
// has no receiver — its RESULT is the bare emitter class.
|
|
@@ -5841,20 +4736,28 @@ function validateFunction(fn, functions, ffiByName, classes, records, recordVali
|
|
|
5841
4736
|
return true;
|
|
5842
4737
|
}
|
|
5843
4738
|
// The chaining forms return the receiver's own static class.
|
|
5844
|
-
if (e.fn === "emitter.on" ||
|
|
5845
|
-
e.fn === "emitter.
|
|
5846
|
-
e.fn === "emitter.
|
|
5847
|
-
e.fn === "emitter.
|
|
4739
|
+
if (e.fn === "emitter.on" ||
|
|
4740
|
+
e.fn === "emitter.off" ||
|
|
4741
|
+
e.fn === "emitter.onDyn" ||
|
|
4742
|
+
e.fn === "emitter.onFlex" ||
|
|
4743
|
+
e.fn === "stream.onDyn" ||
|
|
4744
|
+
e.fn === "emitter.offDyn" ||
|
|
4745
|
+
e.fn === "emitter.onData" ||
|
|
4746
|
+
e.fn === "emitter.onDataDyn" ||
|
|
4747
|
+
e.fn === "emitter.removeAll" ||
|
|
4748
|
+
e.fn === "emitter.setMax" ||
|
|
5848
4749
|
e.fn === "emitter.setMaxChk") {
|
|
5849
4750
|
if (!typeEquals(e.type, e.args[0].type)) {
|
|
5850
4751
|
err(`libCall ${e.fn} must return its receiver's type (the chaining 'this')`, e.loc);
|
|
5851
4752
|
}
|
|
5852
4753
|
// The listener slots carry closures (the dyn family's checked-
|
|
5853
4754
|
// dynamic listener is table-checked; its adapter is a func).
|
|
5854
|
-
if ((e.fn === "emitter.on" || e.fn === "emitter.off" || e.fn === "emitter.onData") &&
|
|
4755
|
+
if ((e.fn === "emitter.on" || e.fn === "emitter.off" || e.fn === "emitter.onData") &&
|
|
4756
|
+
e.args[2]?.type.kind !== "func") {
|
|
5855
4757
|
err(`libCall ${e.fn} listener must be a func`, e.loc);
|
|
5856
4758
|
}
|
|
5857
|
-
if ((e.fn === "emitter.onDyn" || e.fn === "emitter.onDataDyn") &&
|
|
4759
|
+
if ((e.fn === "emitter.onDyn" || e.fn === "emitter.onDataDyn") &&
|
|
4760
|
+
e.args[3]?.type.kind !== "func") {
|
|
5858
4761
|
err(`libCall ${e.fn} adapter must be a func`, e.loc);
|
|
5859
4762
|
}
|
|
5860
4763
|
return true;
|
|
@@ -5894,9 +4797,14 @@ function validateFunction(fn, functions, ffiByName, classes, records, recordVali
|
|
|
5894
4797
|
err("libCall emitter.emitFlex payloads must be checked-dynamic", e.loc);
|
|
5895
4798
|
}
|
|
5896
4799
|
}
|
|
5897
|
-
if (e.fn === "emitter.emit" ||
|
|
5898
|
-
e.fn === "emitter.
|
|
5899
|
-
e.fn === "emitter.
|
|
4800
|
+
if (e.fn === "emitter.emit" ||
|
|
4801
|
+
e.fn === "emitter.emitFlex" ||
|
|
4802
|
+
e.fn === "emitter.count" ||
|
|
4803
|
+
e.fn === "emitter.getMax" ||
|
|
4804
|
+
e.fn === "emitter.ctor" ||
|
|
4805
|
+
e.fn === "emitter.countFn" ||
|
|
4806
|
+
e.fn === "emitter.countDyn" ||
|
|
4807
|
+
e.fn === "emitter.emitError") {
|
|
5900
4808
|
if (!typeEquals(e.type, result)) {
|
|
5901
4809
|
err(`libCall ${e.fn} must be ${result.kind}, got ${e.type.kind}`, e.loc);
|
|
5902
4810
|
}
|
|
@@ -5933,7 +4841,9 @@ function validateFunction(fn, functions, ffiByName, classes, records, recordVali
|
|
|
5933
4841
|
// reads), which matches exactly the undefined arm.
|
|
5934
4842
|
const jsonOk = (t) => isJsonSafeType(t, (id) => records.get(id), (id) => unions.get(id));
|
|
5935
4843
|
const undefArmedOk = e.type.kind === "union" &&
|
|
5936
|
-
(unions
|
|
4844
|
+
(unions
|
|
4845
|
+
.get(e.type.unionId)
|
|
4846
|
+
?.arms.every((a) => a.kind === "undefinedT" ||
|
|
5937
4847
|
jsonOk(a) ||
|
|
5938
4848
|
isDynTypedRefType(a) ||
|
|
5939
4849
|
DYN_HANDLE_KINDS.has(a.kind)) ??
|
|
@@ -5951,7 +4861,13 @@ function validateFunction(fn, functions, ffiByName, classes, records, recordVali
|
|
|
5951
4861
|
// Runtime HANDLE targets unwrap the checked-dynamic tree's handle kind by tag (a
|
|
5952
4862
|
// retained reference, no copy — DYN_HANDLE_KINDS).
|
|
5953
4863
|
const handleOk = DYN_HANDLE_KINDS.has(e.type.kind);
|
|
5954
|
-
if (!canDynCheckTo(e.type, (id) => records.get(id), (id) => unions.get(id)) &&
|
|
4864
|
+
if (!canDynCheckTo(e.type, (id) => records.get(id), (id) => unions.get(id)) &&
|
|
4865
|
+
!undefArmedOk &&
|
|
4866
|
+
!bytesOk &&
|
|
4867
|
+
!errorOk &&
|
|
4868
|
+
!classOk &&
|
|
4869
|
+
!funcOk &&
|
|
4870
|
+
!handleOk) {
|
|
5955
4871
|
err(`dynCheck against non-JSON-representable type ${e.type.kind}`, e.loc);
|
|
5956
4872
|
}
|
|
5957
4873
|
break;
|
|
@@ -5992,7 +4908,9 @@ function validateFunction(fn, functions, ffiByName, classes, records, recordVali
|
|
|
5992
4908
|
// The undefined next-channel has no C value form: such yields are
|
|
5993
4909
|
// void-typed (statement position only — the frontend fences reads).
|
|
5994
4910
|
if (e.captureCompletion) {
|
|
5995
|
-
if (fn.async ||
|
|
4911
|
+
if (fn.async ||
|
|
4912
|
+
e.type.kind !== "dyn" ||
|
|
4913
|
+
!typeEquals(e.captureCompletion.returnType, fn.returnType)) {
|
|
5996
4914
|
err("invalid captured generator completion", e.loc);
|
|
5997
4915
|
}
|
|
5998
4916
|
}
|
|
@@ -6161,7 +5079,8 @@ function validateFunction(fn, functions, ffiByName, classes, records, recordVali
|
|
|
6161
5079
|
if (resolve.kind !== "func" || resolve.ret.kind !== "void") {
|
|
6162
5080
|
err("promiseWithResolvers resolve must be a void-returning function", e.loc);
|
|
6163
5081
|
}
|
|
6164
|
-
else if (inner.kind === "void"
|
|
5082
|
+
else if (inner.kind === "void"
|
|
5083
|
+
? resolve.params.length !== 0
|
|
6165
5084
|
: resolve.params.length !== 1 || !typeEquals(resolve.params[0], inner)) {
|
|
6166
5085
|
err(`promiseWithResolvers resolve param must match the promise's inner type`, e.loc);
|
|
6167
5086
|
}
|
|
@@ -6215,26 +5134,64 @@ function validateFunction(fn, functions, ffiByName, classes, records, recordVali
|
|
|
6215
5134
|
if (e.type.kind !== jsOpResultKind(e.op)) {
|
|
6216
5135
|
err(`jsOp ${e.op} must be ${jsOpResultKind(e.op)}, got ${e.type.kind}`, e.loc);
|
|
6217
5136
|
}
|
|
6218
|
-
const named = e.op === "getProp" ||
|
|
5137
|
+
const named = e.op === "getProp" ||
|
|
5138
|
+
e.op === "setProp" ||
|
|
5139
|
+
e.op === "callMethod" ||
|
|
5140
|
+
e.op === "optCallMethod" ||
|
|
5141
|
+
e.op === "globalGet" ||
|
|
6219
5142
|
e.op === "callSpread"; // the spread expression's source spelling (V8's nullish text spells it)
|
|
6220
5143
|
if (named !== (e.name !== undefined)) {
|
|
6221
5144
|
err(`jsOp ${e.op} ${named ? "requires" : "forbids"} a name`, e.loc);
|
|
6222
5145
|
}
|
|
6223
5146
|
const arity = {
|
|
6224
|
-
add: 2,
|
|
6225
|
-
|
|
6226
|
-
|
|
6227
|
-
|
|
6228
|
-
|
|
5147
|
+
add: 2,
|
|
5148
|
+
sub: 2,
|
|
5149
|
+
mul: 2,
|
|
5150
|
+
div: 2,
|
|
5151
|
+
mod: 2,
|
|
5152
|
+
pow: 2,
|
|
5153
|
+
lt: 2,
|
|
5154
|
+
le: 2,
|
|
5155
|
+
gt: 2,
|
|
5156
|
+
ge: 2,
|
|
5157
|
+
eq: 2,
|
|
5158
|
+
neq: 2,
|
|
5159
|
+
instanceOf: 2,
|
|
5160
|
+
neg: 1,
|
|
5161
|
+
plus: 1,
|
|
5162
|
+
truthy: 1,
|
|
5163
|
+
not: 1,
|
|
5164
|
+
typeof: 1,
|
|
5165
|
+
toStr: 1,
|
|
5166
|
+
getProp: 1,
|
|
5167
|
+
setProp: 2,
|
|
5168
|
+
getIdx: 2,
|
|
5169
|
+
setIdx: 3,
|
|
5170
|
+
globalGet: 0,
|
|
5171
|
+
undefLit: 0,
|
|
5172
|
+
nullLit: 0,
|
|
5173
|
+
iterNew: 1,
|
|
5174
|
+
defineGetter: 3,
|
|
5175
|
+
objSpread: 2,
|
|
6229
5176
|
callSpread: 3, // callee + pre array + spread source
|
|
6230
|
-
callMethod: null,
|
|
6231
|
-
|
|
5177
|
+
callMethod: null,
|
|
5178
|
+
optCallMethod: null,
|
|
5179
|
+
callFn: null,
|
|
5180
|
+
callFnThis: null,
|
|
5181
|
+
construct: null, // receiver/callee + any number of args
|
|
5182
|
+
objLit: null,
|
|
5183
|
+
arrLit: null,
|
|
5184
|
+
tplStrings: null, // variable length (objLit: key/value pairs; tplStrings: n cooked + n raw)
|
|
6232
5185
|
};
|
|
6233
5186
|
const want = arity[e.op];
|
|
6234
5187
|
if (want !== null && want !== undefined && e.args.length !== want) {
|
|
6235
5188
|
err(`jsOp ${e.op} takes ${want} arg(s), got ${e.args.length}`, e.loc);
|
|
6236
5189
|
}
|
|
6237
|
-
if (want === null &&
|
|
5190
|
+
if (want === null &&
|
|
5191
|
+
e.op !== "objLit" &&
|
|
5192
|
+
e.op !== "arrLit" &&
|
|
5193
|
+
e.op !== "tplStrings" &&
|
|
5194
|
+
e.args.length < 1) {
|
|
6238
5195
|
err(`jsOp ${e.op} needs a receiver/callee arg`, e.loc);
|
|
6239
5196
|
}
|
|
6240
5197
|
if (e.op === "callFnThis" && e.args.length < 2) {
|
|
@@ -6571,7 +5528,9 @@ function validateFunction(fn, functions, ffiByName, classes, records, recordVali
|
|
|
6571
5528
|
checkExpr(s.value);
|
|
6572
5529
|
// dyn throws are allowed: the dyn node rides the REF cell arm by
|
|
6573
5530
|
// reference (the JS-lane `throw err` of a dyn argument).
|
|
6574
|
-
if (s.value.type.kind === "void" ||
|
|
5531
|
+
if (s.value.type.kind === "void" ||
|
|
5532
|
+
s.value.type.kind === "caught" ||
|
|
5533
|
+
s.value.type.kind === "date") {
|
|
6575
5534
|
err(`throw of a ${s.value.type.kind} value`, s.loc);
|
|
6576
5535
|
}
|
|
6577
5536
|
break;
|