@scriptc/compiler 0.0.35 → 0.0.36
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 +7 -6
- 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 +7913 -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 +1 -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} +377 -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} +238 -298
- package/dist/backend/c/walkers.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/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 +152 -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 +514 -9981
- 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 +623 -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 +151 -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 +622 -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 +396 -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 +164 -218
- package/dist/backend/llvm/walkers.js.map +1 -1
- package/dist/backend/native-codegen.d.ts +38 -0
- package/dist/backend/native-codegen.js +261 -0
- package/dist/backend/native-codegen.js.map +1 -0
- package/dist/backend/native-codegen.test.js +188 -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 +219 -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} +214 -6
- 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.d.ts +137 -0
- package/dist/backend/runtime-pack.js +400 -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 +438 -0
- package/dist/backend/runtime-pack.test.js.map +1 -0
- package/dist/backend/targets.d.ts +30 -0
- package/dist/backend/targets.js +46 -0
- package/dist/backend/targets.js.map +1 -0
- package/dist/backend/targets.test.d.ts +1 -0
- package/dist/backend/targets.test.js +19 -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 +25 -32
- 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/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-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 +1124 -1232
- package/dist/frontend/lowering/lower-builtins.js.map +1 -1
- package/dist/frontend/lowering/lower-calls.d.ts +56 -188
- package/dist/frontend/lowering/lower-calls.js +1397 -1492
- 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 +1384 -1700
- 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 +56 -264
- package/dist/frontend/lowering/lower-exprs.js +1624 -1696
- 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 +236 -238
- package/dist/frontend/lowering/lower-inspect.js.map +1 -1
- package/dist/frontend/lowering/lower-island.d.ts +34 -45
- package/dist/frontend/lowering/lower-island.js +437 -508
- 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 +899 -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 +1175 -1228
- 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 +60 -20
- package/dist/frontend/lowering/lowerer.js +191 -117
- 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 +14 -33
- package/dist/frontend/lowering/surfaces.js +63 -63
- 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 +112 -30
- package/dist/index.js +512 -126
- 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} +54 -26
- package/dist/ir/{nodes.js → ir.js} +145 -141
- 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 +1 -1
- package/dist/ir/serialize.js +2 -1
- package/dist/ir/serialize.js.map +1 -1
- package/dist/ir/validate.d.ts +1 -1
- package/dist/ir/validate.js +10 -5
- 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 +5 -1
- package/dist/library/fence-eval.js.map +1 -1
- package/dist/library/int-infer.d.ts +1 -36
- package/dist/library/int-infer.js +17 -17
- package/dist/library/int-infer.js.map +1 -1
- 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} +2 -2
- 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 +3 -3
- package/dist/startup-cache.js +2 -2
- package/dist/startup-cache.js.map +1 -1
- package/package.json +6 -2
- package/surface-manifest.json +1 -1
- 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,8 +1,8 @@
|
|
|
1
1
|
import * as ts from "../ts7/adapter.js";
|
|
2
2
|
import type { Lowerer } from "./lowerer.js";
|
|
3
|
-
import { IrClassDef, IrExpr, IrFunction, IrLocal, IrStmt, IrType, SrcLoc } from "../../ir/
|
|
3
|
+
import { IrClassDef, IrExpr, IrFunction, IrLocal, IrStmt, IrType, SrcLoc } from "../../ir/ir.js";
|
|
4
4
|
import { type GenericFnInfo, type ParamShape } from "./lower-calls.js";
|
|
5
|
-
import { type EmitOverrideRec } from "./lower-emitter.js";
|
|
5
|
+
import { type EmitOverrideRec } from "./lower-event-emitter.js";
|
|
6
6
|
import { type MixinInstanceInfo } from "./lower-mixins.js";
|
|
7
7
|
export interface ClassInfo {
|
|
8
8
|
def: IrClassDef;
|
|
@@ -72,7 +72,7 @@ export interface ClassInfo {
|
|
|
72
72
|
builtinError?: true;
|
|
73
73
|
/** Runtime-provided node:events EventEmitter: no bodies lower, `new` and
|
|
74
74
|
* super() become emitter.* libCalls, and the whole method surface
|
|
75
|
-
* (on/emit/...) lowers through lower-emitter.ts over any class rooted
|
|
75
|
+
* (on/emit/...) lowers through lower-event-emitter.ts over any class rooted
|
|
76
76
|
* here. Subclass structs embed the ScrEmitter prefix. */
|
|
77
77
|
builtinEmitter?: true;
|
|
78
78
|
/** Runtime-provided node:stream class (Readable/Writable/Duplex/
|
|
@@ -86,7 +86,7 @@ export interface ClassInfo {
|
|
|
86
86
|
* EventEmitter member a subclass may re-declare): never in `methods` —
|
|
87
87
|
* emit calls keep routing through the emitter spoke, which lowers the
|
|
88
88
|
* body once per event name as the specialization method `emit:<event>`
|
|
89
|
-
* (lower-emitter.ts's emit-overrides block has the whole story). */
|
|
89
|
+
* (lower-event-emitter.ts's emit-overrides block has the whole story). */
|
|
90
90
|
emitOverride?: EmitOverrideRec;
|
|
91
91
|
ctor: ts.ConstructorDeclaration | null;
|
|
92
92
|
/** PARAMETER PROPERTIES (`constructor(public x: number)`), in parameter
|
|
@@ -275,17 +275,17 @@ export interface GenericClassInfo {
|
|
|
275
275
|
* toString reach them through dedicated error.* libCall lowerings, and
|
|
276
276
|
* user classes extend them like any base (the emitted subclass struct
|
|
277
277
|
* embeds ScrError's prefix). */
|
|
278
|
-
export declare function registerBuiltinErrorClasses(
|
|
278
|
+
export declare function registerBuiltinErrorClasses(lowerer: Lowerer): void;
|
|
279
279
|
/** The runtime-provided node:events EventEmitter as an eagerly-registered
|
|
280
280
|
* ClassInfo (the error-hierarchy story): mapType names `%EventEmitter`
|
|
281
281
|
* the moment an emitter type appears, so the info must exist before any
|
|
282
282
|
* lowering. No decl, no lowerable bodies — `new`/super() reach it
|
|
283
283
|
* through emitter.* libCalls, the method surface lowers through
|
|
284
|
-
* lower-emitter.ts, and user classes extend it like any base (the
|
|
284
|
+
* lower-event-emitter.ts, and user classes extend it like any base (the
|
|
285
285
|
* emitted subclass struct embeds ScrEmitter's registry/name prefix —
|
|
286
286
|
* carried by the BACKEND, not by IR fields, so the fields list stays
|
|
287
287
|
* empty and subclass field layout starts right after the prefix). */
|
|
288
|
-
export declare function registerBuiltinEmitterClass(
|
|
288
|
+
export declare function registerBuiltinEmitterClass(lowerer: Lowerer): void;
|
|
289
289
|
/** The runtime-provided node:stream classes as eagerly-registered
|
|
290
290
|
* ClassInfos (the emitter story): mapType names `%Readable` et al the
|
|
291
291
|
* moment a stream type appears, so the infos must exist before any
|
|
@@ -294,7 +294,7 @@ export declare function registerBuiltinEmitterClass(L: Lowerer): void;
|
|
|
294
294
|
* unchanged; the stream method/property surface lowers through
|
|
295
295
|
* lower-stream.ts. No decl, no lowerable bodies, empty field lists —
|
|
296
296
|
* every instance is runtime-allocated (user `extends` is fenced). */
|
|
297
|
-
export declare function registerBuiltinStreamClasses(
|
|
297
|
+
export declare function registerBuiltinStreamClasses(lowerer: Lowerer): void;
|
|
298
298
|
/** The stream ClassInfo a VALUE symbol refers to (`new Readable(...)`,
|
|
299
299
|
* `x instanceof Writable`) — any import spelling resolves to the
|
|
300
300
|
* ambient class. Provenance: a stdlib-file CLASS declaration inside the
|
|
@@ -302,33 +302,25 @@ export declare function registerBuiltinStreamClasses(L: Lowerer): void;
|
|
|
302
302
|
* also types child stdio — under @types/node the childStream mapping
|
|
303
303
|
* keeps priority and the static stream classes stand down; the shipped
|
|
304
304
|
* fallback declarations are the supported surface). */
|
|
305
|
-
export declare function builtinStreamInfoOf(
|
|
305
|
+
export declare function builtinStreamInfoOf(lowerer: Lowerer, symbol: ts.Symbol | null | undefined): ClassInfo | null;
|
|
306
306
|
/** The emitter ClassInfo a VALUE symbol refers to (`new EventEmitter`,
|
|
307
307
|
* `extends EventEmitter`, `x instanceof EventEmitter`) — any import
|
|
308
308
|
* spelling (named/default/namespace member, CJS require) resolves to
|
|
309
309
|
* the ambient class. Provenance-checked like the error classes: only a
|
|
310
310
|
* stdlib-file declaration inside the "events" ambient module counts. */
|
|
311
|
-
export declare function builtinEmitterInfoOf(
|
|
311
|
+
export declare function builtinEmitterInfoOf(lowerer: Lowerer, symbol: ts.Symbol | null | undefined): ClassInfo | null;
|
|
312
312
|
/** The builtin error ClassInfo a VALUE symbol refers to (`new Error`,
|
|
313
313
|
* `extends TypeError`, `x instanceof RangeError`), or null. Provenance-
|
|
314
314
|
* checked: only the standard library's declarations count — a user's own
|
|
315
315
|
* `class Error` resolves through classBySymbol instead. */
|
|
316
|
-
export declare function builtinErrorInfoOf(
|
|
316
|
+
export declare function builtinErrorInfoOf(lowerer: Lowerer, symbol: ts.Symbol | null | undefined): ClassInfo | null;
|
|
317
317
|
/** The instance-method surface the runtime EventEmitter owns — subclass
|
|
318
318
|
* members with these names are fenced (collectClassShapeInner) and calls
|
|
319
|
-
* to them on emitter-rooted receivers lower through lower-emitter.ts. */
|
|
319
|
+
* to them on emitter-rooted receivers lower through lower-event-emitter.ts. */
|
|
320
320
|
export declare const EMITTER_API_MEMBERS: ReadonlySet<string>;
|
|
321
321
|
/** The decorators of a class-like or member node (they live in
|
|
322
322
|
* `modifiers` since TS 4.8). */
|
|
323
323
|
export declare function decoratorNodesOf(n: ts.Node): ts.Decorator[];
|
|
324
|
-
/** The AMBIENT name a decorator expression's evaluation throws on, or
|
|
325
|
-
* null. Node erases ambient declarations (`declare let dec: any`,
|
|
326
|
-
* `declare const instance: T`, `declare function dec<T>(t: T): T`), so
|
|
327
|
-
* reading the name is a ReferenceError. Factory spellings ride along —
|
|
328
|
-
* `@dec(...)` evaluates the CALLEE before any argument — and property
|
|
329
|
-
* chains throw at their ROOT (`@instance.decorate` reads `instance`
|
|
330
|
-
* first). */
|
|
331
|
-
export declare function ambientDecoratorThrowNameOf(L: Lowerer, dExpr: ts.Expression): string | null;
|
|
332
324
|
/** The guaranteed decoration THROW of a decorated class, or null. Walks
|
|
333
325
|
* the class definition's evaluation-order items — class decorators
|
|
334
326
|
* (source order), the heritage expression, then per member in body
|
|
@@ -340,12 +332,12 @@ export declare function ambientDecoratorThrowNameOf(L: Lowerer, dExpr: ts.Expres
|
|
|
340
332
|
* computed keys. Anything richer (factory calls over defined values,
|
|
341
333
|
* property-access reads, computed-key calls) stops the proof — the
|
|
342
334
|
* named fences answer instead. */
|
|
343
|
-
export declare function guaranteedDecorationThrow(
|
|
335
|
+
export declare function guaranteedDecorationThrow(lowerer: Lowerer, decl: ts.ClassLikeDeclaration): {
|
|
344
336
|
name: string;
|
|
345
337
|
node: ts.Decorator;
|
|
346
338
|
} | null;
|
|
347
|
-
export declare function collectClassShape(
|
|
348
|
-
export declare function collectClassShapeInner(
|
|
339
|
+
export declare function collectClassShape(lowerer: Lowerer, decl: ts.ClassDeclaration): void;
|
|
340
|
+
export declare function collectClassShapeInner(lowerer: Lowerer, decl: ts.ClassLikeDeclaration, jsNameOverride?: string, inst?: {
|
|
349
341
|
family: ClassInfo;
|
|
350
342
|
name: string;
|
|
351
343
|
bindings: Map<ts.Symbol, IrType>;
|
|
@@ -375,21 +367,14 @@ mixin?: {
|
|
|
375
367
|
* unmapped, the fenced-JS-class story. Null answers (unmappable type
|
|
376
368
|
* arguments, the instance cap, an uncollected family) make the whole
|
|
377
369
|
* reference unmappable — per-site diagnostics own the fence. */
|
|
378
|
-
export declare function genericClassInstanceType(
|
|
379
|
-
/** Runs a member-lowering thunk under an INSTANTIATION's type-parameter
|
|
380
|
-
* bindings (the generic-fn typeParamResolver mechanism) — the checker
|
|
381
|
-
* keeps reporting the unsubstituted `T`s inside the shared body AST.
|
|
382
|
-
* Coverage counts a generic class's statements once: only the FIRST
|
|
383
|
-
* instantiation contributes (the lowerGenericInstance rule). A no-op
|
|
384
|
-
* for ordinary classes. */
|
|
385
|
-
export declare function withInstanceBindings<T>(L: Lowerer, info: ClassInfo, fn: () => T): T;
|
|
370
|
+
export declare function genericClassInstanceType(lowerer: Lowerer, decl: ts.ClassLikeDeclaration, ref: ts.Type): IrType | null;
|
|
386
371
|
/** The `%init` statements for one class's static readonly fields AND
|
|
387
372
|
* static blocks, interleaved in member order — emitted at the class
|
|
388
373
|
* statement's source position (see lowerFileInit's merge), exactly when
|
|
389
374
|
* JS evaluates static initializers and blocks. Field failures poison per
|
|
390
375
|
* field, like fieldInitStmts; a block lowers as the block statement it
|
|
391
376
|
* is, so its statements poison individually inside lowerStmts. */
|
|
392
|
-
export declare function lowerStaticFieldInits(
|
|
377
|
+
export declare function lowerStaticFieldInits(lowerer: Lowerer, info: ClassInfo): IrStmt[];
|
|
393
378
|
/** Post-collection analysis of a decorated class (all shapes registered —
|
|
394
379
|
* a decorator's return type may name a subclass declared BELOW the
|
|
395
380
|
* class). Classifies every class-level decorator by its checker type:
|
|
@@ -407,22 +392,12 @@ export declare function lowerStaticFieldInits(L: Lowerer, info: ClassInfo): IrSt
|
|
|
407
392
|
* build time; the runtime base would be the decoration result) and
|
|
408
393
|
* namespace-nested declarations (qualified references resolve the class
|
|
409
394
|
* directly, not through the rebound value). */
|
|
410
|
-
export declare function analyzeClassDecoration(
|
|
411
|
-
/** The decoration statements of a decorated class — the %init code that
|
|
412
|
-
* runs at the class statement's position, BEFORE its static field
|
|
413
|
-
* initializers and blocks (lowerStaticFieldInits composes them; the
|
|
414
|
-
* lower-modules interleave places the whole bundle). Verified Node
|
|
415
|
-
* order: decorator expressions evaluate in SOURCE order (factories run
|
|
416
|
-
* here), then applications run in REVERSE member order over the class
|
|
417
|
-
* object, each replacing decorator's non-undefined result feeding the
|
|
418
|
-
* next application; the final value binds the class name (the mutable
|
|
419
|
-
* classval global) when any decorator can replace. */
|
|
420
|
-
export declare function lowerClassDecoration(L: Lowerer, info: ClassInfo): IrStmt[];
|
|
395
|
+
export declare function analyzeClassDecoration(lowerer: Lowerer, info: ClassInfo): void;
|
|
421
396
|
/** The nearest declaration of static member `name` at or above `info` —
|
|
422
397
|
* the compile-time prototype-chain walk (`D.x` reads C's global when C
|
|
423
398
|
* declared x and nothing between redeclares it; a redeclaration shadows
|
|
424
399
|
* with its OWN storage, exactly JS). */
|
|
425
|
-
export declare function findStaticOn(
|
|
400
|
+
export declare function findStaticOn(lowerer: Lowerer, info: ClassInfo | null, name: string): {
|
|
426
401
|
declarer: ClassInfo;
|
|
427
402
|
field: ClassInfo["staticFields"][number];
|
|
428
403
|
method?: undefined;
|
|
@@ -439,10 +414,10 @@ export declare function findStaticOn(L: Lowerer, info: ClassInfo | null, name: s
|
|
|
439
414
|
* the through-a-VALUE devirtualization test: a classval(info) slot can
|
|
440
415
|
* hold any descendant, and a shadowing redeclaration means the runtime
|
|
441
416
|
* class decides which storage answers. */
|
|
442
|
-
export declare function staticShadowBelow(
|
|
417
|
+
export declare function staticShadowBelow(lowerer: Lowerer, info: ClassInfo, name: string): boolean;
|
|
443
418
|
/** The nearest GENERIC static declaration of `name` at/above `info` —
|
|
444
419
|
* findStaticOn's twin over the genericStatics tables. */
|
|
445
|
-
export declare function findGenericStaticOn(
|
|
420
|
+
export declare function findGenericStaticOn(lowerer: Lowerer, info: ClassInfo | null, name: string): {
|
|
446
421
|
declarer: ClassInfo;
|
|
447
422
|
info: GenericFnInfo;
|
|
448
423
|
} | null;
|
|
@@ -454,20 +429,20 @@ export declare function findGenericStaticOn(L: Lowerer, info: ClassInfo | null,
|
|
|
454
429
|
* constructor (Error/EventEmitter/stream chains complete their `new`
|
|
455
430
|
* by special rules) — are named fences here. The constructor edge is
|
|
456
431
|
* noted at every classRef: a value can always be constructed through. */
|
|
457
|
-
export declare function classValueRef(
|
|
432
|
+
export declare function classValueRef(lowerer: Lowerer, info: ClassInfo, blame: ts.Node): IrExpr;
|
|
458
433
|
/** Constructor-ABI equality — the classval widening rule: a classval(D)
|
|
459
434
|
* value may flow into a classval(C) slot only when D's completed
|
|
460
435
|
* constructor signature equals C's (same count, modes, and ABI types),
|
|
461
436
|
* which is what keeps newValue completion against C's one signature
|
|
462
437
|
* sound for every value legally in the slot. */
|
|
463
|
-
export declare function ctorAbiEquals(
|
|
438
|
+
export declare function ctorAbiEquals(lowerer: Lowerer, sub: ClassInfo, sup: ClassInfo): boolean;
|
|
464
439
|
/** `C.x` where C is a class declared in the program and x a static
|
|
465
440
|
* member of its chain: field reads are the module global, static
|
|
466
441
|
* methods become interned closures, and `.name` folds to the class's
|
|
467
442
|
* compile-time name. Null for everything else — unresolved members
|
|
468
443
|
* fall through to the ordinary chain so the static fence or the
|
|
469
444
|
* generic member rejection names the site. */
|
|
470
|
-
export declare function lowerStaticFieldRead(
|
|
445
|
+
export declare function lowerStaticFieldRead(lowerer: Lowerer, expr: ts.PropertyAccessExpression): IrExpr | null;
|
|
471
446
|
/** A class EXPRESSION's ClassInfo: collection on first encounter (the
|
|
472
447
|
* declaration path over the shared ClassLikeDeclaration machinery, with
|
|
473
448
|
* NamedEvaluation supplying the runtime .name), idempotent per node —
|
|
@@ -479,7 +454,7 @@ export declare function lowerStaticFieldRead(L: Lowerer, expr: ts.PropertyAccess
|
|
|
479
454
|
* once. Statics-bearing expressions additionally restrict to positions
|
|
480
455
|
* where "immediately before the enclosing statement" IS the evaluation
|
|
481
456
|
* point (lowerFileInit drains pendingClassExprInits there). */
|
|
482
|
-
export declare function lowerClassExpressionInfo(
|
|
457
|
+
export declare function lowerClassExpressionInfo(lowerer: Lowerer, expr: ts.ClassExpression): ClassInfo;
|
|
483
458
|
/** `class {…}` in expression position: a class definition bound to no
|
|
484
459
|
* statement — once the static side is a value, the expression IS the
|
|
485
460
|
* definition plus a classRef over it. A DECORATED class expression
|
|
@@ -488,14 +463,14 @@ export declare function lowerClassExpressionInfo(L: Lowerer, expr: ts.ClassExpre
|
|
|
488
463
|
* ReferenceError, so it lowers to exactly that read — every evaluation
|
|
489
464
|
* throws identically, which is why the once-evaluated restriction and
|
|
490
465
|
* the member fences don't apply. */
|
|
491
|
-
export declare function lowerClassExpression(
|
|
466
|
+
export declare function lowerClassExpression(lowerer: Lowerer, expr: ts.ClassExpression): IrExpr;
|
|
492
467
|
/** The EXACT class a receiver expression is statically known to BE (not
|
|
493
468
|
* merely be typed by): the class name itself, or a `const` binding
|
|
494
469
|
* whose initializer is a class expression / class name. Such receivers
|
|
495
470
|
* can never hold a subclass at runtime, so static WRITES through them
|
|
496
471
|
* hit the declaring class's storage exactly (the shadowing hazards of
|
|
497
472
|
* general class values don't arise). Null for everything else. */
|
|
498
|
-
export declare function exactClassOfReceiver(
|
|
473
|
+
export declare function exactClassOfReceiver(lowerer: Lowerer, expr: ts.Expression): ClassInfo | null;
|
|
499
474
|
/** The class a PROPERTY-ASSIGNMENT binding pins — the salsa/CJS
|
|
500
475
|
* declaration forms of a class expression: `Common.I = class {…}`
|
|
501
476
|
* (expando members of a plain object), `exports.I = class {…}` /
|
|
@@ -511,7 +486,7 @@ export declare function exactClassOfReceiver(L: Lowerer, expr: ts.Expression): C
|
|
|
511
486
|
* fence names it. Collection is on demand and idempotent
|
|
512
487
|
* (lowerClassExpressionInfo), so resolution order between files and
|
|
513
488
|
* passes never matters. */
|
|
514
|
-
export declare function propertyAssignedClassInfoOf(
|
|
489
|
+
export declare function propertyAssignedClassInfoOf(lowerer: Lowerer, symbol: ts.Symbol | null | undefined): ClassInfo | null;
|
|
515
490
|
/** `C.m(args)` / `X.m(args)` — static method calls, on the class name
|
|
516
491
|
* directly or through a class VALUE. Resolution walks the chain
|
|
517
492
|
* (nearest declarer, the compile-time prototype chain); through a
|
|
@@ -521,7 +496,7 @@ export declare function propertyAssignedClassInfoOf(L: Lowerer, symbol: ts.Symbo
|
|
|
521
496
|
* global and calls through the value. Null when the receiver isn't a
|
|
522
497
|
* class name/value or the member doesn't resolve (the fences name the
|
|
523
498
|
* site downstream). */
|
|
524
|
-
export declare function lowerStaticMethodCall(
|
|
499
|
+
export declare function lowerStaticMethodCall(lowerer: Lowerer, call: ts.CallExpression, access: ts.PropertyAccessExpression): IrExpr | null;
|
|
525
500
|
/** Static member access through a class VALUE (`X.m` where X is
|
|
526
501
|
* classval-typed): devirtualized — the member resolves against the
|
|
527
502
|
* static class's chain, exact when no strict descendant redeclares it
|
|
@@ -529,10 +504,10 @@ export declare function lowerStaticMethodCall(L: Lowerer, call: ts.CallExpressio
|
|
|
529
504
|
* genuinely dynamic member: the class.name libCall reads the runtime
|
|
530
505
|
* class object's stored name. Null when the receiver isn't a class
|
|
531
506
|
* value or the member doesn't resolve. */
|
|
532
|
-
export declare function lowerClassValueProperty(
|
|
507
|
+
export declare function lowerClassValueProperty(lowerer: Lowerer, expr: ts.PropertyAccessExpression): IrExpr | null;
|
|
533
508
|
/** The nearest declaration of `name` at or above `info` — the method a
|
|
534
509
|
* receiver of that static class runs when nothing below overrides it. */
|
|
535
|
-
export declare function findMethodOn(
|
|
510
|
+
export declare function findMethodOn(lowerer: Lowerer, info: ClassInfo | null, name: string): {
|
|
536
511
|
declarer: ClassInfo;
|
|
537
512
|
sig: {
|
|
538
513
|
params: ParamShape[];
|
|
@@ -546,35 +521,30 @@ export declare function findMethodOn(L: Lowerer, info: ClassInfo | null, name: s
|
|
|
546
521
|
};
|
|
547
522
|
} | null;
|
|
548
523
|
/** True when `sub` is a STRICT descendant of `sup` in the class graph. */
|
|
549
|
-
export declare function isSubclassOf(
|
|
524
|
+
export declare function isSubclassOf(lowerer: Lowerer, sub: string, sup: string): boolean;
|
|
550
525
|
/** In an extends-hierarchy (as base or derived): the class carries a
|
|
551
526
|
* vtable and participates in dynamic instanceof; standalone classes keep
|
|
552
527
|
* their exact pre-inheritance layout and behavior. */
|
|
553
|
-
export declare function inHierarchy(
|
|
528
|
+
export declare function inHierarchy(lowerer: Lowerer, info: ClassInfo): boolean;
|
|
554
529
|
/** True when some STRICT descendant of `info` declares `name` with a BODY
|
|
555
530
|
* — the whole-program devirtualization test: a call through this static
|
|
556
531
|
* class can reach a distinct implementation, so it must dispatch
|
|
557
532
|
* dynamically. Abstract re-declarations don't count (they carry no
|
|
558
533
|
* implementation; the concrete ones below them do, via the recursion). */
|
|
559
|
-
export declare function overrideBelow(
|
|
534
|
+
export declare function overrideBelow(lowerer: Lowerer, info: ClassInfo, name: string): boolean;
|
|
560
535
|
/** The nearest GENERIC-method declaration of `name` at/above `info` —
|
|
561
536
|
* findMethodOn's twin over the genericMethods tables. */
|
|
562
|
-
export declare function findGenericMethodOn(
|
|
537
|
+
export declare function findGenericMethodOn(lowerer: Lowerer, info: ClassInfo | null, name: string): {
|
|
563
538
|
declarer: ClassInfo;
|
|
564
539
|
info: GenericFnInfo;
|
|
565
540
|
} | null;
|
|
566
|
-
/** True when some STRICT descendant of `info` re-declares the generic
|
|
567
|
-
* method `name` — overrideBelow's twin: generic methods have no vtable
|
|
568
|
-
* slot, so a call that could reach an override compiles only when the
|
|
569
|
-
* receiver's runtime class is statically exact. */
|
|
570
|
-
export declare function genericOverrideBelow(L: Lowerer, info: ClassInfo, name: string): boolean;
|
|
571
541
|
/** The receiver's EXACT runtime class, when the expression proves it: a
|
|
572
542
|
* `new C(...)` expression directly, or a const binding initialized with
|
|
573
543
|
* one (the binding can never be reassigned to a subclass instance).
|
|
574
544
|
* The class is read off the mapped INITIALIZER type — a `const b: Base =
|
|
575
545
|
* new D()` receiver is exactly D, not its annotation. Distinct from
|
|
576
546
|
* exactClassOfReceiver, which answers for CLASS-VALUE receivers. */
|
|
577
|
-
export declare function exactInstanceClassOf(
|
|
547
|
+
export declare function exactInstanceClassOf(lowerer: Lowerer, expr: ts.Expression): ClassInfo | null;
|
|
578
548
|
/** `const r: Repo = new MemRepo()` where EVERY member of the annotation's
|
|
579
549
|
* checker type is a generic-callable method (`interface Repo { get<T>(id:
|
|
580
550
|
* string): T }`): the record shape maps EMPTY — generic members are
|
|
@@ -587,7 +557,7 @@ export declare function exactInstanceClassOf(L: Lowerer, expr: ts.Expression): C
|
|
|
587
557
|
* and uses that want the empty record width-coerce at the use site.
|
|
588
558
|
* Const + direct `new` only — a reassignable binding or a produced
|
|
589
559
|
* value keeps today's record story and its fences. */
|
|
590
|
-
export declare function genericIfaceBindingKeepsClass(
|
|
560
|
+
export declare function genericIfaceBindingKeepsClass(lowerer: Lowerer, decl: ts.VariableDeclaration, declaredType: IrType): boolean;
|
|
591
561
|
/** `recv.m<T>(args)` — a GENERIC method call, dispatched STATICALLY: the
|
|
592
562
|
* checker's resolved signature (type arguments substituted, inferred or
|
|
593
563
|
* explicit) keys one instantiation of the nearest declarer's body, and
|
|
@@ -596,19 +566,19 @@ export declare function genericIfaceBindingKeepsClass(L: Lowerer, decl: ts.Varia
|
|
|
596
566
|
* runtime class could OVERRIDE the method (genericOverrideBelow) must be
|
|
597
567
|
* statically exact (exactInstanceClassOf) — the override set then
|
|
598
568
|
* resolves at compile time — or fences by name. */
|
|
599
|
-
export declare function lowerClassGenericMethodCall(
|
|
569
|
+
export declare function lowerClassGenericMethodCall(lowerer: Lowerer, call: ts.CallExpression, access: ts.PropertyAccessExpression, recvInfo: ClassInfo, found: {
|
|
600
570
|
declarer: ClassInfo;
|
|
601
571
|
info: GenericFnInfo;
|
|
602
572
|
}, recvIr?: IrExpr): IrExpr;
|
|
603
573
|
/** Wraps a derived-class expression in an upcast when the target base
|
|
604
574
|
* class differs (a no-op reinterpret at runtime; keeps IR types exact). */
|
|
605
|
-
export declare function upcastTo(
|
|
606
|
-
export declare function lowerClassMembers(
|
|
575
|
+
export declare function upcastTo(lowerer: Lowerer, expr: IrExpr, className: string): IrExpr;
|
|
576
|
+
export declare function lowerClassMembers(lowerer: Lowerer, info: ClassInfo): IrFunction[];
|
|
607
577
|
/** The constructor function `%C.constructor`. Synthesized when absent: a
|
|
608
578
|
* base class runs just its field initializers; a derived class inherits
|
|
609
579
|
* the base's signature — forward every param to super(), then run own
|
|
610
580
|
* field initializers. */
|
|
611
|
-
export declare function lowerClassCtor(
|
|
581
|
+
export declare function lowerClassCtor(lowerer: Lowerer, info: ClassInfo): IrFunction;
|
|
612
582
|
/** The lowered method-map name of a class member: identifier text, a
|
|
613
583
|
* COMPUTED name that folds to one compile-time string
|
|
614
584
|
* (foldedStringKeyOf — the object-literal computed-key machinery
|
|
@@ -618,7 +588,7 @@ export declare function lowerClassCtor(L: Lowerer, info: ClassInfo): IrFunction;
|
|
|
618
588
|
* accessor "get:x" convention; for-of, spreads, and array destructuring
|
|
619
589
|
* dispatch to it through the iterator protocol). Null for genuinely
|
|
620
590
|
* runtime-keyed names — the computed-member fences stay. */
|
|
621
|
-
export declare function classMemberNameOf(
|
|
591
|
+
export declare function classMemberNameOf(lowerer: Lowerer, name: ts.PropertyName): string | null;
|
|
622
592
|
/** A class type's ITERATOR PROTOCOL shape, statically resolved: the
|
|
623
593
|
* receiver declares (or inherits) `[Symbol.iterator]()` (the
|
|
624
594
|
* "sym:iterator" method slot) returning a class whose zero-parameter
|
|
@@ -647,12 +617,12 @@ export interface ClassIteratorInfo {
|
|
|
647
617
|
/** False: no done field — the protocol never terminates. */
|
|
648
618
|
hasDone: boolean;
|
|
649
619
|
}
|
|
650
|
-
export declare function classIteratorOf(
|
|
620
|
+
export declare function classIteratorOf(lowerer: Lowerer, t: IrType): ClassIteratorInfo | null;
|
|
651
621
|
/** The `it.next()` step of a class iterator as an ordinary (possibly
|
|
652
622
|
* virtual) method call. */
|
|
653
|
-
export declare function classIteratorNextCall(
|
|
623
|
+
export declare function classIteratorNextCall(lowerer: Lowerer, cit: ClassIteratorInfo, itRef: IrExpr, loc: SrcLoc): IrExpr;
|
|
654
624
|
/** `recv[Symbol.iterator]()` as an ordinary method call. */
|
|
655
|
-
export declare function classIteratorOpenCall(
|
|
625
|
+
export declare function classIteratorOpenCall(lowerer: Lowerer, cit: ClassIteratorInfo, recv: IrExpr, loc: SrcLoc): IrExpr;
|
|
656
626
|
/** `[...new C]` / `f(...new C)` over a CLASS ITERABLE: the eager drain —
|
|
657
627
|
* an interned `%iter.drain.<n>(recv)` lifted function running the
|
|
658
628
|
* whole protocol into a fresh element array (a doneless iterator loops
|
|
@@ -662,15 +632,15 @@ export declare function classIteratorOpenCall(L: Lowerer, cit: ClassIteratorInfo
|
|
|
662
632
|
* `(number | symbol)[]`) pushes each value wrapped into its arm. Null
|
|
663
633
|
* when the value isn't a recognized class iterable or the element
|
|
664
634
|
* doesn't coerce — spread fences stay. */
|
|
665
|
-
export declare function classIteratorDrainCall(
|
|
635
|
+
export declare function classIteratorDrainCall(lowerer: Lowerer, src: IrExpr, loc: SrcLoc, elemT?: IrType): IrExpr | null;
|
|
666
636
|
/** The tail of a class iterable's protocol from an already-open ITERATOR
|
|
667
637
|
* object (`var [a, ...rest] = new C` — the rest element drains whatever
|
|
668
638
|
* next() still yields): the drain loop keyed by the iterator class. */
|
|
669
|
-
export declare function classIteratorRestDrainCall(
|
|
639
|
+
export declare function classIteratorRestDrainCall(lowerer: Lowerer, cit: ClassIteratorInfo, itVal: IrExpr, loc: SrcLoc): IrExpr;
|
|
670
640
|
/** One method or accessor body as its module function `%C.name`
|
|
671
641
|
* (accessors are methods with property syntax: "get:x"/"set:x" entries —
|
|
672
642
|
* see collectClassShape). */
|
|
673
|
-
export declare function lowerClassMethodMember(
|
|
643
|
+
export declare function lowerClassMethodMember(lowerer: Lowerer, info: ClassInfo, fnLike: ts.MethodDeclaration | ts.AccessorDeclaration): IrFunction | null;
|
|
674
644
|
/** One static method body as its module function `%C.static:m` — an
|
|
675
645
|
* ordinary function with NO `this` param. `this` and `super` inside
|
|
676
646
|
* name the RECEIVER class in JS (dynamic — `F.who()` sees F even when
|
|
@@ -678,34 +648,17 @@ export declare function lowerClassMethodMember(L: Lowerer, info: ClassInfo, fnLi
|
|
|
678
648
|
* named fences, with arrow functions transparent (they inherit the
|
|
679
649
|
* method's `this`) and this-binding function forms opaque — the static-
|
|
680
650
|
* block rule verbatim. */
|
|
681
|
-
export declare function lowerStaticMethod(
|
|
651
|
+
export declare function lowerStaticMethod(lowerer: Lowerer, info: ClassInfo, name: string): IrFunction | null;
|
|
682
652
|
/** A synthesized throwing setter: a getter-only override shadows the
|
|
683
653
|
* inherited pair (JS), so a base-typed write dispatches HERE and must
|
|
684
654
|
* throw exactly like Node's TypeError — a real instance (a typed catch's
|
|
685
655
|
* `e instanceof TypeError` matches), catchable, exit 1 uncaught (message
|
|
686
656
|
* text is compiler-worded; stdout and exit code are the contract). */
|
|
687
|
-
export declare function throwingSetterFn(
|
|
688
|
-
/** The base a constructor chain actually CALLS into: generic FAMILIES are
|
|
689
|
-
* never constructed (no `%<family>.constructor` exists), so an
|
|
690
|
-
* instantiation's construction-relevant base is the family's own base —
|
|
691
|
-
* null when the generic class extends nothing, exactly the source's
|
|
692
|
-
* story (tsc forbids super() there). Ordinary classes answer their base
|
|
693
|
-
* unchanged. */
|
|
694
|
-
export declare function superBaseOf(info: ClassInfo): ClassInfo | null;
|
|
657
|
+
export declare function throwingSetterFn(lowerer: Lowerer, info: ClassInfo, prop: string): IrFunction;
|
|
695
658
|
/** The class's OWN field initializers as fieldSet statements (declaration
|
|
696
659
|
* order) — a base constructor's prologue, a derived constructor's
|
|
697
660
|
* super()-return continuation. */
|
|
698
|
-
export declare function fieldInitStmts(
|
|
699
|
-
/** PARAMETER-PROPERTY assignments (`this.x = x`, synthesized): run AFTER
|
|
700
|
-
* the field initializers — Node's transform defines the fields at the
|
|
701
|
-
* top of the class body (undefined until assigned) and injects the
|
|
702
|
-
* assignments at the start of the constructor body, i.e. after super()
|
|
703
|
-
* and after the (native) field initializers ran (probed: a field
|
|
704
|
-
* initializer reading `this.x` sees undefined; the body sees the value).
|
|
705
|
-
* Each assignment reads the parameter's BODY local (defaults already
|
|
706
|
-
* applied by the declareParams prologue), whose type the collection made
|
|
707
|
-
* the field's type — slot-exact by construction. */
|
|
708
|
-
export declare function paramPropInitStmts(L: Lowerer, info: ClassInfo, thisLocal: IrLocal): IrStmt[];
|
|
661
|
+
export declare function fieldInitStmts(lowerer: Lowerer, info: ClassInfo, thisLocal: IrLocal): IrStmt[];
|
|
709
662
|
/** A derived constructor's body: statements lower as usual EXCEPT the
|
|
710
663
|
* top-level `super(...)` statement, which becomes a direct call to the
|
|
711
664
|
* base constructor over the same `this`, immediately followed by this
|
|
@@ -713,7 +666,7 @@ export declare function paramPropInitStmts(L: Lowerer, info: ClassInfo, thisLoca
|
|
|
713
666
|
* guarantees a super call exists and runs before any this-use; the
|
|
714
667
|
* supported form is a top-level expression statement — anywhere else
|
|
715
668
|
* (conditionals, expression positions) is rejected, not misordered. */
|
|
716
|
-
export declare function lowerDerivedCtorBody(
|
|
669
|
+
export declare function lowerDerivedCtorBody(lowerer: Lowerer, info: ClassInfo, thisLocal: IrLocal,
|
|
717
670
|
/** Mixin forwarding-constructor mode: `super(...args)` forwards these
|
|
718
671
|
* pre-declared synthetic params directly (the spread never lowers —
|
|
719
672
|
* the base's ABI is this constructor's ABI). */
|
|
@@ -721,59 +674,43 @@ forward?: IrExpr[]): IrStmt[];
|
|
|
721
674
|
/** `super(args)` → direct call of the base constructor with the SAME
|
|
722
675
|
* `this` (upcast; retained by the varRef read — the callee owns and
|
|
723
676
|
* releases its param per the universal convention). */
|
|
724
|
-
export declare function superCallStmt(
|
|
677
|
+
export declare function superCallStmt(lowerer: Lowerer, info: ClassInfo, thisLocal: IrLocal, args: IrExpr[], loc: SrcLoc): IrStmt;
|
|
725
678
|
/** `super.method(args)`: the base chain's implementation, called
|
|
726
679
|
* DIRECTLY over this method's own `this` (upcast to the declarer) —
|
|
727
680
|
* super dispatch is static in JS too, never through the dynamic class. */
|
|
728
|
-
export declare function lowerSuperMethodCall(
|
|
681
|
+
export declare function lowerSuperMethodCall(lowerer: Lowerer, call: ts.CallExpression, access: ts.PropertyAccessExpression): IrExpr;
|
|
729
682
|
/** The `this` reference for super accessor reads/writes, with the shared
|
|
730
683
|
* validity checks (derived-class body, resolvable this). */
|
|
731
|
-
export declare function superThisRef(
|
|
684
|
+
export declare function superThisRef(lowerer: Lowerer, access: ts.PropertyAccessExpression): {
|
|
732
685
|
thisRef: IrExpr;
|
|
733
686
|
base: ClassInfo;
|
|
734
687
|
};
|
|
735
688
|
/** `super.x` read: a DIRECT call of the base chain's getter over this
|
|
736
689
|
* method's own `this` (upcast to the declarer) — like super.method(),
|
|
737
690
|
* never through the vtable. */
|
|
738
|
-
export declare function lowerSuperAccessorRead(
|
|
691
|
+
export declare function lowerSuperAccessorRead(lowerer: Lowerer, access: ts.PropertyAccessExpression): IrExpr;
|
|
739
692
|
/** `super.x = v`: a DIRECT call of the base chain's setter (same
|
|
740
693
|
* static-dispatch rule as every super member access). */
|
|
741
|
-
export declare function lowerSuperAccessorWrite(
|
|
694
|
+
export declare function lowerSuperAccessorWrite(lowerer: Lowerer, access: ts.PropertyAccessExpression, rhs: ts.Expression, loc: SrcLoc): IrStmt;
|
|
742
695
|
/** True when `info`'s EFFECTIVE constructor — its own, or the one
|
|
743
696
|
* inherited through ctor-less bases — is a builtin error class's. Such
|
|
744
697
|
* classes construct with the error message rule, and their synthesized
|
|
745
698
|
* constructors forward one plain string to error.ctor. */
|
|
746
|
-
export declare function inheritsBuiltinErrorCtor(
|
|
699
|
+
export declare function inheritsBuiltinErrorCtor(lowerer: Lowerer, info: ClassInfo): boolean;
|
|
747
700
|
/** The EventEmitter twin: a ctor-less chain into the emitter base
|
|
748
701
|
* inherits `new C()` — zero arguments (the options bag fences). */
|
|
749
|
-
export declare function inheritsBuiltinEmitterCtor(
|
|
750
|
-
/** The stream twin: a ctor-less chain into a runtime stream base
|
|
751
|
-
* inherits `new C()` — zero arguments (the synthesized constructor runs
|
|
752
|
-
* super() with default options; passing options through an inherited
|
|
753
|
-
* constructor would need the literal at the new-site to plumb, so it
|
|
754
|
-
* asks for a declared constructor instead). */
|
|
755
|
-
export declare function inheritsBuiltinStreamCtor(L: Lowerer, info: ClassInfo): boolean;
|
|
702
|
+
export declare function inheritsBuiltinEmitterCtor(lowerer: Lowerer, info: ClassInfo): boolean;
|
|
756
703
|
/** `new C(args)` for a class declared in the program (imports resolve
|
|
757
704
|
* through aliases, so cross-module classes construct too). */
|
|
758
705
|
/** The single message argument of a builtin Error construction or
|
|
759
706
|
* super() call: "" when omitted or explicitly undefined (Node's message
|
|
760
707
|
* property default), the string otherwise. The lib signature's second
|
|
761
708
|
* parameter (options/cause) has no lowering. */
|
|
762
|
-
export declare function errorMessageArg(
|
|
763
|
-
|
|
764
|
-
* the binding never initializes (the %init ReferenceError unwinds first),
|
|
765
|
-
* so `new`, the class as a value, and `extends` all fence — reaching one
|
|
766
|
-
* in compiled code would require executing past the throw. */
|
|
767
|
-
export declare function fenceDecorationThrows(L: Lowerer, info: ClassInfo, blame: ts.Node): void;
|
|
768
|
-
export declare function lowerNew(L: Lowerer, expr: ts.NewExpression): IrExpr;
|
|
709
|
+
export declare function errorMessageArg(lowerer: Lowerer, args: readonly ts.Expression[], loc: SrcLoc, blame: ts.Node): IrExpr;
|
|
710
|
+
export declare function lowerNew(lowerer: Lowerer, expr: ts.NewExpression): IrExpr;
|
|
769
711
|
/** A getter/setter invocation over an accessor target's receiver — the
|
|
770
712
|
* same whole-program devirtualization as method calls: a virtualCall
|
|
771
713
|
* when some strict subclass of the receiver's static class overrides
|
|
772
714
|
* this HALF of the accessor (get and set devirtualize independently),
|
|
773
715
|
* a direct call of the nearest declaration otherwise. */
|
|
774
|
-
export declare function accessorCall(
|
|
775
|
-
/** The generic function-like INITIALIZER behind a class FIELD —
|
|
776
|
-
* `time = async <T>(...) => {...}` or `= function g<T>(...) {...}`
|
|
777
|
-
* (parens stripped): bindingGenericFnNodeOf's shape rule, member form.
|
|
778
|
-
* Null when the field isn't that shape. */
|
|
779
|
-
export declare function genericFieldFnNodeOf(member: ts.PropertyDeclaration): ts.FunctionExpression | ts.ArrowFunction | null;
|
|
716
|
+
export declare function accessorCall(lowerer: Lowerer, className: string, member: string, obj: IrExpr, extraArgs: IrExpr[], ret: IrType, loc: SrcLoc): IrExpr;
|