@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,6 +1,6 @@
|
|
|
1
1
|
import * as ts from "../ts7/adapter.js";
|
|
2
2
|
import { UNSUPPORTED } from "../../diagnostics/diagnostic.js";
|
|
3
|
-
import { BOOL, BYTES_U8, CHILD_T, CRYPTOHASH_T, CRYPTOHMAC_T, DYN, F64, FILEHANDLE_T, SPAWNRES_T, STATS_T, STRING, URL_T, VOID, arrayOf, } from "../../ir/ir.js";
|
|
3
|
+
import { BOOL, BYTES_U8, CHILD_T, CRYPTOHASH_T, CRYPTOHMAC_T, DIR_T, DYN, F64, FILEHANDLE_T, SPAWNRES_T, STATS_T, STRING, URL_T, VOID, arrayOf, } from "../../ir/ir.js";
|
|
4
4
|
import { isNodeTypesPath, requireSpecOf } from "../program.js";
|
|
5
5
|
/** Statement-level constructs rejected wholesale, keyed by syntax kind. */
|
|
6
6
|
export const UNSUPPORTED_STMT = {
|
|
@@ -67,7 +67,7 @@ export const NARROW_FIRST = "narrow first: check a discriminant field, or compar
|
|
|
67
67
|
* per-key fences);
|
|
68
68
|
* - keys Node DOCUMENTS for the API but this compiler cannot honor
|
|
69
69
|
* fence BY NAME at the use site — an option that changes
|
|
70
|
-
* Node-observable behavior must work or fence
|
|
70
|
+
* Node-observable behavior must work or fence instead of dropping;
|
|
71
71
|
* - undocumented keys DROP exactly as Node drops them, provided the
|
|
72
72
|
* value expression is side-effect-free (an effectful initializer
|
|
73
73
|
* fences: Node would have evaluated it, so skipping it would be
|
|
@@ -164,6 +164,7 @@ export const HTTP_CLIENT_DOCUMENTED_OPTIONS = new Set([
|
|
|
164
164
|
"hints",
|
|
165
165
|
"host",
|
|
166
166
|
"hostname",
|
|
167
|
+
"httpValidation",
|
|
167
168
|
"insecureHTTPParser",
|
|
168
169
|
"joinDuplicateHeaders",
|
|
169
170
|
"localAddress",
|
|
@@ -193,6 +194,7 @@ export const HTTP_SERVER_DOCUMENTED_OPTIONS = new Set([
|
|
|
193
194
|
"connectionsCheckingInterval",
|
|
194
195
|
"headersTimeout",
|
|
195
196
|
"highWaterMark",
|
|
197
|
+
"httpValidation",
|
|
196
198
|
"insecureHTTPParser",
|
|
197
199
|
"joinDuplicateHeaders",
|
|
198
200
|
"keepAlive",
|
|
@@ -229,6 +231,7 @@ export const HTTPS_CLIENT_DOCUMENTED_OPTIONS = new Set([
|
|
|
229
231
|
...HTTP_CLIENT_DOCUMENTED_OPTIONS,
|
|
230
232
|
"ca",
|
|
231
233
|
"cert",
|
|
234
|
+
"certificateCompression",
|
|
232
235
|
"checkServerIdentity",
|
|
233
236
|
"ciphers",
|
|
234
237
|
"clientCertEngine",
|
|
@@ -264,6 +267,7 @@ export const TLS_SERVER_DOCUMENTED_OPTIONS = new Set([
|
|
|
264
267
|
"allowHalfOpen",
|
|
265
268
|
"ca",
|
|
266
269
|
"cert",
|
|
270
|
+
"certificateCompression",
|
|
267
271
|
"ciphers",
|
|
268
272
|
"clientCertEngine",
|
|
269
273
|
"crl",
|
|
@@ -465,7 +469,7 @@ export const COMPOUND_ASSIGN_OPS = {
|
|
|
465
469
|
* smuggle itself in by name. `minArgs`/`maxArgs` pin the LOWERED call
|
|
466
470
|
* forms: the lib declares wider signatures (optional position/fromIndex
|
|
467
471
|
* parameters) that typecheck but have no lowering — those forms are fenced
|
|
468
|
-
* per site instead of
|
|
472
|
+
* per site instead of dropping arguments without a diagnostic. */
|
|
469
473
|
export const STR_METHODS = {
|
|
470
474
|
charCodeAt: { method: "charCodeAt", result: F64, minArgs: 0, maxArgs: 1 },
|
|
471
475
|
charAt: { method: "charAt", result: STRING, minArgs: 0, maxArgs: 1 },
|
|
@@ -492,7 +496,7 @@ export const STR_METHODS = {
|
|
|
492
496
|
// regexIntrinsic). The optional limit is completed to 2^32-1 by the
|
|
493
497
|
// lowering so the IR/runtime always see the spec's effective value.
|
|
494
498
|
// Empty separator splits per UTF-16 code unit —
|
|
495
|
-
// astral halves become
|
|
499
|
+
// astral halves become lone surrogates.
|
|
496
500
|
split: { method: "split", result: arrayOf(STRING), minArgs: 0, maxArgs: 2 },
|
|
497
501
|
// Padding completes omitted lengths and fill strings in its lowering.
|
|
498
502
|
padStart: { method: "padStart", result: STRING, minArgs: 0, maxArgs: 2 },
|
|
@@ -501,10 +505,8 @@ export const STR_METHODS = {
|
|
|
501
505
|
toLowerCase: { method: "toLowerCase", result: STRING, minArgs: 0, maxArgs: 0 },
|
|
502
506
|
toUpperCase: { method: "toUpperCase", result: STRING, minArgs: 0, maxArgs: 0 },
|
|
503
507
|
normalize: { method: "normalize", result: STRING, minArgs: 0, maxArgs: 1 },
|
|
504
|
-
// The ES2024 well-formedness pair
|
|
505
|
-
//
|
|
506
|
-
// well-formed input; where Node would answer false the program already
|
|
507
|
-
// diverged at the string's creation, SEMANTICS.md 2).
|
|
508
|
+
// The ES2024 well-formedness pair: whether the string holds a lone
|
|
509
|
+
// surrogate, and the copy with each one replaced by U+FFFD.
|
|
508
510
|
isWellFormed: { method: "isWellFormed", result: BOOL, minArgs: 0, maxArgs: 0 },
|
|
509
511
|
toWellFormed: { method: "toWellFormed", result: STRING, minArgs: 0, maxArgs: 0 },
|
|
510
512
|
};
|
|
@@ -789,8 +791,19 @@ const PATH_MODULE_FNS = {
|
|
|
789
791
|
result: STRING,
|
|
790
792
|
valueParams: [{ mode: "required", type: STRING }],
|
|
791
793
|
},
|
|
794
|
+
matchesGlob: {
|
|
795
|
+
fn: "path.matchesGlob",
|
|
796
|
+
params: [STRING, STRING],
|
|
797
|
+
result: BOOL,
|
|
798
|
+
valueParams: exactValueParams(STRING, STRING),
|
|
799
|
+
},
|
|
800
|
+
// Special-cased (lowerPathParseCall / lowerPathFormatCall): the
|
|
801
|
+
// ParsedPath record and the pathObject argument follow the call site's
|
|
802
|
+
// mapped shapes.
|
|
803
|
+
parse: { fn: "path.parse", params: [STRING], result: VOID },
|
|
804
|
+
format: { fn: "path.format", params: [], result: STRING },
|
|
792
805
|
};
|
|
793
|
-
/** The win32 twins (scr_path.c's Node-v24 path.win32
|
|
806
|
+
/** The win32 twins (scr_path.c's exact port of Node-v24 path.win32):
|
|
794
807
|
* "path/win32" everywhere, and the bare-module table when the build
|
|
795
808
|
* TARGETS win32 — Node on Windows is path.win32. */
|
|
796
809
|
const PATH_WIN32_MODULE_FNS = {
|
|
@@ -857,14 +870,73 @@ const PATH_WIN32_MODULE_FNS = {
|
|
|
857
870
|
result: STRING,
|
|
858
871
|
valueParams: [{ mode: "required", type: STRING }],
|
|
859
872
|
},
|
|
873
|
+
matchesGlob: {
|
|
874
|
+
fn: "path.win32MatchesGlob",
|
|
875
|
+
params: [STRING, STRING],
|
|
876
|
+
result: BOOL,
|
|
877
|
+
valueParams: exactValueParams(STRING, STRING),
|
|
878
|
+
},
|
|
879
|
+
// Special-cased (lowerPathParseCall / lowerPathFormatCall): the
|
|
880
|
+
// ParsedPath record and the pathObject argument follow the call site's
|
|
881
|
+
// mapped shapes.
|
|
882
|
+
parse: { fn: "path.win32Parse", params: [STRING], result: VOID },
|
|
883
|
+
format: { fn: "path.win32Format", params: [], result: STRING },
|
|
860
884
|
};
|
|
885
|
+
/** util.types's own keys in Node's order (Node 24.22.0). The table is the
|
|
886
|
+
* key census for Object.keys over util.types and node:util/types, including
|
|
887
|
+
* the members that do not compile yet; the corpus checks it against Node. */
|
|
888
|
+
export const UTIL_TYPES_KEYS = [
|
|
889
|
+
"isArgumentsObject",
|
|
890
|
+
"isArrayBuffer",
|
|
891
|
+
"isAsyncFunction",
|
|
892
|
+
"isBigIntObject",
|
|
893
|
+
"isBooleanObject",
|
|
894
|
+
"isDate",
|
|
895
|
+
"isExternal",
|
|
896
|
+
"isGeneratorFunction",
|
|
897
|
+
"isGeneratorObject",
|
|
898
|
+
"isMap",
|
|
899
|
+
"isMapIterator",
|
|
900
|
+
"isModuleNamespaceObject",
|
|
901
|
+
"isNativeError",
|
|
902
|
+
"isNumberObject",
|
|
903
|
+
"isPromise",
|
|
904
|
+
"isProxy",
|
|
905
|
+
"isRegExp",
|
|
906
|
+
"isSet",
|
|
907
|
+
"isSetIterator",
|
|
908
|
+
"isSharedArrayBuffer",
|
|
909
|
+
"isStringObject",
|
|
910
|
+
"isSymbolObject",
|
|
911
|
+
"isWeakMap",
|
|
912
|
+
"isWeakSet",
|
|
913
|
+
"isAnyArrayBuffer",
|
|
914
|
+
"isBoxedPrimitive",
|
|
915
|
+
"isArrayBufferView",
|
|
916
|
+
"isDataView",
|
|
917
|
+
"isTypedArray",
|
|
918
|
+
"isUint8Array",
|
|
919
|
+
"isUint8ClampedArray",
|
|
920
|
+
"isUint16Array",
|
|
921
|
+
"isUint32Array",
|
|
922
|
+
"isInt8Array",
|
|
923
|
+
"isInt16Array",
|
|
924
|
+
"isInt32Array",
|
|
925
|
+
"isFloat16Array",
|
|
926
|
+
"isFloat32Array",
|
|
927
|
+
"isFloat64Array",
|
|
928
|
+
"isBigInt64Array",
|
|
929
|
+
"isBigUint64Array",
|
|
930
|
+
"isKeyObject",
|
|
931
|
+
"isCryptoKey",
|
|
932
|
+
];
|
|
861
933
|
export const BUILTIN_MODULE_FNS = {
|
|
862
934
|
fs: {
|
|
863
935
|
readFileSync: { fn: "fs.readFileSync", params: [STRING, STRING], result: STRING },
|
|
864
936
|
// The exact-API subset is first-class. A fixed native ABI is not enough:
|
|
865
937
|
// rows whose Node function has behavior-bearing trailing options remain
|
|
866
|
-
// call-only, or function-width adaptation could
|
|
867
|
-
//
|
|
938
|
+
// call-only, or function-width adaptation could discard those options
|
|
939
|
+
// without a diagnostic before entering the fixed runtime call.
|
|
868
940
|
writeFileSync: { fn: "fs.writeFileSync", params: [STRING, STRING], result: VOID },
|
|
869
941
|
appendFileSync: { fn: "fs.appendFileSync", params: [STRING, STRING], result: VOID },
|
|
870
942
|
existsSync: {
|
|
@@ -877,6 +949,8 @@ export const BUILTIN_MODULE_FNS = {
|
|
|
877
949
|
rmSync: { fn: "fs.rmSync", params: [STRING], result: VOID },
|
|
878
950
|
rmdirSync: { fn: "fs.rmdirSync", params: [STRING], result: VOID },
|
|
879
951
|
readdirSync: { fn: "fs.readdirSync", params: [STRING], result: arrayOf(STRING) },
|
|
952
|
+
// Pattern and options are checked by the runtime (lowerFsGlobSyncCall).
|
|
953
|
+
globSync: { fn: "fs.globSync", params: [DYN, DYN], result: arrayOf(STRING) },
|
|
880
954
|
statSync: { fn: "fs.statSync", params: [STRING], result: STATS_T },
|
|
881
955
|
mkdtempSync: { fn: "fs.mkdtempSync", params: [STRING], result: STRING },
|
|
882
956
|
// accessSync's omitted mode completes to 0 (F_OK) in the special case
|
|
@@ -900,6 +974,21 @@ export const BUILTIN_MODULE_FNS = {
|
|
|
900
974
|
result: VOID,
|
|
901
975
|
valueParams: exactValueParams(STRING, F64, F64),
|
|
902
976
|
},
|
|
977
|
+
lchownSync: {
|
|
978
|
+
fn: "fs.lchownSync",
|
|
979
|
+
params: [STRING, F64, F64],
|
|
980
|
+
result: VOID,
|
|
981
|
+
valueParams: exactValueParams(STRING, F64, F64),
|
|
982
|
+
},
|
|
983
|
+
fchownSync: {
|
|
984
|
+
fn: "fs.fchownSync",
|
|
985
|
+
params: [F64, F64, F64],
|
|
986
|
+
result: VOID,
|
|
987
|
+
valueParams: exactValueParams(F64, F64, F64),
|
|
988
|
+
},
|
|
989
|
+
// truncateSync's omitted len completes to 0 in lowerBuiltinModuleCall,
|
|
990
|
+
// like accessSync's mode.
|
|
991
|
+
truncateSync: { fn: "fs.truncateSync", params: [STRING, F64], result: VOID },
|
|
903
992
|
// The 2-argument form only: Node's mode flags (COPYFILE_EXCL, ...)
|
|
904
993
|
// land on the arity fence.
|
|
905
994
|
copyFileSync: { fn: "fs.copyFileSync", params: [STRING, STRING], result: VOID },
|
|
@@ -916,6 +1005,9 @@ export const BUILTIN_MODULE_FNS = {
|
|
|
916
1005
|
},
|
|
917
1006
|
// statSync's no-follow sibling; stats.isSymbolicLink answers what the
|
|
918
1007
|
// follow-free snapshot saw.
|
|
1008
|
+
// opendirSync's options (a literal { bufferSize, encoding: "utf8" })
|
|
1009
|
+
// lower in lowerBuiltinModuleCall; the row routes the dispatch.
|
|
1010
|
+
opendirSync: { fn: "fs.opendirSync", params: [STRING, F64], result: DIR_T },
|
|
919
1011
|
lstatSync: { fn: "fs.lstatSync", params: [STRING], result: STATS_T },
|
|
920
1012
|
fstatSync: {
|
|
921
1013
|
fn: "fs.fstatSync",
|
|
@@ -1030,9 +1122,16 @@ export const BUILTIN_MODULE_FNS = {
|
|
|
1030
1122
|
result: { kind: "promise", inner: arrayOf(STRING) },
|
|
1031
1123
|
},
|
|
1032
1124
|
rm: { fn: "fsp.rm", params: [STRING], result: { kind: "promise", inner: VOID } },
|
|
1125
|
+
// The async iterator lowers only as a for await head (lowerFspGlobCall).
|
|
1126
|
+
glob: { fn: "fsp.globStrings", params: [DYN, DYN], result: arrayOf(STRING) },
|
|
1033
1127
|
stat: { fn: "fsp.stat", params: [STRING], result: { kind: "promise", inner: STATS_T } },
|
|
1034
1128
|
realpath: { fn: "fsp.realpath", params: [STRING], result: { kind: "promise", inner: STRING } },
|
|
1035
1129
|
lstat: { fn: "fsp.lstat", params: [STRING], result: { kind: "promise", inner: STATS_T } },
|
|
1130
|
+
opendir: {
|
|
1131
|
+
fn: "fsp.opendir",
|
|
1132
|
+
params: [STRING, F64],
|
|
1133
|
+
result: { kind: "promise", inner: DIR_T },
|
|
1134
|
+
},
|
|
1036
1135
|
unlink: {
|
|
1037
1136
|
fn: "fsp.unlink",
|
|
1038
1137
|
params: [STRING],
|
|
@@ -1045,6 +1144,41 @@ export const BUILTIN_MODULE_FNS = {
|
|
|
1045
1144
|
result: { kind: "promise", inner: VOID },
|
|
1046
1145
|
valueParams: exactValueParams(STRING, F64),
|
|
1047
1146
|
},
|
|
1147
|
+
chown: {
|
|
1148
|
+
fn: "fsp.chown",
|
|
1149
|
+
params: [STRING, F64, F64],
|
|
1150
|
+
result: { kind: "promise", inner: VOID },
|
|
1151
|
+
valueParams: exactValueParams(STRING, F64, F64),
|
|
1152
|
+
},
|
|
1153
|
+
lchown: {
|
|
1154
|
+
fn: "fsp.lchown",
|
|
1155
|
+
params: [STRING, F64, F64],
|
|
1156
|
+
result: { kind: "promise", inner: VOID },
|
|
1157
|
+
valueParams: exactValueParams(STRING, F64, F64),
|
|
1158
|
+
},
|
|
1159
|
+
// access' omitted mode and truncate's omitted len complete to 0 in
|
|
1160
|
+
// lowerBuiltinModuleCall, like their sync spellings.
|
|
1161
|
+
access: { fn: "fsp.access", params: [STRING, F64], result: { kind: "promise", inner: VOID } },
|
|
1162
|
+
truncate: {
|
|
1163
|
+
fn: "fsp.truncate",
|
|
1164
|
+
params: [STRING, F64],
|
|
1165
|
+
result: { kind: "promise", inner: VOID },
|
|
1166
|
+
},
|
|
1167
|
+
// String data; Uint8Array/Buffer data routes to fsp.appendFileBytes in
|
|
1168
|
+
// lowerBuiltinModuleCall.
|
|
1169
|
+
appendFile: {
|
|
1170
|
+
fn: "fsp.appendFile",
|
|
1171
|
+
params: [STRING, STRING],
|
|
1172
|
+
result: { kind: "promise", inner: VOID },
|
|
1173
|
+
},
|
|
1174
|
+
// The 2-argument form only, like copyFileSync.
|
|
1175
|
+
copyFile: {
|
|
1176
|
+
fn: "fsp.copyFile",
|
|
1177
|
+
params: [STRING, STRING],
|
|
1178
|
+
result: { kind: "promise", inner: VOID },
|
|
1179
|
+
},
|
|
1180
|
+
mkdtemp: { fn: "fsp.mkdtemp", params: [STRING], result: { kind: "promise", inner: STRING } },
|
|
1181
|
+
rmdir: { fn: "fsp.rmdir", params: [STRING], result: { kind: "promise", inner: VOID } },
|
|
1048
1182
|
link: {
|
|
1049
1183
|
fn: "fsp.link",
|
|
1050
1184
|
params: [DYN, DYN],
|
|
@@ -1136,6 +1270,28 @@ export const BUILTIN_MODULE_FNS = {
|
|
|
1136
1270
|
result: F64,
|
|
1137
1271
|
valueParams: [],
|
|
1138
1272
|
},
|
|
1273
|
+
// os.arch() IS process.arch, like platform().
|
|
1274
|
+
arch: { fn: "process.arch", params: [], result: STRING, valueParams: [] },
|
|
1275
|
+
hostname: { fn: "os.hostname", params: [], result: STRING, valueParams: [] },
|
|
1276
|
+
// uv_os_uname's machine and version fields, read once at module load
|
|
1277
|
+
// in Node (they never change while a process runs).
|
|
1278
|
+
machine: { fn: "os.machine", params: [], result: STRING, valueParams: [] },
|
|
1279
|
+
version: { fn: "os.version", params: [], result: STRING, valueParams: [] },
|
|
1280
|
+
endianness: { fn: "os.endianness", params: [], result: STRING, valueParams: [] },
|
|
1281
|
+
freemem: { fn: "os.freemem", params: [], result: F64, valueParams: [] },
|
|
1282
|
+
uptime: { fn: "os.uptime", params: [], result: F64, valueParams: [] },
|
|
1283
|
+
loadavg: { fn: "os.loadavg", params: [], result: arrayOf(F64), valueParams: [] },
|
|
1284
|
+
// An omitted (or undefined) pid is 0, the current process
|
|
1285
|
+
// (lowerOsGetPriorityCall completes it).
|
|
1286
|
+
getPriority: {
|
|
1287
|
+
fn: "os.getPriority",
|
|
1288
|
+
params: [F64],
|
|
1289
|
+
result: F64,
|
|
1290
|
+
valueParams: [{ mode: "optional", type: F64, defaultValue: 0 }],
|
|
1291
|
+
},
|
|
1292
|
+
// Special-cased (lowerOsCpusCall): the call site's CpuInfo[] assembles
|
|
1293
|
+
// from one uv_cpu_info snapshot.
|
|
1294
|
+
cpus: { fn: "os.cpusTake", params: [], result: VOID },
|
|
1139
1295
|
// Entirely special-cased (lowerOsNetworkInterfacesCall): the result is
|
|
1140
1296
|
// the call site's mapped Dict<NetworkInterfaceInfo[]> shape, verified
|
|
1141
1297
|
// structurally there — this entry only routes the dispatch.
|
|
@@ -1165,6 +1321,11 @@ export const BUILTIN_MODULE_FNS = {
|
|
|
1165
1321
|
timingSafeEqual: { fn: "crypto.timingSafeEqual", params: [BYTES_U8, BYTES_U8], result: BOOL },
|
|
1166
1322
|
randomFillSync: { fn: "crypto.randomFill", params: [BYTES_U8, F64, F64], result: BYTES_U8 },
|
|
1167
1323
|
randomInt: { fn: "crypto.randomInt", params: [F64, F64], result: F64 },
|
|
1324
|
+
randomFill: { fn: "crypto.randomFillCb", params: [], result: VOID },
|
|
1325
|
+
randomUUIDv7: { fn: "crypto.randomUUIDv7", params: [DYN], result: STRING },
|
|
1326
|
+
createSecretKey: { fn: "crypto.createSecretKey", params: [DYN, DYN], result: DYN },
|
|
1327
|
+
generateKeySync: { fn: "crypto.generateKeySync", params: [DYN, DYN], result: DYN },
|
|
1328
|
+
generateKey: { fn: "crypto.generateKeyCb", params: [], result: VOID },
|
|
1168
1329
|
pbkdf2Sync: {
|
|
1169
1330
|
fn: "crypto.pbkdf2",
|
|
1170
1331
|
params: [BYTES_U8, BYTES_U8, F64, F64, STRING],
|
|
@@ -1229,6 +1390,14 @@ export const BUILTIN_MODULE_FNS = {
|
|
|
1229
1390
|
{ mode: "optional", type: DYN, defaultValue: undefined },
|
|
1230
1391
|
],
|
|
1231
1392
|
},
|
|
1393
|
+
// The legacy API and the domain pair (lowerLegacyUrlCall): arguments
|
|
1394
|
+
// cross as dyn values for Node's own validators; url.parse() answers
|
|
1395
|
+
// the checked-dynamic Url instance.
|
|
1396
|
+
parse: { fn: "url.legacyParse", params: [DYN, DYN, DYN], result: DYN },
|
|
1397
|
+
format: { fn: "url.legacyFormat", params: [DYN, DYN], result: STRING },
|
|
1398
|
+
resolve: { fn: "url.legacyResolve", params: [DYN, DYN], result: STRING },
|
|
1399
|
+
domainToASCII: { fn: "url.domainToASCII", params: [DYN], result: STRING },
|
|
1400
|
+
domainToUnicode: { fn: "url.domainToUnicode", params: [DYN], result: STRING },
|
|
1232
1401
|
},
|
|
1233
1402
|
child_process: {
|
|
1234
1403
|
// spawnSync's and spawn's call completions are entirely special-cased
|
|
@@ -1305,6 +1474,53 @@ export const BUILTIN_MODULE_FNS = {
|
|
|
1305
1474
|
result: STRING,
|
|
1306
1475
|
valueParams: exactValueParams(DYN),
|
|
1307
1476
|
},
|
|
1477
|
+
// The function helpers take checked-dynamic arguments and answer native
|
|
1478
|
+
// dyn functions, which a static function slot checks when it receives
|
|
1479
|
+
// one (lowerUtilCallableCall in the util spoke).
|
|
1480
|
+
inherits: {
|
|
1481
|
+
fn: "util.inherits",
|
|
1482
|
+
params: [DYN, DYN],
|
|
1483
|
+
result: VOID,
|
|
1484
|
+
valueParams: [
|
|
1485
|
+
{ mode: "required", type: DYN },
|
|
1486
|
+
{ mode: "required", type: DYN },
|
|
1487
|
+
],
|
|
1488
|
+
},
|
|
1489
|
+
deprecate: {
|
|
1490
|
+
fn: "util.deprecate",
|
|
1491
|
+
params: [DYN, DYN, DYN, DYN],
|
|
1492
|
+
result: DYN,
|
|
1493
|
+
valueParams: [
|
|
1494
|
+
{ mode: "required", type: DYN },
|
|
1495
|
+
{ mode: "required", type: DYN },
|
|
1496
|
+
{ mode: "optional", type: DYN, defaultValue: undefined },
|
|
1497
|
+
{ mode: "optional", type: DYN, defaultValue: undefined },
|
|
1498
|
+
],
|
|
1499
|
+
},
|
|
1500
|
+
callbackify: {
|
|
1501
|
+
fn: "util.callbackify",
|
|
1502
|
+
params: [DYN],
|
|
1503
|
+
result: DYN,
|
|
1504
|
+
valueParams: [{ mode: "required", type: DYN }],
|
|
1505
|
+
},
|
|
1506
|
+
debuglog: {
|
|
1507
|
+
fn: "util.debuglog",
|
|
1508
|
+
params: [DYN, DYN],
|
|
1509
|
+
result: DYN,
|
|
1510
|
+
valueParams: [
|
|
1511
|
+
{ mode: "required", type: DYN },
|
|
1512
|
+
{ mode: "optional", type: DYN, defaultValue: undefined },
|
|
1513
|
+
],
|
|
1514
|
+
},
|
|
1515
|
+
debug: {
|
|
1516
|
+
fn: "util.debuglog",
|
|
1517
|
+
params: [DYN, DYN],
|
|
1518
|
+
result: DYN,
|
|
1519
|
+
valueParams: [
|
|
1520
|
+
{ mode: "required", type: DYN },
|
|
1521
|
+
{ mode: "optional", type: DYN, defaultValue: undefined },
|
|
1522
|
+
],
|
|
1523
|
+
},
|
|
1308
1524
|
},
|
|
1309
1525
|
// The util/types spoke supplies the probe name to the shared brand check.
|
|
1310
1526
|
"util/types": {
|
|
@@ -1384,6 +1600,11 @@ export const BUILTIN_MODULE_FNS = {
|
|
|
1384
1600
|
readline: {
|
|
1385
1601
|
createInterface: { fn: "rl.create", params: [], result: F64 },
|
|
1386
1602
|
},
|
|
1603
|
+
// node:readline/promises: the same Interface with the promise question
|
|
1604
|
+
// (lowerReadlineMethodCall tells the forms apart by the call's result).
|
|
1605
|
+
"readline/promises": {
|
|
1606
|
+
createInterface: { fn: "rl.create", params: [], result: F64 },
|
|
1607
|
+
},
|
|
1387
1608
|
// node:net and node:http lower ENTIRELY through the server spoke
|
|
1388
1609
|
// (lower-server.ts — every call shape is special-cased: closures, the
|
|
1389
1610
|
// optional connect host, writeHead's literal headers); the member list
|
|
@@ -1436,8 +1657,7 @@ export const BUILTIN_MODULE_FNS = {
|
|
|
1436
1657
|
"stream/promises": {},
|
|
1437
1658
|
// node:stream/consumers rides the stream spoke as well (text/json/
|
|
1438
1659
|
// buffer/arrayBuffer special-case their stream argument); blob fences
|
|
1439
|
-
// module-qualified with the pointed hint below
|
|
1440
|
-
// representation in a compiled binary.
|
|
1660
|
+
// module-qualified with the pointed hint below.
|
|
1441
1661
|
"stream/consumers": {},
|
|
1442
1662
|
// node:timers/promises — the delay-only setTimeout and bare setImmediate
|
|
1443
1663
|
// (void promises the shared timer heap settles). The arity completion
|
|
@@ -1475,7 +1695,7 @@ export const BUILTIN_MODULE_CONSTS = {
|
|
|
1475
1695
|
path: { sep: "/", delimiter: ":" },
|
|
1476
1696
|
"path/posix": { sep: "/", delimiter: ":" },
|
|
1477
1697
|
"path/win32": { sep: "\\", delimiter: ";" },
|
|
1478
|
-
os: { EOL: "\n" },
|
|
1698
|
+
os: { EOL: "\n", devNull: "/dev/null" },
|
|
1479
1699
|
worker_threads: { isMainThread: true, threadId: 0 },
|
|
1480
1700
|
cluster: { isPrimary: true, isMaster: true, isWorker: false },
|
|
1481
1701
|
};
|
|
@@ -1518,6 +1738,7 @@ export const BUILTIN_MODULE_FN_ALIASES = {
|
|
|
1518
1738
|
rmSync: ["fs.rmOptsSync", "fs.rmRetrySync"],
|
|
1519
1739
|
// The { withFileTypes: true } Dirent form.
|
|
1520
1740
|
readdirSync: ["fs.readdirTypesSync"],
|
|
1741
|
+
globSync: ["fs.globTypesSync"],
|
|
1521
1742
|
// The JS-source validation-ladder variant (lowerFsLadderCall): the
|
|
1522
1743
|
// real mkdtemp runs when the options leave utf8 semantics.
|
|
1523
1744
|
mkdtempSync: ["fs.mkdtempSyncChk"],
|
|
@@ -1530,13 +1751,16 @@ export const BUILTIN_MODULE_FN_ALIASES = {
|
|
|
1530
1751
|
watch: ["fs.watchCb"],
|
|
1531
1752
|
},
|
|
1532
1753
|
"fs/promises": {
|
|
1533
|
-
// The Buffer form (no encoding).
|
|
1534
|
-
readFile: ["fsp.readFileBytes"],
|
|
1754
|
+
// The Buffer form (no encoding) and the runtime-encoding forms.
|
|
1755
|
+
readFile: ["fsp.readFileBytes", "fsp.readFileEncoded"],
|
|
1535
1756
|
readlink: ["fsp.readlinkStr", "fsp.readlinkBuffer"],
|
|
1536
1757
|
// The string-data { mode } options form.
|
|
1537
1758
|
writeFile: ["fsp.writeFileMode"],
|
|
1538
1759
|
// The { withFileTypes: true } Dirent form.
|
|
1539
1760
|
readdir: ["fsp.readdirTypes"],
|
|
1761
|
+
glob: ["fsp.globTypes"],
|
|
1762
|
+
// The Uint8Array/Buffer-data form.
|
|
1763
|
+
appendFile: ["fsp.appendFileBytes"],
|
|
1540
1764
|
},
|
|
1541
1765
|
crypto: {
|
|
1542
1766
|
// The composed randomBytes(n).toString(enc) chain keeps its one-libCall
|
|
@@ -1545,11 +1769,23 @@ export const BUILTIN_MODULE_FN_ALIASES = {
|
|
|
1545
1769
|
randomBytes: ["crypto.randomBytesToString", "crypto.randomBytesCb"],
|
|
1546
1770
|
// Omitting size fills from offset through the rest of the Buffer and
|
|
1547
1771
|
// uses a separate runtime entry point for Node's exact bounds checks.
|
|
1548
|
-
|
|
1772
|
+
// Views of every kind return themselves; other buffers take the Dyn form.
|
|
1773
|
+
randomFillSync: [
|
|
1774
|
+
"crypto.randomFillRest",
|
|
1775
|
+
"crypto.randomFillView",
|
|
1776
|
+
"crypto.randomFillViewRest",
|
|
1777
|
+
"crypto.randomFillSyncDyn",
|
|
1778
|
+
],
|
|
1779
|
+
randomFill: ["crypto.randomFillCbDyn"],
|
|
1780
|
+
timingSafeEqual: ["crypto.timingSafeEqualDyn"],
|
|
1781
|
+
randomInt: ["crypto.randomIntMax", "crypto.randomIntCb"],
|
|
1782
|
+
randomUUID: ["crypto.randomUUIDOpts"],
|
|
1549
1783
|
},
|
|
1550
1784
|
os: {
|
|
1551
1785
|
// lowerOsUserInfoCall assembles the record from scalar libCalls.
|
|
1552
1786
|
userInfo: ["os.userHomedir", "os.userShell"],
|
|
1787
|
+
// lowerOsCpusCall reads the cpusTake snapshot through its accessors.
|
|
1788
|
+
cpus: ["os.cpusModel", "os.cpusField"],
|
|
1553
1789
|
},
|
|
1554
1790
|
};
|
|
1555
1791
|
export const AMBIENT_SURFACE_FNS = [
|
|
@@ -1574,6 +1810,20 @@ export const AMBIENT_SURFACE_FNS = [
|
|
|
1574
1810
|
fns: ["sharedArrayBuffer.new"],
|
|
1575
1811
|
note: "fixed shared storage with context-local typed-array and DataView wrappers",
|
|
1576
1812
|
},
|
|
1813
|
+
{
|
|
1814
|
+
id: "stdlib.blob",
|
|
1815
|
+
kind: "stdlib",
|
|
1816
|
+
name: "Blob",
|
|
1817
|
+
fns: ["blob.new", "blob.slice", "blob.text", "blob.bytes", "blob.arrayBuffer", "blob.is"],
|
|
1818
|
+
note: "immutable bytes with size, type, slice(), text(), bytes(), arrayBuffer() and structured cloning",
|
|
1819
|
+
},
|
|
1820
|
+
{
|
|
1821
|
+
id: "stdlib.file",
|
|
1822
|
+
kind: "stdlib",
|
|
1823
|
+
name: "File",
|
|
1824
|
+
fns: ["blob.fileNew"],
|
|
1825
|
+
note: "a Blob with name and lastModified (Date.now() when absent)",
|
|
1826
|
+
},
|
|
1577
1827
|
{
|
|
1578
1828
|
id: "stdlib.atomics",
|
|
1579
1829
|
kind: "stdlib",
|
|
@@ -1585,7 +1835,7 @@ export const AMBIENT_SURFACE_FNS = [
|
|
|
1585
1835
|
id: "node-builtin.fs.callbacks",
|
|
1586
1836
|
kind: "node-builtin",
|
|
1587
1837
|
name: "fs error-first callbacks",
|
|
1588
|
-
fns: ["fs.callbackValue", "fs.callbackCall"],
|
|
1838
|
+
fns: ["fs.callbackValue", "fs.callbackCall", "fs.callbackGlob"],
|
|
1589
1839
|
note: "native filesystem callbacks, including stored platform adapter functions",
|
|
1590
1840
|
},
|
|
1591
1841
|
// ── the Date slice (lowerDateCall/lowerNew): statics, construction,
|
|
@@ -1744,6 +1994,48 @@ export const AMBIENT_SURFACE_FNS = [
|
|
|
1744
1994
|
fns: ["perf.now"],
|
|
1745
1995
|
note: "the global performance object and the performance.now.bind(performance) function value reach the same clock",
|
|
1746
1996
|
},
|
|
1997
|
+
{
|
|
1998
|
+
id: "node-builtin.perf_hooks.performance.mark",
|
|
1999
|
+
kind: "node-builtin",
|
|
2000
|
+
name: "perf_hooks.performance.mark",
|
|
2001
|
+
fns: [
|
|
2002
|
+
"perf.mark",
|
|
2003
|
+
"perf.entryName",
|
|
2004
|
+
"perf.entryType",
|
|
2005
|
+
"perf.entryStart",
|
|
2006
|
+
"perf.entryDuration",
|
|
2007
|
+
"perf.entryDetail",
|
|
2008
|
+
"perf.entryKeep",
|
|
2009
|
+
"perf.entryRef",
|
|
2010
|
+
],
|
|
2011
|
+
note: "records a mark in the thread's performance timeline at the live clock or the given startTime",
|
|
2012
|
+
},
|
|
2013
|
+
{
|
|
2014
|
+
id: "node-builtin.perf_hooks.performance.measure",
|
|
2015
|
+
kind: "node-builtin",
|
|
2016
|
+
name: "perf_hooks.performance.measure",
|
|
2017
|
+
fns: ["perf.measure"],
|
|
2018
|
+
note: "the mark-name, timestamp, and options forms are one surface",
|
|
2019
|
+
},
|
|
2020
|
+
{
|
|
2021
|
+
id: "node-builtin.perf_hooks.performance.getEntries",
|
|
2022
|
+
kind: "node-builtin",
|
|
2023
|
+
name: "perf_hooks.performance.getEntries",
|
|
2024
|
+
fns: ["perf.entries"],
|
|
2025
|
+
note: "getEntries, getEntriesByName, and getEntriesByType read the same timeline",
|
|
2026
|
+
},
|
|
2027
|
+
{
|
|
2028
|
+
id: "node-builtin.perf_hooks.performance.clearMarks",
|
|
2029
|
+
kind: "node-builtin",
|
|
2030
|
+
name: "perf_hooks.performance.clearMarks",
|
|
2031
|
+
fns: ["perf.clearMarks"],
|
|
2032
|
+
},
|
|
2033
|
+
{
|
|
2034
|
+
id: "node-builtin.perf_hooks.performance.clearMeasures",
|
|
2035
|
+
kind: "node-builtin",
|
|
2036
|
+
name: "perf_hooks.performance.clearMeasures",
|
|
2037
|
+
fns: ["perf.clearMeasures"],
|
|
2038
|
+
},
|
|
1747
2039
|
// ── the process global's ambient reads and authority calls
|
|
1748
2040
|
// (lowerProcessProperty/lowerProcessMethodCall — process is a
|
|
1749
2041
|
// provenance-checked global here, not an importable module).
|
|
@@ -1781,6 +2073,13 @@ export const AMBIENT_SURFACE_FNS = [
|
|
|
1781
2073
|
fns: ["process.versions"],
|
|
1782
2074
|
note: "shared version dictionary containing node and openssl; other components are absent unless defined by the program",
|
|
1783
2075
|
},
|
|
2076
|
+
{
|
|
2077
|
+
id: "node-builtin.process.release",
|
|
2078
|
+
kind: "node-builtin",
|
|
2079
|
+
name: "process.release",
|
|
2080
|
+
fns: ["process.release"],
|
|
2081
|
+
note: "the compatibility target's release metadata as one stable read-only object",
|
|
2082
|
+
},
|
|
1784
2083
|
{
|
|
1785
2084
|
id: "node-builtin.process.cwd",
|
|
1786
2085
|
kind: "node-builtin",
|
|
@@ -1811,6 +2110,43 @@ export const AMBIENT_SURFACE_FNS = [
|
|
|
1811
2110
|
name: "process.getgid",
|
|
1812
2111
|
fns: ["process.getgid"],
|
|
1813
2112
|
},
|
|
2113
|
+
{
|
|
2114
|
+
id: "node-builtin.process.geteuid",
|
|
2115
|
+
kind: "node-builtin",
|
|
2116
|
+
name: "process.geteuid",
|
|
2117
|
+
fns: ["process.geteuid"],
|
|
2118
|
+
},
|
|
2119
|
+
{
|
|
2120
|
+
id: "node-builtin.process.getegid",
|
|
2121
|
+
kind: "node-builtin",
|
|
2122
|
+
name: "process.getegid",
|
|
2123
|
+
fns: ["process.getegid"],
|
|
2124
|
+
},
|
|
2125
|
+
{
|
|
2126
|
+
id: "node-builtin.process.getgroups",
|
|
2127
|
+
kind: "node-builtin",
|
|
2128
|
+
name: "process.getgroups",
|
|
2129
|
+
fns: ["process.getgroups"],
|
|
2130
|
+
},
|
|
2131
|
+
{
|
|
2132
|
+
id: "node-builtin.process.ppid",
|
|
2133
|
+
kind: "node-builtin",
|
|
2134
|
+
name: "process.ppid",
|
|
2135
|
+
fns: ["process.ppid"],
|
|
2136
|
+
},
|
|
2137
|
+
{
|
|
2138
|
+
id: "node-builtin.process.title",
|
|
2139
|
+
kind: "node-builtin",
|
|
2140
|
+
name: "process.title",
|
|
2141
|
+
fns: ["process.title", "process.setTitle"],
|
|
2142
|
+
note: "reads and writes of the process title are one surface",
|
|
2143
|
+
},
|
|
2144
|
+
{
|
|
2145
|
+
id: "node-builtin.process.argv0",
|
|
2146
|
+
kind: "node-builtin",
|
|
2147
|
+
name: "process.argv0",
|
|
2148
|
+
fns: ["process.argv0"],
|
|
2149
|
+
},
|
|
1814
2150
|
{
|
|
1815
2151
|
id: "node-builtin.process.execPath",
|
|
1816
2152
|
kind: "node-builtin",
|
|
@@ -1835,6 +2171,13 @@ export const AMBIENT_SURFACE_FNS = [
|
|
|
1835
2171
|
name: "process.constrainedMemory",
|
|
1836
2172
|
fns: ["process.constrainedMemory"],
|
|
1837
2173
|
},
|
|
2174
|
+
{
|
|
2175
|
+
id: "node-builtin.process.memoryUsage",
|
|
2176
|
+
kind: "node-builtin",
|
|
2177
|
+
name: "process.memoryUsage",
|
|
2178
|
+
fns: ["process.memoryUsageTake", "process.memoryUsageField", "process.rss"],
|
|
2179
|
+
note: "the record and memoryUsage.rss() read live memory state; external and arrayBuffers are 0",
|
|
2180
|
+
},
|
|
1838
2181
|
{
|
|
1839
2182
|
id: "node-builtin.process.resourceUsage",
|
|
1840
2183
|
kind: "node-builtin",
|
|
@@ -1944,13 +2287,22 @@ export const AMBIENT_SURFACE_FNS = [
|
|
|
1944
2287
|
fns: ["tlsca.set"],
|
|
1945
2288
|
note: "replaces the default set and the client trust anchors for the rest of the process",
|
|
1946
2289
|
},
|
|
2290
|
+
// os.constants is a VALUE read (lowerNamespaceBuiltinProperty and the
|
|
2291
|
+
// named-import path): the platform's null-prototype constants object.
|
|
2292
|
+
{
|
|
2293
|
+
id: "node-builtin.os.constants",
|
|
2294
|
+
kind: "node-builtin",
|
|
2295
|
+
name: "os.constants",
|
|
2296
|
+
fns: ["os.constants"],
|
|
2297
|
+
note: "the platform's dlopen, errno, signals and priority groups; members a platform lacks read as undefined",
|
|
2298
|
+
},
|
|
1947
2299
|
];
|
|
1948
2300
|
/** The win32-target overrides of the bare modules' constants: path's
|
|
1949
2301
|
* constants ARE the path/win32 namespace's, and os.EOL is CRLF (Node's
|
|
1950
2302
|
* `isWindows ? '\r\n' : '\n'`). */
|
|
1951
2303
|
const WIN32_TARGET_CONSTS = {
|
|
1952
2304
|
path: BUILTIN_MODULE_CONSTS["path/win32"],
|
|
1953
|
-
os: { EOL: "\r\n" },
|
|
2305
|
+
os: { EOL: "\r\n", devNull: "\\\\.\\nul" },
|
|
1954
2306
|
};
|
|
1955
2307
|
/** BUILTIN_MODULE_FNS with the platform-conditional modules bound per
|
|
1956
2308
|
* TARGET: a win32 triple compiles Node-on-Windows semantics — `path` is
|
|
@@ -1986,6 +2338,8 @@ export const FS_CALLBACK_MEMBERS = new Set([
|
|
|
1986
2338
|
"copyFile",
|
|
1987
2339
|
"chmod",
|
|
1988
2340
|
"chown",
|
|
2341
|
+
"lchown",
|
|
2342
|
+
"fchown",
|
|
1989
2343
|
"glob",
|
|
1990
2344
|
"link",
|
|
1991
2345
|
"mkdir",
|
|
@@ -2179,8 +2533,8 @@ export const BUILTIN_MODULE_FENCE_HINTS = {
|
|
|
2179
2533
|
promisify: "the lowered shapes are const bindings over child_process.execFile and fs.readFile; call the bound function directly",
|
|
2180
2534
|
},
|
|
2181
2535
|
"stream/consumers": {
|
|
2182
|
-
blob: "
|
|
2183
|
-
"buffer(stream) collects the same bytes as a Buffer, text(stream) the decoded text",
|
|
2536
|
+
blob: "collecting a stream into a Blob is not supported yet — " +
|
|
2537
|
+
"buffer(stream) collects the same bytes as a Buffer (new Blob([buffer]) wraps them), text(stream) the decoded text",
|
|
2184
2538
|
},
|
|
2185
2539
|
module: {
|
|
2186
2540
|
createRequire: "the lowered shape is a const binding (or a proven stable top-level let/var) over createRequire(import.meta.url) (or __filename) " +
|
|
@@ -2198,11 +2552,8 @@ export const BUILTIN_MODULE_FENCE_HINTS = {
|
|
|
2198
2552
|
...Object.fromEntries([
|
|
2199
2553
|
"generateKeyPair",
|
|
2200
2554
|
"generateKeyPairSync",
|
|
2201
|
-
"generateKey",
|
|
2202
|
-
"generateKeySync",
|
|
2203
2555
|
"createPrivateKey",
|
|
2204
2556
|
"createPublicKey",
|
|
2205
|
-
"createSecretKey",
|
|
2206
2557
|
"createSign",
|
|
2207
2558
|
"createVerify",
|
|
2208
2559
|
"sign",
|
|
@@ -2218,9 +2569,9 @@ export const BUILTIN_MODULE_FENCE_HINTS = {
|
|
|
2218
2569
|
"privateDecrypt",
|
|
2219
2570
|
].map((m) => [
|
|
2220
2571
|
m,
|
|
2221
|
-
"asymmetric-key operations need a public-key stack (bignum, RSA/EC/EdDSA math) and
|
|
2222
|
-
"
|
|
2223
|
-
"can be small; the lowered crypto surface is hashing, randomness, and the introspection statics",
|
|
2572
|
+
"asymmetric-key operations need a public-key stack (bignum, RSA/EC/EdDSA math) and " +
|
|
2573
|
+
"public and private KeyObjects — neither exists in the static runtime, so no faithful lowering " +
|
|
2574
|
+
"can be small; the lowered crypto surface is hashing, randomness, secret KeyObjects, and the introspection statics",
|
|
2224
2575
|
])),
|
|
2225
2576
|
...Object.fromEntries(["createCipheriv", "createDecipheriv", "getCipherInfo"].map((m) => [
|
|
2226
2577
|
m,
|
|
@@ -2256,8 +2607,8 @@ export const BUILTIN_MODULE_FENCE_HINTS = {
|
|
|
2256
2607
|
* accessed member is stdlib-declared, the use is standard-library surface
|
|
2257
2608
|
* with no lowering — report SC2020 naming `<container>.<member>` (the
|
|
2258
2609
|
* receiver's global name when it IS a stdlib global like Math or Promise,
|
|
2259
|
-
* its widened type text otherwise). Returns
|
|
2260
|
-
* members so the caller's generic rejection applies. */
|
|
2610
|
+
* its widened type text otherwise). Returns without reporting for
|
|
2611
|
+
* non-stdlib members so the caller's generic rejection applies. */
|
|
2261
2612
|
export function stdlibMemberFence(lowerer, access) {
|
|
2262
2613
|
const sym = lowerer.checker.getSymbolAtLocation(access.name);
|
|
2263
2614
|
if (!sym || !lowerer.isStdlibSymbol(sym))
|
|
@@ -2346,9 +2697,11 @@ export function stdlibMemberFence(lowerer, access) {
|
|
|
2346
2697
|
}
|
|
2347
2698
|
else if (container === "console") {
|
|
2348
2699
|
hint =
|
|
2349
|
-
"console.log/info/debug (stdout)
|
|
2350
|
-
"
|
|
2351
|
-
"
|
|
2700
|
+
"console.log/info/debug (stdout), console.error/warn (stderr), assert, count, " +
|
|
2701
|
+
"countReset, dir, dirxml, group, groupCollapsed, groupEnd, table, time, timeEnd, " +
|
|
2702
|
+
"timeLog, clear, profile, profileEnd, and timeStamp are the supported console surface " +
|
|
2703
|
+
"(arguments render with Node's console semantics: strings verbatim, everything else " +
|
|
2704
|
+
"through the static util.inspect)";
|
|
2352
2705
|
}
|
|
2353
2706
|
else if (container === "TextEncoder") {
|
|
2354
2707
|
hint =
|