@scriptc/compiler 0.3.2 → 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 +490 -39
- package/dist/backend/cycle-analysis.js +6 -1
- package/dist/backend/cycle-analysis.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 +8 -1
- package/dist/backend/llvm/call-lifetimes.js +33 -11
- 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 +87 -36
- package/dist/backend/llvm/classes.js.map +1 -1
- 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 +1 -1
- package/dist/backend/llvm/dense-array-access.js.map +1 -1
- package/dist/backend/llvm/dyn.d.ts +4 -0
- package/dist/backend/llvm/dyn.js +73 -9
- package/dist/backend/llvm/dyn.js.map +1 -1
- package/dist/backend/llvm/emitter.d.ts +65 -14
- package/dist/backend/llvm/emitter.js +297 -81
- 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.js +11 -0
- 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.js +8 -1
- package/dist/backend/llvm/expr-calls.js.map +1 -1
- package/dist/backend/llvm/expr-containers.js +42 -15
- 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/lib-dispatch.js +163 -28
- package/dist/backend/llvm/lib-dispatch.js.map +1 -1
- package/dist/backend/llvm/lib-filesystem.js +125 -7
- 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 +132 -0
- 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 +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 +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 +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 +14 -0
- package/dist/backend/llvm/reference-writes.js.map +1 -1
- package/dist/backend/llvm/regions.d.ts +1 -0
- package/dist/backend/llvm/regions.js +12 -7
- 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/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 +9 -4
- package/dist/backend/may-throw.js.map +1 -1
- package/dist/backend/native/contracts.d.ts +2 -2
- package/dist/backend/native/executable.js +14 -3
- 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 +1 -0
- package/dist/backend/native/runtime-inputs.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-targets.test.js +1 -1
- package/dist/backend/runtime-pack.test.js +1 -1
- package/dist/backend/target-diagnostics.js +4 -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/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/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/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.js +3 -2
- package/dist/frontend/lowering/builtins/compression.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/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/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/class-dynamic-dispatch.d.ts +2 -0
- package/dist/frontend/lowering/class-dynamic-dispatch.js +105 -1
- 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/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 +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 +101 -9
- package/dist/frontend/lowering/lower-calls.js.map +1 -1
- package/dist/frontend/lowering/lower-classes.d.ts +8 -2
- package/dist/frontend/lowering/lower-classes.js +40 -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-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 +112 -22
- package/dist/frontend/lowering/lower-exprs.js.map +1 -1
- package/dist/frontend/lowering/lower-inspect.js +129 -11
- 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 +7 -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.js +39 -14
- 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 +46 -12
- 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 +23 -5
- package/dist/frontend/lowering/lowerer.js +245 -41
- 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/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 +273 -22
- package/dist/frontend/lowering/surfaces.js.map +1 -1
- 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 +1 -1
- package/dist/frontend/pipeline.js.map +1 -1
- package/dist/frontend/program.d.ts +3 -3
- package/dist/frontend/program.js +19 -17
- package/dist/frontend/program.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 +16 -1
- package/dist/frontend/type-mapper.js +143 -18
- package/dist/frontend/type-mapper.js.map +1 -1
- package/dist/index.js +5 -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 +79 -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 +291 -38
- 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 +64 -16
- package/dist/ir/ir.js +37 -1
- package/dist/ir/ir.js.map +1 -1
- package/dist/ir/runtime-features.js +83 -6
- 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 +100 -9
- 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 +10 -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/package.json +20 -20
- package/surface-manifest.json +379 -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 },
|
|
@@ -799,7 +803,7 @@ const PATH_MODULE_FNS = {
|
|
|
799
803
|
parse: { fn: "path.parse", params: [STRING], result: VOID },
|
|
800
804
|
format: { fn: "path.format", params: [], result: STRING },
|
|
801
805
|
};
|
|
802
|
-
/** 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):
|
|
803
807
|
* "path/win32" everywhere, and the bare-module table when the build
|
|
804
808
|
* TARGETS win32 — Node on Windows is path.win32. */
|
|
805
809
|
const PATH_WIN32_MODULE_FNS = {
|
|
@@ -878,13 +882,61 @@ const PATH_WIN32_MODULE_FNS = {
|
|
|
878
882
|
parse: { fn: "path.win32Parse", params: [STRING], result: VOID },
|
|
879
883
|
format: { fn: "path.win32Format", params: [], result: STRING },
|
|
880
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
|
+
];
|
|
881
933
|
export const BUILTIN_MODULE_FNS = {
|
|
882
934
|
fs: {
|
|
883
935
|
readFileSync: { fn: "fs.readFileSync", params: [STRING, STRING], result: STRING },
|
|
884
936
|
// The exact-API subset is first-class. A fixed native ABI is not enough:
|
|
885
937
|
// rows whose Node function has behavior-bearing trailing options remain
|
|
886
|
-
// call-only, or function-width adaptation could
|
|
887
|
-
//
|
|
938
|
+
// call-only, or function-width adaptation could discard those options
|
|
939
|
+
// without a diagnostic before entering the fixed runtime call.
|
|
888
940
|
writeFileSync: { fn: "fs.writeFileSync", params: [STRING, STRING], result: VOID },
|
|
889
941
|
appendFileSync: { fn: "fs.appendFileSync", params: [STRING, STRING], result: VOID },
|
|
890
942
|
existsSync: {
|
|
@@ -897,6 +949,8 @@ export const BUILTIN_MODULE_FNS = {
|
|
|
897
949
|
rmSync: { fn: "fs.rmSync", params: [STRING], result: VOID },
|
|
898
950
|
rmdirSync: { fn: "fs.rmdirSync", params: [STRING], result: VOID },
|
|
899
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) },
|
|
900
954
|
statSync: { fn: "fs.statSync", params: [STRING], result: STATS_T },
|
|
901
955
|
mkdtempSync: { fn: "fs.mkdtempSync", params: [STRING], result: STRING },
|
|
902
956
|
// accessSync's omitted mode completes to 0 (F_OK) in the special case
|
|
@@ -920,6 +974,21 @@ export const BUILTIN_MODULE_FNS = {
|
|
|
920
974
|
result: VOID,
|
|
921
975
|
valueParams: exactValueParams(STRING, F64, F64),
|
|
922
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 },
|
|
923
992
|
// The 2-argument form only: Node's mode flags (COPYFILE_EXCL, ...)
|
|
924
993
|
// land on the arity fence.
|
|
925
994
|
copyFileSync: { fn: "fs.copyFileSync", params: [STRING, STRING], result: VOID },
|
|
@@ -936,6 +1005,9 @@ export const BUILTIN_MODULE_FNS = {
|
|
|
936
1005
|
},
|
|
937
1006
|
// statSync's no-follow sibling; stats.isSymbolicLink answers what the
|
|
938
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 },
|
|
939
1011
|
lstatSync: { fn: "fs.lstatSync", params: [STRING], result: STATS_T },
|
|
940
1012
|
fstatSync: {
|
|
941
1013
|
fn: "fs.fstatSync",
|
|
@@ -1050,9 +1122,16 @@ export const BUILTIN_MODULE_FNS = {
|
|
|
1050
1122
|
result: { kind: "promise", inner: arrayOf(STRING) },
|
|
1051
1123
|
},
|
|
1052
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) },
|
|
1053
1127
|
stat: { fn: "fsp.stat", params: [STRING], result: { kind: "promise", inner: STATS_T } },
|
|
1054
1128
|
realpath: { fn: "fsp.realpath", params: [STRING], result: { kind: "promise", inner: STRING } },
|
|
1055
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
|
+
},
|
|
1056
1135
|
unlink: {
|
|
1057
1136
|
fn: "fsp.unlink",
|
|
1058
1137
|
params: [STRING],
|
|
@@ -1065,6 +1144,41 @@ export const BUILTIN_MODULE_FNS = {
|
|
|
1065
1144
|
result: { kind: "promise", inner: VOID },
|
|
1066
1145
|
valueParams: exactValueParams(STRING, F64),
|
|
1067
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 } },
|
|
1068
1182
|
link: {
|
|
1069
1183
|
fn: "fsp.link",
|
|
1070
1184
|
params: [DYN, DYN],
|
|
@@ -1207,6 +1321,11 @@ export const BUILTIN_MODULE_FNS = {
|
|
|
1207
1321
|
timingSafeEqual: { fn: "crypto.timingSafeEqual", params: [BYTES_U8, BYTES_U8], result: BOOL },
|
|
1208
1322
|
randomFillSync: { fn: "crypto.randomFill", params: [BYTES_U8, F64, F64], result: BYTES_U8 },
|
|
1209
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 },
|
|
1210
1329
|
pbkdf2Sync: {
|
|
1211
1330
|
fn: "crypto.pbkdf2",
|
|
1212
1331
|
params: [BYTES_U8, BYTES_U8, F64, F64, STRING],
|
|
@@ -1271,6 +1390,14 @@ export const BUILTIN_MODULE_FNS = {
|
|
|
1271
1390
|
{ mode: "optional", type: DYN, defaultValue: undefined },
|
|
1272
1391
|
],
|
|
1273
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 },
|
|
1274
1401
|
},
|
|
1275
1402
|
child_process: {
|
|
1276
1403
|
// spawnSync's and spawn's call completions are entirely special-cased
|
|
@@ -1473,6 +1600,11 @@ export const BUILTIN_MODULE_FNS = {
|
|
|
1473
1600
|
readline: {
|
|
1474
1601
|
createInterface: { fn: "rl.create", params: [], result: F64 },
|
|
1475
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
|
+
},
|
|
1476
1608
|
// node:net and node:http lower ENTIRELY through the server spoke
|
|
1477
1609
|
// (lower-server.ts — every call shape is special-cased: closures, the
|
|
1478
1610
|
// optional connect host, writeHead's literal headers); the member list
|
|
@@ -1525,8 +1657,7 @@ export const BUILTIN_MODULE_FNS = {
|
|
|
1525
1657
|
"stream/promises": {},
|
|
1526
1658
|
// node:stream/consumers rides the stream spoke as well (text/json/
|
|
1527
1659
|
// buffer/arrayBuffer special-case their stream argument); blob fences
|
|
1528
|
-
// module-qualified with the pointed hint below
|
|
1529
|
-
// representation in a compiled binary.
|
|
1660
|
+
// module-qualified with the pointed hint below.
|
|
1530
1661
|
"stream/consumers": {},
|
|
1531
1662
|
// node:timers/promises — the delay-only setTimeout and bare setImmediate
|
|
1532
1663
|
// (void promises the shared timer heap settles). The arity completion
|
|
@@ -1607,6 +1738,7 @@ export const BUILTIN_MODULE_FN_ALIASES = {
|
|
|
1607
1738
|
rmSync: ["fs.rmOptsSync", "fs.rmRetrySync"],
|
|
1608
1739
|
// The { withFileTypes: true } Dirent form.
|
|
1609
1740
|
readdirSync: ["fs.readdirTypesSync"],
|
|
1741
|
+
globSync: ["fs.globTypesSync"],
|
|
1610
1742
|
// The JS-source validation-ladder variant (lowerFsLadderCall): the
|
|
1611
1743
|
// real mkdtemp runs when the options leave utf8 semantics.
|
|
1612
1744
|
mkdtempSync: ["fs.mkdtempSyncChk"],
|
|
@@ -1619,13 +1751,16 @@ export const BUILTIN_MODULE_FN_ALIASES = {
|
|
|
1619
1751
|
watch: ["fs.watchCb"],
|
|
1620
1752
|
},
|
|
1621
1753
|
"fs/promises": {
|
|
1622
|
-
// The Buffer form (no encoding).
|
|
1623
|
-
readFile: ["fsp.readFileBytes"],
|
|
1754
|
+
// The Buffer form (no encoding) and the runtime-encoding forms.
|
|
1755
|
+
readFile: ["fsp.readFileBytes", "fsp.readFileEncoded"],
|
|
1624
1756
|
readlink: ["fsp.readlinkStr", "fsp.readlinkBuffer"],
|
|
1625
1757
|
// The string-data { mode } options form.
|
|
1626
1758
|
writeFile: ["fsp.writeFileMode"],
|
|
1627
1759
|
// The { withFileTypes: true } Dirent form.
|
|
1628
1760
|
readdir: ["fsp.readdirTypes"],
|
|
1761
|
+
glob: ["fsp.globTypes"],
|
|
1762
|
+
// The Uint8Array/Buffer-data form.
|
|
1763
|
+
appendFile: ["fsp.appendFileBytes"],
|
|
1629
1764
|
},
|
|
1630
1765
|
crypto: {
|
|
1631
1766
|
// The composed randomBytes(n).toString(enc) chain keeps its one-libCall
|
|
@@ -1634,7 +1769,17 @@ export const BUILTIN_MODULE_FN_ALIASES = {
|
|
|
1634
1769
|
randomBytes: ["crypto.randomBytesToString", "crypto.randomBytesCb"],
|
|
1635
1770
|
// Omitting size fills from offset through the rest of the Buffer and
|
|
1636
1771
|
// uses a separate runtime entry point for Node's exact bounds checks.
|
|
1637
|
-
|
|
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"],
|
|
1638
1783
|
},
|
|
1639
1784
|
os: {
|
|
1640
1785
|
// lowerOsUserInfoCall assembles the record from scalar libCalls.
|
|
@@ -1665,6 +1810,20 @@ export const AMBIENT_SURFACE_FNS = [
|
|
|
1665
1810
|
fns: ["sharedArrayBuffer.new"],
|
|
1666
1811
|
note: "fixed shared storage with context-local typed-array and DataView wrappers",
|
|
1667
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
|
+
},
|
|
1668
1827
|
{
|
|
1669
1828
|
id: "stdlib.atomics",
|
|
1670
1829
|
kind: "stdlib",
|
|
@@ -1676,7 +1835,7 @@ export const AMBIENT_SURFACE_FNS = [
|
|
|
1676
1835
|
id: "node-builtin.fs.callbacks",
|
|
1677
1836
|
kind: "node-builtin",
|
|
1678
1837
|
name: "fs error-first callbacks",
|
|
1679
|
-
fns: ["fs.callbackValue", "fs.callbackCall"],
|
|
1838
|
+
fns: ["fs.callbackValue", "fs.callbackCall", "fs.callbackGlob"],
|
|
1680
1839
|
note: "native filesystem callbacks, including stored platform adapter functions",
|
|
1681
1840
|
},
|
|
1682
1841
|
// ── the Date slice (lowerDateCall/lowerNew): statics, construction,
|
|
@@ -1835,6 +1994,48 @@ export const AMBIENT_SURFACE_FNS = [
|
|
|
1835
1994
|
fns: ["perf.now"],
|
|
1836
1995
|
note: "the global performance object and the performance.now.bind(performance) function value reach the same clock",
|
|
1837
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
|
+
},
|
|
1838
2039
|
// ── the process global's ambient reads and authority calls
|
|
1839
2040
|
// (lowerProcessProperty/lowerProcessMethodCall — process is a
|
|
1840
2041
|
// provenance-checked global here, not an importable module).
|
|
@@ -1872,6 +2073,13 @@ export const AMBIENT_SURFACE_FNS = [
|
|
|
1872
2073
|
fns: ["process.versions"],
|
|
1873
2074
|
note: "shared version dictionary containing node and openssl; other components are absent unless defined by the program",
|
|
1874
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
|
+
},
|
|
1875
2083
|
{
|
|
1876
2084
|
id: "node-builtin.process.cwd",
|
|
1877
2085
|
kind: "node-builtin",
|
|
@@ -1902,6 +2110,43 @@ export const AMBIENT_SURFACE_FNS = [
|
|
|
1902
2110
|
name: "process.getgid",
|
|
1903
2111
|
fns: ["process.getgid"],
|
|
1904
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
|
+
},
|
|
1905
2150
|
{
|
|
1906
2151
|
id: "node-builtin.process.execPath",
|
|
1907
2152
|
kind: "node-builtin",
|
|
@@ -1926,6 +2171,13 @@ export const AMBIENT_SURFACE_FNS = [
|
|
|
1926
2171
|
name: "process.constrainedMemory",
|
|
1927
2172
|
fns: ["process.constrainedMemory"],
|
|
1928
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
|
+
},
|
|
1929
2181
|
{
|
|
1930
2182
|
id: "node-builtin.process.resourceUsage",
|
|
1931
2183
|
kind: "node-builtin",
|
|
@@ -2086,6 +2338,8 @@ export const FS_CALLBACK_MEMBERS = new Set([
|
|
|
2086
2338
|
"copyFile",
|
|
2087
2339
|
"chmod",
|
|
2088
2340
|
"chown",
|
|
2341
|
+
"lchown",
|
|
2342
|
+
"fchown",
|
|
2089
2343
|
"glob",
|
|
2090
2344
|
"link",
|
|
2091
2345
|
"mkdir",
|
|
@@ -2279,8 +2533,8 @@ export const BUILTIN_MODULE_FENCE_HINTS = {
|
|
|
2279
2533
|
promisify: "the lowered shapes are const bindings over child_process.execFile and fs.readFile; call the bound function directly",
|
|
2280
2534
|
},
|
|
2281
2535
|
"stream/consumers": {
|
|
2282
|
-
blob: "
|
|
2283
|
-
"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",
|
|
2284
2538
|
},
|
|
2285
2539
|
module: {
|
|
2286
2540
|
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 +2552,8 @@ export const BUILTIN_MODULE_FENCE_HINTS = {
|
|
|
2298
2552
|
...Object.fromEntries([
|
|
2299
2553
|
"generateKeyPair",
|
|
2300
2554
|
"generateKeyPairSync",
|
|
2301
|
-
"generateKey",
|
|
2302
|
-
"generateKeySync",
|
|
2303
2555
|
"createPrivateKey",
|
|
2304
2556
|
"createPublicKey",
|
|
2305
|
-
"createSecretKey",
|
|
2306
2557
|
"createSign",
|
|
2307
2558
|
"createVerify",
|
|
2308
2559
|
"sign",
|
|
@@ -2318,9 +2569,9 @@ export const BUILTIN_MODULE_FENCE_HINTS = {
|
|
|
2318
2569
|
"privateDecrypt",
|
|
2319
2570
|
].map((m) => [
|
|
2320
2571
|
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",
|
|
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",
|
|
2324
2575
|
])),
|
|
2325
2576
|
...Object.fromEntries(["createCipheriv", "createDecipheriv", "getCipherInfo"].map((m) => [
|
|
2326
2577
|
m,
|
|
@@ -2356,8 +2607,8 @@ export const BUILTIN_MODULE_FENCE_HINTS = {
|
|
|
2356
2607
|
* accessed member is stdlib-declared, the use is standard-library surface
|
|
2357
2608
|
* with no lowering — report SC2020 naming `<container>.<member>` (the
|
|
2358
2609
|
* 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. */
|
|
2610
|
+
* its widened type text otherwise). Returns without reporting for
|
|
2611
|
+
* non-stdlib members so the caller's generic rejection applies. */
|
|
2361
2612
|
export function stdlibMemberFence(lowerer, access) {
|
|
2362
2613
|
const sym = lowerer.checker.getSymbolAtLocation(access.name);
|
|
2363
2614
|
if (!sym || !lowerer.isStdlibSymbol(sym))
|