@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,6 +1,6 @@
|
|
|
1
1
|
import * as ts from "../ts7/adapter.js";
|
|
2
2
|
import type { Lowerer } from "./lowerer.js";
|
|
3
|
-
import { IrExpr, IrFunction, IrStmt, IrType, SrcLoc } from "../../ir/
|
|
3
|
+
import { IrExpr, IrFunction, IrStmt, IrType, SrcLoc } from "../../ir/ir.js";
|
|
4
4
|
import type { ScrDiagnostic } from "../../diagnostics/diagnostic.js";
|
|
5
5
|
import { type ClassInfo } from "./lower-classes.js";
|
|
6
6
|
/** How a parameter participates in CALL-SITE COMPLETION (the frontend
|
|
@@ -147,7 +147,7 @@ export interface GenericInstance {
|
|
|
147
147
|
* one stranded case, unreachable from the else-branch by construction).
|
|
148
148
|
* - `...xs: T[]`: the ABI type is the array; call sites pack the surplus.
|
|
149
149
|
*/
|
|
150
|
-
export declare function paramShape(
|
|
150
|
+
export declare function paramShape(lowerer: Lowerer, param: ts.ParameterDeclaration): ParamShape;
|
|
151
151
|
/** ParamShapes for a whole parameter list. */
|
|
152
152
|
/** A `this` PARAMETER declaration (`function f(this: void, x: {}) ...`)
|
|
153
153
|
* — type-world only: tsc types the receiver with it, callers never pass
|
|
@@ -155,7 +155,7 @@ export declare function paramShape(L: Lowerer, param: ts.ParameterDeclaration):
|
|
|
155
155
|
* (paramShapes, declareParams) skip it with this predicate so ABI slots
|
|
156
156
|
* and call completion stay aligned with what JS actually passes. */
|
|
157
157
|
export declare function isThisParameter(param: ts.ParameterDeclaration): boolean;
|
|
158
|
-
export declare function paramShapes(
|
|
158
|
+
export declare function paramShapes(lowerer: Lowerer, params: readonly ts.ParameterDeclaration[], signature?: ts.Signature, blameOf?: (param: ts.ParameterDeclaration, index: number) => ts.Node): ParamShape[];
|
|
159
159
|
/** The fences on a defaulted parameter's body type: it becomes the value
|
|
160
160
|
* arm of the synthesized `T | undefined` ABI union, so it must be a valid
|
|
161
161
|
* single arm. func and Set ARE valid here: the ABI union's only test is
|
|
@@ -163,7 +163,7 @@ export declare function paramShapes(L: Lowerer, params: readonly ts.ParameterDec
|
|
|
163
163
|
* is what keeps map/set out of general unions), so `runner: Runner =
|
|
164
164
|
* defaultRunner` and `skip: Set<string> = new Set()` arm like any ref
|
|
165
165
|
* kind — the nullable-callback union shape, built by the compiler. */
|
|
166
|
-
export declare function checkDefaultParamBodyType(
|
|
166
|
+
export declare function checkDefaultParamBodyType(lowerer: Lowerer, param: ts.ParameterDeclaration, bodyType: IrType): void;
|
|
167
167
|
/** CALL-SITE COMPLETION — the frontend half of the one-signature contract
|
|
168
168
|
* (docs/ir.md): every call lowers to exactly the callee's full ABI
|
|
169
169
|
* parameter list, so backends and the validator stay count-exact and no
|
|
@@ -172,7 +172,7 @@ export declare function checkDefaultParamBodyType(L: Lowerer, param: ts.Paramete
|
|
|
172
172
|
* explicitly-passed `undefined` wraps to — both trigger a default, JS-
|
|
173
173
|
* exact); a rest param packs the surplus args (possibly zero) into one
|
|
174
174
|
* array literal, evaluated in source order at the call site. */
|
|
175
|
-
export declare function completeArgs(
|
|
175
|
+
export declare function completeArgs(lowerer: Lowerer, argNodes: readonly ts.Expression[], shapes: readonly ParamShape[], loc: SrcLoc, blame: ts.Node,
|
|
176
176
|
/** Pre-lowered values virtually PREPENDED to the argument list — the
|
|
177
177
|
* tagged-template strings object, which has no ts.Expression to lower
|
|
178
178
|
* (lowerTaggedTemplate builds it). Each rides the same slot-directed
|
|
@@ -183,7 +183,7 @@ leading?: readonly IrExpr[]): IrExpr[];
|
|
|
183
183
|
* unitLit under a unionWrap) — the value every "absent" slot holds: an
|
|
184
184
|
* omitted optional argument, an omitted optional record field. Null when
|
|
185
185
|
* `type` has no undefined arm to wrap into. */
|
|
186
|
-
export declare function wrappedUndefined(
|
|
186
|
+
export declare function wrappedUndefined(lowerer: Lowerer, type: IrType, loc: SrcLoc): IrExpr | null;
|
|
187
187
|
/** The synthesized argument for an omitted omittable param: the interned
|
|
188
188
|
* undefined arm of the param's `T | undefined` ABI union, or the checked-dynamic tree
|
|
189
189
|
* undefined for a checked-dynamic param (`bar?: any`). */
|
|
@@ -192,8 +192,8 @@ export declare function wrappedUndefined(L: Lowerer, type: IrType, loc: SrcLoc):
|
|
|
192
192
|
* unions, the dyn undefined for checked-dynamic slots, the engine's own
|
|
193
193
|
* undefined for island slots. Shared by every call-completion loop
|
|
194
194
|
* (direct calls and calls through func-typed values). */
|
|
195
|
-
export declare function omittedArgFor(
|
|
196
|
-
export declare function undefinedArgFor(
|
|
195
|
+
export declare function omittedArgFor(lowerer: Lowerer, type: IrType, loc: SrcLoc): IrExpr | null;
|
|
196
|
+
export declare function undefinedArgFor(lowerer: Lowerer, type: IrType, loc: SrcLoc, blame: ts.Node): IrExpr;
|
|
197
197
|
/** DECISION (docs/ir.md): function VALUES keep exact-arity semantics — a
|
|
198
198
|
* func-typed IrType spells one completed signature, so a function whose
|
|
199
199
|
* declaration has optional/default/rest parameters can become a value only
|
|
@@ -201,13 +201,13 @@ export declare function undefinedArgFor(L: Lowerer, type: IrType, loc: SrcLoc, b
|
|
|
201
201
|
* parameters (`x?: T` / `x: T = e` params appear as literal `T | undefined`
|
|
202
202
|
* unions; a rest signature is never spellable without `...`, which func
|
|
203
203
|
* types reject). Direct calls get the full feature. */
|
|
204
|
-
export declare function requireExactArityValue(
|
|
204
|
+
export declare function requireExactArityValue(lowerer: Lowerer, blame: ts.Node, contextual: ts.Expression | null, shapes: readonly ParamShape[], funcType: IrType): void;
|
|
205
205
|
/** The BODY-facing return type of a (possibly async) function: an async
|
|
206
206
|
* body's `return v` fulfills its promise with v, so the body returns the
|
|
207
207
|
* promise's INNER type while call sites keep Promise<T>. The declared
|
|
208
208
|
* type of an async function is always a promise (collectSignature /
|
|
209
209
|
* lowerLambda reject anything else before calling this). */
|
|
210
|
-
export declare function bodyReturnType(
|
|
210
|
+
export declare function bodyReturnType(lowerer: Lowerer, isAsync: boolean, declared: IrType): IrType;
|
|
211
211
|
/** A union-returning body may complete WITHOUT returning — JS yields
|
|
212
212
|
* undefined then (`(): string | undefined => { if (c) return "x"; }`), so
|
|
213
213
|
* an undefined-armed union return gets a trailing `return <undefined
|
|
@@ -222,20 +222,20 @@ export declare function bodyReturnType(L: Lowerer, isAsync: boolean, declared: I
|
|
|
222
222
|
* statement of their own. The trap satisfies the must-return rule as the
|
|
223
223
|
* dead code it is; it can only fire if the checker's proof was violated,
|
|
224
224
|
* which would be a lowering bug — hence the please-report wording. */
|
|
225
|
-
export declare function appendImplicitUndefinedReturn(
|
|
225
|
+
export declare function appendImplicitUndefinedReturn(lowerer: Lowerer, body: IrStmt[], bodyReturn: IrType, loc: SrcLoc): void;
|
|
226
226
|
/** A declaration's checker-derived IR return type. The unmappable-type
|
|
227
227
|
* diagnostic points at `blame` (the name for top-level declarations, the
|
|
228
228
|
* whole node for lambda-likes — preserving each caller's historical loc). */
|
|
229
|
-
export declare function declaredReturnType(
|
|
230
|
-
export declare function collectSignature(
|
|
231
|
-
export declare function collectSignatureInner(
|
|
229
|
+
export declare function declaredReturnType(lowerer: Lowerer, decl: ts.SignatureDeclaration, blame: ts.Node): IrType;
|
|
230
|
+
export declare function collectSignature(lowerer: Lowerer, decl: ts.FunctionDeclaration): void;
|
|
231
|
+
export declare function collectSignatureInner(lowerer: Lowerer, decl: ts.FunctionDeclaration): void;
|
|
232
232
|
/** Registers a top-level generic function. Only the SYNTAX is checked
|
|
233
233
|
* here — parameter/return types mention the type parameters and cannot
|
|
234
234
|
* map yet; the body is lowered per instantiation, on demand (an unused
|
|
235
235
|
* generic function costs nothing, like a C++ template). Called inside
|
|
236
236
|
* collectSignature's poison catch. */
|
|
237
|
-
export declare function collectGenericSignature(
|
|
238
|
-
export declare function genericFnOf(
|
|
237
|
+
export declare function collectGenericSignature(lowerer: Lowerer, decl: ts.FunctionDeclaration): void;
|
|
238
|
+
export declare function genericFnOf(lowerer: Lowerer, ident: ts.Identifier): GenericFnInfo | null;
|
|
239
239
|
/** Call of a generic top-level function. The checker already inferred (or
|
|
240
240
|
* was told, via explicit type arguments) the concrete signature —
|
|
241
241
|
* getResolvedSignature returns it with type arguments substituted. The
|
|
@@ -243,26 +243,12 @@ export declare function genericFnOf(L: Lowerer, ident: ts.Identifier): GenericFn
|
|
|
243
243
|
* with a new key queues the body for monomorphic lowering as
|
|
244
244
|
* `<qualifiedName>%<n>`, and every call lowers to a direct `call` of that
|
|
245
245
|
* instance. */
|
|
246
|
-
export declare function lowerGenericCall(
|
|
246
|
+
export declare function lowerGenericCall(lowerer: Lowerer, expr: ts.CallExpression, info: GenericFnInfo): IrExpr;
|
|
247
247
|
/** The instance a CALL of a generic function-like names: resolved
|
|
248
248
|
* signature → mapped param shapes/return → interned instance. Shared by
|
|
249
249
|
* top-level generic calls, class generic-method calls (the caller
|
|
250
250
|
* prepends the receiver), and object-literal generic-method calls. */
|
|
251
|
-
export declare function genericCallInstance(
|
|
252
|
-
/** The one instance table both instantiation routes share: key identity IS
|
|
253
|
-
* signature identity, so a call (`identity(1)`) and a pinned VALUE
|
|
254
|
-
* (`const f: (x: number) => number = identity`) reuse one compiled
|
|
255
|
-
* instance. `makeBindings` runs only for a NEW key (binding inference
|
|
256
|
-
* costs checker walks). */
|
|
257
|
-
export declare function internGenericInstance(L: Lowerer, blame: ts.Node, info: GenericFnInfo, params: ParamShape[], returnType: IrType, makeBindings: (tsBindings: Map<ts.Symbol, ts.Type>) => Map<ts.Symbol, IrType>, opts?: {
|
|
258
|
-
extraKey?: string;
|
|
259
|
-
tsBindings?: Map<ts.Symbol, ts.Type>;
|
|
260
|
-
}): GenericInstance;
|
|
261
|
-
/** The type parameters of `info` declared with a `keyof` CONSTRAINT
|
|
262
|
-
* (`K extends keyof T`) — the parameters whose bound literal is semantic
|
|
263
|
-
* (the body's `o[k]` reads the named field), computed once per info from
|
|
264
|
-
* the declaration's syntax. */
|
|
265
|
-
export declare function keyofConstrainedTypeParams(info: GenericFnInfo): Set<ts.Symbol>;
|
|
251
|
+
export declare function genericCallInstance(lowerer: Lowerer, expr: ts.CallExpression, info: GenericFnInfo): GenericInstance;
|
|
266
252
|
/** Type-parameter symbol → concrete IR type for one instantiation.
|
|
267
253
|
* Explicit type arguments bind directly; the rest come from structurally
|
|
268
254
|
* matching each DECLARED param/return type (which mentions the type
|
|
@@ -271,25 +257,13 @@ export declare function keyofConstrainedTypeParams(info: GenericFnInfo): Set<ts.
|
|
|
271
257
|
* construction. A type parameter left unbound only matters if the body
|
|
272
258
|
* mentions it, where mapType fails and badType names the shape
|
|
273
259
|
* (carrying the instantiation context). */
|
|
274
|
-
export declare function inferTypeParamBindings(
|
|
275
|
-
/** Type parameters still unbound after unification take their declared
|
|
276
|
-
* DEFAULT (`<T = number>`), mapped — the checker already substituted the
|
|
277
|
-
* default into every resolved signature, so this only fills the bindings
|
|
278
|
-
* an instance body's mapType consults. */
|
|
279
|
-
export declare function bindDefaultTypeParams(L: Lowerer, typeParams: readonly ts.Symbol[], typeParamDecls: readonly ts.TypeParameterDeclaration[] | undefined, bindings: Map<ts.Symbol, IrType>, tsBindings?: Map<ts.Symbol, ts.Type>): void;
|
|
280
|
-
/** The structural half of binding inference: unify the DECLARED signature
|
|
281
|
-
* (whose types mention the type parameters) against a TARGET signature
|
|
282
|
-
* with the substitution applied — a call's resolved signature, or the
|
|
283
|
-
* completed signature a VALUE reference is pinned to (the contextual
|
|
284
|
-
* type's one call signature). Mutates `bindings`; already-bound
|
|
285
|
-
* parameters (explicit type arguments) win. */
|
|
286
|
-
export declare function unifySignatureBindings(L: Lowerer, info: GenericFnInfo, rsig: ts.Signature, bindings: Map<ts.Symbol, IrType>, tsBindings?: Map<ts.Symbol, ts.Type>): void;
|
|
260
|
+
export declare function inferTypeParamBindings(lowerer: Lowerer, expr: ts.CallExpression, info: GenericFnInfo, rsig: ts.Signature, tsBindings?: Map<ts.Symbol, ts.Type>): Map<ts.Symbol, IrType>;
|
|
287
261
|
/** Lowers ONE monomorphic instance of a generic function: the same body
|
|
288
262
|
* AST, re-lowered with the type parameters bound (threaded into every
|
|
289
263
|
* mapType call via typeParamResolver — the checker keeps reporting the
|
|
290
264
|
* unsubstituted `T`s inside the body). Coverage stats count a base
|
|
291
265
|
* function's statements once: only the FIRST instance contributes. */
|
|
292
|
-
export declare function lowerGenericInstance(
|
|
266
|
+
export declare function lowerGenericInstance(lowerer: Lowerer, info: GenericFnInfo, inst: GenericInstance): IrFunction;
|
|
293
267
|
/** A generic function taken as a VALUE, monomorphized by flow. A function
|
|
294
268
|
* value needs ONE concrete signature; tsc pins one at exactly two
|
|
295
269
|
* reference shapes — an instantiation EXPRESSION (`identity<number>`,
|
|
@@ -302,7 +276,7 @@ export declare function lowerGenericInstance(L: Lowerer, info: GenericFnInfo, in
|
|
|
302
276
|
* zero-capture closure — `f === f` holds within an instantiation, the
|
|
303
277
|
* declared-function identity rule. References with no pinning context
|
|
304
278
|
* (the slot keeps `<T>(x: T) => T`) fence by name. */
|
|
305
|
-
export declare function lowerGenericFnValue(
|
|
279
|
+
export declare function lowerGenericFnValue(lowerer: Lowerer, ref: ts.Expression, info: GenericFnInfo): IrExpr;
|
|
306
280
|
/** The npm-static gate: implicit-any monomorphization applies to functions
|
|
307
281
|
* DECLARED in an opted-in package's JS files (user JS keeps today's
|
|
308
282
|
* checked-dynamic story until the corpus is re-baselined). */
|
|
@@ -312,7 +286,7 @@ export declare function implicitMonoFile(sf: ts.SourceFile): boolean;
|
|
|
312
286
|
* implicit-any param (identifier-named, no annotation/JSDoc type, not
|
|
313
287
|
* rest/optional/defaulted, never written), null elsewhere. Null overall
|
|
314
288
|
* when nothing qualifies — the declaration keeps today's path. */
|
|
315
|
-
export declare function implicitAnyParamSymbolsOf(
|
|
289
|
+
export declare function implicitAnyParamSymbolsOf(lowerer: Lowerer, decl: ts.FunctionDeclaration | ts.MethodDeclaration | ts.FunctionExpression | ts.ArrowFunction): (ts.Symbol | null)[] | null;
|
|
316
290
|
/** The instance a CALL of an implicit-any function-like names: each
|
|
317
291
|
* bindable implicit param takes the call's WIDENED argument checker type
|
|
318
292
|
* when it maps statically (DYN otherwise — today's slot), typed params
|
|
@@ -320,11 +294,7 @@ export declare function implicitAnyParamSymbolsOf(L: Lowerer, decl: ts.FunctionD
|
|
|
320
294
|
* instantiation key. New keys lower EAGERLY (return inference — see the
|
|
321
295
|
* section comment); a same-key re-demand mid-lowering pins the fallback
|
|
322
296
|
* return type. */
|
|
323
|
-
export declare function implicitCallInstance(
|
|
324
|
-
/** The all-dyn DEFAULT instance — today's compiled body exactly: what a
|
|
325
|
-
* VALUE reference of an implicit-any function names (indirect calls
|
|
326
|
-
* carry no per-site types to bind). */
|
|
327
|
-
export declare function implicitDefaultInstance(L: Lowerer, blame: ts.Node, info: GenericFnInfo): GenericInstance;
|
|
297
|
+
export declare function implicitCallInstance(lowerer: Lowerer, call: ts.CallExpression, info: GenericFnInfo): GenericInstance;
|
|
328
298
|
/** The implicit-any twin of bindingGenericFnNodeOf, for LOCAL and module
|
|
329
299
|
* bindings alike (`const knownBy = (cmd) => [cmd.name()].concat(...)`
|
|
330
300
|
* inside a method body — commander's _registerCommand shape): the
|
|
@@ -337,8 +307,8 @@ export declare function implicitDefaultInstance(L: Lowerer, blame: ts.Node, info
|
|
|
337
307
|
* params, and a body with NO captures — no `this`/`super`, and no
|
|
338
308
|
* reference to a function-scoped declaration outside itself (compiled
|
|
339
309
|
* instances are module functions; module-scope references are fine).
|
|
340
|
-
* Cached per declaration on
|
|
341
|
-
export declare function implicitLocalFnNodeOf(
|
|
310
|
+
* Cached per declaration on lowerer.implicitLocalFns. */
|
|
311
|
+
export declare function implicitLocalFnNodeOf(lowerer: Lowerer, decl: ts.VariableDeclaration): ts.FunctionExpression | ts.ArrowFunction | null;
|
|
342
312
|
/** Registers (or returns) the GenericFnInfo of a qualifying implicit-any
|
|
343
313
|
* function-value binding — implicitLocalFnNodeOf's companion, the
|
|
344
314
|
* bindingGenericFnInfoOf shape: the info enters genericFnsBySymbol under
|
|
@@ -347,14 +317,14 @@ export declare function implicitLocalFnNodeOf(L: Lowerer, decl: ts.VariableDecla
|
|
|
347
317
|
* declaration statement emits nothing and the binding has no runtime
|
|
348
318
|
* value. The declaration's source position joins the qualified name —
|
|
349
319
|
* two same-named locals in one file stay distinct. */
|
|
350
|
-
export declare function implicitLocalFnInfoOf(
|
|
320
|
+
export declare function implicitLocalFnInfoOf(lowerer: Lowerer, decl: ts.VariableDeclaration, fnNode: ts.FunctionExpression | ts.ArrowFunction): GenericFnInfo;
|
|
351
321
|
/** An island call result the .d.ts DECLARES as a primitive exits eagerly
|
|
352
322
|
* to that static type — the member-read rule's call sibling (see the
|
|
353
323
|
* getProp lowering in lower-exprs.ts): primitives copy by value, every
|
|
354
324
|
* static consumer works on the result, and a lying declaration throws the
|
|
355
325
|
* catchable TypeError. Chain-handled forms stay jsval (the optChain's
|
|
356
326
|
* unit path is the engine's undefined). */
|
|
357
|
-
export declare function islandPrimitiveExit(
|
|
327
|
+
export declare function islandPrimitiveExit(lowerer: Lowerer, call: ts.CallExpression, result: IrExpr): IrExpr;
|
|
358
328
|
/** The trailing-argument timer forms — `setTimeout(cb, ms, ...args)`,
|
|
359
329
|
* `setInterval(cb, ms, ...args)`, `setImmediate(cb, ...args)` — invoke
|
|
360
330
|
* the callback WITH those arguments (Node passes them through). The
|
|
@@ -363,16 +333,12 @@ export declare function islandPrimitiveExit(L: Lowerer, call: ts.CallExpression,
|
|
|
363
333
|
* (per-argument checks against the callee's declared signature, extras
|
|
364
334
|
* ignored, a non-function callee throwing the catchable TypeError).
|
|
365
335
|
* Non-boxable callbacks fence. */
|
|
366
|
-
export declare function timerStyleCallback(
|
|
367
|
-
/** The timer surface's member names — the ambient globals AND the
|
|
368
|
-
* node:timers module's exports (one set: Node's timers module re-exports
|
|
369
|
-
* the globals). */
|
|
370
|
-
export declare const TIMER_MODULE_MEMBERS: ReadonlySet<string>;
|
|
336
|
+
export declare function timerStyleCallback(lowerer: Lowerer, callArgs: readonly ts.Expression[], what: string, loc: SrcLoc): IrExpr;
|
|
371
337
|
/** One timer call by MEMBER NAME — the shared lowering behind the ambient
|
|
372
338
|
* globals, the node:timers named/destructured imports, and the namespace
|
|
373
339
|
* form (`timers.setTimeout(...)`). Null when the member isn't a lowered
|
|
374
340
|
* timer function (the caller's fence machinery takes over). */
|
|
375
|
-
export declare function lowerTimersMemberCall(
|
|
341
|
+
export declare function lowerTimersMemberCall(lowerer: Lowerer, expr: ts.CallExpression, member: string, loc: SrcLoc): IrExpr | null;
|
|
376
342
|
export interface FfiValidationResult {
|
|
377
343
|
diagnostics: ScrDiagnostic[];
|
|
378
344
|
symbolsByName: ReadonlyMap<string, ReadonlySet<ts.Symbol>>;
|
|
@@ -384,104 +350,20 @@ export interface FfiValidationResult {
|
|
|
384
350
|
* must fit the one manifest ABI. Library callbacks additionally exclude
|
|
385
351
|
* standard-library and package declaration files while retaining project
|
|
386
352
|
* declaration files as authored callback surface. */
|
|
387
|
-
export declare function validateFfiImports(
|
|
353
|
+
export declare function validateFfiImports(lowerer: Lowerer): FfiValidationResult;
|
|
388
354
|
/** A manifest-bound call of a signature-only ambient declaration. This
|
|
389
355
|
* recognition deliberately runs before ambientUndefVarRootOf: without the
|
|
390
356
|
* manifest the exact same source keeps Node's ReferenceError semantics;
|
|
391
357
|
* with it, only the resolved declaration binding (never a shadowing
|
|
392
358
|
* function with a body) becomes a direct native call. */
|
|
393
|
-
export declare function lowerFfiCall(
|
|
394
|
-
export declare function lowerCall(
|
|
395
|
-
|
|
396
|
-
* (`const f = (...args) => from(...args)`): a spread whose length is a
|
|
397
|
-
* runtime fact has no home in the compile-time completion, so the call
|
|
398
|
-
* rides a dynamic boundary instead. Two lanes, picked by the spread
|
|
399
|
-
* source's tier:
|
|
400
|
-
*
|
|
401
|
-
* - CHECKED-DYNAMIC (dyn spread sources — a JS rest binding, a dyn
|
|
402
|
-
* value): box the callee (dynFrom; a dyn callee is already boxed),
|
|
403
|
-
* convert every argument into dyn, and emit the spread-marked dynCall
|
|
404
|
-
* — the emitters build one fresh dyn argument array (spreads flatten
|
|
405
|
-
* left-to-right, non-iterables throw V8's TypeError) and apply through
|
|
406
|
-
* it; the boxed thunk delivers JS arity exactly. Result dyn, checked
|
|
407
|
-
* per use like every any-origin value.
|
|
408
|
-
* - ISLAND (a jsval spread source — the --dynamic rest binding is the
|
|
409
|
-
* engine's own arguments array): marshal the callee in and emit jsOp
|
|
410
|
-
* callSpread — the prelude helper's REAL `f(...pre, ...s)`, so
|
|
411
|
-
* iterator protocols and the not-iterable TypeError are the engine's
|
|
412
|
-
* own. One trailing spread after the fixed arguments is the modeled
|
|
413
|
-
* shape (exactly the forwarding idiom).
|
|
414
|
-
*
|
|
415
|
-
* Answers null when neither lane fits (typed .ts spreads keep
|
|
416
|
-
* completeArgs' rest packing and its fences). JS sources only — the
|
|
417
|
-
* same guard as the over-arity dynCall precedent. */
|
|
418
|
-
export declare function lowerSpreadArgsCall(L: Lowerer, expr: ts.CallExpression, callee: IrExpr, loc: SrcLoc): IrExpr | null;
|
|
419
|
-
/** True when a spread argument lands where the compile-time completion
|
|
420
|
-
* cannot take it — a FIXED parameter position, or a dynamic rest slot
|
|
421
|
-
* (dynRest/islandRest, whose packs are built per-argument): the shapes
|
|
422
|
-
* the runtime-arity lane (lowerSpreadArgsCall) serves. Typed `rest`
|
|
423
|
-
* slots keep completeArgs' same-element spread packing. */
|
|
424
|
-
export declare function spreadNeedsRuntimeArity(shapes: readonly ParamShape[], argNodes: readonly ts.Expression[]): boolean;
|
|
425
|
-
/** The SHARED prototype names scr_dyn_invoke dispatches at runtime (the
|
|
426
|
-
* subset of DYN_PROTO_METHOD_NAMES with a receiver-kind dispatch): the
|
|
427
|
-
* runtime runs the real method for the receiver's kind, throws Node's
|
|
428
|
-
* is-not-a-function where the kind's prototype lacks the name, and
|
|
429
|
-
* fences LOUDLY on real-but-unimplemented pairs. */
|
|
430
|
-
export declare const DYN_DISPATCH_METHODS: Set<string>;
|
|
431
|
-
export declare function lowerDynDispatchMethodCall(L: Lowerer, call: ts.CallExpression, access: ts.PropertyAccessExpression, recv: IrExpr, arrayReceiver: boolean): IrExpr | null;
|
|
432
|
-
/** Radix-free `.toString()` on a PRIMITIVE receiver: numbers take the
|
|
433
|
-
* STATIC JS-exact number formatter — the same `toString` node templates
|
|
434
|
-
* and String(n) lower to (Number::toString with radix 10 IS that
|
|
435
|
-
* conversion, per spec) — booleans the "true"/"false" texts, and strings
|
|
436
|
-
* the identity read (String.prototype.toString returns `this`). The
|
|
437
|
-
* explicit-radix number form keeps its island lowering (ISLAND_SURFACE);
|
|
438
|
-
* null for other receivers, argument shapes, or non-lib members (a
|
|
439
|
-
* user's own `.toString` takes the ordinary paths). */
|
|
440
|
-
export declare function lowerNumberToStringCall(L: Lowerer, call: ts.CallExpression, access: ts.PropertyAccessExpression): IrExpr | null;
|
|
441
|
-
/** Radix-free `.toString()` on a UNION receiver whose every arm has one
|
|
442
|
-
* (string identity, JS-exact number/bool texts, and the Buffer arm's
|
|
443
|
-
* utf8 decode — Node's default encoding): the per-union ToString
|
|
444
|
-
* helper dispatches on the tag, so `chunk.toString()` over the ngrok
|
|
445
|
-
* `Buffer | string` listener param needs no narrowing. Unit-armed
|
|
446
|
-
* unions stay out — `(undefined).toString()` THROWS in JS, and
|
|
447
|
-
* claiming it here would silently print "undefined" instead. Null for
|
|
448
|
-
* other receivers/arms (the narrow-first fences stay). */
|
|
449
|
-
export declare function lowerUnionToStringCall(L: Lowerer, call: ts.CallExpression, access: ts.PropertyAccessExpression): IrExpr | null;
|
|
450
|
-
/** `x.toString()` resolving to Object.prototype.toString (stdlib
|
|
451
|
-
* provenance, zero arguments) on a RECORD or program-class receiver:
|
|
452
|
-
* the spec's default answer is the constant "[object Object]". Records
|
|
453
|
-
* carry no method storage at all, and a class receiver folds only when
|
|
454
|
-
* neither its chain nor ANY subclass declares toString (dynamic
|
|
455
|
-
* dispatch could reach an override otherwise — and a resolved override
|
|
456
|
-
* is the USER's symbol, which never lands here). Pure receivers elide
|
|
457
|
-
* evaluation; effectful ones evaluate through an interned identity
|
|
458
|
-
* helper so the receiver's effects keep their place. */
|
|
459
|
-
export declare function lowerDefaultToStringCall(L: Lowerer, call: ts.CallExpression, access: ts.PropertyAccessExpression): IrExpr | null;
|
|
460
|
-
/** The remaining PRIMITIVE prototype surface with a static story, in both
|
|
461
|
-
* member spellings (`x.hasOwnProperty(...)` and `x['hasOwnProperty'](...)`
|
|
462
|
-
* — JS resolves the two identically, so the element spelling routes here
|
|
463
|
-
* from lowerCall's element-access hook):
|
|
464
|
-
* - `n.toExponential()` and both `n.toFixed()` forms — the static
|
|
465
|
-
* runtime formatters (num.toExponential's shortest-mantissa form,
|
|
466
|
-
* num.toFixed0's ties-up integer fast path, and num.toFixed's exact
|
|
467
|
-
* binary-value rounding for an explicit fractionDigits).
|
|
468
|
-
* - `hasOwnProperty(lit)` on number/boolean receivers — the boxes own
|
|
469
|
-
* NOTHING, so any key answers false (a compile-time constant; the
|
|
470
|
-
* receiver must be effect-free since the constant elides it).
|
|
471
|
-
* - `hasOwnProperty(lit)` on string receivers — "length" is true,
|
|
472
|
-
* a canonical array index answers `index < s.length` (indices ARE
|
|
473
|
-
* own properties of the box, per spec), every other literal false.
|
|
474
|
-
* - the element-access spellings of `toString()` (the primitive
|
|
475
|
-
* lowering above) and `charAt(i)` — the two the element hook needs
|
|
476
|
-
* beyond this file's own claims.
|
|
477
|
-
* Null elsewhere: non-literal keys, other members, other receivers. */
|
|
478
|
-
export declare function lowerPrimitiveProtoCall(L: Lowerer, call: ts.CallExpression, recv: ts.Expression, name: string, memberSym: ts.Symbol | undefined): IrExpr | null;
|
|
359
|
+
export declare function lowerFfiCall(lowerer: Lowerer, expr: ts.CallExpression): IrExpr | null;
|
|
360
|
+
export declare function lowerCall(lowerer: Lowerer, expr: ts.CallExpression): IrExpr;
|
|
361
|
+
export declare function lowerDynDispatchMethodCall(lowerer: Lowerer, call: ts.CallExpression, access: ts.PropertyAccessExpression, recv: IrExpr, arrayReceiver: boolean): IrExpr | null;
|
|
479
362
|
/** Tagged templates `tag\`a${x}b\`` — ES's call: tag(strings, ...values).
|
|
480
|
-
* The strings object is
|
|
481
|
-
*
|
|
482
|
-
*
|
|
483
|
-
*
|
|
484
|
-
* maps to string[] (types.ts), so the array rides the ordinary
|
|
363
|
+
* The strings object is a per-SITE lazily initialized hidden array global,
|
|
364
|
+
* so the spec's identity contract holds — the same site evaluated twice
|
|
365
|
+
* hands the tag the SAME array; two sites never share. TemplateStringsArray
|
|
366
|
+
* maps to string[] (type-mapper.ts), so the array rides the ordinary
|
|
485
367
|
* slot-directed coercion into whatever the tag's first parameter wants
|
|
486
368
|
* — string[] exactly, an `any` slot through the dyn boundary, a rest
|
|
487
369
|
* pack's first element. `.raw` does not exist on the lowered object:
|
|
@@ -496,26 +378,26 @@ export declare function lowerPrimitiveProtoCall(L: Lowerer, call: ts.CallExpress
|
|
|
496
378
|
* a checked-dynamic value (the dynCall boundary — a non-function tag
|
|
497
379
|
* throws Node's catchable TypeError). Everything else — generic tags,
|
|
498
380
|
* method tags, function-value bindings — fences by name. */
|
|
499
|
-
export declare function lowerTaggedTemplate(
|
|
381
|
+
export declare function lowerTaggedTemplate(lowerer: Lowerer, expr: ts.TaggedTemplateExpression): IrExpr;
|
|
500
382
|
/** True when the identifier resolves (through import aliases) to a
|
|
501
383
|
* top-level function declaration of ANY program file (not merely a
|
|
502
384
|
* same-named local shadowing one). Functions declared directly in a
|
|
503
385
|
* FLATTENED namespace block count — splitFiles hoisted them into the
|
|
504
386
|
* same collection lists top-level declarations ride. */
|
|
505
|
-
export declare function isTopLevelFnSymbol(
|
|
387
|
+
export declare function isTopLevelFnSymbol(lowerer: Lowerer, ident: ts.Identifier): boolean;
|
|
506
388
|
/** Nested `function name(...) {...}`: lowered as `const name = <lambda>`
|
|
507
389
|
* at the declaration's statement position (JS hoists function declarations
|
|
508
390
|
* to the top of the enclosing function — calling one before this statement
|
|
509
391
|
* is a compile error here, not a silent divergence). Self-references inside
|
|
510
392
|
* the body lower to `selfRef`, not a capture: a box holding its own
|
|
511
393
|
* closure would be an RC cycle. */
|
|
512
|
-
export declare function lowerNestedFunctionDecl(
|
|
394
|
+
export declare function lowerNestedFunctionDecl(lowerer: Lowerer, stmt: ts.FunctionDeclaration): IrStmt;
|
|
513
395
|
/** Signature checks + param shapes + IR func type for any lambda-like
|
|
514
396
|
* node. The func type's params are the ABI types, so a lambda with
|
|
515
397
|
* optional/default params has the same IR type as one spelling the
|
|
516
398
|
* `T | undefined` unions with required params — exactly the exact-arity
|
|
517
399
|
* value rule (requireExactArityValue decides who may become a value). */
|
|
518
|
-
export declare function lambdaSignature(
|
|
400
|
+
export declare function lambdaSignature(lowerer: Lowerer, node: ts.ArrowFunction | ts.FunctionExpression | ts.FunctionDeclaration | ts.MethodDeclaration | ts.GetAccessorDeclaration | ts.SetAccessorDeclaration): {
|
|
519
401
|
shapes: ParamShape[];
|
|
520
402
|
funcType: IrType & {
|
|
521
403
|
kind: "func";
|
|
@@ -533,8 +415,8 @@ export declare function bodyReadsArguments(fn: {
|
|
|
533
415
|
/** Lifts an arrow function / function expression / nested declaration /
|
|
534
416
|
* object-literal shorthand method to a module-level function and yields
|
|
535
417
|
* the `closure` expression creating it. */
|
|
536
|
-
export declare function lowerLambda(
|
|
537
|
-
export declare function lowerPromiseMethodCall(
|
|
418
|
+
export declare function lowerLambda(lowerer: Lowerer, node: ts.ArrowFunction | ts.FunctionExpression | ts.FunctionDeclaration | ts.MethodDeclaration | ts.GetAccessorDeclaration | ts.SetAccessorDeclaration): IrExpr;
|
|
419
|
+
export declare function lowerPromiseMethodCall(lowerer: Lowerer, call: ts.CallExpression, access: ts.PropertyAccessExpression): IrExpr | null;
|
|
538
420
|
/** NARROWING `a.filter(...)` — the two callback forms whose result the
|
|
539
421
|
* checker types as a NARROWER array than the receiver:
|
|
540
422
|
*
|
|
@@ -552,7 +434,7 @@ export declare function lowerPromiseMethodCall(L: Lowerer, call: ts.CallExpressi
|
|
|
552
434
|
* synthesized loop; a multi-arm target would need the union-to-union
|
|
553
435
|
* re-tag that doesn't exist (fenced with the annotate-the-callback
|
|
554
436
|
* escape). Null hands non-narrowing filters to the generic HOF path. */
|
|
555
|
-
export declare function lowerFilterNarrowCall(
|
|
437
|
+
export declare function lowerFilterNarrowCall(lowerer: Lowerer, call: ts.CallExpression, access: ts.PropertyAccessExpression): IrExpr | null;
|
|
556
438
|
/** The interned keys-array helper over a FIXED record shape: a call of a
|
|
557
439
|
* lifted helper whose body pushes each declared field name in first-seen
|
|
558
440
|
* DECLARATION order, skipping fields currently holding the undefined arm
|
|
@@ -560,7 +442,7 @@ export declare function lowerFilterNarrowCall(L: Lowerer, call: ts.CallExpressio
|
|
|
560
442
|
* never made it into the object; SEMANTICS.md 37's rules). ONE
|
|
561
443
|
* construction, interned per shape, shared by Object.keys and for-in —
|
|
562
444
|
* for-in iterates exactly the keys Object.keys answers. */
|
|
563
|
-
export declare function recordKeysArrayCall(
|
|
445
|
+
export declare function recordKeysArrayCall(lowerer: Lowerer, receiver: IrExpr, argIr: IrType & {
|
|
564
446
|
kind: "record";
|
|
565
447
|
}, shape: {
|
|
566
448
|
declaredOrder?: string[];
|
|
@@ -569,13 +451,13 @@ export declare function recordKeysArrayCall(L: Lowerer, receiver: IrExpr, argIr:
|
|
|
569
451
|
type: IrType;
|
|
570
452
|
}[];
|
|
571
453
|
}, loc: SrcLoc): IrExpr;
|
|
572
|
-
export declare function lowerFunction(
|
|
573
|
-
export declare function lowerRecordFieldCall(
|
|
454
|
+
export declare function lowerFunction(lowerer: Lowerer, decl: ts.FunctionDeclaration): IrFunction | null;
|
|
455
|
+
export declare function lowerRecordFieldCall(lowerer: Lowerer, call: ts.CallExpression, access: ts.PropertyAccessExpression): IrExpr | null;
|
|
574
456
|
/** The function-like node behind an object-literal generic-method member:
|
|
575
457
|
* the MethodDeclaration itself (`{ m<T>(x: T) {...} }`) or a generic
|
|
576
458
|
* arrow/function-expression property's initializer (`{ m: <T>(x: T) =>
|
|
577
459
|
* ... }`). Null when the property's declaration isn't that shape. */
|
|
578
|
-
export declare function objLitGenericFnNodeOf(
|
|
460
|
+
export declare function objLitGenericFnNodeOf(lowerer: Lowerer, propSym: ts.Symbol): {
|
|
579
461
|
fnNode: ts.MethodDeclaration | ts.FunctionExpression | ts.ArrowFunction;
|
|
580
462
|
literal: ts.ObjectLiteralExpression;
|
|
581
463
|
} | null;
|
|
@@ -586,7 +468,7 @@ export declare function objLitGenericFnNodeOf(L: Lowerer, propSym: ts.Symbol): {
|
|
|
586
468
|
* async/generator forms keep the method fences. The name is source-
|
|
587
469
|
* position-derived (`%ol<start>.<name>`, qualified per file) —
|
|
588
470
|
* deterministic across the discovery and emit passes. */
|
|
589
|
-
export declare function objLitGenericFnInfoOf(
|
|
471
|
+
export declare function objLitGenericFnInfoOf(lowerer: Lowerer, blame: ts.Node, name: string, found: {
|
|
590
472
|
fnNode: ts.MethodDeclaration | ts.FunctionExpression | ts.ArrowFunction;
|
|
591
473
|
literal: ts.ObjectLiteralExpression;
|
|
592
474
|
}): GenericFnInfo;
|
|
@@ -596,26 +478,12 @@ export declare function objLitGenericFnInfoOf(L: Lowerer, blame: ts.Node, name:
|
|
|
596
478
|
* Sound file-locally for module-scope bindings because ESM import
|
|
597
479
|
* bindings are read-only — no other file can write one. Cached per
|
|
598
480
|
* symbol (the scan walks the whole file once). */
|
|
599
|
-
export declare function bindingNeverReassigned(
|
|
600
|
-
/** Strips the value-preserving wrappers off an expression: parens,
|
|
601
|
-
* non-null assertions, `as`/`satisfies`/angle-bracket casts. What
|
|
602
|
-
* remains is the expression that actually evaluates. */
|
|
603
|
-
export declare function stripValueWrappers(e: ts.Expression): ts.Expression;
|
|
481
|
+
export declare function bindingNeverReassigned(lowerer: Lowerer, sym: ts.Symbol, decl: ts.Node): boolean;
|
|
604
482
|
/** The nullish unit `e` provably evaluates to: a bare null/undefined
|
|
605
483
|
* literal (assertion-wrapped — `null as any`, `null!`), or a read of a
|
|
606
484
|
* registered NULLISH binding (nullishGenericBindingUnitOf). Null when
|
|
607
485
|
* the value could be anything else. */
|
|
608
|
-
export declare function nullishExprUnitOf(
|
|
609
|
-
/** The nullish unit a binding provably holds FOREVER, by VALUE alone: its
|
|
610
|
-
* initializer is nullish (`const i: I<A & B> = null as any`) and every
|
|
611
|
-
* write in its declaring file is nullish too (`a = b` where b is
|
|
612
|
-
* another nullish binding). No type condition — callers add their own
|
|
613
|
-
* (nullishGenericBindingUnitOf gates the no-storage family on
|
|
614
|
-
* unmappable types; the generic-method call path rescues its fence with
|
|
615
|
-
* the value fact alone). Cached per symbol; the pre-seeded null entry
|
|
616
|
-
* guards probe cycles (mutually-assigned bindings resolve link by link,
|
|
617
|
-
* declaration order). */
|
|
618
|
-
export declare function nullishValueUnitOf(L: Lowerer, sym: ts.Symbol | null): "null" | "undefined" | null;
|
|
486
|
+
export declare function nullishExprUnitOf(lowerer: Lowerer, e: ts.Expression): "null" | "undefined" | null;
|
|
619
487
|
/** nullishValueUnitOf gated on a declared type that CANNOT hold the
|
|
620
488
|
* value — the NO-STORAGE family: an unmappable type has no other story,
|
|
621
489
|
* and a RECORD-mapped one (`const i: I<A & B> = null as any` — an
|
|
@@ -625,7 +493,7 @@ export declare function nullishValueUnitOf(L: Lowerer, sym: ts.Symbol | null): "
|
|
|
625
493
|
* declaration emits nothing and reads know the value. Null-tolerant
|
|
626
494
|
* mappings (unions with a null/undefined arm, dyn) keep their real
|
|
627
495
|
* storage and every ordinary lowering. */
|
|
628
|
-
export declare function nullishGenericBindingUnitOf(
|
|
496
|
+
export declare function nullishGenericBindingUnitOf(lowerer: Lowerer, sym: ts.Symbol | null): "null" | "undefined" | null;
|
|
629
497
|
/** True when `sym` — a binding whose type has NO static mapping — is DEAD:
|
|
630
498
|
* never read anywhere in the program, not exported through a specifier,
|
|
631
499
|
* declared with no initializer or a side-effect-free one, and written
|
|
@@ -635,9 +503,9 @@ export declare function nullishGenericBindingUnitOf(L: Lowerer, sym: ts.Symbol |
|
|
|
635
503
|
* on a type the program never consumes (`var xs2: typeof Array;`, the
|
|
636
504
|
* write-only `var f2: { <T, U>(x: T, y: U): T }`). TS program files
|
|
637
505
|
* only: JS bindings keep their checked-dynamic fallbacks. Positive
|
|
638
|
-
* answers register in
|
|
506
|
+
* answers register in lowerer.deadBindings (the assignment lowering skips
|
|
639
507
|
* writes by the same set). */
|
|
640
|
-
export declare function deadUnmappableBinding(
|
|
508
|
+
export declare function deadUnmappableBinding(lowerer: Lowerer, sym: ts.Symbol | null, decl: ts.VariableDeclaration): boolean;
|
|
641
509
|
/** The generic function-like INITIALIZER behind a binding declaration —
|
|
642
510
|
* `const f = <T>(x: T) => x` or `const f = function g<T>(x: T) {...}`
|
|
643
511
|
* (parens stripped). Null when the declaration isn't that shape; the
|
|
@@ -652,7 +520,7 @@ export declare function bindingGenericFnNodeOf(decl: ts.VariableDeclaration): ts
|
|
|
652
520
|
* bindingGenericFnInfoOf reads the type parameters off the annotation's
|
|
653
521
|
* signature. Null when the shape doesn't match (a concrete annotation, a
|
|
654
522
|
* generic arrow — the syntactic probe's case, an overloaded alias). */
|
|
655
|
-
export declare function bindingContextualGenericFnNodeOf(
|
|
523
|
+
export declare function bindingContextualGenericFnNodeOf(lowerer: Lowerer, decl: ts.VariableDeclaration): ts.FunctionExpression | ts.ArrowFunction | null;
|
|
656
524
|
/** The interned GenericFnInfo for one generic arrow/function-expression
|
|
657
525
|
* binding initializer, with the supportability fences applied ONCE per
|
|
658
526
|
* declaration: the binding must sit at module scope (the compiled
|
|
@@ -668,7 +536,7 @@ export declare function bindingContextualGenericFnNodeOf(L: Lowerer, decl: ts.Va
|
|
|
668
536
|
* body, the class-expression rule) — so every genericFnOf consumer
|
|
669
537
|
* (calls, pinned values, instantiation expressions, namespace and CJS
|
|
670
538
|
* member paths) resolves it like a top-level generic declaration. */
|
|
671
|
-
export declare function bindingGenericFnInfoOf(
|
|
539
|
+
export declare function bindingGenericFnInfoOf(lowerer: Lowerer, decl: ts.VariableDeclaration, fnNode: ts.FunctionExpression | ts.ArrowFunction): GenericFnInfo;
|
|
672
540
|
/** `const h = id` — a binding ALIASING a generic function (a top-level
|
|
673
541
|
* declaration, a registered generic binding, or another alias — resolved
|
|
674
542
|
* left to right in declaration order). The alias registers the SAME info
|
|
@@ -680,7 +548,7 @@ export declare function bindingGenericFnInfoOf(L: Lowerer, decl: ts.VariableDecl
|
|
|
680
548
|
* pinned VALUE, the existing lowerGenericFnValue story. Null when the
|
|
681
549
|
* shape doesn't match or the target isn't a registered generic; fences
|
|
682
550
|
* (reassignment, var redeclaration) report by name inside. */
|
|
683
|
-
export declare function bindingGenericFnAliasInfoOf(
|
|
551
|
+
export declare function bindingGenericFnAliasInfoOf(lowerer: Lowerer, decl: ts.VariableDeclaration): GenericFnInfo | null;
|
|
684
552
|
/** Static resolution stands in for the receiver's runtime value, so an
|
|
685
553
|
* object-literal generic-method receiver must provably HOLD the defining
|
|
686
554
|
* literal: a direct read of a binding whose initializer IS that literal
|
|
@@ -690,12 +558,11 @@ export declare function bindingGenericFnAliasInfoOf(L: Lowerer, decl: ts.Variabl
|
|
|
690
558
|
* evaluating it entirely. A reassignable binding could hold a
|
|
691
559
|
* structurally identical literal with a DIFFERENT body, which static
|
|
692
560
|
* resolution would silently miss. */
|
|
693
|
-
export declare function requireObjLitGenericReceiver(
|
|
694
|
-
export declare function lowerObjLitGenericMethodCall(L: Lowerer, call: ts.CallExpression, access: ts.PropertyAccessExpression): IrExpr | null;
|
|
561
|
+
export declare function requireObjLitGenericReceiver(lowerer: Lowerer, blame: ts.Node, recvExpr: ts.Expression, literal: ts.ObjectLiteralExpression, name: string): void;
|
|
695
562
|
/** `obj.method(args)` — whole-program devirtualization decides the form:
|
|
696
563
|
* a method some strict subclass of the receiver's STATIC class overrides
|
|
697
564
|
* must dispatch on the dynamic class (`virtualCall`, through the vtable);
|
|
698
565
|
* everything else — standalone classes, non-overridden methods, leaf
|
|
699
566
|
* receivers — stays a direct `call` of the nearest declaration, exactly
|
|
700
567
|
* as before inheritance existed. */
|
|
701
|
-
export declare function lowerObjectMethodCall(
|
|
568
|
+
export declare function lowerObjectMethodCall(lowerer: Lowerer, call: ts.CallExpression, access: ts.PropertyAccessExpression): IrExpr | null;
|