@scriptc/compiler 0.4.6 → 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 +29 -6
- package/ambient/node-fallback/fs-promises.d.ts +1 -1
- package/ambient/node-fallback/fs.d.ts +57 -12
- package/ambient/node-fallback/http.d.ts +26 -18
- package/ambient/node-fallback/https.d.ts +5 -2
- package/ambient/node-fallback/net.d.ts +25 -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/querystring.d.ts +3 -3
- package/ambient/node-fallback/zlib.d.ts +31 -2
- package/ambient/scriptc-node-fallback.d.ts +95 -20
- package/ambient/scriptc.d.ts +7 -2
- package/dist/backend/executable-features.js +22 -1
- package/dist/backend/executable-features.js.map +1 -1
- package/dist/backend/immutability.d.ts +12 -1
- package/dist/backend/immutability.js +50 -4
- package/dist/backend/immutability.js.map +1 -1
- package/dist/backend/immutability.test.js +95 -1
- package/dist/backend/immutability.test.js.map +1 -1
- package/dist/backend/library-pack.d.ts +6 -0
- package/dist/backend/library-pack.js +18 -5
- 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 +20 -2
- package/dist/backend/linker.js +221 -35
- package/dist/backend/linker.js.map +1 -1
- package/dist/backend/lld.d.ts +15 -6
- package/dist/backend/lld.js +24 -16
- package/dist/backend/lld.js.map +1 -1
- package/dist/backend/lld.test.js +13 -5
- 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/constant-callbacks.test.js +50 -1
- package/dist/backend/llvm/constant-callbacks.test.js.map +1 -1
- package/dist/backend/llvm/cpu-dispatch.d.ts +15 -5
- package/dist/backend/llvm/cpu-dispatch.js +34 -9
- package/dist/backend/llvm/cpu-dispatch.js.map +1 -1
- package/dist/backend/llvm/dyn.d.ts +64 -3
- package/dist/backend/llvm/dyn.js +251 -15
- package/dist/backend/llvm/dyn.js.map +1 -1
- package/dist/backend/llvm/emit-function.js +68 -5
- package/dist/backend/llvm/emit-function.js.map +1 -1
- package/dist/backend/llvm/emit-module.js +226 -77
- 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 +138 -34
- package/dist/backend/llvm/emit-statements.js.map +1 -1
- package/dist/backend/llvm/emitter.d.ts +142 -10
- package/dist/backend/llvm/emitter.js +523 -73
- 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.d.ts +4 -1
- package/dist/backend/llvm/expr-calls.js +38 -6
- package/dist/backend/llvm/expr-calls.js.map +1 -1
- package/dist/backend/llvm/expr-dynamic.js +237 -23
- package/dist/backend/llvm/expr-dynamic.js.map +1 -1
- package/dist/backend/llvm/expr-primitives.js +123 -12
- 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.d.ts +8 -0
- package/dist/backend/llvm/expr-stream-bridges.js +59 -2
- package/dist/backend/llvm/expr-stream-bridges.js.map +1 -1
- package/dist/backend/llvm/expr-stream-callbacks.d.ts +16 -0
- package/dist/backend/llvm/expr-stream-callbacks.js +206 -20
- package/dist/backend/llvm/expr-stream-callbacks.js.map +1 -1
- package/dist/backend/llvm/integer-values.d.ts +2 -0
- package/dist/backend/llvm/integer-values.js +6 -0
- package/dist/backend/llvm/integer-values.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 +57 -1
- package/dist/backend/llvm/js-ic.js +389 -22
- package/dist/backend/llvm/js-ic.js.map +1 -1
- package/dist/backend/llvm/lib-dispatch.js +152 -1
- package/dist/backend/llvm/lib-dispatch.js.map +1 -1
- package/dist/backend/llvm/lib-filesystem.js +116 -11
- package/dist/backend/llvm/lib-filesystem.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 +180 -27
- package/dist/backend/llvm/lib-process.js.map +1 -1
- package/dist/backend/llvm/lib-shared.js +139 -2
- package/dist/backend/llvm/lib-shared.js.map +1 -1
- package/dist/backend/llvm/lib-stream.js +67 -0
- package/dist/backend/llvm/lib-stream.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-entry-versions.d.ts +2 -2
- package/dist/backend/llvm/loop-entry-versions.js +43 -21
- package/dist/backend/llvm/loop-entry-versions.js.map +1 -1
- package/dist/backend/llvm/loop-state.d.ts +7 -1
- package/dist/backend/llvm/loop-state.js +26 -3
- 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.d.ts +3 -1
- package/dist/backend/llvm/map-number-lookup.js +7 -3
- package/dist/backend/llvm/map-number-lookup.js.map +1 -1
- package/dist/backend/llvm/map-number-lookup.test.js +58 -17
- 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/receiver-brackets.test.d.ts +1 -0
- package/dist/backend/llvm/receiver-brackets.test.js +68 -0
- package/dist/backend/llvm/receiver-brackets.test.js.map +1 -0
- 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.d.ts +22 -2
- package/dist/backend/llvm/record-views.js +147 -12
- package/dist/backend/llvm/record-views.js.map +1 -1
- package/dist/backend/llvm/record-views.test.js +76 -0
- package/dist/backend/llvm/record-views.test.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 +4 -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 +36 -3
- package/dist/backend/llvm/shapes.js +201 -16
- package/dist/backend/llvm/shapes.js.map +1 -1
- package/dist/backend/llvm/shapes.test.js +4 -0
- package/dist/backend/llvm/shapes.test.js.map +1 -1
- package/dist/backend/llvm/speculative-integers.d.ts +10 -1
- package/dist/backend/llvm/speculative-integers.js +59 -8
- package/dist/backend/llvm/speculative-integers.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/unwind-abi.d.ts +3 -3
- package/dist/backend/llvm/unwind-abi.js +8 -3
- package/dist/backend/llvm/unwind-abi.js.map +1 -1
- package/dist/backend/llvm/walkers.d.ts +12 -0
- package/dist/backend/llvm/walkers.js +47 -3
- 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 +94 -0
- package/dist/backend/native/executable.js +134 -10
- 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 +10 -2
- package/dist/backend/native/library.js.map +1 -1
- package/dist/backend/native/runtime-inputs.js +8 -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 +30 -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 +72 -0
- package/dist/backend/native-link-info-core.js.map +1 -1
- package/dist/backend/native-link-info.js +1 -0
- package/dist/backend/native-link-info.js.map +1 -1
- package/dist/backend/native-profile.d.ts +4 -1
- package/dist/backend/native-profile.js +12 -1
- package/dist/backend/native-profile.js.map +1 -1
- package/dist/backend/native-profile.test.js +10 -0
- package/dist/backend/native-profile.test.js.map +1 -1
- package/dist/backend/publication.d.ts +4 -1
- package/dist/backend/publication.js +4 -2
- package/dist/backend/publication.js.map +1 -1
- package/dist/backend/runtime-abi.d.ts +2 -2
- package/dist/backend/runtime-abi.js +2 -2
- package/dist/backend/runtime-pack-core.d.ts +46 -7
- package/dist/backend/runtime-pack-core.js +37 -2
- package/dist/backend/runtime-pack-core.js.map +1 -1
- package/dist/backend/runtime-pack-native.d.ts +18 -1
- package/dist/backend/runtime-pack-native.js +138 -29
- package/dist/backend/runtime-pack-native.js.map +1 -1
- package/dist/backend/runtime-pack-native.test.js +166 -4
- package/dist/backend/runtime-pack-native.test.js.map +1 -1
- package/dist/backend/runtime-pack-targets.test.js +3 -1
- package/dist/backend/runtime-pack-targets.test.js.map +1 -1
- package/dist/backend/runtime-pack.d.ts +7 -0
- package/dist/backend/runtime-pack.js +25 -3
- package/dist/backend/runtime-pack.js.map +1 -1
- package/dist/backend/runtime-pack.test.js +213 -12
- 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 +8 -1
- package/dist/backend/vendor-archives.js +313 -8
- package/dist/backend/vendor-archives.js.map +1 -1
- package/dist/backend/vendor-inputs.d.ts +60 -3
- package/dist/backend/vendor-inputs.js +109 -3
- package/dist/backend/vendor-inputs.js.map +1 -1
- package/dist/backend/vendor-inputs.test.js +62 -1
- package/dist/backend/vendor-inputs.test.js.map +1 -1
- package/dist/backend/warm-cache.js +2 -0
- package/dist/backend/warm-cache.js.map +1 -1
- package/dist/compat/fetch-profile.d.ts +7 -1
- package/dist/compat/fetch-profile.js +25 -12
- package/dist/compat/fetch-profile.js.map +1 -1
- package/dist/compile-types.d.ts +7 -0
- package/dist/contracts/check.d.ts +3 -0
- package/dist/contracts/check.js +18 -5
- package/dist/contracts/check.js.map +1 -1
- 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/coverage/surface-manifest.js.map +1 -1
- package/dist/diagnostics/codes.d.ts +14 -0
- package/dist/diagnostics/codes.js +14 -0
- package/dist/diagnostics/codes.js.map +1 -1
- package/dist/diagnostics/diagnostic.d.ts +68 -0
- package/dist/diagnostics/diagnostic.js +186 -6
- package/dist/diagnostics/diagnostic.js.map +1 -1
- package/dist/diagnostics/dynamic-tier.js +3 -1
- package/dist/diagnostics/dynamic-tier.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 +48 -0
- package/dist/executable/executable-cache.js +38 -0
- package/dist/executable/executable-cache.js.map +1 -1
- package/dist/executable/executable-cache.test.js +127 -1
- package/dist/executable/executable-cache.test.js.map +1 -1
- package/dist/executable/prepare.d.ts +13 -3
- package/dist/executable/prepare.js +438 -234
- 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 +24 -0
- package/dist/frontend/early-errors.js +836 -0
- package/dist/frontend/early-errors.js.map +1 -0
- package/dist/frontend/early-errors.test.d.ts +1 -0
- package/dist/frontend/early-errors.test.js +207 -0
- package/dist/frontend/early-errors.test.js.map +1 -0
- package/dist/frontend/inferred-js-diagnostics.test.js +88 -0
- package/dist/frontend/inferred-js-diagnostics.test.js.map +1 -1
- package/dist/frontend/input-tracker.d.ts +47 -0
- package/dist/frontend/input-tracker.js +173 -36
- package/dist/frontend/input-tracker.js.map +1 -1
- package/dist/frontend/input-tracker.test.js +86 -2
- package/dist/frontend/input-tracker.test.js.map +1 -1
- package/dist/frontend/js-inference.d.ts +2 -0
- package/dist/frontend/js-inference.js +18 -0
- package/dist/frontend/js-inference.js.map +1 -0
- 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.d.ts +2 -1
- package/dist/frontend/lowering/binding-analysis.js +86 -4
- 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 +13 -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 +41 -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.d.ts +7 -0
- package/dist/frontend/lowering/builtins/child-process-methods.js +52 -12
- 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 +565 -28
- 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/dates.d.ts +1 -1
- package/dist/frontend/lowering/builtins/dates.js +23 -1
- package/dist/frontend/lowering/builtins/dates.js.map +1 -1
- package/dist/frontend/lowering/builtins/environment.d.ts +55 -0
- package/dist/frontend/lowering/builtins/environment.js +213 -2
- package/dist/frontend/lowering/builtins/environment.js.map +1 -1
- package/dist/frontend/lowering/builtins/filesystem-calls.d.ts +1 -0
- package/dist/frontend/lowering/builtins/filesystem-calls.js +75 -18
- package/dist/frontend/lowering/builtins/filesystem-calls.js.map +1 -1
- package/dist/frontend/lowering/builtins/filesystem.d.ts +25 -7
- package/dist/frontend/lowering/builtins/filesystem.js +185 -16
- package/dist/frontend/lowering/builtins/filesystem.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 +42 -3
- package/dist/frontend/lowering/builtins/module-calls.js.map +1 -1
- package/dist/frontend/lowering/builtins/module-resolution.d.ts +8 -0
- package/dist/frontend/lowering/builtins/module-resolution.js +31 -5
- package/dist/frontend/lowering/builtins/module-resolution.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 +9 -5
- package/dist/frontend/lowering/builtins/operating-system.js +101 -20
- package/dist/frontend/lowering/builtins/operating-system.js.map +1 -1
- package/dist/frontend/lowering/builtins/process.d.ts +18 -2
- package/dist/frontend/lowering/builtins/process.js +386 -25
- 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/querystring.d.ts +8 -0
- package/dist/frontend/lowering/builtins/querystring.js +202 -18
- package/dist/frontend/lowering/builtins/querystring.js.map +1 -1
- package/dist/frontend/lowering/builtins/readline.d.ts +6 -4
- package/dist/frontend/lowering/builtins/readline.js +200 -38
- package/dist/frontend/lowering/builtins/readline.js.map +1 -1
- package/dist/frontend/lowering/builtins/reflection.js +60 -1
- package/dist/frontend/lowering/builtins/reflection.js.map +1 -1
- package/dist/frontend/lowering/builtins/text-codecs.js +208 -59
- package/dist/frontend/lowering/builtins/text-codecs.js.map +1 -1
- package/dist/frontend/lowering/builtins/url.js +55 -13
- package/dist/frontend/lowering/builtins/url.js.map +1 -1
- package/dist/frontend/lowering/builtins/v8.d.ts +5 -5
- package/dist/frontend/lowering/builtins/v8.js +7 -5
- package/dist/frontend/lowering/builtins/v8.js.map +1 -1
- package/dist/frontend/lowering/builtins/web-streams-dyn.d.ts +17 -2
- package/dist/frontend/lowering/builtins/web-streams-dyn.js +97 -9
- package/dist/frontend/lowering/builtins/web-streams-dyn.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 +180 -0
- package/dist/frontend/lowering/call-signatures.js.map +1 -1
- package/dist/frontend/lowering/cjs-exports-object.d.ts +3 -0
- package/dist/frontend/lowering/cjs-exports-object.js +1 -1
- package/dist/frontend/lowering/cjs-exports-object.js.map +1 -1
- package/dist/frontend/lowering/cjs-inline-require.js +5 -0
- package/dist/frontend/lowering/cjs-inline-require.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 +14 -0
- package/dist/frontend/lowering/class-dynamic-dispatch.js +1376 -1009
- 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-protocols.js +59 -10
- package/dist/frontend/lowering/class-protocols.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 +35 -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/class-views.d.ts +13 -0
- package/dist/frontend/lowering/class-views.js +51 -0
- package/dist/frontend/lowering/class-views.js.map +1 -0
- package/dist/frontend/lowering/coercions/function-adapters.d.ts +15 -1
- package/dist/frontend/lowering/coercions/function-adapters.js +63 -10
- package/dist/frontend/lowering/coercions/function-adapters.js.map +1 -1
- package/dist/frontend/lowering/coercions/state.d.ts +15 -0
- package/dist/frontend/lowering/coercions/state.js +24 -0
- package/dist/frontend/lowering/coercions/state.js.map +1 -1
- package/dist/frontend/lowering/coercions/structural-plans.js +75 -3
- package/dist/frontend/lowering/coercions/structural-plans.js.map +1 -1
- package/dist/frontend/lowering/coercions/structural.js +39 -2
- 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.d.ts +8 -1
- package/dist/frontend/lowering/containers/array-callbacks.js +288 -90
- package/dist/frontend/lowering/containers/array-callbacks.js.map +1 -1
- package/dist/frontend/lowering/containers/array-construction.js +37 -8
- 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 +30 -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 +450 -86
- package/dist/frontend/lowering/containers/bytes.js.map +1 -1
- package/dist/frontend/lowering/containers/callback-arguments.d.ts +16 -0
- package/dist/frontend/lowering/containers/callback-arguments.js +74 -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/filter-predicates.d.ts +10 -0
- package/dist/frontend/lowering/containers/filter-predicates.js +69 -3
- package/dist/frontend/lowering/containers/filter-predicates.js.map +1 -1
- package/dist/frontend/lowering/containers/indexed-objects.js +46 -2
- package/dist/frontend/lowering/containers/indexed-objects.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 +24 -0
- package/dist/frontend/lowering/expressions/array-literals.js +88 -10
- package/dist/frontend/lowering/expressions/array-literals.js.map +1 -1
- package/dist/frontend/lowering/expressions/binary.js +216 -14
- package/dist/frontend/lowering/expressions/binary.js.map +1 -1
- package/dist/frontend/lowering/expressions/element-access.js +272 -11
- 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 +173 -4
- package/dist/frontend/lowering/expressions/identifiers.js.map +1 -1
- package/dist/frontend/lowering/expressions/keyed-field-targets.d.ts +11 -1
- package/dist/frontend/lowering/expressions/keyed-field-targets.js +22 -1
- package/dist/frontend/lowering/expressions/keyed-field-targets.js.map +1 -1
- package/dist/frontend/lowering/expressions/narrowing.d.ts +3 -0
- package/dist/frontend/lowering/expressions/narrowing.js +195 -18
- package/dist/frontend/lowering/expressions/narrowing.js.map +1 -1
- package/dist/frontend/lowering/expressions/object-literals.d.ts +5 -1
- package/dist/frontend/lowering/expressions/object-literals.js +951 -240
- package/dist/frontend/lowering/expressions/object-literals.js.map +1 -1
- package/dist/frontend/lowering/expressions/optional-chains.js +71 -21
- package/dist/frontend/lowering/expressions/optional-chains.js.map +1 -1
- package/dist/frontend/lowering/expressions/property-access.d.ts +39 -0
- package/dist/frontend/lowering/expressions/property-access.js +1141 -87
- package/dist/frontend/lowering/expressions/property-access.js.map +1 -1
- package/dist/frontend/lowering/expressions/relational.js +262 -4
- package/dist/frontend/lowering/expressions/relational.js.map +1 -1
- package/dist/frontend/lowering/expressions/typeof.js +25 -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 +156 -22
- package/dist/frontend/lowering/expressions/updates.js.map +1 -1
- package/dist/frontend/lowering/frozen-records.d.ts +6 -0
- package/dist/frontend/lowering/frozen-records.js +10 -4
- package/dist/frontend/lowering/frozen-records.js.map +1 -1
- package/dist/frontend/lowering/frozen-records.test.d.ts +1 -0
- package/dist/frontend/lowering/frozen-records.test.js +44 -0
- package/dist/frontend/lowering/frozen-records.test.js.map +1 -0
- package/dist/frontend/lowering/function-names.d.ts +9 -0
- package/dist/frontend/lowering/function-names.js +95 -0
- package/dist/frontend/lowering/function-names.js.map +1 -0
- package/dist/frontend/lowering/function-returns.js +42 -13
- 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 +75 -0
- package/dist/frontend/lowering/generic-functions.js +790 -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 +15 -4
- package/dist/frontend/lowering/global-values.js +67 -9
- package/dist/frontend/lowering/global-values.js.map +1 -1
- package/dist/frontend/lowering/handle-properties.js +34 -1
- package/dist/frontend/lowering/handle-properties.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.d.ts +54 -0
- package/dist/frontend/lowering/key-order-witness.js +571 -9
- 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 +25 -3
- package/dist/frontend/lowering/lib-boundary.js.map +1 -1
- package/dist/frontend/lowering/lower-assert.js +140 -16
- 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.d.ts +36 -6
- package/dist/frontend/lowering/lower-builtin-values.js +342 -58
- package/dist/frontend/lowering/lower-builtin-values.js.map +1 -1
- package/dist/frontend/lowering/lower-calls.d.ts +47 -1
- package/dist/frontend/lowering/lower-calls.js +1354 -273
- package/dist/frontend/lowering/lower-calls.js.map +1 -1
- package/dist/frontend/lowering/lower-calls.test.d.ts +1 -0
- package/dist/frontend/lowering/lower-calls.test.js +121 -0
- package/dist/frontend/lowering/lower-calls.test.js.map +1 -0
- package/dist/frontend/lowering/lower-classes.d.ts +36 -5
- package/dist/frontend/lowering/lower-classes.js +630 -89
- package/dist/frontend/lowering/lower-classes.js.map +1 -1
- package/dist/frontend/lowering/lower-event-emitter.d.ts +15 -2
- package/dist/frontend/lowering/lower-event-emitter.js +610 -98
- package/dist/frontend/lowering/lower-event-emitter.js.map +1 -1
- package/dist/frontend/lowering/lower-exprs.d.ts +15 -1
- package/dist/frontend/lowering/lower-exprs.js +96 -20
- package/dist/frontend/lowering/lower-exprs.js.map +1 -1
- package/dist/frontend/lowering/lower-functions.js +27 -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 +713 -92
- package/dist/frontend/lowering/lower-inspect.js.map +1 -1
- package/dist/frontend/lowering/lower-modules.js +135 -27
- 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.d.ts +35 -4
- package/dist/frontend/lowering/lower-node-island.js +472 -67
- package/dist/frontend/lowering/lower-node-island.js.map +1 -1
- package/dist/frontend/lowering/lower-server.js +463 -96
- package/dist/frontend/lowering/lower-server.js.map +1 -1
- package/dist/frontend/lowering/lower-shared-modules.js +13 -1
- package/dist/frontend/lowering/lower-shared-modules.js.map +1 -1
- package/dist/frontend/lowering/lower-stdlib.d.ts +3 -2
- package/dist/frontend/lowering/lower-stdlib.js +77 -18
- package/dist/frontend/lowering/lower-stdlib.js.map +1 -1
- package/dist/frontend/lowering/lower-stmts.d.ts +24 -4
- package/dist/frontend/lowering/lower-stmts.js +831 -136
- package/dist/frontend/lowering/lower-stmts.js.map +1 -1
- package/dist/frontend/lowering/lower-stream.js +126 -8
- package/dist/frontend/lowering/lower-stream.js.map +1 -1
- package/dist/frontend/lowering/lower-timers.js +243 -48
- 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 +363 -21
- package/dist/frontend/lowering/lowerer.js +1224 -129
- package/dist/frontend/lowering/lowerer.js.map +1 -1
- package/dist/frontend/lowering/lowerer.test.js +19 -1
- 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/module-namespace-elements.js +15 -0
- package/dist/frontend/lowering/module-namespace-elements.js.map +1 -1
- 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/new-target.js +2 -2
- package/dist/frontend/lowering/nullish-empty-pattern.d.ts +17 -0
- package/dist/frontend/lowering/nullish-empty-pattern.js +118 -0
- package/dist/frontend/lowering/nullish-empty-pattern.js.map +1 -0
- 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 +36 -0
- package/dist/frontend/lowering/partial-assertions.js +189 -0
- package/dist/frontend/lowering/partial-assertions.js.map +1 -0
- 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.d.ts +34 -0
- package/dist/frontend/lowering/primitive-wrappers.js +221 -0
- package/dist/frontend/lowering/primitive-wrappers.js.map +1 -0
- package/dist/frontend/lowering/private-statics.d.ts +46 -0
- package/dist/frontend/lowering/private-statics.js +322 -0
- package/dist/frontend/lowering/private-statics.js.map +1 -0
- 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/record-sources.d.ts +12 -1
- package/dist/frontend/lowering/record-sources.js +60 -0
- package/dist/frontend/lowering/record-sources.js.map +1 -1
- 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-equality.d.ts +4 -0
- package/dist/frontend/lowering/strict-equality.js +14 -0
- package/dist/frontend/lowering/strict-equality.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 +42 -1
- package/dist/frontend/lowering/surfaces.js +212 -71
- 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 +136 -17
- package/dist/frontend/lowering/unit-journal.js +324 -53
- package/dist/frontend/lowering/unit-journal.js.map +1 -1
- package/dist/frontend/lowering/unit-journal.test.js +126 -3
- package/dist/frontend/lowering/unit-journal.test.js.map +1 -1
- package/dist/frontend/lowering/unit-reuse.d.ts +92 -0
- package/dist/frontend/lowering/unit-reuse.js +1008 -0
- package/dist/frontend/lowering/unit-reuse.js.map +1 -0
- package/dist/frontend/lowering/width-lift.d.ts +12 -0
- package/dist/frontend/lowering/zlib-constants.js +3 -2
- package/dist/frontend/lowering/zlib-constants.js.map +1 -1
- package/dist/frontend/npm-file-import.test.d.ts +1 -0
- package/dist/frontend/npm-file-import.test.js +76 -0
- package/dist/frontend/npm-file-import.test.js.map +1 -0
- package/dist/frontend/npm-static.js +95 -11
- 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/npm.d.ts +9 -0
- package/dist/frontend/npm.js +82 -0
- package/dist/frontend/npm.js.map +1 -1
- package/dist/frontend/pipeline-native.js +2 -1
- package/dist/frontend/pipeline-native.js.map +1 -1
- package/dist/frontend/pipeline.d.ts +9 -4
- package/dist/frontend/pipeline.js +162 -38
- 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-node.d.ts +3 -0
- package/dist/frontend/program-node.js +13 -6
- package/dist/frontend/program-node.js.map +1 -1
- package/dist/frontend/program.d.ts +71 -2
- package/dist/frontend/program.js +836 -411
- 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/provenance-core.js +4 -0
- package/dist/frontend/provenance-core.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/services.d.ts +14 -0
- package/dist/frontend/services.js +52 -2
- package/dist/frontend/services.js.map +1 -1
- package/dist/frontend/services.test.js +61 -1
- package/dist/frontend/services.test.js.map +1 -1
- package/dist/frontend/shape-inference/analyze.d.ts +5 -0
- package/dist/frontend/shape-inference/analyze.js +104 -4
- package/dist/frontend/shape-inference/analyze.js.map +1 -1
- package/dist/frontend/shape-inference/domain.js +0 -1
- package/dist/frontend/shape-inference/domain.js.map +1 -1
- package/dist/frontend/shape-inference/index.js +5 -1
- package/dist/frontend/shape-inference/index.js.map +1 -1
- package/dist/frontend/shape-inference/memo.d.ts +2 -1
- package/dist/frontend/shape-inference/memo.js +6 -2
- package/dist/frontend/shape-inference/memo.js.map +1 -1
- package/dist/frontend/shape-inference/overlay.d.ts +1 -1
- package/dist/frontend/shape-inference/overlay.js +184 -4
- package/dist/frontend/shape-inference/overlay.js.map +1 -1
- package/dist/frontend/shape-inference/static-objects.js +11 -6
- package/dist/frontend/shape-inference/static-objects.js.map +1 -1
- package/dist/frontend/source-phase-imports.test.d.ts +1 -0
- package/dist/frontend/source-phase-imports.test.js +37 -0
- package/dist/frontend/source-phase-imports.test.js.map +1 -0
- 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/ts7/ast-node.d.ts +6 -1
- package/dist/frontend/ts7/ast-node.js +12 -0
- package/dist/frontend/ts7/ast-node.js.map +1 -1
- package/dist/frontend/ts7/ast-wire-protocols.test.js +11 -3
- package/dist/frontend/ts7/ast-wire-protocols.test.js.map +1 -1
- package/dist/frontend/ts7/ast-wire.js +3 -5
- package/dist/frontend/ts7/ast-wire.js.map +1 -1
- package/dist/frontend/ts7/checker-backend.d.ts +13 -0
- package/dist/frontend/ts7/checker-backend.js +84 -2
- package/dist/frontend/ts7/checker-backend.js.map +1 -1
- package/dist/frontend/ts7/checker-backend.test.js +126 -2
- package/dist/frontend/ts7/checker-backend.test.js.map +1 -1
- package/dist/frontend/ts7/program-host.d.ts +22 -1
- package/dist/frontend/ts7/program-host.js +49 -4
- package/dist/frontend/ts7/program-host.js.map +1 -1
- package/dist/frontend/ts7/program-host.test.js +83 -0
- package/dist/frontend/ts7/program-host.test.js.map +1 -1
- package/dist/frontend/ts7/rpc-process.d.ts +16 -1
- package/dist/frontend/ts7/rpc-process.js +170 -92
- package/dist/frontend/ts7/rpc-process.js.map +1 -1
- package/dist/frontend/ts7/rpc-process.test.js +49 -21
- package/dist/frontend/ts7/rpc-process.test.js.map +1 -1
- package/dist/frontend/tsc-codes.d.ts +57 -3
- package/dist/frontend/tsc-codes.js +956 -101
- 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 +98 -11
- package/dist/frontend/type-mapper.js +770 -182
- package/dist/frontend/type-mapper.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +224 -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/api.d.ts +1 -1
- package/dist/ir/api.js +1 -1
- package/dist/ir/api.js.map +1 -1
- package/dist/ir/build.d.ts +3 -2
- package/dist/ir/build.js +4 -2
- package/dist/ir/build.js.map +1 -1
- package/dist/ir/builtin-effects.js +96 -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 +453 -26
- 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.d.ts +82 -0
- package/dist/ir/codec.generated.d.ts +13 -0
- package/dist/ir/codec.generated.js +5350 -0
- package/dist/ir/codec.generated.js.map +1 -0
- package/dist/ir/codec.js +325 -0
- package/dist/ir/codec.js.map +1 -0
- package/dist/ir/codec.test.d.ts +1 -0
- package/dist/ir/codec.test.js +225 -0
- package/dist/ir/codec.test.js.map +1 -0
- 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 +29 -10
- package/dist/ir/fields.generated.js +1039 -11
- package/dist/ir/fields.generated.js.map +1 -1
- package/dist/ir/fields.test.js +46 -2
- package/dist/ir/fields.test.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 +6 -4
- package/dist/ir/function-references.js +11 -4
- package/dist/ir/function-references.js.map +1 -1
- package/dist/ir/function-references.test.js +14 -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-sources.js +4 -1
- package/dist/ir/inline-array-sources.js.map +1 -1
- package/dist/ir/inline-array-views.d.ts +13 -0
- package/dist/ir/inline-array-views.js +945 -0
- package/dist/ir/inline-array-views.js.map +1 -0
- package/dist/ir/inline-arrays.d.ts +7 -0
- package/dist/ir/inline-arrays.js +190 -55
- package/dist/ir/inline-arrays.js.map +1 -1
- package/dist/ir/inline-arrays.test.js +140 -2
- package/dist/ir/inline-arrays.test.js.map +1 -1
- package/dist/ir/int32-slots.js +7 -0
- package/dist/ir/int32-slots.js.map +1 -1
- package/dist/ir/integer-ranges.js +16 -6
- package/dist/ir/integer-ranges.js.map +1 -1
- package/dist/ir/ir.d.ts +130 -44
- 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.d.ts +10 -9
- package/dist/ir/js-ic.js +58 -25
- package/dist/ir/js-ic.js.map +1 -1
- package/dist/ir/js-ic.test.js +37 -3
- package/dist/ir/js-ic.test.js.map +1 -1
- package/dist/ir/jsval.js +374 -63
- package/dist/ir/jsval.js.map +1 -1
- package/dist/ir/jsval.test.js +96 -2
- package/dist/ir/jsval.test.js.map +1 -1
- package/dist/ir/loop-entry-ranges.js +112 -9
- package/dist/ir/loop-entry-ranges.js.map +1 -1
- package/dist/ir/loop-entry-ranges.test.js +40 -0
- package/dist/ir/loop-entry-ranges.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 -3
- package/dist/ir/parameter-versions.js +63 -40
- 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/receiver-readers.js +58 -2
- package/dist/ir/receiver-readers.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 +139 -5
- package/dist/ir/runtime-features.js +397 -19
- package/dist/ir/runtime-features.js.map +1 -1
- package/dist/ir/runtime-features.test.js +135 -1
- 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 +11 -2
- package/dist/ir/saturating-loop-jams.js +56 -16
- package/dist/ir/saturating-loop-jams.js.map +1 -1
- package/dist/ir/saturating-loop-jams.test.js +39 -1
- package/dist/ir/saturating-loop-jams.test.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 +40 -28
- package/dist/ir/self-captures.js.map +1 -1
- package/dist/ir/self-captures.test.js +15 -0
- package/dist/ir/self-captures.test.js.map +1 -1
- package/dist/ir/serialize.d.ts +8 -2
- package/dist/ir/serialize.js +92 -24
- 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 +170 -22
- package/dist/ir/validate.js.map +1 -1
- package/dist/ir/validate.test.js +46 -0
- package/dist/ir/validate.test.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 +4 -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 +49 -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 +2 -0
- package/dist/native/cli.js.map +1 -1
- package/dist/native/compiler.js +26 -5
- 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 +74 -28
- 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 +63 -4
- package/dist/native/sanitizer.js.map +1 -1
- package/dist/native/sanitizer.test.js +93 -2
- package/dist/native/sanitizer.test.js.map +1 -1
- package/dist/native/toolchain.js +9 -2
- package/dist/native/toolchain.js.map +1 -1
- package/dist/node-islands/boundary.d.ts +37 -1
- package/dist/node-islands/boundary.js +65 -7
- 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 +27 -1
- package/dist/node-islands/detect.js +475 -40
- package/dist/node-islands/detect.js.map +1 -1
- package/dist/node-islands/detect.test.js +175 -4
- package/dist/node-islands/detect.test.js.map +1 -1
- package/dist/node-islands/effect-gate.js +30 -20
- package/dist/node-islands/effect-gate.js.map +1 -1
- package/dist/node-islands/effect-gate.test.js +4 -1
- package/dist/node-islands/effect-gate.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/libnode.d.ts +1 -1
- package/dist/node-islands/libnode.js +1 -1
- package/dist/node-islands/libnode.js.map +1 -1
- package/dist/node-islands/modules.d.ts +28 -0
- package/dist/node-islands/modules.js +156 -0
- package/dist/node-islands/modules.js.map +1 -1
- package/dist/node-islands/modules.test.js +105 -1
- package/dist/node-islands/modules.test.js.map +1 -1
- package/dist/node-islands/policy.js +2 -3
- package/dist/node-islands/policy.js.map +1 -1
- package/dist/node-islands/probe-recorder.d.ts +1 -0
- package/dist/node-islands/probe-recorder.js +596 -0
- package/dist/node-islands/probe-recorder.js.map +1 -0
- package/dist/node-islands/probe-recorder.test.d.ts +1 -0
- package/dist/node-islands/probe-recorder.test.js +80 -0
- package/dist/node-islands/probe-recorder.test.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 +4 -0
- package/dist/node-islands/report.test.js.map +1 -1
- package/dist/node-islands/rules.js +9 -0
- package/dist/node-islands/rules.js.map +1 -1
- package/dist/node-islands/scan.d.ts +16 -1
- package/dist/node-islands/scan.js +110 -9
- package/dist/node-islands/scan.js.map +1 -1
- package/dist/node-islands/snapshot.d.ts +38 -1
- package/dist/node-islands/snapshot.js +165 -161
- package/dist/node-islands/snapshot.js.map +1 -1
- package/dist/node-islands/snapshot.test.js +63 -2
- package/dist/node-islands/snapshot.test.js.map +1 -1
- package/dist/node-islands/summary.js +8 -0
- package/dist/node-islands/summary.js.map +1 -1
- package/dist/node-islands/type-strip.d.ts +11 -0
- package/dist/node-islands/type-strip.js +157 -0
- package/dist/node-islands/type-strip.js.map +1 -0
- package/dist/node-islands/type-strip.test.d.ts +1 -0
- package/dist/node-islands/type-strip.test.js +31 -0
- package/dist/node-islands/type-strip.test.js.map +1 -0
- package/dist/project-config.d.ts +4 -0
- package/dist/project-config.js +19 -0
- package/dist/project-config.js.map +1 -1
- package/dist/project-config.test.js +10 -0
- package/dist/project-config.test.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 +221 -122
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
/** The value a read of a Node 24 global native code does not provide
|
|
2
|
+
* answers (host-globals.ts). Node has the constructor, so a read must answer
|
|
3
|
+
* a constructor: the eager read at module init (`export const FormData =
|
|
4
|
+
* instanceOf(globalThis.FormData, …)` in effect's Schema) is a value read,
|
|
5
|
+
* not a use, and refusing it rejects the module before its capability probe
|
|
6
|
+
* ever runs.
|
|
7
|
+
*
|
|
8
|
+
* The value is what Node's class is to native code: `typeof` answers
|
|
9
|
+
* "function", `name` and `length` are Node's, `instanceof` answers false for
|
|
10
|
+
* every value native code can produce (the constructor's `prototype` is an
|
|
11
|
+
* object no value's prototype chain reaches), and constructing or calling it
|
|
12
|
+
* throws the SC2020 fence its direct use reports — native code can never
|
|
13
|
+
* produce an instance. Reads that ARE a use (`new WebSocket(url)`,
|
|
14
|
+
* `FormData()`) keep the compile fence, which a JavaScript source defers to
|
|
15
|
+
* exactly that throw.
|
|
16
|
+
*
|
|
17
|
+
* The constructor is a zero-parameter closure whose function is marked
|
|
18
|
+
* `ownsPrototype`: the runtime gives every such function its own
|
|
19
|
+
* `prototype` object with `constructor` on it (scr_dyn_fn_table), the same
|
|
20
|
+
* shape a program's function declaration has, so `FormData.prototype`,
|
|
21
|
+
* `FormData.prototype.constructor === FormData` and `x instanceof FormData`
|
|
22
|
+
* all answer what Node answers without any property definition here. */
|
|
23
|
+
import * as ts from "../ts7/adapter.js";
|
|
24
|
+
import { BOOL, DYN } from "../../ir/ir.js";
|
|
25
|
+
import { boolLit, varRef } from "../../ir/build.js";
|
|
26
|
+
import { hostGlobalDiag } from "../../diagnostics/diagnostic.js";
|
|
27
|
+
import { hostGlobalLength } from "./host-globals.js";
|
|
28
|
+
import { locOf } from "../program.js";
|
|
29
|
+
/** The constructor value the global `name` reads as. Built once per program
|
|
30
|
+
* (the helper answers the same value every time, as the global object does).
|
|
31
|
+
* A read reports no fence: it does not throw. The value throws the SC2020
|
|
32
|
+
* fence when it is constructed or called, and the call and `new` sites that
|
|
33
|
+
* can see the global report it there (lowerer.hostGlobalFence). */
|
|
34
|
+
export function hostGlobalValue(lowerer, name, node) {
|
|
35
|
+
const loc = locOf(node);
|
|
36
|
+
const helper = `%builtin.hostGlobal.${name}`;
|
|
37
|
+
if (!lowerer.liftedFns.some((fn) => fn.name === helper))
|
|
38
|
+
defineHostGlobalBuilder(lowerer, name, helper, node);
|
|
39
|
+
lowerer.noteEdge(helper);
|
|
40
|
+
return { kind: "call", callee: helper, args: [], type: DYN, loc };
|
|
41
|
+
}
|
|
42
|
+
/** The lifted function that builds the constructor once and answers the same
|
|
43
|
+
* value afterwards. */
|
|
44
|
+
function defineHostGlobalBuilder(lowerer, name, helper, node) {
|
|
45
|
+
const loc = locOf(node);
|
|
46
|
+
const fence = `%builtin.fence.global.${name}`;
|
|
47
|
+
if (!lowerer.liftedFns.some((fn) => fn.name === fence)) {
|
|
48
|
+
const diag = hostGlobalDiag(name, loc);
|
|
49
|
+
lowerer.liftedFns.push({
|
|
50
|
+
name: fence,
|
|
51
|
+
ownsPrototype: true,
|
|
52
|
+
params: [],
|
|
53
|
+
locals: [],
|
|
54
|
+
returnType: DYN,
|
|
55
|
+
body: [{ kind: "runtimeFence", code: diag.code, message: fenceMessage(diag, node), loc }],
|
|
56
|
+
loc,
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
const storage = `%g.${helper}`;
|
|
60
|
+
const ready = `${storage}%ready`;
|
|
61
|
+
lowerer.globalsList.push({ id: storage, name: `${name} global value`, type: DYN, mutable: true }, { id: ready, name: "%ready", type: BOOL, mutable: true });
|
|
62
|
+
const length = hostGlobalLength(name);
|
|
63
|
+
const body = [
|
|
64
|
+
{
|
|
65
|
+
kind: "if",
|
|
66
|
+
cond: varRef(ready, BOOL, loc),
|
|
67
|
+
then: [{ kind: "return", value: varRef(storage, DYN, loc), loc }],
|
|
68
|
+
else_: null,
|
|
69
|
+
loc,
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
kind: "assign",
|
|
73
|
+
localId: storage,
|
|
74
|
+
value: {
|
|
75
|
+
kind: "dynFrom",
|
|
76
|
+
value: {
|
|
77
|
+
kind: "closure",
|
|
78
|
+
fnName: fence,
|
|
79
|
+
captures: [],
|
|
80
|
+
type: { kind: "func", params: [], ret: DYN },
|
|
81
|
+
loc,
|
|
82
|
+
},
|
|
83
|
+
fnName: name,
|
|
84
|
+
...(length !== undefined ? { fnLength: length } : {}),
|
|
85
|
+
type: DYN,
|
|
86
|
+
loc,
|
|
87
|
+
},
|
|
88
|
+
loc,
|
|
89
|
+
},
|
|
90
|
+
// The constructor's own [[Prototype]]: a plain object, so the `instanceof`
|
|
91
|
+
// prototype walk over a FUNCTION value ends at null instead of throwing
|
|
92
|
+
// the runtime's unsupported-getPrototypeOf refusal (the walk starts at the
|
|
93
|
+
// value's [[Prototype]]). Nothing native code produces reaches it, so
|
|
94
|
+
// `x instanceof FormData` answers false for every value native code can
|
|
95
|
+
// produce, functions included.
|
|
96
|
+
{
|
|
97
|
+
kind: "exprStmt",
|
|
98
|
+
expr: {
|
|
99
|
+
kind: "libCall",
|
|
100
|
+
fn: "dyn.setPrototype",
|
|
101
|
+
args: [varRef(storage, DYN, loc), { kind: "dynObjLit", fields: [], type: DYN, loc }],
|
|
102
|
+
type: DYN,
|
|
103
|
+
loc,
|
|
104
|
+
},
|
|
105
|
+
loc,
|
|
106
|
+
},
|
|
107
|
+
{ kind: "assign", localId: ready, value: boolLit(true, loc), loc },
|
|
108
|
+
{ kind: "return", value: varRef(storage, DYN, loc), loc },
|
|
109
|
+
];
|
|
110
|
+
const locals = [];
|
|
111
|
+
lowerer.liftedFns.push({ name: helper, params: [], locals, returnType: DYN, body, loc });
|
|
112
|
+
lowerer.shareHelper(helper);
|
|
113
|
+
}
|
|
114
|
+
/** The thrown message, in the shape every deferred fence throws: the
|
|
115
|
+
* diagnostic's message at the site that first read the value. */
|
|
116
|
+
function fenceMessage(diag, node) {
|
|
117
|
+
const source = ts.getSourceFileOfNode(node);
|
|
118
|
+
const pos = ts.getLineAndCharacterOfPosition(source, diag.loc.start);
|
|
119
|
+
return `${diag.message} [${diag.code} at ${diag.loc.file}:${pos.line + 1}]`;
|
|
120
|
+
}
|
|
121
|
+
//# sourceMappingURL=host-global-values.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"host-global-values.js","sourceRoot":"","sources":["../../../src/frontend/lowering/host-global-values.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;wEAqBwE;AACxE,OAAO,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,IAAI,EAAE,GAAG,EAA0C,MAAM,gBAAgB,CAAC;AACnF,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAEjE,OAAO,EAAE,gBAAgB,EAAE,MAA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5C,MAAM,GAAG,GAAG,EAAE,CAAC,6BAA6B,CAAC,MAAM,EAAE,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IACrE,OAAO,GAAG,IAAI,CAAC,OAAO,KAAK,IAAI,CAAC,IAAI,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,IAAI,GAAG,CAAC,IAAI,GAAG,CAAC,GAAG,CAAC;AAC9E,CAAC"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import * as ts from "../ts7/adapter.js";
|
|
2
|
+
import { type IrExpr, type SrcLoc } from "../../ir/ir.js";
|
|
3
|
+
import type { Lowerer } from "./lowerer.js";
|
|
4
|
+
export declare const NODE_GLOBALS_WITHOUT_NATIVE: ReadonlySet<string>;
|
|
5
|
+
/** Node's `length` for the listed global `name`, or undefined when the table
|
|
6
|
+
* does not know it (the value is then built with the closure's own arity). */
|
|
7
|
+
export declare function hostGlobalLength(name: string): number | undefined;
|
|
8
|
+
/** Whether the read is the callee of a call or `new` — the one use a listed
|
|
9
|
+
* global's value refuses. A bare read answers the constructor (see
|
|
10
|
+
* host-global-values.ts); constructing or calling it can only produce an
|
|
11
|
+
* instance native code does not have, so the compile fence stays (and a
|
|
12
|
+
* JavaScript source defers it to the throw at that statement). */
|
|
13
|
+
export declare function hostGlobalCallTarget(node: ts.Expression): boolean;
|
|
14
|
+
/** Whether `id` reads one of those globals. Own bindings — imports, locals
|
|
15
|
+
* with an initializer, program classes and functions — keep their ordinary
|
|
16
|
+
* lowering; a declaration-file binding (the bundled lib, @types/node) or a
|
|
17
|
+
* program's ambient `declare var` is the global, and an unresolvable name
|
|
18
|
+
* (JavaScript) is Node's. */
|
|
19
|
+
export declare function hostGlobalNameOfIdentifier(lowerer: Lowerer, id: ts.Identifier): string | null;
|
|
20
|
+
/** Whether `receiver` is the global object: `globalThis`, a cast of it
|
|
21
|
+
* (`(globalThis as T)`), or a `const` initialized with either (`const g =
|
|
22
|
+
* globalThis as Record<string, unknown>`). The last shape is how most
|
|
23
|
+
* programs spell the global object, and the runtime's dynamic global object
|
|
24
|
+
* answers undefined for these names. A `let` is not followed: it can be
|
|
25
|
+
* reassigned to another object. */
|
|
26
|
+
export declare function isGlobalObjectRead(lowerer: Lowerer, receiver: ts.Expression, seen?: Set<ts.Symbol>, name?: string | null): boolean;
|
|
27
|
+
/** Whether `access` reads one of those globals off the global object —
|
|
28
|
+
* `globalThis.X`, `(globalThis as T).X`, `alias.X` (`const alias =
|
|
29
|
+
* globalThis`), through parentheses and type casts. */
|
|
30
|
+
export declare function hostGlobalNameOfMember(lowerer: Lowerer, access: ts.PropertyAccessExpression): string | null;
|
|
31
|
+
/** `globalThis["X"]` with a static string key: the same read as `globalThis.X`
|
|
32
|
+
* (the runtime's dynamic path cannot tell the name is Node's). */
|
|
33
|
+
export declare function hostGlobalNameOfElement(lowerer: Lowerer, access: ts.ElementAccessExpression): string | null;
|
|
34
|
+
/** The members a read of a listed global's value answers: the function
|
|
35
|
+
* intrinsics every constructor carries. Node also has the class's own
|
|
36
|
+
* static members (`WebSocket.OPEN`, `FormData.prototype.append`) and its
|
|
37
|
+
* instances' methods, which native code does not provide; reading one is a
|
|
38
|
+
* use of that surface and refuses (SC2020, host-global) rather than
|
|
39
|
+
* answering undefined. */
|
|
40
|
+
export declare const HOST_GLOBAL_VALUE_MEMBERS: ReadonlySet<string>;
|
|
41
|
+
/** The members the value's `prototype` object answers: `constructor`, the
|
|
42
|
+
* link back to the value, which is the same in Node. Node's prototype also
|
|
43
|
+
* carries the class's instance methods (`FormData.prototype.append`), which
|
|
44
|
+
* native code does not have; reading one refuses (SC2020, host-global). */
|
|
45
|
+
export declare const HOST_GLOBAL_PROTOTYPE_MEMBERS: ReadonlySet<string>;
|
|
46
|
+
/** The listed global whose `prototype` object `node` reads — a member read's
|
|
47
|
+
* receiver (`FormData.prototype.append`), a `const` holding that object
|
|
48
|
+
* (`const proto = FormData.prototype; proto.append`), or the
|
|
49
|
+
* `Object.setPrototypeOf` target shape. Null for every other expression. */
|
|
50
|
+
export declare function hostGlobalPrototypeOf(lowerer: Lowerer, node: ts.Expression): string | null;
|
|
51
|
+
/** The listed global whose constructor value `node` holds through the
|
|
52
|
+
* prototype object (`FormData.prototype.constructor`), which is the same
|
|
53
|
+
* value the read answers. Null for every other expression. */
|
|
54
|
+
export declare function hostGlobalConstructorOfPrototype(lowerer: Lowerer, node: ts.Expression): string | null;
|
|
55
|
+
/** The listed global whose prototype member a call reads —
|
|
56
|
+
* `FormData.prototype.append(...)`, `globalThis.WebSocket["send"](...)`.
|
|
57
|
+
* A call reaches lowering without the member-read hook seeing the callee,
|
|
58
|
+
* so the call site asks the same question. Null for `constructor` and for
|
|
59
|
+
* every other expression. */
|
|
60
|
+
export declare function hostGlobalPrototypeMemberOf(lowerer: Lowerer, callee: ts.Expression): string | null;
|
|
61
|
+
/** The listed global an operand reads, in any of the read forms — the
|
|
62
|
+
* expression itself (`typeof X`, a `new` callee, a call callee) — or the
|
|
63
|
+
* one a `const` holding the read answers (`const Ctor = WebSocket;
|
|
64
|
+
* Ctor.OPEN`). A `let` is not followed: it can be reassigned. */
|
|
65
|
+
export declare function hostGlobalNameOfRead(lowerer: Lowerer, operand: ts.Expression): string | null;
|
|
66
|
+
/** The listed global a `typeof` operand reads, in any of the read forms. */
|
|
67
|
+
export declare function hostGlobalNameOfTypeofOperand(lowerer: Lowerer, operand: ts.Expression): string | null;
|
|
68
|
+
/** The compiler's derived name table as the runtime's immortal
|
|
69
|
+
* `templateStrings` array (one per program): the runtime never carries a
|
|
70
|
+
* hand-copied list of host globals. */
|
|
71
|
+
export declare function hostAbsentNamesArg(loc: SrcLoc): IrExpr;
|
|
72
|
+
/** Arms the runtime check at a dynamic site (idempotent): the runtime's
|
|
73
|
+
* global-object read and `in` answers throw for exactly these names. */
|
|
74
|
+
export declare function hostAbsentInstall(loc: SrcLoc): IrExpr;
|
|
@@ -0,0 +1,344 @@
|
|
|
1
|
+
import * as ts from "../ts7/adapter.js";
|
|
2
|
+
import { arrayOf, STRING, VOID } from "../../ir/ir.js";
|
|
3
|
+
import { stdlibGlobalNameOf, withoutTypeCasts } from "./surfaces.js";
|
|
4
|
+
/* Node 24 globals the native runtime does not implement. Reading one is NOT
|
|
5
|
+
* a feature probe for an absent capability: Node has the value, so answering
|
|
6
|
+
* `undefined` would silently diverge (pi's Codex transport stops running its
|
|
7
|
+
* WebSocket path). A read answers the constructor Node has
|
|
8
|
+
* (host-global-values.ts), so a module-init `instanceOf(globalThis.FormData,
|
|
9
|
+
* …)` keeps loading; constructing it, calling it, or reading a member the
|
|
10
|
+
* value does not carry refuses (SC2020, reason "host-global"), and a module
|
|
11
|
+
* that does one can run in a Node island.
|
|
12
|
+
*
|
|
13
|
+
* The set is derived, not typed by hand — see
|
|
14
|
+
* packages/compiler/test/host-globals.test.ts, which recomputes it from
|
|
15
|
+
* internal/compatibility/generated/node-v24-internal.json:
|
|
16
|
+
*
|
|
17
|
+
* globals chapter, depth 1, not flag-gated (an "Enable this API with …"
|
|
18
|
+
* stability note means Node 24 does not define it by default)
|
|
19
|
+
* − names the compiler's bundled declarations know
|
|
20
|
+
* (packages/compiler/ambient/*.d.ts: such a read is lowered or throws a
|
|
21
|
+
* loud runtime SC2020, never answers undefined)
|
|
22
|
+
* − the CommonJS wrapper bindings (require, module, exports, __dirname,
|
|
23
|
+
* __filename)
|
|
24
|
+
* − rows the ledger's implementation-owned static status does not call
|
|
25
|
+
* "not-implemented".
|
|
26
|
+
*
|
|
27
|
+
* Performance is the one Node 24 global the docs chapter omits (Node
|
|
28
|
+
* documents the class under perf_hooks, which has no Performance row either);
|
|
29
|
+
* the runtime oracle in the design repro pins it as a global whose typeof is
|
|
30
|
+
* "function", and it is listed here explicitly.
|
|
31
|
+
*
|
|
32
|
+
* Node's enumerable global list for `for (key in globalThis)` is
|
|
33
|
+
* scr_global_for_in_object's node_names (package runtime): these names are
|
|
34
|
+
* non-enumerable in Node, so they do not belong there.
|
|
35
|
+
*
|
|
36
|
+
* Temporal is deliberately absent: Node 24 does not define it, so "undefined"
|
|
37
|
+
* is the exact answer. Bun, Deno, window, self and document are absent for the
|
|
38
|
+
* same reason.
|
|
39
|
+
*/
|
|
40
|
+
export const NODE_GLOBALS_WITHOUT_NATIVE = new Set([
|
|
41
|
+
"BroadcastChannel",
|
|
42
|
+
"CloseEvent",
|
|
43
|
+
"CompressionStream",
|
|
44
|
+
"DecompressionStream",
|
|
45
|
+
"FormData",
|
|
46
|
+
"Navigator",
|
|
47
|
+
"Performance",
|
|
48
|
+
"PerformanceEntry",
|
|
49
|
+
"PerformanceMark",
|
|
50
|
+
"PerformanceMeasure",
|
|
51
|
+
"PerformanceObserver",
|
|
52
|
+
"PerformanceObserverEntryList",
|
|
53
|
+
"PerformanceResourceTiming",
|
|
54
|
+
"ReadableByteStreamController",
|
|
55
|
+
"ReadableStreamBYOBReader",
|
|
56
|
+
"ReadableStreamBYOBRequest",
|
|
57
|
+
"URLPattern",
|
|
58
|
+
"WebSocket",
|
|
59
|
+
]);
|
|
60
|
+
/** Node 24's `length` for each listed global's constructor — the `Function`
|
|
61
|
+
* length of the class (`WebSocket.length` is 1, `FormData.length` 0). A read
|
|
62
|
+
* answers a constructor carrying it, so a program reading `name`, `length` or
|
|
63
|
+
* `typeof` off the value sees what Node shows. Values are pinned against the
|
|
64
|
+
* running Node in packages/compiler/test/host-globals.test.ts. */
|
|
65
|
+
const HOST_GLOBAL_LENGTHS = new Map([
|
|
66
|
+
["BroadcastChannel", 1],
|
|
67
|
+
["CloseEvent", 1],
|
|
68
|
+
["CompressionStream", 1],
|
|
69
|
+
["DecompressionStream", 1],
|
|
70
|
+
["FormData", 0],
|
|
71
|
+
["Navigator", 0],
|
|
72
|
+
["Performance", 0],
|
|
73
|
+
["PerformanceEntry", 0],
|
|
74
|
+
["PerformanceMark", 1],
|
|
75
|
+
["PerformanceMeasure", 0],
|
|
76
|
+
["PerformanceObserver", 1],
|
|
77
|
+
["PerformanceObserverEntryList", 0],
|
|
78
|
+
["PerformanceResourceTiming", 0],
|
|
79
|
+
["ReadableByteStreamController", 0],
|
|
80
|
+
["ReadableStreamBYOBReader", 1],
|
|
81
|
+
["ReadableStreamBYOBRequest", 0],
|
|
82
|
+
["URLPattern", 0],
|
|
83
|
+
["WebSocket", 1],
|
|
84
|
+
]);
|
|
85
|
+
/** Node's `length` for the listed global `name`, or undefined when the table
|
|
86
|
+
* does not know it (the value is then built with the closure's own arity). */
|
|
87
|
+
export function hostGlobalLength(name) {
|
|
88
|
+
return HOST_GLOBAL_LENGTHS.get(name);
|
|
89
|
+
}
|
|
90
|
+
/** Whether the read is the callee of a call or `new` — the one use a listed
|
|
91
|
+
* global's value refuses. A bare read answers the constructor (see
|
|
92
|
+
* host-global-values.ts); constructing or calling it can only produce an
|
|
93
|
+
* instance native code does not have, so the compile fence stays (and a
|
|
94
|
+
* JavaScript source defers it to the throw at that statement). */
|
|
95
|
+
export function hostGlobalCallTarget(node) {
|
|
96
|
+
let current = node;
|
|
97
|
+
for (;;) {
|
|
98
|
+
const parent = current.parent;
|
|
99
|
+
if (parent === undefined)
|
|
100
|
+
return false;
|
|
101
|
+
if (ts.isParenthesizedExpression(parent) ||
|
|
102
|
+
ts.isAsExpression(parent) ||
|
|
103
|
+
ts.isTypeAssertion(parent) ||
|
|
104
|
+
ts.isNonNullExpression(parent)) {
|
|
105
|
+
if (parent.expression !== current)
|
|
106
|
+
return false;
|
|
107
|
+
current = parent;
|
|
108
|
+
continue;
|
|
109
|
+
}
|
|
110
|
+
return ((ts.isCallExpression(parent) || ts.isNewExpression(parent)) && parent.expression === current);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
/** Whether `id` reads one of those globals. Own bindings — imports, locals
|
|
114
|
+
* with an initializer, program classes and functions — keep their ordinary
|
|
115
|
+
* lowering; a declaration-file binding (the bundled lib, @types/node) or a
|
|
116
|
+
* program's ambient `declare var` is the global, and an unresolvable name
|
|
117
|
+
* (JavaScript) is Node's. */
|
|
118
|
+
export function hostGlobalNameOfIdentifier(lowerer, id) {
|
|
119
|
+
const name = id.text;
|
|
120
|
+
if (!NODE_GLOBALS_WITHOUT_NATIVE.has(name))
|
|
121
|
+
return null;
|
|
122
|
+
// `{ WebSocket }` reads the binding through the object literal's property:
|
|
123
|
+
// the name's own symbol is that property, and the value the shorthand
|
|
124
|
+
// copies is the checker's shorthand-value symbol. Read it here rather than
|
|
125
|
+
// through resolveValueSymbol, which also follows import aliases — this is
|
|
126
|
+
// a classification probe, and an alias of the name is the program's own
|
|
127
|
+
// binding, whatever it resolves to.
|
|
128
|
+
const own = lowerer.checker.getSymbolAtLocation(id);
|
|
129
|
+
const symbol = id.parent !== undefined && ts.isShorthandPropertyAssignment(id.parent) && id.parent.name === id
|
|
130
|
+
? (lowerer.checker.getShorthandAssignmentValueSymbol(id.parent) ?? own)
|
|
131
|
+
: own;
|
|
132
|
+
if (symbol === undefined)
|
|
133
|
+
return name;
|
|
134
|
+
// An import (or require alias) of the same name is the program's binding
|
|
135
|
+
// of somebody else's value, never the global.
|
|
136
|
+
if ((symbol.flags & ts.SymbolFlags.Alias) !== 0)
|
|
137
|
+
return null;
|
|
138
|
+
const declarations = symbol.declarations ?? [];
|
|
139
|
+
if (declarations.length === 0)
|
|
140
|
+
return null;
|
|
141
|
+
// Type-world partners declare no value: lib.dom and @types/node write
|
|
142
|
+
// `interface WebSocket` beside `declare var WebSocket`, and that merged
|
|
143
|
+
// symbol is still the global. Only the value declarations decide — a
|
|
144
|
+
// symbol with none is a type (a read of it is a type error elsewhere).
|
|
145
|
+
const valueDeclarations = declarations.filter((decl) => !ts.isInterfaceDeclaration(decl) && !ts.isTypeAliasDeclaration(decl));
|
|
146
|
+
if (valueDeclarations.length === 0)
|
|
147
|
+
return null;
|
|
148
|
+
const ambient = (decl) => ts.getSourceFileOfNode(decl).isDeclarationFile ||
|
|
149
|
+
(ts.getCombinedModifierFlags(decl) & ts.ModifierFlags.Ambient) !== 0;
|
|
150
|
+
const declaresGlobal = valueDeclarations.every((decl) => {
|
|
151
|
+
if (ts.isVariableDeclaration(decl))
|
|
152
|
+
return decl.initializer === undefined && ambient(decl);
|
|
153
|
+
if (ts.isFunctionDeclaration(decl) || ts.isClassDeclaration(decl))
|
|
154
|
+
return ambient(decl);
|
|
155
|
+
return false;
|
|
156
|
+
});
|
|
157
|
+
return declaresGlobal ? name : null;
|
|
158
|
+
}
|
|
159
|
+
/** Whether `receiver` is the global object: `globalThis`, a cast of it
|
|
160
|
+
* (`(globalThis as T)`), or a `const` initialized with either (`const g =
|
|
161
|
+
* globalThis as Record<string, unknown>`). The last shape is how most
|
|
162
|
+
* programs spell the global object, and the runtime's dynamic global object
|
|
163
|
+
* answers undefined for these names. A `let` is not followed: it can be
|
|
164
|
+
* reassigned to another object. */
|
|
165
|
+
export function isGlobalObjectRead(lowerer, receiver, seen = new Set(), name = stdlibGlobalNameOf(lowerer, receiver)) {
|
|
166
|
+
if (name === "globalThis")
|
|
167
|
+
return true;
|
|
168
|
+
const uncast = withoutTypeCasts(receiver);
|
|
169
|
+
if (uncast !== receiver)
|
|
170
|
+
return isGlobalObjectRead(lowerer, uncast, seen);
|
|
171
|
+
if (!ts.isIdentifier(uncast))
|
|
172
|
+
return false;
|
|
173
|
+
const symbol = lowerer.checker.getSymbolAtLocation(uncast);
|
|
174
|
+
if (symbol === undefined || seen.has(symbol))
|
|
175
|
+
return false;
|
|
176
|
+
seen.add(symbol);
|
|
177
|
+
const decl = symbol.valueDeclaration ?? symbol.declarations?.[0];
|
|
178
|
+
if (decl === undefined || !ts.isVariableDeclaration(decl) || decl.initializer === undefined)
|
|
179
|
+
return false;
|
|
180
|
+
if ((ts.getCombinedNodeFlags(decl) & ts.NodeFlags.Const) === 0)
|
|
181
|
+
return false;
|
|
182
|
+
return isGlobalObjectRead(lowerer, decl.initializer, seen);
|
|
183
|
+
}
|
|
184
|
+
/** Whether `access` reads one of those globals off the global object —
|
|
185
|
+
* `globalThis.X`, `(globalThis as T).X`, `alias.X` (`const alias =
|
|
186
|
+
* globalThis`), through parentheses and type casts. */
|
|
187
|
+
export function hostGlobalNameOfMember(lowerer, access) {
|
|
188
|
+
const name = access.name.text;
|
|
189
|
+
if (!NODE_GLOBALS_WITHOUT_NATIVE.has(name))
|
|
190
|
+
return null;
|
|
191
|
+
return isGlobalObjectRead(lowerer, access.expression) ? name : null;
|
|
192
|
+
}
|
|
193
|
+
/** `globalThis["X"]` with a static string key: the same read as `globalThis.X`
|
|
194
|
+
* (the runtime's dynamic path cannot tell the name is Node's). */
|
|
195
|
+
export function hostGlobalNameOfElement(lowerer, access) {
|
|
196
|
+
const key = access.argumentExpression;
|
|
197
|
+
if (!ts.isStringLiteralLike(key))
|
|
198
|
+
return null;
|
|
199
|
+
if (!NODE_GLOBALS_WITHOUT_NATIVE.has(key.text))
|
|
200
|
+
return null;
|
|
201
|
+
return isGlobalObjectRead(lowerer, access.expression) ? key.text : null;
|
|
202
|
+
}
|
|
203
|
+
/** The members a read of a listed global's value answers: the function
|
|
204
|
+
* intrinsics every constructor carries. Node also has the class's own
|
|
205
|
+
* static members (`WebSocket.OPEN`, `FormData.prototype.append`) and its
|
|
206
|
+
* instances' methods, which native code does not provide; reading one is a
|
|
207
|
+
* use of that surface and refuses (SC2020, host-global) rather than
|
|
208
|
+
* answering undefined. */
|
|
209
|
+
export const HOST_GLOBAL_VALUE_MEMBERS = new Set([
|
|
210
|
+
"length",
|
|
211
|
+
"name",
|
|
212
|
+
"prototype",
|
|
213
|
+
]);
|
|
214
|
+
/** The members the value's `prototype` object answers: `constructor`, the
|
|
215
|
+
* link back to the value, which is the same in Node. Node's prototype also
|
|
216
|
+
* carries the class's instance methods (`FormData.prototype.append`), which
|
|
217
|
+
* native code does not have; reading one refuses (SC2020, host-global). */
|
|
218
|
+
export const HOST_GLOBAL_PROTOTYPE_MEMBERS = new Set(["constructor"]);
|
|
219
|
+
/** The listed global whose `prototype` object `node` reads — a member read's
|
|
220
|
+
* receiver (`FormData.prototype.append`), a `const` holding that object
|
|
221
|
+
* (`const proto = FormData.prototype; proto.append`), or the
|
|
222
|
+
* `Object.setPrototypeOf` target shape. Null for every other expression. */
|
|
223
|
+
export function hostGlobalPrototypeOf(lowerer, node) {
|
|
224
|
+
return hostGlobalPrototypeOfSeen(lowerer, node, new Set());
|
|
225
|
+
}
|
|
226
|
+
function hostGlobalPrototypeOfSeen(lowerer, node, seen) {
|
|
227
|
+
const uncast = withoutTypeCasts(node);
|
|
228
|
+
// A constant holding the prototype object is the same object: member
|
|
229
|
+
// reads off it are as unsupported as off the read itself.
|
|
230
|
+
if (ts.isIdentifier(uncast)) {
|
|
231
|
+
const initializer = constAliasInitializer(lowerer, uncast, seen);
|
|
232
|
+
return initializer === null ? null : hostGlobalPrototypeOfSeen(lowerer, initializer, seen);
|
|
233
|
+
}
|
|
234
|
+
if (ts.isPropertyAccessExpression(uncast) && uncast.name.text === "prototype")
|
|
235
|
+
return hostGlobalNameOfReadSeen(lowerer, uncast.expression, seen);
|
|
236
|
+
if (ts.isElementAccessExpression(uncast) &&
|
|
237
|
+
ts.isStringLiteralLike(uncast.argumentExpression) &&
|
|
238
|
+
uncast.argumentExpression.text === "prototype")
|
|
239
|
+
return hostGlobalNameOfReadSeen(lowerer, uncast.expression, seen);
|
|
240
|
+
return null;
|
|
241
|
+
}
|
|
242
|
+
/** The listed global whose constructor value `node` holds through the
|
|
243
|
+
* prototype object (`FormData.prototype.constructor`), which is the same
|
|
244
|
+
* value the read answers. Null for every other expression. */
|
|
245
|
+
export function hostGlobalConstructorOfPrototype(lowerer, node) {
|
|
246
|
+
const uncast = withoutTypeCasts(node);
|
|
247
|
+
if (ts.isPropertyAccessExpression(uncast))
|
|
248
|
+
return uncast.name.text === "constructor"
|
|
249
|
+
? hostGlobalPrototypeOf(lowerer, uncast.expression)
|
|
250
|
+
: null;
|
|
251
|
+
if (ts.isElementAccessExpression(uncast) && ts.isStringLiteralLike(uncast.argumentExpression))
|
|
252
|
+
return uncast.argumentExpression.text === "constructor"
|
|
253
|
+
? hostGlobalPrototypeOf(lowerer, uncast.expression)
|
|
254
|
+
: null;
|
|
255
|
+
return null;
|
|
256
|
+
}
|
|
257
|
+
/** The listed global whose prototype member a call reads —
|
|
258
|
+
* `FormData.prototype.append(...)`, `globalThis.WebSocket["send"](...)`.
|
|
259
|
+
* A call reaches lowering without the member-read hook seeing the callee,
|
|
260
|
+
* so the call site asks the same question. Null for `constructor` and for
|
|
261
|
+
* every other expression. */
|
|
262
|
+
export function hostGlobalPrototypeMemberOf(lowerer, callee) {
|
|
263
|
+
const uncast = withoutTypeCasts(callee);
|
|
264
|
+
if (ts.isPropertyAccessExpression(uncast))
|
|
265
|
+
return HOST_GLOBAL_PROTOTYPE_MEMBERS.has(uncast.name.text)
|
|
266
|
+
? null
|
|
267
|
+
: hostGlobalPrototypeOf(lowerer, uncast.expression);
|
|
268
|
+
if (ts.isElementAccessExpression(uncast) && ts.isStringLiteralLike(uncast.argumentExpression))
|
|
269
|
+
return HOST_GLOBAL_PROTOTYPE_MEMBERS.has(uncast.argumentExpression.text)
|
|
270
|
+
? null
|
|
271
|
+
: hostGlobalPrototypeOf(lowerer, uncast.expression);
|
|
272
|
+
return null;
|
|
273
|
+
}
|
|
274
|
+
/** The listed global an operand reads, in any of the read forms — the
|
|
275
|
+
* expression itself (`typeof X`, a `new` callee, a call callee) — or the
|
|
276
|
+
* one a `const` holding the read answers (`const Ctor = WebSocket;
|
|
277
|
+
* Ctor.OPEN`). A `let` is not followed: it can be reassigned. */
|
|
278
|
+
export function hostGlobalNameOfRead(lowerer, operand) {
|
|
279
|
+
return hostGlobalNameOfReadSeen(lowerer, operand, new Set());
|
|
280
|
+
}
|
|
281
|
+
function hostGlobalNameOfReadSeen(lowerer, operand, seen) {
|
|
282
|
+
const unwrapped = withoutTypeCasts(operand);
|
|
283
|
+
if (ts.isIdentifier(unwrapped)) {
|
|
284
|
+
const global = hostGlobalNameOfIdentifier(lowerer, unwrapped);
|
|
285
|
+
if (global !== null)
|
|
286
|
+
return global;
|
|
287
|
+
const initializer = constAliasInitializer(lowerer, unwrapped, seen);
|
|
288
|
+
return initializer === null ? null : hostGlobalNameOfReadSeen(lowerer, initializer, seen);
|
|
289
|
+
}
|
|
290
|
+
if (ts.isPropertyAccessExpression(unwrapped))
|
|
291
|
+
return hostGlobalNameOfMember(lowerer, unwrapped);
|
|
292
|
+
if (ts.isElementAccessExpression(unwrapped))
|
|
293
|
+
return hostGlobalNameOfElement(lowerer, unwrapped);
|
|
294
|
+
return null;
|
|
295
|
+
}
|
|
296
|
+
/** The initializer of the `const` `id` names, when that constant is the
|
|
297
|
+
* program's own binding in a source file. Records the symbol in `seen` so a
|
|
298
|
+
* cycle between two constants ends the walk. */
|
|
299
|
+
function constAliasInitializer(lowerer, id, seen) {
|
|
300
|
+
const symbol = lowerer.checker.getSymbolAtLocation(id);
|
|
301
|
+
if (symbol === undefined || seen.has(symbol))
|
|
302
|
+
return null;
|
|
303
|
+
const declarations = symbol.declarations ?? [];
|
|
304
|
+
if (declarations.length !== 1)
|
|
305
|
+
return null;
|
|
306
|
+
const decl = declarations[0];
|
|
307
|
+
if (decl === undefined || !ts.isVariableDeclaration(decl) || decl.initializer === undefined)
|
|
308
|
+
return null;
|
|
309
|
+
if (decl.parent === undefined || (decl.parent.flags & ts.NodeFlags.Const) === 0)
|
|
310
|
+
return null;
|
|
311
|
+
if (ts.getSourceFileOfNode(decl).isDeclarationFile)
|
|
312
|
+
return null;
|
|
313
|
+
seen.add(symbol);
|
|
314
|
+
return decl.initializer;
|
|
315
|
+
}
|
|
316
|
+
/** The listed global a `typeof` operand reads, in any of the read forms. */
|
|
317
|
+
export function hostGlobalNameOfTypeofOperand(lowerer, operand) {
|
|
318
|
+
return hostGlobalNameOfRead(lowerer, operand);
|
|
319
|
+
}
|
|
320
|
+
/** The compiler's derived name table as the runtime's immortal
|
|
321
|
+
* `templateStrings` array (one per program): the runtime never carries a
|
|
322
|
+
* hand-copied list of host globals. */
|
|
323
|
+
export function hostAbsentNamesArg(loc) {
|
|
324
|
+
const names = [...NODE_GLOBALS_WITHOUT_NATIVE].sort();
|
|
325
|
+
return {
|
|
326
|
+
kind: "templateStrings",
|
|
327
|
+
key: `%hostAbsent.names:${names.join(",")}`,
|
|
328
|
+
cooked: names,
|
|
329
|
+
type: arrayOf(STRING),
|
|
330
|
+
loc,
|
|
331
|
+
};
|
|
332
|
+
}
|
|
333
|
+
/** Arms the runtime check at a dynamic site (idempotent): the runtime's
|
|
334
|
+
* global-object read and `in` answers throw for exactly these names. */
|
|
335
|
+
export function hostAbsentInstall(loc) {
|
|
336
|
+
return {
|
|
337
|
+
kind: "libCall",
|
|
338
|
+
fn: "global.hostAbsent",
|
|
339
|
+
args: [hostAbsentNamesArg(loc)],
|
|
340
|
+
type: VOID,
|
|
341
|
+
loc,
|
|
342
|
+
};
|
|
343
|
+
}
|
|
344
|
+
//# sourceMappingURL=host-globals.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"host-globals.js","sourceRoot":"","sources":["../../../src/frontend/lowering/host-globals.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,OAAO,EAAe,MAAM,EAAe,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAEjF,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAErE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAwB,IAAI,GAAG,CAAC;IACtE,kBAAkB;IAClB,YAAY;IACZ,mBAAmB;IACnB,qBAAqB;IACrB,UAAU;IACV,WAAW;IACX,aAAa;IACb,kBAAkB;IAClB,iBAAiB;IACjB,oBAAoB;IACpB,qBAAqB;IACrB,8BAA8B;IAC9B,2BAA2B;IAC3B,8BAA8B;IAC9B,0BAA0B;IAC1B,2BAA2B;IAC3B,YAAY;IACZ,WAAW;CACZ,CAAC,CAAC;AAEH;;;;k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AAI,CAAC;IAChE,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACjB,OAAO,IAAI,CAAC,WAAW,CAAC;AAC1B,CAAC;AAED,4EAA4E;AAC5E,MAAM,UAAU,6BAA6B,CAC3C,OAAgB,EAChB,OAAsB;IAEtB,OAAO,oBAAoB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;AAChD,CAAC;AAED;;uCAEuC;AACvC,MAAM,UAAU,kBAAkB,CAAC,GAAW;IAC5C,MAAM,KAAK,GAAG,CAAC,GAAG,2BAA2B,CAAC,CAAC,IAAI,EAAE,CAAC;IACtD,OAAO;QACL,IAAI,EAAE,iBAAiB;QACvB,GAAG,EAAE,qBAAqB,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE;QAC3C,MAAM,EAAE,KAAK;QACb,IAAI,EAAE,OAAO,CAAC,MAAM,CAAC;QACrB,GAAG;KACJ,CAAC;AACJ,CAAC;AAED;wEACwE;AACxE,MAAM,UAAU,iBAAiB,CAAC,GAAW;IAC3C,OAAO;QACL,IAAI,EAAE,SAAS;QACf,EAAE,EAAE,mBAAmB;QACvB,IAAI,EAAE,CAAC,kBAAkB,CAAC,GAAG,CAAC,CAAC;QAC/B,IAAI,EAAE,IAAI;QACV,GAAG;KACJ,CAAC;AACJ,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* node:http2 constants — the full table Node v24.22.
|
|
1
|
+
/* node:http2 constants — the full table Node v24.22.1 exposes as
|
|
2
2
|
* http2.constants (240 members: NGHTTP2_* protocol codes, NGHTTP2_ERR_*
|
|
3
3
|
* library codes, HTTP2_HEADER_* names, HTTP2_METHOD_* verbs, and the
|
|
4
4
|
* HTTP_STATUS_* table), generated with
|