@scriptc/compiler 0.0.34 → 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/split.d.ts +43 -0
- package/dist/backend/llvm/split.js +227 -0
- package/dist/backend/llvm/split.js.map +1 -0
- package/dist/backend/llvm/split.test.d.ts +1 -0
- package/dist/backend/llvm/split.test.js +102 -0
- package/dist/backend/llvm/split.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.d.ts +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} +139 -47
- package/dist/backend/{cc.js → native-toolchain.js} +1008 -910
- 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} +1297 -127
- package/dist/backend/native-toolchain.test.js.map +1 -0
- package/dist/backend/object-localize.js +1 -1
- package/dist/backend/object-localize.test.js +20 -0
- package/dist/backend/object-localize.test.js.map +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/executable-cache.d.ts +86 -0
- package/dist/executable/executable-cache.js +398 -0
- package/dist/executable/executable-cache.js.map +1 -0
- package/dist/executable/executable-cache.test.d.ts +1 -0
- package/dist/executable/executable-cache.test.js +300 -0
- package/dist/executable/executable-cache.test.js.map +1 -0
- package/dist/ffi/{profile.d.ts → ffi-manifest.d.ts} +7 -2
- package/dist/ffi/{profile.js → ffi-manifest.js} +2 -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 +1126 -1234
- 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 +1409 -1494
- 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 +1394 -1715
- 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 +1644 -1704
- 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 +440 -511
- 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 +86 -86
- 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 +1176 -1229
- 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 +66 -20
- package/dist/frontend/lowering/lowerer.js +421 -198
- 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 +64 -64
- 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 +51 -17
- 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.d.ts +40 -2
- package/dist/frontend/ts7/checker.js +182 -54
- 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} +31 -52
- 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 +115 -30
- package/dist/index.js +650 -146
- 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} +60 -26
- package/dist/ir/{nodes.js → ir.js} +173 -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 +16 -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/compiler-self-identity.d.ts +23 -0
- package/dist/library/compiler-self-identity.js +84 -0
- 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} +37 -111
- 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 +6 -0
- package/dist/startup-cache.js +6 -0
- package/dist/startup-cache.js.map +1 -0
- package/package.json +7 -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/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/profile.js.map +0 -1
- /package/dist/backend/{cc-cache.test.d.ts → c/types.test.d.ts} +0 -0
- /package/dist/{library/early-cache.test.d.ts → backend/llvm/shapes.test.d.ts} +0 -0
- /package/dist/frontend/ts7/{program.d.ts → program-adapter.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,
|
|
3
|
+
import { IrExpr, IrStmt, IrType, SrcLoc } from "../../ir/ir.js";
|
|
4
4
|
/** --provenance-sources: true when `decl` is a declarator of a
|
|
5
5
|
* pureAnnotatedDeadConst statement in a FETCHED SOURCE module whose
|
|
6
6
|
* declared type has no static mapping — the declaration ELIDES: no
|
|
@@ -17,12 +17,12 @@ import { IrExpr, IrLocal, IrStmt, IrType, SrcLoc } from "../../ir/nodes.js";
|
|
|
17
17
|
* collectGlobals and lowerVarDecl gate on this, BEFORE the mixin/alias
|
|
18
18
|
* probes that would otherwise claim (and diagnose) the call-initializer
|
|
19
19
|
* shape. */
|
|
20
|
-
export declare function provenanceElidedConstDecl(
|
|
20
|
+
export declare function provenanceElidedConstDecl(lowerer: Lowerer, decl: ts.VariableDeclaration): boolean;
|
|
21
21
|
/** Lowers statements, one poison catch per statement so one unsupported
|
|
22
22
|
* construct doesn't hide the rest of the file's diagnostics. A single
|
|
23
23
|
* source statement may expand to several IR statements (multi-declaration
|
|
24
24
|
* `let a = 1, b = a + 1;`) but is counted once. */
|
|
25
|
-
export declare function lowerStmts(
|
|
25
|
+
export declare function lowerStmts(lowerer: Lowerer, stmts: readonly ts.Statement[]): IrStmt[];
|
|
26
26
|
/** The hoisted-handler shape: a function declared BEFORE a const it
|
|
27
27
|
* captures, in the same (or an enclosing) statement list —
|
|
28
28
|
*
|
|
@@ -41,18 +41,18 @@ export declare function lowerStmts(L: Lowerer, stmts: readonly ts.Statement[]):
|
|
|
41
41
|
* test the box and throw Node's exact catchable ReferenceError while it
|
|
42
42
|
* is empty. CONST ONLY: `let` would need the same trap on writes, a
|
|
43
43
|
* surface nothing yet needs. */
|
|
44
|
-
export declare function predeclareForwardCapture(
|
|
44
|
+
export declare function predeclareForwardCapture(lowerer: Lowerer, symbol: ts.Symbol): boolean;
|
|
45
45
|
/** The FUNCTION-DECLARATION twin of predeclareForwardCapture: JS hoists a
|
|
46
46
|
* nested `function f() {}` to scope entry — the binding is LIVE from the
|
|
47
47
|
* first statement, so a reference lexically above the declaration in the
|
|
48
48
|
* SAME function lowers the declaration eagerly at the reference (varDecl
|
|
49
49
|
* pushed before the current statement's IR, registered in the list's
|
|
50
50
|
* scope frame) and the statement loop skips the source statement when it
|
|
51
|
-
* arrives (
|
|
51
|
+
* arrives (lowerer.hoistedFnDecls). Same-function only: the declaration's own
|
|
52
52
|
* lowering runs under the ctx that owns its statement list, and a
|
|
53
53
|
* cross-function early capture would need lowering under a DIFFERENT
|
|
54
54
|
* ctx than the one currently open — that shape keeps the honest fence. */
|
|
55
|
-
export declare function predeclareForwardFnDecl(
|
|
55
|
+
export declare function predeclareForwardFnDecl(lowerer: Lowerer, symbol: ts.Symbol): boolean;
|
|
56
56
|
/** True when `decl` (a variable declaration or a pattern name inside one)
|
|
57
57
|
* was declared with `var` — no const/let/using flag anywhere on its
|
|
58
58
|
* binding chain. */
|
|
@@ -64,32 +64,10 @@ export declare function isVarDeclared(decl: ts.Node): boolean;
|
|
|
64
64
|
* iteration), and it persists after the loop. Returns the write target
|
|
65
65
|
* (a module global for top-level loops, the hoisted function slot
|
|
66
66
|
* otherwise); null when the binding isn't a `var` identifier. */
|
|
67
|
-
export declare function forOfVarTarget(
|
|
67
|
+
export declare function forOfVarTarget(lowerer: Lowerer, decl: ts.VariableDeclaration): {
|
|
68
68
|
id: string;
|
|
69
69
|
type: IrType;
|
|
70
70
|
} | null;
|
|
71
|
-
/** `var` declarations hoist to their FUNCTION: the binding exists across
|
|
72
|
-
* the whole enclosing function body regardless of block position, and
|
|
73
|
-
* every same-name `var` in that function is the SAME binding (tsc merges
|
|
74
|
-
* the declarations into one symbol, so symbol-keyed resolution gets the
|
|
75
|
-
* merge for free). This mints the one function-scoped slot on first
|
|
76
|
-
* encounter: an IrLocal registered in the function's ROOT scope frame
|
|
77
|
-
* (never popped by block exits) whose `varDecl` is PUSHED into the
|
|
78
|
-
* function-root statement list at the current position — everything
|
|
79
|
-
* already lowered never referenced the symbol (resolution would have
|
|
80
|
-
* found it), so the position is observationally function entry. Types
|
|
81
|
-
* with an undefined arm initialize to the interned undefined (JS's
|
|
82
|
-
* hoisted value — reads before the first assignment are `undefined`, and
|
|
83
|
-
* tsc's flow analysis rejects such reads for every OTHER type); the rest
|
|
84
|
-
* start empty, their pre-assignment reads impossible by that analysis.
|
|
85
|
-
* A `var` merging with a PARAMETER of the same name (one symbol in JS
|
|
86
|
-
* and in tsc's binder) resolves to the parameter's slot — `var x = 2`
|
|
87
|
-
* simply overwrites the argument, exactly Node. The source declaration
|
|
88
|
-
* lowers to a plain `assign` (see lowerVarDecl), so a declaration inside
|
|
89
|
-
* a loop re-ASSIGNS the one binding per pass and never resets it — the
|
|
90
|
-
* classic capture semantics fall out: closures made in a loop share the
|
|
91
|
-
* single boxed binding, where `let` gets a fresh box per iteration. */
|
|
92
|
-
export declare function hoistVarBinding(L: Lowerer, symbol: ts.Symbol, nameNode: ts.Identifier): IrLocal;
|
|
93
71
|
/** The forward twin of hoistVarBinding, entered from resolution failure: a
|
|
94
72
|
* reference to a `var` whose declaration statement has not lowered yet —
|
|
95
73
|
* a read/write lexically above the declaration in the same function
|
|
@@ -103,22 +81,22 @@ export declare function hoistVarBinding(L: Lowerer, symbol: ts.Symbol, nameNode:
|
|
|
103
81
|
* a slot of a narrower type has no bit pattern for the `undefined` Node
|
|
104
82
|
* would yield if the capture ran early, and guessing "it won't" is the
|
|
105
83
|
* silent-wrong-output sin. */
|
|
106
|
-
export declare function predeclareForwardVar(
|
|
84
|
+
export declare function predeclareForwardVar(lowerer: Lowerer, symbol: ts.Symbol): boolean;
|
|
107
85
|
/** Records the symbols a poisoned DECLARATION statement would have bound
|
|
108
86
|
* (identifier and pattern names alike, for-initializers included) so
|
|
109
87
|
* later references report the SC2004 cascade. Registered bindings win:
|
|
110
88
|
* lowerVarDecl's salvage path declares the local when it can, and
|
|
111
89
|
* resolution checks locals/globals before the fallthroughs consult
|
|
112
90
|
* blockedBindings. */
|
|
113
|
-
export declare function noteBlockedBindings(
|
|
91
|
+
export declare function noteBlockedBindings(lowerer: Lowerer, stmt: ts.Statement): void;
|
|
114
92
|
/** True when a reference/assignment fell through resolution because the
|
|
115
93
|
* binding's DECLARATION never compiled: a poisoned declaration statement
|
|
116
94
|
* (blockedBindings) or a deferred-diagnostic declaration (a blocked
|
|
117
95
|
* signature/class/global — deferred now, flushed earlier this pass, or
|
|
118
96
|
* flushed by the emit pass). */
|
|
119
|
-
export declare function isBlockedBinding(
|
|
97
|
+
export declare function isBlockedBinding(lowerer: Lowerer, symbol: ts.Symbol | null): boolean;
|
|
120
98
|
/** Lowers a statement in a fresh lexical scope (if/while/for bodies). */
|
|
121
|
-
export declare function lowerScopedBlock(
|
|
99
|
+
export declare function lowerScopedBlock(lowerer: Lowerer, stmt: ts.Statement): IrStmt[];
|
|
122
100
|
/** The finally fences. `return` crossing OUT of a try/catch body guarded
|
|
123
101
|
* by a finally is SUPPORTED now (the backend's pending-return path runs
|
|
124
102
|
* every crossed finally inner-to-outer before the function returns, the
|
|
@@ -133,30 +111,15 @@ export declare function lowerScopedBlock(L: Lowerer, stmt: ts.Statement): IrStmt
|
|
|
133
111
|
* jump walks outward past every construct (labeled targets can be
|
|
134
112
|
* arbitrarily far out) until the entry carrying its label, applying the
|
|
135
113
|
* same finally fences to everything crossed on the way. */
|
|
136
|
-
export declare function rejectJumpCrossingFinally(
|
|
137
|
-
|
|
138
|
-
* list (`a: b: while ...` — both names target the same loop, JS-exact).
|
|
139
|
-
* Loops and switches take the labels DIRECTLY (a labeled continue needs
|
|
140
|
-
* the loop's own continue point — the condition/update — and a labeled
|
|
141
|
-
* switch-break its end): pendingLabels hands them to the construct's own
|
|
142
|
-
* lowering, which consumes them before lowering anything nested (so an
|
|
143
|
-
* inner loop can never steal them). Every other labeled statement wraps
|
|
144
|
-
* in a labeled BLOCK — `break lbl` exits it (the only jump tsc allows to
|
|
145
|
-
* target a non-loop label), and a label nothing jumps to is just the
|
|
146
|
-
* statement itself. Loop shapes whose lowering is a label-free desugar
|
|
147
|
-
* (container/matchAll/stdin for-ofs, union switches) DROP the labels
|
|
148
|
-
* after consuming them: an unused label costs nothing, and a labeled
|
|
149
|
-
* jump naming one fences by name at the jump site instead of compiling
|
|
150
|
-
* against the wrong target. */
|
|
151
|
-
export declare function lowerLabeled(L: Lowerer, stmt: ts.LabeledStatement): IrStmt | IrStmt[] | null;
|
|
152
|
-
export declare function lowerStmt(L: Lowerer, stmt: ts.Statement): IrStmt | IrStmt[] | null;
|
|
114
|
+
export declare function rejectJumpCrossingFinally(lowerer: Lowerer, kw: "break" | "continue" | "return", stmt: ts.Statement, label?: string): void;
|
|
115
|
+
export declare function lowerStmt(lowerer: Lowerer, stmt: ts.Statement): IrStmt | IrStmt[] | null;
|
|
153
116
|
/** A variable statement may carry several declarators (`let a = 1,
|
|
154
117
|
* b = a + 1;`): each lowers to its own varDecl IN ORDER, so later
|
|
155
118
|
* initializers see earlier bindings (JS-exact). `var` declarators ride
|
|
156
119
|
* the same path — their "declaration" is an assignment into the
|
|
157
120
|
* function-scoped hoisted slot (hoistVarBinding), so the mutability flag
|
|
158
121
|
* passed down covers let AND var. */
|
|
159
|
-
export declare function lowerVarStatement(
|
|
122
|
+
export declare function lowerVarStatement(lowerer: Lowerer, stmt: ts.VariableStatement): IrStmt[];
|
|
160
123
|
/** The numeric indexed source of a built-in value-iterator expression:
|
|
161
124
|
* `numbers.values()` or the equivalent
|
|
162
125
|
* `numbers[Symbol.iterator]()`, where numbers is number[] or one of the
|
|
@@ -164,11 +127,11 @@ export declare function lowerVarStatement(L: Lowerer, stmt: ts.VariableStatement
|
|
|
164
127
|
* a syntax + provenance test rather than a mapping for the iterator
|
|
165
128
|
* object: it has observable mutable protocol state, represented by
|
|
166
129
|
* hidden locals only while a stored binding stays in one function. */
|
|
167
|
-
export declare function numericIteratorSourceOf(
|
|
130
|
+
export declare function numericIteratorSourceOf(lowerer: Lowerer, expr: ts.Expression | undefined): ts.Expression | null;
|
|
168
131
|
/** Whether a checker type belongs to node:util.parseArgs's dyn-backed
|
|
169
132
|
* declaration family. Module ancestry disambiguates short private helper
|
|
170
133
|
* names such as `Token` from names in other standard-library modules. */
|
|
171
|
-
export declare function isParseArgsDynCheckerType(
|
|
134
|
+
export declare function isParseArgsDynCheckerType(lowerer: Lowerer, type: ts.Type): boolean;
|
|
172
135
|
/** Destructuring declarations, desugared as sugar over indexed/field
|
|
173
136
|
* reads: the initializer evaluates ONCE into a hidden temp, then each
|
|
174
137
|
* bound name declares (or assigns its pre-registered module global) from
|
|
@@ -179,36 +142,15 @@ export declare function isParseArgsDynCheckerType(L: Lowerer, type: ts.Type): bo
|
|
|
179
142
|
* where JS binds undefined). Defaults, rest elements, and computed keys
|
|
180
143
|
* are fenced — each would need machinery beyond a read (an undefined
|
|
181
144
|
* test, surplus packing, dynamic lookup). */
|
|
182
|
-
export declare function lowerDestructuringDecl(
|
|
145
|
+
export declare function lowerDestructuringDecl(lowerer: Lowerer, decl: ts.VariableDeclaration, isLet: boolean): IrStmt[];
|
|
183
146
|
/** One pattern level: emits a declaration (or global assignment) per
|
|
184
147
|
* bound name, recursing through hidden temps for nested patterns. */
|
|
185
|
-
export declare function lowerBindingPattern(
|
|
186
|
-
/** The STATIC property name of a destructuring key: identifiers spell
|
|
187
|
-
* themselves, string/numeric-literal keys and COMPUTED keys fold through
|
|
188
|
-
* foldedStringKeyOf — pure single-name expressions only (`{ [k]: v }`
|
|
189
|
-
* where k's checker type spells one property name; tsc late-bound the
|
|
190
|
-
* source's field under exactly that name, and pure keys make skipping
|
|
191
|
-
* the evaluation exact). Null for runtime-valued keys — the callers
|
|
192
|
-
* fence, or route island sources to the engine pattern. */
|
|
193
|
-
export declare function patternKeyNameOf(L: Lowerer, prop: ts.PropertyName): string | null;
|
|
148
|
+
export declare function lowerBindingPattern(lowerer: Lowerer, pattern: ts.ArrayBindingPattern | ts.ObjectBindingPattern, srcRef: () => IrExpr, srcType: IrType, isLet: boolean, out: IrStmt[], dynSpell?: string, allowDynObject?: boolean): void;
|
|
194
149
|
/** The fences the island's element-wise object path shares: no rest
|
|
195
150
|
* (surplus packing over a handle) and no defaults (an engine undefined
|
|
196
151
|
* test) — the static positions now take both through their own
|
|
197
152
|
* machinery above. */
|
|
198
|
-
export declare function checkBindingElement(
|
|
199
|
-
/** A declaration pattern rebuilt as ENGINE source with every bound name
|
|
200
|
-
* renamed __0..__n (pattern order): holes, nesting, rest, and
|
|
201
|
-
* transportable defaults all survive verbatim, so the engine runs the
|
|
202
|
-
* REAL pattern — the iterator protocol on array patterns,
|
|
203
|
-
* RequireObjectCoercible on object patterns, JS's own default rule.
|
|
204
|
-
* Null when any element has no engine form (computed keys — a compiled
|
|
205
|
-
* expression the pattern text cannot carry — or untransportable
|
|
206
|
-
* defaults). */
|
|
207
|
-
export declare function enginePatternSpec(L: Lowerer, pattern: ts.ArrayBindingPattern | ts.ObjectBindingPattern): {
|
|
208
|
-
text: string;
|
|
209
|
-
binds: ts.Identifier[];
|
|
210
|
-
extras: ts.Expression[];
|
|
211
|
-
} | null;
|
|
153
|
+
export declare function checkBindingElement(lowerer: Lowerer, el: ts.BindingElement, allowDefault?: boolean): void;
|
|
212
154
|
/** Declaration-position destructuring over an ISLAND source: the ENGINE
|
|
213
155
|
* runs the real pattern — a synthesized strict-mode
|
|
214
156
|
* `new Function("v", ...)` exactly like the assignment chain's
|
|
@@ -220,8 +162,8 @@ export declare function enginePatternSpec(L: Lowerer, pattern: ts.ArrayBindingPa
|
|
|
220
162
|
* both run — destructuring undefined throws Node's TypeError at Node's
|
|
221
163
|
* exit), rest, and transportable defaults all ride. False when the
|
|
222
164
|
* pattern has no engine form (the caller fences). */
|
|
223
|
-
export declare function lowerJsvalBindingPattern(
|
|
224
|
-
export declare function bindPatternTarget(
|
|
165
|
+
export declare function lowerJsvalBindingPattern(lowerer: Lowerer, pattern: ts.ArrayBindingPattern | ts.ObjectBindingPattern, srcRef: () => IrExpr, isLet: boolean, out: IrStmt[]): boolean;
|
|
166
|
+
export declare function bindPatternTarget(lowerer: Lowerer, name: ts.BindingName, value: IrExpr, isLet: boolean, out: IrStmt[], allowDynObject?: boolean): void;
|
|
225
167
|
/** For-loop initializers. let/const stay restricted to ONE declarator (JS
|
|
226
168
|
* per-iteration binding copies for several captured loop variables are
|
|
227
169
|
* not modeled yet); `var` initializers take any number — a `var` is ONE
|
|
@@ -229,35 +171,13 @@ export declare function bindPatternTarget(L: Lowerer, name: ts.BindingName, valu
|
|
|
229
171
|
* `for (var i = 0, n = xs.length; ...)` is just two hoisted-slot
|
|
230
172
|
* assignments (wrapped in a block when several). Statement position goes
|
|
231
173
|
* through lowerVarStatement. */
|
|
232
|
-
export declare function lowerVarDeclList(
|
|
233
|
-
export declare function lowerVarDecl(
|
|
174
|
+
export declare function lowerVarDeclList(lowerer: Lowerer, list: ts.VariableDeclarationList): IrStmt | null;
|
|
175
|
+
export declare function lowerVarDecl(lowerer: Lowerer, decl: ts.VariableDeclaration, isLet: boolean): IrStmt | null;
|
|
234
176
|
/** JS-exact switch (see docs/ir.md): one shared lexical scope for all case
|
|
235
177
|
* bodies, lazy source-order test evaluation, fall-through. tsc has already
|
|
236
178
|
* checked case-test comparability (TS2678) — the kind check below is the
|
|
237
179
|
* backstop for cases tsc lets through (e.g. `unknown as` casts). */
|
|
238
|
-
export declare function lowerSwitch(
|
|
239
|
-
/** Switch on a UNION-typed discriminant (`switch (m.type)` over
|
|
240
|
-
* `string | undefined`): desugared to an if/else-if chain of per-union
|
|
241
|
-
* strict-equality tests (unionEq — the case value wraps into the union,
|
|
242
|
-
* exactly `disc === test`), because the backend switch compares plain
|
|
243
|
-
* primitives only. The desugar is JS-exact for the shape it accepts and
|
|
244
|
-
* fences everything it cannot reproduce:
|
|
245
|
-
* - the discriminant rides every test, so it must be a plain
|
|
246
|
-
* side-effect-free read (bind it to a const first otherwise);
|
|
247
|
-
* - tests evaluate lazily in source order (the chain's short-circuit IS
|
|
248
|
-
* the switch's test order — grouped empty cases `case a: case b:` OR
|
|
249
|
-
* their tests, still in order);
|
|
250
|
-
* - each non-final clause must EXIT (a trailing unconditional break —
|
|
251
|
-
* dropped, it's the chain's own exit — or a return/throw/continue):
|
|
252
|
-
* real fall-through between bodies has no if/else shape;
|
|
253
|
-
* - any OTHER unlabeled break binding to this switch (a conditional
|
|
254
|
-
* early break) is fenced — desugared, it would bind to an enclosing
|
|
255
|
-
* loop instead;
|
|
256
|
-
* - `default` may sit anywhere in source (JS tests every case first;
|
|
257
|
-
* the chain's final else reproduces that as long as its body exits or
|
|
258
|
-
* is last).
|
|
259
|
-
* Case bodies share ONE lexical scope, exactly like the real switch. */
|
|
260
|
-
export declare function lowerUnionSwitch(L: Lowerer, stmt: ts.SwitchStatement, disc: IrExpr): IrStmt;
|
|
180
|
+
export declare function lowerSwitch(lowerer: Lowerer, stmt: ts.SwitchStatement): IrStmt;
|
|
261
181
|
/** try/catch/finally. Supported subset:
|
|
262
182
|
* - `catch { }` (bindingless) discards the thrown value on entry.
|
|
263
183
|
* - `catch (e)` binds it as a CAUGHT local — a snapshot of the exception
|
|
@@ -279,13 +199,13 @@ export declare function lowerUnionSwitch(L: Lowerer, stmt: ts.SwitchStatement, d
|
|
|
279
199
|
* restriction on jumps.
|
|
280
200
|
* Each block is its own lexical scope (the binding lives in a scope
|
|
281
201
|
* WRAPPING the catch block, like the spec's catch environment). */
|
|
282
|
-
export declare function lowerTry(
|
|
202
|
+
export declare function lowerTry(lowerer: Lowerer, stmt: ts.TryStatement): IrStmt;
|
|
283
203
|
/** Expression-position statements: assignments, calls. Shared with
|
|
284
204
|
* for-loop init/update. Parens unwrap first — `(x = v);` is the plain
|
|
285
205
|
* assignment, and `({ a, b } = e);` (destructuring ASSIGNMENT, which JS
|
|
286
206
|
* requires parenthesized in statement position) lands in the
|
|
287
207
|
* object-literal-target branch below. */
|
|
288
|
-
export declare function lowerExprStatement(
|
|
208
|
+
export declare function lowerExprStatement(lowerer: Lowerer, expr: ts.Expression): IrStmt;
|
|
289
209
|
/** `({ a, b: x } = e);`, `[a, b = 0, ...rest] = xs;` — destructuring
|
|
290
210
|
* assignment to EXISTING writable bindings, statement position, from a
|
|
291
211
|
* PRE-LOWERED source: for-of expression heads hand the per-iteration
|
|
@@ -294,7 +214,7 @@ export declare function lowerExprStatement(L: Lowerer, expr: ts.Expression): IrS
|
|
|
294
214
|
* text). Plain assignment statements ride
|
|
295
215
|
* lowerDestructuringAssignParts, which keeps the RHS expression for
|
|
296
216
|
* that spelling. */
|
|
297
|
-
export declare function lowerDestructuringAssign(
|
|
217
|
+
export declare function lowerDestructuringAssign(lowerer: Lowerer, target: ts.ObjectLiteralExpression | ts.ArrayLiteralExpression, init: IrExpr, blame: ts.Node, loc: SrcLoc): IrStmt;
|
|
298
218
|
/** Destructuring ASSIGNMENT (existing bindings — the declaration twin is
|
|
299
219
|
* lowerDestructuringDecl): the RHS evaluates ONCE into a hidden temp,
|
|
300
220
|
* each target assigns in source order, and the parts' VALUE is the
|
|
@@ -317,7 +237,7 @@ export declare function lowerDestructuringAssign(L: Lowerer, target: ts.ObjectLi
|
|
|
317
237
|
* past-the-end undefined demands) and rest packing the tail fresh
|
|
318
238
|
* (array slices, tuple tails). Nesting, computed keys, and member
|
|
319
239
|
* targets keep fences. */
|
|
320
|
-
export declare function lowerDestructuringAssignParts(
|
|
240
|
+
export declare function lowerDestructuringAssignParts(lowerer: Lowerer, target: ts.ObjectLiteralExpression | ts.ArrayLiteralExpression, rhs: ts.Expression, loc: SrcLoc): {
|
|
321
241
|
stmts: IrStmt[];
|
|
322
242
|
value: IrExpr;
|
|
323
243
|
};
|
|
@@ -326,44 +246,5 @@ export declare function lowerDestructuringAssignParts(L: Lowerer, target: ts.Obj
|
|
|
326
246
|
* specific diagnostics; other iterables fail on their types. The loop
|
|
327
247
|
* variable is a fresh const binding per iteration (its own scope, like a
|
|
328
248
|
* loop body). */
|
|
329
|
-
export declare function lowerForOf(
|
|
330
|
-
|
|
331
|
-
* string-typed receiver with one regex-typed argument (parens stripped).
|
|
332
|
-
* The shape the companion-index machinery serves. */
|
|
333
|
-
export declare function directMatchAllCallOf(L: Lowerer, e: ts.Expression): ts.CallExpression | null;
|
|
334
|
-
/** for-in loops. The key set is Node's own-enumerable-keys walk, lowered
|
|
335
|
-
* per receiver kind:
|
|
336
|
-
* - RECORDS (fixed shapes): iteration over exactly the keys Object.keys
|
|
337
|
-
* answers — the shared interned keys helper (recordKeysArrayCall):
|
|
338
|
-
* declaration order, fields holding the undefined arm of their union
|
|
339
|
-
* skipped at runtime (SEMANTICS.md 37's rules verbatim). The key list
|
|
340
|
-
* snapshots at loop entry, which IS Node's for-in contract for keys
|
|
341
|
-
* ADDED during the walk (never visited); fixed shapes cannot lose keys
|
|
342
|
-
* mid-loop (no delete), so the snapshot is exact.
|
|
343
|
-
* - INDEX-SIGNATURE shapes: the same Object.keys hybrid/pure walk
|
|
344
|
-
* (declared fields first, then the overflow in JS own-key order —
|
|
345
|
-
* objectIterOverIndexShape's "keys" arm, same intern key). Adds during
|
|
346
|
-
* the loop are correctly NOT visited (the snapshot); PURE shapes —
|
|
347
|
-
* the one record kind where `delete obj[k]` is lowered — additionally
|
|
348
|
-
* guard every visit with a live presence test, Node's HasProperty
|
|
349
|
-
* re-check, so keys deleted before their turn are skipped exactly
|
|
350
|
-
* like Node.
|
|
351
|
-
* - ARRAYS: Node's canonical ascending index strings. The key set
|
|
352
|
-
* snapshots at entry (pushes during the body are NOT visited — V8's
|
|
353
|
-
* own-keys snapshot, verified against Node) while each visit re-checks
|
|
354
|
-
* presence (i < live length), so pops during the body skip exactly
|
|
355
|
-
* like Node. Sparse arrays cannot exist here (hole creation traps).
|
|
356
|
-
* - globalThis: the harness's leaked-globals sweep — a compiled binary's
|
|
357
|
-
* global bindings are compile-time names, never enumerable runtime
|
|
358
|
-
* properties, so the enumeration is honestly EMPTY (zero iterations;
|
|
359
|
-
* the body typechecked but never evaluates — SEMANTICS.md documents
|
|
360
|
-
* the divergence).
|
|
361
|
-
* - class instances fence: which keys exist on one depends on runtime
|
|
362
|
-
* property creation (unset declared fields, useDefineForClassFields)
|
|
363
|
-
* that the struct model does not track — named, not guessed.
|
|
364
|
-
* Bindings mirror for-of's: const/let declare the per-iteration string
|
|
365
|
-
* local, `var` assigns the hoisted shared slot, a pre-declared
|
|
366
|
-
* identifier target assigns per pass; destructuring heads are tsc
|
|
367
|
-
* errors. */
|
|
368
|
-
export declare function lowerForIn(L: Lowerer, stmt: ts.ForInStatement): IrStmt;
|
|
369
|
-
export declare function lowerForStatement(L: Lowerer, stmt: ts.ForStatement): IrStmt;
|
|
249
|
+
export declare function lowerForOf(lowerer: Lowerer, stmt: ts.ForOfStatement): IrStmt;
|
|
250
|
+
export declare function lowerForStatement(lowerer: Lowerer, stmt: ts.ForStatement): IrStmt;
|