@scriptc/compiler 0.4.7 → 0.4.8
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/node-fallback/child_process.d.ts +71 -22
- package/ambient/node-fallback/crypto.d.ts +15 -7
- package/ambient/node-fallback/events.d.ts +23 -5
- package/ambient/node-fallback/fs.d.ts +3 -2
- package/ambient/node-fallback/http.d.ts +23 -17
- package/ambient/node-fallback/https.d.ts +5 -2
- package/ambient/node-fallback/net.d.ts +6 -0
- package/ambient/node-fallback/os.d.ts +11 -1
- package/ambient/node-fallback/path-posix.d.ts +6 -0
- package/ambient/node-fallback/path-win32.d.ts +5 -0
- package/ambient/node-fallback/path.d.ts +2 -0
- package/ambient/node-fallback/zlib.d.ts +31 -2
- package/ambient/scriptc-node-fallback.d.ts +37 -7
- package/ambient/scriptc.d.ts +7 -2
- package/dist/backend/executable-features.js +11 -3
- package/dist/backend/executable-features.js.map +1 -1
- package/dist/backend/library-pack.d.ts +6 -0
- package/dist/backend/library-pack.js +17 -6
- package/dist/backend/library-pack.js.map +1 -1
- package/dist/backend/library-pack.test.d.ts +1 -0
- package/dist/backend/library-pack.test.js +28 -0
- package/dist/backend/library-pack.test.js.map +1 -0
- package/dist/backend/linker.d.ts +9 -2
- package/dist/backend/linker.js +190 -32
- package/dist/backend/linker.js.map +1 -1
- package/dist/backend/lld.d.ts +8 -4
- package/dist/backend/lld.js +19 -13
- package/dist/backend/lld.js.map +1 -1
- package/dist/backend/lld.test.js +3 -1
- package/dist/backend/lld.test.js.map +1 -1
- package/dist/backend/llvm/alloc.d.ts +15 -2
- package/dist/backend/llvm/alloc.js +172 -36
- package/dist/backend/llvm/alloc.js.map +1 -1
- package/dist/backend/llvm/alloc.test.js +69 -1
- package/dist/backend/llvm/alloc.test.js.map +1 -1
- package/dist/backend/llvm/arenas.d.ts +17 -4
- package/dist/backend/llvm/arenas.js +105 -10
- package/dist/backend/llvm/arenas.js.map +1 -1
- package/dist/backend/llvm/arenas.test.js +229 -0
- package/dist/backend/llvm/arenas.test.js.map +1 -1
- package/dist/backend/llvm/bytes-alias.js +10 -1
- package/dist/backend/llvm/bytes-alias.js.map +1 -1
- package/dist/backend/llvm/bytes-headers.js +6 -0
- package/dist/backend/llvm/bytes-headers.js.map +1 -1
- package/dist/backend/llvm/bytes-loop-versions.test.js +25 -0
- package/dist/backend/llvm/bytes-loop-versions.test.js.map +1 -1
- package/dist/backend/llvm/call-lifetimes.js +10 -0
- package/dist/backend/llvm/call-lifetimes.js.map +1 -1
- package/dist/backend/llvm/classes.d.ts +16 -9
- package/dist/backend/llvm/classes.js +142 -37
- package/dist/backend/llvm/classes.js.map +1 -1
- package/dist/backend/llvm/classes.test.js +42 -0
- package/dist/backend/llvm/classes.test.js.map +1 -1
- package/dist/backend/llvm/cpu-dispatch.d.ts +15 -5
- package/dist/backend/llvm/cpu-dispatch.js +31 -7
- package/dist/backend/llvm/cpu-dispatch.js.map +1 -1
- package/dist/backend/llvm/dyn.d.ts +12 -3
- package/dist/backend/llvm/dyn.js +31 -7
- package/dist/backend/llvm/dyn.js.map +1 -1
- package/dist/backend/llvm/emit-function.js +67 -4
- package/dist/backend/llvm/emit-function.js.map +1 -1
- package/dist/backend/llvm/emit-module.js +90 -39
- package/dist/backend/llvm/emit-module.js.map +1 -1
- package/dist/backend/llvm/emit-module.test.d.ts +1 -0
- package/dist/backend/llvm/emit-module.test.js +52 -0
- package/dist/backend/llvm/emit-module.test.js.map +1 -0
- package/dist/backend/llvm/emit-statements.js +99 -15
- package/dist/backend/llvm/emit-statements.js.map +1 -1
- package/dist/backend/llvm/emitter.d.ts +113 -8
- package/dist/backend/llvm/emitter.js +438 -67
- package/dist/backend/llvm/emitter.js.map +1 -1
- package/dist/backend/llvm/emitter.test.js +31 -3
- package/dist/backend/llvm/emitter.test.js.map +1 -1
- package/dist/backend/llvm/expr-async.js +19 -1
- package/dist/backend/llvm/expr-async.js.map +1 -1
- package/dist/backend/llvm/expr-bytes.js +16 -1
- package/dist/backend/llvm/expr-bytes.js.map +1 -1
- package/dist/backend/llvm/expr-calls.js +18 -2
- package/dist/backend/llvm/expr-calls.js.map +1 -1
- package/dist/backend/llvm/expr-dynamic.js +31 -10
- package/dist/backend/llvm/expr-dynamic.js.map +1 -1
- package/dist/backend/llvm/expr-primitives.js +31 -3
- package/dist/backend/llvm/expr-primitives.js.map +1 -1
- package/dist/backend/llvm/expr-records.d.ts +1 -1
- package/dist/backend/llvm/expr-records.js +124 -56
- package/dist/backend/llvm/expr-records.js.map +1 -1
- package/dist/backend/llvm/expr-stream-bridges.js +17 -0
- package/dist/backend/llvm/expr-stream-bridges.js.map +1 -1
- package/dist/backend/llvm/js-groups.d.ts +21 -0
- package/dist/backend/llvm/js-groups.js +277 -0
- package/dist/backend/llvm/js-groups.js.map +1 -0
- package/dist/backend/llvm/js-ic.d.ts +19 -1
- package/dist/backend/llvm/js-ic.js +96 -23
- package/dist/backend/llvm/js-ic.js.map +1 -1
- package/dist/backend/llvm/lib-dispatch.js +132 -1
- package/dist/backend/llvm/lib-dispatch.js.map +1 -1
- package/dist/backend/llvm/lib-network.js +33 -6
- package/dist/backend/llvm/lib-network.js.map +1 -1
- package/dist/backend/llvm/lib-process.js +44 -3
- package/dist/backend/llvm/lib-process.js.map +1 -1
- package/dist/backend/llvm/lib-shared.js +69 -2
- package/dist/backend/llvm/lib-shared.js.map +1 -1
- package/dist/backend/llvm/local-union-storage.test.js +32 -0
- package/dist/backend/llvm/local-union-storage.test.js.map +1 -1
- package/dist/backend/llvm/loop-state.js +7 -2
- package/dist/backend/llvm/loop-state.js.map +1 -1
- package/dist/backend/llvm/map-entry-fusion.d.ts +8 -0
- package/dist/backend/llvm/map-entry-fusion.js +3 -3
- package/dist/backend/llvm/map-entry-fusion.js.map +1 -1
- package/dist/backend/llvm/map-number-lookup.test.js +6 -6
- package/dist/backend/llvm/map-number-lookup.test.js.map +1 -1
- package/dist/backend/llvm/nullable-unions.js +7 -6
- package/dist/backend/llvm/nullable-unions.js.map +1 -1
- package/dist/backend/llvm/nullable-unions.test.js +4 -1
- package/dist/backend/llvm/nullable-unions.test.js.map +1 -1
- package/dist/backend/llvm/receivers.js +3 -0
- package/dist/backend/llvm/receivers.js.map +1 -1
- package/dist/backend/llvm/record-entry-fusion.d.ts +32 -0
- package/dist/backend/llvm/record-entry-fusion.js +217 -0
- package/dist/backend/llvm/record-entry-fusion.js.map +1 -0
- package/dist/backend/llvm/record-results.d.ts +5 -2
- package/dist/backend/llvm/record-results.js +13 -12
- package/dist/backend/llvm/record-results.js.map +1 -1
- package/dist/backend/llvm/record-views.js +12 -6
- package/dist/backend/llvm/record-views.js.map +1 -1
- package/dist/backend/llvm/reference-effects.js +1 -0
- package/dist/backend/llvm/reference-effects.js.map +1 -1
- package/dist/backend/llvm/reference-writes.js +3 -0
- package/dist/backend/llvm/reference-writes.js.map +1 -1
- package/dist/backend/llvm/region-ir.js +1 -0
- package/dist/backend/llvm/region-ir.js.map +1 -1
- package/dist/backend/llvm/region-sites.d.ts +18 -0
- package/dist/backend/llvm/region-sites.js +79 -1
- package/dist/backend/llvm/region-sites.js.map +1 -1
- package/dist/backend/llvm/runtime-registries.test.js +53 -6
- package/dist/backend/llvm/runtime-registries.test.js.map +1 -1
- package/dist/backend/llvm/serialized-ir-emission.test.js +3 -1
- package/dist/backend/llvm/serialized-ir-emission.test.js.map +1 -1
- package/dist/backend/llvm/shapes.d.ts +33 -3
- package/dist/backend/llvm/shapes.js +183 -13
- package/dist/backend/llvm/shapes.js.map +1 -1
- package/dist/backend/llvm/stack-objects.d.ts +1 -2
- package/dist/backend/llvm/stack-objects.js +8 -5
- package/dist/backend/llvm/stack-objects.js.map +1 -1
- package/dist/backend/llvm/walkers.d.ts +12 -0
- package/dist/backend/llvm/walkers.js +46 -2
- package/dist/backend/llvm/walkers.js.map +1 -1
- package/dist/backend/may-throw.js +12 -2
- package/dist/backend/may-throw.js.map +1 -1
- package/dist/backend/may-throw.test.js +13 -0
- package/dist/backend/may-throw.test.js.map +1 -1
- package/dist/backend/native/contracts.d.ts +48 -8
- package/dist/backend/native/executable.js +55 -13
- package/dist/backend/native/executable.js.map +1 -1
- package/dist/backend/native/helper-identity-record.d.ts +11 -0
- package/dist/backend/native/helper-identity-record.js +76 -0
- package/dist/backend/native/helper-identity-record.js.map +1 -0
- package/dist/backend/native/helper-identity-record.test.d.ts +1 -0
- package/dist/backend/native/helper-identity-record.test.js +101 -0
- package/dist/backend/native/helper-identity-record.test.js.map +1 -0
- package/dist/backend/native/library.js +9 -1
- package/dist/backend/native/library.js.map +1 -1
- package/dist/backend/native/runtime-inputs.js +4 -1
- package/dist/backend/native/runtime-inputs.js.map +1 -1
- package/dist/backend/native/vendor.d.ts +1 -1
- package/dist/backend/native/vendor.js +1 -1
- package/dist/backend/native/vendor.js.map +1 -1
- package/dist/backend/native-codegen-core.d.ts +13 -10
- package/dist/backend/native-codegen-core.js +26 -13
- package/dist/backend/native-codegen-core.js.map +1 -1
- package/dist/backend/native-codegen.js +27 -8
- package/dist/backend/native-codegen.js.map +1 -1
- package/dist/backend/native-codegen.test.js +110 -14
- package/dist/backend/native-codegen.test.js.map +1 -1
- package/dist/backend/native-link-info-core.d.ts +37 -8
- package/dist/backend/native-link-info-core.js.map +1 -1
- package/dist/backend/runtime-pack-core.d.ts +17 -2
- package/dist/backend/runtime-pack-core.js +18 -3
- package/dist/backend/runtime-pack-core.js.map +1 -1
- package/dist/backend/runtime-pack-targets.test.js +1 -1
- package/dist/backend/runtime-pack-targets.test.js.map +1 -1
- package/dist/backend/runtime-pack.test.js +211 -2
- package/dist/backend/runtime-pack.test.js.map +1 -1
- package/dist/backend/tree-classes.d.ts +42 -0
- package/dist/backend/tree-classes.js +723 -0
- package/dist/backend/tree-classes.js.map +1 -0
- package/dist/backend/tree-classes.test.d.ts +1 -0
- package/dist/backend/tree-classes.test.js +338 -0
- package/dist/backend/tree-classes.test.js.map +1 -0
- package/dist/backend/vendor-archives.d.ts +5 -1
- package/dist/backend/vendor-archives.js +51 -7
- package/dist/backend/vendor-archives.js.map +1 -1
- package/dist/backend/vendor-inputs.d.ts +25 -4
- package/dist/backend/vendor-inputs.js +68 -4
- package/dist/backend/vendor-inputs.js.map +1 -1
- package/dist/backend/vendor-inputs.test.js +35 -1
- package/dist/backend/vendor-inputs.test.js.map +1 -1
- package/dist/backend/warm-cache.js +1 -1
- package/dist/backend/warm-cache.js.map +1 -1
- package/dist/compat/fetch-profile.js +2 -2
- package/dist/coverage/report.js +47 -0
- package/dist/coverage/report.js.map +1 -1
- package/dist/coverage/surface-manifest.js +1 -1
- package/dist/diagnostics/codes.d.ts +8 -0
- package/dist/diagnostics/codes.js +8 -0
- package/dist/diagnostics/codes.js.map +1 -1
- package/dist/diagnostics/diagnostic.d.ts +27 -9
- package/dist/diagnostics/diagnostic.js +60 -19
- package/dist/diagnostics/diagnostic.js.map +1 -1
- package/dist/diagnostics/envelope.d.ts +18 -0
- package/dist/diagnostics/envelope.js.map +1 -1
- package/dist/executable/executable-cache.d.ts +21 -2
- package/dist/executable/executable-cache.js +21 -1
- package/dist/executable/executable-cache.js.map +1 -1
- package/dist/executable/executable-cache.test.js +123 -1
- package/dist/executable/executable-cache.test.js.map +1 -1
- package/dist/executable/prepare.js +199 -248
- package/dist/executable/prepare.js.map +1 -1
- package/dist/frontend/analysis.js +200 -18
- package/dist/frontend/analysis.js.map +1 -1
- package/dist/frontend/builtin-modules.d.ts +4 -0
- package/dist/frontend/builtin-modules.js +10 -0
- package/dist/frontend/builtin-modules.js.map +1 -1
- package/dist/frontend/early-errors.d.ts +12 -2
- package/dist/frontend/early-errors.js +535 -4
- package/dist/frontend/early-errors.js.map +1 -1
- package/dist/frontend/early-errors.test.js +165 -0
- package/dist/frontend/early-errors.test.js.map +1 -1
- package/dist/frontend/inferred-js-diagnostics.test.js +65 -0
- package/dist/frontend/inferred-js-diagnostics.test.js.map +1 -1
- package/dist/frontend/jsx-opinion-sites.test.d.ts +1 -0
- package/dist/frontend/jsx-opinion-sites.test.js +86 -0
- package/dist/frontend/jsx-opinion-sites.test.js.map +1 -0
- package/dist/frontend/lib-exports.d.ts +23 -4
- package/dist/frontend/lib-exports.js +98 -26
- package/dist/frontend/lib-exports.js.map +1 -1
- package/dist/frontend/lowering/binding-analysis.js +21 -3
- package/dist/frontend/lowering/binding-analysis.js.map +1 -1
- package/dist/frontend/lowering/buffers.d.ts +8 -0
- package/dist/frontend/lowering/buffers.js +43 -0
- package/dist/frontend/lowering/buffers.js.map +1 -0
- package/dist/frontend/lowering/builtin-calls.js +4 -0
- package/dist/frontend/lowering/builtin-calls.js.map +1 -1
- package/dist/frontend/lowering/builtin-namespaces.d.ts +3 -2
- package/dist/frontend/lowering/builtin-namespaces.js +24 -3
- package/dist/frontend/lowering/builtin-namespaces.js.map +1 -1
- package/dist/frontend/lowering/builtin-statics.d.ts +24 -0
- package/dist/frontend/lowering/builtin-statics.js +407 -0
- package/dist/frontend/lowering/builtin-statics.js.map +1 -0
- package/dist/frontend/lowering/builtins/arguments.d.ts +4 -0
- package/dist/frontend/lowering/builtins/arguments.js +12 -0
- package/dist/frontend/lowering/builtins/arguments.js.map +1 -1
- package/dist/frontend/lowering/builtins/atomics.d.ts +6 -1
- package/dist/frontend/lowering/builtins/atomics.js +87 -1
- package/dist/frontend/lowering/builtins/atomics.js.map +1 -1
- package/dist/frontend/lowering/builtins/child-process-methods.js +2 -2
- package/dist/frontend/lowering/builtins/child-process-methods.js.map +1 -1
- package/dist/frontend/lowering/builtins/child-process-sync.d.ts +13 -0
- package/dist/frontend/lowering/builtins/child-process-sync.js +1 -13
- package/dist/frontend/lowering/builtins/child-process-sync.js.map +1 -1
- package/dist/frontend/lowering/builtins/child-process.d.ts +10 -4
- package/dist/frontend/lowering/builtins/child-process.js +560 -27
- package/dist/frontend/lowering/builtins/child-process.js.map +1 -1
- package/dist/frontend/lowering/builtins/compression.d.ts +2 -2
- package/dist/frontend/lowering/builtins/compression.js +41 -21
- package/dist/frontend/lowering/builtins/compression.js.map +1 -1
- package/dist/frontend/lowering/builtins/constants.js +7 -2
- package/dist/frontend/lowering/builtins/constants.js.map +1 -1
- package/dist/frontend/lowering/builtins/filesystem-calls.d.ts +1 -0
- package/dist/frontend/lowering/builtins/filesystem-calls.js +28 -2
- package/dist/frontend/lowering/builtins/filesystem-calls.js.map +1 -1
- package/dist/frontend/lowering/builtins/json.js +4 -0
- package/dist/frontend/lowering/builtins/json.js.map +1 -1
- package/dist/frontend/lowering/builtins/module-calls.js +3 -1
- package/dist/frontend/lowering/builtins/module-calls.js.map +1 -1
- package/dist/frontend/lowering/builtins/numbers.d.ts +4 -1
- package/dist/frontend/lowering/builtins/numbers.js +10 -2
- package/dist/frontend/lowering/builtins/numbers.js.map +1 -1
- package/dist/frontend/lowering/builtins/operating-system.d.ts +6 -3
- package/dist/frontend/lowering/builtins/operating-system.js +96 -16
- package/dist/frontend/lowering/builtins/operating-system.js.map +1 -1
- package/dist/frontend/lowering/builtins/process.d.ts +2 -2
- package/dist/frontend/lowering/builtins/process.js +103 -8
- package/dist/frontend/lowering/builtins/process.js.map +1 -1
- package/dist/frontend/lowering/builtins/promises.js +169 -8
- package/dist/frontend/lowering/builtins/promises.js.map +1 -1
- package/dist/frontend/lowering/builtins/properties.js +6 -2
- package/dist/frontend/lowering/builtins/properties.js.map +1 -1
- package/dist/frontend/lowering/builtins/readline.d.ts +6 -4
- package/dist/frontend/lowering/builtins/readline.js +180 -36
- package/dist/frontend/lowering/builtins/readline.js.map +1 -1
- package/dist/frontend/lowering/builtins/url.js +35 -12
- package/dist/frontend/lowering/builtins/url.js.map +1 -1
- package/dist/frontend/lowering/builtins/webassembly.js +2 -0
- package/dist/frontend/lowering/builtins/webassembly.js.map +1 -1
- package/dist/frontend/lowering/call-arguments.d.ts +10 -0
- package/dist/frontend/lowering/call-arguments.js +37 -2
- package/dist/frontend/lowering/call-arguments.js.map +1 -1
- package/dist/frontend/lowering/call-signatures.d.ts +10 -0
- package/dist/frontend/lowering/call-signatures.js +103 -0
- package/dist/frontend/lowering/call-signatures.js.map +1 -1
- package/dist/frontend/lowering/class-construction.d.ts +14 -2
- package/dist/frontend/lowering/class-construction.js +99 -5
- package/dist/frontend/lowering/class-construction.js.map +1 -1
- package/dist/frontend/lowering/class-dynamic-dispatch.d.ts +9 -0
- package/dist/frontend/lowering/class-dynamic-dispatch.js +1283 -1030
- package/dist/frontend/lowering/class-dynamic-dispatch.js.map +1 -1
- package/dist/frontend/lowering/class-dynamic-dispatch.test.js +158 -0
- package/dist/frontend/lowering/class-dynamic-dispatch.test.js.map +1 -1
- package/dist/frontend/lowering/class-prototypes.js +20 -15
- package/dist/frontend/lowering/class-prototypes.js.map +1 -1
- package/dist/frontend/lowering/class-runtime-statics.d.ts +8 -0
- package/dist/frontend/lowering/class-runtime-statics.js +20 -1
- package/dist/frontend/lowering/class-runtime-statics.js.map +1 -1
- package/dist/frontend/lowering/class-unions.js +21 -4
- package/dist/frontend/lowering/class-unions.js.map +1 -1
- package/dist/frontend/lowering/coercions/function-adapters.js +9 -0
- package/dist/frontend/lowering/coercions/function-adapters.js.map +1 -1
- package/dist/frontend/lowering/coercions/state.d.ts +8 -0
- package/dist/frontend/lowering/coercions/state.js +17 -0
- package/dist/frontend/lowering/coercions/state.js.map +1 -1
- package/dist/frontend/lowering/coercions/structural-plans.js +20 -5
- package/dist/frontend/lowering/coercions/structural-plans.js.map +1 -1
- package/dist/frontend/lowering/coercions/structural.js +10 -1
- package/dist/frontend/lowering/coercions/structural.js.map +1 -1
- package/dist/frontend/lowering/coercions/unions.d.ts +2 -1
- package/dist/frontend/lowering/coercions/unions.js +54 -10
- package/dist/frontend/lowering/coercions/unions.js.map +1 -1
- package/dist/frontend/lowering/constructor-returns.d.ts +23 -2
- package/dist/frontend/lowering/constructor-returns.js +284 -58
- package/dist/frontend/lowering/constructor-returns.js.map +1 -1
- package/dist/frontend/lowering/containers/array-callbacks.js +156 -62
- package/dist/frontend/lowering/containers/array-callbacks.js.map +1 -1
- package/dist/frontend/lowering/containers/array-construction.js +21 -3
- package/dist/frontend/lowering/containers/array-construction.js.map +1 -1
- package/dist/frontend/lowering/containers/array-from-async.js +139 -3
- package/dist/frontend/lowering/containers/array-from-async.js.map +1 -1
- package/dist/frontend/lowering/containers/array-iteration.d.ts +14 -4
- package/dist/frontend/lowering/containers/array-iteration.js +24 -7
- package/dist/frontend/lowering/containers/array-iteration.js.map +1 -1
- package/dist/frontend/lowering/containers/array-methods.js +14 -11
- package/dist/frontend/lowering/containers/array-methods.js.map +1 -1
- package/dist/frontend/lowering/containers/bytes.d.ts +6 -0
- package/dist/frontend/lowering/containers/bytes.js +446 -86
- package/dist/frontend/lowering/containers/bytes.js.map +1 -1
- package/dist/frontend/lowering/containers/callback-arguments.d.ts +5 -0
- package/dist/frontend/lowering/containers/callback-arguments.js +21 -12
- package/dist/frontend/lowering/containers/callback-arguments.js.map +1 -1
- package/dist/frontend/lowering/containers/collection-grouping.js +421 -2
- package/dist/frontend/lowering/containers/collection-grouping.js.map +1 -1
- package/dist/frontend/lowering/containers/collection-methods.js +52 -17
- package/dist/frontend/lowering/containers/collection-methods.js.map +1 -1
- package/dist/frontend/lowering/containers/iterator-helpers.d.ts +23 -0
- package/dist/frontend/lowering/containers/iterator-helpers.js +176 -10
- package/dist/frontend/lowering/containers/iterator-helpers.js.map +1 -1
- package/dist/frontend/lowering/containers/string-and-regexp.d.ts +5 -2
- package/dist/frontend/lowering/containers/string-and-regexp.js +45 -11
- package/dist/frontend/lowering/containers/string-and-regexp.js.map +1 -1
- package/dist/frontend/lowering/crypto-tables.d.ts +3 -3
- package/dist/frontend/lowering/crypto-tables.js +5 -5
- package/dist/frontend/lowering/dispatch-sites.js +3 -0
- package/dist/frontend/lowering/dispatch-sites.js.map +1 -1
- package/dist/frontend/lowering/divergences.d.ts +40 -0
- package/dist/frontend/lowering/divergences.js +239 -20
- package/dist/frontend/lowering/divergences.js.map +1 -1
- package/dist/frontend/lowering/effect-free.d.ts +12 -0
- package/dist/frontend/lowering/effect-free.js +44 -0
- package/dist/frontend/lowering/effect-free.js.map +1 -0
- package/dist/frontend/lowering/expressions/array-literals.d.ts +10 -0
- package/dist/frontend/lowering/expressions/array-literals.js +62 -0
- package/dist/frontend/lowering/expressions/array-literals.js.map +1 -1
- package/dist/frontend/lowering/expressions/binary.js +115 -5
- package/dist/frontend/lowering/expressions/binary.js.map +1 -1
- package/dist/frontend/lowering/expressions/element-access.js +151 -7
- package/dist/frontend/lowering/expressions/element-access.js.map +1 -1
- package/dist/frontend/lowering/expressions/hosted-narrowing.d.ts +15 -0
- package/dist/frontend/lowering/expressions/hosted-narrowing.js +54 -1
- package/dist/frontend/lowering/expressions/hosted-narrowing.js.map +1 -1
- package/dist/frontend/lowering/expressions/identifiers.js +31 -2
- package/dist/frontend/lowering/expressions/identifiers.js.map +1 -1
- package/dist/frontend/lowering/expressions/narrowing.d.ts +3 -0
- package/dist/frontend/lowering/expressions/narrowing.js +175 -22
- package/dist/frontend/lowering/expressions/narrowing.js.map +1 -1
- package/dist/frontend/lowering/expressions/object-literals.js +173 -11
- package/dist/frontend/lowering/expressions/object-literals.js.map +1 -1
- package/dist/frontend/lowering/expressions/optional-chains.js +5 -1
- package/dist/frontend/lowering/expressions/optional-chains.js.map +1 -1
- package/dist/frontend/lowering/expressions/property-access.d.ts +8 -0
- package/dist/frontend/lowering/expressions/property-access.js +379 -109
- package/dist/frontend/lowering/expressions/property-access.js.map +1 -1
- package/dist/frontend/lowering/expressions/relational.js +237 -7
- package/dist/frontend/lowering/expressions/relational.js.map +1 -1
- package/dist/frontend/lowering/expressions/typeof.js +8 -0
- package/dist/frontend/lowering/expressions/typeof.js.map +1 -1
- package/dist/frontend/lowering/expressions/union-fields.d.ts +20 -1
- package/dist/frontend/lowering/expressions/union-fields.js +103 -13
- package/dist/frontend/lowering/expressions/union-fields.js.map +1 -1
- package/dist/frontend/lowering/expressions/updates.js +74 -55
- package/dist/frontend/lowering/expressions/updates.js.map +1 -1
- package/dist/frontend/lowering/function-returns.js +37 -10
- package/dist/frontend/lowering/function-returns.js.map +1 -1
- package/dist/frontend/lowering/general-streams.js +5 -0
- package/dist/frontend/lowering/general-streams.js.map +1 -1
- package/dist/frontend/lowering/generator-delegation.d.ts +15 -7
- package/dist/frontend/lowering/generator-delegation.js +301 -118
- package/dist/frontend/lowering/generator-delegation.js.map +1 -1
- package/dist/frontend/lowering/generic-functions.d.ts +27 -1
- package/dist/frontend/lowering/generic-functions.js +432 -18
- package/dist/frontend/lowering/generic-functions.js.map +1 -1
- package/dist/frontend/lowering/global-function-values.d.ts +25 -0
- package/dist/frontend/lowering/global-function-values.js +193 -0
- package/dist/frontend/lowering/global-function-values.js.map +1 -0
- package/dist/frontend/lowering/global-values.d.ts +6 -4
- package/dist/frontend/lowering/global-values.js +24 -10
- package/dist/frontend/lowering/global-values.js.map +1 -1
- package/dist/frontend/lowering/host-global-values.d.ts +31 -0
- package/dist/frontend/lowering/host-global-values.js +121 -0
- package/dist/frontend/lowering/host-global-values.js.map +1 -0
- package/dist/frontend/lowering/host-globals.d.ts +74 -0
- package/dist/frontend/lowering/host-globals.js +344 -0
- package/dist/frontend/lowering/host-globals.js.map +1 -0
- package/dist/frontend/lowering/http2-constants.js +1 -1
- package/dist/frontend/lowering/iterator-adapters.js +46 -17
- package/dist/frontend/lowering/iterator-adapters.js.map +1 -1
- package/dist/frontend/lowering/iterator-prototype.d.ts +30 -0
- package/dist/frontend/lowering/iterator-prototype.js +160 -0
- package/dist/frontend/lowering/iterator-prototype.js.map +1 -0
- package/dist/frontend/lowering/key-order-witness.js +43 -22
- package/dist/frontend/lowering/key-order-witness.js.map +1 -1
- package/dist/frontend/lowering/key-order-witness.test.js +1 -0
- package/dist/frontend/lowering/key-order-witness.test.js.map +1 -1
- package/dist/frontend/lowering/lib-boundary.js +11 -3
- package/dist/frontend/lowering/lib-boundary.js.map +1 -1
- package/dist/frontend/lowering/lower-assert.js +30 -15
- package/dist/frontend/lowering/lower-assert.js.map +1 -1
- package/dist/frontend/lowering/lower-async-iteration.d.ts +11 -0
- package/dist/frontend/lowering/lower-async-iteration.js +15 -0
- package/dist/frontend/lowering/lower-async-iteration.js.map +1 -1
- package/dist/frontend/lowering/lower-builtin-values.js +11 -1
- package/dist/frontend/lowering/lower-builtin-values.js.map +1 -1
- package/dist/frontend/lowering/lower-calls.d.ts +25 -0
- package/dist/frontend/lowering/lower-calls.js +929 -227
- package/dist/frontend/lowering/lower-calls.js.map +1 -1
- package/dist/frontend/lowering/lower-calls.test.js +59 -16
- package/dist/frontend/lowering/lower-calls.test.js.map +1 -1
- package/dist/frontend/lowering/lower-classes.d.ts +20 -0
- package/dist/frontend/lowering/lower-classes.js +468 -44
- package/dist/frontend/lowering/lower-classes.js.map +1 -1
- package/dist/frontend/lowering/lower-event-emitter.d.ts +6 -2
- package/dist/frontend/lowering/lower-event-emitter.js +253 -83
- package/dist/frontend/lowering/lower-event-emitter.js.map +1 -1
- package/dist/frontend/lowering/lower-exprs.d.ts +1 -1
- package/dist/frontend/lowering/lower-exprs.js +71 -20
- package/dist/frontend/lowering/lower-exprs.js.map +1 -1
- package/dist/frontend/lowering/lower-functions.js +25 -6
- package/dist/frontend/lowering/lower-functions.js.map +1 -1
- package/dist/frontend/lowering/lower-generators.js +57 -10
- package/dist/frontend/lowering/lower-generators.js.map +1 -1
- package/dist/frontend/lowering/lower-global-value.d.ts +6 -0
- package/dist/frontend/lowering/lower-global-value.js +14 -5
- package/dist/frontend/lowering/lower-global-value.js.map +1 -1
- package/dist/frontend/lowering/lower-inspect.d.ts +4 -0
- package/dist/frontend/lowering/lower-inspect.js +638 -64
- package/dist/frontend/lowering/lower-inspect.js.map +1 -1
- package/dist/frontend/lowering/lower-modules.js +48 -2
- package/dist/frontend/lowering/lower-modules.js.map +1 -1
- package/dist/frontend/lowering/lower-namespaces.js +18 -0
- package/dist/frontend/lowering/lower-namespaces.js.map +1 -1
- package/dist/frontend/lowering/lower-node-island.js +16 -6
- package/dist/frontend/lowering/lower-node-island.js.map +1 -1
- package/dist/frontend/lowering/lower-server.js +303 -87
- package/dist/frontend/lowering/lower-server.js.map +1 -1
- package/dist/frontend/lowering/lower-stdlib.js +45 -0
- package/dist/frontend/lowering/lower-stdlib.js.map +1 -1
- package/dist/frontend/lowering/lower-stmts.d.ts +14 -11
- package/dist/frontend/lowering/lower-stmts.js +270 -52
- package/dist/frontend/lowering/lower-stmts.js.map +1 -1
- package/dist/frontend/lowering/lower-timers.js +110 -27
- package/dist/frontend/lowering/lower-timers.js.map +1 -1
- package/dist/frontend/lowering/lower-url.js +6 -3
- package/dist/frontend/lowering/lower-url.js.map +1 -1
- package/dist/frontend/lowering/lowerer.d.ts +227 -21
- package/dist/frontend/lowering/lowerer.js +651 -92
- package/dist/frontend/lowering/lowerer.js.map +1 -1
- package/dist/frontend/lowering/lowerer.test.js +18 -0
- package/dist/frontend/lowering/lowerer.test.js.map +1 -1
- package/dist/frontend/lowering/lowering-facts.d.ts +110 -0
- package/dist/frontend/lowering/lowering-facts.js +323 -0
- package/dist/frontend/lowering/lowering-facts.js.map +1 -0
- package/dist/frontend/lowering/lowering-facts.test.d.ts +1 -0
- package/dist/frontend/lowering/lowering-facts.test.js +100 -0
- package/dist/frontend/lowering/lowering-facts.test.js.map +1 -0
- package/dist/frontend/lowering/nan-coded-reads.d.ts +27 -4
- package/dist/frontend/lowering/nan-coded-reads.js +112 -9
- package/dist/frontend/lowering/nan-coded-reads.js.map +1 -1
- package/dist/frontend/lowering/optional-arguments.d.ts +4 -0
- package/dist/frontend/lowering/optional-arguments.js +26 -2
- package/dist/frontend/lowering/optional-arguments.js.map +1 -1
- package/dist/frontend/lowering/partial-assertions.d.ts +0 -3
- package/dist/frontend/lowering/partial-assertions.js +9 -15
- package/dist/frontend/lowering/partial-assertions.js.map +1 -1
- package/dist/frontend/lowering/primitive-throws.d.ts +100 -0
- package/dist/frontend/lowering/primitive-throws.js +241 -0
- package/dist/frontend/lowering/primitive-throws.js.map +1 -0
- package/dist/frontend/lowering/primitive-wrappers.js +1 -0
- package/dist/frontend/lowering/primitive-wrappers.js.map +1 -1
- package/dist/frontend/lowering/record-inherited.d.ts +17 -1
- package/dist/frontend/lowering/record-inherited.js +16 -2
- package/dist/frontend/lowering/record-inherited.js.map +1 -1
- package/dist/frontend/lowering/record-links.d.ts +73 -0
- package/dist/frontend/lowering/record-links.js +797 -0
- package/dist/frontend/lowering/record-links.js.map +1 -0
- package/dist/frontend/lowering/runtime-optional-provenance.d.ts +27 -7
- package/dist/frontend/lowering/runtime-optional-provenance.js +25 -11
- package/dist/frontend/lowering/runtime-optional-provenance.js.map +1 -1
- package/dist/frontend/lowering/runtime-optional-report.d.ts +40 -0
- package/dist/frontend/lowering/runtime-optional-report.js +300 -0
- package/dist/frontend/lowering/runtime-optional-report.js.map +1 -0
- package/dist/frontend/lowering/scoped-type-memo.test.d.ts +1 -0
- package/dist/frontend/lowering/scoped-type-memo.test.js +86 -0
- package/dist/frontend/lowering/scoped-type-memo.test.js.map +1 -0
- package/dist/frontend/lowering/static-typeof.d.ts +3 -1
- package/dist/frontend/lowering/static-typeof.js +6 -1
- package/dist/frontend/lowering/static-typeof.js.map +1 -1
- package/dist/frontend/lowering/strict-mode.d.ts +1 -5
- package/dist/frontend/lowering/strict-mode.js +4 -30
- package/dist/frontend/lowering/strict-mode.js.map +1 -1
- package/dist/frontend/lowering/structural-instances.d.ts +7 -0
- package/dist/frontend/lowering/structural-instances.js +23 -0
- package/dist/frontend/lowering/structural-instances.js.map +1 -1
- package/dist/frontend/lowering/surfaces.d.ts +15 -1
- package/dist/frontend/lowering/surfaces.js +78 -10
- package/dist/frontend/lowering/surfaces.js.map +1 -1
- package/dist/frontend/lowering/union-retag.d.ts +13 -1
- package/dist/frontend/lowering/union-retag.js +55 -1
- package/dist/frontend/lowering/union-retag.js.map +1 -1
- package/dist/frontend/lowering/union-retag.test.js +51 -0
- package/dist/frontend/lowering/union-retag.test.js.map +1 -1
- package/dist/frontend/lowering/unit-journal.d.ts +8 -0
- package/dist/frontend/lowering/unit-journal.js +14 -0
- package/dist/frontend/lowering/unit-journal.js.map +1 -1
- package/dist/frontend/lowering/unit-journal.test.js +36 -1
- package/dist/frontend/lowering/unit-journal.test.js.map +1 -1
- package/dist/frontend/lowering/zlib-constants.js +3 -2
- package/dist/frontend/lowering/zlib-constants.js.map +1 -1
- package/dist/frontend/npm-static.js +78 -9
- package/dist/frontend/npm-static.js.map +1 -1
- package/dist/frontend/npm-static.test.js +95 -2
- package/dist/frontend/npm-static.test.js.map +1 -1
- package/dist/frontend/pipeline.d.ts +5 -4
- package/dist/frontend/pipeline.js +94 -31
- package/dist/frontend/pipeline.js.map +1 -1
- package/dist/frontend/pipeline.test.js +68 -11
- package/dist/frontend/pipeline.test.js.map +1 -1
- package/dist/frontend/program.d.ts +62 -2
- package/dist/frontend/program.js +695 -422
- package/dist/frontend/program.js.map +1 -1
- package/dist/frontend/program.test.js +37 -1
- package/dist/frontend/program.test.js.map +1 -1
- package/dist/frontend/services-node.d.ts +7 -0
- package/dist/frontend/services-node.js +32 -1
- package/dist/frontend/services-node.js.map +1 -1
- package/dist/frontend/services-node.test.js +51 -0
- package/dist/frontend/services-node.test.js.map +1 -1
- package/dist/frontend/shape-inference/overlay.js +68 -2
- package/dist/frontend/shape-inference/overlay.js.map +1 -1
- package/dist/frontend/tier-analysis.d.ts +9 -0
- package/dist/frontend/tier-analysis.js +1 -0
- package/dist/frontend/tier-analysis.js.map +1 -1
- package/dist/frontend/tsc-codes.d.ts +57 -3
- package/dist/frontend/tsc-codes.js +935 -150
- package/dist/frontend/tsc-codes.js.map +1 -1
- package/dist/frontend/tsc-codes.test.js +221 -12
- package/dist/frontend/tsc-codes.test.js.map +1 -1
- package/dist/frontend/type-mapper.d.ts +91 -9
- package/dist/frontend/type-mapper.js +622 -181
- package/dist/frontend/type-mapper.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +80 -15
- package/dist/index.js.map +1 -1
- package/dist/index.test.d.ts +1 -0
- package/dist/index.test.js +60 -0
- package/dist/index.test.js.map +1 -0
- package/dist/ir/builtin-effects.js +43 -0
- package/dist/ir/builtin-effects.js.map +1 -1
- package/dist/ir/builtin-signatures.d.ts +1 -1
- package/dist/ir/builtin-signatures.js +242 -16
- package/dist/ir/builtin-signatures.js.map +1 -1
- package/dist/ir/callback-specialization.d.ts +3 -2
- package/dist/ir/callback-specialization.js +35 -25
- package/dist/ir/callback-specialization.js.map +1 -1
- package/dist/ir/capture-values.d.ts +8 -4
- package/dist/ir/capture-values.js +9 -6
- package/dist/ir/capture-values.js.map +1 -1
- package/dist/ir/char-unit-locals.d.ts +6 -2
- package/dist/ir/char-unit-locals.js +11 -2
- package/dist/ir/char-unit-locals.js.map +1 -1
- package/dist/ir/class-key-index.d.ts +18 -0
- package/dist/ir/class-key-index.js +29 -0
- package/dist/ir/class-key-index.js.map +1 -0
- package/dist/ir/class-key-index.test.d.ts +1 -0
- package/dist/ir/class-key-index.test.js +25 -0
- package/dist/ir/class-key-index.test.js.map +1 -0
- package/dist/ir/codec.generated.d.ts +1 -1
- package/dist/ir/codec.generated.js +724 -648
- package/dist/ir/codec.generated.js.map +1 -1
- package/dist/ir/constant-globals.d.ts +5 -2
- package/dist/ir/constant-globals.js +25 -27
- package/dist/ir/constant-globals.js.map +1 -1
- package/dist/ir/expression-inlining.d.ts +4 -2
- package/dist/ir/expression-inlining.js +8 -2
- package/dist/ir/expression-inlining.js.map +1 -1
- package/dist/ir/field-values.d.ts +5 -2
- package/dist/ir/field-values.js +32 -21
- package/dist/ir/field-values.js.map +1 -1
- package/dist/ir/fields.generated.d.ts +11 -2
- package/dist/ir/fields.generated.js +8 -0
- package/dist/ir/fields.generated.js.map +1 -1
- package/dist/ir/final-fields.js +1 -1
- package/dist/ir/final-fields.js.map +1 -1
- package/dist/ir/function-references.d.ts +5 -4
- package/dist/ir/function-references.js +7 -4
- package/dist/ir/function-references.js.map +1 -1
- package/dist/ir/function-references.test.js +7 -0
- package/dist/ir/function-references.test.js.map +1 -1
- package/dist/ir/init-only-globals.d.ts +4 -2
- package/dist/ir/init-only-globals.js +17 -18
- package/dist/ir/init-only-globals.js.map +1 -1
- package/dist/ir/inline-array-views.js +1 -0
- package/dist/ir/inline-array-views.js.map +1 -1
- package/dist/ir/int32-slots.js +7 -0
- package/dist/ir/int32-slots.js.map +1 -1
- package/dist/ir/ir.d.ts +59 -4
- package/dist/ir/ir.js +7 -0
- package/dist/ir/ir.js.map +1 -1
- package/dist/ir/js-groups.d.ts +51 -0
- package/dist/ir/js-groups.js +394 -0
- package/dist/ir/js-groups.js.map +1 -0
- package/dist/ir/js-groups.test.d.ts +1 -0
- package/dist/ir/js-groups.test.js +555 -0
- package/dist/ir/js-groups.test.js.map +1 -0
- package/dist/ir/js-ic.js +30 -5
- package/dist/ir/js-ic.js.map +1 -1
- package/dist/ir/js-ic.test.js +27 -1
- package/dist/ir/js-ic.test.js.map +1 -1
- package/dist/ir/node-index.d.ts +23 -6
- package/dist/ir/node-index.js +126 -49
- package/dist/ir/node-index.js.map +1 -1
- package/dist/ir/numeric-call-specialization.d.ts +4 -2
- package/dist/ir/numeric-call-specialization.js +40 -26
- package/dist/ir/numeric-call-specialization.js.map +1 -1
- package/dist/ir/paired-while-loops.d.ts +4 -2
- package/dist/ir/paired-while-loops.js +8 -2
- package/dist/ir/paired-while-loops.js.map +1 -1
- package/dist/ir/parameter-versions.d.ts +13 -4
- package/dist/ir/parameter-versions.js +63 -42
- package/dist/ir/parameter-versions.js.map +1 -1
- package/dist/ir/property-bags.d.ts +4 -2
- package/dist/ir/property-bags.js +22 -17
- package/dist/ir/property-bags.js.map +1 -1
- package/dist/ir/row-pairs.d.ts +4 -2
- package/dist/ir/row-pairs.js +12 -11
- package/dist/ir/row-pairs.js.map +1 -1
- package/dist/ir/runtime-features.d.ts +87 -12
- package/dist/ir/runtime-features.js +263 -160
- package/dist/ir/runtime-features.js.map +1 -1
- package/dist/ir/runtime-features.test.js +109 -139
- package/dist/ir/runtime-features.test.js.map +1 -1
- package/dist/ir/runtime-jam-loops.d.ts +35 -0
- package/dist/ir/runtime-jam-loops.js +604 -0
- package/dist/ir/runtime-jam-loops.js.map +1 -0
- package/dist/ir/runtime-jam-loops.test.d.ts +1 -0
- package/dist/ir/runtime-jam-loops.test.js +565 -0
- package/dist/ir/runtime-jam-loops.test.js.map +1 -0
- package/dist/ir/saturating-loop-jams.d.ts +4 -2
- package/dist/ir/saturating-loop-jams.js +11 -10
- package/dist/ir/saturating-loop-jams.js.map +1 -1
- package/dist/ir/scalar-records.d.ts +5 -2
- package/dist/ir/scalar-records.js +12 -2
- package/dist/ir/scalar-records.js.map +1 -1
- package/dist/ir/self-captures.d.ts +4 -2
- package/dist/ir/self-captures.js +32 -27
- package/dist/ir/self-captures.js.map +1 -1
- package/dist/ir/serialize.d.ts +6 -1
- package/dist/ir/serialize.js +87 -23
- package/dist/ir/serialize.js.map +1 -1
- package/dist/ir/serialize.test.js +26 -0
- package/dist/ir/serialize.test.js.map +1 -1
- package/dist/ir/tiers.js +1 -0
- package/dist/ir/tiers.js.map +1 -1
- package/dist/ir/traverse.js +4 -0
- package/dist/ir/traverse.js.map +1 -1
- package/dist/ir/typed-argument-clones.d.ts +30 -0
- package/dist/ir/typed-argument-clones.js +789 -0
- package/dist/ir/typed-argument-clones.js.map +1 -0
- package/dist/ir/union-arm-loops.d.ts +3 -0
- package/dist/ir/union-arm-loops.js +373 -0
- package/dist/ir/union-arm-loops.js.map +1 -0
- package/dist/ir/union-arm-loops.test.d.ts +1 -0
- package/dist/ir/union-arm-loops.test.js +230 -0
- package/dist/ir/union-arm-loops.test.js.map +1 -0
- package/dist/ir/validate.js +88 -18
- package/dist/ir/validate.js.map +1 -1
- package/dist/library/compiler-self-identity.d.ts +8 -2
- package/dist/library/compiler-self-identity.js +92 -18
- package/dist/library/compiler-self-identity.js.map +1 -1
- package/dist/library/compiler-self-identity.test.js +150 -3
- package/dist/library/compiler-self-identity.test.js.map +1 -1
- package/dist/library/int-infer.d.ts +5 -0
- package/dist/library/int-infer.js +15 -3
- package/dist/library/int-infer.js.map +1 -1
- package/dist/library/ir-policy.js +1 -0
- package/dist/library/ir-policy.js.map +1 -1
- package/dist/library/library-cache.d.ts +4 -0
- package/dist/library/library-cache.js +2 -0
- package/dist/library/library-cache.js.map +1 -1
- package/dist/library/library-cache.test.js +26 -0
- package/dist/library/library-cache.test.js.map +1 -1
- package/dist/library/prepare.js +99 -31
- package/dist/library/prepare.js.map +1 -1
- package/dist/native/cache.d.ts +7 -0
- package/dist/native/cache.js +47 -0
- package/dist/native/cache.js.map +1 -1
- package/dist/native/cache.test.js +13 -1
- package/dist/native/cache.test.js.map +1 -1
- package/dist/native/cli.js +1 -1
- package/dist/native/cli.js.map +1 -1
- package/dist/native/compiler.js +18 -3
- package/dist/native/compiler.js.map +1 -1
- package/dist/native/executable-cache-open.test.js +31 -5
- package/dist/native/executable-cache-open.test.js.map +1 -1
- package/dist/native/executable-cache.d.ts +6 -1
- package/dist/native/executable-cache.js +7 -1
- package/dist/native/executable-cache.js.map +1 -1
- package/dist/native/prepare.d.ts +3 -0
- package/dist/native/prepare.js +43 -26
- package/dist/native/prepare.js.map +1 -1
- package/dist/native/prepare.test.js +25 -3
- package/dist/native/prepare.test.js.map +1 -1
- package/dist/native/sanitizer.js +10 -1
- package/dist/native/sanitizer.js.map +1 -1
- package/dist/native/sanitizer.test.js +7 -2
- package/dist/native/sanitizer.test.js.map +1 -1
- package/dist/node-islands/boundary.d.ts +12 -0
- package/dist/node-islands/boundary.js +38 -6
- package/dist/node-islands/boundary.js.map +1 -1
- package/dist/node-islands/boundary.test.d.ts +1 -0
- package/dist/node-islands/boundary.test.js +76 -0
- package/dist/node-islands/boundary.test.js.map +1 -0
- package/dist/node-islands/detect.d.ts +9 -0
- package/dist/node-islands/detect.js +110 -0
- package/dist/node-islands/detect.js.map +1 -1
- package/dist/node-islands/detect.test.js +24 -0
- package/dist/node-islands/detect.test.js.map +1 -1
- package/dist/node-islands/graph-islands.d.ts +40 -0
- package/dist/node-islands/graph-islands.js +128 -0
- package/dist/node-islands/graph-islands.js.map +1 -0
- package/dist/node-islands/growth.d.ts +57 -0
- package/dist/node-islands/growth.js +205 -0
- package/dist/node-islands/growth.js.map +1 -0
- package/dist/node-islands/report.d.ts +12 -0
- package/dist/node-islands/report.js +28 -0
- package/dist/node-islands/report.js.map +1 -1
- package/dist/node-islands/report.test.js +2 -0
- package/dist/node-islands/report.test.js.map +1 -1
- package/dist/node-islands/rules.js +5 -0
- package/dist/node-islands/rules.js.map +1 -1
- package/dist/node-islands/scan.d.ts +11 -2
- package/dist/node-islands/scan.js +61 -9
- package/dist/node-islands/scan.js.map +1 -1
- package/dist/wasm/translate.js +11 -5
- package/dist/wasm/translate.js.map +1 -1
- package/dist/wasm/translate.test.js +35 -0
- package/dist/wasm/translate.test.js.map +1 -1
- package/package.json +20 -20
- package/surface-manifest.json +184 -117
|
@@ -5,6 +5,8 @@ import { type UnitStore } from "./unit-reuse.js";
|
|
|
5
5
|
import { StructuralPositions } from "./structural-positions.js";
|
|
6
6
|
import { type NodeIslandSet } from "../../node-islands/boundary.js";
|
|
7
7
|
import type { IslandBinding, IslandModuleBinding } from "./lower-node-island.js";
|
|
8
|
+
import { LoweringFacts } from "./lowering-facts.js";
|
|
9
|
+
import { type AdmittedOpinion } from "../tsc-codes.js";
|
|
8
10
|
import type { ConstructorReturnPlan } from "./constructor-returns.js";
|
|
9
11
|
import { type CycleInitFlag } from "./cycle-initialization.js";
|
|
10
12
|
import { type JsonRequireModule } from "./json-require.js";
|
|
@@ -14,12 +16,15 @@ import { type StdioPatchSite } from "./builtins/process.js";
|
|
|
14
16
|
import { type WasmModuleReport } from "../../wasm/discover.js";
|
|
15
17
|
import type { FieldLift } from "./coercions/structural-plans.js";
|
|
16
18
|
import { CoercionState } from "./coercions/state.js";
|
|
19
|
+
import { RuntimeOptionalProvenance } from "./runtime-optional-provenance.js";
|
|
20
|
+
import { type RuntimeOptionalNarrowing } from "./runtime-optional-report.js";
|
|
17
21
|
import { NarrowingStability } from "./narrowing-stability.js";
|
|
18
22
|
import { StringIndexBounds } from "./string-index-bounds.js";
|
|
19
23
|
import { NanCodedReads } from "./nan-coded-reads.js";
|
|
20
24
|
import { RuntimeOptionalLocals } from "./runtime-optional-locals.js";
|
|
21
25
|
import { type ContractAnnotations } from "../contract-types.js";
|
|
22
26
|
import type { WidthLift } from "./width-lift.js";
|
|
27
|
+
import type { UnionClassRoute } from "./union-retag.js";
|
|
23
28
|
import { type FnCtx } from "./function-context.js";
|
|
24
29
|
import type { FrontendServices } from "../services.js";
|
|
25
30
|
import type { FsPathPlan } from "./builtins/fs-paths.js";
|
|
@@ -27,6 +32,7 @@ import { type ProtocolDispatch } from "./class-protocol-dispatch.js";
|
|
|
27
32
|
import { type DynamicFunction } from "../../ir/tiers.js";
|
|
28
33
|
import { type TierMode, type TierReport } from "../tier-analysis.js";
|
|
29
34
|
import { DeferredModuleInitializers } from "./deferred-module-initializers.js";
|
|
35
|
+
import { type LinkedHelper, type StringFallback } from "./record-links.js";
|
|
30
36
|
import { type ClassSymbolKey } from "./symbol-fields.js";
|
|
31
37
|
import type { HttpClientFnBinding } from "./lower-server.js";
|
|
32
38
|
export type { WidthLift } from "./width-lift.js";
|
|
@@ -36,9 +42,9 @@ import { type UnionLiteral } from "../union-discriminants.js";
|
|
|
36
42
|
import type { ScrDiagnostic, TypeFailure, TypeFailureSlot } from "../../diagnostics/diagnostic.js";
|
|
37
43
|
import { type DynamicSlotEntry } from "../../diagnostics/dynamic-slots.js";
|
|
38
44
|
import { UNSUPPORTED } from "../../diagnostics/diagnostic.js";
|
|
39
|
-
import type { IrClassDef, IrExpr, IrFfiImport, IrFunction, IrGlobal, IrLocal, IrModule, IrParam, IrRecordShape, IrStmt, IrType, IrUnionDef, SrcLoc } from "../../ir/ir.js";
|
|
45
|
+
import type { IrClassDef, IrExpr, IrFfiImport, IrFunction, IrGlobal, IrLocal, IrModule, IrParam, IrRecordLink, IrRecordShape, IrStmt, IrType, IrUnionDef, SrcLoc } from "../../ir/ir.js";
|
|
40
46
|
import { type StartupCrash, type CycleEdge } from "../program.js";
|
|
41
|
-
import { ShapeRegistry, type TypeMapperCtx, UnionRegistry } from "../type-mapper.js";
|
|
47
|
+
import { ShapeRegistry, type SymbolProvenance, type TypeMapperCtx, UnionRegistry } from "../type-mapper.js";
|
|
42
48
|
import { type CompoundOp, type StdlibFnEntry, type BuiltinModuleFn } from "./surfaces.js";
|
|
43
49
|
import { type BuiltinClassRef } from "./builtins/class-values.js";
|
|
44
50
|
import { type FileParts } from "./lower-modules.js";
|
|
@@ -46,7 +52,7 @@ import { type SplitRequireBinding } from "./cjs-inline-require.js";
|
|
|
46
52
|
import { type ClassInfo, type ClassIteratorInfo, type ClassIteratorOptions, type GenericClassInfo, findStaticOn } from "./lower-classes.js";
|
|
47
53
|
import { type MixinFnShape } from "./lower-mixins.js";
|
|
48
54
|
import { type ParamShape, type FnSig } from "./call-signatures.js";
|
|
49
|
-
import { type GenericFnInfo, type GenericInstance } from "./generic-functions.js";
|
|
55
|
+
import { type GenericFnInfo, type GenericInstance, type GenericAliasPresence } from "./generic-functions.js";
|
|
50
56
|
import type { InstantiationPath } from "./instantiation-path.js";
|
|
51
57
|
import { type ArrayHofInfo } from "./containers/array-pipelines.js";
|
|
52
58
|
import { type RecordOvfCapturePlan } from "./containers/indexed-objects.js";
|
|
@@ -183,9 +189,16 @@ export interface LowerResult {
|
|
|
183
189
|
tiers?: TierReport;
|
|
184
190
|
/** The program replaces a process output stream's write method, with the
|
|
185
191
|
* site: the executable planner refuses the combination with Node islands
|
|
186
|
-
* (
|
|
192
|
+
* (SC8006), whose process objects would not see the patch. Present only
|
|
187
193
|
* when the build has islands. */
|
|
188
194
|
stdioPatches?: StdioPatchSite[];
|
|
195
|
+
/** LIBRARY mode (LowerOptions.libRoots): each root name resolved through
|
|
196
|
+
* the entry module's export table to the unit that supplies it — the
|
|
197
|
+
* entry's own unit for a direct export, the module-tagged unit of the
|
|
198
|
+
* declaration for a re-exported one. Absent when the build passes no lib
|
|
199
|
+
* roots; a root name that resolves to no unit is absent from the map
|
|
200
|
+
* (the export-map resolution reports it as SC4002). */
|
|
201
|
+
libExportUnits?: ReadonlyMap<string, string>;
|
|
189
202
|
}
|
|
190
203
|
export interface LowerOptions {
|
|
191
204
|
/** Packages that run in Node islands (scope-B NI-4): their imports lower
|
|
@@ -217,17 +230,23 @@ export interface LowerOptions {
|
|
|
217
230
|
* resolution walk and named-import link checks): the program
|
|
218
231
|
* compiles to that startup crash. */
|
|
219
232
|
startupCrash?: StartupCrash | null;
|
|
233
|
+
/** LoadResult.admittedOpinions: every JavaScript checker diagnostic
|
|
234
|
+
* preflight admitted under an opinion row (tsc-codes.ts, JS_OPINIONS). A
|
|
235
|
+
* view's lowering path is gated on one of these records. */
|
|
236
|
+
admittedOpinions?: readonly AdmittedOpinion[] | undefined;
|
|
220
237
|
/** LoadResult.inlineRequireCycleCalls. */
|
|
221
238
|
inlineRequireCycleCalls?: ReadonlySet<ts.Node> | undefined;
|
|
222
239
|
/** LoadResult.moduleEdges. */
|
|
223
240
|
moduleEdges?: ReadonlyMap<ts.SourceFile, readonly CycleEdge[]> | undefined;
|
|
224
241
|
/** LoadResult.dynamicImportRejections. */
|
|
225
242
|
dynamicImportRejections?: ReadonlyMap<ts.SourceFile, StartupCrash> | undefined;
|
|
226
|
-
/** LIBRARY mode's reachability roots: the profile-mapped
|
|
227
|
-
* entry module. Executable builds root at the entry's top level alone
|
|
243
|
+
/** LIBRARY mode's reachability roots: the profile-mapped export names of
|
|
244
|
+
* the entry module. Executable builds root at the entry's top level alone
|
|
228
245
|
* (an unreferenced export dead-strips); a library's exports are called from
|
|
229
|
-
* OUTSIDE the graph, so discovery seeds them alongside the init
|
|
230
|
-
*
|
|
246
|
+
* OUTSIDE the graph, so discovery seeds them alongside the init bodies.
|
|
247
|
+
* Each name resolves through the entry module's export table (see
|
|
248
|
+
* libExportUnit), so a re-exported function seeds the unit of the module
|
|
249
|
+
* that declares it. */
|
|
231
250
|
libRoots?: readonly string[];
|
|
232
251
|
/** Outbound native FFI declarations from a validated format-1 manifest.
|
|
233
252
|
* Calls of their exact ambient TypeScript bindings lower to direct C ABI
|
|
@@ -334,6 +353,9 @@ export interface LowererMode {
|
|
|
334
353
|
* pass saw an untyped value flow into a stream slot
|
|
335
354
|
* (requiresDynNodeStreams). */
|
|
336
355
|
dynNodeStreams?: boolean;
|
|
356
|
+
/** LoadResult.admittedOpinions: the JS opinion sites preflight admitted
|
|
357
|
+
* (opinionAt). */
|
|
358
|
+
admittedOpinions?: readonly AdmittedOpinion[] | undefined;
|
|
337
359
|
/** LoadResult.inlineRequireCycleCalls. */
|
|
338
360
|
inlineRequireCycleCalls?: ReadonlySet<ts.Node> | undefined;
|
|
339
361
|
/** LoadResult.dynamicImportRejections. */
|
|
@@ -347,6 +369,11 @@ export interface LowererMode {
|
|
|
347
369
|
* always-reachable init bodies and module building, and report deferred
|
|
348
370
|
* collection diagnostics nothing flushed. */
|
|
349
371
|
remainder?: boolean;
|
|
372
|
+
/** Coverage (--explain-dynamic): keep the runtime-optional storage
|
|
373
|
+
* decisions and the reads the checker narrows below the widened
|
|
374
|
+
* storage, for the report (runtime-optional-report.ts). Report-only:
|
|
375
|
+
* lowering does not change. */
|
|
376
|
+
runtimeOptionalReport?: boolean;
|
|
350
377
|
/** Node's startup refusal (preflight's resolution walk / named-import
|
|
351
378
|
* link checks): %main opens with exactly this throw, before any
|
|
352
379
|
* module init — Node refuses the whole graph before anything evaluates,
|
|
@@ -358,6 +385,11 @@ export interface LowererMode {
|
|
|
358
385
|
/** LowerOptions.tierMode, shared by every pass. */
|
|
359
386
|
tierMode?: TierMode;
|
|
360
387
|
workerTargets?: readonly ts.SourceFile[];
|
|
388
|
+
/** The program facts every pass of ONE island round shares
|
|
389
|
+
* (lowering-facts.ts): the same program and moduleOrder, so a pass that
|
|
390
|
+
* omits it simply gets a private copy. lowerToIrWithIslands builds one and
|
|
391
|
+
* hands it to every Lowerer of the round. */
|
|
392
|
+
facts?: LoweringFacts;
|
|
361
393
|
}
|
|
362
394
|
export declare function lowerToIr(program: ts.Program, entry: ts.SourceFile, moduleOrder: ts.SourceFile[], options?: LowerOptions): LowerResult;
|
|
363
395
|
/** The native namespace type produced by a literal static import() of a
|
|
@@ -437,6 +469,9 @@ export declare class Lowerer {
|
|
|
437
469
|
exports: boolean;
|
|
438
470
|
moduleExports: boolean;
|
|
439
471
|
}>;
|
|
472
|
+
/** JavaScript checker diagnostics preflight admitted under an opinion row
|
|
473
|
+
* (LoadResult.admittedOpinions): the sites opinionAt answers for. */
|
|
474
|
+
readonly admittedOpinions: readonly AdmittedOpinion[];
|
|
440
475
|
/** Inline require() calls whose module edge closes a require cycle
|
|
441
476
|
* (LoadResult.inlineRequireCycleCalls). */
|
|
442
477
|
readonly inlineRequireCycleCalls: ReadonlySet<ts.Node>;
|
|
@@ -447,6 +482,11 @@ export declare class Lowerer {
|
|
|
447
482
|
* exact binding discipline as globals/functions. */
|
|
448
483
|
readonly staticCallables: Map<ts.Symbol, StaticCallableProjection>;
|
|
449
484
|
readonly genericFnsBySymbol: Map<ts.Symbol, GenericFnInfo>;
|
|
485
|
+
/** Temporal-dead-zone flags of module-scope generic ALIASES (`const h =
|
|
486
|
+
* id`) that code can read before the declaration runs: the alias has no
|
|
487
|
+
* binding storage of its own, so a read that can come first checks a
|
|
488
|
+
* flag instead (bindingGenericFnAliasInfoOf). */
|
|
489
|
+
readonly genericAliasPresence: Map<ts.Symbol, GenericAliasPresence>;
|
|
450
490
|
/** Typed declarations' instances for arguments that keep their own
|
|
451
491
|
* record or array layout (structural-instances.ts). */
|
|
452
492
|
readonly structuralFnInfos: Map<ts.Symbol, GenericFnInfo>;
|
|
@@ -579,6 +619,24 @@ export declare class Lowerer {
|
|
|
579
619
|
left: ts.Node;
|
|
580
620
|
right: ts.Node;
|
|
581
621
|
}[];
|
|
622
|
+
/** The value instance each pinned binding holds (`const f: Fn = ident`),
|
|
623
|
+
* keyed by the binding's declaration: two pins of one generic
|
|
624
|
+
* declaration at different signatures are separate compiled closures, so
|
|
625
|
+
* checkGenericIdentityPins refuses to compare them. */
|
|
626
|
+
readonly pinnedValueInstances: Map<import("../ts7/ast-node.js").AstNode, {
|
|
627
|
+
info: GenericFnInfo;
|
|
628
|
+
instance: string;
|
|
629
|
+
}>;
|
|
630
|
+
/** Function-vs-function identity comparisons recorded while lowering,
|
|
631
|
+
* with the closure name each operand lowered to when it is a closure
|
|
632
|
+
* (an inline instantiation expression names its instance directly). */
|
|
633
|
+
readonly pinnedIdentityComparisons: {
|
|
634
|
+
node: ts.Node;
|
|
635
|
+
left: ts.Node;
|
|
636
|
+
right: ts.Node;
|
|
637
|
+
leftInstance: string | undefined;
|
|
638
|
+
rightInstance: string | undefined;
|
|
639
|
+
}[];
|
|
582
640
|
/** The identity comparison check reports once, after all lowering. */
|
|
583
641
|
genericIdentityCheckDone: boolean;
|
|
584
642
|
/** Function expressions lowered against a fixed target signature with a
|
|
@@ -690,7 +748,7 @@ export declare class Lowerer {
|
|
|
690
748
|
* (programPatchesStdio in builtins/process.ts). */
|
|
691
749
|
patchesStdio: boolean | null;
|
|
692
750
|
/** The write-replacement site programPatchesStdio found: the executable
|
|
693
|
-
* planner refuses it beside Node islands (
|
|
751
|
+
* planner refuses it beside Node islands (SC8006). */
|
|
694
752
|
readonly stdioPatchSites: StdioPatchSite[];
|
|
695
753
|
requestInitPropMutatedSyms: Set<ts.Symbol> | null;
|
|
696
754
|
emitterEventTable: Map<string, EventSig> | null;
|
|
@@ -754,6 +812,15 @@ export declare class Lowerer {
|
|
|
754
812
|
* prepass. This includes explicit annotations: unchecked TS annotations do
|
|
755
813
|
* not prove that an array property read produced a value. */
|
|
756
814
|
readonly runtimeOptionalBindingTypes: Map<ts.Symbol, IrType>;
|
|
815
|
+
/** The indexed-read analysis's storage decisions: kept for the coverage
|
|
816
|
+
* report when --explain-dynamic asks, and written to stderr under
|
|
817
|
+
* SCRIPTC_DEBUG_RUNTIME_OPTIONAL=1. */
|
|
818
|
+
readonly runtimeOptionalProvenance: RuntimeOptionalProvenance | null;
|
|
819
|
+
/** Coverage (--explain-dynamic): the widened slots whose storage holds
|
|
820
|
+
* an absence the checker's type does not admit, with the reads that
|
|
821
|
+
* narrow them below it (runtime-optional-report.ts). Empty unless the
|
|
822
|
+
* report was asked for. */
|
|
823
|
+
runtimeOptionalNarrowings: readonly RuntimeOptionalNarrowing[];
|
|
757
824
|
/** JavaScript bindings assigned values outside their declared type
|
|
758
825
|
* (analyzeJsWidenedBindings): checked-dynamic storage, and reads keep the
|
|
759
826
|
* stored value instead of narrowing it to the checker's type. */
|
|
@@ -1121,6 +1188,10 @@ export declare class Lowerer {
|
|
|
1121
1188
|
readonly builtinCallableValueFns: Map<string, string>;
|
|
1122
1189
|
/** Each builtin function-value adapter's Node name, for boxed values. */
|
|
1123
1190
|
readonly builtinCallableValueNames: Map<string, string>;
|
|
1191
|
+
/** Adapters whose name holds on the main thread only
|
|
1192
|
+
* (BuiltinModuleFn.valueNameMainThreadOnly): a Worker boxes them
|
|
1193
|
+
* unnamed, as Node's unwrapped function is. */
|
|
1194
|
+
readonly builtinCallableValueMainThreadNames: Set<string>;
|
|
1124
1195
|
/** Builtin function values whose `length` differs from their adapter's
|
|
1125
1196
|
* parameter count (BuiltinModuleFn.valueLength), by adapter name. */
|
|
1126
1197
|
readonly builtinCallableValueLengths: Map<string, number>;
|
|
@@ -1405,6 +1476,32 @@ export declare class Lowerer {
|
|
|
1405
1476
|
}>;
|
|
1406
1477
|
/** Classes used as ThreadSlots keys: their hierarchies carry a slot word. */
|
|
1407
1478
|
readonly threadSlotKeys: Set<string>;
|
|
1479
|
+
/** The narrowing conversions that link copies to their sources, by
|
|
1480
|
+
* `${from}:${to}` (record-links.ts). */
|
|
1481
|
+
readonly recordLinks: Map<string, IrRecordLink>;
|
|
1482
|
+
/** Where each of recordLinks' pairs was first converted, by compose
|
|
1483
|
+
* helper name. */
|
|
1484
|
+
readonly recordLinkLocs: Map<string, SrcLoc>;
|
|
1485
|
+
/** The conversion each %rec.string and %rec.primitive helper's calls
|
|
1486
|
+
* replace, by helper name (record-links.ts recordStringCall). */
|
|
1487
|
+
readonly recordStringFallbacks: Map<string, StringFallback>;
|
|
1488
|
+
/** The conversion helpers that build copies of recordLinks' pairs. */
|
|
1489
|
+
readonly recordLinkSites: {
|
|
1490
|
+
link: IrRecordLink;
|
|
1491
|
+
projection: IrFunction;
|
|
1492
|
+
}[];
|
|
1493
|
+
/** Object.prototype methods other than toString called by name on
|
|
1494
|
+
* record types (finalizeRecordLinks checks them against link sources). */
|
|
1495
|
+
readonly recordMethodCalls: {
|
|
1496
|
+
shapeId: string;
|
|
1497
|
+
method: string;
|
|
1498
|
+
loc: SrcLoc;
|
|
1499
|
+
}[];
|
|
1500
|
+
/** Completions of "custom" linked helpers (record-links.ts), which
|
|
1501
|
+
* finalizeRecordLinks runs once the links are known. */
|
|
1502
|
+
readonly linkedHelperFinalizers: (() => void)[];
|
|
1503
|
+
/** Helpers over record types that finalizeRecordLinks completes. */
|
|
1504
|
+
readonly linkedHelpers: LinkedHelper[];
|
|
1408
1505
|
/** The JavaScript names of object literals' methods, by lifted function
|
|
1409
1506
|
* (function-names.ts). */
|
|
1410
1507
|
readonly objectMethodNames: Map<string, string>;
|
|
@@ -1471,12 +1568,42 @@ export declare class Lowerer {
|
|
|
1471
1568
|
readonly unions: UnionRegistry;
|
|
1472
1569
|
/** Context-free successful type mappings. See TypeMapperCtx.typeMemo. */
|
|
1473
1570
|
readonly typeMemo: Map<number, IrType>;
|
|
1474
|
-
|
|
1475
|
-
|
|
1571
|
+
/** Successful mappings that read no generic-instantiation scope state
|
|
1572
|
+
* (TypeMapperCtx.typeMemoShared): the same answer in every binding scope
|
|
1573
|
+
* and at the top level. A generic instance's unscoped types land here, so
|
|
1574
|
+
* the next instance — and the top level — answers them without mapping
|
|
1575
|
+
* again. */
|
|
1576
|
+
readonly sharedTypeMemo: Map<number, IrType>;
|
|
1577
|
+
/** Successful mappings per generic binding context (TypeMapperCtx.typeMemoFor):
|
|
1578
|
+
* by the installed typeParamBindings map, then the typeParamTsBindings map
|
|
1579
|
+
* (NO_BINDINGS stands for null). Binding maps are filled before they are
|
|
1580
|
+
* installed and never change while installed, so their identity is the
|
|
1581
|
+
* context. The lowerer owns the memos: they live as long as it does. */
|
|
1582
|
+
private readonly scopedTypeMemos;
|
|
1583
|
+
/** The program facts this Lowerer shares with the other passes of its
|
|
1584
|
+
* island round (lowering-facts.ts). Every field that is a fact lives
|
|
1585
|
+
* there, so a pass that re-derives it cannot disagree with its siblings.
|
|
1586
|
+
* A Lowerer built without LowererMode.facts gets a private copy (tests,
|
|
1587
|
+
* one-off lowerings). */
|
|
1588
|
+
readonly facts: LoweringFacts;
|
|
1589
|
+
/** SCRIPTC_LOWERING_FACTS_VERIFY: the shared provenance memo's hit check,
|
|
1590
|
+
* public so contexts built from this Lowerer (webassembly.ts's hand-made
|
|
1591
|
+
* ctx, property-access.ts passing the Lowerer itself) verify too. */
|
|
1592
|
+
readonly verifySymbolProvenance: ((sym: ts.Symbol, answer: SymbolProvenance) => void) | undefined;
|
|
1476
1593
|
/** The one mapType context: registries + hooks, assembled in the
|
|
1477
1594
|
* constructor (typeParamResolver reads the CURRENT instantiation bindings
|
|
1478
1595
|
* through `this`, so the same ctx serves generic bodies too). */
|
|
1479
1596
|
readonly typeCtx: TypeMapperCtx;
|
|
1597
|
+
/** The context lastContextMemo answered for. Every mapType call asks for the
|
|
1598
|
+
* current binding context, and a lowering pass stays in one context for
|
|
1599
|
+
* thousands of calls, so the pair of identity checks below is the whole
|
|
1600
|
+
* cost on that path: the two-level lookup only runs when the context
|
|
1601
|
+
* actually changes. */
|
|
1602
|
+
private lastMemoOuter;
|
|
1603
|
+
private lastMemoInner;
|
|
1604
|
+
private lastMemo;
|
|
1605
|
+
/** The memo for the current binding context (scopedTypeMemos). */
|
|
1606
|
+
currentTypeMemo(): Map<number, IrType>;
|
|
1480
1607
|
readonly stats: LowerStats;
|
|
1481
1608
|
/** Reachability edge sink: every resolution of
|
|
1482
1609
|
* a reference to a lowerable body reports its name here — recorded even
|
|
@@ -1493,6 +1620,11 @@ export declare class Lowerer {
|
|
|
1493
1620
|
/** Whether the program freezes, seals or prevents extensions of untyped
|
|
1494
1621
|
* values other than fresh literals (noteUntypedIntegrity). */
|
|
1495
1622
|
untypedIntegrity: boolean;
|
|
1623
|
+
/** A JavaScript source constructs an ArrayBuffer with a maxByteLength,
|
|
1624
|
+
* or reads a member that resizes, grows or detaches a buffer
|
|
1625
|
+
* (buffers.ts, t262-dc §2.4). Sets IrModule.bytesHeadersMutable and arms
|
|
1626
|
+
* the scr_js_buffers views registry in %main. */
|
|
1627
|
+
buffersMutable: boolean;
|
|
1496
1628
|
readonly liftedFns: IrFunction[];
|
|
1497
1629
|
/** `for … of` and `for await` loops over untyped iterables, by their
|
|
1498
1630
|
* generator-kind local (generator-dynamic-dispatch.ts steps the program's
|
|
@@ -1678,6 +1810,8 @@ export declare class Lowerer {
|
|
|
1678
1810
|
* refuse and fence exactly as before. Stage S6 demotes the units of
|
|
1679
1811
|
* committed refusals in "auto" and keeps them refusals in "static-only". */
|
|
1680
1812
|
readonly tierMode: TierMode;
|
|
1813
|
+
/** LowererMode.runtimeOptionalReport. */
|
|
1814
|
+
readonly runtimeOptionalReport: boolean;
|
|
1681
1815
|
readonly generalNodeStreams: boolean;
|
|
1682
1816
|
readonly dynNodeStreams: boolean;
|
|
1683
1817
|
/** Functions finishModule placed in the dynamic tier (ir/tiers.ts). */
|
|
@@ -1838,7 +1972,6 @@ export declare class Lowerer {
|
|
|
1838
1972
|
* (decl-origin.ts), by IrModule.declOrigins index. */
|
|
1839
1973
|
readonly declOrigins: string[];
|
|
1840
1974
|
private readonly declOriginIds;
|
|
1841
|
-
private readonly packageFileMemo;
|
|
1842
1975
|
private readonly slotOriginMemo;
|
|
1843
1976
|
/** The value whose slot coercion is being lowered, while that value is
|
|
1844
1977
|
* in a package file: union extractions built for it carry the slot's
|
|
@@ -1859,22 +1992,34 @@ export declare class Lowerer {
|
|
|
1859
1992
|
/** The origin of the package-declared slot a value flows into. */
|
|
1860
1993
|
slotOriginOf(node: ts.Node): string | null;
|
|
1861
1994
|
private inPackageFileOf;
|
|
1862
|
-
private declBoundaryMemo;
|
|
1863
1995
|
get declBoundary(): boolean;
|
|
1864
1996
|
/** Tracked classes' bag initializers over a typed `this`
|
|
1865
1997
|
* (class-dynamic-dispatch.ts recordBagInitializers). */
|
|
1866
1998
|
readonly classBagInitializers: Map<string, IrExpr>;
|
|
1867
1999
|
constructor(program: ts.Program, entry: ts.SourceFile, moduleOrder: ts.SourceFile[], mode?: LowererMode);
|
|
2000
|
+
/** Whether preflight admitted the checker diagnostic `code` at `node`: a
|
|
2001
|
+
* site in `admittedOpinions` (tsc-codes.ts, JS_OPINIONS) whose span the
|
|
2002
|
+
* node contains. A `widen`/`throw`/`island` row's lowering path is reached
|
|
2003
|
+
* only through this query, so a program that admitted no such site keeps
|
|
2004
|
+
* the IR it has today. */
|
|
2005
|
+
opinionAt(node: ts.Node, code: number): boolean;
|
|
2006
|
+
/** opinionAt's index: admitted sites by file and code (one index per
|
|
2007
|
+
* admitted-opinions list, shared by the round). */
|
|
2008
|
+
private admittedOpinionSites;
|
|
1868
2009
|
/** A JavaScript file TypeScript type-checks (`// @ts-check`, or the
|
|
1869
2010
|
* project's `checkJs`). Its JSDoc types are enforced like TypeScript
|
|
1870
2011
|
* annotations, so its classes use them as a TypeScript file would. */
|
|
1871
2012
|
checkedJsFile(sf: ts.SourceFile): boolean;
|
|
1872
2013
|
registerBuiltinErrorClasses(): void;
|
|
1873
|
-
private classProtocols;
|
|
1874
2014
|
classImplementedProtocol(type: ts.Type): boolean;
|
|
1875
2015
|
/** A record view a Map or Set answers: it keeps protocol identity but
|
|
1876
2016
|
* calls the collection's own methods, never a stored member. */
|
|
1877
2017
|
classCollectionView(type: ts.Type): boolean;
|
|
2018
|
+
/** The round's shared class protocol index (lowering-facts.ts): a pure
|
|
2019
|
+
* analysis of (checker, moduleOrder). With SCRIPTC_LOWERING_FACTS_VERIFY
|
|
2020
|
+
* this Lowerer builds its own index and every answer is compared. */
|
|
2021
|
+
private verifyProtocol;
|
|
2022
|
+
private ownClassProtocols;
|
|
1878
2023
|
/** Declared class fields may store a DYN value only when its static type
|
|
1879
2024
|
* is `unknown` or `object` (also with `null` or `undefined`, or an array
|
|
1880
2025
|
* of those), names checked protocol identity, is an owned runtime
|
|
@@ -1956,6 +2101,10 @@ export declare class Lowerer {
|
|
|
1956
2101
|
* program-unique through the file qualifier, and collision-free with
|
|
1957
2102
|
* user identifiers ('%'). */
|
|
1958
2103
|
readonly classNamer: (decl: ts.ClassLikeDeclaration) => string;
|
|
2104
|
+
/** True for a class declaration lexically inside a function: only such a
|
|
2105
|
+
* class can take an instantiated owner's name (classNamer), and only there
|
|
2106
|
+
* can localClassInstance's instantiation-stack check answer. */
|
|
2107
|
+
private classInsideFunction;
|
|
1959
2108
|
/** Follows import aliases to the original declaration's symbol. Every
|
|
1960
2109
|
* value reference resolves through here, so it doubles as the flush
|
|
1961
2110
|
* point for deferred collection diagnostics: resolving a reference to a
|
|
@@ -2125,13 +2274,24 @@ export declare class Lowerer {
|
|
|
2125
2274
|
* TypeScript types the binding from its initializer and reports the
|
|
2126
2275
|
* assignment (TS2322), which JavaScript files relax, so the binding takes
|
|
2127
2276
|
* checked-dynamic storage and holds whatever the program stores. JSDoc
|
|
2128
|
-
* type annotations keep their declared storage.
|
|
2277
|
+
* type annotations keep their declared storage.
|
|
2278
|
+
*
|
|
2279
|
+
* A set accessor's unannotated parameter joins them: a JavaScript setter's
|
|
2280
|
+
* parameter is whatever the caller passes, and `paramShape` gives the slot
|
|
2281
|
+
* checked-dynamic storage. The checker types it from the twin getter's
|
|
2282
|
+
* return when one exists (`set value(next) { this.stored = next; }` beside
|
|
2283
|
+
* `get value() { return this.stored; }` types `next` as the getter's type),
|
|
2284
|
+
* and otherwise reports TS7032; reading the parameter at the inferred type
|
|
2285
|
+
* would check the caller's value back into it and throw where Node stores
|
|
2286
|
+
* it as is. A JSDoc `@param` type keeps its declared storage, exactly like
|
|
2287
|
+
* a variable's `@type`. */
|
|
2129
2288
|
analyzeJsWidenedBindings(parts: FileParts[]): void;
|
|
2130
2289
|
analyzeRuntimeOptionalArrayReads(parts: FileParts[]): void;
|
|
2131
2290
|
run(): LowerResult;
|
|
2132
2291
|
/** Final retention, pruning, and module assembly shared by ordinary emit
|
|
2133
|
-
* and the retained reachability worklist.
|
|
2134
|
-
|
|
2292
|
+
* and the retained reachability worklist. `library` is true for a native
|
|
2293
|
+
* library's emit, whose runtime has no builtin-statics unit. */
|
|
2294
|
+
finishModule(functions: IrFunction[], library?: boolean): LowerResult;
|
|
2135
2295
|
/** True when `t` (recursively) names a class instance type with no
|
|
2136
2296
|
* registered ClassInfo — the shape of a JS class whose collection fenced.
|
|
2137
2297
|
* Used by run()'s global pruning; shapes/unions recurse with a seen-set
|
|
@@ -2159,6 +2319,19 @@ export declare class Lowerer {
|
|
|
2159
2319
|
* remainder do; an externally-gated emit pass leaves the counting to the
|
|
2160
2320
|
* remainder (the declaration was never reached). */
|
|
2161
2321
|
countsSkips(): boolean;
|
|
2322
|
+
/** LIBRARY mode: the unit the root name `name` seeds, resolved through
|
|
2323
|
+
* the entry module's export table. A direct `export function f` and every
|
|
2324
|
+
* facade that names it (`export { f }`, `export { f as g }`,
|
|
2325
|
+
* `export { f } from "./m"`, `export * from "./m"`) reach the same
|
|
2326
|
+
* declaration, and the unit is whatever the declaration's own module
|
|
2327
|
+
* qualified it as — the entry's bare name or another module's `%mN.` tag.
|
|
2328
|
+
* Memoized: the four emit passes and the result's export map read one
|
|
2329
|
+
* answer. Null when the name is not an export of a compiled function
|
|
2330
|
+
* (SC4002/SC4004/SC4007 report it). */
|
|
2331
|
+
libExportUnit(name: string): string | null;
|
|
2332
|
+
/** One answer per root name: a pass builds its own Lowerer, and the
|
|
2333
|
+
* signatures this reads are collected before any body is lowered. */
|
|
2334
|
+
private readonly libExportUnits;
|
|
2162
2335
|
/** Reachable emit: computes the set of body names the program's entry
|
|
2163
2336
|
* reaches and retains each body IR as it lowers. Seeds are the per-file
|
|
2164
2337
|
* init bodies (top-level statements always run); edges fire from
|
|
@@ -2324,6 +2497,10 @@ export declare class Lowerer {
|
|
|
2324
2497
|
* `sym`, when given, picks the wording: surface declared only by the
|
|
2325
2498
|
* adopted @types/node is blamed at @types/node. */
|
|
2326
2499
|
noLowering(surface: string, node: ts.Node, hint?: string, sym?: ts.Symbol | null, reason?: string): never;
|
|
2500
|
+
/** A read of a Node 24 global the native runtime does not implement
|
|
2501
|
+
* (host-globals.ts): refusing is the honest answer, and the reason id
|
|
2502
|
+
* lets a Node island run the module instead. */
|
|
2503
|
+
hostGlobalFence(name: string, node: ts.Node): never;
|
|
2327
2504
|
/** The declaration-side refusal of a stdlib-global snapshot read as a
|
|
2328
2505
|
* VALUE (stdlibGlobalAliasDecl): report once, at the declaration's name,
|
|
2329
2506
|
* naming the type the program asked the compiler to hold when it has a
|
|
@@ -2555,7 +2732,7 @@ export declare class Lowerer {
|
|
|
2555
2732
|
recordUnionRouteHelper(source: IrType & {
|
|
2556
2733
|
kind: "record";
|
|
2557
2734
|
}, toId: string, loc: SrcLoc): string | null;
|
|
2558
|
-
unionRetagHelper(fromId: string, toId: string, loc: SrcLoc, trappable?: ReadonlySet<number>): string | null;
|
|
2735
|
+
unionRetagHelper(fromId: string, toId: string, loc: SrcLoc, trappable?: ReadonlySet<number>, classRoutes?: ReadonlyMap<number, readonly UnionClassRoute[]>): string | null;
|
|
2559
2736
|
narrowedArmHelper(fromId: string, target: IrType, loc: SrcLoc, message?: string): string | null;
|
|
2560
2737
|
checkedNarrowCall(helper: string, value: IrExpr, type: IrType, loc: SrcLoc): IrExpr;
|
|
2561
2738
|
deferredReadHelper(fromId: string, target: IrType, loc: SrcLoc): string | null;
|
|
@@ -2654,6 +2831,12 @@ export declare class Lowerer {
|
|
|
2654
2831
|
* is awaited instead, and a literal whose contextual build does convert
|
|
2655
2832
|
* keeps the ordinary lowering, so no convertible value changes. */
|
|
2656
2833
|
private returnsFreshRecord;
|
|
2834
|
+
/** A parenthesized fresh object literal that does not declare `then`. */
|
|
2835
|
+
private isFreshRecordLiteral;
|
|
2836
|
+
/** One arm of a returned conditional: a fresh object literal whose
|
|
2837
|
+
* ordinary construction cannot reach the declared result (see
|
|
2838
|
+
* returnsFreshRecord). */
|
|
2839
|
+
private freshRecordLiteralInto;
|
|
2657
2840
|
/** An array literal or a `new Map(...)`, `new Set(...)` or `new
|
|
2658
2841
|
* Array(...)` of the builtins: a fresh collection, never a thenable, so
|
|
2659
2842
|
* an async return takes the declared result type as its construction
|
|
@@ -2973,7 +3156,7 @@ export declare class Lowerer {
|
|
|
2973
3156
|
* call runs for its effects (it throws or exits), and the expression ends
|
|
2974
3157
|
* in an unreachable trap instead of producing a value. The result reads an
|
|
2975
3158
|
* uninitialized hidden local that control never reaches. */
|
|
2976
|
-
divergentValue(call: IrExpr, expected: IrType): IrExpr;
|
|
3159
|
+
divergentValue(call: IrExpr, expected: IrType, message?: string): IrExpr;
|
|
2977
3160
|
/** A function-scope local bound to NO ts.Symbol — the hidden ABI slot of a
|
|
2978
3161
|
* defaulted parameter (the parameter's symbol binds to the separately-
|
|
2979
3162
|
* declared body local; nothing in the source can name this one). */
|
|
@@ -3084,6 +3267,27 @@ export declare class Lowerer {
|
|
|
3084
3267
|
* declare hits the SC2020-family fence). The file half of every
|
|
3085
3268
|
* supported-surface provenance check. */
|
|
3086
3269
|
readonly isStdlibFile: (sf: ts.SourceFile) => boolean;
|
|
3270
|
+
/** provenanceOf's answers (type-mapper.ts's SymbolProvenance), keyed by
|
|
3271
|
+
* symbol. A symbol's declarations are fixed for one loaded program, and
|
|
3272
|
+
* the mapper asks on every object type it maps, so the round shares one
|
|
3273
|
+
* map (lowering-facts.ts). */
|
|
3274
|
+
get symbolProvenance(): Map<ts.Symbol, SymbolProvenance>;
|
|
3275
|
+
/** SCRIPTC_LOWERING_FACTS_VERIFY: the shared provenance memo answered, so
|
|
3276
|
+
* recompute it and fail on a disagreement (lowering-facts.ts). */
|
|
3277
|
+
private verifySymbolProvenanceAnswer;
|
|
3278
|
+
/** Whether the file holds declarations of an explicitly mapped external
|
|
3279
|
+
* type surface (coverage's --external-types) or of the declaration-typed
|
|
3280
|
+
* boundary's generated types. Both are fixed for the program, and the
|
|
3281
|
+
* mapper asks per type (lowering-facts.ts keeps the answer). */
|
|
3282
|
+
readonly isExternalTypeFile: (sf: ts.SourceFile) => boolean;
|
|
3283
|
+
/** tsgoPath(resolve(sf.fileName)): the path spelling the module tables
|
|
3284
|
+
* key by. A source file's path cannot change while the program lowers. */
|
|
3285
|
+
readonly pathOf: (sf: ts.SourceFile) => string;
|
|
3286
|
+
/** Whether values of `type` are island handles (boundary.ts's
|
|
3287
|
+
* isForeignType; the answers and their invalidation live in
|
|
3288
|
+
* lowering-facts.ts). The type mapper asks this on every mapType call,
|
|
3289
|
+
* memo hits included. */
|
|
3290
|
+
private foreignType;
|
|
3087
3291
|
nodeTypesOnlySymbol(sym: ts.Symbol | null | undefined): boolean;
|
|
3088
3292
|
readonly isNpmFile: (sf: ts.SourceFile) => boolean;
|
|
3089
3293
|
npmPackageOf(type: ts.Type): string | null;
|
|
@@ -3240,11 +3444,13 @@ export declare class Lowerer {
|
|
|
3240
3444
|
* typed adapter. */
|
|
3241
3445
|
checkedBuiltinValue(expr: IrExpr): IrExpr;
|
|
3242
3446
|
/** The name and length a builtin function's adapter boxes under: the ones
|
|
3243
|
-
* Node's function carries (`[Function: randomUUID]`)
|
|
3244
|
-
*
|
|
3447
|
+
* Node's function carries (`[Function: randomUUID]`), with the main-thread
|
|
3448
|
+
* qualifier of a name a Worker does not carry (`process.cwd`). Empty for
|
|
3449
|
+
* any other value. */
|
|
3245
3450
|
builtinFunctionIdentity(expr: IrExpr): {
|
|
3246
3451
|
fnName?: string;
|
|
3247
3452
|
fnLength?: number;
|
|
3453
|
+
fnNameMainThreadOnly?: true;
|
|
3248
3454
|
};
|
|
3249
3455
|
isBuiltinCallableValue(expr: IrExpr): boolean;
|
|
3250
3456
|
lowerBuiltinModuleCall(expr: ts.CallExpression, bi: {
|