@scriptc/compiler 0.0.35 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ambient/scriptc-node-fallback.d.ts +14 -11
- package/ambient/scriptc-overrides.d.ts +0 -7
- package/ambient/scriptc.d.ts +1 -1
- package/dist/backend/build-cache.d.ts +44 -0
- package/dist/backend/build-cache.js +241 -0
- package/dist/backend/build-cache.js.map +1 -0
- package/dist/backend/{emission/emit-async.d.ts → c/async.d.ts} +21 -30
- package/dist/backend/{emission/emit-async.js → c/async.js} +270 -286
- package/dist/backend/c/async.js.map +1 -0
- package/dist/backend/{emission/emitter.d.ts → c/c-emitter.d.ts} +6 -23
- package/dist/backend/{emission/emitter.js → c/c-emitter.js} +53 -107
- package/dist/backend/c/c-emitter.js.map +1 -0
- package/dist/backend/c/exprs.d.ts +8 -0
- package/dist/backend/c/exprs.js +7937 -0
- package/dist/backend/c/exprs.js.map +1 -0
- package/dist/backend/{emission/emit-island.d.ts → c/island.d.ts} +5 -5
- package/dist/backend/{emission/emit-island.js → c/island.js} +24 -22
- package/dist/backend/c/island.js.map +1 -0
- package/dist/backend/{emission → c}/may-throw.d.ts +1 -1
- package/dist/backend/{emission → c}/may-throw.js +4 -1
- package/dist/backend/c/may-throw.js.map +1 -0
- package/dist/backend/{emission/emit-shapes.d.ts → c/shapes.d.ts} +19 -19
- package/dist/backend/{emission/emit-shapes.js → c/shapes.js} +78 -87
- package/dist/backend/c/shapes.js.map +1 -0
- package/dist/backend/{emission/emit-stmts.d.ts → c/stmts.d.ts} +12 -12
- package/dist/backend/{emission/emit-stmts.js → c/stmts.js} +395 -343
- package/dist/backend/c/stmts.js.map +1 -0
- package/dist/backend/{emission/emit-types.d.ts → c/types.d.ts} +1 -1
- package/dist/backend/{emission/emit-types.js → c/types.js} +42 -286
- package/dist/backend/c/types.js.map +1 -0
- package/dist/backend/c/types.test.js +25 -0
- package/dist/backend/c/types.test.js.map +1 -0
- package/dist/backend/{emission/emit-walkers.d.ts → c/walkers.d.ts} +19 -41
- package/dist/backend/{emission/emit-walkers.js → c/walkers.js} +242 -304
- package/dist/backend/c/walkers.js.map +1 -0
- package/dist/backend/external-c.d.ts +33 -0
- package/dist/backend/external-c.js +51 -0
- package/dist/backend/external-c.js.map +1 -0
- package/dist/backend/ffi-callbacks.d.ts +1 -1
- package/dist/backend/ffi-callbacks.js +4 -3
- package/dist/backend/ffi-callbacks.js.map +1 -1
- package/dist/backend/{library-identity.d.ts → library-identity-markers.d.ts} +0 -4
- package/dist/backend/{library-identity.js → library-identity-markers.js} +10 -9
- package/dist/backend/library-identity-markers.js.map +1 -0
- package/dist/backend/link-plan.d.ts +37 -0
- package/dist/backend/link-plan.js +26 -0
- package/dist/backend/link-plan.js.map +1 -0
- package/dist/backend/linker.d.ts +22 -0
- package/dist/backend/linker.js +236 -0
- package/dist/backend/linker.js.map +1 -0
- package/dist/backend/llvm/blocks.d.ts +4 -0
- package/dist/backend/llvm/blocks.js +29 -0
- package/dist/backend/llvm/blocks.js.map +1 -1
- package/dist/backend/llvm/classes.d.ts +2 -19
- package/dist/backend/llvm/classes.js +20 -52
- package/dist/backend/llvm/classes.js.map +1 -1
- package/dist/backend/llvm/common.d.ts +4 -0
- package/dist/backend/llvm/common.js +27 -0
- package/dist/backend/llvm/common.js.map +1 -0
- package/dist/backend/llvm/dyn.d.ts +3 -8
- package/dist/backend/llvm/dyn.js +159 -224
- package/dist/backend/llvm/dyn.js.map +1 -1
- package/dist/backend/llvm/emitter.d.ts +4 -1
- package/dist/backend/llvm/emitter.js +548 -9988
- package/dist/backend/llvm/emitter.js.map +1 -1
- package/dist/backend/llvm/expr-async.d.ts +4 -0
- package/dist/backend/llvm/expr-async.js +726 -0
- package/dist/backend/llvm/expr-async.js.map +1 -0
- package/dist/backend/llvm/expr-bytes.d.ts +13 -0
- package/dist/backend/llvm/expr-bytes.js +456 -0
- package/dist/backend/llvm/expr-bytes.js.map +1 -0
- package/dist/backend/llvm/expr-callbacks.d.ts +22 -0
- package/dist/backend/llvm/expr-callbacks.js +520 -0
- package/dist/backend/llvm/expr-callbacks.js.map +1 -0
- package/dist/backend/llvm/expr-calls.d.ts +2 -0
- package/dist/backend/llvm/expr-calls.js +618 -0
- package/dist/backend/llvm/expr-calls.js.map +1 -0
- package/dist/backend/llvm/expr-containers.d.ts +25 -0
- package/dist/backend/llvm/expr-containers.js +637 -0
- package/dist/backend/llvm/expr-containers.js.map +1 -0
- package/dist/backend/llvm/expr-context.d.ts +255 -0
- package/dist/backend/llvm/expr-context.js +2 -0
- package/dist/backend/llvm/expr-context.js.map +1 -0
- package/dist/backend/llvm/expr-control.d.ts +2 -0
- package/dist/backend/llvm/expr-control.js +473 -0
- package/dist/backend/llvm/expr-control.js.map +1 -0
- package/dist/backend/llvm/expr-dispatch.d.ts +4 -0
- package/dist/backend/llvm/expr-dispatch.js +153 -0
- package/dist/backend/llvm/expr-dispatch.js.map +1 -0
- package/dist/backend/llvm/expr-dynamic.d.ts +2 -0
- package/dist/backend/llvm/expr-dynamic.js +810 -0
- package/dist/backend/llvm/expr-dynamic.js.map +1 -0
- package/dist/backend/llvm/expr-island.d.ts +15 -0
- package/dist/backend/llvm/expr-island.js +690 -0
- package/dist/backend/llvm/expr-island.js.map +1 -0
- package/dist/backend/llvm/expr-primitives.d.ts +6 -0
- package/dist/backend/llvm/expr-primitives.js +642 -0
- package/dist/backend/llvm/expr-primitives.js.map +1 -0
- package/dist/backend/llvm/expr-records.d.ts +9 -0
- package/dist/backend/llvm/expr-records.js +299 -0
- package/dist/backend/llvm/expr-records.js.map +1 -0
- package/dist/backend/llvm/expr-stream-bridges.d.ts +13 -0
- package/dist/backend/llvm/expr-stream-bridges.js +420 -0
- package/dist/backend/llvm/expr-stream-bridges.js.map +1 -0
- package/dist/backend/llvm/expr-stream-callbacks.d.ts +12 -0
- package/dist/backend/llvm/expr-stream-callbacks.js +360 -0
- package/dist/backend/llvm/expr-stream-callbacks.js.map +1 -0
- package/dist/backend/llvm/lib-dispatch.d.ts +5 -0
- package/dist/backend/llvm/lib-dispatch.js +267 -0
- package/dist/backend/llvm/lib-dispatch.js.map +1 -0
- package/dist/backend/llvm/lib-filesystem.d.ts +6 -0
- package/dist/backend/llvm/lib-filesystem.js +594 -0
- package/dist/backend/llvm/lib-filesystem.js.map +1 -0
- package/dist/backend/llvm/lib-network.d.ts +2 -0
- package/dist/backend/llvm/lib-network.js +429 -0
- package/dist/backend/llvm/lib-network.js.map +1 -0
- package/dist/backend/llvm/lib-process.d.ts +5 -0
- package/dist/backend/llvm/lib-process.js +585 -0
- package/dist/backend/llvm/lib-process.js.map +1 -0
- package/dist/backend/llvm/lib-shared.d.ts +6 -0
- package/dist/backend/llvm/lib-shared.js +687 -0
- package/dist/backend/llvm/lib-shared.js.map +1 -0
- package/dist/backend/llvm/lib-stream.d.ts +2 -0
- package/dist/backend/llvm/lib-stream.js +470 -0
- package/dist/backend/llvm/lib-stream.js.map +1 -0
- package/dist/backend/llvm/shapes.d.ts +12 -2
- package/dist/backend/llvm/shapes.js +66 -307
- package/dist/backend/llvm/shapes.js.map +1 -1
- package/dist/backend/llvm/shapes.test.js +52 -0
- package/dist/backend/llvm/shapes.test.js.map +1 -0
- package/dist/backend/llvm/unsupported.d.ts +1 -1
- package/dist/backend/llvm/walkers.d.ts +2 -3
- package/dist/backend/llvm/walkers.js +195 -222
- package/dist/backend/llvm/walkers.js.map +1 -1
- package/dist/backend/native-codegen.d.ts +45 -0
- package/dist/backend/native-codegen.js +275 -0
- package/dist/backend/native-codegen.js.map +1 -0
- package/dist/backend/native-codegen.test.js +226 -0
- package/dist/backend/native-codegen.test.js.map +1 -0
- package/dist/backend/native-link-info.d.ts +96 -0
- package/dist/backend/native-link-info.js +243 -0
- package/dist/backend/native-link-info.js.map +1 -0
- package/dist/backend/native-link-info.test.d.ts +1 -0
- package/dist/backend/native-link-info.test.js +134 -0
- package/dist/backend/native-link-info.test.js.map +1 -0
- package/dist/backend/{cc.d.ts → native-toolchain.d.ts} +54 -34
- package/dist/backend/{cc.js → native-toolchain.js} +231 -810
- package/dist/backend/native-toolchain.js.map +1 -0
- package/dist/backend/native-toolchain.test.d.ts +1 -0
- package/dist/backend/{cc-cache.test.js → native-toolchain.test.js} +219 -7
- package/dist/backend/native-toolchain.test.js.map +1 -0
- package/dist/backend/object-localize.js +1 -1
- package/dist/backend/runtime-abi.d.ts +10 -0
- package/dist/backend/runtime-abi.js +11 -0
- package/dist/backend/runtime-abi.js.map +1 -0
- package/dist/backend/runtime-pack-targets.test.d.ts +1 -0
- package/dist/backend/runtime-pack-targets.test.js +54 -0
- package/dist/backend/runtime-pack-targets.test.js.map +1 -0
- package/dist/backend/runtime-pack.d.ts +112 -0
- package/dist/backend/runtime-pack.js +305 -0
- package/dist/backend/runtime-pack.js.map +1 -0
- package/dist/backend/runtime-pack.test.d.ts +1 -0
- package/dist/backend/runtime-pack.test.js +473 -0
- package/dist/backend/runtime-pack.test.js.map +1 -0
- package/dist/backend/targets.d.ts +76 -0
- package/dist/backend/targets.js +262 -0
- package/dist/backend/targets.js.map +1 -0
- package/dist/backend/targets.test.d.ts +1 -0
- package/dist/backend/targets.test.js +41 -0
- package/dist/backend/targets.test.js.map +1 -0
- package/dist/backend/vendor-archives.d.ts +41 -0
- package/dist/backend/vendor-archives.js +462 -0
- package/dist/backend/vendor-archives.js.map +1 -0
- package/dist/compat/fetch-profile.d.ts +0 -1
- package/dist/compat/fetch-profile.js +0 -1
- package/dist/compat/fetch-profile.js.map +1 -1
- package/dist/coverage/report.js +3 -3
- package/dist/coverage/report.js.map +1 -1
- package/dist/coverage/surface-manifest.js +35 -33
- package/dist/coverage/surface-manifest.js.map +1 -1
- package/dist/diagnostics/diagnostic.d.ts +11 -12
- package/dist/diagnostics/diagnostic.js +19 -17
- package/dist/diagnostics/diagnostic.js.map +1 -1
- package/dist/diagnostics/render.d.ts +1 -1
- package/dist/diagnostics/render.js +1 -1
- package/dist/diagnostics/render.js.map +1 -1
- package/dist/errors.d.ts +5 -0
- package/dist/errors.js +9 -0
- package/dist/errors.js.map +1 -0
- package/dist/executable/{early-cache.d.ts → executable-cache.d.ts} +2 -2
- package/dist/executable/{early-cache.js → executable-cache.js} +36 -98
- package/dist/executable/executable-cache.js.map +1 -0
- package/dist/executable/executable-cache.test.d.ts +1 -0
- package/dist/executable/{early-cache.test.js → executable-cache.test.js} +3 -3
- package/dist/executable/executable-cache.test.js.map +1 -0
- package/dist/ffi/{profile.js → ffi-manifest.js} +1 -1
- package/dist/ffi/ffi-manifest.js.map +1 -0
- package/dist/frontend/builtin-modules.d.ts +21 -0
- package/dist/frontend/builtin-modules.js +82 -0
- package/dist/frontend/builtin-modules.js.map +1 -0
- package/dist/frontend/cjs-lexer.d.ts +7 -0
- package/dist/frontend/cjs-lexer.js +15 -17
- package/dist/frontend/cjs-lexer.js.map +1 -1
- package/dist/frontend/dts-paths.d.ts +26 -0
- package/dist/frontend/dts-paths.js +41 -0
- package/dist/frontend/dts-paths.js.map +1 -0
- package/dist/frontend/input-tracker.d.ts +0 -2
- package/dist/frontend/input-tracker.js +1 -4
- package/dist/frontend/input-tracker.js.map +1 -1
- package/dist/frontend/lib-contract.d.ts +1 -5
- package/dist/frontend/lib-contract.js +1 -1
- package/dist/frontend/lib-contract.js.map +1 -1
- package/dist/frontend/lib-exports.d.ts +1 -1
- package/dist/frontend/lowering/array-values.d.ts +8 -0
- package/dist/frontend/lowering/array-values.js +60 -0
- package/dist/frontend/lowering/array-values.js.map +1 -0
- package/dist/frontend/lowering/call-position.d.ts +4 -0
- package/dist/frontend/lowering/call-position.js +7 -0
- package/dist/frontend/lowering/call-position.js.map +1 -0
- package/dist/frontend/lowering/callback-arg.d.ts +20 -0
- package/dist/frontend/lowering/callback-arg.js +44 -0
- package/dist/frontend/lowering/callback-arg.js.map +1 -0
- package/dist/frontend/lowering/lib-boundary.d.ts +1 -1
- package/dist/frontend/lowering/lib-boundary.js +34 -34
- package/dist/frontend/lowering/lib-boundary.js.map +1 -1
- package/dist/frontend/lowering/lower-array-sort.d.ts +22 -0
- package/dist/frontend/lowering/lower-array-sort.js +619 -0
- package/dist/frontend/lowering/lower-array-sort.js.map +1 -0
- package/dist/frontend/lowering/lower-assert.d.ts +3 -3
- package/dist/frontend/lowering/lower-assert.js +214 -241
- package/dist/frontend/lowering/lower-assert.js.map +1 -1
- package/dist/frontend/lowering/lower-builtins.d.ts +74 -146
- package/dist/frontend/lowering/lower-builtins.js +1285 -1233
- package/dist/frontend/lowering/lower-builtins.js.map +1 -1
- package/dist/frontend/lowering/lower-calls.d.ts +59 -192
- package/dist/frontend/lowering/lower-calls.js +1644 -1506
- package/dist/frontend/lowering/lower-calls.js.map +1 -1
- package/dist/frontend/lowering/lower-classes.d.ts +62 -125
- package/dist/frontend/lowering/lower-classes.js +832 -866
- package/dist/frontend/lowering/lower-classes.js.map +1 -1
- package/dist/frontend/lowering/lower-comptime.d.ts +5 -12
- package/dist/frontend/lowering/lower-comptime.js +32 -31
- package/dist/frontend/lowering/lower-comptime.js.map +1 -1
- package/dist/frontend/lowering/lower-containers.d.ts +35 -135
- package/dist/frontend/lowering/lower-containers.js +1984 -2227
- package/dist/frontend/lowering/lower-containers.js.map +1 -1
- package/dist/frontend/lowering/lower-dgram.d.ts +3 -7
- package/dist/frontend/lowering/lower-dgram.js +97 -111
- package/dist/frontend/lowering/lower-dgram.js.map +1 -1
- package/dist/frontend/lowering/lower-enums.d.ts +4 -4
- package/dist/frontend/lowering/lower-enums.js +30 -30
- package/dist/frontend/lowering/lower-enums.js.map +1 -1
- package/dist/frontend/lowering/{lower-emitter.d.ts → lower-event-emitter.d.ts} +7 -18
- package/dist/frontend/lowering/{lower-emitter.js → lower-event-emitter.js} +172 -174
- package/dist/frontend/lowering/lower-event-emitter.js.map +1 -0
- package/dist/frontend/lowering/lower-expando.d.ts +5 -5
- package/dist/frontend/lowering/lower-expando.js +40 -40
- package/dist/frontend/lowering/lower-expando.js.map +1 -1
- package/dist/frontend/lowering/lower-exprs.d.ts +60 -264
- package/dist/frontend/lowering/lower-exprs.js +2361 -1765
- package/dist/frontend/lowering/lower-exprs.js.map +1 -1
- package/dist/frontend/lowering/lower-generators.d.ts +6 -6
- package/dist/frontend/lowering/lower-generators.js +73 -72
- package/dist/frontend/lowering/lower-generators.js.map +1 -1
- package/dist/frontend/lowering/lower-inspect.d.ts +5 -17
- package/dist/frontend/lowering/lower-inspect.js +273 -261
- package/dist/frontend/lowering/lower-inspect.js.map +1 -1
- package/dist/frontend/lowering/lower-island.d.ts +39 -49
- package/dist/frontend/lowering/lower-island.js +447 -513
- package/dist/frontend/lowering/lower-island.js.map +1 -1
- package/dist/frontend/lowering/lower-mixins.d.ts +7 -10
- package/dist/frontend/lowering/lower-mixins.js +85 -85
- package/dist/frontend/lowering/lower-mixins.js.map +1 -1
- package/dist/frontend/lowering/lower-modules.d.ts +12 -18
- package/dist/frontend/lowering/lower-modules.js +284 -283
- package/dist/frontend/lowering/lower-modules.js.map +1 -1
- package/dist/frontend/lowering/lower-namespaces.d.ts +23 -49
- package/dist/frontend/lowering/lower-namespaces.js +123 -115
- package/dist/frontend/lowering/lower-namespaces.js.map +1 -1
- package/dist/frontend/lowering/lower-server.d.ts +18 -25
- package/dist/frontend/lowering/lower-server.js +909 -899
- package/dist/frontend/lowering/lower-server.js.map +1 -1
- package/dist/frontend/lowering/lower-stmts.d.ts +30 -149
- package/dist/frontend/lowering/lower-stmts.js +1463 -1285
- package/dist/frontend/lowering/lower-stmts.js.map +1 -1
- package/dist/frontend/lowering/lower-stream.d.ts +12 -12
- package/dist/frontend/lowering/lower-stream.js +300 -301
- package/dist/frontend/lowering/lower-stream.js.map +1 -1
- package/dist/frontend/lowering/lower-test.d.ts +5 -5
- package/dist/frontend/lowering/lower-test.js +82 -82
- package/dist/frontend/lowering/lower-test.js.map +1 -1
- package/dist/frontend/lowering/lowerer.d.ts +134 -22
- package/dist/frontend/lowering/lowerer.js +1277 -126
- package/dist/frontend/lowering/lowerer.js.map +1 -1
- package/dist/frontend/lowering/pairs-snapshot.d.ts +11 -0
- package/dist/frontend/lowering/pairs-snapshot.js +85 -0
- package/dist/frontend/lowering/pairs-snapshot.js.map +1 -0
- package/dist/frontend/lowering/static-this.d.ts +6 -0
- package/dist/frontend/lowering/static-this.js +24 -0
- package/dist/frontend/lowering/static-this.js.map +1 -0
- package/dist/frontend/lowering/surfaces.d.ts +24 -35
- package/dist/frontend/lowering/surfaces.js +78 -66
- package/dist/frontend/lowering/surfaces.js.map +1 -1
- package/dist/frontend/npm-static-rewrite.js +6 -28
- package/dist/frontend/npm-static-rewrite.js.map +1 -1
- package/dist/frontend/npm-static.d.ts +0 -10
- package/dist/frontend/npm-static.js +4 -7
- package/dist/frontend/npm-static.js.map +1 -1
- package/dist/frontend/npm.d.ts +0 -24
- package/dist/frontend/npm.js +11 -85
- package/dist/frontend/npm.js.map +1 -1
- package/dist/frontend/program.d.ts +3 -1
- package/dist/frontend/program.js +9 -4
- package/dist/frontend/program.js.map +1 -1
- package/dist/frontend/provenance-registry.d.ts +0 -2
- package/dist/frontend/provenance-registry.js +0 -10
- package/dist/frontend/provenance-registry.js.map +1 -1
- package/dist/frontend/provenance.js +4 -7
- package/dist/frontend/provenance.js.map +1 -1
- package/dist/frontend/resolve.d.ts +7 -2
- package/dist/frontend/resolve.js +12 -17
- package/dist/frontend/resolve.js.map +1 -1
- package/dist/frontend/resolve.test.d.ts +1 -0
- package/dist/frontend/resolve.test.js +29 -0
- package/dist/frontend/resolve.test.js.map +1 -0
- package/dist/frontend/ts7/adapter.d.ts +2 -2
- package/dist/frontend/ts7/adapter.js +1 -1
- package/dist/frontend/ts7/adapter.js.map +1 -1
- package/dist/frontend/ts7/checker.js +2 -36
- package/dist/frontend/ts7/checker.js.map +1 -1
- package/dist/frontend/ts7/enums.js +2 -1
- package/dist/frontend/ts7/enums.js.map +1 -1
- package/dist/frontend/ts7/{program.js → program-adapter.js} +7 -6
- package/dist/frontend/ts7/program-adapter.js.map +1 -0
- package/dist/frontend/ts7/world-check.d.ts +1 -3
- package/dist/frontend/ts7/world-check.js +3 -1
- package/dist/frontend/ts7/world-check.js.map +1 -1
- package/dist/frontend/tsc-codes.d.ts +8 -0
- package/dist/frontend/tsc-codes.js +109 -0
- package/dist/frontend/tsc-codes.js.map +1 -0
- package/dist/frontend/{types.d.ts → type-mapper.d.ts} +2 -25
- package/dist/frontend/{types.js → type-mapper.js} +12 -11
- package/dist/frontend/type-mapper.js.map +1 -0
- package/dist/frontend/workspace-registry.d.ts +26 -0
- package/dist/frontend/workspace-registry.js +71 -0
- package/dist/frontend/workspace-registry.js.map +1 -0
- package/dist/index.d.ts +113 -31
- package/dist/index.js +536 -128
- package/dist/index.js.map +1 -1
- package/dist/ir/analysis.d.ts +37 -0
- package/dist/ir/analysis.js +118 -0
- package/dist/ir/analysis.js.map +1 -0
- package/dist/ir/analysis.test.d.ts +1 -0
- package/dist/ir/analysis.test.js +21 -0
- package/dist/ir/analysis.test.js.map +1 -0
- package/dist/ir/build.d.ts +9 -0
- package/dist/ir/build.js +33 -0
- package/dist/ir/build.js.map +1 -0
- package/dist/ir/integer-loops.d.ts +1 -1
- package/dist/ir/{nodes.d.ts → ir.d.ts} +119 -37
- package/dist/ir/{nodes.js → ir.js} +170 -166
- package/dist/ir/ir.js.map +1 -0
- package/dist/ir/ir.test.d.ts +1 -0
- package/dist/ir/ir.test.js +17 -0
- package/dist/ir/ir.test.js.map +1 -0
- package/dist/ir/serialize.d.ts +2 -2
- package/dist/ir/serialize.js +3 -2
- package/dist/ir/serialize.js.map +1 -1
- package/dist/ir/validate.d.ts +1 -1
- package/dist/ir/validate.js +93 -41
- package/dist/ir/validate.js.map +1 -1
- package/dist/library/cache-primitives.d.ts +24 -0
- package/dist/library/cache-primitives.js +83 -0
- package/dist/library/cache-primitives.js.map +1 -0
- package/dist/library/cache-reset.test.d.ts +1 -0
- package/dist/library/cache-reset.test.js +47 -0
- package/dist/library/cache-reset.test.js.map +1 -0
- package/dist/library/{implementation-identity.js → compiler-self-identity.js} +1 -1
- package/dist/library/compiler-self-identity.js.map +1 -0
- package/dist/library/fence-eval.d.ts +3 -1
- package/dist/library/fence-eval.js +8 -2
- package/dist/library/fence-eval.js.map +1 -1
- package/dist/library/int-infer.d.ts +1 -36
- package/dist/library/int-infer.js +29 -18
- package/dist/library/int-infer.js.map +1 -1
- package/dist/library/int-infer.test.js +4 -4
- package/dist/library/{early-cache.d.ts → library-cache.d.ts} +1 -1
- package/dist/library/{early-cache.js → library-cache.js} +34 -89
- package/dist/library/library-cache.js.map +1 -0
- package/dist/library/library-cache.test.d.ts +1 -0
- package/dist/library/{early-cache.test.js → library-cache.test.js} +7 -7
- package/dist/library/library-cache.test.js.map +1 -0
- package/dist/library/{profile.d.ts → library-profile.d.ts} +4 -7
- package/dist/library/{profile.js → library-profile.js} +18 -11
- package/dist/library/library-profile.js.map +1 -0
- package/dist/library/semantic-source.js +2 -1
- package/dist/library/semantic-source.js.map +1 -1
- package/dist/library/sidecar.d.ts +5 -2
- package/dist/library/sidecar.js +11 -5
- package/dist/library/sidecar.js.map +1 -1
- package/dist/startup-cache.d.ts +11 -3
- package/dist/startup-cache.js +17 -2
- package/dist/startup-cache.js.map +1 -1
- package/package.json +19 -2
- package/surface-manifest.json +5 -5
- package/dist/backend/cc-cache.test.js.map +0 -1
- package/dist/backend/cc.js.map +0 -1
- package/dist/backend/emission/emit-async.js.map +0 -1
- package/dist/backend/emission/emit-exprs.d.ts +0 -13
- package/dist/backend/emission/emit-exprs.js +0 -7407
- package/dist/backend/emission/emit-exprs.js.map +0 -1
- package/dist/backend/emission/emit-island.js.map +0 -1
- package/dist/backend/emission/emit-shapes.js.map +0 -1
- package/dist/backend/emission/emit-stmts.js.map +0 -1
- package/dist/backend/emission/emit-types.js.map +0 -1
- package/dist/backend/emission/emit-walkers.js.map +0 -1
- package/dist/backend/emission/emitter.js.map +0 -1
- package/dist/backend/emission/may-throw.js.map +0 -1
- package/dist/backend/library-identity.js.map +0 -1
- package/dist/executable/early-cache.js.map +0 -1
- package/dist/executable/early-cache.test.js.map +0 -1
- package/dist/ffi/profile.js.map +0 -1
- package/dist/frontend/lowering/lower-emitter.js.map +0 -1
- package/dist/frontend/shared.d.ts +0 -82
- package/dist/frontend/shared.js +0 -308
- package/dist/frontend/shared.js.map +0 -1
- package/dist/frontend/ts7/program.js.map +0 -1
- package/dist/frontend/types.js.map +0 -1
- package/dist/ir/nodes.js.map +0 -1
- package/dist/library/early-cache.js.map +0 -1
- package/dist/library/early-cache.test.js.map +0 -1
- package/dist/library/implementation-identity.js.map +0 -1
- package/dist/library/profile.js.map +0 -1
- /package/dist/backend/{cc-cache.test.d.ts → c/types.test.d.ts} +0 -0
- /package/dist/{executable/early-cache.test.d.ts → backend/llvm/shapes.test.d.ts} +0 -0
- /package/dist/{library/early-cache.test.d.ts → backend/native-codegen.test.d.ts} +0 -0
- /package/dist/ffi/{profile.d.ts → ffi-manifest.d.ts} +0 -0
- /package/dist/frontend/ts7/{program.d.ts → program-adapter.d.ts} +0 -0
- /package/dist/library/{implementation-identity.d.ts → compiler-self-identity.d.ts} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build.js","sourceRoot":"","sources":["../../src/ir/build.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,GAAG,EAAyC,MAAM,EAAe,MAAM,SAAS,CAAC;AAEhG,MAAM,UAAU,MAAM,CAAC,OAAe,EAAE,IAAY,EAAE,GAAW;IAC/D,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC;AAChD,CAAC;AAED,MAAM,UAAU,MAAM,CAAC,KAAa,EAAE,GAAW;IAC/C,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;AACnD,CAAC;AAED,MAAM,UAAU,MAAM,CAAC,KAAa,EAAE,GAAW;IAC/C,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;AACtD,CAAC;AAED,MAAM,UAAU,OAAO,CAAC,KAAc,EAAE,GAAW;IACjD,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC;AACrD,CAAC;AAED;;uEAEuE;AACvE,MAAM,UAAU,UAAU,CACxB,GAAW,EACX,KAAa,EACb,IAAiC;IAEjC,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;IACtC,OAAO;QACL,IAAI,EAAE,KAAK;QACX,IAAI,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,GAAG,EAAE;QACpE,IAAI,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE;QAC1E,MAAM,EAAE;YACN,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,KAAK;YACd,KAAK,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE;YACnF,GAAG;SACJ;QACD,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC;QACjB,GAAG;KACJ,CAAC;AACJ,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IrExpr, IrLocal, IrStmt } from "./
|
|
1
|
+
import type { IrExpr, IrLocal, IrStmt } from "./ir.js";
|
|
2
2
|
/** A canonical byte loop whose induction variable is mathematically an
|
|
3
3
|
* unsigned integer for every body entry. Backends may keep this binding in
|
|
4
4
|
* integer storage while the loop runs, converting to f64 at ordinary JS
|
|
@@ -382,6 +382,26 @@ export type IrType = {
|
|
|
382
382
|
} | {
|
|
383
383
|
kind: "void";
|
|
384
384
|
};
|
|
385
|
+
interface IrKindSet<K extends IrType["kind"]> extends ReadonlySet<IrType["kind"]> {
|
|
386
|
+
has(kind: IrType["kind"]): kind is K;
|
|
387
|
+
}
|
|
388
|
+
/** The opaque runtime handle kinds. procStream is the one scalar handle;
|
|
389
|
+
* every other handle has pointer representation. */
|
|
390
|
+
declare const HANDLE_KIND_LIST: readonly ["stats", "fileHandle", "spawnRes", "child", "netServer", "netSocket", "http2Session", "http2Stream", "dgramSocket", "testCtx", "httpReq", "httpRes", "httpClientReq", "secureCtx", "fsWatcher", "childStream", "procStream"];
|
|
391
|
+
export type HandleKind = typeof HANDLE_KIND_LIST[number];
|
|
392
|
+
export declare const HANDLE_KINDS: IrKindSet<"fileHandle" | "stats" | "spawnRes" | "child" | "netServer" | "netSocket" | "http2Session" | "http2Stream" | "dgramSocket" | "testCtx" | "httpReq" | "httpRes" | "httpClientReq" | "childStream" | "procStream" | "fsWatcher" | "secureCtx">;
|
|
393
|
+
/** The IR kinds represented as pointers in both native backends. */
|
|
394
|
+
declare const POINTER_KIND_LIST: readonly ["string", "array", "map", "set", "regex", "bytes", "url", "searchParams", "symbol", "stats", "fileHandle", "spawnRes", "child", "netServer", "netSocket", "http2Session", "http2Stream", "dgramSocket", "testCtx", "httpReq", "httpRes", "httpClientReq", "secureCtx", "fsWatcher", "childStream", "func", "object", "classval", "record", "union", "dyn", "jsval", "caught", "promise", "generator"];
|
|
395
|
+
export type PointerKind = typeof POINTER_KIND_LIST[number];
|
|
396
|
+
export declare const POINTER_KINDS: IrKindSet<"string" | "symbol" | "object" | "map" | "bytes" | "regex" | "fileHandle" | "searchParams" | "array" | "set" | "url" | "stats" | "spawnRes" | "child" | "netServer" | "netSocket" | "http2Session" | "http2Stream" | "dgramSocket" | "testCtx" | "httpReq" | "httpRes" | "httpClientReq" | "childStream" | "fsWatcher" | "secureCtx" | "func" | "jsval" | "classval" | "record" | "union" | "dyn" | "caught" | "promise" | "generator">;
|
|
397
|
+
/** Runtime RC symbol stem for each IR type kind. An empty stem means the
|
|
398
|
+
* kind is scalar/unit or uses an emitted per-shape helper (object/record).
|
|
399
|
+
* Keeping this exhaustive makes a new runtime handle kind a compile error
|
|
400
|
+
* until its one retain/release family is named here. */
|
|
401
|
+
export declare const RUNTIME_RC_STEMS: Record<IrType["kind"], string>;
|
|
402
|
+
/** The runtime-provided RC family for a type, or null when the backend must
|
|
403
|
+
* use an emitted class/record helper (or the type is not refcounted). */
|
|
404
|
+
export declare function runtimeRcStem(t: IrType): string | null;
|
|
385
405
|
/** The ref kinds whose values are JS OBJECTS for truthiness: always true
|
|
386
406
|
* ([] and {} included) — toBool accepts them (the operand still evaluates;
|
|
387
407
|
* the test is constant), and per-union truthiness helpers answer their
|
|
@@ -499,7 +519,7 @@ export declare function typeEquals(a: IrType, b: IrType): boolean;
|
|
|
499
519
|
export declare function isRefCounted(t: IrType): boolean;
|
|
500
520
|
export interface IrModule {
|
|
501
521
|
/** Bumped on any breaking IR change; serialize.ts refuses mismatches. */
|
|
502
|
-
irVersion:
|
|
522
|
+
irVersion: 8;
|
|
503
523
|
sourceFile: string;
|
|
504
524
|
functions: IrFunction[];
|
|
505
525
|
/** Class shapes. Constructors and methods are ordinary module functions
|
|
@@ -1069,9 +1089,9 @@ export type IrStmt =
|
|
|
1069
1089
|
loc: SrcLoc;
|
|
1070
1090
|
}
|
|
1071
1091
|
/** Element write `a[i] = v` — statement-only, like `assign`. Valid indices
|
|
1072
|
-
* are
|
|
1073
|
-
*
|
|
1074
|
-
*
|
|
1092
|
+
* are canonical array indices; writes beyond length grow the array and
|
|
1093
|
+
* leave the intervening positions as holes. Ownership of a refcounted value
|
|
1094
|
+
* MOVES into the array; the replaced element is released. */
|
|
1075
1095
|
| {
|
|
1076
1096
|
kind: "arraySet";
|
|
1077
1097
|
arr: IrExpr;
|
|
@@ -1079,6 +1099,29 @@ export type IrStmt =
|
|
|
1079
1099
|
value: IrExpr;
|
|
1080
1100
|
loc: SrcLoc;
|
|
1081
1101
|
}
|
|
1102
|
+
/** Writable `a.length = n`: growth creates holes and truncation releases
|
|
1103
|
+
* removed reference elements. Invalid array lengths raise a catchable
|
|
1104
|
+
* RangeError from the runtime. */
|
|
1105
|
+
| {
|
|
1106
|
+
kind: "arraySetLength";
|
|
1107
|
+
arr: IrExpr;
|
|
1108
|
+
length: IrExpr;
|
|
1109
|
+
loc: SrcLoc;
|
|
1110
|
+
}
|
|
1111
|
+
/** Write an explicit present `undefined` state without shrinking length. */
|
|
1112
|
+
| {
|
|
1113
|
+
kind: "arraySetUndefined";
|
|
1114
|
+
arr: IrExpr;
|
|
1115
|
+
index: IrExpr;
|
|
1116
|
+
loc: SrcLoc;
|
|
1117
|
+
}
|
|
1118
|
+
/** Delete an indexed/property slot without changing Array.length. */
|
|
1119
|
+
| {
|
|
1120
|
+
kind: "arrayDelete";
|
|
1121
|
+
arr: IrExpr;
|
|
1122
|
+
index: IrExpr;
|
|
1123
|
+
loc: SrcLoc;
|
|
1124
|
+
}
|
|
1082
1125
|
/** Typed-array element write `b[i] = v` — arraySet's sibling for bytes
|
|
1083
1126
|
* receivers: statement-only, receiver and index like bytesIntrinsic
|
|
1084
1127
|
* `get` (any invalid index TRAPS — JS would ignore the write, a
|
|
@@ -1266,12 +1309,19 @@ export type IrStmt =
|
|
|
1266
1309
|
* from the end, clamping; omitted args omitted from `args` — backends fill
|
|
1267
1310
|
* 0 / +Infinity, the strIntrinsic convention); ref elements retain into
|
|
1268
1311
|
* the fresh array. */
|
|
1269
|
-
export type IrArrIntrinsicMethod = "length" | "push" | "pushSpread" | "unshift" | "unshiftSpread" | "pop" | "indexOf" | "includes"
|
|
1312
|
+
export type IrArrIntrinsicMethod = "length" | "push" | "pushSpread" | "concatSpread" | "unshift" | "unshiftSpread" | "pop" | "indexOf" | "includes"
|
|
1313
|
+
/** Internal sparse traversal: the first present index at/after start,
|
|
1314
|
+
* or length when the remaining positions are holes. */
|
|
1315
|
+
| "nextPresent" | "join" | "slice" | "shift" | "splice" | "reverse"
|
|
1270
1316
|
/** ES2023 copying methods. `toSpliced` receives [start, deleteCount,
|
|
1271
1317
|
* itemsArray], with omitted arguments completed by the frontend;
|
|
1272
1318
|
* `with` receives [index, value] and throws Node's catchable RangeError
|
|
1273
1319
|
* when the relative index is out of range. */
|
|
1274
|
-
| "toReversed" | "toSpliced"
|
|
1320
|
+
| "toReversed" | "toSpliced"
|
|
1321
|
+
/** `.with()` replacement carrying present undefined while retaining the
|
|
1322
|
+
* scalar array payload ABI; it has the same catchable index validation as
|
|
1323
|
+
* the typed replacement forms. */
|
|
1324
|
+
| "withUndefined" | "with";
|
|
1275
1325
|
/** Array intrinsics whose runtime implementation can raise a catchable
|
|
1276
1326
|
* exception (rather than the static tier's deliberate index traps). */
|
|
1277
1327
|
export declare const MAY_THROW_ARR_METHODS: ReadonlySet<IrArrIntrinsicMethod>;
|
|
@@ -1858,9 +1908,16 @@ export type IrLibFn =
|
|
|
1858
1908
|
* (portless's listenOnProxyInterface): args [server, port, host,
|
|
1859
1909
|
* ipv6Only]. host is an IP literal string ("" = the host-less
|
|
1860
1910
|
* dual-stack any default); ipv6Only sets IPV6_V6ONLY before the bind.
|
|
1861
|
-
*
|
|
1862
|
-
*
|
|
1863
|
-
|
|
1911
|
+
* These are the old-shaped calls, retained for omitted reusePort so
|
|
1912
|
+
* serialized IR remains compatible. Failures are the async 'error',
|
|
1913
|
+
* message in Node's listen shape with the requested host. Never throws. */
|
|
1914
|
+
| "net.listenOpts" | "net.listenOptsCb"
|
|
1915
|
+
/** Additive ABI for listen({ ..., reusePort }) — args
|
|
1916
|
+
* [server, port, host, ipv6Only, reusePort], with the callback following
|
|
1917
|
+
* those values in the callback form. The final BOOL is the requested
|
|
1918
|
+
* kernel connection-distribution option; old spellings remain
|
|
1919
|
+
* four/five-argument calls so serialized IR stays compatible. */
|
|
1920
|
+
| "net.listenOptsReusePort" | "net.listenOptsReusePortCb" | "net.serverPort"
|
|
1864
1921
|
/** server.address() as the full AddressInfo record (the dgram.address
|
|
1865
1922
|
* materialization pattern: the emitter builds the record from the three
|
|
1866
1923
|
* runtime reads; the frontend pinned the shape). Never throws — before
|
|
@@ -2348,7 +2405,7 @@ export type IrLibFn =
|
|
|
2348
2405
|
* promise, rejecting on failure like the other fsp members). The sync
|
|
2349
2406
|
* pair THROWS catchably on failure exactly like the utf8 forms. */
|
|
2350
2407
|
| "fs.readFileSyncBytes" | "fs.writeFileSyncBytes" | "fsp.readFileBytes"
|
|
2351
|
-
/** node:zlib (scr_zlib.c —
|
|
2408
|
+
/** node:zlib (scr_zlib.c — native-toolchain.ts compiles/links it ONLY when these
|
|
2352
2409
|
* appear on the IR, the regex/libcurl gating precedent): deflateSync/
|
|
2353
2410
|
* inflateSync over u8 bytes with Node's default options. deflate never
|
|
2354
2411
|
* throws (OOM aborts); inflate of corrupt input THROWS Node's error
|
|
@@ -2933,7 +2990,7 @@ export type IrLibFn =
|
|
|
2933
2990
|
| "tp.setTimeout" | "tp.setImmediate"
|
|
2934
2991
|
/** node:diagnostics_channel (scr_dc.c, linked when any dc.* appears —
|
|
2935
2992
|
* the zlib gating precedent): a process-global name→channel registry;
|
|
2936
|
-
* channel values are f64 handles (
|
|
2993
|
+
* channel values are f64 handles (type-mapper.ts maps Channel to F64, the
|
|
2937
2994
|
* readline.Interface pattern). Subscribers are dyn function values —
|
|
2938
2995
|
* identity-compared by unsubscribe, called (message, name) by publish
|
|
2939
2996
|
* over a SNAPSHOT of the list (a subscriber unsubscribing itself
|
|
@@ -2944,7 +3001,7 @@ export type IrLibFn =
|
|
|
2944
3001
|
* ERR_INVALID_ARG_TYPE TypeError for non-function subscribers. */
|
|
2945
3002
|
| "dc.channel" | "dc.subscribe" | "dc.unsubscribe" | "dc.hasSubscribers" | "dc.publish" | "dc.chanSubscribe" | "dc.chanUnsubscribe" | "dc.chanHasSubscribers" | "dc.chanName"
|
|
2946
3003
|
/** TracingChannel (dc.tracingChannel): a registry entry of the five
|
|
2947
|
-
* event channels, an f64 handle like Channel (
|
|
3004
|
+
* event channels, an f64 handle like Channel (type-mapper.ts). tcSubscribe/
|
|
2948
3005
|
* tcUnsubscribe walk a dyn handlers object's five event keys (truthy
|
|
2949
3006
|
* non-function slots throw the per-channel ERR_INVALID_ARG_TYPE);
|
|
2950
3007
|
* tcTraceSync/tcTraceCallback/tcTracePromise run Node's publish choreography in C over
|
|
@@ -3566,9 +3623,9 @@ export type IrExpr =
|
|
|
3566
3623
|
type: IrType;
|
|
3567
3624
|
loc: SrcLoc;
|
|
3568
3625
|
}
|
|
3569
|
-
/** Element read `a[i]`. Index is f64;
|
|
3570
|
-
*
|
|
3571
|
-
*
|
|
3626
|
+
/** Element read `a[i]`. Index is f64; the low-level accessors require a
|
|
3627
|
+
* proven present slot and trap on a hole. For refcounted elements the result
|
|
3628
|
+
* is a fresh owned (+1) reference. */
|
|
3572
3629
|
| {
|
|
3573
3630
|
kind: "arrayGet";
|
|
3574
3631
|
arr: IrExpr;
|
|
@@ -3576,6 +3633,25 @@ export type IrExpr =
|
|
|
3576
3633
|
type: IrType;
|
|
3577
3634
|
loc: SrcLoc;
|
|
3578
3635
|
}
|
|
3636
|
+
/** Presence query for an array index. Invalid/non-index keys and holes
|
|
3637
|
+
* answer false without reading the slot; present undefined answers true.
|
|
3638
|
+
* The ordinary-read lowering must use arrayState before selecting its
|
|
3639
|
+
* undefined arm. */
|
|
3640
|
+
| {
|
|
3641
|
+
kind: "arrayHas";
|
|
3642
|
+
arr: IrExpr;
|
|
3643
|
+
index: IrExpr;
|
|
3644
|
+
type: IrType;
|
|
3645
|
+
loc: SrcLoc;
|
|
3646
|
+
}
|
|
3647
|
+
/** Array slot state as f64: HOLE=0, VALUE=1, UNDEFINED=2. */
|
|
3648
|
+
| {
|
|
3649
|
+
kind: "arrayState";
|
|
3650
|
+
arr: IrExpr;
|
|
3651
|
+
index: IrExpr;
|
|
3652
|
+
type: IrType;
|
|
3653
|
+
loc: SrcLoc;
|
|
3654
|
+
}
|
|
3579
3655
|
/** Array method/property on an array receiver: `length` (f64), `push`
|
|
3580
3656
|
* (VARIADIC like JS — zero or more elem-typed args; every argument
|
|
3581
3657
|
* evaluates before any appends, then each appends in order; returns the
|
|
@@ -3586,8 +3662,8 @@ export type IrExpr =
|
|
|
3586
3662
|
* exactly like JS; returns the new length), `unshift` (the matching
|
|
3587
3663
|
* variadic front insertion; all arguments evaluate before mutation and
|
|
3588
3664
|
* ref ownership moves in), `unshiftSpread` (one borrowed same-typed array,
|
|
3589
|
-
* with self-spread snapshot semantics), `pop` (returns elem
|
|
3590
|
-
* empty array; ownership moves OUT to the caller), `indexOf` (one
|
|
3665
|
+
* with self-spread snapshot semantics), `pop` (returns `elem | undefined`
|
|
3666
|
+
* and leaves an empty array unchanged; ownership moves OUT to the caller), `indexOf` (one
|
|
3591
3667
|
* elem-typed arg, BORROWED; strict equality — NaN never matches; → f64),
|
|
3592
3668
|
* `includes` (one elem-typed arg, borrowed; SameValueZero — NaN DOES
|
|
3593
3669
|
* match; → bool), `join` (one string arg, borrowed; f64/bool/string
|
|
@@ -4790,6 +4866,11 @@ export declare function isUndefinedArmedUnion(t: IrType, getUnion: (unionId: str
|
|
|
4790
4866
|
* every reachable constituent is; a cyclic VALUE of such a type throws
|
|
4791
4867
|
* Node's circular-structure TypeError at runtime instead. */
|
|
4792
4868
|
export declare function isJsonSafeType(t: IrType, getRecord: (shapeId: string) => IrRecordShape | undefined, getUnion: (unionId: string) => IrUnionDef | undefined): boolean;
|
|
4869
|
+
/** The JSON.stringify-only domain additionally admits undefined arms in
|
|
4870
|
+
* array and tuple positions, where Node emits null. A bare undefined-armed
|
|
4871
|
+
* root remains outside the domain because JSON.stringify returns the
|
|
4872
|
+
* undefined value instead of a string. */
|
|
4873
|
+
export declare function isJsonStringifySafeType(t: IrType, getRecord: (shapeId: string) => IrRecordShape | undefined, getUnion: (unionId: string) => IrUnionDef | undefined): boolean;
|
|
4793
4874
|
/** THE island boundary predicate: true when a static type can cross into
|
|
4794
4875
|
* the island (jsMarshal — primitives by value, composites as deep JSON
|
|
4795
4876
|
* copies) and back out (jsExit — strict primitive extraction, composites
|
|
@@ -4898,7 +4979,7 @@ export declare function canExitIslandToType(t: IrType, getRecord: (shapeId: stri
|
|
|
4898
4979
|
/** True when the module contains any regex construct — a regexLit /
|
|
4899
4980
|
* regexIntrinsic node or a regex-typed slot anywhere. This is the link
|
|
4900
4981
|
* switch that pulls scr_regex.c + the vendored libregexp into the binary
|
|
4901
|
-
* (
|
|
4982
|
+
* (native-toolchain.ts); regex-free programs keep the historical command line. A generic
|
|
4902
4983
|
* JSON walk: `kind` discriminants live only on IR objects, so user string
|
|
4903
4984
|
* VALUES can never false-positive. */
|
|
4904
4985
|
export declare function moduleUsesRegex(mod: IrModule): boolean;
|
|
@@ -4916,7 +4997,7 @@ export declare function moduleUsesLegacyTextDecoder(mod: IrModule): boolean;
|
|
|
4916
4997
|
export declare function moduleUsesFileHandle(mod: IrModule): boolean;
|
|
4917
4998
|
/** True when user code lowers static fetch or the embedded npm graph
|
|
4918
4999
|
* reaches the engine's global fetch — the link switch that pulls scr_fetch.c +
|
|
4919
|
-
* its socket/tls/zlib dependencies into the binary (
|
|
5000
|
+
* its socket/tls/zlib dependencies into the binary (native-toolchain.ts) and has the
|
|
4920
5001
|
* emitted main call scr_fetch_install. The npm graph records the embedded
|
|
4921
5002
|
* source fact with a parser + binder, so comments, strings, property names,
|
|
4922
5003
|
* and local `fetch` bindings do not change the link or target capability.
|
|
@@ -4924,12 +5005,12 @@ export declare function moduleUsesFileHandle(mod: IrModule): boolean;
|
|
|
4924
5005
|
export declare function moduleUsesFetch(mod: IrModule): boolean;
|
|
4925
5006
|
/** True when the module uses the process-events surface — the link switch
|
|
4926
5007
|
* that pulls scr_events.c into the binary and has the emitted main call
|
|
4927
|
-
* scr_events_install (
|
|
5008
|
+
* scr_events_install (native-toolchain.ts + emitter; the scr_regex/scr_fetch/scr_zlib
|
|
4928
5009
|
* gating precedent). Event-free programs pay zero bytes and keep their
|
|
4929
5010
|
* exact link line. Same generic-walk shape as moduleUsesRegex. */
|
|
4930
5011
|
export declare function moduleUsesProcessEvents(mod: IrModule): boolean;
|
|
4931
5012
|
/** True when the module uses the node:events EventEmitter surface — the
|
|
4932
|
-
* link switch that pulls scr_events_emitter.c into the binary (
|
|
5013
|
+
* link switch that pulls scr_events_emitter.c into the binary (native-toolchain.ts; the
|
|
4933
5014
|
* scr_events.c gating precedent, but pure data structure: no install, no
|
|
4934
5015
|
* loop hooks). Two signals: the `%EventEmitter` class def rides the
|
|
4935
5016
|
* module (any emitter-typed value or `extends EventEmitter` subclass
|
|
@@ -4951,12 +5032,12 @@ export declare function moduleUsesStream(mod: IrModule): boolean;
|
|
|
4951
5032
|
* the first; the emitted main installs it before any island entry). */
|
|
4952
5033
|
export declare function moduleEmbedsBuiltin(mod: IrModule, builtin: string): boolean;
|
|
4953
5034
|
/** Embedded module texts at least this long are DEFLATE-compressed into
|
|
4954
|
-
* the emitted C (
|
|
5035
|
+
* the emitted C (island.ts; each stays plain when deflate does not
|
|
4955
5036
|
* shrink it) and inflated lazily by the island's module loader at first
|
|
4956
5037
|
* load. Below it the zlib round trip cannot pay for itself. */
|
|
4957
5038
|
export declare const NPM_COMPRESS_MIN = 1024;
|
|
4958
5039
|
/** True when the emitted npm tables will carry compressed module text —
|
|
4959
|
-
* the SAME candidate test
|
|
5040
|
+
* the SAME candidate test island.ts compresses by, so index.ts's
|
|
4960
5041
|
* zlib link switch and emitter.ts's inflater installation stay in
|
|
4961
5042
|
* lockstep with the emission (a candidate whose deflate happens not to
|
|
4962
5043
|
* shrink stays plain; the installed inflater is then just unused). */
|
|
@@ -4964,17 +5045,17 @@ export declare function moduleEmbedsCompressedNpm(mod: IrModule): boolean;
|
|
|
4964
5045
|
/** True when the module contains any zlib libCall (the static lowering)
|
|
4965
5046
|
* OR the embedded npm graph imports node:zlib (the island shim) — the
|
|
4966
5047
|
* link switch that pulls scr_zlib.c + the system libz into the binary
|
|
4967
|
-
* (
|
|
5048
|
+
* (native-toolchain.ts); zlib-free programs keep their exact link line. Same
|
|
4968
5049
|
* generic-walk shape as moduleUsesRegex: `kind`/`fn` discriminants live
|
|
4969
5050
|
* only on IR objects. */
|
|
4970
5051
|
export declare function moduleUsesZlib(mod: IrModule): boolean;
|
|
4971
5052
|
/** True when the module contains any dc.* libCall — the link switch that
|
|
4972
5053
|
* pulls scr_dc.c (the diagnostics_channel registry and pub/sub) into the
|
|
4973
|
-
* binary (
|
|
5054
|
+
* binary (native-toolchain.ts). Channel-free binaries keep their exact size class.
|
|
4974
5055
|
* Same walk shape as moduleUsesZlib. */
|
|
4975
5056
|
export declare function moduleUsesDc(mod: IrModule): boolean;
|
|
4976
5057
|
/** True when the module contains any assert libCall — the link switch
|
|
4977
|
-
* that pulls scr_assert.c into the binary (
|
|
5058
|
+
* that pulls scr_assert.c into the binary (native-toolchain.ts). scr_regex.c calls the
|
|
4978
5059
|
* assert throw/inspect helpers (assert.match lives there), so the regex
|
|
4979
5060
|
* switch also pulls scr_assert.c; assert-free, regex-free binaries keep
|
|
4980
5061
|
* the historical command line and size. Same walk shape as
|
|
@@ -4983,31 +5064,31 @@ export declare function moduleUsesAssert(mod: IrModule): boolean;
|
|
|
4983
5064
|
/** True when the module contains any dynInvoke node or dyn.defineProps
|
|
4984
5065
|
* libCall — the link switch that pulls scr_dyn_invoke.c (the prototype-
|
|
4985
5066
|
* method dispatch on dyn receivers, plus scr_dyn_display and
|
|
4986
|
-
* scr_dyn_define_props) into the binary (
|
|
5067
|
+
* scr_dyn_define_props) into the binary (native-toolchain.ts; the assert gating
|
|
4987
5068
|
* precedent — dispatch-free binaries keep their exact size class). Same
|
|
4988
5069
|
* walk shape as moduleUsesZlib. */
|
|
4989
5070
|
export declare function moduleUsesDynInvoke(mod: IrModule): boolean;
|
|
4990
5071
|
/** True when the module contains any insp libCall — the link switch that
|
|
4991
|
-
* pulls scr_inspect.c into the binary (
|
|
5072
|
+
* pulls scr_inspect.c into the binary (native-toolchain.ts; the assert gating
|
|
4992
5073
|
* precedent — inspect-free binaries keep the historical command line and
|
|
4993
5074
|
* size class). Same walk shape as moduleUsesZlib. */
|
|
4994
5075
|
/** True when the module needs scr_async_dyn.c — the checked-dynamic
|
|
4995
5076
|
* async surfaces (dyn-promise then/catch/finally reactions, await of a
|
|
4996
5077
|
* dyn value, `new Promise(setImmediate)`, AsyncLocalStorage, the
|
|
4997
5078
|
* unhandledRejection/warning process events). Also pulled by the
|
|
4998
|
-
* dynInvoke and dc gates (their TUs call into this one) —
|
|
5079
|
+
* dynInvoke and dc gates (their TUs call into this one) — native-toolchain.ts. Same
|
|
4999
5080
|
* walk shape as moduleUsesZlib. */
|
|
5000
5081
|
export declare function moduleUsesDynAsync(mod: IrModule): boolean;
|
|
5001
5082
|
export declare function moduleUsesInspect(mod: IrModule): boolean;
|
|
5002
5083
|
/** True when the module contains any net libCall — the link switch that
|
|
5003
5084
|
* pulls scr_net.c into the binary and has the emitted main call
|
|
5004
|
-
* scr_net_install (
|
|
5085
|
+
* scr_net_install (native-toolchain.ts + emitter; the scr_events gating precedent).
|
|
5005
5086
|
* Net-free programs pay zero bytes and keep their exact link line. Same
|
|
5006
5087
|
* generic-walk shape as moduleUsesZlib. */
|
|
5007
5088
|
export declare function moduleUsesNet(mod: IrModule): boolean;
|
|
5008
5089
|
/** True when the module contains any sym.* libCall or a symbol-kind type
|
|
5009
5090
|
* anywhere in the IR — the link switch that pulls scr_symbol.c into the
|
|
5010
|
-
* binary (
|
|
5091
|
+
* binary (native-toolchain.ts; the scr_net gating precedent — no install call, the
|
|
5011
5092
|
* Symbol.for registry initializes lazily). The TYPE check matters like
|
|
5012
5093
|
* net's: a symbol-typed local whose initializer compiled to a runtime
|
|
5013
5094
|
* fence still emits release calls that need the unit linked. Symbol-free
|
|
@@ -5036,25 +5117,25 @@ export declare function moduleUsesQs(mod: IrModule): boolean;
|
|
|
5036
5117
|
export declare function moduleUsesParseArgs(mod: IrModule): boolean;
|
|
5037
5118
|
/** True when the module contains any fs.watch/watcher.* libCall — the
|
|
5038
5119
|
* link switch that pulls scr_watch.c into the binary and has the emitted
|
|
5039
|
-
* main call scr_watch_install (
|
|
5120
|
+
* main call scr_watch_install (native-toolchain.ts + emitter; the scr_net gating
|
|
5040
5121
|
* precedent). Watch-free programs pay zero bytes and keep their exact
|
|
5041
5122
|
* link line. Same generic-walk shape as moduleUsesZlib. */
|
|
5042
5123
|
export declare function moduleUsesFsWatch(mod: IrModule): boolean;
|
|
5043
5124
|
/** True when the module contains any test.* libCall or a testCtx handle
|
|
5044
5125
|
* type — the link switch that pulls scr_test.c into the binary and has
|
|
5045
5126
|
* the emitted main return scr_test_exit_code() after the loop drains
|
|
5046
|
-
* (
|
|
5127
|
+
* (native-toolchain.ts + emitter; the moduleUsesDgram shape). Test-free programs pay
|
|
5047
5128
|
* zero bytes and keep their exact link line. */
|
|
5048
5129
|
export declare function moduleUsesNodeTest(mod: IrModule): boolean;
|
|
5049
5130
|
/** True when the module contains any dgram.* or dns.* libCall — the
|
|
5050
5131
|
* link switch that pulls scr_dgram.c into the binary and has the emitted
|
|
5051
|
-
* main call scr_dgram_install (
|
|
5132
|
+
* main call scr_dgram_install (native-toolchain.ts + emitter; the scr_net gating
|
|
5052
5133
|
* precedent — dns.lookup lives in the same unit, so either prefix
|
|
5053
5134
|
* answers). Dgram-free programs pay zero bytes and keep their exact link
|
|
5054
5135
|
* line. Same generic-walk shape as moduleUsesZlib. */
|
|
5055
5136
|
export declare function moduleUsesDgram(mod: IrModule): boolean;
|
|
5056
5137
|
/** True when the module contains any http.* libCall — the link switch
|
|
5057
|
-
* that pulls scr_http.c into the binary (
|
|
5138
|
+
* that pulls scr_http.c into the binary (native-toolchain.ts; moduleUsesNet already
|
|
5058
5139
|
* answers true for these, so scr_net.c comes along). */
|
|
5059
5140
|
export declare function moduleUsesHttpServer(mod: IrModule): boolean;
|
|
5060
5141
|
/** True when the module uses the REAL h2 surface (scr_http2.c): any core
|
|
@@ -5063,7 +5144,7 @@ export declare function moduleUsesHttpServer(mod: IrModule): boolean;
|
|
|
5063
5144
|
export declare function moduleUsesHttp2(mod: IrModule): boolean;
|
|
5064
5145
|
/** True when the module contains any tls.* or https.* libCall — the link
|
|
5065
5146
|
* switch that pulls scr_tls.c and the vendored mbedTLS archive into the
|
|
5066
|
-
* binary (
|
|
5147
|
+
* binary (native-toolchain.ts; moduleUsesNet and moduleUsesHttpServer already answer
|
|
5067
5148
|
* true for these, so scr_net.c and scr_http.c come along). TLS-free
|
|
5068
5149
|
* programs keep their exact link line and never build mbedTLS. */
|
|
5069
5150
|
export declare function moduleUsesTls(mod: IrModule): boolean;
|
|
@@ -5071,7 +5152,7 @@ export declare function moduleUsesTls(mod: IrModule): boolean;
|
|
|
5071
5152
|
* for scr_tls_ca.c, the CA-store introspection unit (getCACertificates /
|
|
5072
5153
|
* rootCertificates / setDefaultCACertificates). Deliberately SEPARATE
|
|
5073
5154
|
* from moduleUsesTls: the unit is plain PEM-block bookkeeping, so a
|
|
5074
|
-
* program that only inspects the CA store never pulls mbedTLS.
|
|
5155
|
+
* program that only inspects the CA store never pulls mbedTLS. native-toolchain.ts
|
|
5075
5156
|
* also compiles the unit whenever TLS itself links — scr_tls.c consults
|
|
5076
5157
|
* the unit's default-set override for its trust anchors. */
|
|
5077
5158
|
export declare function moduleUsesTlsCa(mod: IrModule): boolean;
|
|
@@ -5110,3 +5191,4 @@ export declare function moduleLibNondeterministicSurface(mod: IrModule): string
|
|
|
5110
5191
|
* seed on `dynCheck` and `awaitExpr` nodes, which throw on validation
|
|
5111
5192
|
* failure / promise rejection). */
|
|
5112
5193
|
export declare const MAY_THROW_LIB_FNS: ReadonlySet<IrLibFn>;
|
|
5194
|
+
export {};
|