@scriptc/compiler 0.3.1 → 0.3.3
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 +832 -55
- package/dist/backend/cycle-analysis.js +6 -1
- package/dist/backend/cycle-analysis.js.map +1 -1
- package/dist/backend/executable-features.js +1 -0
- package/dist/backend/executable-features.js.map +1 -1
- package/dist/backend/literals.d.ts +7 -0
- package/dist/backend/literals.js +32 -0
- package/dist/backend/literals.js.map +1 -1
- package/dist/backend/literals.test.js +17 -1
- package/dist/backend/literals.test.js.map +1 -1
- package/dist/backend/llvm/alloc.d.ts +15 -4
- package/dist/backend/llvm/alloc.js +63 -25
- package/dist/backend/llvm/alloc.js.map +1 -1
- package/dist/backend/llvm/alloc.test.js +62 -2
- package/dist/backend/llvm/alloc.test.js.map +1 -1
- package/dist/backend/llvm/appended-array-literals.d.ts +2 -0
- package/dist/backend/llvm/appended-array-literals.js +109 -0
- package/dist/backend/llvm/appended-array-literals.js.map +1 -0
- package/dist/backend/llvm/appended-array-literals.test.d.ts +1 -0
- package/dist/backend/llvm/appended-array-literals.test.js +90 -0
- package/dist/backend/llvm/appended-array-literals.test.js.map +1 -0
- package/dist/backend/llvm/array-search.d.ts +8 -0
- package/dist/backend/llvm/array-search.js +52 -0
- package/dist/backend/llvm/array-search.js.map +1 -0
- package/dist/backend/llvm/array-search.test.d.ts +1 -0
- package/dist/backend/llvm/array-search.test.js +72 -0
- package/dist/backend/llvm/array-search.test.js.map +1 -0
- package/dist/backend/llvm/call-lifetimes.d.ts +11 -1
- package/dist/backend/llvm/call-lifetimes.js +74 -4
- package/dist/backend/llvm/call-lifetimes.js.map +1 -1
- package/dist/backend/llvm/call-lifetimes.test.js +54 -0
- package/dist/backend/llvm/call-lifetimes.test.js.map +1 -1
- package/dist/backend/llvm/classes.js +97 -38
- package/dist/backend/llvm/classes.js.map +1 -1
- package/dist/backend/llvm/classes.test.js +2 -2
- package/dist/backend/llvm/common.d.ts +1 -1
- package/dist/backend/llvm/common.js +1 -1
- package/dist/backend/llvm/dense-array-access.d.ts +5 -0
- package/dist/backend/llvm/dense-array-access.js +18 -13
- package/dist/backend/llvm/dense-array-access.js.map +1 -1
- package/dist/backend/llvm/dense-array-access.test.js +15 -2
- package/dist/backend/llvm/dense-array-access.test.js.map +1 -1
- package/dist/backend/llvm/dyn.d.ts +6 -0
- package/dist/backend/llvm/dyn.js +84 -11
- package/dist/backend/llvm/dyn.js.map +1 -1
- package/dist/backend/llvm/emitter.d.ts +108 -16
- package/dist/backend/llvm/emitter.js +598 -108
- package/dist/backend/llvm/emitter.js.map +1 -1
- package/dist/backend/llvm/emitter.test.js +26 -3
- package/dist/backend/llvm/emitter.test.js.map +1 -1
- package/dist/backend/llvm/expr-async.js +174 -7
- package/dist/backend/llvm/expr-async.js.map +1 -1
- package/dist/backend/llvm/expr-bytes.js +11 -0
- package/dist/backend/llvm/expr-bytes.js.map +1 -1
- package/dist/backend/llvm/expr-callbacks.d.ts +8 -0
- package/dist/backend/llvm/expr-callbacks.js +96 -2
- package/dist/backend/llvm/expr-callbacks.js.map +1 -1
- package/dist/backend/llvm/expr-calls.d.ts +12 -1
- package/dist/backend/llvm/expr-calls.js +133 -54
- package/dist/backend/llvm/expr-calls.js.map +1 -1
- package/dist/backend/llvm/expr-containers.d.ts +7 -0
- package/dist/backend/llvm/expr-containers.js +80 -22
- package/dist/backend/llvm/expr-containers.js.map +1 -1
- package/dist/backend/llvm/expr-context.d.ts +2 -0
- package/dist/backend/llvm/expr-control.d.ts +8 -0
- package/dist/backend/llvm/expr-control.js +103 -69
- package/dist/backend/llvm/expr-control.js.map +1 -1
- package/dist/backend/llvm/expr-dynamic.js +21 -10
- package/dist/backend/llvm/expr-dynamic.js.map +1 -1
- package/dist/backend/llvm/expr-primitives.d.ts +7 -0
- package/dist/backend/llvm/expr-primitives.js +53 -51
- package/dist/backend/llvm/expr-primitives.js.map +1 -1
- package/dist/backend/llvm/expr-records.js +19 -5
- package/dist/backend/llvm/expr-records.js.map +1 -1
- package/dist/backend/llvm/expr-stream-bridges.d.ts +8 -0
- package/dist/backend/llvm/expr-stream-bridges.js +111 -39
- package/dist/backend/llvm/expr-stream-bridges.js.map +1 -1
- package/dist/backend/llvm/expr-stream-bridges.test.js +49 -1
- package/dist/backend/llvm/expr-stream-bridges.test.js.map +1 -1
- package/dist/backend/llvm/expr-stream-callbacks.d.ts +13 -2
- package/dist/backend/llvm/expr-stream-callbacks.js +80 -5
- package/dist/backend/llvm/expr-stream-callbacks.js.map +1 -1
- package/dist/backend/llvm/inline-unions.d.ts +48 -0
- package/dist/backend/llvm/inline-unions.js +134 -0
- package/dist/backend/llvm/inline-unions.js.map +1 -0
- package/dist/backend/llvm/inline-unions.test.d.ts +1 -0
- package/dist/backend/llvm/inline-unions.test.js +124 -0
- package/dist/backend/llvm/inline-unions.test.js.map +1 -0
- package/dist/backend/llvm/int32-abi.d.ts +18 -2
- package/dist/backend/llvm/int32-abi.js +23 -2
- package/dist/backend/llvm/int32-abi.js.map +1 -1
- package/dist/backend/llvm/int32-abi.test.js +75 -1
- package/dist/backend/llvm/int32-abi.test.js.map +1 -1
- package/dist/backend/llvm/integer-remainder.d.ts +28 -5
- package/dist/backend/llvm/integer-remainder.js +80 -9
- package/dist/backend/llvm/integer-remainder.js.map +1 -1
- package/dist/backend/llvm/lib-dispatch.js +170 -28
- package/dist/backend/llvm/lib-dispatch.js.map +1 -1
- package/dist/backend/llvm/lib-filesystem.js +181 -5
- package/dist/backend/llvm/lib-filesystem.js.map +1 -1
- package/dist/backend/llvm/lib-network.js +9 -6
- package/dist/backend/llvm/lib-network.js.map +1 -1
- package/dist/backend/llvm/lib-process.js +2 -2
- package/dist/backend/llvm/lib-process.js.map +1 -1
- package/dist/backend/llvm/lib-shared.js +208 -9
- package/dist/backend/llvm/lib-shared.js.map +1 -1
- package/dist/backend/llvm/lib-stream.js +97 -0
- package/dist/backend/llvm/lib-stream.js.map +1 -1
- package/dist/backend/llvm/local-array-reads.js +12 -6
- package/dist/backend/llvm/local-array-reads.js.map +1 -1
- package/dist/backend/llvm/local-array-reads.test.js +6 -3
- package/dist/backend/llvm/local-array-reads.test.js.map +1 -1
- package/dist/backend/llvm/local-union-storage.d.ts +26 -2
- package/dist/backend/llvm/local-union-storage.js +132 -12
- package/dist/backend/llvm/local-union-storage.js.map +1 -1
- package/dist/backend/llvm/local-union-storage.test.js +107 -1
- package/dist/backend/llvm/local-union-storage.test.js.map +1 -1
- package/dist/backend/llvm/loop-array-borrows.d.ts +8 -2
- package/dist/backend/llvm/loop-array-borrows.js +93 -13
- package/dist/backend/llvm/loop-array-borrows.js.map +1 -1
- package/dist/backend/llvm/map-number-lookup.d.ts +20 -0
- package/dist/backend/llvm/map-number-lookup.js +66 -0
- package/dist/backend/llvm/map-number-lookup.js.map +1 -1
- package/dist/backend/llvm/map-number-lookup.test.d.ts +1 -0
- package/dist/backend/llvm/map-number-lookup.test.js +102 -0
- package/dist/backend/llvm/map-number-lookup.test.js.map +1 -0
- package/dist/backend/llvm/map-read-lifetimes.js +1 -0
- package/dist/backend/llvm/map-read-lifetimes.js.map +1 -1
- package/dist/backend/llvm/publish.d.ts +4 -0
- package/dist/backend/llvm/publish.js +3 -1
- package/dist/backend/llvm/publish.js.map +1 -1
- package/dist/backend/llvm/record-results.d.ts +29 -0
- package/dist/backend/llvm/record-results.js +260 -0
- package/dist/backend/llvm/record-results.js.map +1 -0
- package/dist/backend/llvm/reference-effects.js +15 -0
- package/dist/backend/llvm/reference-effects.js.map +1 -1
- package/dist/backend/llvm/reference-writes.js +29 -9
- package/dist/backend/llvm/reference-writes.js.map +1 -1
- package/dist/backend/llvm/regions.d.ts +68 -0
- package/dist/backend/llvm/regions.js +314 -0
- package/dist/backend/llvm/regions.js.map +1 -0
- package/dist/backend/llvm/regions.test.d.ts +1 -0
- package/dist/backend/llvm/regions.test.js +173 -0
- package/dist/backend/llvm/regions.test.js.map +1 -0
- package/dist/backend/llvm/serialized-ir-emission.test.js +2 -0
- package/dist/backend/llvm/serialized-ir-emission.test.js.map +1 -1
- package/dist/backend/llvm/shapes.d.ts +86 -13
- package/dist/backend/llvm/shapes.js +208 -54
- package/dist/backend/llvm/shapes.js.map +1 -1
- package/dist/backend/llvm/shapes.test.js +68 -9
- package/dist/backend/llvm/shapes.test.js.map +1 -1
- package/dist/backend/llvm/split-loops.js +1 -1
- package/dist/backend/llvm/split-loops.js.map +1 -1
- package/dist/backend/llvm/stack-objects.d.ts +29 -0
- package/dist/backend/llvm/stack-objects.js +142 -0
- package/dist/backend/llvm/stack-objects.js.map +1 -0
- package/dist/backend/llvm/stack-objects.test.d.ts +1 -0
- package/dist/backend/llvm/stack-objects.test.js +255 -0
- package/dist/backend/llvm/stack-objects.test.js.map +1 -0
- package/dist/backend/llvm/string-reads.d.ts +4 -1
- package/dist/backend/llvm/string-reads.js +89 -9
- package/dist/backend/llvm/string-reads.js.map +1 -1
- package/dist/backend/llvm/switch-dispatch.js +5 -4
- package/dist/backend/llvm/switch-dispatch.js.map +1 -1
- package/dist/backend/llvm/walkers.d.ts +13 -0
- package/dist/backend/llvm/walkers.js +108 -10
- package/dist/backend/llvm/walkers.js.map +1 -1
- package/dist/backend/may-throw.js +10 -4
- package/dist/backend/may-throw.js.map +1 -1
- package/dist/backend/native/contracts.d.ts +7 -2
- package/dist/backend/native/executable.js +28 -2
- package/dist/backend/native/executable.js.map +1 -1
- package/dist/backend/native/library.js +1 -1
- package/dist/backend/native/library.js.map +1 -1
- package/dist/backend/native/runtime-inputs.d.ts +1 -1
- package/dist/backend/native/runtime-inputs.js +3 -0
- package/dist/backend/native/runtime-inputs.js.map +1 -1
- package/dist/backend/native-link-info-core.d.ts +1 -0
- package/dist/backend/native-link-info-core.js.map +1 -1
- package/dist/backend/native-toolchain.test.js +1 -1
- package/dist/backend/native-toolchain.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 +1 -0
- package/dist/backend/runtime-pack-core.js.map +1 -1
- package/dist/backend/runtime-pack-targets.test.js +1 -1
- package/dist/backend/runtime-pack.test.js +1 -1
- package/dist/backend/target-diagnostics.js +17 -0
- package/dist/backend/target-diagnostics.js.map +1 -1
- package/dist/backend/target-diagnostics.test.js +16 -0
- package/dist/backend/target-diagnostics.test.js.map +1 -1
- package/dist/compat/fetch-profile.js +4 -4
- package/dist/compat/fetch-profile.js.map +1 -1
- package/dist/contracts/check.js +2 -0
- package/dist/contracts/check.js.map +1 -1
- package/dist/coverage/report.js +1 -1
- package/dist/coverage/report.js.map +1 -1
- package/dist/diagnostics/diagnostic.d.ts +6 -5
- package/dist/diagnostics/diagnostic.js +7 -6
- package/dist/diagnostics/diagnostic.js.map +1 -1
- package/dist/executable/executable-cache.d.ts +1 -0
- package/dist/executable/executable-cache.js.map +1 -1
- package/dist/frontend/builtin-modules.d.ts +1 -1
- package/dist/frontend/builtin-modules.js +1 -0
- package/dist/frontend/builtin-modules.js.map +1 -1
- package/dist/frontend/comptime-node.js +2 -2
- package/dist/frontend/comptime-node.js.map +1 -1
- package/dist/frontend/experimental-import.d.ts +12 -0
- package/dist/frontend/experimental-import.js +63 -0
- package/dist/frontend/experimental-import.js.map +1 -0
- package/dist/frontend/lowering/binding-analysis.d.ts +1 -1
- package/dist/frontend/lowering/binding-analysis.js +1 -1
- package/dist/frontend/lowering/builtin-calls.d.ts +6 -1
- package/dist/frontend/lowering/builtin-calls.js +36 -0
- package/dist/frontend/lowering/builtin-calls.js.map +1 -1
- package/dist/frontend/lowering/builtins/arguments.d.ts +4 -0
- package/dist/frontend/lowering/builtins/arguments.js +8 -4
- package/dist/frontend/lowering/builtins/arguments.js.map +1 -1
- package/dist/frontend/lowering/builtins/blob.d.ts +20 -0
- package/dist/frontend/lowering/builtins/blob.js +167 -0
- package/dist/frontend/lowering/builtins/blob.js.map +1 -0
- package/dist/frontend/lowering/builtins/child-process-async.d.ts +2 -2
- package/dist/frontend/lowering/builtins/child-process-async.js +2 -2
- package/dist/frontend/lowering/builtins/child-process-methods.js +1 -1
- package/dist/frontend/lowering/builtins/child-process-methods.js.map +1 -1
- package/dist/frontend/lowering/builtins/child-process-sync.js +1 -1
- package/dist/frontend/lowering/builtins/child-process-sync.js.map +1 -1
- package/dist/frontend/lowering/builtins/compression.js +3 -2
- package/dist/frontend/lowering/builtins/compression.js.map +1 -1
- package/dist/frontend/lowering/builtins/console.d.ts +16 -6
- package/dist/frontend/lowering/builtins/console.js +33 -9
- package/dist/frontend/lowering/builtins/console.js.map +1 -1
- package/dist/frontend/lowering/builtins/crypto.js +415 -120
- package/dist/frontend/lowering/builtins/crypto.js.map +1 -1
- package/dist/frontend/lowering/builtins/errors.js +20 -0
- package/dist/frontend/lowering/builtins/errors.js.map +1 -1
- package/dist/frontend/lowering/builtins/filesystem-calls.d.ts +10 -0
- package/dist/frontend/lowering/builtins/filesystem-calls.js +89 -1
- package/dist/frontend/lowering/builtins/filesystem-calls.js.map +1 -1
- package/dist/frontend/lowering/builtins/filesystem.d.ts +16 -7
- package/dist/frontend/lowering/builtins/filesystem.js +97 -15
- package/dist/frontend/lowering/builtins/filesystem.js.map +1 -1
- package/dist/frontend/lowering/builtins/fs-glob.d.ts +23 -0
- package/dist/frontend/lowering/builtins/fs-glob.js +224 -0
- package/dist/frontend/lowering/builtins/fs-glob.js.map +1 -0
- package/dist/frontend/lowering/builtins/json.d.ts +2 -2
- package/dist/frontend/lowering/builtins/json.js +13 -4
- package/dist/frontend/lowering/builtins/json.js.map +1 -1
- package/dist/frontend/lowering/builtins/key-object.d.ts +13 -0
- package/dist/frontend/lowering/builtins/key-object.js +56 -0
- package/dist/frontend/lowering/builtins/key-object.js.map +1 -0
- package/dist/frontend/lowering/builtins/module-calls.js +60 -12
- package/dist/frontend/lowering/builtins/module-calls.js.map +1 -1
- package/dist/frontend/lowering/builtins/numbers.d.ts +1 -0
- package/dist/frontend/lowering/builtins/numbers.js +17 -0
- package/dist/frontend/lowering/builtins/numbers.js.map +1 -1
- package/dist/frontend/lowering/builtins/operating-system.d.ts +18 -0
- package/dist/frontend/lowering/builtins/operating-system.js +361 -1
- package/dist/frontend/lowering/builtins/operating-system.js.map +1 -1
- package/dist/frontend/lowering/builtins/performance.d.ts +25 -3
- package/dist/frontend/lowering/builtins/performance.js +340 -5
- package/dist/frontend/lowering/builtins/performance.js.map +1 -1
- package/dist/frontend/lowering/builtins/process.d.ts +2 -2
- package/dist/frontend/lowering/builtins/process.js +122 -17
- package/dist/frontend/lowering/builtins/process.js.map +1 -1
- package/dist/frontend/lowering/builtins/promises.js +109 -2
- package/dist/frontend/lowering/builtins/promises.js.map +1 -1
- package/dist/frontend/lowering/builtins/properties.d.ts +0 -7
- package/dist/frontend/lowering/builtins/properties.js +39 -11
- package/dist/frontend/lowering/builtins/properties.js.map +1 -1
- package/dist/frontend/lowering/builtins/readline.d.ts +23 -8
- package/dist/frontend/lowering/builtins/readline.js +266 -90
- package/dist/frontend/lowering/builtins/readline.js.map +1 -1
- package/dist/frontend/lowering/builtins/text-codecs.d.ts +3 -4
- package/dist/frontend/lowering/builtins/text-codecs.js +3 -4
- package/dist/frontend/lowering/builtins/text-codecs.js.map +1 -1
- package/dist/frontend/lowering/builtins/url.d.ts +8 -0
- package/dist/frontend/lowering/builtins/url.js +36 -0
- package/dist/frontend/lowering/builtins/url.js.map +1 -1
- package/dist/frontend/lowering/call-arguments.js +1 -1
- package/dist/frontend/lowering/call-arguments.js.map +1 -1
- package/dist/frontend/lowering/call-signatures.js +20 -2
- package/dist/frontend/lowering/call-signatures.js.map +1 -1
- package/dist/frontend/lowering/checked-promise-all.d.ts +10 -3
- package/dist/frontend/lowering/checked-promise-all.js +52 -6
- package/dist/frontend/lowering/checked-promise-all.js.map +1 -1
- package/dist/frontend/lowering/class-dynamic-dispatch.d.ts +8 -3
- package/dist/frontend/lowering/class-dynamic-dispatch.js +159 -32
- package/dist/frontend/lowering/class-dynamic-dispatch.js.map +1 -1
- package/dist/frontend/lowering/class-dynamic-dispatch.test.js +1 -0
- package/dist/frontend/lowering/class-dynamic-dispatch.test.js.map +1 -1
- package/dist/frontend/lowering/class-protocol-dispatch.d.ts +45 -0
- package/dist/frontend/lowering/class-protocol-dispatch.js +516 -0
- package/dist/frontend/lowering/class-protocol-dispatch.js.map +1 -0
- package/dist/frontend/lowering/coercions/structural-plans.js +2 -1
- package/dist/frontend/lowering/coercions/structural-plans.js.map +1 -1
- package/dist/frontend/lowering/coercions/structural.js +3 -3
- package/dist/frontend/lowering/coercions/structural.js.map +1 -1
- package/dist/frontend/lowering/collation-repertoire.js +6 -5
- package/dist/frontend/lowering/collation-repertoire.js.map +1 -1
- package/dist/frontend/lowering/containers/array-callbacks.js +33 -6
- package/dist/frontend/lowering/containers/array-callbacks.js.map +1 -1
- package/dist/frontend/lowering/containers/array-construction.js +8 -4
- package/dist/frontend/lowering/containers/array-construction.js.map +1 -1
- package/dist/frontend/lowering/containers/array-methods.d.ts +0 -7
- package/dist/frontend/lowering/containers/array-methods.js +43 -2
- package/dist/frontend/lowering/containers/array-methods.js.map +1 -1
- package/dist/frontend/lowering/containers/array-pipelines.js +1 -1
- package/dist/frontend/lowering/containers/array-pipelines.js.map +1 -1
- package/dist/frontend/lowering/containers/bytes.js +38 -26
- package/dist/frontend/lowering/containers/bytes.js.map +1 -1
- package/dist/frontend/lowering/containers/for-of.d.ts +1 -1
- package/dist/frontend/lowering/containers/for-of.js +5 -1
- package/dist/frontend/lowering/containers/for-of.js.map +1 -1
- package/dist/frontend/lowering/containers/indexed-objects.js +1 -1
- package/dist/frontend/lowering/containers/indexed-objects.js.map +1 -1
- package/dist/frontend/lowering/containers/string-and-regexp.js +91 -0
- package/dist/frontend/lowering/containers/string-and-regexp.js.map +1 -1
- package/dist/frontend/lowering/crypto-tables.d.ts +3 -3
- package/dist/frontend/lowering/crypto-tables.js +77 -12
- package/dist/frontend/lowering/crypto-tables.js.map +1 -1
- package/dist/frontend/lowering/cycle-initialization.d.ts +18 -2
- package/dist/frontend/lowering/cycle-initialization.js +166 -12
- package/dist/frontend/lowering/cycle-initialization.js.map +1 -1
- package/dist/frontend/lowering/deferred-module-initializers.js +7 -2
- package/dist/frontend/lowering/deferred-module-initializers.js.map +1 -1
- package/dist/frontend/lowering/deferred-module-initializers.test.js +28 -0
- package/dist/frontend/lowering/deferred-module-initializers.test.js.map +1 -1
- package/dist/frontend/lowering/expressions/nullish-assignment.js +10 -0
- package/dist/frontend/lowering/expressions/nullish-assignment.js.map +1 -1
- package/dist/frontend/lowering/expressions/object-literals.js +21 -68
- package/dist/frontend/lowering/expressions/object-literals.js.map +1 -1
- package/dist/frontend/lowering/generator-delegation.d.ts +8 -0
- package/dist/frontend/lowering/generator-delegation.js +231 -10
- package/dist/frontend/lowering/generator-delegation.js.map +1 -1
- package/dist/frontend/lowering/generic-functions.d.ts +2 -2
- package/dist/frontend/lowering/generic-functions.js +2 -2
- package/dist/frontend/lowering/generic-functions.js.map +1 -1
- package/dist/frontend/lowering/http2-constants.js +1 -1
- package/dist/frontend/lowering/lifetime-regions.d.ts +11 -0
- package/dist/frontend/lowering/lifetime-regions.js +216 -0
- package/dist/frontend/lowering/lifetime-regions.js.map +1 -0
- package/dist/frontend/lowering/lower-array-sort.d.ts +40 -3
- package/dist/frontend/lowering/lower-array-sort.js +661 -194
- package/dist/frontend/lowering/lower-array-sort.js.map +1 -1
- package/dist/frontend/lowering/lower-array-sort.test.js +103 -4
- package/dist/frontend/lowering/lower-array-sort.test.js.map +1 -1
- package/dist/frontend/lowering/lower-assert.js +2 -2
- package/dist/frontend/lowering/lower-async-iteration.d.ts +6 -3
- package/dist/frontend/lowering/lower-async-iteration.js +248 -2
- package/dist/frontend/lowering/lower-async-iteration.js.map +1 -1
- package/dist/frontend/lowering/lower-calls.js +173 -111
- package/dist/frontend/lowering/lower-calls.js.map +1 -1
- package/dist/frontend/lowering/lower-classes.d.ts +12 -5
- package/dist/frontend/lowering/lower-classes.js +156 -11
- package/dist/frontend/lowering/lower-classes.js.map +1 -1
- package/dist/frontend/lowering/lower-comptime.d.ts +1 -1
- package/dist/frontend/lowering/lower-comptime.js +4 -4
- package/dist/frontend/lowering/lower-comptime.js.map +1 -1
- package/dist/frontend/lowering/lower-console.d.ts +13 -0
- package/dist/frontend/lowering/lower-console.js +460 -4
- package/dist/frontend/lowering/lower-console.js.map +1 -1
- package/dist/frontend/lowering/lower-event-emitter.d.ts +6 -0
- package/dist/frontend/lowering/lower-event-emitter.js +124 -38
- package/dist/frontend/lowering/lower-event-emitter.js.map +1 -1
- package/dist/frontend/lowering/lower-event-target.d.ts +63 -0
- package/dist/frontend/lowering/lower-event-target.js +362 -0
- package/dist/frontend/lowering/lower-event-target.js.map +1 -0
- package/dist/frontend/lowering/lower-expando.js +2 -2
- package/dist/frontend/lowering/lower-exprs.js +247 -42
- package/dist/frontend/lowering/lower-exprs.js.map +1 -1
- package/dist/frontend/lowering/lower-generators.d.ts +15 -7
- package/dist/frontend/lowering/lower-generators.js +183 -99
- package/dist/frontend/lowering/lower-generators.js.map +1 -1
- package/dist/frontend/lowering/lower-inspect.d.ts +8 -1
- package/dist/frontend/lowering/lower-inspect.js +247 -28
- package/dist/frontend/lowering/lower-inspect.js.map +1 -1
- package/dist/frontend/lowering/lower-mixins.js +1 -1
- package/dist/frontend/lowering/lower-modules.d.ts +1 -1
- package/dist/frontend/lowering/lower-modules.js +27 -17
- package/dist/frontend/lowering/lower-modules.js.map +1 -1
- package/dist/frontend/lowering/lower-namespaces.d.ts +2 -2
- package/dist/frontend/lowering/lower-namespaces.js +2 -2
- package/dist/frontend/lowering/lower-server.js +39 -14
- package/dist/frontend/lowering/lower-server.js.map +1 -1
- package/dist/frontend/lowering/lower-stdlib.d.ts +11 -1
- package/dist/frontend/lowering/lower-stdlib.js +45 -4
- package/dist/frontend/lowering/lower-stdlib.js.map +1 -1
- package/dist/frontend/lowering/lower-stmts.d.ts +2 -2
- package/dist/frontend/lowering/lower-stmts.js +112 -23
- package/dist/frontend/lowering/lower-stmts.js.map +1 -1
- package/dist/frontend/lowering/lower-stream.js +234 -22
- package/dist/frontend/lowering/lower-stream.js.map +1 -1
- package/dist/frontend/lowering/lower-timers.js +1 -1
- package/dist/frontend/lowering/lowerer.d.ts +45 -6
- package/dist/frontend/lowering/lowerer.js +360 -48
- package/dist/frontend/lowering/lowerer.js.map +1 -1
- package/dist/frontend/lowering/native-ffi.js +2 -2
- package/dist/frontend/lowering/native-ffi.js.map +1 -1
- package/dist/frontend/lowering/regex-span-reads.d.ts +12 -0
- package/dist/frontend/lowering/regex-span-reads.js +164 -0
- package/dist/frontend/lowering/regex-span-reads.js.map +1 -0
- package/dist/frontend/lowering/runtime-optional-records.d.ts +115 -0
- package/dist/frontend/lowering/runtime-optional-records.js +715 -0
- package/dist/frontend/lowering/runtime-optional-records.js.map +1 -0
- package/dist/frontend/lowering/runtime-optional-records.test.d.ts +1 -0
- package/dist/frontend/lowering/runtime-optional-records.test.js +175 -0
- package/dist/frontend/lowering/runtime-optional-records.test.js.map +1 -0
- package/dist/frontend/lowering/surfaces.d.ts +7 -3
- package/dist/frontend/lowering/surfaces.js +385 -32
- package/dist/frontend/lowering/surfaces.js.map +1 -1
- package/dist/frontend/lowering/var-hoisting.d.ts +3 -0
- package/dist/frontend/lowering/var-hoisting.js +261 -0
- package/dist/frontend/lowering/var-hoisting.js.map +1 -0
- package/dist/frontend/module-syntax.d.ts +1 -1
- package/dist/frontend/module-syntax.js +1 -1
- package/dist/frontend/npm-static-prune.js +1 -1
- package/dist/frontend/npm-static-prune.js.map +1 -1
- package/dist/frontend/npm-static-rewrite-syntax.js +4 -3
- package/dist/frontend/npm-static-rewrite-syntax.js.map +1 -1
- package/dist/frontend/pipeline.js +6 -4
- package/dist/frontend/pipeline.js.map +1 -1
- package/dist/frontend/program.d.ts +6 -5
- package/dist/frontend/program.js +42 -22
- package/dist/frontend/program.js.map +1 -1
- package/dist/frontend/program.test.js +13 -0
- package/dist/frontend/program.test.js.map +1 -1
- package/dist/frontend/resolve.js +1 -1
- package/dist/frontend/ts7/adapter.js +1 -1
- package/dist/frontend/ts7/ast-bytes.d.ts +1 -1
- package/dist/frontend/ts7/ast-bytes.js +1 -1
- package/dist/frontend/ts7/semantic-json.d.ts +1 -1
- package/dist/frontend/ts7/semantic-json.js +1 -1
- package/dist/frontend/ts7/semantic-json.js.map +1 -1
- package/dist/frontend/ts7/world-check.js +1 -1
- package/dist/frontend/tsc-codes.js +2 -2
- package/dist/frontend/tsc-codes.js.map +1 -1
- package/dist/frontend/type-mapper.d.ts +28 -1
- package/dist/frontend/type-mapper.js +288 -30
- package/dist/frontend/type-mapper.js.map +1 -1
- package/dist/index.js +6 -4
- package/dist/index.js.map +1 -1
- package/dist/ir/analysis.d.ts +12 -6
- package/dist/ir/analysis.js +26 -10
- package/dist/ir/analysis.js.map +1 -1
- package/dist/ir/analysis.test.js +15 -3
- package/dist/ir/analysis.test.js.map +1 -1
- package/dist/ir/builtin-effects.js +108 -2
- package/dist/ir/builtin-effects.js.map +1 -1
- package/dist/ir/builtin-signatures.d.ts +1 -1
- package/dist/ir/builtin-signatures.js +436 -53
- package/dist/ir/builtin-signatures.js.map +1 -1
- package/dist/ir/function-references.test.js +1 -0
- package/dist/ir/function-references.test.js.map +1 -1
- package/dist/ir/int32-slots.js +2 -0
- package/dist/ir/int32-slots.js.map +1 -1
- package/dist/ir/intrinsic-signatures.js +2 -0
- package/dist/ir/intrinsic-signatures.js.map +1 -1
- package/dist/ir/ir.d.ts +129 -36
- package/dist/ir/ir.js +42 -1
- package/dist/ir/ir.js.map +1 -1
- package/dist/ir/runtime-features.d.ts +1 -0
- package/dist/ir/runtime-features.js +116 -5
- package/dist/ir/runtime-features.js.map +1 -1
- package/dist/ir/scalar-records.js +1 -2
- package/dist/ir/scalar-records.js.map +1 -1
- package/dist/ir/serialize.js +1 -1
- package/dist/ir/serialize.js.map +1 -1
- package/dist/ir/traverse.js +1 -0
- package/dist/ir/traverse.js.map +1 -1
- package/dist/ir/validate.js +250 -34
- package/dist/ir/validate.js.map +1 -1
- package/dist/ir/validate.test.js +125 -0
- package/dist/ir/validate.test.js.map +1 -1
- package/dist/library/fence-eval.d.ts +1 -1
- package/dist/library/fence-eval.js +5 -4
- package/dist/library/fence-eval.js.map +1 -1
- package/dist/library/ir-policy.js +11 -4
- package/dist/library/ir-policy.js.map +1 -1
- package/dist/library/library-profile.js +13 -13
- package/dist/library/library-profile.js.map +1 -1
- package/dist/library/prepare.js +1 -1
- package/dist/library/prepare.js.map +1 -1
- package/dist/library/sidecar.js +3 -3
- package/dist/library/sidecar.js.map +1 -1
- package/dist/native/prepare.js +3 -2
- package/dist/native/prepare.js.map +1 -1
- package/dist/native/sanitizer.test.js +1 -0
- package/dist/native/sanitizer.test.js.map +1 -1
- package/package.json +20 -20
- package/surface-manifest.json +537 -142
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BIGINT_T } from "./ir.js";
|
|
2
|
-
import { arrayOf, BOOL, BYTES_U8, bytesOf, CHILD_T, CHILDSTREAM_T, CHILDWRITER_T, CRYPTOHASH_T, CRYPTOHMAC_T, DATE_T, DGRAMSOCK_T, DYN, F64, FILEHANDLE_T, FSWATCHER_T, HTTP2SESSION_T, HTTP2STREAM_T, HTTPCLIENTREQ_T, HTTPREQ_T, HTTPRES_T, NETSERVER_T, NETSOCKET_T, PROCSTREAM_T, REGEX, SEARCH_PARAMS_T, SECURECTX_T, SPAWNRES_T, STATS_T, STRING, SYMBOL_T, TESTCTX_T, URL_T, VOID, } from "./ir.js";
|
|
2
|
+
import { arrayOf, BOOL, BYTES_U8, bytesOf, CHILD_T, CHILDSTREAM_T, CHILDWRITER_T, CRYPTOHASH_T, CRYPTOHMAC_T, DATE_T, DIR_T, DGRAMSOCK_T, DYN, F64, FILEHANDLE_T, FSWATCHER_T, HTTP2SESSION_T, HTTP2STREAM_T, HTTPCLIENTREQ_T, HTTPREQ_T, HTTPRES_T, NETSERVER_T, NETSOCKET_T, PROCSTREAM_T, REGEX, SEARCH_PARAMS_T, SECURECTX_T, SPAWNRES_T, STATS_T, STRING, SYMBOL_T, TESTCTX_T, URL_T, VOID, } from "./ir.js";
|
|
3
3
|
/** Preserve the closed names while giving every entry the same slot type. */
|
|
4
4
|
function defineLibFnSignatures(signatures) {
|
|
5
5
|
return signatures;
|
|
@@ -17,6 +17,46 @@ export const LIB_FN_SIGS = defineLibFnSignatures({
|
|
|
17
17
|
"fetch.responseNew": { argTypes: [DYN, DYN], result: DYN },
|
|
18
18
|
"fetch.input": { argTypes: [DYN, DYN], result: { kind: "promise", inner: DYN } },
|
|
19
19
|
"abort.controllerNew": { argTypes: [], result: DYN },
|
|
20
|
+
/** EventTarget / Event / CustomEvent construction (scr_event_target.c):
|
|
21
|
+
* the Event constructors take the argument vector as one dyn array and
|
|
22
|
+
* throw Node's validation errors; `event.is` is `v instanceof Event`
|
|
23
|
+
* (kind 0), `CustomEvent` (1), `EventTarget` (2). addAbortListener
|
|
24
|
+
* answers the disposer (the Disposable's [Symbol.dispose]). */
|
|
25
|
+
"event.targetNew": { argTypes: [], result: DYN },
|
|
26
|
+
"event.new": { argTypes: [DYN], result: DYN },
|
|
27
|
+
"event.customNew": { argTypes: [DYN], result: DYN },
|
|
28
|
+
"event.is": { argTypes: [DYN, F64], result: BOOL },
|
|
29
|
+
/** Compiled EventTarget and Event subclasses: the receiver is the
|
|
30
|
+
* instance (an object rooted at %EventTarget / %Event). targetInit and
|
|
31
|
+
* init are super() (init takes the argument vector as one dyn array
|
|
32
|
+
* and throws the constructor's validation errors; initType is the
|
|
33
|
+
* super(type) form with a string); targetCall runs an EventTarget method
|
|
34
|
+
* with the instance's own capsule as `self` (targetDispatch is its
|
|
35
|
+
* dispatchEvent(event) form, answering the bool); call, get and set
|
|
36
|
+
* reach the Event members. */
|
|
37
|
+
"event.targetInit": { argTypes: [null], result: VOID },
|
|
38
|
+
"event.init": { argTypes: [null, DYN], result: VOID },
|
|
39
|
+
"event.initType": { argTypes: [null, STRING], result: VOID },
|
|
40
|
+
/** %main hands the engine the compiled `listener.handleEvent` reader
|
|
41
|
+
* (lower-event-target.ts noteEventListeners). */
|
|
42
|
+
"event.handleEventReader": { argTypes: [DYN], result: VOID },
|
|
43
|
+
"event.targetDispatch": { argTypes: [null, DYN, DYN], result: BOOL },
|
|
44
|
+
"event.targetCall": { argTypes: [null, DYN, STRING, DYN], result: DYN },
|
|
45
|
+
"event.call": { argTypes: [null, STRING, DYN], result: DYN },
|
|
46
|
+
"event.get": { argTypes: [null, STRING], result: DYN },
|
|
47
|
+
"event.set": { argTypes: [null, STRING, DYN], result: VOID },
|
|
48
|
+
"events.addAbortListener": { argTypes: [DYN, DYN], result: DYN },
|
|
49
|
+
/** Blob / File (scr_blob.c): the constructors and slice() take their
|
|
50
|
+
* argument vector as one dyn array and throw Node's validation errors;
|
|
51
|
+
* the readers settle on Node's microtask turn for the Blob's parts.
|
|
52
|
+
* `blob.is` is `v instanceof Blob` (kind 0) or `File` (1). */
|
|
53
|
+
"blob.new": { argTypes: [DYN], result: DYN },
|
|
54
|
+
"blob.fileNew": { argTypes: [DYN], result: DYN },
|
|
55
|
+
"blob.slice": { argTypes: [DYN, DYN], result: DYN },
|
|
56
|
+
"blob.text": { argTypes: [DYN], result: { kind: "promise", inner: STRING } },
|
|
57
|
+
"blob.bytes": { argTypes: [DYN], result: { kind: "promise", inner: BYTES_U8 } },
|
|
58
|
+
"blob.arrayBuffer": { argTypes: [DYN], result: { kind: "promise", inner: DYN } },
|
|
59
|
+
"blob.is": { argTypes: [DYN, F64], result: BOOL },
|
|
20
60
|
"abort.timeout": { argTypes: [DYN], result: DYN },
|
|
21
61
|
"abort.now": { argTypes: [DYN], result: DYN },
|
|
22
62
|
"abort.any": { argTypes: [DYN], result: DYN },
|
|
@@ -52,8 +92,8 @@ export const LIB_FN_SIGS = defineLibFnSignatures({
|
|
|
52
92
|
* "Cannot set properties of undefined (setting 'k')"; every other kind
|
|
53
93
|
* throws Node's STRICT-mode "Cannot create property 'k' on <kind>" —
|
|
54
94
|
* primitives quoting their rendering, V8's "on number '5'"
|
|
55
|
-
* (sloppy mode would
|
|
56
|
-
* SEMANTICS.md notes the sloppy divergence:
|
|
95
|
+
* (sloppy mode would ignore the write — suite tests are 'use strict';
|
|
96
|
+
* SEMANTICS.md notes the sloppy divergence: the write throws). Void
|
|
57
97
|
* result; in the may-throw seed set. */
|
|
58
98
|
"dyn.keySet": { argTypes: [DYN, STRING, DYN], result: VOID },
|
|
59
99
|
"dyn.keySetComputed": { argTypes: [DYN, DYN, DYN], result: VOID },
|
|
@@ -71,6 +111,10 @@ export const LIB_FN_SIGS = defineLibFnSignatures({
|
|
|
71
111
|
"dyn.globalSymbolDelete": { argTypes: [SYMBOL_T], result: VOID },
|
|
72
112
|
/** Exact native class capsule identity, without materializing its fields. */
|
|
73
113
|
"dyn.typedRefIs": { argTypes: [DYN, STRING], result: BOOL },
|
|
114
|
+
/** A capsule boxed by this program from exactly this class: one key
|
|
115
|
+
* pointer test, false for equal keys boxed elsewhere. Guards fast paths
|
|
116
|
+
* whose fallback handles every other value. The key is a literal. */
|
|
117
|
+
"dyn.typedRefKeyIs": { argTypes: [DYN, STRING], result: BOOL },
|
|
74
118
|
"dyn.classIs": { argTypes: [DYN, STRING], result: BOOL },
|
|
75
119
|
/** Destructuring pack over a dyn source — `const [a, b] = d`, a
|
|
76
120
|
* destructured dyn callback param (args: the source and the STATIC
|
|
@@ -102,6 +146,9 @@ export const LIB_FN_SIGS = defineLibFnSignatures({
|
|
|
102
146
|
* own-member presence, ARR answers 'length'/a valid index — exactly
|
|
103
147
|
* the literal-key dynHasKey path. Proxy has traps may throw. */
|
|
104
148
|
"dyn.hasKey": { argTypes: [DYN, STRING], result: BOOL },
|
|
149
|
+
/** The `in` operator with a runtime string key: dyn.hasKey plus the
|
|
150
|
+
* members inherited from builtin and compiled class prototypes. */
|
|
151
|
+
"dyn.in": { argTypes: [DYN, STRING], result: BOOL },
|
|
105
152
|
"dyn.freeze": { argTypes: [DYN], result: DYN },
|
|
106
153
|
"dyn.isFrozen": { argTypes: [DYN], result: BOOL },
|
|
107
154
|
"dyn.nativeSetNew": { argTypes: [DYN], result: DYN },
|
|
@@ -122,13 +169,20 @@ export const LIB_FN_SIGS = defineLibFnSignatures({
|
|
|
122
169
|
* Value descriptors become own properties on OBJ and FUNC targets;
|
|
123
170
|
* OBJ targets preserve data attributes. get/set
|
|
124
171
|
* descriptors and non-object targets/descriptors throw catchably
|
|
125
|
-
* (Node's TypeError texts; accessors the
|
|
172
|
+
* (Node's TypeError texts; accessors the "not supported yet" Error). In
|
|
126
173
|
* the may-throw seed set. */
|
|
127
174
|
"dyn.defineProps": { argTypes: [DYN, DYN], result: DYN },
|
|
128
175
|
"dyn.defineProperty": { argTypes: [DYN, DYN, DYN], result: DYN },
|
|
129
176
|
"dyn.getOwnPropertyDescriptor": { argTypes: [DYN, DYN], result: DYN },
|
|
130
177
|
"dyn.arrayProtoCall": { argTypes: [DYN, STRING, DYN], result: DYN },
|
|
131
|
-
|
|
178
|
+
/** Promise.all / Promise.allSettled / Promise.any over a spread
|
|
179
|
+
* checked-dynamic array: the values, the settled-record array, or the
|
|
180
|
+
* first fulfillment (AggregateError once every entry rejects).
|
|
181
|
+
* Thenable elements adopt; the second argument reads a program class
|
|
182
|
+
* instance's `then` (the compiled property dispatch). */
|
|
183
|
+
"dyn.promiseAll": { argTypes: [DYN, DYN], result: { kind: "promise", inner: DYN } },
|
|
184
|
+
"dyn.promiseAllSettled": { argTypes: [DYN, DYN], result: { kind: "promise", inner: DYN } },
|
|
185
|
+
"dyn.promiseAny": { argTypes: [DYN, DYN], result: { kind: "promise", inner: DYN } },
|
|
132
186
|
/** Bare `typeof v` on a dyn value AS A STRING (arg: the dyn value,
|
|
133
187
|
* borrowed; result: an owned string) — the dyn kind's JS answer:
|
|
134
188
|
* undefined→"undefined", null/object/array/bytes→"object" (JS's oldest
|
|
@@ -231,6 +285,34 @@ export const LIB_FN_SIGS = defineLibFnSignatures({
|
|
|
231
285
|
"process.uptime": { argTypes: [], result: F64 },
|
|
232
286
|
/** perf_hooks performance.now(): fractional ms since process start. */
|
|
233
287
|
"perf.now": { argTypes: [], result: F64 },
|
|
288
|
+
/** perf_hooks user timing over the thread's performance timeline. The
|
|
289
|
+
* producing calls take the call's whole argument vector as one dyn
|
|
290
|
+
* array (Node's validation and errors run in the runtime, MAY THROW):
|
|
291
|
+
* mark/measure answer 1, entries(args, which) the entry count of
|
|
292
|
+
* getEntries (0), getEntriesByName (1) or getEntriesByType (2). The
|
|
293
|
+
* entryName/Type/Start/Duration/Detail accessors read entry i of that
|
|
294
|
+
* answer; the frontend builds a new entry's record from them and hands
|
|
295
|
+
* it to entryKeep (a typed reference capsule), and the getters read the
|
|
296
|
+
* kept records back through entryRef, so entries keep their identity. */
|
|
297
|
+
"perf.mark": { argTypes: [DYN], result: F64 },
|
|
298
|
+
"perf.measure": { argTypes: [DYN], result: F64 },
|
|
299
|
+
"perf.entries": { argTypes: [DYN, F64], result: F64 },
|
|
300
|
+
"perf.clearMarks": { argTypes: [DYN], result: VOID },
|
|
301
|
+
"perf.clearMeasures": { argTypes: [DYN], result: VOID },
|
|
302
|
+
"perf.entryName": { argTypes: [F64], result: STRING },
|
|
303
|
+
"perf.entryType": { argTypes: [F64], result: STRING },
|
|
304
|
+
"perf.entryStart": { argTypes: [F64], result: F64 },
|
|
305
|
+
"perf.entryDuration": { argTypes: [F64], result: F64 },
|
|
306
|
+
"perf.entryDetail": { argTypes: [F64], result: DYN },
|
|
307
|
+
"perf.entryKeep": { argTypes: [DYN], result: VOID },
|
|
308
|
+
"perf.entryRef": { argTypes: [F64], result: DYN },
|
|
309
|
+
/** process.memoryUsage(): memoryUsageTake samples the resident set and
|
|
310
|
+
* the runtime heap once (MAY THROW Node's uv_resident_set_memory error)
|
|
311
|
+
* and memoryUsageField(k) reads that sample (0 rss, 1 heapTotal, 2
|
|
312
|
+
* heapUsed, 3 external, 4 arrayBuffers). rss is memoryUsage.rss(). */
|
|
313
|
+
"process.memoryUsageTake": { argTypes: [], result: VOID },
|
|
314
|
+
"process.memoryUsageField": { argTypes: [F64], result: F64 },
|
|
315
|
+
"process.rss": { argTypes: [], result: F64 },
|
|
234
316
|
"process.availableMemory": { argTypes: [], result: F64 },
|
|
235
317
|
"process.constrainedMemory": { argTypes: [], result: F64 },
|
|
236
318
|
"process.cpuUser": { argTypes: [], result: F64 },
|
|
@@ -248,8 +330,8 @@ export const LIB_FN_SIGS = defineLibFnSignatures({
|
|
|
248
330
|
"timers.immediateRef": { argTypes: [F64], result: F64 },
|
|
249
331
|
"timers.immediateHasRef": { argTypes: [F64], result: BOOL },
|
|
250
332
|
/** The tolerated non-handle clear (`clearTimeout(null)`,
|
|
251
|
-
* `clearInterval({})`, zero-argument forms): Node
|
|
252
|
-
*
|
|
333
|
+
* `clearInterval({})`, zero-argument forms): Node ignores anything
|
|
334
|
+
* that is not a live handle without an error — a VOID no-op the emitter drops
|
|
253
335
|
* (only syntactically side-effect-free arguments take this path). */
|
|
254
336
|
"timers.clearNoop": { argTypes: [], result: VOID },
|
|
255
337
|
// Signal listeners are zero-param (the ambient shape); exit/stdin
|
|
@@ -294,7 +376,8 @@ export const LIB_FN_SIGS = defineLibFnSignatures({
|
|
|
294
376
|
"fs.readFileSyncBuf": { argTypes: [STRING], result: BYTES_U8 },
|
|
295
377
|
/** readFileSync(path, enc) with a RUNTIME encoding (an untyped JS
|
|
296
378
|
* parameter): undefined/null answer Buffers, utf8 a string, other real
|
|
297
|
-
* encodings
|
|
379
|
+
* encodings throw the "not supported yet" Error, unknown names throw
|
|
380
|
+
* ERR_UNKNOWN_ENCODING. */
|
|
298
381
|
"fs.readFileSyncDyn": { argTypes: [STRING, DYN], result: DYN },
|
|
299
382
|
"fs.writeFileSync": { argTypes: [STRING, STRING], result: VOID },
|
|
300
383
|
"fs.appendFileSync": { argTypes: [STRING, STRING], result: VOID },
|
|
@@ -310,12 +393,40 @@ export const LIB_FN_SIGS = defineLibFnSignatures({
|
|
|
310
393
|
* to lstat, Node's getDirents rule). The result type is the call site's
|
|
311
394
|
* interned Dirent record array (name, parentPath, hidden %dtype in
|
|
312
395
|
* libuv's UV_DIRENT encoding) — verified by the frontend; the emitter
|
|
313
|
-
* assembles the rows from the snapshot.
|
|
396
|
+
* assembles the rows from the snapshot. Byte order on POSIX (libuv
|
|
397
|
+
* sorts), the directory's order on Windows; no "."/"..". Throws
|
|
314
398
|
* Node's scandir errno error (may-throw seed set); fresh +1 array. */
|
|
315
399
|
"fs.readdirTypesSync": { argTypes: [STRING], result: VOID },
|
|
400
|
+
/** fs.globSync / fs.glob / fs/promises glob (scr_glob.c, Node's
|
|
401
|
+
* lib/internal/fs/glob.js walk): pattern and options are dyn values the
|
|
402
|
+
* runtime validates in Node's order. The string forms answer string[];
|
|
403
|
+
* the Dirent forms answer the call site's Dirent record array (validated
|
|
404
|
+
* in validate.ts) assembled from the snapshot; fs.callbackGlob takes the
|
|
405
|
+
* argument vector and calls back with string[]. */
|
|
406
|
+
"fs.globSync": { argTypes: [DYN, DYN], result: arrayOf(STRING) },
|
|
407
|
+
"fs.globTypesSync": { argTypes: [DYN, DYN], result: VOID },
|
|
408
|
+
"fs.callbackGlob": { argTypes: [DYN], result: VOID },
|
|
409
|
+
"fsp.globStrings": { argTypes: [DYN, DYN], result: arrayOf(STRING) },
|
|
410
|
+
"fsp.globTypes": { argTypes: [DYN, DYN], result: VOID },
|
|
411
|
+
/** The error an fs/promises glob walk ended with (undefined when none),
|
|
412
|
+
* read once right after fsp.globStrings / fsp.globTypes. */
|
|
413
|
+
"fsp.globError": { argTypes: [], result: DYN },
|
|
414
|
+
/** fs.Dir (scr_lib.c): opendirSync(path, bufferSize) throws Node's
|
|
415
|
+
* opendir error (or the options.bufferSize RangeError); dir.readSync
|
|
416
|
+
* answers the call site's `Dirent | null` (VOID here — the emitter builds
|
|
417
|
+
* the row like readdirTypesSync) and dir.read is its promise twin;
|
|
418
|
+
* readSync and closeSync throw ERR_DIR_CLOSED on a closed Dir, read and
|
|
419
|
+
* close reject with it. */
|
|
420
|
+
"fs.opendirSync": { argTypes: [STRING, F64], result: DIR_T },
|
|
421
|
+
"fsp.opendir": { argTypes: [STRING, F64], result: { kind: "promise", inner: DIR_T } },
|
|
422
|
+
"dir.path": { argTypes: [DIR_T], result: STRING },
|
|
423
|
+
"dir.readSync": { argTypes: [DIR_T], result: VOID },
|
|
424
|
+
"dir.read": { argTypes: [DIR_T], result: { kind: "promise", inner: VOID } },
|
|
425
|
+
"dir.closeSync": { argTypes: [DIR_T], result: VOID },
|
|
426
|
+
"dir.close": { argTypes: [DIR_T], result: { kind: "promise", inner: VOID } },
|
|
316
427
|
/** node:path (scr_path.c ports BOTH of Node's implementations
|
|
317
428
|
* function-by-function): the `path.*` family is posix, the
|
|
318
|
-
* `path.win32*` family is Node v24's path.win32
|
|
429
|
+
* `path.win32*` family is Node v24's path.win32 ported exactly — the
|
|
319
430
|
* frontend binds the bare module to the TARGET platform's family
|
|
320
431
|
* (Node on Windows IS path.win32) and the path.posix / path.win32
|
|
321
432
|
* namespaces to their own family everywhere. join and resolve take ONE
|
|
@@ -342,6 +453,21 @@ export const LIB_FN_SIGS = defineLibFnSignatures({
|
|
|
342
453
|
"path.win32IsAbsolute": { argTypes: [STRING], result: BOOL },
|
|
343
454
|
"path.win32Relative": { argTypes: [STRING, STRING], result: STRING },
|
|
344
455
|
"path.win32ToNamespacedPath": { argTypes: [STRING], result: STRING },
|
|
456
|
+
/** path.parse: [root, dir, base, ext, name] as a fresh string[] (the
|
|
457
|
+
* frontend builds the ParsedPath record); path.format: the pathObject's
|
|
458
|
+
* root, dir, base, name and ext with undefined spelled "". */
|
|
459
|
+
"path.parse": { argTypes: [STRING], result: arrayOf(STRING) },
|
|
460
|
+
"path.win32Parse": { argTypes: [STRING], result: arrayOf(STRING) },
|
|
461
|
+
"path.format": { argTypes: [STRING, STRING, STRING, STRING, STRING], result: STRING },
|
|
462
|
+
"path.win32Format": { argTypes: [STRING, STRING, STRING, STRING, STRING], result: STRING },
|
|
463
|
+
/** path.matchesGlob(path, pattern): Node's matchGlobPattern over its
|
|
464
|
+
* bundled minimatch (scr_glob.c). Both families match case-insensitively
|
|
465
|
+
* on macOS and Windows hosts like Node's; win32 also accepts either
|
|
466
|
+
* separator. Throws TypeError for a pattern over 64 Ki code units,
|
|
467
|
+
* RangeError for a brace sequence too long to expand, and SyntaxError
|
|
468
|
+
* when a segment's regex is invalid under the u flag. */
|
|
469
|
+
"path.matchesGlob": { argTypes: [STRING, STRING], result: BOOL },
|
|
470
|
+
"path.win32MatchesGlob": { argTypes: [STRING, STRING], result: BOOL },
|
|
345
471
|
/** node:os: homedir is $HOME else getpwuid(3); tmpdir is Node's env
|
|
346
472
|
* cascade ($TMPDIR/$TMP/$TEMP else /tmp, one trailing slash trimmed).
|
|
347
473
|
* os.platform() lowers to process.platform — one implementation. */
|
|
@@ -357,6 +483,29 @@ export const LIB_FN_SIGS = defineLibFnSignatures({
|
|
|
357
483
|
"os.totalmem": { argTypes: [], result: F64 },
|
|
358
484
|
/** os.availableParallelism(): CPUs the process may use (libuv's answer), >= 1. Never throws. */
|
|
359
485
|
"os.availableParallelism": { argTypes: [], result: F64 },
|
|
486
|
+
/** os.hostname/machine/version/endianness, freemem, uptime and loadavg:
|
|
487
|
+
* libuv's answers (uname's machine and version fields, gethostname,
|
|
488
|
+
* "LE"/"BE", free memory in bytes, uptime in seconds, the three load
|
|
489
|
+
* averages). Fresh results; never throw. */
|
|
490
|
+
"os.hostname": { argTypes: [], result: STRING },
|
|
491
|
+
"os.machine": { argTypes: [], result: STRING },
|
|
492
|
+
"os.version": { argTypes: [], result: STRING },
|
|
493
|
+
"os.endianness": { argTypes: [], result: STRING },
|
|
494
|
+
"os.freemem": { argTypes: [], result: F64 },
|
|
495
|
+
"os.uptime": { argTypes: [], result: F64 },
|
|
496
|
+
"os.loadavg": { argTypes: [], result: arrayOf(F64) },
|
|
497
|
+
/** os.getPriority(pid): validateInt32 (RangeError ERR_OUT_OF_RANGE),
|
|
498
|
+
* then the priority; a failure throws Node's SystemError. */
|
|
499
|
+
"os.getPriority": { argTypes: [F64], result: F64 },
|
|
500
|
+
/** os.cpus(): cpusTake snapshots every CPU and answers the count;
|
|
501
|
+
* cpusModel(i) and cpusField(i, k) (k: 0 speed, 1 user, 2 nice, 3 sys,
|
|
502
|
+
* 4 idle, 5 irq) read the snapshot. Never throw. */
|
|
503
|
+
"os.cpusTake": { argTypes: [], result: F64 },
|
|
504
|
+
"os.cpusModel": { argTypes: [F64], result: STRING },
|
|
505
|
+
"os.cpusField": { argTypes: [F64, F64], result: F64 },
|
|
506
|
+
/** os.constants: the per-thread null-prototype constants object (dlopen,
|
|
507
|
+
* errno, signals, priority, UV_UDP_REUSEADDR). Never throws. */
|
|
508
|
+
"os.constants": { argTypes: [], result: DYN },
|
|
360
509
|
/** umask(2): arg < 0 reads without setting (umask has no read-only form
|
|
361
510
|
* — set 0, restore); otherwise sets and answers the PREVIOUS mask.
|
|
362
511
|
* Never throws. */
|
|
@@ -479,6 +628,9 @@ export const LIB_FN_SIGS = defineLibFnSignatures({
|
|
|
479
628
|
* Latin-script text (scr_str_locale_compare). Never throws. */
|
|
480
629
|
"str.localeCompare": { argTypes: [STRING, STRING], result: F64 },
|
|
481
630
|
"str.replaceLiteral": { argTypes: [STRING, STRING, STRING, BOOL], result: STRING },
|
|
631
|
+
// (subject, characters, NUL-separated replacement texts): the fused
|
|
632
|
+
// chain of global one-character replacements.
|
|
633
|
+
"str.replaceChars": { argTypes: [STRING, STRING, STRING], result: STRING },
|
|
482
634
|
/* ToNumber(string) — ECMA-262 7.1.4.1 StringToNumber (scr_string.c):
|
|
483
635
|
* trim the JS StrWhiteSpace set, empty/whitespace-only → +0, then the
|
|
484
636
|
* whole span must be one StrNumericLiteral — signed decimal (Infinity
|
|
@@ -494,8 +646,8 @@ export const LIB_FN_SIGS = defineLibFnSignatures({
|
|
|
494
646
|
* str.encodeUriComponent percent-encodes every byte outside the
|
|
495
647
|
* unreserved component set (ALPHA/DIGIT/- _ . ! ~ * ' ( )) as uppercase
|
|
496
648
|
* %XX — the spec's per-code-point UTF-8 encoding IS a byte scan here —
|
|
497
|
-
* and
|
|
498
|
-
*
|
|
649
|
+
* and THROWS the spec's URIError ("URI malformed") on a lone surrogate.
|
|
650
|
+
* str.decodeUriComponent
|
|
499
651
|
* decodes %XX escapes bytewise (raw non-escape bytes copy through) and
|
|
500
652
|
* requires the escaped bytes to form strictly valid UTF-8 (overlong
|
|
501
653
|
* forms, surrogate code points, and >U+10FFFF refused, per UTF8-decode
|
|
@@ -523,7 +675,7 @@ export const LIB_FN_SIGS = defineLibFnSignatures({
|
|
|
523
675
|
"str.decodeUriComponent": { argTypes: [STRING], result: STRING },
|
|
524
676
|
"str.decodeUri": { argTypes: [STRING], result: STRING },
|
|
525
677
|
/** encodeURI: the same Encode() keeping the reserved set and '#'
|
|
526
|
-
* unescaped —
|
|
678
|
+
* unescaped — throwing like the component encoder. Borrow; result +1. */
|
|
527
679
|
"str.encodeUri": { argTypes: [STRING], result: STRING },
|
|
528
680
|
/** RegExp.escape (ES2025): per-code-point EncodeForRegExpEscape —
|
|
529
681
|
* leading ASCII alphanumeric hex-escapes, syntax characters and '/'
|
|
@@ -638,6 +790,18 @@ export const LIB_FN_SIGS = defineLibFnSignatures({
|
|
|
638
790
|
"url.fileURLToPathUrl": { argTypes: [URL_T], result: STRING },
|
|
639
791
|
"url.fileURLToPathChecked": { argTypes: [DYN], result: STRING },
|
|
640
792
|
"url.fileURLToPathOptions": { argTypes: [DYN, DYN], result: STRING },
|
|
793
|
+
/** node:url's legacy API (scr_url_legacy.c): parse(url, parseQueryString,
|
|
794
|
+
* slashesDenoteHost) answers the checked-dynamic Url instance; format
|
|
795
|
+
* takes the urlObject (a Url-shaped object, a string, or a URL) and the
|
|
796
|
+
* URL form's options; resolve takes (from, to). The trailing bool says
|
|
797
|
+
* whether the call site emits DEP0169. domainToASCII/domainToUnicode
|
|
798
|
+
* take the domain and whether it was omitted. Node's validation errors
|
|
799
|
+
* throw catchably. */
|
|
800
|
+
"url.legacyParse": { argTypes: [DYN, DYN, DYN, BOOL], result: DYN },
|
|
801
|
+
"url.legacyFormat": { argTypes: [DYN, DYN, BOOL], result: STRING },
|
|
802
|
+
"url.legacyResolve": { argTypes: [DYN, DYN, BOOL], result: STRING },
|
|
803
|
+
"url.domainToASCII": { argTypes: [DYN, BOOL], result: STRING },
|
|
804
|
+
"url.domainToUnicode": { argTypes: [DYN, BOOL], result: STRING },
|
|
641
805
|
"url.fileURLToPathBuffer": { argTypes: [DYN, DYN], result: BYTES_U8 },
|
|
642
806
|
"url.pathToFileURLChecked": { argTypes: [DYN, DYN], result: URL_T },
|
|
643
807
|
"url.fileURLToPathStr": { argTypes: [STRING], result: STRING },
|
|
@@ -700,9 +864,8 @@ export const LIB_FN_SIGS = defineLibFnSignatures({
|
|
|
700
864
|
/** node:querystring (scr_qs.c — link-gated by moduleUsesQs; NOT
|
|
701
865
|
* URLSearchParams: the legacy codec's escaping and '+' rules differ).
|
|
702
866
|
* qs.escape is Node's qsEscape, which encodes exactly the component
|
|
703
|
-
* unreserved set — it emits the always-linked
|
|
704
|
-
*
|
|
705
|
-
* unit. qs.unescape is Node's qsUnescape: strict decodeURIComponent
|
|
867
|
+
* unreserved set — it emits the always-linked scr_qs_escape, so
|
|
868
|
+
* escape-only programs never pull the unit. qs.unescape is Node's qsUnescape: strict decodeURIComponent
|
|
706
869
|
* first, the lenient legacy unescapeBuffer fallback on failure (never
|
|
707
870
|
* throws). qs.parse takes (str, sep, eq, maxKeys) — the frontend
|
|
708
871
|
* completes omitted/null sep/eq to "&"/"=" and the omitted maxKeys
|
|
@@ -717,7 +880,8 @@ export const LIB_FN_SIGS = defineLibFnSignatures({
|
|
|
717
880
|
* through) — Node's encodeStringified rules run in the runtime, so
|
|
718
881
|
* arrays expand to repeated keys and null/undefined/nested objects are
|
|
719
882
|
* empty values. Custom encoder/decoder options fence at compile time.
|
|
720
|
-
* All borrow; string results +1;
|
|
883
|
+
* All borrow; string results +1; escape and stringify throw URIError
|
|
884
|
+
* [ERR_INVALID_URI] on a lone surrogate. */
|
|
721
885
|
"qs.parse": { argTypes: [STRING, STRING, STRING, F64], result: VOID },
|
|
722
886
|
"qs.stringify": { argTypes: [DYN, STRING, STRING], result: STRING },
|
|
723
887
|
"qs.escape": { argTypes: [STRING], result: STRING },
|
|
@@ -735,6 +899,13 @@ export const LIB_FN_SIGS = defineLibFnSignatures({
|
|
|
735
899
|
"util.toUSVString": { argTypes: [DYN], result: STRING },
|
|
736
900
|
"util.isDeepStrictEqual": { argTypes: [DYN, DYN, DYN], result: BOOL },
|
|
737
901
|
"util.styleText": { argTypes: [DYN, DYN, DYN], result: STRING },
|
|
902
|
+
/** util.inherits/deprecate/callbackify/debuglog over checked-dynamic
|
|
903
|
+
* arguments (scr_util_callable.c). The function results are native dyn
|
|
904
|
+
* wrappers; call sites with a static function type check them back. */
|
|
905
|
+
"util.inherits": { argTypes: [DYN, DYN], result: VOID },
|
|
906
|
+
"util.deprecate": { argTypes: [DYN, DYN, DYN, DYN], result: DYN },
|
|
907
|
+
"util.callbackify": { argTypes: [DYN], result: DYN },
|
|
908
|
+
"util.debuglog": { argTypes: [DYN, DYN], result: DYN },
|
|
738
909
|
"util.typeIs": { argTypes: [DYN, STRING], result: BOOL },
|
|
739
910
|
"util.typeValue": { argTypes: [DYN, STRING], result: DYN },
|
|
740
911
|
/** fs.statSync → a Stats value (may throw, like the other sync fs
|
|
@@ -815,6 +986,21 @@ export const LIB_FN_SIGS = defineLibFnSignatures({
|
|
|
815
986
|
"stats.atimeMs": { argTypes: [STATS_T], result: F64 },
|
|
816
987
|
"stats.mtimeMs": { argTypes: [STATS_T], result: F64 },
|
|
817
988
|
"stats.ctimeMs": { argTypes: [STATS_T], result: F64 },
|
|
989
|
+
"stats.birthtimeMs": { argTypes: [STATS_T], result: F64 },
|
|
990
|
+
"stats.mode": { argTypes: [STATS_T], result: F64 },
|
|
991
|
+
"stats.uid": { argTypes: [STATS_T], result: F64 },
|
|
992
|
+
"stats.gid": { argTypes: [STATS_T], result: F64 },
|
|
993
|
+
"stats.rdev": { argTypes: [STATS_T], result: F64 },
|
|
994
|
+
"stats.blksize": { argTypes: [STATS_T], result: F64 },
|
|
995
|
+
"stats.isBlockDevice": { argTypes: [STATS_T], result: BOOL },
|
|
996
|
+
"stats.isCharacterDevice": { argTypes: [STATS_T], result: BOOL },
|
|
997
|
+
"stats.isFIFO": { argTypes: [STATS_T], result: BOOL },
|
|
998
|
+
"stats.isSocket": { argTypes: [STATS_T], result: BOOL },
|
|
999
|
+
/** The Date fields: the *Ms value rounded (Node's dateFromMs). */
|
|
1000
|
+
"stats.atime": { argTypes: [STATS_T], result: DATE_T },
|
|
1001
|
+
"stats.mtime": { argTypes: [STATS_T], result: DATE_T },
|
|
1002
|
+
"stats.ctime": { argTypes: [STATS_T], result: DATE_T },
|
|
1003
|
+
"stats.birthtime": { argTypes: [STATS_T], result: DATE_T },
|
|
818
1004
|
// The wider sync fs slice (unlink/chmod/chown/copyfile and the
|
|
819
1005
|
// mode-carrying write/mkdir forms).
|
|
820
1006
|
/** The wider sync fs slice (scr_lib.c), all throwing catchably with
|
|
@@ -837,6 +1023,11 @@ export const LIB_FN_SIGS = defineLibFnSignatures({
|
|
|
837
1023
|
"fs.unlinkSync": { argTypes: [STRING], result: VOID },
|
|
838
1024
|
"fs.chmodSync": { argTypes: [STRING, F64], result: VOID },
|
|
839
1025
|
"fs.chownSync": { argTypes: [STRING, F64, F64], result: VOID },
|
|
1026
|
+
"fs.lchownSync": { argTypes: [STRING, F64, F64], result: VOID },
|
|
1027
|
+
"fs.fchownSync": { argTypes: [F64, F64, F64], result: VOID },
|
|
1028
|
+
/** truncateSync opens the path with 'r+', then truncates (len checked and
|
|
1029
|
+
* clamped like ftruncateSync's) and closes it. */
|
|
1030
|
+
"fs.truncateSync": { argTypes: [STRING, F64], result: VOID },
|
|
840
1031
|
"fs.copyFileSync": { argTypes: [STRING, STRING], result: VOID },
|
|
841
1032
|
/** renameSync is the direct two-path syscall wrapper. renameCb defers
|
|
842
1033
|
* the operation to the loop and fires a program-shaped Error | null
|
|
@@ -945,6 +1136,10 @@ export const LIB_FN_SIGS = defineLibFnSignatures({
|
|
|
945
1136
|
},
|
|
946
1137
|
"net.serverPort": { argTypes: [NETSERVER_T], result: F64 },
|
|
947
1138
|
"net.serverListening": { argTypes: [NETSERVER_T], result: BOOL },
|
|
1139
|
+
/** socket.ref()/unref() and server.ref()/unref(): whether the handle
|
|
1140
|
+
* keeps the event loop alive. */
|
|
1141
|
+
"net.sockSetRef": { argTypes: [NETSOCKET_T, BOOL], result: VOID },
|
|
1142
|
+
"net.serverSetRef": { argTypes: [NETSERVER_T, BOOL], result: VOID },
|
|
948
1143
|
// net.serverAddress's record result is shape-checked in the libCall case
|
|
949
1144
|
// (the dgram.address sentinel pattern).
|
|
950
1145
|
/** server.address() as the full AddressInfo record (the dgram.address
|
|
@@ -1174,8 +1369,9 @@ export const LIB_FN_SIGS = defineLibFnSignatures({
|
|
|
1174
1369
|
/** The ServerResponse member surface: statusCode/statusMessage reads
|
|
1175
1370
|
* and assignments (Node's writable properties), the header CRUD trio
|
|
1176
1371
|
* (getHeader answers `string | undefined` like reqHeader), and
|
|
1177
|
-
* end(cb)'s
|
|
1178
|
-
* the callback fires deferred, Node's 'finish'
|
|
1372
|
+
* end(cb)'s callback slot (resOnEndCallback registers, the end call
|
|
1373
|
+
* follows — the callback fires deferred, just before Node's 'finish'
|
|
1374
|
+
* emit; resOnFinish is the 'finish' listener slot). writeHead's
|
|
1179
1375
|
* statusMessage forms compose in interned helpers: resStatusMsgSet
|
|
1180
1376
|
* then the ordinary writeHead entry. */
|
|
1181
1377
|
"http.resStatusGet": { argTypes: [HTTPRES_T], result: F64 },
|
|
@@ -1206,6 +1402,10 @@ export const LIB_FN_SIGS = defineLibFnSignatures({
|
|
|
1206
1402
|
argTypes: [HTTPRES_T, { kind: "func", params: [], ret: VOID }],
|
|
1207
1403
|
result: VOID,
|
|
1208
1404
|
},
|
|
1405
|
+
"http.resOnEndCallback": {
|
|
1406
|
+
argTypes: [HTTPRES_T, { kind: "func", params: [], ret: VOID }],
|
|
1407
|
+
result: VOID,
|
|
1408
|
+
},
|
|
1209
1409
|
"http.reqUrl": { argTypes: [HTTPREQ_T], result: STRING },
|
|
1210
1410
|
"http.reqMethod": { argTypes: [HTTPREQ_T], result: STRING },
|
|
1211
1411
|
"http.reqHeader": { argTypes: [HTTPREQ_T, STRING], result: VOID },
|
|
@@ -1339,11 +1539,11 @@ export const LIB_FN_SIGS = defineLibFnSignatures({
|
|
|
1339
1539
|
},
|
|
1340
1540
|
"http.resWriteHeadPairs": { argTypes: [HTTPRES_T, F64, arrayOf(STRING)], result: VOID },
|
|
1341
1541
|
/** writeHead(status, headers) with a checked-dynamic headers value —
|
|
1342
|
-
* the runtime OBJ walk (string/number values;
|
|
1343
|
-
* may throw). */
|
|
1542
|
+
* the runtime OBJ walk (string/number values; other values throw
|
|
1543
|
+
* Node's invalid-argument TypeError; may throw). */
|
|
1344
1544
|
"http.resWriteHeadDyn": { argTypes: [HTTPRES_T, F64, DYN], result: VOID },
|
|
1345
1545
|
"net.sockSetTimeout": { argTypes: [NETSOCKET_T, F64], result: VOID },
|
|
1346
|
-
/** setEncoding('utf8') — 'data' delivers strings inside the chunk-encoding window; other real encodings
|
|
1546
|
+
/** setEncoding('utf8') — 'data' delivers strings inside the chunk-encoding window; other real encodings throw the "not supported yet" Error, unknown names throw ERR_UNKNOWN_ENCODING (may throw). */
|
|
1347
1547
|
"net.sockSetEncoding": { argTypes: [NETSOCKET_T, STRING], result: VOID },
|
|
1348
1548
|
"http.reqSetEncoding": { argTypes: [HTTPREQ_T, STRING], result: VOID },
|
|
1349
1549
|
"net.sockOnTimeout": {
|
|
@@ -1570,7 +1770,7 @@ export const LIB_FN_SIGS = defineLibFnSignatures({
|
|
|
1570
1770
|
* for the server_name extension BEFORE the TLS handshake begins, calls
|
|
1571
1771
|
* the callback with (servername, answer-closure), and resumes the
|
|
1572
1772
|
* handshake when the answer arrives — cb(err) tears the socket down
|
|
1573
|
-
*
|
|
1773
|
+
* without an error event (Node's 'tlsClientError' default), cb(null, ctx) serves
|
|
1574
1774
|
* ctx's cert/key, cb(null, undefined) serves the default pair. */
|
|
1575
1775
|
"http2.createSecureServerSni": { argTypes: [null, null, null, BOOL], result: NETSERVER_T },
|
|
1576
1776
|
// The ALPN=h2 server (createSecureServer without allowHTTP1): the real
|
|
@@ -2045,7 +2245,7 @@ export const LIB_FN_SIGS = defineLibFnSignatures({
|
|
|
2045
2245
|
"crypto.hashDigestStr": { argTypes: [STRING, STRING, STRING], result: STRING },
|
|
2046
2246
|
"crypto.hashDigestBytes": { argTypes: [STRING, BYTES_U8, STRING], result: STRING },
|
|
2047
2247
|
/** First-class static Hash/Hmac handles. Constructors validate the
|
|
2048
|
-
* runtime algorithm string (
|
|
2248
|
+
* runtime algorithm string (every digest Node 24 lists); update returns the same
|
|
2049
2249
|
* handle by retained identity, copy snapshots Hash state, and digest
|
|
2050
2250
|
* finalizes the handle and returns either a Buffer or encoded string. */
|
|
2051
2251
|
"crypto.native": { argTypes: [], result: DYN },
|
|
@@ -2061,10 +2261,46 @@ export const LIB_FN_SIGS = defineLibFnSignatures({
|
|
|
2061
2261
|
"crypto.hashDigestBuffer": { argTypes: [CRYPTOHASH_T], result: BYTES_U8 },
|
|
2062
2262
|
"crypto.hmacDigestString": { argTypes: [CRYPTOHMAC_T, STRING], result: STRING },
|
|
2063
2263
|
"crypto.hmacDigestBuffer": { argTypes: [CRYPTOHMAC_T], result: BYTES_U8 },
|
|
2064
|
-
|
|
2264
|
+
/** The option and any-value forms, with Node's checks at run time. The
|
|
2265
|
+
* Dyn digests return a string or a Buffer, and crypto.hash's Dyn form
|
|
2266
|
+
* either one by its outputEncoding. */
|
|
2267
|
+
"crypto.hashNewOpts": { argTypes: [STRING, DYN], result: CRYPTOHASH_T },
|
|
2268
|
+
"crypto.hmacNewDyn": { argTypes: [STRING, DYN, DYN], result: CRYPTOHMAC_T },
|
|
2269
|
+
"crypto.hashCopyOpts": { argTypes: [CRYPTOHASH_T, DYN], result: CRYPTOHASH_T },
|
|
2270
|
+
"crypto.hashUpdateEnc": { argTypes: [CRYPTOHASH_T, STRING, STRING], result: CRYPTOHASH_T },
|
|
2271
|
+
"crypto.hmacUpdateEnc": { argTypes: [CRYPTOHMAC_T, STRING, STRING], result: CRYPTOHMAC_T },
|
|
2272
|
+
"crypto.hashUpdateDyn": { argTypes: [CRYPTOHASH_T, DYN, DYN], result: CRYPTOHASH_T },
|
|
2273
|
+
"crypto.hmacUpdateDyn": { argTypes: [CRYPTOHMAC_T, DYN, DYN], result: CRYPTOHMAC_T },
|
|
2274
|
+
"crypto.hashDigestDyn": { argTypes: [CRYPTOHASH_T, DYN], result: DYN },
|
|
2275
|
+
"crypto.hmacDigestDyn": { argTypes: [CRYPTOHMAC_T, DYN], result: DYN },
|
|
2276
|
+
"crypto.hashOneshot": { argTypes: [STRING, DYN, DYN], result: DYN },
|
|
2277
|
+
/** Views of any element kind (the validator checks both are views). */
|
|
2278
|
+
"crypto.timingSafeEqual": { argTypes: [null, null], result: BOOL },
|
|
2279
|
+
"crypto.timingSafeEqualDyn": { argTypes: [DYN, DYN], result: BOOL },
|
|
2065
2280
|
"crypto.randomFill": { argTypes: [BYTES_U8, F64, F64], result: BYTES_U8 },
|
|
2066
2281
|
"crypto.randomFillRest": { argTypes: [BYTES_U8, F64], result: BYTES_U8 },
|
|
2067
2282
|
"crypto.randomInt": { argTypes: [F64, F64], result: F64 },
|
|
2283
|
+
"crypto.randomIntMax": { argTypes: [F64], result: F64 },
|
|
2284
|
+
/** randomFillSync over any view returns that view at its own type (the
|
|
2285
|
+
* validator checks the result against the first argument). The Dyn form
|
|
2286
|
+
* takes ArrayBuffers and other values. The callback forms carry
|
|
2287
|
+
* randomFill's argument count before the callback; randomIntCb carries
|
|
2288
|
+
* whether min was given. */
|
|
2289
|
+
"crypto.randomFillView": { argTypes: [null, F64, F64], result: BYTES_U8 },
|
|
2290
|
+
"crypto.randomFillViewRest": { argTypes: [null, F64], result: BYTES_U8 },
|
|
2291
|
+
"crypto.randomFillSyncDyn": { argTypes: [DYN, DYN, DYN], result: DYN },
|
|
2292
|
+
"crypto.randomFillCb": { argTypes: [null, F64, F64, F64, null], result: VOID },
|
|
2293
|
+
"crypto.randomFillCbDyn": { argTypes: [DYN, DYN, DYN, F64, null], result: VOID },
|
|
2294
|
+
"crypto.randomIntCb": { argTypes: [F64, F64, F64, null], result: VOID },
|
|
2295
|
+
"crypto.randomUUIDOpts": { argTypes: [DYN], result: STRING },
|
|
2296
|
+
/** Secret KeyObjects: native handles whose getters and methods dispatch
|
|
2297
|
+
* through the handle. keyObjectInput reads a key's bytes for hkdf. */
|
|
2298
|
+
"crypto.createSecretKey": { argTypes: [DYN, DYN], result: DYN },
|
|
2299
|
+
"crypto.generateKeySync": { argTypes: [DYN, DYN], result: DYN },
|
|
2300
|
+
"crypto.generateKeyCb": { argTypes: [DYN, DYN, null], result: VOID },
|
|
2301
|
+
"crypto.keyObjectInput": { argTypes: [DYN], result: BYTES_U8 },
|
|
2302
|
+
"crypto.isKeyObject": { argTypes: [DYN], result: BOOL },
|
|
2303
|
+
"crypto.randomUUIDv7": { argTypes: [DYN], result: STRING },
|
|
2068
2304
|
"crypto.pbkdf2": { argTypes: [BYTES_U8, BYTES_U8, F64, F64, STRING], result: BYTES_U8 },
|
|
2069
2305
|
"crypto.randomBytesCb": { argTypes: [F64, null], result: VOID },
|
|
2070
2306
|
"crypto.pbkdf2Cb": { argTypes: [BYTES_U8, BYTES_U8, F64, F64, STRING, null], result: VOID },
|
|
@@ -2223,6 +2459,17 @@ export const LIB_FN_SIGS = defineLibFnSignatures({
|
|
|
2223
2459
|
"fsp.mkdirRecursiveMode": { argTypes: [STRING, F64], result: { kind: "promise", inner: VOID } },
|
|
2224
2460
|
"fsp.unlink": { argTypes: [STRING], result: { kind: "promise", inner: VOID } },
|
|
2225
2461
|
"fsp.chmod": { argTypes: [STRING, F64], result: { kind: "promise", inner: VOID } },
|
|
2462
|
+
"fsp.chown": { argTypes: [STRING, F64, F64], result: { kind: "promise", inner: VOID } },
|
|
2463
|
+
"fsp.lchown": { argTypes: [STRING, F64, F64], result: { kind: "promise", inner: VOID } },
|
|
2464
|
+
"fsp.access": { argTypes: [STRING, F64], result: { kind: "promise", inner: VOID } },
|
|
2465
|
+
"fsp.truncate": { argTypes: [STRING, F64], result: { kind: "promise", inner: VOID } },
|
|
2466
|
+
"fsp.appendFile": { argTypes: [STRING, STRING], result: { kind: "promise", inner: VOID } },
|
|
2467
|
+
"fsp.appendFileBytes": { argTypes: [STRING, BYTES_U8], result: { kind: "promise", inner: VOID } },
|
|
2468
|
+
"fsp.copyFile": { argTypes: [STRING, STRING], result: { kind: "promise", inner: VOID } },
|
|
2469
|
+
"fsp.mkdtemp": { argTypes: [STRING], result: { kind: "promise", inner: STRING } },
|
|
2470
|
+
/** readFile(path, encoding | { encoding }) for any runtime encoding name. */
|
|
2471
|
+
"fsp.readFileEncoded": { argTypes: [STRING, STRING], result: { kind: "promise", inner: STRING } },
|
|
2472
|
+
"fsp.rmdir": { argTypes: [STRING], result: { kind: "promise", inner: VOID } },
|
|
2226
2473
|
"fsp.link": { argTypes: [DYN, DYN], result: { kind: "promise", inner: VOID } },
|
|
2227
2474
|
"fsp.symlink": { argTypes: [DYN, DYN, DYN], result: { kind: "promise", inner: VOID } },
|
|
2228
2475
|
"fsp.readlink": { argTypes: [DYN, DYN], result: { kind: "promise", inner: DYN } },
|
|
@@ -2342,6 +2589,24 @@ export const LIB_FN_SIGS = defineLibFnSignatures({
|
|
|
2342
2589
|
"dyn.generatorThis": { argTypes: [], result: DYN },
|
|
2343
2590
|
"process.getuid": { argTypes: [], result: F64 },
|
|
2344
2591
|
"process.getgid": { argTypes: [], result: F64 },
|
|
2592
|
+
/** geteuid(2) / getegid(2) / getgroups(2) (the effective gid appended
|
|
2593
|
+
* when the list lacks it, like Node). Windows has no such members: the
|
|
2594
|
+
* calls throw the TypeError a missing member does (MAY THROW). */
|
|
2595
|
+
"process.geteuid": { argTypes: [], result: F64 },
|
|
2596
|
+
"process.getegid": { argTypes: [], result: F64 },
|
|
2597
|
+
"process.getgroups": { argTypes: [], result: arrayOf(F64) },
|
|
2598
|
+
/** process.ppid: the parent's pid at the read. Never throws. */
|
|
2599
|
+
"process.ppid": { argTypes: [], result: F64 },
|
|
2600
|
+
/** process.title: libuv's process title (argv[0] until set); setTitle
|
|
2601
|
+
* writes it (truncated to the original argument area on POSIX, the
|
|
2602
|
+
* console title on Windows). Never throw. */
|
|
2603
|
+
"process.title": { argTypes: [], result: STRING },
|
|
2604
|
+
"process.setTitle": { argTypes: [STRING], result: VOID },
|
|
2605
|
+
/** process.argv0: the original argv[0]. Never throws. */
|
|
2606
|
+
"process.argv0": { argTypes: [], result: STRING },
|
|
2607
|
+
/** process.release: the compatibility target's stable release object
|
|
2608
|
+
* (name, lts, sourceUrl, headersUrl, and libUrl on Windows). +1. */
|
|
2609
|
+
"process.release": { argTypes: [], result: DYN },
|
|
2345
2610
|
/** process.execPath: the compiled binary's own resolved absolute path
|
|
2346
2611
|
* (one interned string, +1 per read) — the honest answer where Node's
|
|
2347
2612
|
* is the node executable's (SEMANTICS.md divergence 12). Never throws. */
|
|
@@ -2455,6 +2720,32 @@ export const LIB_FN_SIGS = defineLibFnSignatures({
|
|
|
2455
2720
|
"console.new": { argTypes: [F64, F64, BOOL], result: DYN },
|
|
2456
2721
|
"console.bind": { argTypes: [DYN, F64, null], result: VOID },
|
|
2457
2722
|
"console.write": { argTypes: [DYN, STRING, BOOL], result: VOID },
|
|
2723
|
+
/** The global console's remaining members (scr_console_native.c; the
|
|
2724
|
+
* group indentation itself lives with the writers in scr_console.c).
|
|
2725
|
+
* Arguments are borrowed; string results are owned. noop is the
|
|
2726
|
+
* emitter-dropped tail of a lowering whose effects sit in statements.
|
|
2727
|
+
* label is `${label}` over a defaulted label (undefined -> "default";
|
|
2728
|
+
* a Symbol throws Node's TypeError). count prints "label: n".
|
|
2729
|
+
* countReset answers the warning text for an unknown (or non-string)
|
|
2730
|
+
* label, "" otherwise. time answers the duplicate-label warning text
|
|
2731
|
+
* or ""; timeEnd/timeLog answer Node's formatted elapsed time, or ""
|
|
2732
|
+
* for an unknown label (timeEnd drops the timer). group adds (+1) or
|
|
2733
|
+
* removes (-1) one two-space indentation step. clear writes the
|
|
2734
|
+
* cursor-home and erase-down sequences when stdout is a terminal.
|
|
2735
|
+
* table renders and prints Node's table for a dyn value (undefined
|
|
2736
|
+
* properties = all). dirDyn is console.dir's inspect of a dyn value
|
|
2737
|
+
* (custom inspection off: a Buffer anywhere inside throws the fence). */
|
|
2738
|
+
"console.noop": { argTypes: [], result: VOID },
|
|
2739
|
+
"console.label": { argTypes: [DYN], result: STRING },
|
|
2740
|
+
"console.count": { argTypes: [STRING], result: VOID },
|
|
2741
|
+
"console.countReset": { argTypes: [DYN], result: STRING },
|
|
2742
|
+
"console.time": { argTypes: [STRING], result: STRING },
|
|
2743
|
+
"console.timeEnd": { argTypes: [STRING], result: STRING },
|
|
2744
|
+
"console.timeLog": { argTypes: [STRING], result: STRING },
|
|
2745
|
+
"console.group": { argTypes: [F64], result: VOID },
|
|
2746
|
+
"console.clear": { argTypes: [], result: VOID },
|
|
2747
|
+
"console.table": { argTypes: [DYN, DYN], result: VOID },
|
|
2748
|
+
"console.dirDyn": { argTypes: [DYN, F64], result: STRING },
|
|
2458
2749
|
/** A native reference to the global object; known names retain value fences. */
|
|
2459
2750
|
"global.native": { argTypes: [arrayOf(STRING)], result: DYN },
|
|
2460
2751
|
// `X.name` through a class value: the arg is a program-dependent
|
|
@@ -2512,6 +2803,18 @@ export const LIB_FN_SIGS = defineLibFnSignatures({
|
|
|
2512
2803
|
* list throws DataCloneError, nothing static is transferable). Result
|
|
2513
2804
|
* +1 %DOMException. */
|
|
2514
2805
|
"error.domClone": { argTypes: [null, DYN], result: VOID },
|
|
2806
|
+
/** `new AggregateError(errors, message?, options?)` (scr_json.c), in
|
|
2807
|
+
* spec order: newAggregate installs the message and cause (both dyn,
|
|
2808
|
+
* borrowed — the message conversion can throw) and returns an owned
|
|
2809
|
+
* %AggregateError; aggregateSetErrors then stores the iterated list
|
|
2810
|
+
* (borrowed receiver, the dyn array borrowed and retained).
|
|
2811
|
+
* aggregateErrors reads the list (+1, the same array every read). */
|
|
2812
|
+
"error.newAggregate": {
|
|
2813
|
+
argTypes: [DYN, DYN],
|
|
2814
|
+
result: { kind: "object", className: "%AggregateError" },
|
|
2815
|
+
},
|
|
2816
|
+
"error.aggregateSetErrors": { argTypes: [null, DYN], result: VOID },
|
|
2817
|
+
"error.aggregateErrors": { argTypes: [null], result: DYN },
|
|
2515
2818
|
/** `d instanceof TypeError` (and the other BUILTIN error classes) on a
|
|
2516
2819
|
* checked-dynamic value (scr_json.c): the from_error cache holds the
|
|
2517
2820
|
* dyn↔error identity edge, so the test resolves the runtime error and
|
|
@@ -2569,6 +2872,12 @@ export const LIB_FN_SIGS = defineLibFnSignatures({
|
|
|
2569
2872
|
* ("Cannot convert undefined or null to object"). */
|
|
2570
2873
|
"dyn.objKeys": { argTypes: [DYN], result: DYN },
|
|
2571
2874
|
"dyn.forInKeys": { argTypes: [DYN], result: DYN },
|
|
2875
|
+
"dyn.forInKeyStrings": { argTypes: [DYN], result: arrayOf(STRING) },
|
|
2876
|
+
"dyn.forInStable": { argTypes: [DYN], result: BOOL },
|
|
2877
|
+
"dyn.objKeyStrings": { argTypes: [DYN], result: arrayOf(STRING) },
|
|
2878
|
+
/** Object.entries as a native [string, any][] (VOID: the tuple row's
|
|
2879
|
+
* shape is program-dependent; the validator checks it). */
|
|
2880
|
+
"dyn.objEntryPairs": { argTypes: [DYN], result: VOID },
|
|
2572
2881
|
"dyn.hasOwn": { argTypes: [DYN, STRING], result: BOOL },
|
|
2573
2882
|
"dyn.propertyIsEnumerable": { argTypes: [DYN, STRING], result: BOOL },
|
|
2574
2883
|
"dyn.assign": { argTypes: [DYN, DYN], result: DYN },
|
|
@@ -2626,6 +2935,9 @@ export const LIB_FN_SIGS = defineLibFnSignatures({
|
|
|
2626
2935
|
"dyn.seal": { argTypes: [DYN], result: DYN },
|
|
2627
2936
|
"dyn.isSealed": { argTypes: [DYN], result: BOOL },
|
|
2628
2937
|
"dyn.objValues": { argTypes: [DYN], result: DYN },
|
|
2938
|
+
/** Object.values as a native vector of checked values, for results the
|
|
2939
|
+
* program consumes directly (for-of, index reads, read-only methods). */
|
|
2940
|
+
"dyn.objValueList": { argTypes: [DYN], result: arrayOf(DYN) },
|
|
2629
2941
|
"dyn.objEntries": { argTypes: [DYN], result: DYN },
|
|
2630
2942
|
/** structuredClone over the checked-dynamic tree (scr_json.c): the JSON-safe subset plus
|
|
2631
2943
|
* bytes (a fresh copy — a Buffer clones as a plain Uint8Array, like
|
|
@@ -2658,6 +2970,12 @@ export const LIB_FN_SIGS = defineLibFnSignatures({
|
|
|
2658
2970
|
"regex.resetLastIndex": { argTypes: [REGEX, F64], result: VOID },
|
|
2659
2971
|
"regex.newChecked": { argTypes: [DYN, DYN], result: REGEX },
|
|
2660
2972
|
"regex.replaceCallback": { argTypes: [STRING, REGEX, DYN, BOOL], result: STRING },
|
|
2973
|
+
// Reads of capture args[1] of an execSpans/matchGroups result:
|
|
2974
|
+
// `capture === args[2]`, Number(capture) and parseInt(capture,
|
|
2975
|
+
// args[2]). Borrowed; never throw.
|
|
2976
|
+
"regex.groupEquals": { argTypes: [arrayOf(STRING), F64, STRING], result: BOOL },
|
|
2977
|
+
"regex.groupNumber": { argTypes: [arrayOf(STRING), F64], result: F64 },
|
|
2978
|
+
"regex.groupParseInt": { argTypes: [arrayOf(STRING), F64, F64], result: F64 },
|
|
2661
2979
|
// node:events EventEmitter: receivers are emitter-hierarchy objects and
|
|
2662
2980
|
// the chaining forms (on/off/removeAll/setMax) return the receiver's
|
|
2663
2981
|
// own class — program-dependent object types, checked in the libCall
|
|
@@ -2718,6 +3036,9 @@ export const LIB_FN_SIGS = defineLibFnSignatures({
|
|
|
2718
3036
|
"emitter.getMax": { argTypes: [null], result: F64 },
|
|
2719
3037
|
"emitter.setDefaultMax": { argTypes: [F64], result: VOID },
|
|
2720
3038
|
"emitter.getDefaultMax": { argTypes: [], result: F64 },
|
|
3039
|
+
/** The events.errorMonitor event key: an immortal string the runtime
|
|
3040
|
+
* registry matches by identity, so no string event name reaches it. */
|
|
3041
|
+
"emitter.errorMonitor": { argTypes: [], result: STRING },
|
|
2721
3042
|
// node:stream: receivers are stream-hierarchy objects and several
|
|
2722
3043
|
// results are program-dependent (the receiver's class, unions) — the
|
|
2723
3044
|
// libCall case owns those checks. The constructors and a few methods
|
|
@@ -2785,6 +3106,14 @@ export const LIB_FN_SIGS = defineLibFnSignatures({
|
|
|
2785
3106
|
* propagates the first error by destroying the rest, calls cb after the
|
|
2786
3107
|
* last 'close'; answers the destination +1. The Dyn twins take the
|
|
2787
3108
|
* callback as a checked-dynamic VALUE (mustCall wrappers). */
|
|
3109
|
+
/** stream.addAbortSignal: [stream, signal] — the constructors' signal
|
|
3110
|
+
* option, chained over the fresh stream (falsy signals are ignored);
|
|
3111
|
+
* stream.addAbortSignalFn: [signal, stream] — addAbortSignal(signal,
|
|
3112
|
+
* stream). Both answer the stream (+1) and throw ERR_INVALID_ARG_TYPE
|
|
3113
|
+
* for a value that is not an AbortSignal; they link the event-target
|
|
3114
|
+
* unit (addAbortListener). */
|
|
3115
|
+
"stream.addAbortSignal": { argTypes: [null, DYN], result: VOID },
|
|
3116
|
+
"stream.addAbortSignalFn": { argTypes: [DYN, null], result: VOID },
|
|
2788
3117
|
"stream.finished": { argTypes: [null, null], result: VOID },
|
|
2789
3118
|
"stream.finishedDyn": { argTypes: [null, DYN], result: VOID },
|
|
2790
3119
|
"stream.pipeline": { argTypes: [F64], result: VOID },
|
|
@@ -2795,6 +3124,25 @@ export const LIB_FN_SIGS = defineLibFnSignatures({
|
|
|
2795
3124
|
* chaining/destroyer semantics settling a void promise (fulfilled on a
|
|
2796
3125
|
* clean finish, rejected with the finish status otherwise). */
|
|
2797
3126
|
"sp.finished": { argTypes: [null], result: { kind: "promise", inner: VOID } },
|
|
3127
|
+
/** The options forms: finished(s, { readable, writable, error, cleanup,
|
|
3128
|
+
* signal }) as [s, readable, writable, error, cleanup, signal?] —
|
|
3129
|
+
* readable/writable -1 (absent), 0 or 1 — and pipeline(...streams,
|
|
3130
|
+
* { signal, end }) as [count, s1..sn, end, signal?]. The Signal forms
|
|
3131
|
+
* link the event-target unit (addAbortListener). The callback form
|
|
3132
|
+
* stream.finishedOpts: [s, readable, writable, error, signal?, cb] →
|
|
3133
|
+
* the cleanup closure. */
|
|
3134
|
+
"sp.finishedOpts": {
|
|
3135
|
+
argTypes: [null, F64, F64, BOOL, BOOL],
|
|
3136
|
+
result: { kind: "promise", inner: VOID },
|
|
3137
|
+
},
|
|
3138
|
+
"sp.finishedOptsSignal": {
|
|
3139
|
+
argTypes: [null, F64, F64, BOOL, BOOL, DYN],
|
|
3140
|
+
result: { kind: "promise", inner: VOID },
|
|
3141
|
+
},
|
|
3142
|
+
"sp.pipelineOpts": { argTypes: [F64], result: { kind: "promise", inner: VOID } },
|
|
3143
|
+
"sp.pipelineOptsSignal": { argTypes: [F64], result: { kind: "promise", inner: VOID } },
|
|
3144
|
+
"stream.finishedOpts": { argTypes: [null, F64, F64, BOOL, null], result: VOID },
|
|
3145
|
+
"stream.finishedOptsSignal": { argTypes: [null, F64, F64, BOOL, DYN, null], result: VOID },
|
|
2798
3146
|
"sp.pipeline": { argTypes: [F64], result: { kind: "promise", inner: VOID } },
|
|
2799
3147
|
/** node:stream/consumers — the promise consumers over the readable
|
|
2800
3148
|
* machinery: (s) → a pending promise settled at the terminal point
|
|
@@ -2930,7 +3278,7 @@ export const LIB_FN_SIGS = defineLibFnSignatures({
|
|
|
2930
3278
|
* the rendering enumerable) or the custom message.
|
|
2931
3279
|
* assert.throwsRegex: (regex, error, msg, hasMsg) — the
|
|
2932
3280
|
* assert.throws(fn, /re/) check over String(error), Node's
|
|
2933
|
-
* regex-mismatch message. assert.regexErrTest: doesNotReject's
|
|
3281
|
+
* regex-mismatch message. assert.regexErrTest: doesNotReject's
|
|
2934
3282
|
* regex predicate over String(error) (never throws).
|
|
2935
3283
|
* assert.unwantedRejection: (error, msg, hasMsg) — doesNotReject's
|
|
2936
3284
|
* "Got unwanted rejection" throw.
|
|
@@ -3015,7 +3363,8 @@ export const LIB_FN_SIGS = defineLibFnSignatures({
|
|
|
3015
3363
|
"insp.f64": { argTypes: [F64], result: STRING },
|
|
3016
3364
|
/** util.format %j over a checked-dynamic argument: the runtime dyn
|
|
3017
3365
|
* walk (JS-exact stringify; root undefined/function prints
|
|
3018
|
-
* "undefined"; a handle in the tree throws the
|
|
3366
|
+
* "undefined"; a handle in the tree throws the "not supported yet"
|
|
3367
|
+
* Error). */
|
|
3019
3368
|
"insp.jsonDyn": { argTypes: [DYN], result: STRING },
|
|
3020
3369
|
"insp.str": { argTypes: [STRING], result: STRING },
|
|
3021
3370
|
"insp.regex": { argTypes: [REGEX], result: STRING },
|
|
@@ -3039,6 +3388,12 @@ export const LIB_FN_SIGS = defineLibFnSignatures({
|
|
|
3039
3388
|
"insp.key": { argTypes: [STRING], result: STRING },
|
|
3040
3389
|
"insp.moreItems": { argTypes: [F64], result: STRING },
|
|
3041
3390
|
"insp.end": { argTypes: [STRING, STRING, STRING, F64, BOOL, BOOL], result: STRING },
|
|
3391
|
+
/** A nested inspect inside a custom rendering (PerformanceEntry's
|
|
3392
|
+
* `${name} ${inspect(toJSON)}`): nestedBegin starts a fresh inspect
|
|
3393
|
+
* context, nestedEnd(prefix, inner) restores the caller's and answers
|
|
3394
|
+
* `prefix inner` re-indented at the caller's level (+1). */
|
|
3395
|
+
"insp.nestedBegin": { argTypes: [], result: VOID },
|
|
3396
|
+
"insp.nestedEnd": { argTypes: [STRING, STRING], result: STRING },
|
|
3042
3397
|
/** node:string_decoder's utf8 StringDecoder (scr_string.c): the decoder
|
|
3043
3398
|
* value is a one-field record whose f64 PACKS the pending partial
|
|
3044
3399
|
* sequence (count + up to 3 raw bytes — Node buffers at most 3 for
|
|
@@ -3052,27 +3407,46 @@ export const LIB_FN_SIGS = defineLibFnSignatures({
|
|
|
3052
3407
|
"strdec.next": { argTypes: [STRING, F64, BYTES_U8], result: F64 },
|
|
3053
3408
|
"strdec.end": { argTypes: [STRING, F64], result: STRING },
|
|
3054
3409
|
// node:readline: the interface handle is f64; the callbacks' func types
|
|
3055
|
-
// are program-dependent (
|
|
3056
|
-
//
|
|
3057
|
-
/** node:readline
|
|
3058
|
-
* the events gate — these fns imply moduleUsesProcessEvents
|
|
3059
|
-
*
|
|
3060
|
-
*
|
|
3061
|
-
*
|
|
3062
|
-
*
|
|
3063
|
-
*
|
|
3064
|
-
*
|
|
3065
|
-
*
|
|
3066
|
-
*
|
|
3067
|
-
* interface (may-throw).
|
|
3068
|
-
*
|
|
3069
|
-
*
|
|
3070
|
-
*
|
|
3071
|
-
*
|
|
3072
|
-
|
|
3410
|
+
// are program-dependent (the emitter picks the adapter by parameter
|
|
3411
|
+
// count), so those slots are null like child.onExit's.
|
|
3412
|
+
/** node:readline and node:readline/promises (scr_readline.c, linked
|
|
3413
|
+
* under the events gate — these fns imply moduleUsesProcessEvents; a
|
|
3414
|
+
* stream input or output adds scr_stream.c's bridge). The interface
|
|
3415
|
+
* value is an f64 handle (the Timeout-id precedent); an open interface
|
|
3416
|
+
* on stdin keeps the loop alive until close/EOF.
|
|
3417
|
+
* rl.create: [mode, input?, output?, crlfDelay, prompt?] → f64, mode
|
|
3418
|
+
* bits 1 stream input, 2 stream output, 4 stdout output, 16 prompt
|
|
3419
|
+
* (lowerReadlineCreateCall); rl.createSignal: the same plus the
|
|
3420
|
+
* trailing AbortSignal (mode bit 8), which links the event-target unit
|
|
3421
|
+
* for addAbortListener. rl.question: [handle, query, cb] — the callback
|
|
3422
|
+
* form; THROWS ERR_USE_AFTER_CLOSE on a closed interface (may-throw).
|
|
3423
|
+
* rl.questionAsync(Signal): [handle, query, signal?] → promise<string>,
|
|
3424
|
+
* rejecting instead of throwing. rl.close/pause/resume/prompt:
|
|
3425
|
+
* [handle] (pause/resume/prompt throw ERR_USE_AFTER_CLOSE when
|
|
3426
|
+
* closed); rl.setPrompt/getPrompt; rl.write: [handle, data] (throws
|
|
3427
|
+
* when closed). rl.on: [handle, event, cb, once] — the event number
|
|
3428
|
+
* (0 'line', 1 'close', 2 'pause', 3 'resume', 4 'error') and the
|
|
3429
|
+
* listener (moves). rl.iterOpen/iterNext/iterReturn: the async
|
|
3430
|
+
* iterator — iterNext answers promise<dyn> of the line or undefined. */
|
|
3431
|
+
"rl.create": { argTypes: [F64], result: F64 },
|
|
3432
|
+
"rl.createSignal": { argTypes: [F64], result: F64 },
|
|
3073
3433
|
"rl.question": { argTypes: [F64, STRING, null], result: VOID },
|
|
3434
|
+
"rl.questionAsync": { argTypes: [F64, STRING], result: { kind: "promise", inner: STRING } },
|
|
3435
|
+
"rl.questionAsyncSignal": {
|
|
3436
|
+
argTypes: [F64, STRING, DYN],
|
|
3437
|
+
result: { kind: "promise", inner: STRING },
|
|
3438
|
+
},
|
|
3074
3439
|
"rl.close": { argTypes: [F64], result: VOID },
|
|
3075
|
-
"rl.
|
|
3440
|
+
"rl.pause": { argTypes: [F64], result: VOID },
|
|
3441
|
+
"rl.resume": { argTypes: [F64], result: VOID },
|
|
3442
|
+
"rl.prompt": { argTypes: [F64], result: VOID },
|
|
3443
|
+
"rl.setPrompt": { argTypes: [F64, STRING], result: VOID },
|
|
3444
|
+
"rl.getPrompt": { argTypes: [F64], result: STRING },
|
|
3445
|
+
"rl.write": { argTypes: [F64, STRING], result: VOID },
|
|
3446
|
+
"rl.on": { argTypes: [F64, F64, null, BOOL], result: VOID },
|
|
3447
|
+
"rl.iterOpen": { argTypes: [F64], result: VOID },
|
|
3448
|
+
"rl.iterNext": { argTypes: [F64], result: { kind: "promise", inner: DYN } },
|
|
3449
|
+
"rl.iterReturn": { argTypes: [F64], result: VOID },
|
|
3076
3450
|
/** node:timers/promises — the promisified pair (scr_async.c, beside
|
|
3077
3451
|
* the timer heap they ride): tp.setTimeout: [ms] → a pending void
|
|
3078
3452
|
* promise a one-shot heap timer fulfills (the loop's timer phase, FIFO
|
|
@@ -3159,14 +3533,23 @@ export const LIB_FN_SIGS = defineLibFnSignatures({
|
|
|
3159
3533
|
* Node's payload. */
|
|
3160
3534
|
"process.onRejectionHandled": { argTypes: [DYN, BOOL], result: VOID },
|
|
3161
3535
|
"process.offRejectionHandled": { argTypes: [DYN], result: VOID },
|
|
3162
|
-
/** process warnings (
|
|
3163
|
-
* listeners; emitWarning applies Node's full argument grammar over
|
|
3164
|
-
* call's dyn argument vector (ERR_INVALID_ARG_TYPE TypeErrors — MAY
|
|
3165
|
-
* THROW
|
|
3166
|
-
*
|
|
3536
|
+
/** process warnings (scr_async_dyn.c): onWarning/offWarning register
|
|
3537
|
+
* dyn listeners; emitWarning applies Node's full argument grammar over
|
|
3538
|
+
* the call's dyn argument vector (ERR_INVALID_ARG_TYPE TypeErrors — MAY
|
|
3539
|
+
* THROW) and emits on the next tick, like Node: Node's stderr report,
|
|
3540
|
+
* then the listeners. */
|
|
3167
3541
|
"process.onWarning": { argTypes: [DYN], result: VOID },
|
|
3168
3542
|
"process.offWarning": { argTypes: [DYN], result: VOID },
|
|
3169
3543
|
"process.emitWarning": { argTypes: [DYN], result: VOID },
|
|
3544
|
+
/** A Warning-typed process warning with this message (the console
|
|
3545
|
+
* members' warnings), emitted on the next tick as Node's emitWarning
|
|
3546
|
+
* does (so the loop runs); an empty message emits nothing. */
|
|
3547
|
+
"process.emitWarningText": { argTypes: [STRING], result: VOID },
|
|
3548
|
+
/** process.noDeprecation (0) / process.throwDeprecation (1): the stored
|
|
3549
|
+
* value (undefined until assigned) and its assignment. util.deprecate's
|
|
3550
|
+
* warnings and DeprecationWarning emissions read their truthiness. */
|
|
3551
|
+
"process.deprecationFlag": { argTypes: [F64], result: DYN },
|
|
3552
|
+
"process.setDeprecationFlag": { argTypes: [F64, DYN], result: VOID },
|
|
3170
3553
|
/** AsyncLocalStorage (node:async_hooks — scr_async.c): stores are f64
|
|
3171
3554
|
* handles; contexts are immutable fiber-carried snapshots (spawned
|
|
3172
3555
|
* fibers inherit the spawner's — Node's init-time capture). run/exit
|
|
@@ -3262,8 +3645,8 @@ export const LIB_FN_SIGS = defineLibFnSignatures({
|
|
|
3262
3645
|
* behavioral difference; ignoreBOM defaults to false). Inline calls
|
|
3263
3646
|
* lower directly; stored decoder records dispatch by encoding id.
|
|
3264
3647
|
* TextEncoder.encode needs no libFn: its matching forms
|
|
3265
|
-
* lower to buffer.fromStr(s, "utf8") (identical bytes —
|
|
3266
|
-
*
|
|
3648
|
+
* lower to buffer.fromStr(s, "utf8") (identical bytes — both write each
|
|
3649
|
+
* lone surrogate as U+FFFD). Borrowed arg; owned (+1) string; never throws. */
|
|
3267
3650
|
"text.decode": { argTypes: [BYTES_U8], result: STRING },
|
|
3268
3651
|
"bytes.bufferSource": { argTypes: [DYN], result: BYTES_U8 },
|
|
3269
3652
|
"text.decodeBufferSource": { argTypes: [DYN], result: STRING },
|