@scriptc/compiler 0.3.2 → 0.3.4
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 +1202 -64
- package/dist/backend/cycle-analysis.js +6 -1
- package/dist/backend/cycle-analysis.js.map +1 -1
- package/dist/backend/cycle-mutability.d.ts +5 -0
- package/dist/backend/cycle-mutability.js +62 -3
- package/dist/backend/cycle-mutability.js.map +1 -1
- package/dist/backend/executable-features.js +1 -0
- package/dist/backend/executable-features.js.map +1 -1
- package/dist/backend/library-pack.js +1 -0
- package/dist/backend/library-pack.js.map +1 -1
- package/dist/backend/llvm/alloc.js +24 -10
- package/dist/backend/llvm/alloc.js.map +1 -1
- package/dist/backend/llvm/alloc.test.js +47 -1
- package/dist/backend/llvm/alloc.test.js.map +1 -1
- 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 +12 -1
- package/dist/backend/llvm/call-lifetimes.js +41 -11
- package/dist/backend/llvm/call-lifetimes.js.map +1 -1
- package/dist/backend/llvm/call-lifetimes.test.js +85 -1
- package/dist/backend/llvm/call-lifetimes.test.js.map +1 -1
- package/dist/backend/llvm/classes.js +87 -36
- package/dist/backend/llvm/classes.js.map +1 -1
- package/dist/backend/llvm/common.d.ts +6 -1
- package/dist/backend/llvm/common.js +8 -1
- package/dist/backend/llvm/common.js.map +1 -1
- package/dist/backend/llvm/dense-array-access.d.ts +5 -0
- package/dist/backend/llvm/dense-array-access.js +3 -3
- package/dist/backend/llvm/dense-array-access.js.map +1 -1
- package/dist/backend/llvm/dyn.d.ts +44 -1
- package/dist/backend/llvm/dyn.js +251 -36
- package/dist/backend/llvm/dyn.js.map +1 -1
- package/dist/backend/llvm/emitter.d.ts +77 -14
- package/dist/backend/llvm/emitter.js +461 -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 +52 -1
- package/dist/backend/llvm/expr-async.js.map +1 -1
- package/dist/backend/llvm/expr-bytes.d.ts +9 -0
- package/dist/backend/llvm/expr-bytes.js +169 -63
- package/dist/backend/llvm/expr-bytes.js.map +1 -1
- package/dist/backend/llvm/expr-callbacks.js +16 -2
- package/dist/backend/llvm/expr-callbacks.js.map +1 -1
- package/dist/backend/llvm/expr-calls.d.ts +3 -1
- package/dist/backend/llvm/expr-calls.js +57 -2
- package/dist/backend/llvm/expr-calls.js.map +1 -1
- package/dist/backend/llvm/expr-containers.js +57 -19
- package/dist/backend/llvm/expr-containers.js.map +1 -1
- package/dist/backend/llvm/expr-dynamic.js +19 -8
- package/dist/backend/llvm/expr-dynamic.js.map +1 -1
- package/dist/backend/llvm/expr-primitives.js +28 -30
- package/dist/backend/llvm/expr-primitives.js.map +1 -1
- package/dist/backend/llvm/expr-records.js +8 -4
- package/dist/backend/llvm/expr-records.js.map +1 -1
- package/dist/backend/llvm/expr-stream-bridges.js +35 -32
- package/dist/backend/llvm/expr-stream-bridges.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/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/intern-tables.test.d.ts +1 -0
- package/dist/backend/llvm/intern-tables.test.js +77 -0
- package/dist/backend/llvm/intern-tables.test.js.map +1 -0
- package/dist/backend/llvm/lib-datagram.js +10 -0
- package/dist/backend/llvm/lib-datagram.js.map +1 -1
- package/dist/backend/llvm/lib-dispatch.js +255 -29
- package/dist/backend/llvm/lib-dispatch.js.map +1 -1
- package/dist/backend/llvm/lib-filesystem.js +176 -7
- package/dist/backend/llvm/lib-filesystem.js.map +1 -1
- package/dist/backend/llvm/lib-network.js +25 -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.d.ts +5 -0
- package/dist/backend/llvm/lib-shared.js +212 -1
- package/dist/backend/llvm/lib-shared.js.map +1 -1
- package/dist/backend/llvm/lib-stream.js +184 -0
- package/dist/backend/llvm/lib-stream.js.map +1 -1
- package/dist/backend/llvm/lib-test.js +9 -0
- package/dist/backend/llvm/lib-test.js.map +1 -1
- package/dist/backend/llvm/local-array-reads.js +7 -3
- 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 +2 -0
- package/dist/backend/llvm/local-union-storage.js +5 -0
- package/dist/backend/llvm/local-union-storage.js.map +1 -1
- package/dist/backend/llvm/local-union-storage.test.js +1 -0
- 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 +24 -0
- package/dist/backend/llvm/map-number-lookup.js +88 -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 +158 -0
- package/dist/backend/llvm/map-number-lookup.test.js.map +1 -0
- package/dist/backend/llvm/map-read-lifetimes.d.ts +9 -0
- package/dist/backend/llvm/map-read-lifetimes.js +90 -1
- package/dist/backend/llvm/map-read-lifetimes.js.map +1 -1
- package/dist/backend/llvm/map-read-lifetimes.test.js +129 -1
- package/dist/backend/llvm/map-read-lifetimes.test.js.map +1 -1
- package/dist/backend/llvm/publish.d.ts +9 -0
- package/dist/backend/llvm/publish.js +25 -4
- package/dist/backend/llvm/publish.js.map +1 -1
- package/dist/backend/llvm/record-results.d.ts +8 -5
- package/dist/backend/llvm/record-results.js +20 -12
- package/dist/backend/llvm/record-results.js.map +1 -1
- package/dist/backend/llvm/reference-effects.js +13 -0
- package/dist/backend/llvm/reference-effects.js.map +1 -1
- package/dist/backend/llvm/reference-writes.js +19 -2
- package/dist/backend/llvm/reference-writes.js.map +1 -1
- package/dist/backend/llvm/regions.d.ts +5 -1
- package/dist/backend/llvm/regions.js +24 -10
- package/dist/backend/llvm/regions.js.map +1 -1
- 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 +56 -10
- package/dist/backend/llvm/shapes.js +178 -39
- package/dist/backend/llvm/shapes.js.map +1 -1
- package/dist/backend/llvm/shapes.test.js +61 -3
- package/dist/backend/llvm/shapes.test.js.map +1 -1
- package/dist/backend/llvm/stack-objects.js +16 -4
- package/dist/backend/llvm/stack-objects.js.map +1 -1
- package/dist/backend/llvm/stack-objects.test.js +3 -0
- package/dist/backend/llvm/stack-objects.test.js.map +1 -1
- package/dist/backend/llvm/string-reads.js +2 -2
- package/dist/backend/llvm/string-reads.js.map +1 -1
- package/dist/backend/llvm/string-slices.js +2 -2
- package/dist/backend/llvm/string-slices.js.map +1 -1
- package/dist/backend/llvm/walkers.d.ts +11 -0
- package/dist/backend/llvm/walkers.js +106 -10
- package/dist/backend/llvm/walkers.js.map +1 -1
- package/dist/backend/may-throw.js +13 -4
- package/dist/backend/may-throw.js.map +1 -1
- package/dist/backend/native/contracts.d.ts +5 -2
- package/dist/backend/native/executable.js +27 -8
- package/dist/backend/native/executable.js.map +1 -1
- package/dist/backend/native/runtime-inputs.d.ts +1 -1
- package/dist/backend/native/runtime-inputs.js +2 -0
- package/dist/backend/native/runtime-inputs.js.map +1 -1
- package/dist/backend/native-codegen-core.d.ts +4 -4
- package/dist/backend/native-codegen-core.js +4 -6
- package/dist/backend/native-codegen-core.js.map +1 -1
- package/dist/backend/native-codegen.test.js +7 -8
- package/dist/backend/native-codegen.test.js.map +1 -1
- package/dist/backend/native-link-info-core.d.ts +3 -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/publication.js +3 -1
- package/dist/backend/publication.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-targets.test.js +2 -1
- package/dist/backend/runtime-pack-targets.test.js.map +1 -1
- package/dist/backend/runtime-pack.test.js +2 -1
- package/dist/backend/runtime-pack.test.js.map +1 -1
- package/dist/backend/target-diagnostics.js +11 -1
- package/dist/backend/target-diagnostics.js.map +1 -1
- package/dist/backend/target-diagnostics.test.js +4 -1
- package/dist/backend/target-diagnostics.test.js.map +1 -1
- package/dist/backend/warm-cache.js +1 -0
- package/dist/backend/warm-cache.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 +1 -0
- package/dist/executable/executable-cache.js.map +1 -1
- package/dist/executable/executable-cache.test.js +1 -0
- package/dist/executable/executable-cache.test.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 +5 -1
- package/dist/frontend/experimental-import.js +28 -3
- package/dist/frontend/experimental-import.js.map +1 -1
- package/dist/frontend/lowering/assert-instances.d.ts +38 -0
- package/dist/frontend/lowering/assert-instances.js +269 -0
- package/dist/frontend/lowering/assert-instances.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/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.d.ts +18 -0
- package/dist/frontend/lowering/builtins/compression.js +178 -4
- package/dist/frontend/lowering/builtins/compression.js.map +1 -1
- package/dist/frontend/lowering/builtins/constants.js +7 -2
- package/dist/frontend/lowering/builtins/constants.js.map +1 -1
- package/dist/frontend/lowering/builtins/crypto.d.ts +6 -0
- package/dist/frontend/lowering/builtins/crypto.js +526 -121
- package/dist/frontend/lowering/builtins/crypto.js.map +1 -1
- package/dist/frontend/lowering/builtins/errors.js +23 -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/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 +44 -11
- package/dist/frontend/lowering/builtins/module-calls.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 +107 -14
- package/dist/frontend/lowering/builtins/process.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/timers.d.ts +3 -0
- package/dist/frontend/lowering/builtins/timers.js +109 -23
- package/dist/frontend/lowering/builtins/timers.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 +26 -2
- package/dist/frontend/lowering/call-signatures.js.map +1 -1
- package/dist/frontend/lowering/class-dynamic-dispatch.d.ts +2 -0
- package/dist/frontend/lowering/class-dynamic-dispatch.js +171 -13
- 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 +4 -7
- package/dist/frontend/lowering/containers/array-callbacks.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/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/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/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 +16 -12
- package/dist/frontend/lowering/expressions/object-literals.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/intern-tables.d.ts +13 -0
- package/dist/frontend/lowering/intern-tables.js +536 -0
- package/dist/frontend/lowering/intern-tables.js.map +1 -0
- package/dist/frontend/lowering/lower-array-sort.d.ts +12 -1
- package/dist/frontend/lowering/lower-array-sort.js +561 -191
- package/dist/frontend/lowering/lower-array-sort.js.map +1 -1
- package/dist/frontend/lowering/lower-array-sort.test.js +4 -2
- package/dist/frontend/lowering/lower-array-sort.test.js.map +1 -1
- package/dist/frontend/lowering/lower-assert.js +702 -63
- package/dist/frontend/lowering/lower-assert.js.map +1 -1
- package/dist/frontend/lowering/lower-async-iteration.d.ts +6 -3
- package/dist/frontend/lowering/lower-async-iteration.js +259 -4
- package/dist/frontend/lowering/lower-async-iteration.js.map +1 -1
- package/dist/frontend/lowering/lower-calls.js +118 -12
- package/dist/frontend/lowering/lower-calls.js.map +1 -1
- package/dist/frontend/lowering/lower-classes.d.ts +11 -2
- package/dist/frontend/lowering/lower-classes.js +76 -9
- 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-dgram.js +77 -52
- package/dist/frontend/lowering/lower-dgram.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 +124 -22
- package/dist/frontend/lowering/lower-exprs.js.map +1 -1
- package/dist/frontend/lowering/lower-inspect.d.ts +6 -0
- package/dist/frontend/lowering/lower-inspect.js +240 -49
- package/dist/frontend/lowering/lower-inspect.js.map +1 -1
- package/dist/frontend/lowering/lower-mixins.js +1 -1
- package/dist/frontend/lowering/lower-mock.d.ts +11 -0
- package/dist/frontend/lowering/lower-mock.js +504 -0
- package/dist/frontend/lowering/lower-mock.js.map +1 -0
- package/dist/frontend/lowering/lower-modules.d.ts +1 -1
- package/dist/frontend/lowering/lower-modules.js +14 -3
- 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.d.ts +3 -0
- package/dist/frontend/lowering/lower-server.js +419 -44
- package/dist/frontend/lowering/lower-server.js.map +1 -1
- package/dist/frontend/lowering/lower-stdlib.d.ts +7 -1
- package/dist/frontend/lowering/lower-stdlib.js +10 -3
- 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 +69 -14
- package/dist/frontend/lowering/lower-stmts.js.map +1 -1
- package/dist/frontend/lowering/lower-stream.d.ts +10 -6
- package/dist/frontend/lowering/lower-stream.js +1020 -49
- package/dist/frontend/lowering/lower-stream.js.map +1 -1
- package/dist/frontend/lowering/lower-test.js +86 -8
- package/dist/frontend/lowering/lower-test.js.map +1 -1
- package/dist/frontend/lowering/lower-timers.js +1 -1
- package/dist/frontend/lowering/lowerer.d.ts +45 -5
- package/dist/frontend/lowering/lowerer.js +317 -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/pairs-snapshot.d.ts +6 -0
- package/dist/frontend/lowering/pairs-snapshot.js +49 -0
- package/dist/frontend/lowering/pairs-snapshot.js.map +1 -1
- 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 +11 -3
- package/dist/frontend/lowering/surfaces.js +334 -37
- package/dist/frontend/lowering/surfaces.js.map +1 -1
- package/dist/frontend/lowering/zlib-constants.d.ts +1 -0
- package/dist/frontend/lowering/zlib-constants.js +181 -0
- package/dist/frontend/lowering/zlib-constants.js.map +1 -0
- package/dist/frontend/mock-shapes.d.ts +10 -0
- package/dist/frontend/mock-shapes.js +76 -0
- package/dist/frontend/mock-shapes.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 +3 -3
- package/dist/frontend/program.js +25 -18
- package/dist/frontend/program.js.map +1 -1
- package/dist/frontend/resolve.d.ts +4 -0
- package/dist/frontend/resolve.js +15 -1
- package/dist/frontend/resolve.js.map +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 +3 -2
- package/dist/frontend/tsc-codes.js.map +1 -1
- package/dist/frontend/type-mapper.d.ts +21 -1
- package/dist/frontend/type-mapper.js +245 -27
- package/dist/frontend/type-mapper.js.map +1 -1
- package/dist/index.js +7 -5
- 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 +115 -0
- package/dist/ir/builtin-effects.js.map +1 -1
- package/dist/ir/builtin-signatures.d.ts +1 -1
- package/dist/ir/builtin-signatures.js +438 -46
- package/dist/ir/builtin-signatures.js.map +1 -1
- package/dist/ir/int32-slots.js +1 -0
- package/dist/ir/int32-slots.js.map +1 -1
- package/dist/ir/ir.d.ts +84 -17
- package/dist/ir/ir.js +54 -1
- package/dist/ir/ir.js.map +1 -1
- package/dist/ir/runtime-features.d.ts +1 -0
- package/dist/ir/runtime-features.js +111 -7
- package/dist/ir/runtime-features.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 +295 -14
- package/dist/ir/validate.js.map +1 -1
- package/dist/ir/validate.test.js +60 -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/cli.js +1 -0
- package/dist/native/cli.js.map +1 -1
- package/dist/native/compiler.js +1 -3
- package/dist/native/compiler.js.map +1 -1
- package/dist/native/prepare.js +4 -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 +1279 -221
|
@@ -1,7 +1,10 @@
|
|
|
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
|
+
import { ZLIB_CONSTANTS } from "./zlib-constants.js";
|
|
6
|
+
/** zlib stream instances: runtime Transform streams (scr_zlib_stream.c). */
|
|
7
|
+
const ZLIB_STREAM = { kind: "object", className: "%Transform" };
|
|
5
8
|
/** Statement-level constructs rejected wholesale, keyed by syntax kind. */
|
|
6
9
|
export const UNSUPPORTED_STMT = {
|
|
7
10
|
// DoStatement / SwitchStatement are supported; handled in lowerStmt.
|
|
@@ -67,7 +70,7 @@ export const NARROW_FIRST = "narrow first: check a discriminant field, or compar
|
|
|
67
70
|
* per-key fences);
|
|
68
71
|
* - keys Node DOCUMENTS for the API but this compiler cannot honor
|
|
69
72
|
* fence BY NAME at the use site — an option that changes
|
|
70
|
-
* Node-observable behavior must work or fence
|
|
73
|
+
* Node-observable behavior must work or fence instead of dropping;
|
|
71
74
|
* - undocumented keys DROP exactly as Node drops them, provided the
|
|
72
75
|
* value expression is side-effect-free (an effectful initializer
|
|
73
76
|
* fences: Node would have evaluated it, so skipping it would be
|
|
@@ -164,6 +167,7 @@ export const HTTP_CLIENT_DOCUMENTED_OPTIONS = new Set([
|
|
|
164
167
|
"hints",
|
|
165
168
|
"host",
|
|
166
169
|
"hostname",
|
|
170
|
+
"httpValidation",
|
|
167
171
|
"insecureHTTPParser",
|
|
168
172
|
"joinDuplicateHeaders",
|
|
169
173
|
"localAddress",
|
|
@@ -193,6 +197,7 @@ export const HTTP_SERVER_DOCUMENTED_OPTIONS = new Set([
|
|
|
193
197
|
"connectionsCheckingInterval",
|
|
194
198
|
"headersTimeout",
|
|
195
199
|
"highWaterMark",
|
|
200
|
+
"httpValidation",
|
|
196
201
|
"insecureHTTPParser",
|
|
197
202
|
"joinDuplicateHeaders",
|
|
198
203
|
"keepAlive",
|
|
@@ -224,11 +229,34 @@ export const AGENT_DOCUMENTED_OPTIONS = new Set([
|
|
|
224
229
|
"noDelay",
|
|
225
230
|
"path",
|
|
226
231
|
]);
|
|
232
|
+
/** new https.Agent(options) also takes tls.connect's client-side options,
|
|
233
|
+
* which Node merges into every request made through the agent. None lower
|
|
234
|
+
* yet, so each fences by name. */
|
|
235
|
+
export const HTTPS_AGENT_DOCUMENTED_OPTIONS = new Set([
|
|
236
|
+
...AGENT_DOCUMENTED_OPTIONS,
|
|
237
|
+
"ca",
|
|
238
|
+
"cert",
|
|
239
|
+
"ciphers",
|
|
240
|
+
"crl",
|
|
241
|
+
"ecdhCurve",
|
|
242
|
+
"key",
|
|
243
|
+
"maxCachedSessions",
|
|
244
|
+
"maxVersion",
|
|
245
|
+
"minVersion",
|
|
246
|
+
"passphrase",
|
|
247
|
+
"pfx",
|
|
248
|
+
"rejectUnauthorized",
|
|
249
|
+
"secureOptions",
|
|
250
|
+
"secureProtocol",
|
|
251
|
+
"servername",
|
|
252
|
+
"sessionIdContext",
|
|
253
|
+
]);
|
|
227
254
|
/** https.request adds tls.connect's client-side TLS knobs. */
|
|
228
255
|
export const HTTPS_CLIENT_DOCUMENTED_OPTIONS = new Set([
|
|
229
256
|
...HTTP_CLIENT_DOCUMENTED_OPTIONS,
|
|
230
257
|
"ca",
|
|
231
258
|
"cert",
|
|
259
|
+
"certificateCompression",
|
|
232
260
|
"checkServerIdentity",
|
|
233
261
|
"ciphers",
|
|
234
262
|
"clientCertEngine",
|
|
@@ -264,6 +292,7 @@ export const TLS_SERVER_DOCUMENTED_OPTIONS = new Set([
|
|
|
264
292
|
"allowHalfOpen",
|
|
265
293
|
"ca",
|
|
266
294
|
"cert",
|
|
295
|
+
"certificateCompression",
|
|
267
296
|
"ciphers",
|
|
268
297
|
"clientCertEngine",
|
|
269
298
|
"crl",
|
|
@@ -465,7 +494,7 @@ export const COMPOUND_ASSIGN_OPS = {
|
|
|
465
494
|
* smuggle itself in by name. `minArgs`/`maxArgs` pin the LOWERED call
|
|
466
495
|
* forms: the lib declares wider signatures (optional position/fromIndex
|
|
467
496
|
* parameters) that typecheck but have no lowering — those forms are fenced
|
|
468
|
-
* per site instead of
|
|
497
|
+
* per site instead of dropping arguments without a diagnostic. */
|
|
469
498
|
export const STR_METHODS = {
|
|
470
499
|
charCodeAt: { method: "charCodeAt", result: F64, minArgs: 0, maxArgs: 1 },
|
|
471
500
|
charAt: { method: "charAt", result: STRING, minArgs: 0, maxArgs: 1 },
|
|
@@ -799,7 +828,7 @@ const PATH_MODULE_FNS = {
|
|
|
799
828
|
parse: { fn: "path.parse", params: [STRING], result: VOID },
|
|
800
829
|
format: { fn: "path.format", params: [], result: STRING },
|
|
801
830
|
};
|
|
802
|
-
/** The win32 twins (scr_path.c's Node-v24 path.win32
|
|
831
|
+
/** The win32 twins (scr_path.c's exact port of Node-v24 path.win32):
|
|
803
832
|
* "path/win32" everywhere, and the bare-module table when the build
|
|
804
833
|
* TARGETS win32 — Node on Windows is path.win32. */
|
|
805
834
|
const PATH_WIN32_MODULE_FNS = {
|
|
@@ -878,13 +907,61 @@ const PATH_WIN32_MODULE_FNS = {
|
|
|
878
907
|
parse: { fn: "path.win32Parse", params: [STRING], result: VOID },
|
|
879
908
|
format: { fn: "path.win32Format", params: [], result: STRING },
|
|
880
909
|
};
|
|
910
|
+
/** util.types's own keys in Node's order (Node 24.22.0). The table is the
|
|
911
|
+
* key census for Object.keys over util.types and node:util/types, including
|
|
912
|
+
* the members that do not compile yet; the corpus checks it against Node. */
|
|
913
|
+
export const UTIL_TYPES_KEYS = [
|
|
914
|
+
"isArgumentsObject",
|
|
915
|
+
"isArrayBuffer",
|
|
916
|
+
"isAsyncFunction",
|
|
917
|
+
"isBigIntObject",
|
|
918
|
+
"isBooleanObject",
|
|
919
|
+
"isDate",
|
|
920
|
+
"isExternal",
|
|
921
|
+
"isGeneratorFunction",
|
|
922
|
+
"isGeneratorObject",
|
|
923
|
+
"isMap",
|
|
924
|
+
"isMapIterator",
|
|
925
|
+
"isModuleNamespaceObject",
|
|
926
|
+
"isNativeError",
|
|
927
|
+
"isNumberObject",
|
|
928
|
+
"isPromise",
|
|
929
|
+
"isProxy",
|
|
930
|
+
"isRegExp",
|
|
931
|
+
"isSet",
|
|
932
|
+
"isSetIterator",
|
|
933
|
+
"isSharedArrayBuffer",
|
|
934
|
+
"isStringObject",
|
|
935
|
+
"isSymbolObject",
|
|
936
|
+
"isWeakMap",
|
|
937
|
+
"isWeakSet",
|
|
938
|
+
"isAnyArrayBuffer",
|
|
939
|
+
"isBoxedPrimitive",
|
|
940
|
+
"isArrayBufferView",
|
|
941
|
+
"isDataView",
|
|
942
|
+
"isTypedArray",
|
|
943
|
+
"isUint8Array",
|
|
944
|
+
"isUint8ClampedArray",
|
|
945
|
+
"isUint16Array",
|
|
946
|
+
"isUint32Array",
|
|
947
|
+
"isInt8Array",
|
|
948
|
+
"isInt16Array",
|
|
949
|
+
"isInt32Array",
|
|
950
|
+
"isFloat16Array",
|
|
951
|
+
"isFloat32Array",
|
|
952
|
+
"isFloat64Array",
|
|
953
|
+
"isBigInt64Array",
|
|
954
|
+
"isBigUint64Array",
|
|
955
|
+
"isKeyObject",
|
|
956
|
+
"isCryptoKey",
|
|
957
|
+
];
|
|
881
958
|
export const BUILTIN_MODULE_FNS = {
|
|
882
959
|
fs: {
|
|
883
960
|
readFileSync: { fn: "fs.readFileSync", params: [STRING, STRING], result: STRING },
|
|
884
961
|
// The exact-API subset is first-class. A fixed native ABI is not enough:
|
|
885
962
|
// rows whose Node function has behavior-bearing trailing options remain
|
|
886
|
-
// call-only, or function-width adaptation could
|
|
887
|
-
//
|
|
963
|
+
// call-only, or function-width adaptation could discard those options
|
|
964
|
+
// without a diagnostic before entering the fixed runtime call.
|
|
888
965
|
writeFileSync: { fn: "fs.writeFileSync", params: [STRING, STRING], result: VOID },
|
|
889
966
|
appendFileSync: { fn: "fs.appendFileSync", params: [STRING, STRING], result: VOID },
|
|
890
967
|
existsSync: {
|
|
@@ -897,6 +974,8 @@ export const BUILTIN_MODULE_FNS = {
|
|
|
897
974
|
rmSync: { fn: "fs.rmSync", params: [STRING], result: VOID },
|
|
898
975
|
rmdirSync: { fn: "fs.rmdirSync", params: [STRING], result: VOID },
|
|
899
976
|
readdirSync: { fn: "fs.readdirSync", params: [STRING], result: arrayOf(STRING) },
|
|
977
|
+
// Pattern and options are checked by the runtime (lowerFsGlobSyncCall).
|
|
978
|
+
globSync: { fn: "fs.globSync", params: [DYN, DYN], result: arrayOf(STRING) },
|
|
900
979
|
statSync: { fn: "fs.statSync", params: [STRING], result: STATS_T },
|
|
901
980
|
mkdtempSync: { fn: "fs.mkdtempSync", params: [STRING], result: STRING },
|
|
902
981
|
// accessSync's omitted mode completes to 0 (F_OK) in the special case
|
|
@@ -920,6 +999,21 @@ export const BUILTIN_MODULE_FNS = {
|
|
|
920
999
|
result: VOID,
|
|
921
1000
|
valueParams: exactValueParams(STRING, F64, F64),
|
|
922
1001
|
},
|
|
1002
|
+
lchownSync: {
|
|
1003
|
+
fn: "fs.lchownSync",
|
|
1004
|
+
params: [STRING, F64, F64],
|
|
1005
|
+
result: VOID,
|
|
1006
|
+
valueParams: exactValueParams(STRING, F64, F64),
|
|
1007
|
+
},
|
|
1008
|
+
fchownSync: {
|
|
1009
|
+
fn: "fs.fchownSync",
|
|
1010
|
+
params: [F64, F64, F64],
|
|
1011
|
+
result: VOID,
|
|
1012
|
+
valueParams: exactValueParams(F64, F64, F64),
|
|
1013
|
+
},
|
|
1014
|
+
// truncateSync's omitted len completes to 0 in lowerBuiltinModuleCall,
|
|
1015
|
+
// like accessSync's mode.
|
|
1016
|
+
truncateSync: { fn: "fs.truncateSync", params: [STRING, F64], result: VOID },
|
|
923
1017
|
// The 2-argument form only: Node's mode flags (COPYFILE_EXCL, ...)
|
|
924
1018
|
// land on the arity fence.
|
|
925
1019
|
copyFileSync: { fn: "fs.copyFileSync", params: [STRING, STRING], result: VOID },
|
|
@@ -936,6 +1030,9 @@ export const BUILTIN_MODULE_FNS = {
|
|
|
936
1030
|
},
|
|
937
1031
|
// statSync's no-follow sibling; stats.isSymbolicLink answers what the
|
|
938
1032
|
// follow-free snapshot saw.
|
|
1033
|
+
// opendirSync's options (a literal { bufferSize, encoding: "utf8" })
|
|
1034
|
+
// lower in lowerBuiltinModuleCall; the row routes the dispatch.
|
|
1035
|
+
opendirSync: { fn: "fs.opendirSync", params: [STRING, F64], result: DIR_T },
|
|
939
1036
|
lstatSync: { fn: "fs.lstatSync", params: [STRING], result: STATS_T },
|
|
940
1037
|
fstatSync: {
|
|
941
1038
|
fn: "fs.fstatSync",
|
|
@@ -1050,9 +1147,16 @@ export const BUILTIN_MODULE_FNS = {
|
|
|
1050
1147
|
result: { kind: "promise", inner: arrayOf(STRING) },
|
|
1051
1148
|
},
|
|
1052
1149
|
rm: { fn: "fsp.rm", params: [STRING], result: { kind: "promise", inner: VOID } },
|
|
1150
|
+
// The async iterator lowers only as a for await head (lowerFspGlobCall).
|
|
1151
|
+
glob: { fn: "fsp.globStrings", params: [DYN, DYN], result: arrayOf(STRING) },
|
|
1053
1152
|
stat: { fn: "fsp.stat", params: [STRING], result: { kind: "promise", inner: STATS_T } },
|
|
1054
1153
|
realpath: { fn: "fsp.realpath", params: [STRING], result: { kind: "promise", inner: STRING } },
|
|
1055
1154
|
lstat: { fn: "fsp.lstat", params: [STRING], result: { kind: "promise", inner: STATS_T } },
|
|
1155
|
+
opendir: {
|
|
1156
|
+
fn: "fsp.opendir",
|
|
1157
|
+
params: [STRING, F64],
|
|
1158
|
+
result: { kind: "promise", inner: DIR_T },
|
|
1159
|
+
},
|
|
1056
1160
|
unlink: {
|
|
1057
1161
|
fn: "fsp.unlink",
|
|
1058
1162
|
params: [STRING],
|
|
@@ -1065,6 +1169,41 @@ export const BUILTIN_MODULE_FNS = {
|
|
|
1065
1169
|
result: { kind: "promise", inner: VOID },
|
|
1066
1170
|
valueParams: exactValueParams(STRING, F64),
|
|
1067
1171
|
},
|
|
1172
|
+
chown: {
|
|
1173
|
+
fn: "fsp.chown",
|
|
1174
|
+
params: [STRING, F64, F64],
|
|
1175
|
+
result: { kind: "promise", inner: VOID },
|
|
1176
|
+
valueParams: exactValueParams(STRING, F64, F64),
|
|
1177
|
+
},
|
|
1178
|
+
lchown: {
|
|
1179
|
+
fn: "fsp.lchown",
|
|
1180
|
+
params: [STRING, F64, F64],
|
|
1181
|
+
result: { kind: "promise", inner: VOID },
|
|
1182
|
+
valueParams: exactValueParams(STRING, F64, F64),
|
|
1183
|
+
},
|
|
1184
|
+
// access' omitted mode and truncate's omitted len complete to 0 in
|
|
1185
|
+
// lowerBuiltinModuleCall, like their sync spellings.
|
|
1186
|
+
access: { fn: "fsp.access", params: [STRING, F64], result: { kind: "promise", inner: VOID } },
|
|
1187
|
+
truncate: {
|
|
1188
|
+
fn: "fsp.truncate",
|
|
1189
|
+
params: [STRING, F64],
|
|
1190
|
+
result: { kind: "promise", inner: VOID },
|
|
1191
|
+
},
|
|
1192
|
+
// String data; Uint8Array/Buffer data routes to fsp.appendFileBytes in
|
|
1193
|
+
// lowerBuiltinModuleCall.
|
|
1194
|
+
appendFile: {
|
|
1195
|
+
fn: "fsp.appendFile",
|
|
1196
|
+
params: [STRING, STRING],
|
|
1197
|
+
result: { kind: "promise", inner: VOID },
|
|
1198
|
+
},
|
|
1199
|
+
// The 2-argument form only, like copyFileSync.
|
|
1200
|
+
copyFile: {
|
|
1201
|
+
fn: "fsp.copyFile",
|
|
1202
|
+
params: [STRING, STRING],
|
|
1203
|
+
result: { kind: "promise", inner: VOID },
|
|
1204
|
+
},
|
|
1205
|
+
mkdtemp: { fn: "fsp.mkdtemp", params: [STRING], result: { kind: "promise", inner: STRING } },
|
|
1206
|
+
rmdir: { fn: "fsp.rmdir", params: [STRING], result: { kind: "promise", inner: VOID } },
|
|
1068
1207
|
link: {
|
|
1069
1208
|
fn: "fsp.link",
|
|
1070
1209
|
params: [DYN, DYN],
|
|
@@ -1207,6 +1346,11 @@ export const BUILTIN_MODULE_FNS = {
|
|
|
1207
1346
|
timingSafeEqual: { fn: "crypto.timingSafeEqual", params: [BYTES_U8, BYTES_U8], result: BOOL },
|
|
1208
1347
|
randomFillSync: { fn: "crypto.randomFill", params: [BYTES_U8, F64, F64], result: BYTES_U8 },
|
|
1209
1348
|
randomInt: { fn: "crypto.randomInt", params: [F64, F64], result: F64 },
|
|
1349
|
+
randomFill: { fn: "crypto.randomFillCb", params: [], result: VOID },
|
|
1350
|
+
randomUUIDv7: { fn: "crypto.randomUUIDv7", params: [DYN], result: STRING },
|
|
1351
|
+
createSecretKey: { fn: "crypto.createSecretKey", params: [DYN, DYN], result: DYN },
|
|
1352
|
+
generateKeySync: { fn: "crypto.generateKeySync", params: [DYN, DYN], result: DYN },
|
|
1353
|
+
generateKey: { fn: "crypto.generateKeyCb", params: [], result: VOID },
|
|
1210
1354
|
pbkdf2Sync: {
|
|
1211
1355
|
fn: "crypto.pbkdf2",
|
|
1212
1356
|
params: [BYTES_U8, BYTES_U8, F64, F64, STRING],
|
|
@@ -1221,6 +1365,10 @@ export const BUILTIN_MODULE_FNS = {
|
|
|
1221
1365
|
hkdf: { fn: "crypto.hkdfCb", params: [], result: VOID },
|
|
1222
1366
|
scryptSync: { fn: "crypto.scrypt", params: [BYTES_U8, BYTES_U8, F64, DYN], result: BYTES_U8 },
|
|
1223
1367
|
scrypt: { fn: "crypto.scryptCb", params: [], result: VOID },
|
|
1368
|
+
// Checked-dynamic arguments; the result is a native Cipheriv or
|
|
1369
|
+
// Decipheriv handle (lowerCryptoModuleCall).
|
|
1370
|
+
createCipheriv: { fn: "crypto.cipherNew", params: [BOOL, DYN, DYN, DYN, DYN], result: DYN },
|
|
1371
|
+
createDecipheriv: { fn: "crypto.cipherNew", params: [BOOL, DYN, DYN, DYN, DYN], result: DYN },
|
|
1224
1372
|
},
|
|
1225
1373
|
zlib: {
|
|
1226
1374
|
// The default-options convenience family is special-cased in
|
|
@@ -1242,6 +1390,15 @@ export const BUILTIN_MODULE_FNS = {
|
|
|
1242
1390
|
unzip: { fn: "zlib.unzipCb", params: [], result: VOID },
|
|
1243
1391
|
unzipSync: { fn: "zlib.unzipSync", params: [BYTES_U8], result: BYTES_U8 },
|
|
1244
1392
|
crc32: { fn: "zlib.crc32", params: [], result: F64 },
|
|
1393
|
+
// The stream factories (special-cased in lowerZlibModuleCall): each
|
|
1394
|
+
// answers a runtime Transform stream over the zlib engine.
|
|
1395
|
+
createDeflate: { fn: "zlib.streamNew", params: [], result: ZLIB_STREAM },
|
|
1396
|
+
createInflate: { fn: "zlib.streamNew", params: [], result: ZLIB_STREAM },
|
|
1397
|
+
createGzip: { fn: "zlib.streamNew", params: [], result: ZLIB_STREAM },
|
|
1398
|
+
createGunzip: { fn: "zlib.streamNew", params: [], result: ZLIB_STREAM },
|
|
1399
|
+
createDeflateRaw: { fn: "zlib.streamNew", params: [], result: ZLIB_STREAM },
|
|
1400
|
+
createInflateRaw: { fn: "zlib.streamNew", params: [], result: ZLIB_STREAM },
|
|
1401
|
+
createUnzip: { fn: "zlib.streamNew", params: [], result: ZLIB_STREAM },
|
|
1245
1402
|
},
|
|
1246
1403
|
url: {
|
|
1247
1404
|
fileURLToPath: {
|
|
@@ -1271,6 +1428,14 @@ export const BUILTIN_MODULE_FNS = {
|
|
|
1271
1428
|
{ mode: "optional", type: DYN, defaultValue: undefined },
|
|
1272
1429
|
],
|
|
1273
1430
|
},
|
|
1431
|
+
// The legacy API and the domain pair (lowerLegacyUrlCall): arguments
|
|
1432
|
+
// cross as dyn values for Node's own validators; url.parse() answers
|
|
1433
|
+
// the checked-dynamic Url instance.
|
|
1434
|
+
parse: { fn: "url.legacyParse", params: [DYN, DYN, DYN], result: DYN },
|
|
1435
|
+
format: { fn: "url.legacyFormat", params: [DYN, DYN], result: STRING },
|
|
1436
|
+
resolve: { fn: "url.legacyResolve", params: [DYN, DYN], result: STRING },
|
|
1437
|
+
domainToASCII: { fn: "url.domainToASCII", params: [DYN], result: STRING },
|
|
1438
|
+
domainToUnicode: { fn: "url.domainToUnicode", params: [DYN], result: STRING },
|
|
1274
1439
|
},
|
|
1275
1440
|
child_process: {
|
|
1276
1441
|
// spawnSync's and spawn's call completions are entirely special-cased
|
|
@@ -1473,6 +1638,11 @@ export const BUILTIN_MODULE_FNS = {
|
|
|
1473
1638
|
readline: {
|
|
1474
1639
|
createInterface: { fn: "rl.create", params: [], result: F64 },
|
|
1475
1640
|
},
|
|
1641
|
+
// node:readline/promises: the same Interface with the promise question
|
|
1642
|
+
// (lowerReadlineMethodCall tells the forms apart by the call's result).
|
|
1643
|
+
"readline/promises": {
|
|
1644
|
+
createInterface: { fn: "rl.create", params: [], result: F64 },
|
|
1645
|
+
},
|
|
1476
1646
|
// node:net and node:http lower ENTIRELY through the server spoke
|
|
1477
1647
|
// (lower-server.ts — every call shape is special-cased: closures, the
|
|
1478
1648
|
// optional connect host, writeHead's literal headers); the member list
|
|
@@ -1493,6 +1663,10 @@ export const BUILTIN_MODULE_FNS = {
|
|
|
1493
1663
|
params: [F64],
|
|
1494
1664
|
result: VOID,
|
|
1495
1665
|
},
|
|
1666
|
+
// Node's IPv4Reg / IPv6Reg tests over String(input).
|
|
1667
|
+
isIP: { fn: "net.isIP", params: [DYN], result: F64 },
|
|
1668
|
+
isIPv4: { fn: "net.isIPv4", params: [DYN], result: BOOL },
|
|
1669
|
+
isIPv6: { fn: "net.isIPv6", params: [DYN], result: BOOL },
|
|
1496
1670
|
},
|
|
1497
1671
|
http: {},
|
|
1498
1672
|
// node:tls and node:https ride the same spoke (tls.createServer's
|
|
@@ -1525,8 +1699,7 @@ export const BUILTIN_MODULE_FNS = {
|
|
|
1525
1699
|
"stream/promises": {},
|
|
1526
1700
|
// node:stream/consumers rides the stream spoke as well (text/json/
|
|
1527
1701
|
// buffer/arrayBuffer special-case their stream argument); blob fences
|
|
1528
|
-
// module-qualified with the pointed hint below
|
|
1529
|
-
// representation in a compiled binary.
|
|
1702
|
+
// module-qualified with the pointed hint below.
|
|
1530
1703
|
"stream/consumers": {},
|
|
1531
1704
|
// node:timers/promises — the delay-only setTimeout and bare setImmediate
|
|
1532
1705
|
// (void promises the shared timer heap settles). The arity completion
|
|
@@ -1567,6 +1740,9 @@ export const BUILTIN_MODULE_CONSTS = {
|
|
|
1567
1740
|
os: { EOL: "\n", devNull: "/dev/null" },
|
|
1568
1741
|
worker_threads: { isMainThread: true, threadId: 0 },
|
|
1569
1742
|
cluster: { isPrimary: true, isMaster: true, isWorker: false },
|
|
1743
|
+
// zlib's module-level copies of its constants (every member outside
|
|
1744
|
+
// BROTLI_*, Node's own loop over zlib.constants).
|
|
1745
|
+
zlib: Object.fromEntries(Object.entries(ZLIB_CONSTANTS).filter(([name]) => !name.startsWith("BROTLI"))),
|
|
1570
1746
|
};
|
|
1571
1747
|
/** ALTERNATE libCall spellings of tabled builtin members: lowerings the
|
|
1572
1748
|
* dispatch special-cases around the table row (Buffer/fd/options forms,
|
|
@@ -1607,6 +1783,7 @@ export const BUILTIN_MODULE_FN_ALIASES = {
|
|
|
1607
1783
|
rmSync: ["fs.rmOptsSync", "fs.rmRetrySync"],
|
|
1608
1784
|
// The { withFileTypes: true } Dirent form.
|
|
1609
1785
|
readdirSync: ["fs.readdirTypesSync"],
|
|
1786
|
+
globSync: ["fs.globTypesSync"],
|
|
1610
1787
|
// The JS-source validation-ladder variant (lowerFsLadderCall): the
|
|
1611
1788
|
// real mkdtemp runs when the options leave utf8 semantics.
|
|
1612
1789
|
mkdtempSync: ["fs.mkdtempSyncChk"],
|
|
@@ -1619,13 +1796,16 @@ export const BUILTIN_MODULE_FN_ALIASES = {
|
|
|
1619
1796
|
watch: ["fs.watchCb"],
|
|
1620
1797
|
},
|
|
1621
1798
|
"fs/promises": {
|
|
1622
|
-
// The Buffer form (no encoding).
|
|
1623
|
-
readFile: ["fsp.readFileBytes"],
|
|
1799
|
+
// The Buffer form (no encoding) and the runtime-encoding forms.
|
|
1800
|
+
readFile: ["fsp.readFileBytes", "fsp.readFileEncoded"],
|
|
1624
1801
|
readlink: ["fsp.readlinkStr", "fsp.readlinkBuffer"],
|
|
1625
1802
|
// The string-data { mode } options form.
|
|
1626
1803
|
writeFile: ["fsp.writeFileMode"],
|
|
1627
1804
|
// The { withFileTypes: true } Dirent form.
|
|
1628
1805
|
readdir: ["fsp.readdirTypes"],
|
|
1806
|
+
glob: ["fsp.globTypes"],
|
|
1807
|
+
// The Uint8Array/Buffer-data form.
|
|
1808
|
+
appendFile: ["fsp.appendFileBytes"],
|
|
1629
1809
|
},
|
|
1630
1810
|
crypto: {
|
|
1631
1811
|
// The composed randomBytes(n).toString(enc) chain keeps its one-libCall
|
|
@@ -1634,7 +1814,17 @@ export const BUILTIN_MODULE_FN_ALIASES = {
|
|
|
1634
1814
|
randomBytes: ["crypto.randomBytesToString", "crypto.randomBytesCb"],
|
|
1635
1815
|
// Omitting size fills from offset through the rest of the Buffer and
|
|
1636
1816
|
// uses a separate runtime entry point for Node's exact bounds checks.
|
|
1637
|
-
|
|
1817
|
+
// Views of every kind return themselves; other buffers take the Dyn form.
|
|
1818
|
+
randomFillSync: [
|
|
1819
|
+
"crypto.randomFillRest",
|
|
1820
|
+
"crypto.randomFillView",
|
|
1821
|
+
"crypto.randomFillViewRest",
|
|
1822
|
+
"crypto.randomFillSyncDyn",
|
|
1823
|
+
],
|
|
1824
|
+
randomFill: ["crypto.randomFillCbDyn"],
|
|
1825
|
+
timingSafeEqual: ["crypto.timingSafeEqualDyn"],
|
|
1826
|
+
randomInt: ["crypto.randomIntMax", "crypto.randomIntCb"],
|
|
1827
|
+
randomUUID: ["crypto.randomUUIDOpts"],
|
|
1638
1828
|
},
|
|
1639
1829
|
os: {
|
|
1640
1830
|
// lowerOsUserInfoCall assembles the record from scalar libCalls.
|
|
@@ -1665,6 +1855,20 @@ export const AMBIENT_SURFACE_FNS = [
|
|
|
1665
1855
|
fns: ["sharedArrayBuffer.new"],
|
|
1666
1856
|
note: "fixed shared storage with context-local typed-array and DataView wrappers",
|
|
1667
1857
|
},
|
|
1858
|
+
{
|
|
1859
|
+
id: "stdlib.blob",
|
|
1860
|
+
kind: "stdlib",
|
|
1861
|
+
name: "Blob",
|
|
1862
|
+
fns: ["blob.new", "blob.slice", "blob.text", "blob.bytes", "blob.arrayBuffer", "blob.is"],
|
|
1863
|
+
note: "immutable bytes with size, type, slice(), text(), bytes(), arrayBuffer() and structured cloning",
|
|
1864
|
+
},
|
|
1865
|
+
{
|
|
1866
|
+
id: "stdlib.file",
|
|
1867
|
+
kind: "stdlib",
|
|
1868
|
+
name: "File",
|
|
1869
|
+
fns: ["blob.fileNew"],
|
|
1870
|
+
note: "a Blob with name and lastModified (Date.now() when absent)",
|
|
1871
|
+
},
|
|
1668
1872
|
{
|
|
1669
1873
|
id: "stdlib.atomics",
|
|
1670
1874
|
kind: "stdlib",
|
|
@@ -1676,7 +1880,7 @@ export const AMBIENT_SURFACE_FNS = [
|
|
|
1676
1880
|
id: "node-builtin.fs.callbacks",
|
|
1677
1881
|
kind: "node-builtin",
|
|
1678
1882
|
name: "fs error-first callbacks",
|
|
1679
|
-
fns: ["fs.callbackValue", "fs.callbackCall"],
|
|
1883
|
+
fns: ["fs.callbackValue", "fs.callbackCall", "fs.callbackGlob"],
|
|
1680
1884
|
note: "native filesystem callbacks, including stored platform adapter functions",
|
|
1681
1885
|
},
|
|
1682
1886
|
// ── the Date slice (lowerDateCall/lowerNew): statics, construction,
|
|
@@ -1835,6 +2039,48 @@ export const AMBIENT_SURFACE_FNS = [
|
|
|
1835
2039
|
fns: ["perf.now"],
|
|
1836
2040
|
note: "the global performance object and the performance.now.bind(performance) function value reach the same clock",
|
|
1837
2041
|
},
|
|
2042
|
+
{
|
|
2043
|
+
id: "node-builtin.perf_hooks.performance.mark",
|
|
2044
|
+
kind: "node-builtin",
|
|
2045
|
+
name: "perf_hooks.performance.mark",
|
|
2046
|
+
fns: [
|
|
2047
|
+
"perf.mark",
|
|
2048
|
+
"perf.entryName",
|
|
2049
|
+
"perf.entryType",
|
|
2050
|
+
"perf.entryStart",
|
|
2051
|
+
"perf.entryDuration",
|
|
2052
|
+
"perf.entryDetail",
|
|
2053
|
+
"perf.entryKeep",
|
|
2054
|
+
"perf.entryRef",
|
|
2055
|
+
],
|
|
2056
|
+
note: "records a mark in the thread's performance timeline at the live clock or the given startTime",
|
|
2057
|
+
},
|
|
2058
|
+
{
|
|
2059
|
+
id: "node-builtin.perf_hooks.performance.measure",
|
|
2060
|
+
kind: "node-builtin",
|
|
2061
|
+
name: "perf_hooks.performance.measure",
|
|
2062
|
+
fns: ["perf.measure"],
|
|
2063
|
+
note: "the mark-name, timestamp, and options forms are one surface",
|
|
2064
|
+
},
|
|
2065
|
+
{
|
|
2066
|
+
id: "node-builtin.perf_hooks.performance.getEntries",
|
|
2067
|
+
kind: "node-builtin",
|
|
2068
|
+
name: "perf_hooks.performance.getEntries",
|
|
2069
|
+
fns: ["perf.entries"],
|
|
2070
|
+
note: "getEntries, getEntriesByName, and getEntriesByType read the same timeline",
|
|
2071
|
+
},
|
|
2072
|
+
{
|
|
2073
|
+
id: "node-builtin.perf_hooks.performance.clearMarks",
|
|
2074
|
+
kind: "node-builtin",
|
|
2075
|
+
name: "perf_hooks.performance.clearMarks",
|
|
2076
|
+
fns: ["perf.clearMarks"],
|
|
2077
|
+
},
|
|
2078
|
+
{
|
|
2079
|
+
id: "node-builtin.perf_hooks.performance.clearMeasures",
|
|
2080
|
+
kind: "node-builtin",
|
|
2081
|
+
name: "perf_hooks.performance.clearMeasures",
|
|
2082
|
+
fns: ["perf.clearMeasures"],
|
|
2083
|
+
},
|
|
1838
2084
|
// ── the process global's ambient reads and authority calls
|
|
1839
2085
|
// (lowerProcessProperty/lowerProcessMethodCall — process is a
|
|
1840
2086
|
// provenance-checked global here, not an importable module).
|
|
@@ -1872,6 +2118,13 @@ export const AMBIENT_SURFACE_FNS = [
|
|
|
1872
2118
|
fns: ["process.versions"],
|
|
1873
2119
|
note: "shared version dictionary containing node and openssl; other components are absent unless defined by the program",
|
|
1874
2120
|
},
|
|
2121
|
+
{
|
|
2122
|
+
id: "node-builtin.process.release",
|
|
2123
|
+
kind: "node-builtin",
|
|
2124
|
+
name: "process.release",
|
|
2125
|
+
fns: ["process.release"],
|
|
2126
|
+
note: "the compatibility target's release metadata as one stable read-only object",
|
|
2127
|
+
},
|
|
1875
2128
|
{
|
|
1876
2129
|
id: "node-builtin.process.cwd",
|
|
1877
2130
|
kind: "node-builtin",
|
|
@@ -1902,6 +2155,43 @@ export const AMBIENT_SURFACE_FNS = [
|
|
|
1902
2155
|
name: "process.getgid",
|
|
1903
2156
|
fns: ["process.getgid"],
|
|
1904
2157
|
},
|
|
2158
|
+
{
|
|
2159
|
+
id: "node-builtin.process.geteuid",
|
|
2160
|
+
kind: "node-builtin",
|
|
2161
|
+
name: "process.geteuid",
|
|
2162
|
+
fns: ["process.geteuid"],
|
|
2163
|
+
},
|
|
2164
|
+
{
|
|
2165
|
+
id: "node-builtin.process.getegid",
|
|
2166
|
+
kind: "node-builtin",
|
|
2167
|
+
name: "process.getegid",
|
|
2168
|
+
fns: ["process.getegid"],
|
|
2169
|
+
},
|
|
2170
|
+
{
|
|
2171
|
+
id: "node-builtin.process.getgroups",
|
|
2172
|
+
kind: "node-builtin",
|
|
2173
|
+
name: "process.getgroups",
|
|
2174
|
+
fns: ["process.getgroups"],
|
|
2175
|
+
},
|
|
2176
|
+
{
|
|
2177
|
+
id: "node-builtin.process.ppid",
|
|
2178
|
+
kind: "node-builtin",
|
|
2179
|
+
name: "process.ppid",
|
|
2180
|
+
fns: ["process.ppid"],
|
|
2181
|
+
},
|
|
2182
|
+
{
|
|
2183
|
+
id: "node-builtin.process.title",
|
|
2184
|
+
kind: "node-builtin",
|
|
2185
|
+
name: "process.title",
|
|
2186
|
+
fns: ["process.title", "process.setTitle"],
|
|
2187
|
+
note: "reads and writes of the process title are one surface",
|
|
2188
|
+
},
|
|
2189
|
+
{
|
|
2190
|
+
id: "node-builtin.process.argv0",
|
|
2191
|
+
kind: "node-builtin",
|
|
2192
|
+
name: "process.argv0",
|
|
2193
|
+
fns: ["process.argv0"],
|
|
2194
|
+
},
|
|
1905
2195
|
{
|
|
1906
2196
|
id: "node-builtin.process.execPath",
|
|
1907
2197
|
kind: "node-builtin",
|
|
@@ -1926,6 +2216,13 @@ export const AMBIENT_SURFACE_FNS = [
|
|
|
1926
2216
|
name: "process.constrainedMemory",
|
|
1927
2217
|
fns: ["process.constrainedMemory"],
|
|
1928
2218
|
},
|
|
2219
|
+
{
|
|
2220
|
+
id: "node-builtin.process.memoryUsage",
|
|
2221
|
+
kind: "node-builtin",
|
|
2222
|
+
name: "process.memoryUsage",
|
|
2223
|
+
fns: ["process.memoryUsageTake", "process.memoryUsageField", "process.rss"],
|
|
2224
|
+
note: "the record and memoryUsage.rss() read live memory state; external and arrayBuffers are 0",
|
|
2225
|
+
},
|
|
1929
2226
|
{
|
|
1930
2227
|
id: "node-builtin.process.resourceUsage",
|
|
1931
2228
|
kind: "node-builtin",
|
|
@@ -2086,6 +2383,8 @@ export const FS_CALLBACK_MEMBERS = new Set([
|
|
|
2086
2383
|
"copyFile",
|
|
2087
2384
|
"chmod",
|
|
2088
2385
|
"chown",
|
|
2386
|
+
"lchown",
|
|
2387
|
+
"fchown",
|
|
2089
2388
|
"glob",
|
|
2090
2389
|
"link",
|
|
2091
2390
|
"mkdir",
|
|
@@ -2248,21 +2547,17 @@ export function builtinModulesArrayLit(loc) {
|
|
|
2248
2547
|
/** Member-specific hints for RECOGNIZED builtin modules whose member has
|
|
2249
2548
|
* no lowering. The default-options one-shot zlib/deflate-raw/gzip codecs
|
|
2250
2549
|
* lower for strings and Buffers; the remaining surface points at them. */
|
|
2251
|
-
const ZLIB_HINT = "the default-options deflate/inflate, raw, gzip/gunzip, and unzip sync/callback forms
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2550
|
+
const ZLIB_HINT = "the default-options deflate/inflate, raw, gzip/gunzip, and unzip sync/callback forms, crc32, " +
|
|
2551
|
+
"and the Deflate/Inflate/Gzip/Gunzip/DeflateRaw/InflateRaw/Unzip streams are the lowered zlib surface";
|
|
2552
|
+
/** Brotli has no codec in the static runtime (zlib is the only vendored
|
|
2553
|
+
* compression library). */
|
|
2554
|
+
const BROTLI_HINT = "Brotli needs a Brotli codec, which the static runtime does not vendor — " + ZLIB_HINT;
|
|
2256
2555
|
const ASSERT_MODULE_HINTS = {
|
|
2257
|
-
deepEqual: ASSERT_LOOSE_DEEP_HINT,
|
|
2258
|
-
notDeepEqual: ASSERT_LOOSE_DEEP_HINT,
|
|
2259
2556
|
ifError: "test explicitly instead: assert.strictEqual(err, null) / " +
|
|
2260
2557
|
"assert.strictEqual(err, undefined)",
|
|
2261
2558
|
rejects: "await the promise inside assert.throws's callback story instead: " +
|
|
2262
2559
|
'try { await p; assert.fail("expected rejection") } catch { ... }',
|
|
2263
2560
|
doesNotReject: "await the promise directly — an unexpected rejection already fails the test",
|
|
2264
|
-
AssertionError: "the class itself has no lowering — catch and test err.name === " +
|
|
2265
|
-
'"AssertionError" or err.code === "ERR_ASSERTION"',
|
|
2266
2561
|
};
|
|
2267
2562
|
export const BUILTIN_MODULE_FENCE_HINTS = {
|
|
2268
2563
|
assert: ASSERT_MODULE_HINTS,
|
|
@@ -2273,14 +2568,13 @@ export const BUILTIN_MODULE_FENCE_HINTS = {
|
|
|
2273
2568
|
ifError: ASSERT_MODULE_HINTS["ifError"],
|
|
2274
2569
|
rejects: ASSERT_MODULE_HINTS["rejects"],
|
|
2275
2570
|
doesNotReject: ASSERT_MODULE_HINTS["doesNotReject"],
|
|
2276
|
-
AssertionError: ASSERT_MODULE_HINTS["AssertionError"],
|
|
2277
2571
|
},
|
|
2278
2572
|
util: {
|
|
2279
2573
|
promisify: "the lowered shapes are const bindings over child_process.execFile and fs.readFile; call the bound function directly",
|
|
2280
2574
|
},
|
|
2281
2575
|
"stream/consumers": {
|
|
2282
|
-
blob: "
|
|
2283
|
-
"buffer(stream) collects the same bytes as a Buffer, text(stream) the decoded text",
|
|
2576
|
+
blob: "collecting a stream into a Blob is not supported yet — " +
|
|
2577
|
+
"buffer(stream) collects the same bytes as a Buffer (new Blob([buffer]) wraps them), text(stream) the decoded text",
|
|
2284
2578
|
},
|
|
2285
2579
|
module: {
|
|
2286
2580
|
createRequire: "the lowered shape is a const binding (or a proven stable top-level let/var) over createRequire(import.meta.url) (or __filename) " +
|
|
@@ -2298,11 +2592,8 @@ export const BUILTIN_MODULE_FENCE_HINTS = {
|
|
|
2298
2592
|
...Object.fromEntries([
|
|
2299
2593
|
"generateKeyPair",
|
|
2300
2594
|
"generateKeyPairSync",
|
|
2301
|
-
"generateKey",
|
|
2302
|
-
"generateKeySync",
|
|
2303
2595
|
"createPrivateKey",
|
|
2304
2596
|
"createPublicKey",
|
|
2305
|
-
"createSecretKey",
|
|
2306
2597
|
"createSign",
|
|
2307
2598
|
"createVerify",
|
|
2308
2599
|
"sign",
|
|
@@ -2318,14 +2609,14 @@ export const BUILTIN_MODULE_FENCE_HINTS = {
|
|
|
2318
2609
|
"privateDecrypt",
|
|
2319
2610
|
].map((m) => [
|
|
2320
2611
|
m,
|
|
2321
|
-
"asymmetric-key operations need a public-key stack (bignum, RSA/EC/EdDSA math) and
|
|
2322
|
-
"
|
|
2323
|
-
"can be small; the lowered crypto surface is hashing, randomness, and the introspection statics",
|
|
2612
|
+
"asymmetric-key operations need a public-key stack (bignum, RSA/EC/EdDSA math) and " +
|
|
2613
|
+
"public and private KeyObjects — neither exists in the static runtime, so no faithful lowering " +
|
|
2614
|
+
"can be small; the lowered crypto surface is hashing, randomness, secret KeyObjects, and the introspection statics",
|
|
2324
2615
|
])),
|
|
2325
|
-
...Object.fromEntries(["
|
|
2616
|
+
...Object.fromEntries(["getCipherInfo"].map((m) => [
|
|
2326
2617
|
m,
|
|
2327
|
-
"
|
|
2328
|
-
"
|
|
2618
|
+
"cipher metadata has no lowering — createCipheriv and createDecipheriv support " +
|
|
2619
|
+
"aes-128/192/256 in cbc, ctr, and gcm modes and chacha20-poly1305",
|
|
2329
2620
|
])),
|
|
2330
2621
|
setFips: "a compiled binary has no FIPS provider to enable, and Node itself throws on setFips(true) " +
|
|
2331
2622
|
"in a non-FIPS build — getFips() answers 0 here",
|
|
@@ -2333,8 +2624,14 @@ export const BUILTIN_MODULE_FENCE_HINTS = {
|
|
|
2333
2624
|
"randomBytes, and the createHash chain",
|
|
2334
2625
|
},
|
|
2335
2626
|
zlib: {
|
|
2336
|
-
brotliCompressSync:
|
|
2337
|
-
brotliDecompressSync:
|
|
2627
|
+
brotliCompressSync: BROTLI_HINT,
|
|
2628
|
+
brotliDecompressSync: BROTLI_HINT,
|
|
2629
|
+
brotliCompress: BROTLI_HINT,
|
|
2630
|
+
brotliDecompress: BROTLI_HINT,
|
|
2631
|
+
createBrotliCompress: BROTLI_HINT,
|
|
2632
|
+
createBrotliDecompress: BROTLI_HINT,
|
|
2633
|
+
BrotliCompress: BROTLI_HINT,
|
|
2634
|
+
BrotliDecompress: BROTLI_HINT,
|
|
2338
2635
|
},
|
|
2339
2636
|
http2: {
|
|
2340
2637
|
connect: "HTTP/2 client sessions have no lowering — the lowered http2 surface is the SERVER side: " +
|
|
@@ -2356,8 +2653,8 @@ export const BUILTIN_MODULE_FENCE_HINTS = {
|
|
|
2356
2653
|
* accessed member is stdlib-declared, the use is standard-library surface
|
|
2357
2654
|
* with no lowering — report SC2020 naming `<container>.<member>` (the
|
|
2358
2655
|
* receiver's global name when it IS a stdlib global like Math or Promise,
|
|
2359
|
-
* its widened type text otherwise). Returns
|
|
2360
|
-
* members so the caller's generic rejection applies. */
|
|
2656
|
+
* its widened type text otherwise). Returns without reporting for
|
|
2657
|
+
* non-stdlib members so the caller's generic rejection applies. */
|
|
2361
2658
|
export function stdlibMemberFence(lowerer, access) {
|
|
2362
2659
|
const sym = lowerer.checker.getSymbolAtLocation(access.name);
|
|
2363
2660
|
if (!sym || !lowerer.isStdlibSymbol(sym))
|