@scriptc/compiler 0.0.35 → 0.1.1
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 +14 -11
- package/ambient/scriptc-overrides.d.ts +0 -7
- package/ambient/scriptc.d.ts +1 -1
- package/dist/backend/build-cache.d.ts +44 -0
- package/dist/backend/build-cache.js +241 -0
- package/dist/backend/build-cache.js.map +1 -0
- package/dist/backend/{emission/emit-async.d.ts → c/async.d.ts} +21 -30
- package/dist/backend/{emission/emit-async.js → c/async.js} +270 -286
- package/dist/backend/c/async.js.map +1 -0
- package/dist/backend/{emission/emitter.d.ts → c/c-emitter.d.ts} +6 -23
- package/dist/backend/{emission/emitter.js → c/c-emitter.js} +53 -107
- package/dist/backend/c/c-emitter.js.map +1 -0
- package/dist/backend/c/exprs.d.ts +8 -0
- package/dist/backend/c/exprs.js +7937 -0
- package/dist/backend/c/exprs.js.map +1 -0
- package/dist/backend/{emission/emit-island.d.ts → c/island.d.ts} +5 -5
- package/dist/backend/{emission/emit-island.js → c/island.js} +24 -22
- package/dist/backend/c/island.js.map +1 -0
- package/dist/backend/{emission → c}/may-throw.d.ts +1 -1
- package/dist/backend/{emission → c}/may-throw.js +4 -1
- package/dist/backend/c/may-throw.js.map +1 -0
- package/dist/backend/{emission/emit-shapes.d.ts → c/shapes.d.ts} +19 -19
- package/dist/backend/{emission/emit-shapes.js → c/shapes.js} +78 -87
- package/dist/backend/c/shapes.js.map +1 -0
- package/dist/backend/{emission/emit-stmts.d.ts → c/stmts.d.ts} +12 -12
- package/dist/backend/{emission/emit-stmts.js → c/stmts.js} +395 -343
- package/dist/backend/c/stmts.js.map +1 -0
- package/dist/backend/{emission/emit-types.d.ts → c/types.d.ts} +1 -1
- package/dist/backend/{emission/emit-types.js → c/types.js} +42 -286
- package/dist/backend/c/types.js.map +1 -0
- package/dist/backend/c/types.test.js +25 -0
- package/dist/backend/c/types.test.js.map +1 -0
- package/dist/backend/{emission/emit-walkers.d.ts → c/walkers.d.ts} +19 -41
- package/dist/backend/{emission/emit-walkers.js → c/walkers.js} +242 -304
- package/dist/backend/c/walkers.js.map +1 -0
- package/dist/backend/external-c.d.ts +33 -0
- package/dist/backend/external-c.js +51 -0
- package/dist/backend/external-c.js.map +1 -0
- package/dist/backend/ffi-callbacks.d.ts +1 -1
- package/dist/backend/ffi-callbacks.js +4 -3
- package/dist/backend/ffi-callbacks.js.map +1 -1
- package/dist/backend/{library-identity.d.ts → library-identity-markers.d.ts} +0 -4
- package/dist/backend/{library-identity.js → library-identity-markers.js} +10 -9
- package/dist/backend/library-identity-markers.js.map +1 -0
- package/dist/backend/link-plan.d.ts +37 -0
- package/dist/backend/link-plan.js +26 -0
- package/dist/backend/link-plan.js.map +1 -0
- package/dist/backend/linker.d.ts +22 -0
- package/dist/backend/linker.js +236 -0
- package/dist/backend/linker.js.map +1 -0
- package/dist/backend/llvm/blocks.d.ts +4 -0
- package/dist/backend/llvm/blocks.js +29 -0
- package/dist/backend/llvm/blocks.js.map +1 -1
- package/dist/backend/llvm/classes.d.ts +2 -19
- package/dist/backend/llvm/classes.js +20 -52
- package/dist/backend/llvm/classes.js.map +1 -1
- package/dist/backend/llvm/common.d.ts +4 -0
- package/dist/backend/llvm/common.js +27 -0
- package/dist/backend/llvm/common.js.map +1 -0
- package/dist/backend/llvm/dyn.d.ts +3 -8
- package/dist/backend/llvm/dyn.js +159 -224
- package/dist/backend/llvm/dyn.js.map +1 -1
- package/dist/backend/llvm/emitter.d.ts +4 -1
- package/dist/backend/llvm/emitter.js +548 -9988
- package/dist/backend/llvm/emitter.js.map +1 -1
- package/dist/backend/llvm/expr-async.d.ts +4 -0
- package/dist/backend/llvm/expr-async.js +726 -0
- package/dist/backend/llvm/expr-async.js.map +1 -0
- package/dist/backend/llvm/expr-bytes.d.ts +13 -0
- package/dist/backend/llvm/expr-bytes.js +456 -0
- package/dist/backend/llvm/expr-bytes.js.map +1 -0
- package/dist/backend/llvm/expr-callbacks.d.ts +22 -0
- package/dist/backend/llvm/expr-callbacks.js +520 -0
- package/dist/backend/llvm/expr-callbacks.js.map +1 -0
- package/dist/backend/llvm/expr-calls.d.ts +2 -0
- package/dist/backend/llvm/expr-calls.js +618 -0
- package/dist/backend/llvm/expr-calls.js.map +1 -0
- package/dist/backend/llvm/expr-containers.d.ts +25 -0
- package/dist/backend/llvm/expr-containers.js +637 -0
- package/dist/backend/llvm/expr-containers.js.map +1 -0
- package/dist/backend/llvm/expr-context.d.ts +255 -0
- package/dist/backend/llvm/expr-context.js +2 -0
- package/dist/backend/llvm/expr-context.js.map +1 -0
- package/dist/backend/llvm/expr-control.d.ts +2 -0
- package/dist/backend/llvm/expr-control.js +473 -0
- package/dist/backend/llvm/expr-control.js.map +1 -0
- package/dist/backend/llvm/expr-dispatch.d.ts +4 -0
- package/dist/backend/llvm/expr-dispatch.js +153 -0
- package/dist/backend/llvm/expr-dispatch.js.map +1 -0
- package/dist/backend/llvm/expr-dynamic.d.ts +2 -0
- package/dist/backend/llvm/expr-dynamic.js +810 -0
- package/dist/backend/llvm/expr-dynamic.js.map +1 -0
- package/dist/backend/llvm/expr-island.d.ts +15 -0
- package/dist/backend/llvm/expr-island.js +690 -0
- package/dist/backend/llvm/expr-island.js.map +1 -0
- package/dist/backend/llvm/expr-primitives.d.ts +6 -0
- package/dist/backend/llvm/expr-primitives.js +642 -0
- package/dist/backend/llvm/expr-primitives.js.map +1 -0
- package/dist/backend/llvm/expr-records.d.ts +9 -0
- package/dist/backend/llvm/expr-records.js +299 -0
- package/dist/backend/llvm/expr-records.js.map +1 -0
- package/dist/backend/llvm/expr-stream-bridges.d.ts +13 -0
- package/dist/backend/llvm/expr-stream-bridges.js +420 -0
- package/dist/backend/llvm/expr-stream-bridges.js.map +1 -0
- package/dist/backend/llvm/expr-stream-callbacks.d.ts +12 -0
- package/dist/backend/llvm/expr-stream-callbacks.js +360 -0
- package/dist/backend/llvm/expr-stream-callbacks.js.map +1 -0
- package/dist/backend/llvm/lib-dispatch.d.ts +5 -0
- package/dist/backend/llvm/lib-dispatch.js +267 -0
- package/dist/backend/llvm/lib-dispatch.js.map +1 -0
- package/dist/backend/llvm/lib-filesystem.d.ts +6 -0
- package/dist/backend/llvm/lib-filesystem.js +594 -0
- package/dist/backend/llvm/lib-filesystem.js.map +1 -0
- package/dist/backend/llvm/lib-network.d.ts +2 -0
- package/dist/backend/llvm/lib-network.js +429 -0
- package/dist/backend/llvm/lib-network.js.map +1 -0
- package/dist/backend/llvm/lib-process.d.ts +5 -0
- package/dist/backend/llvm/lib-process.js +585 -0
- package/dist/backend/llvm/lib-process.js.map +1 -0
- package/dist/backend/llvm/lib-shared.d.ts +6 -0
- package/dist/backend/llvm/lib-shared.js +687 -0
- package/dist/backend/llvm/lib-shared.js.map +1 -0
- package/dist/backend/llvm/lib-stream.d.ts +2 -0
- package/dist/backend/llvm/lib-stream.js +470 -0
- package/dist/backend/llvm/lib-stream.js.map +1 -0
- package/dist/backend/llvm/shapes.d.ts +12 -2
- package/dist/backend/llvm/shapes.js +66 -307
- package/dist/backend/llvm/shapes.js.map +1 -1
- package/dist/backend/llvm/shapes.test.js +52 -0
- package/dist/backend/llvm/shapes.test.js.map +1 -0
- package/dist/backend/llvm/unsupported.d.ts +1 -1
- package/dist/backend/llvm/walkers.d.ts +2 -3
- package/dist/backend/llvm/walkers.js +195 -222
- package/dist/backend/llvm/walkers.js.map +1 -1
- package/dist/backend/native-codegen.d.ts +45 -0
- package/dist/backend/native-codegen.js +275 -0
- package/dist/backend/native-codegen.js.map +1 -0
- package/dist/backend/native-codegen.test.js +226 -0
- package/dist/backend/native-codegen.test.js.map +1 -0
- package/dist/backend/native-link-info.d.ts +96 -0
- package/dist/backend/native-link-info.js +243 -0
- package/dist/backend/native-link-info.js.map +1 -0
- package/dist/backend/native-link-info.test.d.ts +1 -0
- package/dist/backend/native-link-info.test.js +134 -0
- package/dist/backend/native-link-info.test.js.map +1 -0
- package/dist/backend/{cc.d.ts → native-toolchain.d.ts} +54 -34
- package/dist/backend/{cc.js → native-toolchain.js} +231 -810
- package/dist/backend/native-toolchain.js.map +1 -0
- package/dist/backend/native-toolchain.test.d.ts +1 -0
- package/dist/backend/{cc-cache.test.js → native-toolchain.test.js} +219 -7
- package/dist/backend/native-toolchain.test.js.map +1 -0
- package/dist/backend/object-localize.js +1 -1
- package/dist/backend/runtime-abi.d.ts +10 -0
- package/dist/backend/runtime-abi.js +11 -0
- package/dist/backend/runtime-abi.js.map +1 -0
- package/dist/backend/runtime-pack-targets.test.d.ts +1 -0
- package/dist/backend/runtime-pack-targets.test.js +54 -0
- package/dist/backend/runtime-pack-targets.test.js.map +1 -0
- package/dist/backend/runtime-pack.d.ts +112 -0
- package/dist/backend/runtime-pack.js +305 -0
- package/dist/backend/runtime-pack.js.map +1 -0
- package/dist/backend/runtime-pack.test.d.ts +1 -0
- package/dist/backend/runtime-pack.test.js +473 -0
- package/dist/backend/runtime-pack.test.js.map +1 -0
- package/dist/backend/targets.d.ts +76 -0
- package/dist/backend/targets.js +262 -0
- package/dist/backend/targets.js.map +1 -0
- package/dist/backend/targets.test.d.ts +1 -0
- package/dist/backend/targets.test.js +41 -0
- package/dist/backend/targets.test.js.map +1 -0
- package/dist/backend/vendor-archives.d.ts +41 -0
- package/dist/backend/vendor-archives.js +462 -0
- package/dist/backend/vendor-archives.js.map +1 -0
- package/dist/compat/fetch-profile.d.ts +0 -1
- package/dist/compat/fetch-profile.js +0 -1
- package/dist/compat/fetch-profile.js.map +1 -1
- package/dist/coverage/report.js +3 -3
- package/dist/coverage/report.js.map +1 -1
- package/dist/coverage/surface-manifest.js +35 -33
- package/dist/coverage/surface-manifest.js.map +1 -1
- package/dist/diagnostics/diagnostic.d.ts +11 -12
- package/dist/diagnostics/diagnostic.js +19 -17
- package/dist/diagnostics/diagnostic.js.map +1 -1
- package/dist/diagnostics/render.d.ts +1 -1
- package/dist/diagnostics/render.js +1 -1
- package/dist/diagnostics/render.js.map +1 -1
- package/dist/errors.d.ts +5 -0
- package/dist/errors.js +9 -0
- package/dist/errors.js.map +1 -0
- package/dist/executable/{early-cache.d.ts → executable-cache.d.ts} +2 -2
- package/dist/executable/{early-cache.js → executable-cache.js} +36 -98
- package/dist/executable/executable-cache.js.map +1 -0
- package/dist/executable/executable-cache.test.d.ts +1 -0
- package/dist/executable/{early-cache.test.js → executable-cache.test.js} +3 -3
- package/dist/executable/executable-cache.test.js.map +1 -0
- package/dist/ffi/{profile.js → ffi-manifest.js} +1 -1
- package/dist/ffi/ffi-manifest.js.map +1 -0
- package/dist/frontend/builtin-modules.d.ts +21 -0
- package/dist/frontend/builtin-modules.js +82 -0
- package/dist/frontend/builtin-modules.js.map +1 -0
- package/dist/frontend/cjs-lexer.d.ts +7 -0
- package/dist/frontend/cjs-lexer.js +15 -17
- package/dist/frontend/cjs-lexer.js.map +1 -1
- package/dist/frontend/dts-paths.d.ts +26 -0
- package/dist/frontend/dts-paths.js +41 -0
- package/dist/frontend/dts-paths.js.map +1 -0
- package/dist/frontend/input-tracker.d.ts +0 -2
- package/dist/frontend/input-tracker.js +1 -4
- package/dist/frontend/input-tracker.js.map +1 -1
- package/dist/frontend/lib-contract.d.ts +1 -5
- package/dist/frontend/lib-contract.js +1 -1
- package/dist/frontend/lib-contract.js.map +1 -1
- package/dist/frontend/lib-exports.d.ts +1 -1
- package/dist/frontend/lowering/array-values.d.ts +8 -0
- package/dist/frontend/lowering/array-values.js +60 -0
- package/dist/frontend/lowering/array-values.js.map +1 -0
- package/dist/frontend/lowering/call-position.d.ts +4 -0
- package/dist/frontend/lowering/call-position.js +7 -0
- package/dist/frontend/lowering/call-position.js.map +1 -0
- package/dist/frontend/lowering/callback-arg.d.ts +20 -0
- package/dist/frontend/lowering/callback-arg.js +44 -0
- package/dist/frontend/lowering/callback-arg.js.map +1 -0
- package/dist/frontend/lowering/lib-boundary.d.ts +1 -1
- package/dist/frontend/lowering/lib-boundary.js +34 -34
- package/dist/frontend/lowering/lib-boundary.js.map +1 -1
- package/dist/frontend/lowering/lower-array-sort.d.ts +22 -0
- package/dist/frontend/lowering/lower-array-sort.js +619 -0
- package/dist/frontend/lowering/lower-array-sort.js.map +1 -0
- package/dist/frontend/lowering/lower-assert.d.ts +3 -3
- package/dist/frontend/lowering/lower-assert.js +214 -241
- package/dist/frontend/lowering/lower-assert.js.map +1 -1
- package/dist/frontend/lowering/lower-builtins.d.ts +74 -146
- package/dist/frontend/lowering/lower-builtins.js +1285 -1233
- package/dist/frontend/lowering/lower-builtins.js.map +1 -1
- package/dist/frontend/lowering/lower-calls.d.ts +59 -192
- package/dist/frontend/lowering/lower-calls.js +1644 -1506
- package/dist/frontend/lowering/lower-calls.js.map +1 -1
- package/dist/frontend/lowering/lower-classes.d.ts +62 -125
- package/dist/frontend/lowering/lower-classes.js +832 -866
- package/dist/frontend/lowering/lower-classes.js.map +1 -1
- package/dist/frontend/lowering/lower-comptime.d.ts +5 -12
- package/dist/frontend/lowering/lower-comptime.js +32 -31
- package/dist/frontend/lowering/lower-comptime.js.map +1 -1
- package/dist/frontend/lowering/lower-containers.d.ts +35 -135
- package/dist/frontend/lowering/lower-containers.js +1984 -2227
- package/dist/frontend/lowering/lower-containers.js.map +1 -1
- package/dist/frontend/lowering/lower-dgram.d.ts +3 -7
- package/dist/frontend/lowering/lower-dgram.js +97 -111
- package/dist/frontend/lowering/lower-dgram.js.map +1 -1
- package/dist/frontend/lowering/lower-enums.d.ts +4 -4
- package/dist/frontend/lowering/lower-enums.js +30 -30
- package/dist/frontend/lowering/lower-enums.js.map +1 -1
- package/dist/frontend/lowering/{lower-emitter.d.ts → lower-event-emitter.d.ts} +7 -18
- package/dist/frontend/lowering/{lower-emitter.js → lower-event-emitter.js} +172 -174
- package/dist/frontend/lowering/lower-event-emitter.js.map +1 -0
- package/dist/frontend/lowering/lower-expando.d.ts +5 -5
- package/dist/frontend/lowering/lower-expando.js +40 -40
- package/dist/frontend/lowering/lower-expando.js.map +1 -1
- package/dist/frontend/lowering/lower-exprs.d.ts +60 -264
- package/dist/frontend/lowering/lower-exprs.js +2361 -1765
- package/dist/frontend/lowering/lower-exprs.js.map +1 -1
- package/dist/frontend/lowering/lower-generators.d.ts +6 -6
- package/dist/frontend/lowering/lower-generators.js +73 -72
- package/dist/frontend/lowering/lower-generators.js.map +1 -1
- package/dist/frontend/lowering/lower-inspect.d.ts +5 -17
- package/dist/frontend/lowering/lower-inspect.js +273 -261
- package/dist/frontend/lowering/lower-inspect.js.map +1 -1
- package/dist/frontend/lowering/lower-island.d.ts +39 -49
- package/dist/frontend/lowering/lower-island.js +447 -513
- package/dist/frontend/lowering/lower-island.js.map +1 -1
- package/dist/frontend/lowering/lower-mixins.d.ts +7 -10
- package/dist/frontend/lowering/lower-mixins.js +85 -85
- package/dist/frontend/lowering/lower-mixins.js.map +1 -1
- package/dist/frontend/lowering/lower-modules.d.ts +12 -18
- package/dist/frontend/lowering/lower-modules.js +284 -283
- package/dist/frontend/lowering/lower-modules.js.map +1 -1
- package/dist/frontend/lowering/lower-namespaces.d.ts +23 -49
- package/dist/frontend/lowering/lower-namespaces.js +123 -115
- package/dist/frontend/lowering/lower-namespaces.js.map +1 -1
- package/dist/frontend/lowering/lower-server.d.ts +18 -25
- package/dist/frontend/lowering/lower-server.js +909 -899
- package/dist/frontend/lowering/lower-server.js.map +1 -1
- package/dist/frontend/lowering/lower-stmts.d.ts +30 -149
- package/dist/frontend/lowering/lower-stmts.js +1463 -1285
- package/dist/frontend/lowering/lower-stmts.js.map +1 -1
- package/dist/frontend/lowering/lower-stream.d.ts +12 -12
- package/dist/frontend/lowering/lower-stream.js +300 -301
- package/dist/frontend/lowering/lower-stream.js.map +1 -1
- package/dist/frontend/lowering/lower-test.d.ts +5 -5
- package/dist/frontend/lowering/lower-test.js +82 -82
- package/dist/frontend/lowering/lower-test.js.map +1 -1
- package/dist/frontend/lowering/lowerer.d.ts +134 -22
- package/dist/frontend/lowering/lowerer.js +1277 -126
- package/dist/frontend/lowering/lowerer.js.map +1 -1
- package/dist/frontend/lowering/pairs-snapshot.d.ts +11 -0
- package/dist/frontend/lowering/pairs-snapshot.js +85 -0
- package/dist/frontend/lowering/pairs-snapshot.js.map +1 -0
- package/dist/frontend/lowering/static-this.d.ts +6 -0
- package/dist/frontend/lowering/static-this.js +24 -0
- package/dist/frontend/lowering/static-this.js.map +1 -0
- package/dist/frontend/lowering/surfaces.d.ts +24 -35
- package/dist/frontend/lowering/surfaces.js +78 -66
- package/dist/frontend/lowering/surfaces.js.map +1 -1
- package/dist/frontend/npm-static-rewrite.js +6 -28
- package/dist/frontend/npm-static-rewrite.js.map +1 -1
- package/dist/frontend/npm-static.d.ts +0 -10
- package/dist/frontend/npm-static.js +4 -7
- package/dist/frontend/npm-static.js.map +1 -1
- package/dist/frontend/npm.d.ts +0 -24
- package/dist/frontend/npm.js +11 -85
- package/dist/frontend/npm.js.map +1 -1
- package/dist/frontend/program.d.ts +3 -1
- package/dist/frontend/program.js +9 -4
- package/dist/frontend/program.js.map +1 -1
- package/dist/frontend/provenance-registry.d.ts +0 -2
- package/dist/frontend/provenance-registry.js +0 -10
- package/dist/frontend/provenance-registry.js.map +1 -1
- package/dist/frontend/provenance.js +4 -7
- package/dist/frontend/provenance.js.map +1 -1
- package/dist/frontend/resolve.d.ts +7 -2
- package/dist/frontend/resolve.js +12 -17
- package/dist/frontend/resolve.js.map +1 -1
- package/dist/frontend/resolve.test.d.ts +1 -0
- package/dist/frontend/resolve.test.js +29 -0
- package/dist/frontend/resolve.test.js.map +1 -0
- package/dist/frontend/ts7/adapter.d.ts +2 -2
- package/dist/frontend/ts7/adapter.js +1 -1
- package/dist/frontend/ts7/adapter.js.map +1 -1
- package/dist/frontend/ts7/checker.js +2 -36
- package/dist/frontend/ts7/checker.js.map +1 -1
- package/dist/frontend/ts7/enums.js +2 -1
- package/dist/frontend/ts7/enums.js.map +1 -1
- package/dist/frontend/ts7/{program.js → program-adapter.js} +7 -6
- package/dist/frontend/ts7/program-adapter.js.map +1 -0
- package/dist/frontend/ts7/world-check.d.ts +1 -3
- package/dist/frontend/ts7/world-check.js +3 -1
- package/dist/frontend/ts7/world-check.js.map +1 -1
- package/dist/frontend/tsc-codes.d.ts +8 -0
- package/dist/frontend/tsc-codes.js +109 -0
- package/dist/frontend/tsc-codes.js.map +1 -0
- package/dist/frontend/{types.d.ts → type-mapper.d.ts} +2 -25
- package/dist/frontend/{types.js → type-mapper.js} +12 -11
- package/dist/frontend/type-mapper.js.map +1 -0
- package/dist/frontend/workspace-registry.d.ts +26 -0
- package/dist/frontend/workspace-registry.js +71 -0
- package/dist/frontend/workspace-registry.js.map +1 -0
- package/dist/index.d.ts +113 -31
- package/dist/index.js +536 -128
- package/dist/index.js.map +1 -1
- package/dist/ir/analysis.d.ts +37 -0
- package/dist/ir/analysis.js +118 -0
- package/dist/ir/analysis.js.map +1 -0
- package/dist/ir/analysis.test.d.ts +1 -0
- package/dist/ir/analysis.test.js +21 -0
- package/dist/ir/analysis.test.js.map +1 -0
- package/dist/ir/build.d.ts +9 -0
- package/dist/ir/build.js +33 -0
- package/dist/ir/build.js.map +1 -0
- package/dist/ir/integer-loops.d.ts +1 -1
- package/dist/ir/{nodes.d.ts → ir.d.ts} +119 -37
- package/dist/ir/{nodes.js → ir.js} +170 -166
- package/dist/ir/ir.js.map +1 -0
- package/dist/ir/ir.test.d.ts +1 -0
- package/dist/ir/ir.test.js +17 -0
- package/dist/ir/ir.test.js.map +1 -0
- package/dist/ir/serialize.d.ts +2 -2
- package/dist/ir/serialize.js +3 -2
- package/dist/ir/serialize.js.map +1 -1
- package/dist/ir/validate.d.ts +1 -1
- package/dist/ir/validate.js +93 -41
- package/dist/ir/validate.js.map +1 -1
- package/dist/library/cache-primitives.d.ts +24 -0
- package/dist/library/cache-primitives.js +83 -0
- package/dist/library/cache-primitives.js.map +1 -0
- package/dist/library/cache-reset.test.d.ts +1 -0
- package/dist/library/cache-reset.test.js +47 -0
- package/dist/library/cache-reset.test.js.map +1 -0
- package/dist/library/{implementation-identity.js → compiler-self-identity.js} +1 -1
- package/dist/library/compiler-self-identity.js.map +1 -0
- package/dist/library/fence-eval.d.ts +3 -1
- package/dist/library/fence-eval.js +8 -2
- package/dist/library/fence-eval.js.map +1 -1
- package/dist/library/int-infer.d.ts +1 -36
- package/dist/library/int-infer.js +29 -18
- package/dist/library/int-infer.js.map +1 -1
- package/dist/library/int-infer.test.js +4 -4
- package/dist/library/{early-cache.d.ts → library-cache.d.ts} +1 -1
- package/dist/library/{early-cache.js → library-cache.js} +34 -89
- package/dist/library/library-cache.js.map +1 -0
- package/dist/library/library-cache.test.d.ts +1 -0
- package/dist/library/{early-cache.test.js → library-cache.test.js} +7 -7
- package/dist/library/library-cache.test.js.map +1 -0
- package/dist/library/{profile.d.ts → library-profile.d.ts} +4 -7
- package/dist/library/{profile.js → library-profile.js} +18 -11
- package/dist/library/library-profile.js.map +1 -0
- package/dist/library/semantic-source.js +2 -1
- package/dist/library/semantic-source.js.map +1 -1
- package/dist/library/sidecar.d.ts +5 -2
- package/dist/library/sidecar.js +11 -5
- package/dist/library/sidecar.js.map +1 -1
- package/dist/startup-cache.d.ts +11 -3
- package/dist/startup-cache.js +17 -2
- package/dist/startup-cache.js.map +1 -1
- package/package.json +19 -2
- package/surface-manifest.json +5 -5
- package/dist/backend/cc-cache.test.js.map +0 -1
- package/dist/backend/cc.js.map +0 -1
- package/dist/backend/emission/emit-async.js.map +0 -1
- package/dist/backend/emission/emit-exprs.d.ts +0 -13
- package/dist/backend/emission/emit-exprs.js +0 -7407
- package/dist/backend/emission/emit-exprs.js.map +0 -1
- package/dist/backend/emission/emit-island.js.map +0 -1
- package/dist/backend/emission/emit-shapes.js.map +0 -1
- package/dist/backend/emission/emit-stmts.js.map +0 -1
- package/dist/backend/emission/emit-types.js.map +0 -1
- package/dist/backend/emission/emit-walkers.js.map +0 -1
- package/dist/backend/emission/emitter.js.map +0 -1
- package/dist/backend/emission/may-throw.js.map +0 -1
- package/dist/backend/library-identity.js.map +0 -1
- package/dist/executable/early-cache.js.map +0 -1
- package/dist/executable/early-cache.test.js.map +0 -1
- package/dist/ffi/profile.js.map +0 -1
- package/dist/frontend/lowering/lower-emitter.js.map +0 -1
- package/dist/frontend/shared.d.ts +0 -82
- package/dist/frontend/shared.js +0 -308
- package/dist/frontend/shared.js.map +0 -1
- package/dist/frontend/ts7/program.js.map +0 -1
- package/dist/frontend/types.js.map +0 -1
- package/dist/ir/nodes.js.map +0 -1
- package/dist/library/early-cache.js.map +0 -1
- package/dist/library/early-cache.test.js.map +0 -1
- package/dist/library/implementation-identity.js.map +0 -1
- package/dist/library/profile.js.map +0 -1
- /package/dist/backend/{cc-cache.test.d.ts → c/types.test.d.ts} +0 -0
- /package/dist/{executable/early-cache.test.d.ts → backend/llvm/shapes.test.d.ts} +0 -0
- /package/dist/{library/early-cache.test.d.ts → backend/native-codegen.test.d.ts} +0 -0
- /package/dist/ffi/{profile.d.ts → ffi-manifest.d.ts} +0 -0
- /package/dist/frontend/ts7/{program.d.ts → program-adapter.d.ts} +0 -0
- /package/dist/library/{implementation-identity.d.ts → compiler-self-identity.d.ts} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as ts from "../ts7/adapter.js";
|
|
2
2
|
import type { Lowerer } from "./lowerer.js";
|
|
3
3
|
import { BuiltinModuleFn } from "./surfaces.js";
|
|
4
|
-
import { IrExpr, IrType, SrcLoc } from "../../ir/
|
|
4
|
+
import { IrExpr, IrType, SrcLoc } from "../../ir/ir.js";
|
|
5
5
|
/** Resolves an identifier to a supported builtin-module IMPORT BINDING:
|
|
6
6
|
* a named import (through its alias, so `import { join as j }` matches)
|
|
7
7
|
* whose declaration is an ImportSpecifier under a supported builtin
|
|
@@ -12,7 +12,7 @@ import { IrExpr, IrType, SrcLoc } from "../../ir/nodes.js";
|
|
|
12
12
|
* and a same-named local or user function has a different symbol whose
|
|
13
13
|
* declaration is not an import specifier. Returns the CANONICAL module
|
|
14
14
|
* name and the EXPORTED member name (not the local alias). */
|
|
15
|
-
export declare function builtinImportOf(
|
|
15
|
+
export declare function builtinImportOf(lowerer: Lowerer, ident: ts.Identifier): {
|
|
16
16
|
module: string;
|
|
17
17
|
member: string;
|
|
18
18
|
} | null;
|
|
@@ -33,38 +33,31 @@ export declare function builtinMemberRequireDecl(nameNode: ts.Node, init: ts.Exp
|
|
|
33
33
|
* default needs a missing-member probe — those keep the existing
|
|
34
34
|
* namespace-as-value fence. The direct-require initializer answers null
|
|
35
35
|
* here (its own arm already resolves it). */
|
|
36
|
-
export declare function builtinNamespaceDestructureModuleOf(
|
|
36
|
+
export declare function builtinNamespaceDestructureModuleOf(lowerer: Lowerer, decl: ts.VariableDeclaration): string | null;
|
|
37
37
|
/** Strips the type-only wrappers the require pattern rides in typed
|
|
38
38
|
* code (`require("node:os") as typeof import("node:os")` — the
|
|
39
39
|
* fallback declarations answer `unknown`, so the cast IS the idiom),
|
|
40
40
|
* plus parens, legacy assertions, and non-null suffixes. */
|
|
41
41
|
export declare function stripTypeCasts(e: ts.Expression): ts.Expression;
|
|
42
|
-
/** The `createRequire(<base>)` call over the node:module import binding
|
|
43
|
-
* with a supported base — import.meta.url, import.meta.filename, or
|
|
44
|
-
* __filename, every spelling of "this file" — or null. The base never
|
|
45
|
-
* LOWERS (import.meta has no value representation): it only names the
|
|
46
|
-
* file whose directory anchors the returned require's relative
|
|
47
|
-
* resolution, and every supported spelling names the call's own file. */
|
|
48
|
-
export declare function createRequireBaseCallOf(L: Lowerer, expr: ts.Expression): ts.CallExpression | null;
|
|
49
42
|
/** True for `const require = createRequire(import.meta.url)` — the
|
|
50
43
|
* binding is compile-time plumbing (each call through it resolves per
|
|
51
44
|
* site) with no storage and no code; both declaration walks skip by
|
|
52
45
|
* this test. A reassignable (let/var) binding never matches — callers
|
|
53
46
|
* gate on constness like the other alias decls. */
|
|
54
|
-
export declare function createRequireBindingDecl(
|
|
47
|
+
export declare function createRequireBindingDecl(lowerer: Lowerer, nameNode: ts.Node, init: ts.Expression | undefined): boolean;
|
|
55
48
|
/** The declaring source file when `callee` denotes a createRequire-made
|
|
56
49
|
* require: a CONST binding over createRequire(import.meta.url) (the
|
|
57
50
|
* binding's own file anchors resolution) or the inline
|
|
58
51
|
* `createRequire(import.meta.url)(...)` spelling (the call's file).
|
|
59
52
|
* Null off the pattern, so call chains keep trying. */
|
|
60
|
-
export declare function createRequireCalleeFileOf(
|
|
53
|
+
export declare function createRequireCalleeFileOf(lowerer: Lowerer, callee: ts.Expression): ts.SourceFile | null;
|
|
61
54
|
/** The static require of `R("spec")` through a createRequire binding:
|
|
62
55
|
* the literal specifier plus the file anchoring relative resolution.
|
|
63
56
|
* Null when the callee is not a createRequire-made require; a matching
|
|
64
57
|
* callee with a non-literal (or missing) specifier answers spec null,
|
|
65
58
|
* so the call lowering fences by name instead of falling through to
|
|
66
59
|
* the generic call paths. */
|
|
67
|
-
export declare function createRequireSpecOf(
|
|
60
|
+
export declare function createRequireSpecOf(lowerer: Lowerer, call: ts.CallExpression): {
|
|
68
61
|
spec: string | null;
|
|
69
62
|
baseFile: ts.SourceFile;
|
|
70
63
|
} | null;
|
|
@@ -73,7 +66,7 @@ export declare function createRequireSpecOf(L: Lowerer, call: ts.CallExpression)
|
|
|
73
66
|
* plumbing with no storage (uses resolve through
|
|
74
67
|
* builtinNamespaceModuleOf's createRequire arm); both declaration
|
|
75
68
|
* walks skip by this test. */
|
|
76
|
-
export declare function createRequireNamespaceDecl(
|
|
69
|
+
export declare function createRequireNamespaceDecl(lowerer: Lowerer, nameNode: ts.Node, init: ts.Expression | undefined): boolean;
|
|
77
70
|
/** `require("spec")` through a createRequire binding — the erasure per
|
|
78
71
|
* target. Builtins are reached here only OUTSIDE the const-namespace-
|
|
79
72
|
* binding shape (that declaration erases; member uses resolve through
|
|
@@ -89,27 +82,12 @@ export declare function createRequireNamespaceDecl(L: Lowerer, nameNode: ts.Node
|
|
|
89
82
|
* require-condition entry under --dynamic (collectCreateRequires
|
|
90
83
|
* embedded it) and reports the requires-dynamic diagnostic in a static
|
|
91
84
|
* build. Null when the callee is not a createRequire require. */
|
|
92
|
-
export declare function lowerCreateRequireCall(
|
|
93
|
-
/** The module whose baked-constants OBJECT `node` denotes, or null — any
|
|
94
|
-
* of the spellings: `http2.constants`/`crypto.constants` through a
|
|
95
|
-
* namespace/require binding, a destructured or member-bound `constants`
|
|
96
|
-
* alias from the module, or `require("http2").constants` inline. The
|
|
97
|
-
* object itself never materializes; each member read bakes as its
|
|
98
|
-
* literal. */
|
|
99
|
-
export declare function builtinConstantsModuleOf(L: Lowerer, node: ts.Expression): string | null;
|
|
85
|
+
export declare function lowerCreateRequireCall(lowerer: Lowerer, call: ts.CallExpression, loc: SrcLoc): IrExpr | null;
|
|
100
86
|
/** `constants.NGHTTP2_CANCEL` / `constants.SSL_OP_NO_TICKET` (any baked-
|
|
101
87
|
* constants spelling) → the literal; unknown members fence by name.
|
|
102
88
|
* Null when the receiver is not a baked constants object (the property
|
|
103
89
|
* chain keeps trying). */
|
|
104
|
-
export declare function lowerBuiltinConstantsProperty(
|
|
105
|
-
/** True for any spelling of node:perf_hooks' `performance` object — the
|
|
106
|
-
* named import binding, a namespace/default-import member, the require
|
|
107
|
-
* twins (all through the shared builtin tables), or the GLOBAL Node
|
|
108
|
-
* exposes without any import (the module export and the global are one
|
|
109
|
-
* value; provenance-checked like console/process, so the bare
|
|
110
|
-
* identifier and the globalThis.performance member both land here and
|
|
111
|
-
* a user's own `performance` binding never does). */
|
|
112
|
-
export declare function isPerfHooksPerformanceExpr(L: Lowerer, node: ts.Expression): boolean;
|
|
90
|
+
export declare function lowerBuiltinConstantsProperty(lowerer: Lowerer, expr: ts.PropertyAccessExpression): IrExpr | null;
|
|
113
91
|
/** The node:perf_hooks spoke: `performance.now()` reads the runtime's
|
|
114
92
|
* monotonic clock anchored at process start — Node's timeOrigin for a
|
|
115
93
|
* compiled program, fractional milliseconds — and
|
|
@@ -117,7 +95,7 @@ export declare function isPerfHooksPerformanceExpr(L: Lowerer, node: ts.Expressi
|
|
|
117
95
|
* getTimestamp) is the same clock as a plain () => number function
|
|
118
96
|
* value. Other members on the performance object fence by name; null
|
|
119
97
|
* for non-perf_hooks callees (the call chain keeps trying). */
|
|
120
|
-
export declare function lowerPerfHooksCall(
|
|
98
|
+
export declare function lowerPerfHooksCall(lowerer: Lowerer, expr: ts.CallExpression, access: ts.PropertyAccessExpression): IrExpr | null;
|
|
121
99
|
/** True for `const { NGHTTP2_CANCEL, ... } = http2.constants` (and the
|
|
122
100
|
* crypto.constants twin) — a plain object destructure (identifier
|
|
123
101
|
* elements, renames allowed, no rest/defaults/nesting) over a baked
|
|
@@ -125,10 +103,10 @@ export declare function lowerPerfHooksCall(L: Lowerer, expr: ts.CallExpression,
|
|
|
125
103
|
* alias plumbing with no storage (lowerVarDecl and collectGlobals both
|
|
126
104
|
* skip it); each USE reads its baked literal
|
|
127
105
|
* (builtinConstantBindingOf). */
|
|
128
|
-
export declare function builtinConstantsDestructureDecl(
|
|
106
|
+
export declare function builtinConstantsDestructureDecl(lowerer: Lowerer, nameNode: ts.Node, init: ts.Expression | undefined): boolean;
|
|
129
107
|
/** Resolves an identifier bound by a builtinConstantsDestructureDecl to
|
|
130
108
|
* its baked literal value. Null for every other binding. */
|
|
131
|
-
export declare function builtinConstantBindingOf(
|
|
109
|
+
export declare function builtinConstantBindingOf(lowerer: Lowerer, ident: ts.Identifier): IrExpr | null;
|
|
132
110
|
/** One builtin-module function call → its libCall. Completes the call to
|
|
133
111
|
* the table's exact shape: variadicPack functions (path.join/resolve)
|
|
134
112
|
* accept any arity — or ONE spread of a string[] — and pack the
|
|
@@ -142,7 +120,7 @@ export declare function builtinConstantBindingOf(L: Lowerer, ident: ts.Identifie
|
|
|
142
120
|
* Node's exact ERR_INVALID_ARG_TYPE. The argument crosses as a dyn
|
|
143
121
|
* value so the runtime renders the Received tail. Null when this is
|
|
144
122
|
* not that call (the table fence stays for other shapes). */
|
|
145
|
-
export declare function lowerFsToUnixTimestampCall(
|
|
123
|
+
export declare function lowerFsToUnixTimestampCall(lowerer: Lowerer, expr: ts.CallExpression, bi: {
|
|
146
124
|
module: string;
|
|
147
125
|
member: string;
|
|
148
126
|
}, loc: SrcLoc): IrExpr | null;
|
|
@@ -155,11 +133,11 @@ export declare function lowerFsToUnixTimestampCall(L: Lowerer, expr: ts.CallExpr
|
|
|
155
133
|
* exists, the compiler-rendered SC2020 fence otherwise) runs only
|
|
156
134
|
* after every validation passes, exactly Node's order. Null when this
|
|
157
135
|
* is not a claimed member/shape (the table or fence path stands). */
|
|
158
|
-
export declare function lowerFsLadderCall(
|
|
136
|
+
export declare function lowerFsLadderCall(lowerer: Lowerer, expr: ts.CallExpression, bi: {
|
|
159
137
|
module: string;
|
|
160
138
|
member: string;
|
|
161
139
|
}, loc: SrcLoc): IrExpr | null;
|
|
162
|
-
export declare function lowerBuiltinModuleCall(
|
|
140
|
+
export declare function lowerBuiltinModuleCall(lowerer: Lowerer, expr: ts.CallExpression, bi: {
|
|
163
141
|
module: string;
|
|
164
142
|
member: string;
|
|
165
143
|
}, fn: BuiltinModuleFn, loc: SrcLoc): IrExpr;
|
|
@@ -171,13 +149,13 @@ export declare function lowerBuiltinModuleCall(L: Lowerer, expr: ts.CallExpressi
|
|
|
171
149
|
* spelling (`this`, an identifier, a unit literal) whose dropped
|
|
172
150
|
* evaluation is unobservable; every other Reflect.apply keeps the
|
|
173
151
|
* fence. Null when this isn't a Reflect.apply call. */
|
|
174
|
-
export declare function lowerReflectApplyCall(
|
|
152
|
+
export declare function lowerReflectApplyCall(lowerer: Lowerer, call: ts.CallExpression, access: ts.PropertyAccessExpression): IrExpr | null;
|
|
175
153
|
/** The child-process args list: one string[] value. An omitted list
|
|
176
154
|
* completes to an empty literal (Node's default); an array LITERAL
|
|
177
155
|
* builds element-wise (its contextual type is the optional parameter's
|
|
178
156
|
* `string[] | undefined`, which the generic literal path cannot map —
|
|
179
157
|
* the Set-seed situation exactly); everything else lowers as itself. */
|
|
180
|
-
export declare function lowerChildArgsArg(
|
|
158
|
+
export declare function lowerChildArgsArg(lowerer: Lowerer, node: ts.Expression | undefined, loc: SrcLoc): IrExpr;
|
|
181
159
|
/** `spawnSync(command, args?, options?)` → one cp.spawnSync /
|
|
182
160
|
* cp.spawnSyncOpts libCall. An omitted args list completes to an empty
|
|
183
161
|
* string[] literal (Node's default). The options argument must be an
|
|
@@ -194,7 +172,7 @@ export declare function lowerChildArgsArg(L: Lowerer, node: ts.Expression | unde
|
|
|
194
172
|
* effects). Everything else (shell, cwd, env, input, maxBuffer, ...)
|
|
195
173
|
* fences by name. The bare `{ encoding: "utf8" }` shape keeps its
|
|
196
174
|
* historical cp.spawnSync lowering. */
|
|
197
|
-
export declare function lowerSpawnSyncCall(
|
|
175
|
+
export declare function lowerSpawnSyncCall(lowerer: Lowerer, expr: ts.CallExpression, loc: SrcLoc): IrExpr;
|
|
198
176
|
/** `spawn(command, args?, options)` → one cp.spawn / cp.spawnOpts
|
|
199
177
|
* libCall. The options argument must be an object LITERAL with an
|
|
200
178
|
* EXPLICIT stdio — "ignore" or "inherit" as the scalar, or the 3-tuple
|
|
@@ -210,8 +188,8 @@ export declare function lowerSpawnSyncCall(L: Lowerer, expr: ts.CallExpression,
|
|
|
210
188
|
* REPLACEMENT environment, the exec-core pairs machinery), `cwd`, and
|
|
211
189
|
* `windowsHide` (a POSIX no-op). The bare `{ stdio: "ignore" }` shape
|
|
212
190
|
* keeps its historical cp.spawn lowering. */
|
|
213
|
-
export declare function lowerSpawnCall(
|
|
214
|
-
export declare function lowerExecSyncCall(
|
|
191
|
+
export declare function lowerSpawnCall(lowerer: Lowerer, expr: ts.CallExpression, loc: SrcLoc): IrExpr;
|
|
192
|
+
export declare function lowerExecSyncCall(lowerer: Lowerer, expr: ts.CallExpression, shell: boolean, loc: SrcLoc): IrExpr;
|
|
215
193
|
/** `const execFileAsync = promisify(execFile)` — the ONE lowered
|
|
216
194
|
* util.promisify shape. Returns true (and registers the declared symbol
|
|
217
195
|
* so call sites lower and value uses fence) when `init` is a promisify
|
|
@@ -219,8 +197,8 @@ export declare function lowerExecSyncCall(L: Lowerer, expr: ts.CallExpression, s
|
|
|
219
197
|
* over anything else fences HERE with the supported-target hint (the
|
|
220
198
|
* declaration is where the target is visible). False for non-promisify
|
|
221
199
|
* initializers, so the ordinary declaration paths apply. */
|
|
222
|
-
export declare function isPromisifyCall(
|
|
223
|
-
export declare function promisifiedExecFileDecl(
|
|
200
|
+
export declare function isPromisifyCall(lowerer: Lowerer, init: ts.Expression): ts.CallExpression | null;
|
|
201
|
+
export declare function promisifiedExecFileDecl(lowerer: Lowerer, nameNode: ts.Node, init: ts.Expression | undefined): boolean;
|
|
224
202
|
/** A call THROUGH a promisified-execFile binding:
|
|
225
203
|
* `execFileAsync(file, args?, options?)` → one call of the interned
|
|
226
204
|
* %execFileAsync helper — an ASYNC IR function (throw-becomes-rejection
|
|
@@ -235,14 +213,14 @@ export declare function promisifiedExecFileDecl(L: Lowerer, nameNode: ts.Node, i
|
|
|
235
213
|
* and "spawn <file> ENOENT" with .code); Node's numeric `.code` on a
|
|
236
214
|
* Command-failed rejection (the exit status) is NOT carried —
|
|
237
215
|
* SEMANTICS.md divergence 50's stance. */
|
|
238
|
-
export declare function lowerExecFileAsyncCall(
|
|
216
|
+
export declare function lowerExecFileAsyncCall(lowerer: Lowerer, expr: ts.CallExpression, loc: SrcLoc): IrExpr;
|
|
239
217
|
/** The interned `%execFileAsync` helper behind promisified-execFile
|
|
240
218
|
* calls: an ASYNC IR function (params: cmd, argv, cwd, hasEnv, envPairs,
|
|
241
219
|
* timeoutMs) whose body runs the may-throw cp.execCapture libCall — the
|
|
242
220
|
* async machinery turns a throw into the rejection, Node's promisified
|
|
243
221
|
* behavior — and returns the `{ stdout, stderr }` record built from the
|
|
244
222
|
* capture. One helper per program (the shape is fixed). */
|
|
245
|
-
export declare function execFileAsyncHelper(
|
|
223
|
+
export declare function execFileAsyncHelper(lowerer: Lowerer, loc: SrcLoc): {
|
|
246
224
|
name: string;
|
|
247
225
|
shapeId: string;
|
|
248
226
|
envShapeId: string;
|
|
@@ -254,21 +232,21 @@ export declare function execFileAsyncHelper(L: Lowerer, loc: SrcLoc): {
|
|
|
254
232
|
* flatten in JS own-key order, undefined-armed values SKIPPED (Node
|
|
255
233
|
* drops undefined env entries). Reuses the interned overflow-keys/read
|
|
256
234
|
* machinery. */
|
|
257
|
-
export declare function recordToEnvPairs(
|
|
235
|
+
export declare function recordToEnvPairs(lowerer: Lowerer, node: ts.Expression): IrExpr;
|
|
258
236
|
/** Method calls on diagnostics_channel Channel receivers:
|
|
259
237
|
* publish(message), subscribe(fn), unsubscribe(fn) — over the f64
|
|
260
238
|
* channel handle. The rest of the declared surface (bindStore,
|
|
261
239
|
* runStores) fences member-qualified. Null for non-Channel receivers. */
|
|
262
|
-
export declare function lowerDcChannelMethodCall(
|
|
240
|
+
export declare function lowerDcChannelMethodCall(lowerer: Lowerer, call: ts.CallExpression, access: ts.PropertyAccessExpression): IrExpr | null;
|
|
263
241
|
/** Method calls on AsyncLocalStorage receivers: run(store, fn, ...args),
|
|
264
242
|
* exit(fn, ...args), getStore(), enterWith(store), disable() — over the
|
|
265
243
|
* f64 store handle (als.* libCalls; values cross as dyn values). Null
|
|
266
244
|
* for non-ALS receivers. */
|
|
267
|
-
export declare function lowerAlsMethodCall(
|
|
245
|
+
export declare function lowerAlsMethodCall(lowerer: Lowerer, call: ts.CallExpression, access: ts.PropertyAccessExpression): IrExpr | null;
|
|
268
246
|
/** Property reads on Channel receivers: `.name` (the registration
|
|
269
247
|
* string) and `.hasSubscribers` (the publish guard). Null for
|
|
270
248
|
* non-Channel receivers and other members (the method fence owns them). */
|
|
271
|
-
export declare function lowerDcChannelProperty(
|
|
249
|
+
export declare function lowerDcChannelProperty(lowerer: Lowerer, access: ts.PropertyAccessExpression): IrExpr | null;
|
|
272
250
|
/** Method calls on TracingChannel receivers: subscribe/unsubscribe over
|
|
273
251
|
* a dyn handlers object, traceSync/traceCallback through the runtime's
|
|
274
252
|
* publish choreography (dc.tcTraceSync/dc.tcTraceCallback — fn, context,
|
|
@@ -278,13 +256,13 @@ export declare function lowerDcChannelProperty(L: Lowerer, access: ts.PropertyAc
|
|
|
278
256
|
* (dc.tcTracePromise — the result is the reaction promise, typed
|
|
279
257
|
* promise<dyn> so .then/.catch chains ride the promise lowerings).
|
|
280
258
|
* Null for non-TracingChannel receivers. */
|
|
281
|
-
export declare function lowerDcTracingChannelMethodCall(
|
|
259
|
+
export declare function lowerDcTracingChannelMethodCall(lowerer: Lowerer, call: ts.CallExpression, access: ts.PropertyAccessExpression): IrExpr | null;
|
|
282
260
|
/** Property reads on TracingChannel receivers: the five event channels
|
|
283
261
|
* (`.start` … `.error` — Channel-typed f64 handles the Channel lowerings
|
|
284
262
|
* take over) and `.hasSubscribers` (the five-channel disjunction). Null
|
|
285
263
|
* for other members and non-TracingChannel receivers. */
|
|
286
|
-
export declare function lowerDcTracingChannelProperty(
|
|
287
|
-
export declare function lowerReadlineMethodCall(
|
|
264
|
+
export declare function lowerDcTracingChannelProperty(lowerer: Lowerer, access: ts.PropertyAccessExpression): IrExpr | null;
|
|
265
|
+
export declare function lowerReadlineMethodCall(lowerer: Lowerer, call: ts.CallExpression, access: ts.PropertyAccessExpression): IrExpr | null;
|
|
288
266
|
/** Method calls on StringDecoder receivers: `d.write(chunk)` decodes the
|
|
289
267
|
* complete prefix of pending+chunk and re-buffers the trailing partial
|
|
290
268
|
* sequence; `d.end()` flushes the buffered partial as its replacement
|
|
@@ -292,12 +270,12 @@ export declare function lowerReadlineMethodCall(L: Lowerer, call: ts.CallExpress
|
|
|
292
270
|
* interned %strdec helpers over the packed-f64 pending field. end(buf)
|
|
293
271
|
* and the rest of @types/node's surface fence per member. Null for
|
|
294
272
|
* non-decoder receivers. */
|
|
295
|
-
export declare function lowerStringDecoderMethodCall(
|
|
273
|
+
export declare function lowerStringDecoderMethodCall(lowerer: Lowerer, call: ts.CallExpression, access: ts.PropertyAccessExpression): IrExpr | null;
|
|
296
274
|
/** The interned %strdec helpers: write(d, chunk) returns the decoded
|
|
297
275
|
* complete prefix and re-buffers the trailing partial into the pending
|
|
298
276
|
* field; end(d) flushes it. Both thread the packed-f64 state through
|
|
299
277
|
* the pure strdec.* libCalls. */
|
|
300
|
-
export declare function strdecHelper(
|
|
278
|
+
export declare function strdecHelper(lowerer: Lowerer, op: "write" | "end", shapeId: string, loc: SrcLoc): string;
|
|
301
279
|
/** `JSON.parse(text)` / `JSON.stringify(value)`.
|
|
302
280
|
* - parse → a may-throw `libCall` producing a dyn value (the runtime JSON
|
|
303
281
|
* dyn); malformed input throws a catchable SyntaxError-shaped string.
|
|
@@ -315,20 +293,20 @@ export declare function strdecHelper(L: Lowerer, op: "write" | "end", shapeId: s
|
|
|
315
293
|
* rides the node to the backend's re-indenter. Function replacers and
|
|
316
294
|
* non-literal spaces stay fenced.
|
|
317
295
|
* Null when this isn't a JSON member call. */
|
|
318
|
-
export declare function lowerJsonMethodCall(
|
|
296
|
+
export declare function lowerJsonMethodCall(lowerer: Lowerer, call: ts.CallExpression, access: ts.PropertyAccessExpression): IrExpr | null;
|
|
319
297
|
/** The module specifier when `ident` is an import binding (named,
|
|
320
298
|
* default, or namespace) from a node BUILTIN module with no scriptc
|
|
321
299
|
* support — "child_process", "net", ... — or null. The coverage story's
|
|
322
300
|
* use-site half: preflight fenced the import line; statements using the
|
|
323
301
|
* binding poison with the same module-naming diagnostic. */
|
|
324
|
-
export declare function fencedBuiltinImportOf(
|
|
302
|
+
export declare function fencedBuiltinImportOf(lowerer: Lowerer, ident: ts.Identifier): string | null;
|
|
325
303
|
/** The composed crypto pattern: `randomBytes(n).toString(enc)` lowers
|
|
326
304
|
* as ONE string-producing libCall — the Buffer between the two calls
|
|
327
305
|
* never exists at runtime. Only literal "hex"/"base64" encodings lower
|
|
328
306
|
* (the runtime implements exactly those); everything else — including a
|
|
329
307
|
* bare randomBytes(n) — fences with the Buffer story. Null when this
|
|
330
308
|
* isn't a toString on a crypto.randomBytes call. */
|
|
331
|
-
export declare function lowerCryptoComposedCall(
|
|
309
|
+
export declare function lowerCryptoComposedCall(lowerer: Lowerer, call: ts.CallExpression, access: ts.PropertyAccessExpression): IrExpr | null;
|
|
332
310
|
/** The node:crypto introspection statics — build-time constants of the
|
|
333
311
|
* compiled runtime, baked at the call site (the http2.constants stance
|
|
334
312
|
* extended to calls): getFips() answers 0 (no FIPS provider can ever
|
|
@@ -340,14 +318,14 @@ export declare function lowerCryptoComposedCall(L: Lowerer, call: ts.CallExpress
|
|
|
340
318
|
* that probes the list and then constructs a cipher fences at the
|
|
341
319
|
* construction site, never here. Null for other members (the dispatch
|
|
342
320
|
* keeps trying). */
|
|
343
|
-
export declare function lowerCryptoModuleCall(
|
|
321
|
+
export declare function lowerCryptoModuleCall(lowerer: Lowerer, expr: ts.CallExpression, bi: {
|
|
344
322
|
module: string;
|
|
345
323
|
member: string;
|
|
346
324
|
}, loc: SrcLoc): IrExpr | null;
|
|
347
325
|
/** Method calls on URL-typed receivers: `u.toString()` is Node's href
|
|
348
326
|
* serialization (the href getter's libCall). Everything else the lib
|
|
349
327
|
* declares fences member-qualified. Null for non-URL receivers. */
|
|
350
|
-
export declare function lowerUrlMethodCall(
|
|
328
|
+
export declare function lowerUrlMethodCall(lowerer: Lowerer, call: ts.CallExpression, access: ts.PropertyAccessExpression): IrExpr | null;
|
|
351
329
|
/** `new URLSearchParams(init?)` — the WHATWG constructor's lowered init
|
|
352
330
|
* shapes: omitted / literal `undefined` (empty list), a string (parsed,
|
|
353
331
|
* one leading '?' strips), another URLSearchParams (snapshot copy — a
|
|
@@ -357,7 +335,7 @@ export declare function lowerUrlMethodCall(L: Lowerer, call: ts.CallExpression,
|
|
|
357
335
|
* order — folded to a sp.with chain at compile time; keys are the
|
|
358
336
|
* record-literal key forms, values coerce as strings). Tuple-typed pair
|
|
359
337
|
* arrays and unions keep named fences. */
|
|
360
|
-
export declare function lowerSearchParamsNew(
|
|
338
|
+
export declare function lowerSearchParamsNew(lowerer: Lowerer, expr: ts.NewExpression, loc: SrcLoc): IrExpr;
|
|
361
339
|
/** Method calls on URLSearchParams-typed receivers — the WHATWG list
|
|
362
340
|
* surface over the runtime's decoded pairs. get answers `string | null`
|
|
363
341
|
* (the checker's own union; the runtime's +1-or-NULL builds the arms);
|
|
@@ -369,19 +347,19 @@ export declare function lowerSearchParamsNew(L: Lowerer, expr: ts.NewExpression,
|
|
|
369
347
|
* keys()/values()/entries() lower only in a for-of head (lower-stmts
|
|
370
348
|
* routes them before this table) — stored iterator objects keep the
|
|
371
349
|
* drain fence. Null for non-searchParams receivers. */
|
|
372
|
-
export declare function lowerSearchParamsMethodCall(
|
|
350
|
+
export declare function lowerSearchParamsMethodCall(lowerer: Lowerer, call: ts.CallExpression, access: ts.PropertyAccessExpression): IrExpr | null;
|
|
373
351
|
/** Calls on an fs/promises FileHandle. The promise-returning methods run
|
|
374
352
|
* through the same synchronous descriptor primitives as fs.readSync /
|
|
375
353
|
* writeSync, then settle so failures reject at await. read/write retain
|
|
376
354
|
* the caller's buffer in the Node-shaped result record. */
|
|
377
|
-
export declare function lowerFileHandleMethodCall(
|
|
355
|
+
export declare function lowerFileHandleMethodCall(lowerer: Lowerer, call: ts.CallExpression, access: ts.PropertyAccessExpression): IrExpr | null;
|
|
378
356
|
/** Method calls on Stats-typed receivers: isFile()/isDirectory()/
|
|
379
357
|
* isSymbolicLink() are pure reads on the stat snapshot (a followed
|
|
380
358
|
* statSync snapshot never answers true to isSymbolicLink — take
|
|
381
359
|
* lstatSync's, Node's own split). Everything else @types/node declares
|
|
382
360
|
* (mtime, mode, ...) fences member-qualified. Null for non-Stats
|
|
383
361
|
* receivers. */
|
|
384
|
-
export declare function lowerStatsMethodCall(
|
|
362
|
+
export declare function lowerStatsMethodCall(lowerer: Lowerer, call: ts.CallExpression, access: ts.PropertyAccessExpression): IrExpr | null;
|
|
385
363
|
/** `Atomics.wait(int32Array, idx, expected, timeoutMs)` — the
|
|
386
364
|
* synchronous-sleep idiom (RouteStore's
|
|
387
365
|
* `Atomics.wait(sleepBuffer, 0, 0, ms)`): scriptc has no threads, so
|
|
@@ -393,7 +371,7 @@ export declare function lowerStatsMethodCall(L: Lowerer, call: ts.CallExpression
|
|
|
393
371
|
* here — a certain deadlock, fenced with that explanation. Every other
|
|
394
372
|
* Atomics member (notify has no one to wake; add/load/... — nothing
|
|
395
373
|
* races) fences member-qualified. Null for non-Atomics receivers. */
|
|
396
|
-
export declare function lowerAtomicsCall(
|
|
374
|
+
export declare function lowerAtomicsCall(lowerer: Lowerer, call: ts.CallExpression, access: ts.PropertyAccessExpression): IrExpr | null;
|
|
397
375
|
/** The property-read extensions this spoke owns, tried BEFORE the
|
|
398
376
|
* lower-exprs intrinsic-property fallback (the lowerer's wrapper chains
|
|
399
377
|
* them): the widened numeric Stats snapshot and SpawnSyncReturns.signal
|
|
@@ -401,7 +379,7 @@ export declare function lowerAtomicsCall(L: Lowerer, call: ts.CallExpression, ac
|
|
|
401
379
|
* — null for a normal exit or spawn failure; a timeout kill reports its
|
|
402
380
|
* killSignal, Node's shape). Null for everything else, so the ordinary
|
|
403
381
|
* chain (and its fences) keeps going. */
|
|
404
|
-
export declare function lowerBuiltinExtraProperty(
|
|
382
|
+
export declare function lowerBuiltinExtraProperty(lowerer: Lowerer, expr: ts.PropertyAccessExpression): IrExpr | null;
|
|
405
383
|
/** Method calls on ChildProcess receivers: `child.on("exit"|"error", cb)`
|
|
406
384
|
* registers a listener with the event loop's child registry. The event
|
|
407
385
|
* name must be one of the two terminal-event LITERALS; the callback
|
|
@@ -413,7 +391,7 @@ export declare function lowerBuiltinExtraProperty(L: Lowerer, expr: ts.PropertyA
|
|
|
413
391
|
* lowerIntrinsicProperty). Everything else @types/node declares on
|
|
414
392
|
* ChildProcess (stdout, once, ...) fences member-qualified. Null for
|
|
415
393
|
* non-child receivers. */
|
|
416
|
-
export declare function lowerChildMethodCall(
|
|
394
|
+
export declare function lowerChildMethodCall(lowerer: Lowerer, call: ts.CallExpression, access: ts.PropertyAccessExpression): IrExpr | null;
|
|
417
395
|
/** Method calls on piped child-output stream receivers (child.stdout /
|
|
418
396
|
* child.stderr — the childStream kind): on/once("data" | "end").
|
|
419
397
|
* 'data' listeners take zero parameters, `(chunk: Buffer)`, or a
|
|
@@ -425,33 +403,19 @@ export declare function lowerChildMethodCall(L: Lowerer, call: ts.CallExpression
|
|
|
425
403
|
* ride the optional-chain re-dispatch (chainBlocked). Everything else
|
|
426
404
|
* @types/node declares on Readable fences member-qualified. Null for
|
|
427
405
|
* non-stream receivers. */
|
|
428
|
-
export declare function lowerChildStreamMethodCall(
|
|
406
|
+
export declare function lowerChildStreamMethodCall(lowerer: Lowerer, call: ts.CallExpression, access: ts.PropertyAccessExpression): IrExpr | null;
|
|
429
407
|
/** Method calls on first-class process-stream receivers (procStream —
|
|
430
408
|
* a WritableStream-typed value like prefixStream's `output` param):
|
|
431
409
|
* write(data) with one string, dispatched at runtime onto the exact
|
|
432
410
|
* stdout/stderr write paths (the fd IS the value). Everything else
|
|
433
411
|
* @types/node declares on WritableStream fences member-qualified.
|
|
434
412
|
* Null for non-procStream receivers. */
|
|
435
|
-
export declare function lowerProcStreamMethodCall(
|
|
436
|
-
/** `fs.watch(path[, options][, listener])` → the fs.watch libCall
|
|
437
|
-
* (scr_watch.c — kqueue EVFILT_VNODE on the opened path; an unopenable
|
|
438
|
-
* path THROWS Node's fs error synchronously, the polling-fallback catch
|
|
439
|
-
* shape). The listener fires with "rename"/"change" and takes zero
|
|
440
|
-
* parameters or the eventType string — the filename parameter has no
|
|
441
|
-
* lowering (kqueue watches the inode, not the directory entry; you
|
|
442
|
-
* watched one path). The options record follows the options-record
|
|
443
|
-
* stance: persistent: true, recursive: false, and encoding: "utf8"
|
|
444
|
-
* state the lowered behavior and are accepted; persistent: false
|
|
445
|
-
* (a watcher that does NOT hold the loop), recursive: true (kqueue
|
|
446
|
-
* watches one inode), signal, and non-utf8 encodings fence by name;
|
|
447
|
-
* undocumented keys drop like Node. An open watcher keeps the loop
|
|
448
|
-
* alive until watcher.close(). */
|
|
449
|
-
export declare function lowerFsWatchCall(L: Lowerer, expr: ts.CallExpression, loc: SrcLoc): IrExpr;
|
|
413
|
+
export declare function lowerProcStreamMethodCall(lowerer: Lowerer, call: ts.CallExpression, access: ts.PropertyAccessExpression): IrExpr | null;
|
|
450
414
|
/** Method calls on FSWatcher receivers: close() — idempotent, statement
|
|
451
415
|
* position (Node returns void there too). Everything else @types/node
|
|
452
416
|
* declares (ref/unref, the EventEmitter surface) fences member-
|
|
453
417
|
* qualified. Null for non-watcher receivers. */
|
|
454
|
-
export declare function lowerWatcherMethodCall(
|
|
418
|
+
export declare function lowerWatcherMethodCall(lowerer: Lowerer, call: ts.CallExpression, access: ts.PropertyAccessExpression): IrExpr | null;
|
|
455
419
|
/** `.code` on an error-hierarchy receiver — NodeJS.ErrnoException's
|
|
456
420
|
* member (the fallback declares the same shape): the runtime Error's
|
|
457
421
|
* code slot as `string | undefined` — the errno name where a throw site
|
|
@@ -461,16 +425,16 @@ export declare function lowerWatcherMethodCall(L: Lowerer, call: ts.CallExpressi
|
|
|
461
425
|
* declaration is not stdlib). Reads only: writes keep their fence (no
|
|
462
426
|
* compiled program constructs an errno error). Null for non-error
|
|
463
427
|
* receivers and non-stdlib members, so the chain keeps trying. */
|
|
464
|
-
export declare function lowerErrorCodeProperty(
|
|
428
|
+
export declare function lowerErrorCodeProperty(lowerer: Lowerer, expr: ts.PropertyAccessExpression): IrExpr | null;
|
|
465
429
|
/** `JSON.parse` / `JSON.stringify` referenced without a call: rejected
|
|
466
430
|
* specifically, like process methods as values. Null for non-JSON
|
|
467
431
|
* receivers (the property chain keeps trying other lowerings). */
|
|
468
|
-
export declare function lowerJsonProperty(
|
|
432
|
+
export declare function lowerJsonProperty(lowerer: Lowerer, expr: ts.PropertyAccessExpression): IrExpr | null;
|
|
469
433
|
/** `constants.X_OK` where `constants` is a named fs import: the access-
|
|
470
434
|
* mode bits bake as number literals (POSIX values — Node's own on the
|
|
471
435
|
* supported hosts). Other fs.constants members (COPYFILE_*, O_*) fence
|
|
472
436
|
* by name. Null for non-fs-constants receivers. */
|
|
473
|
-
export declare function lowerFsConstantsProperty(
|
|
437
|
+
export declare function lowerFsConstantsProperty(lowerer: Lowerer, expr: ts.PropertyAccessExpression): IrExpr | null;
|
|
474
438
|
/** `process.stdin/stdout/stderr.isTTY` → isatty(3) on the stream's fd
|
|
475
439
|
* (a REAL boolean: Node's non-TTY streams expose `undefined` here — the
|
|
476
440
|
* documented divergence; truthiness tests, the actual usage, agree), and
|
|
@@ -485,7 +449,7 @@ export declare function lowerFsConstantsProperty(L: Lowerer, expr: ts.PropertyAc
|
|
|
485
449
|
* whose checker type does NOT admit undefined are fenced with that exact
|
|
486
450
|
* fix instead of lowering to a lie. Null for anything else, so the
|
|
487
451
|
* property chain keeps trying. */
|
|
488
|
-
export declare function lowerProcessStreamProperty(
|
|
452
|
+
export declare function lowerProcessStreamProperty(lowerer: Lowerer, expr: ts.PropertyAccessExpression): IrExpr | null;
|
|
489
453
|
/** `process.argv` / `process.platform` / `process.pid` property READS
|
|
490
454
|
* lower to zero-arg libCalls (argv returns +1 on one interned array —
|
|
491
455
|
* identity and mutation semantics match Node's stable process.argv).
|
|
@@ -498,80 +462,44 @@ export declare function lowerProcessStreamProperty(L: Lowerer, expr: ts.Property
|
|
|
498
462
|
* read in source order). Method members referenced without a call are
|
|
499
463
|
* rejected specifically. Null for non-process receivers (the chain keeps
|
|
500
464
|
* trying other property lowerings). */
|
|
501
|
-
export declare function lowerProcessProperty(
|
|
465
|
+
export declare function lowerProcessProperty(lowerer: Lowerer, expr: ts.PropertyAccessExpression): IrExpr | null;
|
|
502
466
|
/** True iff `node` is THE ambient `process.env` object itself (the
|
|
503
467
|
* receiver of an env read). */
|
|
504
|
-
export declare function isProcessEnv(
|
|
468
|
+
export declare function isProcessEnv(lowerer: Lowerer, node: ts.Expression): boolean;
|
|
505
469
|
/** The interned `string | undefined` union — the type every env read
|
|
506
470
|
* produces (withUndefinedArm interns [string, undefined] in canonical
|
|
507
471
|
* order, so the string arm's tag is 0 and the undefined arm's is 1,
|
|
508
472
|
* program-wide). */
|
|
509
|
-
export declare function envValueType(
|
|
510
|
-
/** `os.networkInterfaces()` — getifaddrs(3) behind Node's exact result
|
|
511
|
-
* type. The libCall's type is the CALL SITE's mapped
|
|
512
|
-
* `NodeJS.Dict<NetworkInterfaceInfo[]>`: a pure index-signature record
|
|
513
|
-
* whose value is `Info[] | undefined`, Info the two-record union
|
|
514
|
-
* @types/node declares (IPv4: `scopeid?: number` — the undefined-armed
|
|
515
|
-
* union — and IPv6: `scopeid: number`; family literal types collapse to
|
|
516
|
-
* string in both). The emitter derives every shape/union/tag from that
|
|
517
|
-
* type, so the structure is verified HERE and anything else (an older
|
|
518
|
-
* @types/node, a user alias reshaping the result) fences honestly. Key
|
|
519
|
-
* and row order follow getifaddrs enumeration — Node itself guarantees
|
|
520
|
-
* no order (compare structurally). */
|
|
521
|
-
/** `fs.readdirSync(path, { withFileTypes: true })` — Dirent rows: name +
|
|
522
|
-
* parentPath (the path argument as given, Node's own rule) + the hidden
|
|
523
|
-
* %dtype entry kind (libuv's UV_DIRENT encoding; DT_UNKNOWN falls back
|
|
524
|
-
* to lstat, Node's getDirents rule). The options literal is checked
|
|
525
|
-
* member-by-member; the result type must be the interned Dirent record
|
|
526
|
-
* array from types.ts — anything else (encoding: 'buffer', a user alias
|
|
527
|
-
* reshaping Dirent) fences honestly. */
|
|
528
|
-
export declare function lowerFsReaddirTypesCall(L: Lowerer, call: ts.CallExpression, loc: SrcLoc): IrExpr;
|
|
473
|
+
export declare function envValueType(lowerer: Lowerer): IrType;
|
|
529
474
|
/** `d.isFile()` / `d.isDirectory()` / `d.isSymbolicLink()` on a Dirent-
|
|
530
475
|
* typed receiver (the interned record — provenance via the checker's
|
|
531
476
|
* Dirent symbol, the StringDecoder pattern): a read of the hidden
|
|
532
477
|
* %dtype field compared against libuv's UV_DIRENT code. Node's other
|
|
533
478
|
* type probes (isBlockDevice, ...) fence with the supported list. */
|
|
534
|
-
export declare function lowerDirentMethodCall(
|
|
535
|
-
/** querystring.parse / querystring.decode: the scan runs in the runtime
|
|
536
|
-
* (scr_qs_parse_into fills the result dictionary's overflow map), so the
|
|
537
|
-
* frontend completes sep/eq/maxKeys to Node's defaults and verifies the
|
|
538
|
-
* call site's mapped result IS the ParsedUrlQuery dictionary — a pure
|
|
539
|
-
* index-signature record over `string | string[]` (an undefined arm
|
|
540
|
-
* tolerated: @types/node's Dict) — the networkInterfaces verification
|
|
541
|
-
* stance. The default decoder is the one lowered decoder; a custom
|
|
542
|
-
* decodeURIComponent option fences by name. */
|
|
543
|
-
export declare function lowerQuerystringParseCall(L: Lowerer, call: ts.CallExpression, loc: SrcLoc): IrExpr;
|
|
544
|
-
/** querystring.stringify / querystring.encode: the object crosses as a
|
|
545
|
-
* dyn value (dynFrom — JSON-safe records and, in JS sources, dyn values
|
|
546
|
-
* directly) and Node's encodeStringified rules run in the runtime
|
|
547
|
-
* (scr_qs_stringify), so arrays expand to repeated keys and
|
|
548
|
-
* null/undefined values are empty. The default encoder is the one
|
|
549
|
-
* lowered encoder; a custom encodeURIComponent option fences by name. */
|
|
550
|
-
export declare function lowerQuerystringStringifyCall(L: Lowerer, call: ts.CallExpression, loc: SrcLoc): IrExpr;
|
|
551
|
-
export declare function lowerOsNetworkInterfacesCall(L: Lowerer, call: ts.CallExpression, loc: SrcLoc): IrExpr;
|
|
479
|
+
export declare function lowerDirentMethodCall(lowerer: Lowerer, call: ts.CallExpression, access: ts.PropertyAccessExpression): IrExpr | null;
|
|
552
480
|
/** `process.env.NAME` → the process.envGet intrinsic with a literal key
|
|
553
481
|
* (the element form lands in lowerElementAccess). getenv(3) at runtime:
|
|
554
482
|
* present wraps the string arm, absent yields the interned
|
|
555
483
|
* undefined-arm instance. Null for non-env receivers. */
|
|
556
|
-
export declare function lowerProcessEnvGet(
|
|
484
|
+
export declare function lowerProcessEnvGet(lowerer: Lowerer, expr: ts.PropertyAccessExpression): IrExpr | null;
|
|
557
485
|
/** `process.exit(code)` / `process.cwd()` → libCall. The fallback
|
|
558
486
|
* declaration makes exit's code required; @types/node declares it
|
|
559
487
|
* optional, and a bare `process.exit()` lowers as exit(0) — exactly
|
|
560
488
|
* Node's behavior when process.exitCode was never set (setting exitCode
|
|
561
489
|
* is fenced like every other unsupported process member, so "never set"
|
|
562
490
|
* always holds in a compiled program). */
|
|
563
|
-
export declare function lowerProcessMethodCall(
|
|
491
|
+
export declare function lowerProcessMethodCall(lowerer: Lowerer, call: ts.CallExpression, access: ts.PropertyAccessExpression): IrExpr | null;
|
|
564
492
|
/** Method calls on THE `Number` global: the predicate statics lower to
|
|
565
493
|
* plain C over f64 arguments; `Number.parseFloat`/`Number.parseInt` ARE
|
|
566
494
|
* the global parsers (the spec aliases them), so they get the same
|
|
567
495
|
* island lowering — engine execution under --dynamic, per-site SC2012
|
|
568
496
|
* without it (parseInt takes an explicit radix, like the global). Null
|
|
569
497
|
* for non-Number receivers. */
|
|
570
|
-
export declare function lowerNumberStaticCall(
|
|
498
|
+
export declare function lowerNumberStaticCall(lowerer: Lowerer, call: ts.CallExpression, access: ts.PropertyAccessExpression): IrExpr | null;
|
|
571
499
|
/** The Date slice: statics plus read-only Date values backed by one
|
|
572
500
|
* TimeClip'd millisecond scalar. Construction lives in lowerNew;
|
|
573
501
|
* identity and mutating methods remain fenced. */
|
|
574
|
-
export declare function lowerDateCall(
|
|
502
|
+
export declare function lowerDateCall(lowerer: Lowerer, call: ts.CallExpression, access: ts.PropertyAccessExpression): IrExpr | null;
|
|
575
503
|
type TextCodecCtor = {
|
|
576
504
|
cls: "TextDecoder" | "TextEncoder";
|
|
577
505
|
ctor: ts.NewExpression;
|
|
@@ -581,8 +509,8 @@ type TextCodecCtor = {
|
|
|
581
509
|
* stable binding are recognized by textCodecReceiverOf below; any other
|
|
582
510
|
* reached value use keeps the ordinary SC2020 representation fence. Both
|
|
583
511
|
* declaration walks call this and independently gate on constness. */
|
|
584
|
-
export declare function textCodecBindingClassOf(
|
|
585
|
-
export declare function textCodecBindingDecl(
|
|
512
|
+
export declare function textCodecBindingClassOf(lowerer: Lowerer, nameNode: ts.Node, init: ts.Expression | undefined): TextCodecCtor["cls"] | null;
|
|
513
|
+
export declare function textCodecBindingDecl(lowerer: Lowerer, nameNode: ts.Node, init: ts.Expression | undefined): boolean;
|
|
586
514
|
/** The WHATWG encoder pair, COMPOSED or through an erasable const binding:
|
|
587
515
|
* `new TextDecoder().decode(bytes)`, `new TextEncoder().encode(s)`, and
|
|
588
516
|
* the idiomatic store-then-call equivalents. The codec object never
|
|
@@ -594,19 +522,19 @@ export declare function textCodecBindingDecl(L: Lowerer, nameNode: ts.Node, init
|
|
|
594
522
|
* storage is well-formed UTF-8, so the bytes are identical (lone
|
|
595
523
|
* surrogates became U+FFFD at string construction, exactly what the
|
|
596
524
|
* spec's encoder emits). Null when this is neither supported form. */
|
|
597
|
-
export declare function lowerTextCodecCall(
|
|
525
|
+
export declare function lowerTextCodecCall(lowerer: Lowerer, call: ts.CallExpression, access: ts.PropertyAccessExpression): IrExpr | null;
|
|
598
526
|
/** `String.fromCharCode(...codes)` on THE String global: every argument
|
|
599
527
|
* lowers as a number and packs into ONE f64[] array-literal argument
|
|
600
528
|
* (the path.join convention) — or ONE whole-array spread forwards the
|
|
601
529
|
* array itself. Other String statics (fromCodePoint, raw) fall through
|
|
602
530
|
* to the member fence. Null for non-String receivers. */
|
|
603
|
-
export declare function lowerStringStaticCall(
|
|
604
|
-
/** `s.lastIndexOf(needle)` on string receivers — a libCall
|
|
605
|
-
*
|
|
531
|
+
export declare function lowerStringStaticCall(lowerer: Lowerer, call: ts.CallExpression, access: ts.PropertyAccessExpression): IrExpr | null;
|
|
532
|
+
/** `s.lastIndexOf(needle)` on string receivers — a libCall rather than a
|
|
533
|
+
* strIntrinsic, but the same UTF-16 index semantics as
|
|
606
534
|
* indexOf. The lib's fromIndex parameter has no lowering (Node clamps
|
|
607
535
|
* it with ToIntegerOrInfinity; nothing in the corpus wants it) and
|
|
608
536
|
* fences per site. Null for non-string receivers / other members. */
|
|
609
|
-
export declare function lowerStringLastIndexOfCall(
|
|
537
|
+
export declare function lowerStringLastIndexOfCall(lowerer: Lowerer, call: ts.CallExpression, access: ts.PropertyAccessExpression): IrExpr | null;
|
|
610
538
|
/** `Promise.race([...])` on THE Promise global: the entries lower
|
|
611
539
|
* individually (the array never materializes — promise-element arrays
|
|
612
540
|
* have no representation) into a promise.race intrinsic; the result
|
|
@@ -617,25 +545,25 @@ export declare function lowerStringLastIndexOfCall(L: Lowerer, call: ts.CallExpr
|
|
|
617
545
|
* Promise.all/allSettled/any fence with the sequential-await hint;
|
|
618
546
|
* resolve/reject and the rest fall to the member fence. Null for
|
|
619
547
|
* non-Promise receivers. */
|
|
620
|
-
export declare function lowerPromiseStaticCall(
|
|
548
|
+
export declare function lowerPromiseStaticCall(lowerer: Lowerer, call: ts.CallExpression, access: ts.PropertyAccessExpression): IrExpr | null;
|
|
621
549
|
/** Property READS on THE `Number` global: the finite constants bake as
|
|
622
550
|
* number literals. NaN/POSITIVE_INFINITY/NEGATIVE_INFINITY and method
|
|
623
551
|
* members as values fall through to the member fence. Null for
|
|
624
552
|
* non-Number receivers. */
|
|
625
|
-
export declare function lowerNumberStaticProperty(
|
|
553
|
+
export declare function lowerNumberStaticProperty(lowerer: Lowerer, expr: ts.PropertyAccessExpression): IrExpr | null;
|
|
626
554
|
/** `t.unref()` / `t.ref()` / `t.hasRef()` on a Timeout handle — loop-
|
|
627
555
|
* liveness bookkeeping over the numeric timer id (the handle is f64).
|
|
628
556
|
* unref/ref return the handle for chaining (Node); hasRef returns a
|
|
629
557
|
* bool. `refresh` and the rest of @types/node's Timeout surface fence.
|
|
630
558
|
* Null when the receiver isn't a Timeout handle. */
|
|
631
|
-
export declare function lowerTimeoutMethodCall(
|
|
559
|
+
export declare function lowerTimeoutMethodCall(lowerer: Lowerer, call: ts.CallExpression, access: ts.PropertyAccessExpression): IrExpr | null;
|
|
632
560
|
/** `process.getuid?.()` — the optional call of an optional process
|
|
633
561
|
* method. On a POSIX target the member always exists, so the `?.` IS the
|
|
634
562
|
* call (the checker's undefined arm covers Windows, which scriptc does
|
|
635
563
|
* not target) and the honest result is the plain number. Intercepted
|
|
636
564
|
* BEFORE the optional-chain machinery: `process.getuid` has no value
|
|
637
565
|
* lowering for the chain to guard. Null when this isn't that shape. */
|
|
638
|
-
export declare function lowerProcessOptionalMethodCall(
|
|
566
|
+
export declare function lowerProcessOptionalMethodCall(lowerer: Lowerer, expr: ts.CallExpression): IrExpr | null;
|
|
639
567
|
/** The interned `%env.snapshot` helper behind `process.env` as a VALUE: a
|
|
640
568
|
* fresh `{ [k: string]: string | undefined }` record built over environ —
|
|
641
569
|
* envPairs hands the [k0, v0, k1, v1, ...] strings in environ order and
|
|
@@ -644,13 +572,13 @@ export declare function lowerProcessOptionalMethodCall(L: Lowerer, expr: ts.Call
|
|
|
644
572
|
* process.env). The target shape must be a pure index-signature record
|
|
645
573
|
* whose value slot is the `string | undefined` union (what ProcessEnv
|
|
646
574
|
* maps to); anything else answers null and the caller keeps its fence. */
|
|
647
|
-
export declare function envSnapshotHelper(
|
|
648
|
-
export declare function isConsoleLog(
|
|
575
|
+
export declare function envSnapshotHelper(lowerer: Lowerer, shapeId: string, loc: SrcLoc): string | null;
|
|
576
|
+
export declare function isConsoleLog(lowerer: Lowerer, call: ts.CallExpression): boolean;
|
|
649
577
|
/** The console member of a `console.<member>(...)` call, for the lowered
|
|
650
578
|
* set: "log"/"info"/"debug" (stdout — Node's info and debug ARE log
|
|
651
579
|
* under other names), and "error"/"warn" (both stderr — Node's warn IS
|
|
652
580
|
* error under another name; the output is identical). Provenance-checked
|
|
653
581
|
* like every stdlib global. Null for anything else (console.table, a
|
|
654
582
|
* user's own console binding, ...). */
|
|
655
|
-
export declare function consoleCallMember(
|
|
583
|
+
export declare function consoleCallMember(lowerer: Lowerer, call: ts.CallExpression): "log" | "info" | "debug" | "error" | "warn" | null;
|
|
656
584
|
export {};
|