@scriptc/compiler 0.4.7 → 0.4.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ambient/node-fallback/child_process.d.ts +71 -22
- package/ambient/node-fallback/crypto.d.ts +15 -7
- package/ambient/node-fallback/events.d.ts +23 -5
- package/ambient/node-fallback/fs.d.ts +3 -2
- package/ambient/node-fallback/http.d.ts +23 -17
- package/ambient/node-fallback/https.d.ts +5 -2
- package/ambient/node-fallback/net.d.ts +6 -0
- package/ambient/node-fallback/os.d.ts +11 -1
- package/ambient/node-fallback/path-posix.d.ts +6 -0
- package/ambient/node-fallback/path-win32.d.ts +5 -0
- package/ambient/node-fallback/path.d.ts +2 -0
- package/ambient/node-fallback/zlib.d.ts +31 -2
- package/ambient/scriptc-node-fallback.d.ts +37 -7
- package/ambient/scriptc.d.ts +7 -2
- package/dist/backend/executable-features.js +11 -3
- package/dist/backend/executable-features.js.map +1 -1
- package/dist/backend/library-pack.d.ts +6 -0
- package/dist/backend/library-pack.js +17 -6
- package/dist/backend/library-pack.js.map +1 -1
- package/dist/backend/library-pack.test.d.ts +1 -0
- package/dist/backend/library-pack.test.js +28 -0
- package/dist/backend/library-pack.test.js.map +1 -0
- package/dist/backend/linker.d.ts +9 -2
- package/dist/backend/linker.js +190 -32
- package/dist/backend/linker.js.map +1 -1
- package/dist/backend/lld.d.ts +8 -4
- package/dist/backend/lld.js +19 -13
- package/dist/backend/lld.js.map +1 -1
- package/dist/backend/lld.test.js +3 -1
- package/dist/backend/lld.test.js.map +1 -1
- package/dist/backend/llvm/alloc.d.ts +15 -2
- package/dist/backend/llvm/alloc.js +172 -36
- package/dist/backend/llvm/alloc.js.map +1 -1
- package/dist/backend/llvm/alloc.test.js +69 -1
- package/dist/backend/llvm/alloc.test.js.map +1 -1
- package/dist/backend/llvm/arenas.d.ts +17 -4
- package/dist/backend/llvm/arenas.js +105 -10
- package/dist/backend/llvm/arenas.js.map +1 -1
- package/dist/backend/llvm/arenas.test.js +229 -0
- package/dist/backend/llvm/arenas.test.js.map +1 -1
- package/dist/backend/llvm/bytes-alias.js +10 -1
- package/dist/backend/llvm/bytes-alias.js.map +1 -1
- package/dist/backend/llvm/bytes-headers.js +6 -0
- package/dist/backend/llvm/bytes-headers.js.map +1 -1
- package/dist/backend/llvm/bytes-loop-versions.test.js +25 -0
- package/dist/backend/llvm/bytes-loop-versions.test.js.map +1 -1
- package/dist/backend/llvm/call-lifetimes.js +10 -0
- package/dist/backend/llvm/call-lifetimes.js.map +1 -1
- package/dist/backend/llvm/classes.d.ts +16 -9
- package/dist/backend/llvm/classes.js +142 -37
- package/dist/backend/llvm/classes.js.map +1 -1
- package/dist/backend/llvm/classes.test.js +42 -0
- package/dist/backend/llvm/classes.test.js.map +1 -1
- package/dist/backend/llvm/cpu-dispatch.d.ts +15 -5
- package/dist/backend/llvm/cpu-dispatch.js +31 -7
- package/dist/backend/llvm/cpu-dispatch.js.map +1 -1
- package/dist/backend/llvm/dyn.d.ts +12 -3
- package/dist/backend/llvm/dyn.js +31 -7
- package/dist/backend/llvm/dyn.js.map +1 -1
- package/dist/backend/llvm/emit-function.js +67 -4
- package/dist/backend/llvm/emit-function.js.map +1 -1
- package/dist/backend/llvm/emit-module.js +90 -39
- package/dist/backend/llvm/emit-module.js.map +1 -1
- package/dist/backend/llvm/emit-module.test.d.ts +1 -0
- package/dist/backend/llvm/emit-module.test.js +52 -0
- package/dist/backend/llvm/emit-module.test.js.map +1 -0
- package/dist/backend/llvm/emit-statements.js +99 -15
- package/dist/backend/llvm/emit-statements.js.map +1 -1
- package/dist/backend/llvm/emitter.d.ts +113 -8
- package/dist/backend/llvm/emitter.js +438 -67
- package/dist/backend/llvm/emitter.js.map +1 -1
- package/dist/backend/llvm/emitter.test.js +31 -3
- package/dist/backend/llvm/emitter.test.js.map +1 -1
- package/dist/backend/llvm/expr-async.js +19 -1
- package/dist/backend/llvm/expr-async.js.map +1 -1
- package/dist/backend/llvm/expr-bytes.js +16 -1
- package/dist/backend/llvm/expr-bytes.js.map +1 -1
- package/dist/backend/llvm/expr-calls.js +18 -2
- package/dist/backend/llvm/expr-calls.js.map +1 -1
- package/dist/backend/llvm/expr-dynamic.js +31 -10
- package/dist/backend/llvm/expr-dynamic.js.map +1 -1
- package/dist/backend/llvm/expr-primitives.js +31 -3
- package/dist/backend/llvm/expr-primitives.js.map +1 -1
- package/dist/backend/llvm/expr-records.d.ts +1 -1
- package/dist/backend/llvm/expr-records.js +124 -56
- package/dist/backend/llvm/expr-records.js.map +1 -1
- package/dist/backend/llvm/expr-stream-bridges.js +17 -0
- package/dist/backend/llvm/expr-stream-bridges.js.map +1 -1
- package/dist/backend/llvm/js-groups.d.ts +21 -0
- package/dist/backend/llvm/js-groups.js +277 -0
- package/dist/backend/llvm/js-groups.js.map +1 -0
- package/dist/backend/llvm/js-ic.d.ts +19 -1
- package/dist/backend/llvm/js-ic.js +96 -23
- package/dist/backend/llvm/js-ic.js.map +1 -1
- package/dist/backend/llvm/lib-dispatch.js +132 -1
- package/dist/backend/llvm/lib-dispatch.js.map +1 -1
- package/dist/backend/llvm/lib-network.js +33 -6
- package/dist/backend/llvm/lib-network.js.map +1 -1
- package/dist/backend/llvm/lib-process.js +44 -3
- package/dist/backend/llvm/lib-process.js.map +1 -1
- package/dist/backend/llvm/lib-shared.js +69 -2
- package/dist/backend/llvm/lib-shared.js.map +1 -1
- package/dist/backend/llvm/local-union-storage.test.js +32 -0
- package/dist/backend/llvm/local-union-storage.test.js.map +1 -1
- package/dist/backend/llvm/loop-state.js +7 -2
- package/dist/backend/llvm/loop-state.js.map +1 -1
- package/dist/backend/llvm/map-entry-fusion.d.ts +8 -0
- package/dist/backend/llvm/map-entry-fusion.js +3 -3
- package/dist/backend/llvm/map-entry-fusion.js.map +1 -1
- package/dist/backend/llvm/map-number-lookup.test.js +6 -6
- package/dist/backend/llvm/map-number-lookup.test.js.map +1 -1
- package/dist/backend/llvm/nullable-unions.js +7 -6
- package/dist/backend/llvm/nullable-unions.js.map +1 -1
- package/dist/backend/llvm/nullable-unions.test.js +4 -1
- package/dist/backend/llvm/nullable-unions.test.js.map +1 -1
- package/dist/backend/llvm/receivers.js +3 -0
- package/dist/backend/llvm/receivers.js.map +1 -1
- package/dist/backend/llvm/record-entry-fusion.d.ts +32 -0
- package/dist/backend/llvm/record-entry-fusion.js +217 -0
- package/dist/backend/llvm/record-entry-fusion.js.map +1 -0
- package/dist/backend/llvm/record-results.d.ts +5 -2
- package/dist/backend/llvm/record-results.js +13 -12
- package/dist/backend/llvm/record-results.js.map +1 -1
- package/dist/backend/llvm/record-views.js +12 -6
- package/dist/backend/llvm/record-views.js.map +1 -1
- package/dist/backend/llvm/reference-effects.js +1 -0
- package/dist/backend/llvm/reference-effects.js.map +1 -1
- package/dist/backend/llvm/reference-writes.js +3 -0
- package/dist/backend/llvm/reference-writes.js.map +1 -1
- package/dist/backend/llvm/region-ir.js +1 -0
- package/dist/backend/llvm/region-ir.js.map +1 -1
- package/dist/backend/llvm/region-sites.d.ts +18 -0
- package/dist/backend/llvm/region-sites.js +79 -1
- package/dist/backend/llvm/region-sites.js.map +1 -1
- package/dist/backend/llvm/runtime-registries.test.js +53 -6
- package/dist/backend/llvm/runtime-registries.test.js.map +1 -1
- package/dist/backend/llvm/serialized-ir-emission.test.js +3 -1
- package/dist/backend/llvm/serialized-ir-emission.test.js.map +1 -1
- package/dist/backend/llvm/shapes.d.ts +33 -3
- package/dist/backend/llvm/shapes.js +183 -13
- package/dist/backend/llvm/shapes.js.map +1 -1
- package/dist/backend/llvm/stack-objects.d.ts +1 -2
- package/dist/backend/llvm/stack-objects.js +8 -5
- package/dist/backend/llvm/stack-objects.js.map +1 -1
- package/dist/backend/llvm/walkers.d.ts +12 -0
- package/dist/backend/llvm/walkers.js +46 -2
- package/dist/backend/llvm/walkers.js.map +1 -1
- package/dist/backend/may-throw.js +12 -2
- package/dist/backend/may-throw.js.map +1 -1
- package/dist/backend/may-throw.test.js +13 -0
- package/dist/backend/may-throw.test.js.map +1 -1
- package/dist/backend/native/contracts.d.ts +48 -8
- package/dist/backend/native/executable.js +55 -13
- package/dist/backend/native/executable.js.map +1 -1
- package/dist/backend/native/helper-identity-record.d.ts +11 -0
- package/dist/backend/native/helper-identity-record.js +76 -0
- package/dist/backend/native/helper-identity-record.js.map +1 -0
- package/dist/backend/native/helper-identity-record.test.d.ts +1 -0
- package/dist/backend/native/helper-identity-record.test.js +101 -0
- package/dist/backend/native/helper-identity-record.test.js.map +1 -0
- package/dist/backend/native/library.js +9 -1
- package/dist/backend/native/library.js.map +1 -1
- package/dist/backend/native/runtime-inputs.js +4 -1
- package/dist/backend/native/runtime-inputs.js.map +1 -1
- package/dist/backend/native/vendor.d.ts +1 -1
- package/dist/backend/native/vendor.js +1 -1
- package/dist/backend/native/vendor.js.map +1 -1
- package/dist/backend/native-codegen-core.d.ts +13 -10
- package/dist/backend/native-codegen-core.js +26 -13
- package/dist/backend/native-codegen-core.js.map +1 -1
- package/dist/backend/native-codegen.js +27 -8
- package/dist/backend/native-codegen.js.map +1 -1
- package/dist/backend/native-codegen.test.js +110 -14
- package/dist/backend/native-codegen.test.js.map +1 -1
- package/dist/backend/native-link-info-core.d.ts +37 -8
- package/dist/backend/native-link-info-core.js.map +1 -1
- package/dist/backend/runtime-pack-core.d.ts +17 -2
- package/dist/backend/runtime-pack-core.js +18 -3
- package/dist/backend/runtime-pack-core.js.map +1 -1
- package/dist/backend/runtime-pack-targets.test.js +1 -1
- package/dist/backend/runtime-pack-targets.test.js.map +1 -1
- package/dist/backend/runtime-pack.test.js +211 -2
- package/dist/backend/runtime-pack.test.js.map +1 -1
- package/dist/backend/tree-classes.d.ts +42 -0
- package/dist/backend/tree-classes.js +723 -0
- package/dist/backend/tree-classes.js.map +1 -0
- package/dist/backend/tree-classes.test.d.ts +1 -0
- package/dist/backend/tree-classes.test.js +338 -0
- package/dist/backend/tree-classes.test.js.map +1 -0
- package/dist/backend/vendor-archives.d.ts +5 -1
- package/dist/backend/vendor-archives.js +51 -7
- package/dist/backend/vendor-archives.js.map +1 -1
- package/dist/backend/vendor-inputs.d.ts +25 -4
- package/dist/backend/vendor-inputs.js +68 -4
- package/dist/backend/vendor-inputs.js.map +1 -1
- package/dist/backend/vendor-inputs.test.js +35 -1
- package/dist/backend/vendor-inputs.test.js.map +1 -1
- package/dist/backend/warm-cache.js +1 -1
- package/dist/backend/warm-cache.js.map +1 -1
- package/dist/compat/fetch-profile.js +2 -2
- package/dist/coverage/report.js +47 -0
- package/dist/coverage/report.js.map +1 -1
- package/dist/coverage/surface-manifest.js +1 -1
- package/dist/diagnostics/codes.d.ts +8 -0
- package/dist/diagnostics/codes.js +8 -0
- package/dist/diagnostics/codes.js.map +1 -1
- package/dist/diagnostics/diagnostic.d.ts +27 -9
- package/dist/diagnostics/diagnostic.js +60 -19
- package/dist/diagnostics/diagnostic.js.map +1 -1
- package/dist/diagnostics/envelope.d.ts +18 -0
- package/dist/diagnostics/envelope.js.map +1 -1
- package/dist/executable/executable-cache.d.ts +21 -2
- package/dist/executable/executable-cache.js +21 -1
- package/dist/executable/executable-cache.js.map +1 -1
- package/dist/executable/executable-cache.test.js +123 -1
- package/dist/executable/executable-cache.test.js.map +1 -1
- package/dist/executable/prepare.js +199 -248
- package/dist/executable/prepare.js.map +1 -1
- package/dist/frontend/analysis.js +200 -18
- package/dist/frontend/analysis.js.map +1 -1
- package/dist/frontend/builtin-modules.d.ts +4 -0
- package/dist/frontend/builtin-modules.js +10 -0
- package/dist/frontend/builtin-modules.js.map +1 -1
- package/dist/frontend/early-errors.d.ts +12 -2
- package/dist/frontend/early-errors.js +535 -4
- package/dist/frontend/early-errors.js.map +1 -1
- package/dist/frontend/early-errors.test.js +165 -0
- package/dist/frontend/early-errors.test.js.map +1 -1
- package/dist/frontend/inferred-js-diagnostics.test.js +65 -0
- package/dist/frontend/inferred-js-diagnostics.test.js.map +1 -1
- package/dist/frontend/jsx-opinion-sites.test.d.ts +1 -0
- package/dist/frontend/jsx-opinion-sites.test.js +86 -0
- package/dist/frontend/jsx-opinion-sites.test.js.map +1 -0
- package/dist/frontend/lib-exports.d.ts +23 -4
- package/dist/frontend/lib-exports.js +98 -26
- package/dist/frontend/lib-exports.js.map +1 -1
- package/dist/frontend/lowering/binding-analysis.js +21 -3
- package/dist/frontend/lowering/binding-analysis.js.map +1 -1
- package/dist/frontend/lowering/buffers.d.ts +8 -0
- package/dist/frontend/lowering/buffers.js +43 -0
- package/dist/frontend/lowering/buffers.js.map +1 -0
- package/dist/frontend/lowering/builtin-calls.js +4 -0
- package/dist/frontend/lowering/builtin-calls.js.map +1 -1
- package/dist/frontend/lowering/builtin-namespaces.d.ts +3 -2
- package/dist/frontend/lowering/builtin-namespaces.js +24 -3
- package/dist/frontend/lowering/builtin-namespaces.js.map +1 -1
- package/dist/frontend/lowering/builtin-statics.d.ts +24 -0
- package/dist/frontend/lowering/builtin-statics.js +407 -0
- package/dist/frontend/lowering/builtin-statics.js.map +1 -0
- package/dist/frontend/lowering/builtins/arguments.d.ts +4 -0
- package/dist/frontend/lowering/builtins/arguments.js +12 -0
- package/dist/frontend/lowering/builtins/arguments.js.map +1 -1
- package/dist/frontend/lowering/builtins/atomics.d.ts +6 -1
- package/dist/frontend/lowering/builtins/atomics.js +87 -1
- package/dist/frontend/lowering/builtins/atomics.js.map +1 -1
- package/dist/frontend/lowering/builtins/child-process-methods.js +2 -2
- package/dist/frontend/lowering/builtins/child-process-methods.js.map +1 -1
- package/dist/frontend/lowering/builtins/child-process-sync.d.ts +13 -0
- package/dist/frontend/lowering/builtins/child-process-sync.js +1 -13
- package/dist/frontend/lowering/builtins/child-process-sync.js.map +1 -1
- package/dist/frontend/lowering/builtins/child-process.d.ts +10 -4
- package/dist/frontend/lowering/builtins/child-process.js +560 -27
- package/dist/frontend/lowering/builtins/child-process.js.map +1 -1
- package/dist/frontend/lowering/builtins/compression.d.ts +2 -2
- package/dist/frontend/lowering/builtins/compression.js +41 -21
- package/dist/frontend/lowering/builtins/compression.js.map +1 -1
- package/dist/frontend/lowering/builtins/constants.js +7 -2
- package/dist/frontend/lowering/builtins/constants.js.map +1 -1
- package/dist/frontend/lowering/builtins/filesystem-calls.d.ts +1 -0
- package/dist/frontend/lowering/builtins/filesystem-calls.js +28 -2
- package/dist/frontend/lowering/builtins/filesystem-calls.js.map +1 -1
- package/dist/frontend/lowering/builtins/json.js +4 -0
- package/dist/frontend/lowering/builtins/json.js.map +1 -1
- package/dist/frontend/lowering/builtins/module-calls.js +3 -1
- package/dist/frontend/lowering/builtins/module-calls.js.map +1 -1
- package/dist/frontend/lowering/builtins/numbers.d.ts +4 -1
- package/dist/frontend/lowering/builtins/numbers.js +10 -2
- package/dist/frontend/lowering/builtins/numbers.js.map +1 -1
- package/dist/frontend/lowering/builtins/operating-system.d.ts +6 -3
- package/dist/frontend/lowering/builtins/operating-system.js +96 -16
- package/dist/frontend/lowering/builtins/operating-system.js.map +1 -1
- package/dist/frontend/lowering/builtins/process.d.ts +2 -2
- package/dist/frontend/lowering/builtins/process.js +103 -8
- package/dist/frontend/lowering/builtins/process.js.map +1 -1
- package/dist/frontend/lowering/builtins/promises.js +169 -8
- package/dist/frontend/lowering/builtins/promises.js.map +1 -1
- package/dist/frontend/lowering/builtins/properties.js +6 -2
- package/dist/frontend/lowering/builtins/properties.js.map +1 -1
- package/dist/frontend/lowering/builtins/readline.d.ts +6 -4
- package/dist/frontend/lowering/builtins/readline.js +180 -36
- package/dist/frontend/lowering/builtins/readline.js.map +1 -1
- package/dist/frontend/lowering/builtins/url.js +35 -12
- package/dist/frontend/lowering/builtins/url.js.map +1 -1
- package/dist/frontend/lowering/builtins/webassembly.js +2 -0
- package/dist/frontend/lowering/builtins/webassembly.js.map +1 -1
- package/dist/frontend/lowering/call-arguments.d.ts +10 -0
- package/dist/frontend/lowering/call-arguments.js +37 -2
- package/dist/frontend/lowering/call-arguments.js.map +1 -1
- package/dist/frontend/lowering/call-signatures.d.ts +10 -0
- package/dist/frontend/lowering/call-signatures.js +103 -0
- package/dist/frontend/lowering/call-signatures.js.map +1 -1
- package/dist/frontend/lowering/class-construction.d.ts +14 -2
- package/dist/frontend/lowering/class-construction.js +99 -5
- package/dist/frontend/lowering/class-construction.js.map +1 -1
- package/dist/frontend/lowering/class-dynamic-dispatch.d.ts +9 -0
- package/dist/frontend/lowering/class-dynamic-dispatch.js +1283 -1030
- package/dist/frontend/lowering/class-dynamic-dispatch.js.map +1 -1
- package/dist/frontend/lowering/class-dynamic-dispatch.test.js +158 -0
- package/dist/frontend/lowering/class-dynamic-dispatch.test.js.map +1 -1
- package/dist/frontend/lowering/class-prototypes.js +20 -15
- package/dist/frontend/lowering/class-prototypes.js.map +1 -1
- package/dist/frontend/lowering/class-runtime-statics.d.ts +8 -0
- package/dist/frontend/lowering/class-runtime-statics.js +20 -1
- package/dist/frontend/lowering/class-runtime-statics.js.map +1 -1
- package/dist/frontend/lowering/class-unions.js +21 -4
- package/dist/frontend/lowering/class-unions.js.map +1 -1
- package/dist/frontend/lowering/coercions/function-adapters.js +9 -0
- package/dist/frontend/lowering/coercions/function-adapters.js.map +1 -1
- package/dist/frontend/lowering/coercions/state.d.ts +8 -0
- package/dist/frontend/lowering/coercions/state.js +17 -0
- package/dist/frontend/lowering/coercions/state.js.map +1 -1
- package/dist/frontend/lowering/coercions/structural-plans.js +20 -5
- package/dist/frontend/lowering/coercions/structural-plans.js.map +1 -1
- package/dist/frontend/lowering/coercions/structural.js +10 -1
- package/dist/frontend/lowering/coercions/structural.js.map +1 -1
- package/dist/frontend/lowering/coercions/unions.d.ts +2 -1
- package/dist/frontend/lowering/coercions/unions.js +54 -10
- package/dist/frontend/lowering/coercions/unions.js.map +1 -1
- package/dist/frontend/lowering/constructor-returns.d.ts +23 -2
- package/dist/frontend/lowering/constructor-returns.js +284 -58
- package/dist/frontend/lowering/constructor-returns.js.map +1 -1
- package/dist/frontend/lowering/containers/array-callbacks.js +156 -62
- package/dist/frontend/lowering/containers/array-callbacks.js.map +1 -1
- package/dist/frontend/lowering/containers/array-construction.js +21 -3
- package/dist/frontend/lowering/containers/array-construction.js.map +1 -1
- package/dist/frontend/lowering/containers/array-from-async.js +139 -3
- package/dist/frontend/lowering/containers/array-from-async.js.map +1 -1
- package/dist/frontend/lowering/containers/array-iteration.d.ts +14 -4
- package/dist/frontend/lowering/containers/array-iteration.js +24 -7
- package/dist/frontend/lowering/containers/array-iteration.js.map +1 -1
- package/dist/frontend/lowering/containers/array-methods.js +14 -11
- package/dist/frontend/lowering/containers/array-methods.js.map +1 -1
- package/dist/frontend/lowering/containers/bytes.d.ts +6 -0
- package/dist/frontend/lowering/containers/bytes.js +446 -86
- package/dist/frontend/lowering/containers/bytes.js.map +1 -1
- package/dist/frontend/lowering/containers/callback-arguments.d.ts +5 -0
- package/dist/frontend/lowering/containers/callback-arguments.js +21 -12
- package/dist/frontend/lowering/containers/callback-arguments.js.map +1 -1
- package/dist/frontend/lowering/containers/collection-grouping.js +421 -2
- package/dist/frontend/lowering/containers/collection-grouping.js.map +1 -1
- package/dist/frontend/lowering/containers/collection-methods.js +52 -17
- package/dist/frontend/lowering/containers/collection-methods.js.map +1 -1
- package/dist/frontend/lowering/containers/iterator-helpers.d.ts +23 -0
- package/dist/frontend/lowering/containers/iterator-helpers.js +176 -10
- package/dist/frontend/lowering/containers/iterator-helpers.js.map +1 -1
- package/dist/frontend/lowering/containers/string-and-regexp.d.ts +5 -2
- package/dist/frontend/lowering/containers/string-and-regexp.js +45 -11
- package/dist/frontend/lowering/containers/string-and-regexp.js.map +1 -1
- package/dist/frontend/lowering/crypto-tables.d.ts +3 -3
- package/dist/frontend/lowering/crypto-tables.js +5 -5
- package/dist/frontend/lowering/dispatch-sites.js +3 -0
- package/dist/frontend/lowering/dispatch-sites.js.map +1 -1
- package/dist/frontend/lowering/divergences.d.ts +40 -0
- package/dist/frontend/lowering/divergences.js +239 -20
- package/dist/frontend/lowering/divergences.js.map +1 -1
- package/dist/frontend/lowering/effect-free.d.ts +12 -0
- package/dist/frontend/lowering/effect-free.js +44 -0
- package/dist/frontend/lowering/effect-free.js.map +1 -0
- package/dist/frontend/lowering/expressions/array-literals.d.ts +10 -0
- package/dist/frontend/lowering/expressions/array-literals.js +62 -0
- package/dist/frontend/lowering/expressions/array-literals.js.map +1 -1
- package/dist/frontend/lowering/expressions/binary.js +115 -5
- package/dist/frontend/lowering/expressions/binary.js.map +1 -1
- package/dist/frontend/lowering/expressions/element-access.js +151 -7
- package/dist/frontend/lowering/expressions/element-access.js.map +1 -1
- package/dist/frontend/lowering/expressions/hosted-narrowing.d.ts +15 -0
- package/dist/frontend/lowering/expressions/hosted-narrowing.js +54 -1
- package/dist/frontend/lowering/expressions/hosted-narrowing.js.map +1 -1
- package/dist/frontend/lowering/expressions/identifiers.js +31 -2
- package/dist/frontend/lowering/expressions/identifiers.js.map +1 -1
- package/dist/frontend/lowering/expressions/narrowing.d.ts +3 -0
- package/dist/frontend/lowering/expressions/narrowing.js +175 -22
- package/dist/frontend/lowering/expressions/narrowing.js.map +1 -1
- package/dist/frontend/lowering/expressions/object-literals.js +173 -11
- package/dist/frontend/lowering/expressions/object-literals.js.map +1 -1
- package/dist/frontend/lowering/expressions/optional-chains.js +5 -1
- package/dist/frontend/lowering/expressions/optional-chains.js.map +1 -1
- package/dist/frontend/lowering/expressions/property-access.d.ts +8 -0
- package/dist/frontend/lowering/expressions/property-access.js +379 -109
- package/dist/frontend/lowering/expressions/property-access.js.map +1 -1
- package/dist/frontend/lowering/expressions/relational.js +237 -7
- package/dist/frontend/lowering/expressions/relational.js.map +1 -1
- package/dist/frontend/lowering/expressions/typeof.js +8 -0
- package/dist/frontend/lowering/expressions/typeof.js.map +1 -1
- package/dist/frontend/lowering/expressions/union-fields.d.ts +20 -1
- package/dist/frontend/lowering/expressions/union-fields.js +103 -13
- package/dist/frontend/lowering/expressions/union-fields.js.map +1 -1
- package/dist/frontend/lowering/expressions/updates.js +74 -55
- package/dist/frontend/lowering/expressions/updates.js.map +1 -1
- package/dist/frontend/lowering/function-returns.js +37 -10
- package/dist/frontend/lowering/function-returns.js.map +1 -1
- package/dist/frontend/lowering/general-streams.js +5 -0
- package/dist/frontend/lowering/general-streams.js.map +1 -1
- package/dist/frontend/lowering/generator-delegation.d.ts +15 -7
- package/dist/frontend/lowering/generator-delegation.js +301 -118
- package/dist/frontend/lowering/generator-delegation.js.map +1 -1
- package/dist/frontend/lowering/generic-functions.d.ts +27 -1
- package/dist/frontend/lowering/generic-functions.js +432 -18
- package/dist/frontend/lowering/generic-functions.js.map +1 -1
- package/dist/frontend/lowering/global-function-values.d.ts +25 -0
- package/dist/frontend/lowering/global-function-values.js +193 -0
- package/dist/frontend/lowering/global-function-values.js.map +1 -0
- package/dist/frontend/lowering/global-values.d.ts +6 -4
- package/dist/frontend/lowering/global-values.js +24 -10
- package/dist/frontend/lowering/global-values.js.map +1 -1
- package/dist/frontend/lowering/host-global-values.d.ts +31 -0
- package/dist/frontend/lowering/host-global-values.js +121 -0
- package/dist/frontend/lowering/host-global-values.js.map +1 -0
- package/dist/frontend/lowering/host-globals.d.ts +74 -0
- package/dist/frontend/lowering/host-globals.js +344 -0
- package/dist/frontend/lowering/host-globals.js.map +1 -0
- package/dist/frontend/lowering/http2-constants.js +1 -1
- package/dist/frontend/lowering/iterator-adapters.js +46 -17
- package/dist/frontend/lowering/iterator-adapters.js.map +1 -1
- package/dist/frontend/lowering/iterator-prototype.d.ts +30 -0
- package/dist/frontend/lowering/iterator-prototype.js +160 -0
- package/dist/frontend/lowering/iterator-prototype.js.map +1 -0
- package/dist/frontend/lowering/key-order-witness.js +43 -22
- package/dist/frontend/lowering/key-order-witness.js.map +1 -1
- package/dist/frontend/lowering/key-order-witness.test.js +1 -0
- package/dist/frontend/lowering/key-order-witness.test.js.map +1 -1
- package/dist/frontend/lowering/lib-boundary.js +11 -3
- package/dist/frontend/lowering/lib-boundary.js.map +1 -1
- package/dist/frontend/lowering/lower-assert.js +30 -15
- package/dist/frontend/lowering/lower-assert.js.map +1 -1
- package/dist/frontend/lowering/lower-async-iteration.d.ts +11 -0
- package/dist/frontend/lowering/lower-async-iteration.js +15 -0
- package/dist/frontend/lowering/lower-async-iteration.js.map +1 -1
- package/dist/frontend/lowering/lower-builtin-values.js +11 -1
- package/dist/frontend/lowering/lower-builtin-values.js.map +1 -1
- package/dist/frontend/lowering/lower-calls.d.ts +25 -0
- package/dist/frontend/lowering/lower-calls.js +929 -227
- package/dist/frontend/lowering/lower-calls.js.map +1 -1
- package/dist/frontend/lowering/lower-calls.test.js +59 -16
- package/dist/frontend/lowering/lower-calls.test.js.map +1 -1
- package/dist/frontend/lowering/lower-classes.d.ts +20 -0
- package/dist/frontend/lowering/lower-classes.js +468 -44
- package/dist/frontend/lowering/lower-classes.js.map +1 -1
- package/dist/frontend/lowering/lower-event-emitter.d.ts +6 -2
- package/dist/frontend/lowering/lower-event-emitter.js +253 -83
- package/dist/frontend/lowering/lower-event-emitter.js.map +1 -1
- package/dist/frontend/lowering/lower-exprs.d.ts +1 -1
- package/dist/frontend/lowering/lower-exprs.js +71 -20
- package/dist/frontend/lowering/lower-exprs.js.map +1 -1
- package/dist/frontend/lowering/lower-functions.js +25 -6
- package/dist/frontend/lowering/lower-functions.js.map +1 -1
- package/dist/frontend/lowering/lower-generators.js +57 -10
- package/dist/frontend/lowering/lower-generators.js.map +1 -1
- package/dist/frontend/lowering/lower-global-value.d.ts +6 -0
- package/dist/frontend/lowering/lower-global-value.js +14 -5
- package/dist/frontend/lowering/lower-global-value.js.map +1 -1
- package/dist/frontend/lowering/lower-inspect.d.ts +4 -0
- package/dist/frontend/lowering/lower-inspect.js +638 -64
- package/dist/frontend/lowering/lower-inspect.js.map +1 -1
- package/dist/frontend/lowering/lower-modules.js +48 -2
- package/dist/frontend/lowering/lower-modules.js.map +1 -1
- package/dist/frontend/lowering/lower-namespaces.js +18 -0
- package/dist/frontend/lowering/lower-namespaces.js.map +1 -1
- package/dist/frontend/lowering/lower-node-island.js +16 -6
- package/dist/frontend/lowering/lower-node-island.js.map +1 -1
- package/dist/frontend/lowering/lower-server.js +303 -87
- package/dist/frontend/lowering/lower-server.js.map +1 -1
- package/dist/frontend/lowering/lower-stdlib.js +45 -0
- package/dist/frontend/lowering/lower-stdlib.js.map +1 -1
- package/dist/frontend/lowering/lower-stmts.d.ts +14 -11
- package/dist/frontend/lowering/lower-stmts.js +270 -52
- package/dist/frontend/lowering/lower-stmts.js.map +1 -1
- package/dist/frontend/lowering/lower-timers.js +110 -27
- package/dist/frontend/lowering/lower-timers.js.map +1 -1
- package/dist/frontend/lowering/lower-url.js +6 -3
- package/dist/frontend/lowering/lower-url.js.map +1 -1
- package/dist/frontend/lowering/lowerer.d.ts +227 -21
- package/dist/frontend/lowering/lowerer.js +651 -92
- package/dist/frontend/lowering/lowerer.js.map +1 -1
- package/dist/frontend/lowering/lowerer.test.js +18 -0
- package/dist/frontend/lowering/lowerer.test.js.map +1 -1
- package/dist/frontend/lowering/lowering-facts.d.ts +110 -0
- package/dist/frontend/lowering/lowering-facts.js +323 -0
- package/dist/frontend/lowering/lowering-facts.js.map +1 -0
- package/dist/frontend/lowering/lowering-facts.test.d.ts +1 -0
- package/dist/frontend/lowering/lowering-facts.test.js +100 -0
- package/dist/frontend/lowering/lowering-facts.test.js.map +1 -0
- package/dist/frontend/lowering/nan-coded-reads.d.ts +27 -4
- package/dist/frontend/lowering/nan-coded-reads.js +112 -9
- package/dist/frontend/lowering/nan-coded-reads.js.map +1 -1
- package/dist/frontend/lowering/optional-arguments.d.ts +4 -0
- package/dist/frontend/lowering/optional-arguments.js +26 -2
- package/dist/frontend/lowering/optional-arguments.js.map +1 -1
- package/dist/frontend/lowering/partial-assertions.d.ts +0 -3
- package/dist/frontend/lowering/partial-assertions.js +9 -15
- package/dist/frontend/lowering/partial-assertions.js.map +1 -1
- package/dist/frontend/lowering/primitive-throws.d.ts +100 -0
- package/dist/frontend/lowering/primitive-throws.js +241 -0
- package/dist/frontend/lowering/primitive-throws.js.map +1 -0
- package/dist/frontend/lowering/primitive-wrappers.js +1 -0
- package/dist/frontend/lowering/primitive-wrappers.js.map +1 -1
- package/dist/frontend/lowering/record-inherited.d.ts +17 -1
- package/dist/frontend/lowering/record-inherited.js +16 -2
- package/dist/frontend/lowering/record-inherited.js.map +1 -1
- package/dist/frontend/lowering/record-links.d.ts +73 -0
- package/dist/frontend/lowering/record-links.js +797 -0
- package/dist/frontend/lowering/record-links.js.map +1 -0
- package/dist/frontend/lowering/runtime-optional-provenance.d.ts +27 -7
- package/dist/frontend/lowering/runtime-optional-provenance.js +25 -11
- package/dist/frontend/lowering/runtime-optional-provenance.js.map +1 -1
- package/dist/frontend/lowering/runtime-optional-report.d.ts +40 -0
- package/dist/frontend/lowering/runtime-optional-report.js +300 -0
- package/dist/frontend/lowering/runtime-optional-report.js.map +1 -0
- package/dist/frontend/lowering/scoped-type-memo.test.d.ts +1 -0
- package/dist/frontend/lowering/scoped-type-memo.test.js +86 -0
- package/dist/frontend/lowering/scoped-type-memo.test.js.map +1 -0
- package/dist/frontend/lowering/static-typeof.d.ts +3 -1
- package/dist/frontend/lowering/static-typeof.js +6 -1
- package/dist/frontend/lowering/static-typeof.js.map +1 -1
- package/dist/frontend/lowering/strict-mode.d.ts +1 -5
- package/dist/frontend/lowering/strict-mode.js +4 -30
- package/dist/frontend/lowering/strict-mode.js.map +1 -1
- package/dist/frontend/lowering/structural-instances.d.ts +7 -0
- package/dist/frontend/lowering/structural-instances.js +23 -0
- package/dist/frontend/lowering/structural-instances.js.map +1 -1
- package/dist/frontend/lowering/surfaces.d.ts +15 -1
- package/dist/frontend/lowering/surfaces.js +78 -10
- package/dist/frontend/lowering/surfaces.js.map +1 -1
- package/dist/frontend/lowering/union-retag.d.ts +13 -1
- package/dist/frontend/lowering/union-retag.js +55 -1
- package/dist/frontend/lowering/union-retag.js.map +1 -1
- package/dist/frontend/lowering/union-retag.test.js +51 -0
- package/dist/frontend/lowering/union-retag.test.js.map +1 -1
- package/dist/frontend/lowering/unit-journal.d.ts +8 -0
- package/dist/frontend/lowering/unit-journal.js +14 -0
- package/dist/frontend/lowering/unit-journal.js.map +1 -1
- package/dist/frontend/lowering/unit-journal.test.js +36 -1
- package/dist/frontend/lowering/unit-journal.test.js.map +1 -1
- package/dist/frontend/lowering/zlib-constants.js +3 -2
- package/dist/frontend/lowering/zlib-constants.js.map +1 -1
- package/dist/frontend/npm-static.js +78 -9
- package/dist/frontend/npm-static.js.map +1 -1
- package/dist/frontend/npm-static.test.js +95 -2
- package/dist/frontend/npm-static.test.js.map +1 -1
- package/dist/frontend/pipeline.d.ts +5 -4
- package/dist/frontend/pipeline.js +94 -31
- package/dist/frontend/pipeline.js.map +1 -1
- package/dist/frontend/pipeline.test.js +68 -11
- package/dist/frontend/pipeline.test.js.map +1 -1
- package/dist/frontend/program.d.ts +62 -2
- package/dist/frontend/program.js +695 -422
- package/dist/frontend/program.js.map +1 -1
- package/dist/frontend/program.test.js +37 -1
- package/dist/frontend/program.test.js.map +1 -1
- package/dist/frontend/services-node.d.ts +7 -0
- package/dist/frontend/services-node.js +32 -1
- package/dist/frontend/services-node.js.map +1 -1
- package/dist/frontend/services-node.test.js +51 -0
- package/dist/frontend/services-node.test.js.map +1 -1
- package/dist/frontend/shape-inference/overlay.js +68 -2
- package/dist/frontend/shape-inference/overlay.js.map +1 -1
- package/dist/frontend/tier-analysis.d.ts +9 -0
- package/dist/frontend/tier-analysis.js +1 -0
- package/dist/frontend/tier-analysis.js.map +1 -1
- package/dist/frontend/tsc-codes.d.ts +57 -3
- package/dist/frontend/tsc-codes.js +935 -150
- package/dist/frontend/tsc-codes.js.map +1 -1
- package/dist/frontend/tsc-codes.test.js +221 -12
- package/dist/frontend/tsc-codes.test.js.map +1 -1
- package/dist/frontend/type-mapper.d.ts +91 -9
- package/dist/frontend/type-mapper.js +622 -181
- package/dist/frontend/type-mapper.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +80 -15
- package/dist/index.js.map +1 -1
- package/dist/index.test.d.ts +1 -0
- package/dist/index.test.js +60 -0
- package/dist/index.test.js.map +1 -0
- package/dist/ir/builtin-effects.js +43 -0
- package/dist/ir/builtin-effects.js.map +1 -1
- package/dist/ir/builtin-signatures.d.ts +1 -1
- package/dist/ir/builtin-signatures.js +242 -16
- package/dist/ir/builtin-signatures.js.map +1 -1
- package/dist/ir/callback-specialization.d.ts +3 -2
- package/dist/ir/callback-specialization.js +35 -25
- package/dist/ir/callback-specialization.js.map +1 -1
- package/dist/ir/capture-values.d.ts +8 -4
- package/dist/ir/capture-values.js +9 -6
- package/dist/ir/capture-values.js.map +1 -1
- package/dist/ir/char-unit-locals.d.ts +6 -2
- package/dist/ir/char-unit-locals.js +11 -2
- package/dist/ir/char-unit-locals.js.map +1 -1
- package/dist/ir/class-key-index.d.ts +18 -0
- package/dist/ir/class-key-index.js +29 -0
- package/dist/ir/class-key-index.js.map +1 -0
- package/dist/ir/class-key-index.test.d.ts +1 -0
- package/dist/ir/class-key-index.test.js +25 -0
- package/dist/ir/class-key-index.test.js.map +1 -0
- package/dist/ir/codec.generated.d.ts +1 -1
- package/dist/ir/codec.generated.js +724 -648
- package/dist/ir/codec.generated.js.map +1 -1
- package/dist/ir/constant-globals.d.ts +5 -2
- package/dist/ir/constant-globals.js +25 -27
- package/dist/ir/constant-globals.js.map +1 -1
- package/dist/ir/expression-inlining.d.ts +4 -2
- package/dist/ir/expression-inlining.js +8 -2
- package/dist/ir/expression-inlining.js.map +1 -1
- package/dist/ir/field-values.d.ts +5 -2
- package/dist/ir/field-values.js +32 -21
- package/dist/ir/field-values.js.map +1 -1
- package/dist/ir/fields.generated.d.ts +11 -2
- package/dist/ir/fields.generated.js +8 -0
- package/dist/ir/fields.generated.js.map +1 -1
- package/dist/ir/final-fields.js +1 -1
- package/dist/ir/final-fields.js.map +1 -1
- package/dist/ir/function-references.d.ts +5 -4
- package/dist/ir/function-references.js +7 -4
- package/dist/ir/function-references.js.map +1 -1
- package/dist/ir/function-references.test.js +7 -0
- package/dist/ir/function-references.test.js.map +1 -1
- package/dist/ir/init-only-globals.d.ts +4 -2
- package/dist/ir/init-only-globals.js +17 -18
- package/dist/ir/init-only-globals.js.map +1 -1
- package/dist/ir/inline-array-views.js +1 -0
- package/dist/ir/inline-array-views.js.map +1 -1
- package/dist/ir/int32-slots.js +7 -0
- package/dist/ir/int32-slots.js.map +1 -1
- package/dist/ir/ir.d.ts +59 -4
- package/dist/ir/ir.js +7 -0
- package/dist/ir/ir.js.map +1 -1
- package/dist/ir/js-groups.d.ts +51 -0
- package/dist/ir/js-groups.js +394 -0
- package/dist/ir/js-groups.js.map +1 -0
- package/dist/ir/js-groups.test.d.ts +1 -0
- package/dist/ir/js-groups.test.js +555 -0
- package/dist/ir/js-groups.test.js.map +1 -0
- package/dist/ir/js-ic.js +30 -5
- package/dist/ir/js-ic.js.map +1 -1
- package/dist/ir/js-ic.test.js +27 -1
- package/dist/ir/js-ic.test.js.map +1 -1
- package/dist/ir/node-index.d.ts +23 -6
- package/dist/ir/node-index.js +126 -49
- package/dist/ir/node-index.js.map +1 -1
- package/dist/ir/numeric-call-specialization.d.ts +4 -2
- package/dist/ir/numeric-call-specialization.js +40 -26
- package/dist/ir/numeric-call-specialization.js.map +1 -1
- package/dist/ir/paired-while-loops.d.ts +4 -2
- package/dist/ir/paired-while-loops.js +8 -2
- package/dist/ir/paired-while-loops.js.map +1 -1
- package/dist/ir/parameter-versions.d.ts +13 -4
- package/dist/ir/parameter-versions.js +63 -42
- package/dist/ir/parameter-versions.js.map +1 -1
- package/dist/ir/property-bags.d.ts +4 -2
- package/dist/ir/property-bags.js +22 -17
- package/dist/ir/property-bags.js.map +1 -1
- package/dist/ir/row-pairs.d.ts +4 -2
- package/dist/ir/row-pairs.js +12 -11
- package/dist/ir/row-pairs.js.map +1 -1
- package/dist/ir/runtime-features.d.ts +87 -12
- package/dist/ir/runtime-features.js +263 -160
- package/dist/ir/runtime-features.js.map +1 -1
- package/dist/ir/runtime-features.test.js +109 -139
- package/dist/ir/runtime-features.test.js.map +1 -1
- package/dist/ir/runtime-jam-loops.d.ts +35 -0
- package/dist/ir/runtime-jam-loops.js +604 -0
- package/dist/ir/runtime-jam-loops.js.map +1 -0
- package/dist/ir/runtime-jam-loops.test.d.ts +1 -0
- package/dist/ir/runtime-jam-loops.test.js +565 -0
- package/dist/ir/runtime-jam-loops.test.js.map +1 -0
- package/dist/ir/saturating-loop-jams.d.ts +4 -2
- package/dist/ir/saturating-loop-jams.js +11 -10
- package/dist/ir/saturating-loop-jams.js.map +1 -1
- package/dist/ir/scalar-records.d.ts +5 -2
- package/dist/ir/scalar-records.js +12 -2
- package/dist/ir/scalar-records.js.map +1 -1
- package/dist/ir/self-captures.d.ts +4 -2
- package/dist/ir/self-captures.js +32 -27
- package/dist/ir/self-captures.js.map +1 -1
- package/dist/ir/serialize.d.ts +6 -1
- package/dist/ir/serialize.js +87 -23
- package/dist/ir/serialize.js.map +1 -1
- package/dist/ir/serialize.test.js +26 -0
- package/dist/ir/serialize.test.js.map +1 -1
- package/dist/ir/tiers.js +1 -0
- package/dist/ir/tiers.js.map +1 -1
- package/dist/ir/traverse.js +4 -0
- package/dist/ir/traverse.js.map +1 -1
- package/dist/ir/typed-argument-clones.d.ts +30 -0
- package/dist/ir/typed-argument-clones.js +789 -0
- package/dist/ir/typed-argument-clones.js.map +1 -0
- package/dist/ir/union-arm-loops.d.ts +3 -0
- package/dist/ir/union-arm-loops.js +373 -0
- package/dist/ir/union-arm-loops.js.map +1 -0
- package/dist/ir/union-arm-loops.test.d.ts +1 -0
- package/dist/ir/union-arm-loops.test.js +230 -0
- package/dist/ir/union-arm-loops.test.js.map +1 -0
- package/dist/ir/validate.js +88 -18
- package/dist/ir/validate.js.map +1 -1
- package/dist/library/compiler-self-identity.d.ts +8 -2
- package/dist/library/compiler-self-identity.js +92 -18
- package/dist/library/compiler-self-identity.js.map +1 -1
- package/dist/library/compiler-self-identity.test.js +150 -3
- package/dist/library/compiler-self-identity.test.js.map +1 -1
- package/dist/library/int-infer.d.ts +5 -0
- package/dist/library/int-infer.js +15 -3
- package/dist/library/int-infer.js.map +1 -1
- package/dist/library/ir-policy.js +1 -0
- package/dist/library/ir-policy.js.map +1 -1
- package/dist/library/library-cache.d.ts +4 -0
- package/dist/library/library-cache.js +2 -0
- package/dist/library/library-cache.js.map +1 -1
- package/dist/library/library-cache.test.js +26 -0
- package/dist/library/library-cache.test.js.map +1 -1
- package/dist/library/prepare.js +99 -31
- package/dist/library/prepare.js.map +1 -1
- package/dist/native/cache.d.ts +7 -0
- package/dist/native/cache.js +47 -0
- package/dist/native/cache.js.map +1 -1
- package/dist/native/cache.test.js +13 -1
- package/dist/native/cache.test.js.map +1 -1
- package/dist/native/cli.js +1 -1
- package/dist/native/cli.js.map +1 -1
- package/dist/native/compiler.js +18 -3
- package/dist/native/compiler.js.map +1 -1
- package/dist/native/executable-cache-open.test.js +31 -5
- package/dist/native/executable-cache-open.test.js.map +1 -1
- package/dist/native/executable-cache.d.ts +6 -1
- package/dist/native/executable-cache.js +7 -1
- package/dist/native/executable-cache.js.map +1 -1
- package/dist/native/prepare.d.ts +3 -0
- package/dist/native/prepare.js +43 -26
- package/dist/native/prepare.js.map +1 -1
- package/dist/native/prepare.test.js +25 -3
- package/dist/native/prepare.test.js.map +1 -1
- package/dist/native/sanitizer.js +10 -1
- package/dist/native/sanitizer.js.map +1 -1
- package/dist/native/sanitizer.test.js +7 -2
- package/dist/native/sanitizer.test.js.map +1 -1
- package/dist/node-islands/boundary.d.ts +12 -0
- package/dist/node-islands/boundary.js +38 -6
- package/dist/node-islands/boundary.js.map +1 -1
- package/dist/node-islands/boundary.test.d.ts +1 -0
- package/dist/node-islands/boundary.test.js +76 -0
- package/dist/node-islands/boundary.test.js.map +1 -0
- package/dist/node-islands/detect.d.ts +9 -0
- package/dist/node-islands/detect.js +110 -0
- package/dist/node-islands/detect.js.map +1 -1
- package/dist/node-islands/detect.test.js +24 -0
- package/dist/node-islands/detect.test.js.map +1 -1
- package/dist/node-islands/graph-islands.d.ts +40 -0
- package/dist/node-islands/graph-islands.js +128 -0
- package/dist/node-islands/graph-islands.js.map +1 -0
- package/dist/node-islands/growth.d.ts +57 -0
- package/dist/node-islands/growth.js +205 -0
- package/dist/node-islands/growth.js.map +1 -0
- package/dist/node-islands/report.d.ts +12 -0
- package/dist/node-islands/report.js +28 -0
- package/dist/node-islands/report.js.map +1 -1
- package/dist/node-islands/report.test.js +2 -0
- package/dist/node-islands/report.test.js.map +1 -1
- package/dist/node-islands/rules.js +5 -0
- package/dist/node-islands/rules.js.map +1 -1
- package/dist/node-islands/scan.d.ts +11 -2
- package/dist/node-islands/scan.js +61 -9
- package/dist/node-islands/scan.js.map +1 -1
- package/dist/wasm/translate.js +11 -5
- package/dist/wasm/translate.js.map +1 -1
- package/dist/wasm/translate.test.js +35 -0
- package/dist/wasm/translate.test.js.map +1 -1
- package/package.json +20 -20
- package/surface-manifest.json +184 -117
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { BIGINT_BYTES_NAMES, } from "./ir.js";
|
|
1
2
|
import { isDirentShape, recordHandleCodecClass, recordTextCodecClass, RUNTIME_EMITTER_CLASS, RUNTIME_EVENT_CLASS, RUNTIME_EVENT_TARGET_CLASS, RUNTIME_STREAM_CLASSES, } from "./ir.js";
|
|
2
3
|
import { everyModuleNode, everyStmtList } from "./traverse.js";
|
|
3
4
|
import { eachNodeOfKinds } from "./node-index.js";
|
|
@@ -16,12 +17,16 @@ const DYN_BUFFER_NUM_METHODS = new Set(["read", "write"].flatMap((rw) => [
|
|
|
16
17
|
"DoubleBE",
|
|
17
18
|
].map((n) => `${rw}${n}`),
|
|
18
19
|
]));
|
|
19
|
-
/**
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
20
|
+
/** The variable-width and BigInt reads and writes, which
|
|
21
|
+
* scr_dyn_invoke_buffer_wide runs. */
|
|
22
|
+
const DYN_BUFFER_WIDE_METHODS = ["read", "write"].flatMap((rw) => [
|
|
23
|
+
...["UIntLE", "UIntBE", "UintLE", "UintBE", "IntLE", "IntBE"].map((n) => `${rw}${n}`),
|
|
24
|
+
...["BigUInt64", "BigUint64", "BigInt64"].flatMap((n) => [`${rw}${n}LE`, `${rw}${n}BE`]),
|
|
25
|
+
]);
|
|
26
|
+
/** The Buffer.prototype members scr_dyn_invoke_buffer refuses on Buffer
|
|
27
|
+
* receivers besides running the named ones: the per-encoding slices and
|
|
28
|
+
* writes, and inspect. */
|
|
29
|
+
const DYN_BUFFER_FAMILY_METHODS = [
|
|
25
30
|
...["ascii", "base64", "base64url", "latin1", "hex", "ucs2", "utf8"].flatMap((enc) => [
|
|
26
31
|
`${enc}Slice`,
|
|
27
32
|
`${enc}Write`,
|
|
@@ -30,11 +35,13 @@ const DYN_BUFFER_REFUSED_METHODS = [
|
|
|
30
35
|
];
|
|
31
36
|
/** The scr_bytes_dyn.c entry, one per method family, that a checked-dynamic
|
|
32
37
|
* call of a Buffer.prototype method name routes to: the fixed-width reads and
|
|
33
|
-
* writes (both "UInt" and "Uint" spellings),
|
|
34
|
-
* searches, and the other Buffer-only
|
|
35
|
-
* Buffer receiver and gives any other
|
|
38
|
+
* writes (both "UInt" and "Uint" spellings), the variable-width and BigInt
|
|
39
|
+
* ones, write, fill, toString, the searches, and the other Buffer-only
|
|
40
|
+
* members. Each runs the method on a Buffer receiver and gives any other
|
|
41
|
+
* receiver the ordinary dispatch. */
|
|
36
42
|
export const DYN_BUFFER_METHODS = new Map([
|
|
37
43
|
...[...DYN_BUFFER_NUM_METHODS].map((m) => [m, "scr_dyn_invoke_buffer_num"]),
|
|
44
|
+
...DYN_BUFFER_WIDE_METHODS.map((m) => [m, "scr_dyn_invoke_buffer_wide"]),
|
|
38
45
|
["write", "scr_dyn_invoke_buffer_write"],
|
|
39
46
|
["fill", "scr_dyn_invoke_buffer_fill"],
|
|
40
47
|
["toString", "scr_dyn_invoke_buffer_to_string"],
|
|
@@ -50,12 +57,14 @@ export const DYN_BUFFER_METHODS = new Map([
|
|
|
50
57
|
"swap16",
|
|
51
58
|
"swap32",
|
|
52
59
|
"swap64",
|
|
53
|
-
...
|
|
60
|
+
...DYN_BUFFER_FAMILY_METHODS,
|
|
54
61
|
].map((m) => [m, "scr_dyn_invoke_buffer"]),
|
|
55
62
|
]);
|
|
56
63
|
const DYN_ASYNC_LIB_FNS = new Set([
|
|
57
64
|
// DEP0040 rides the dyn-async unit's warning machinery.
|
|
58
65
|
"async.awaitDyn",
|
|
66
|
+
// So does SlowBuffer's DEP0030.
|
|
67
|
+
"buffer.slowBuffer",
|
|
59
68
|
// The child property table adopts thenables through the dyn-async unit.
|
|
60
69
|
"child.propsInstall",
|
|
61
70
|
"child.propsResolve",
|
|
@@ -70,6 +79,9 @@ const DYN_ASYNC_LIB_FNS = new Set([
|
|
|
70
79
|
"dyn.promiseAllSettled",
|
|
71
80
|
"dyn.promiseAny",
|
|
72
81
|
"dyn.promiseResolve",
|
|
82
|
+
// The generic Promise statics build and settle their capability's promise
|
|
83
|
+
// with dyn values (scr_dyn_new_promise, scr_dyn_promise_resolve).
|
|
84
|
+
"promise.genericStatic",
|
|
73
85
|
"fs.callbackCall",
|
|
74
86
|
"fs.callbackGlob",
|
|
75
87
|
"fs.callbackValue",
|
|
@@ -96,6 +108,8 @@ const DYN_ASYNC_LIB_FNS = new Set([
|
|
|
96
108
|
"util.debounce",
|
|
97
109
|
"util.throttle",
|
|
98
110
|
"timers.immediatePromise",
|
|
111
|
+
// A timer callback bound to its handle as `this`.
|
|
112
|
+
"timers.thisCallback",
|
|
99
113
|
// The performance timeline (scr_perf.c, linked with this unit for its
|
|
100
114
|
// MaxPerformanceEntryBufferExceededWarning).
|
|
101
115
|
"perf.clearMarks",
|
|
@@ -204,6 +218,10 @@ const ABORT_SIGNAL_LIB_FNS = new Set([
|
|
|
204
218
|
"http.requestDynCb",
|
|
205
219
|
"https.requestDyn",
|
|
206
220
|
"https.requestDynCb",
|
|
221
|
+
"http.requestUrlDyn",
|
|
222
|
+
"http.requestUrlDynCb",
|
|
223
|
+
"https.requestUrlDyn",
|
|
224
|
+
"https.requestUrlDynCb",
|
|
207
225
|
"rl.createSignal",
|
|
208
226
|
"rl.questionAsyncSignal",
|
|
209
227
|
"sp.finishedOptsSignal",
|
|
@@ -334,6 +352,47 @@ const INHERITED_MEMBER_NAMES = new Set([
|
|
|
334
352
|
"toString",
|
|
335
353
|
"valueOf",
|
|
336
354
|
]);
|
|
355
|
+
/** Array.prototype's method names. A constant-key dynamic read of one on an array answers the method the array's implicit prototype installs, so the read links the dyn-invoke unit. Mirrors the method table in scr_dyn_invoke.c (runtime-registries.test.ts checks the two agree). */
|
|
356
|
+
export const ARRAY_PROTOTYPE_MEMBER_NAMES = new Set([
|
|
357
|
+
"at",
|
|
358
|
+
"concat",
|
|
359
|
+
"copyWithin",
|
|
360
|
+
"fill",
|
|
361
|
+
"find",
|
|
362
|
+
"findIndex",
|
|
363
|
+
"findLast",
|
|
364
|
+
"findLastIndex",
|
|
365
|
+
"lastIndexOf",
|
|
366
|
+
"pop",
|
|
367
|
+
"push",
|
|
368
|
+
"reverse",
|
|
369
|
+
"shift",
|
|
370
|
+
"unshift",
|
|
371
|
+
"slice",
|
|
372
|
+
"sort",
|
|
373
|
+
"splice",
|
|
374
|
+
"includes",
|
|
375
|
+
"indexOf",
|
|
376
|
+
"join",
|
|
377
|
+
"keys",
|
|
378
|
+
"entries",
|
|
379
|
+
"values",
|
|
380
|
+
"forEach",
|
|
381
|
+
"filter",
|
|
382
|
+
"flat",
|
|
383
|
+
"flatMap",
|
|
384
|
+
"map",
|
|
385
|
+
"every",
|
|
386
|
+
"some",
|
|
387
|
+
"reduce",
|
|
388
|
+
"reduceRight",
|
|
389
|
+
"toReversed",
|
|
390
|
+
"toSorted",
|
|
391
|
+
"toSpliced",
|
|
392
|
+
"with",
|
|
393
|
+
"toLocaleString",
|
|
394
|
+
"toString",
|
|
395
|
+
]);
|
|
337
396
|
/** Entry points that link the child-process unit (with CHILD_PROCESS_LIB_PREFIXES): the fork IPC channel on the process object. */
|
|
338
397
|
const CHILD_PROCESS_LIB_FNS = new Set([
|
|
339
398
|
"process.connected",
|
|
@@ -374,6 +433,7 @@ const SYMBOL_LIB_FNS = new Set([
|
|
|
374
433
|
"buffer.constructor",
|
|
375
434
|
"buffer.staticValue",
|
|
376
435
|
"buffer.prototypeMember",
|
|
436
|
+
"buffer.prototypeObject",
|
|
377
437
|
]);
|
|
378
438
|
/** Entry points that link the querystring unit. */
|
|
379
439
|
const QS_LIB_FNS = new Set([
|
|
@@ -585,6 +645,12 @@ const PROCESS_EVENT_LIB_FNS = new Set([
|
|
|
585
645
|
"stdin.onData",
|
|
586
646
|
"stdin.onEnd",
|
|
587
647
|
"stdin.onError",
|
|
648
|
+
"stdin.onReadable",
|
|
649
|
+
"stdin.pause",
|
|
650
|
+
"stdin.resume",
|
|
651
|
+
"stdin.isPaused",
|
|
652
|
+
"stdin.readableLength",
|
|
653
|
+
"stdin.read",
|
|
588
654
|
// node:readline rides the stdin unit (scr_readline.c links beside
|
|
589
655
|
// scr_events.c under the same gate).
|
|
590
656
|
"rl.checkCompleter",
|
|
@@ -713,6 +779,54 @@ function webCryptoAsymmetricScan() {
|
|
|
713
779
|
result: () => webcrypto && named,
|
|
714
780
|
};
|
|
715
781
|
}
|
|
782
|
+
/** The Buffer.prototype method names a checked-dynamic read can answer from
|
|
783
|
+
* scr_bytes_dyn.c: the ones calls route there, and the members Buffer
|
|
784
|
+
* defines over %TypedArray%.prototype's. */
|
|
785
|
+
const BUFFER_PROTOTYPE_METHOD_NAMES = new Set([
|
|
786
|
+
...DYN_BUFFER_METHODS.keys(),
|
|
787
|
+
"subarray",
|
|
788
|
+
"slice",
|
|
789
|
+
"toLocaleString",
|
|
790
|
+
]);
|
|
791
|
+
const u8BytesLeaf = (t) => t.kind === "bytes" && t.elem === "u8";
|
|
792
|
+
/** Whether converting a value of type `t` to dyn can box a Buffer: a
|
|
793
|
+
* Uint8Array or Buffer, or a function, collection, record, union, promise
|
|
794
|
+
* or class instance that carries one. */
|
|
795
|
+
function mentionsU8Bytes(t, tables) {
|
|
796
|
+
tables.u8BytesCarriers ??= leafCarriers(tables, u8BytesLeaf);
|
|
797
|
+
return carriesLeaf(t, tables.u8BytesCarriers, u8BytesLeaf, tables);
|
|
798
|
+
}
|
|
799
|
+
/** A checked-dynamic read with a key computed at run time, or one naming a
|
|
800
|
+
* Buffer.prototype method, in a module that makes Buffer values and boxes a
|
|
801
|
+
* value that can hold one: `buf[name]` and `buf.indexOf` read as values
|
|
802
|
+
* name Buffer.prototype methods, which scr_bytes_dyn.c answers. A Buffer
|
|
803
|
+
* value also comes from a typed file read, which answers a branded Buffer
|
|
804
|
+
* with no `buffer.*` call, so those reads count as making one. */
|
|
805
|
+
function computedBufferMemberScan(mod) {
|
|
806
|
+
let tables;
|
|
807
|
+
const typeTables = () => (tables ??= {
|
|
808
|
+
records: new Map((mod.records ?? []).map((r) => [r.id, r])),
|
|
809
|
+
unions: new Map((mod.unions ?? []).map((u) => [u.id, u])),
|
|
810
|
+
classes: new Map((mod.classes ?? []).map((c) => [c.name, c])),
|
|
811
|
+
});
|
|
812
|
+
let computed = false;
|
|
813
|
+
let buffer = false;
|
|
814
|
+
let boxed = false;
|
|
815
|
+
return {
|
|
816
|
+
expr: (node) => {
|
|
817
|
+
if (node.kind === "dynKeyGet" &&
|
|
818
|
+
(node.key.kind !== "strLit" || BUFFER_PROTOTYPE_METHOD_NAMES.has(node.key.value)))
|
|
819
|
+
computed = true;
|
|
820
|
+
else if (node.kind === "libCall" && node.fn.startsWith("buffer."))
|
|
821
|
+
buffer = true;
|
|
822
|
+
else if (node.kind === "libCall" && FS_READ_BYTES_FNS.has(node.fn))
|
|
823
|
+
buffer = true;
|
|
824
|
+
else if (!boxed && node.kind === "dynFrom" && mentionsU8Bytes(node.value.type, typeTables()))
|
|
825
|
+
boxed = true;
|
|
826
|
+
},
|
|
827
|
+
result: () => computed && buffer && boxed,
|
|
828
|
+
};
|
|
829
|
+
}
|
|
716
830
|
/** Whether the module calls WebCrypto and a string literal in it names one
|
|
717
831
|
* of the asymmetric algorithms (matched without regard to case, as
|
|
718
832
|
* normalizeAlgorithm matches names): scr_webcrypto_pki.c and the pki unit
|
|
@@ -733,9 +847,8 @@ export function moduleUsesWebCryptoAsymmetric(mod) {
|
|
|
733
847
|
});
|
|
734
848
|
return webcrypto && named;
|
|
735
849
|
}
|
|
736
|
-
/** The typed file reads that answer a ScrBytes: Node answers a Buffer,
|
|
737
|
-
* scr_lib.c
|
|
738
|
-
* that can observe the difference links that build. */
|
|
850
|
+
/** The typed file reads that answer a ScrBytes: Node answers a Buffer, and
|
|
851
|
+
* scr_lib.c's read entries brand it, so a typed read makes a Buffer value. */
|
|
739
852
|
const FS_READ_BYTES_FNS = new Set([
|
|
740
853
|
"fs.readFileSyncBuf",
|
|
741
854
|
"fs.readFileSyncBytes",
|
|
@@ -743,136 +856,28 @@ const FS_READ_BYTES_FNS = new Set([
|
|
|
743
856
|
"fsp.readFileBytes",
|
|
744
857
|
"fileHandle.readFileBytes",
|
|
745
858
|
]);
|
|
746
|
-
/** The
|
|
747
|
-
*
|
|
748
|
-
*
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
859
|
+
/** The entries that need the JavaScript object model build (t262-da §J):
|
|
860
|
+
* the runtime code a JavaScript source reaches for builtin intrinsics,
|
|
861
|
+
* array attributes, BigInt views, handle property tables and buffer views
|
|
862
|
+
* that no typed program can observe. Empty until the first slice lands
|
|
863
|
+
* (A1 adds dyn.intrinsic); the slices share one SCR_JS_OBJECT_MODEL build
|
|
864
|
+
* of every unit they touch instead of one build column per feature. */
|
|
865
|
+
export const JS_OBJECT_MODEL_LIB_FNS = new Set([
|
|
866
|
+
// Resizable ArrayBuffers and growable SharedArrayBuffers (t262-dc C2), and
|
|
867
|
+
// the arming call that turns on the buffer views registry.
|
|
868
|
+
"arrayBuffer.newResizable",
|
|
869
|
+
"sharedArrayBuffer.newGrowable",
|
|
870
|
+
"arrayBuffer.armMutable",
|
|
753
871
|
]);
|
|
754
|
-
/**
|
|
755
|
-
*
|
|
756
|
-
*
|
|
757
|
-
*
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
case "set":
|
|
764
|
-
return reachesBytesDirect(t.elem, deps);
|
|
765
|
-
case "map":
|
|
766
|
-
return reachesBytesDirect(t.key, deps) || reachesBytesDirect(t.value, deps);
|
|
767
|
-
case "promise":
|
|
768
|
-
return reachesBytesDirect(t.inner, deps);
|
|
769
|
-
case "func":
|
|
770
|
-
return reachesBytesDirect(t.ret, deps) || t.params.some((p) => reachesBytesDirect(p, deps));
|
|
771
|
-
case "record":
|
|
772
|
-
deps.push(`r:${t.shapeId}`);
|
|
773
|
-
return false;
|
|
774
|
-
case "union":
|
|
775
|
-
deps.push(`u:${t.unionId}`);
|
|
776
|
-
return false;
|
|
777
|
-
default:
|
|
778
|
-
return false;
|
|
779
|
-
}
|
|
780
|
-
}
|
|
781
|
-
/** The module's declarations that can hold bytes, resolved to a fixpoint: a
|
|
782
|
-
* record or union that references another declaration holding bytes holds
|
|
783
|
-
* bytes, and a recursive declaration resolves like a non-recursive one. The
|
|
784
|
-
* closure answers each reference from one pass over the declarations instead
|
|
785
|
-
* of walking the shape tree at every reference. */
|
|
786
|
-
function bytesCarryingDecls(mod) {
|
|
787
|
-
const referrers = new Map();
|
|
788
|
-
const carrying = new Set();
|
|
789
|
-
const queue = [];
|
|
790
|
-
const direct = (id, t) => {
|
|
791
|
-
const deps = [];
|
|
792
|
-
if (reachesBytesDirect(t, deps)) {
|
|
793
|
-
if (!carrying.has(id)) {
|
|
794
|
-
carrying.add(id);
|
|
795
|
-
queue.push(id);
|
|
796
|
-
}
|
|
797
|
-
}
|
|
798
|
-
for (const dep of deps) {
|
|
799
|
-
const list = referrers.get(dep);
|
|
800
|
-
if (list === undefined)
|
|
801
|
-
referrers.set(dep, [id]);
|
|
802
|
-
else
|
|
803
|
-
list.push(id);
|
|
804
|
-
}
|
|
805
|
-
};
|
|
806
|
-
for (const record of mod.records ?? []) {
|
|
807
|
-
for (const field of record.fields)
|
|
808
|
-
direct(`r:${record.id}`, field.type);
|
|
809
|
-
if (record.indexValue !== undefined)
|
|
810
|
-
direct(`r:${record.id}`, record.indexValue);
|
|
811
|
-
}
|
|
812
|
-
for (const union of mod.unions ?? []) {
|
|
813
|
-
for (const arm of union.arms)
|
|
814
|
-
direct(`u:${union.id}`, arm);
|
|
815
|
-
}
|
|
816
|
-
for (let i = 0; i < queue.length; i++) {
|
|
817
|
-
for (const from of referrers.get(queue[i]) ?? []) {
|
|
818
|
-
if (carrying.has(from))
|
|
819
|
-
continue;
|
|
820
|
-
carrying.add(from);
|
|
821
|
-
queue.push(from);
|
|
822
|
-
}
|
|
823
|
-
}
|
|
824
|
-
const deps = [];
|
|
825
|
-
const holdsBytes = (t) => {
|
|
826
|
-
deps.length = 0;
|
|
827
|
-
if (reachesBytesDirect(t, deps))
|
|
828
|
-
return true;
|
|
829
|
-
for (const dep of deps)
|
|
830
|
-
if (carrying.has(dep))
|
|
831
|
-
return true;
|
|
832
|
-
return false;
|
|
833
|
-
};
|
|
834
|
-
return holdsBytes;
|
|
835
|
-
}
|
|
836
|
-
/** fsBufferBrand's condition as a scan over the module: it reads file bytes
|
|
837
|
-
* through a typed read and can observe their Buffer-ness. scr_lib.c's read
|
|
838
|
-
* entries set is_buffer only under SCR_FS_BUFFER_BRAND, so this conjunction
|
|
839
|
-
* selects that variant; a program that reads bytes without observing them
|
|
840
|
-
* keeps the default object. */
|
|
841
|
-
function fsBufferBrandScan(mod) {
|
|
842
|
-
let reads = false;
|
|
843
|
-
let observes = false;
|
|
844
|
-
let holdsBytes;
|
|
845
|
-
return {
|
|
846
|
-
expr: (node) => {
|
|
847
|
-
if (reads && observes)
|
|
848
|
-
return;
|
|
849
|
-
if (node.kind === "libCall" && FS_READ_BYTES_FNS.has(node.fn)) {
|
|
850
|
-
reads = true;
|
|
851
|
-
return;
|
|
852
|
-
}
|
|
853
|
-
if (observes)
|
|
854
|
-
return;
|
|
855
|
-
switch (node.kind) {
|
|
856
|
-
case "dynFrom":
|
|
857
|
-
observes = (holdsBytes ??= bytesCarryingDecls(mod))(node.value.type);
|
|
858
|
-
return;
|
|
859
|
-
case "dynCheck":
|
|
860
|
-
if (node.type.kind === "func") {
|
|
861
|
-
observes = (holdsBytes ??= bytesCarryingDecls(mod))(node.type);
|
|
862
|
-
}
|
|
863
|
-
return;
|
|
864
|
-
case "bytesIntrinsic":
|
|
865
|
-
observes = FS_BUFFER_SEARCH_METHODS.has(node.method);
|
|
866
|
-
return;
|
|
867
|
-
case "libCall":
|
|
868
|
-
observes = node.fn === "buffer.isBranded" || node.fn === "insp.bytes";
|
|
869
|
-
return;
|
|
870
|
-
default:
|
|
871
|
-
return;
|
|
872
|
-
}
|
|
873
|
-
},
|
|
874
|
-
result: () => reads && observes,
|
|
875
|
-
};
|
|
872
|
+
/** The JavaScript object model build's program facts (t262-da §J): every
|
|
873
|
+
* runtime feature that shares the one SCR_JS_OBJECT_MODEL build ORs in here
|
|
874
|
+
* (BigInt views today, array attributes and handle property tables next), so
|
|
875
|
+
* pack selection and the source build (RUNTIME_DEFINES, the library's
|
|
876
|
+
* cflags) agree on when the build is on. */
|
|
877
|
+
export function jsObjectModelFact(features) {
|
|
878
|
+
return (features.jsObjectModel === true ||
|
|
879
|
+
features.bigintBytes === true ||
|
|
880
|
+
features.mutableBuffers === true);
|
|
876
881
|
}
|
|
877
882
|
/** One rule per runtime feature, sorted by name. A new feature is an
|
|
878
883
|
* entry here and its line in noRuntimeFeatures; RuntimeFeatures, the scan
|
|
@@ -916,6 +921,13 @@ const RUNTIME_FEATURE_RULES = {
|
|
|
916
921
|
"child.signalCode",
|
|
917
922
|
],
|
|
918
923
|
}),
|
|
924
|
+
/** spawnSync's and the exec/execFile callback form's `cwd`/`input`/
|
|
925
|
+
* `shell` entries (SCR_CHILD_CP_OPTIONS): a build of scr_child.c of its
|
|
926
|
+
* own, so a program that never passes those options keeps the default
|
|
927
|
+
* object, byte for byte. */
|
|
928
|
+
childOptionExt: rule({
|
|
929
|
+
fns: ["cp.spawnSyncExt", "cp.spawnSyncExtEnv", "cp.execFileCwd"],
|
|
930
|
+
}),
|
|
919
931
|
/** scr_cipher.c over the mbedTLS archive; DEP0182 reports through the
|
|
920
932
|
* process-warning unit, and unknown output encodings render through the
|
|
921
933
|
* inspect unit. WebCrypto's encrypt, decrypt, wrapKey and unwrapKey
|
|
@@ -982,6 +994,10 @@ const RUNTIME_FEATURE_RULES = {
|
|
|
982
994
|
(node.name === "promise.allSettled" || node.name === "promise.any")) ||
|
|
983
995
|
(node.kind === "dynFrom" && boxesPromise(node.value.type, tables(), new Set())),
|
|
984
996
|
}),
|
|
997
|
+
/** The Promise statics through Function.prototype.call with a foreign
|
|
998
|
+
* constructor (scr_js_promise_generic.c): NewPromiseCapability(C), the
|
|
999
|
+
* C.resolve lookup and the iterator protocol. */
|
|
1000
|
+
promiseGeneric: rule({ fns: ["promise.genericStatic"] }),
|
|
985
1001
|
/** EventEmitter and the stream classes as untyped constructor values
|
|
986
1002
|
* (scr_dyn_builtin_class.c), which call listeners through the dyn-invoke
|
|
987
1003
|
* unit, render unhandled 'error' payloads through the inspect unit and
|
|
@@ -996,6 +1012,11 @@ const RUNTIME_FEATURE_RULES = {
|
|
|
996
1012
|
/** A standard library prototype object read as a value in a JavaScript
|
|
997
1013
|
* source (scr_dyn_stdlib_prototype.c): `Date.prototype`. */
|
|
998
1014
|
stdlibPrototypeValue: rule({ fns: ["dyn.stdlibPrototype"] }),
|
|
1015
|
+
/** The dynamic global object's answer for the Node globals the native
|
|
1016
|
+
* runtime does not implement (scr_global_host_absent.c, plus the
|
|
1017
|
+
* SCR_GLOBAL_HOST_ABSENT build of scr_node_builtin.c): a computed read of
|
|
1018
|
+
* the global object, or `… in globalThis` (host-globals.ts). */
|
|
1019
|
+
hostAbsentGlobals: rule({ fns: ["global.hostAbsent", "dyn.globalHas"] }),
|
|
999
1020
|
/** Array.prototype's generic algorithms over array-like receivers
|
|
1000
1021
|
* (scr_dyn_array_like.c), which delegates every other name to the
|
|
1001
1022
|
* dyn-invoke unit's array dispatch. */
|
|
@@ -1005,12 +1026,14 @@ const RUNTIME_FEATURE_RULES = {
|
|
|
1005
1026
|
builtinPrototypeValue: rule({ fns: ["dyn.builtinPrototype"] }),
|
|
1006
1027
|
dynInvoke: rule({
|
|
1007
1028
|
initial: (mod) => mod.workers === true,
|
|
1029
|
+
scan: computedBufferMemberScan,
|
|
1008
1030
|
fns: [
|
|
1009
1031
|
...DYN_INVOKE_LIB_FNS,
|
|
1010
1032
|
...UTIL_CALLABLE_LIB_FNS,
|
|
1011
1033
|
...BUILTIN_CLASS_LIB_FNS,
|
|
1012
1034
|
"util.promisifyDyn",
|
|
1013
1035
|
"buffer.prototypeMember",
|
|
1036
|
+
"buffer.prototypeObject",
|
|
1014
1037
|
// scr_webstreams.c calls the iterators ReadableStream.from reads.
|
|
1015
1038
|
"webstream.class",
|
|
1016
1039
|
"webstream.instanceOf",
|
|
@@ -1020,13 +1043,21 @@ const RUNTIME_FEATURE_RULES = {
|
|
|
1020
1043
|
"wrapper.objectTag",
|
|
1021
1044
|
"wrapper.new",
|
|
1022
1045
|
"wrapper.toObject",
|
|
1046
|
+
// The Boolean prototype's methods run scr_js_wrapper_apply in the
|
|
1047
|
+
// same unit, which calls scr_dyn_invoke.
|
|
1048
|
+
"wrapper.booleanPrototype",
|
|
1049
|
+
// The generic Promise statics call C's resolve and the iterable's
|
|
1050
|
+
// next/return through scr_dyn_invoke.
|
|
1051
|
+
"promise.genericStatic",
|
|
1023
1052
|
],
|
|
1024
|
-
// Constant-key reads of Object.prototype member names
|
|
1025
|
-
// inherited member
|
|
1053
|
+
// Constant-key reads of Object.prototype member names, and of
|
|
1054
|
+
// Array.prototype method names on arrays, answer the inherited member
|
|
1055
|
+
// through scr_dyn_invoke.c.
|
|
1026
1056
|
expr: (node, _tables) => node.kind === "dynInvoke" ||
|
|
1027
1057
|
(node.kind === "dynKeyGet" &&
|
|
1028
1058
|
node.key.kind === "strLit" &&
|
|
1029
|
-
INHERITED_MEMBER_NAMES.has(node.key.value)
|
|
1059
|
+
(INHERITED_MEMBER_NAMES.has(node.key.value) ||
|
|
1060
|
+
ARRAY_PROTOTYPE_MEMBER_NAMES.has(node.key.value))),
|
|
1030
1061
|
}),
|
|
1031
1062
|
/** The program has dynamic-tier jsval operations (js.* builtins, the
|
|
1032
1063
|
* jsval pass): links the scr_js_* units (two-tier design I3). */
|
|
@@ -1050,13 +1081,36 @@ const RUNTIME_FEATURE_RULES = {
|
|
|
1050
1081
|
typeOrigins: rule({ initial: (mod) => (mod.declOrigins?.length ?? 0) > 0 }),
|
|
1051
1082
|
/** for await over checked-dynamic values (scr_dyn_for_await.c). */
|
|
1052
1083
|
dynForAwait: rule({ fns: ["dyn.asyncIteratorOpen", "dyn.asyncIteratorWasSync"] }),
|
|
1084
|
+
/** Object.isExtensible and Object.isSealed of a value typed dynamically
|
|
1085
|
+
* (scr_dyn_integrity.c, a unit of its own so scr_json.c keeps its layout). */
|
|
1086
|
+
dynIntegrityQueries: rule({ fns: ["dyn.isExtensibleQuery", "dyn.isSealedQuery"] }),
|
|
1087
|
+
/** A generator that binds its parameters at the call (scr_gen_bind.c):
|
|
1088
|
+
* the spawn wrapper's eager step imports the bind helper, and every other
|
|
1089
|
+
* program links the default runtime objects. */
|
|
1090
|
+
genBind: rule({
|
|
1091
|
+
initial: (mod) => mod.functions.some((fn) => fn.generator?.bindAtCall === true),
|
|
1092
|
+
}),
|
|
1053
1093
|
/** Buffer.prototype methods called on checked-dynamic values
|
|
1054
1094
|
* (scr_bytes_dyn.c). */
|
|
1055
1095
|
dynBuffer: rule({
|
|
1056
|
-
// Buffer.prototype members read as values
|
|
1057
|
-
|
|
1096
|
+
// Buffer.prototype members read as values, and Buffer members read with
|
|
1097
|
+
// a computed key, dispatch to the same entries.
|
|
1098
|
+
fns: ["buffer.prototypeMember", "buffer.prototypeObject"],
|
|
1099
|
+
scan: computedBufferMemberScan,
|
|
1058
1100
|
expr: (node, _tables) => node.kind === "dynInvoke" && DYN_BUFFER_METHODS.has(node.method),
|
|
1059
1101
|
}),
|
|
1102
|
+
/** Checked-dynamic reads that answer Buffer.prototype methods by name
|
|
1103
|
+
* (`buf[name]`, `buf.indexOf` as a value, Buffer.prototype): the program
|
|
1104
|
+
* installs scr_bytes_dyn.c's member hook, which references every
|
|
1105
|
+
* scr_dyn_invoke_buffer entry. */
|
|
1106
|
+
dynBufferMembers: rule({
|
|
1107
|
+
fns: ["buffer.prototypeMember", "buffer.prototypeObject"],
|
|
1108
|
+
scan: computedBufferMemberScan,
|
|
1109
|
+
}),
|
|
1110
|
+
/** Buffer.prototype as a value: the program installs the symbol unit's
|
|
1111
|
+
* Symbol.for for scr_bytes_dyn.c, which registers
|
|
1112
|
+
* Symbol(nodejs.util.inspect.custom) as one of its keys. */
|
|
1113
|
+
bufferPrototypeObject: rule({ fns: ["buffer.prototypeObject"] }),
|
|
1060
1114
|
/** createRequire's require and require.resolve with specifiers computed
|
|
1061
1115
|
* at run time (scr_require.c). */
|
|
1062
1116
|
computedRequire: rule({ fns: ["module.requireComputed", "module.resolveComputed"] }),
|
|
@@ -1070,12 +1124,14 @@ const RUNTIME_FEATURE_RULES = {
|
|
|
1070
1124
|
"buffer.installValue",
|
|
1071
1125
|
"buffer.staticValue",
|
|
1072
1126
|
"buffer.prototypeMember",
|
|
1127
|
+
"buffer.prototypeObject",
|
|
1073
1128
|
"dyn.validateString",
|
|
1074
1129
|
"dyn.validateStrings",
|
|
1075
1130
|
"path.resolveValue",
|
|
1076
1131
|
"path.parseValue",
|
|
1077
1132
|
"path.formatValue",
|
|
1078
1133
|
"path.toNamespacedValue",
|
|
1134
|
+
"dyn.installBuiltinStatics",
|
|
1079
1135
|
],
|
|
1080
1136
|
}),
|
|
1081
1137
|
/** The stream unit emits through the emitter unit, also when the
|
|
@@ -1120,10 +1176,6 @@ const RUNTIME_FEATURE_RULES = {
|
|
|
1120
1176
|
eventsOnceSignal: rule({ fns: ["events.onceSignal"] }),
|
|
1121
1177
|
fetch: rule({ prefixes: ["fetch."] }),
|
|
1122
1178
|
fileHandle: rule({ types: ["fileHandle"] }),
|
|
1123
|
-
/** A typed fs read whose bytes value the program can observe as a Buffer:
|
|
1124
|
-
* scr_lib.c's SCR_FS_BUFFER_BRAND build, so programs that never see the
|
|
1125
|
-
* brand keep the default object. */
|
|
1126
|
-
fsBufferBrand: rule({ scan: fsBufferBrandScan }),
|
|
1127
1179
|
fsWatch: rule({ prefixes: ["fs.watch", "watcher."], types: ["fsWatcher"] }),
|
|
1128
1180
|
/** fs.watchFile / fs.unwatchFile (scr_watch_file.c): the stat-polling
|
|
1129
1181
|
* half of the watching surface, gated on its own unit. */
|
|
@@ -1154,6 +1206,9 @@ const RUNTIME_FEATURE_RULES = {
|
|
|
1154
1206
|
inspect: rule({
|
|
1155
1207
|
fns: [
|
|
1156
1208
|
"global.native",
|
|
1209
|
+
// formatBigInt renders a bigint's digits in Node's form, and the
|
|
1210
|
+
// numericSeparator groups they take are inspect state.
|
|
1211
|
+
"bigint.inspect",
|
|
1157
1212
|
// ERR_ARG_NOT_ITERABLE renders the value as util.format's %s does.
|
|
1158
1213
|
"webstream.class",
|
|
1159
1214
|
// ERR_UNKNOWN_ENCODING formats an encoding that is not a string with %s.
|
|
@@ -1176,6 +1231,13 @@ const RUNTIME_FEATURE_RULES = {
|
|
|
1176
1231
|
prefixes: ["insp.", "console.", "test."],
|
|
1177
1232
|
libCall: (node) => node.fn === "rl.terminal" && !isDynUndefined(node.args[3]),
|
|
1178
1233
|
}),
|
|
1234
|
+
/** The JavaScript object model build (t262-da §J): every runtime feature
|
|
1235
|
+
* only a JavaScript source reaches shares one SCR_JS_OBJECT_MODEL build
|
|
1236
|
+
* of the units it touches, so a program with one of them selects that
|
|
1237
|
+
* build rather than a variant column of its own. The program has no
|
|
1238
|
+
* typed-to-dynamic bridge of its own to lose: jsObjectModel implies
|
|
1239
|
+
* dynTier. */
|
|
1240
|
+
jsObjectModel: rule({ fns: [...JS_OBJECT_MODEL_LIB_FNS] }),
|
|
1179
1241
|
legacyTextDecoder: rule({
|
|
1180
1242
|
fns: [...LEGACY_TEXT_DECODER_LIB_FNS],
|
|
1181
1243
|
expr: (node, tables) => (node.kind === "dynFrom" && mentionsTextDecoder(node.value.type, tables())) ||
|
|
@@ -1275,9 +1337,19 @@ const RUNTIME_FEATURE_RULES = {
|
|
|
1275
1337
|
symbol: rule({
|
|
1276
1338
|
initial: (mod) => (mod.records ?? []).some(isDirentShape),
|
|
1277
1339
|
fns: [...SYMBOL_LIB_FNS],
|
|
1278
|
-
|
|
1340
|
+
// %Iterator.prototype% (scr_js_iterator.c) defines its Symbol.iterator,
|
|
1341
|
+
// Symbol.toStringTag and Symbol.dispose members with the well-known
|
|
1342
|
+
// symbols scr_sym_well_known makes.
|
|
1343
|
+
prefixes: ["sym.", "disposable.", "iterator."],
|
|
1279
1344
|
types: ["symbol"],
|
|
1280
1345
|
}),
|
|
1346
|
+
/** Symbol.toPrimitive is read (sym.wellKnown with that name, or a name
|
|
1347
|
+
* computed at run time): the program installs ToNumber's
|
|
1348
|
+
* Symbol.toPrimitive step (scr_dyn_to_primitive_number_install). */
|
|
1349
|
+
toPrimitiveNumber: rule({
|
|
1350
|
+
libCall: (node) => node.fn === "sym.wellKnown" &&
|
|
1351
|
+
(node.args[0]?.kind !== "strLit" || node.args[0].value === "toPrimitive"),
|
|
1352
|
+
}),
|
|
1281
1353
|
tls: rule({ prefixes: ["tls.", "https.", "http2."], types: ["secureCtx"] }),
|
|
1282
1354
|
tlsCa: rule({ prefixes: ["tlsca."] }),
|
|
1283
1355
|
/** util.promisify over an untyped function (scr_util_promisify.c): its
|
|
@@ -1286,19 +1358,36 @@ const RUNTIME_FEATURE_RULES = {
|
|
|
1286
1358
|
utilPromisify: rule({ fns: ["util.promisifyDyn"] }),
|
|
1287
1359
|
/** process.emitWarning is assigned (process.setEmitWarning). */
|
|
1288
1360
|
warningReplace: rule({ fns: ["process.setEmitWarning"] }),
|
|
1289
|
-
/** A
|
|
1290
|
-
*
|
|
1291
|
-
* the
|
|
1292
|
-
|
|
1293
|
-
|
|
1361
|
+
/** A BigInt typed-array constructor read as a value (BigInt64Array,
|
|
1362
|
+
* BigUint64Array): their element kinds, which no double represents, live
|
|
1363
|
+
* in the JavaScript object model build (t262-da §J) of scr_bytes.c,
|
|
1364
|
+
* scr_json.c, scr_dyn_invoke.c and the assert, inspect and console units.
|
|
1365
|
+
* The fact ORs into jsObjectModel (jsObjectModelFact), so it selects no
|
|
1366
|
+
* build column of its own. Every other program keeps the byte-for-byte
|
|
1367
|
+
* default objects. */
|
|
1368
|
+
bigintBytes: rule({
|
|
1369
|
+
libCall: (node) => node.fn === "bytes.constructor" &&
|
|
1370
|
+
node.args[0]?.kind === "strLit" &&
|
|
1371
|
+
BIGINT_BYTES_NAMES.has(node.args[0].value),
|
|
1294
1372
|
}),
|
|
1295
1373
|
/** Module namespace objects as checked-dynamic values
|
|
1296
1374
|
* (scr_module_namespace.c). */
|
|
1297
1375
|
moduleNamespace: rule({ fns: ["module.namespaceValue"] }),
|
|
1376
|
+
/** A JavaScript source resizes, grows or detaches an ArrayBuffer
|
|
1377
|
+
* (frontend/lowering/buffers.ts): the program arms the buffer views
|
|
1378
|
+
* registry, which lives in the gated unit scr_js_buffers.c, and its bytes
|
|
1379
|
+
* headers stop being invariant (IrModule.bytesHeadersMutable). The fact
|
|
1380
|
+
* ORs into jsObjectModel (jsObjectModelFact), so it selects no build
|
|
1381
|
+
* column of its own. Every other program links no part of the unit. */
|
|
1382
|
+
mutableBuffers: rule({
|
|
1383
|
+
fns: ["arrayBuffer.armMutable", "arrayBuffer.newResizable", "sharedArrayBuffer.newGrowable"],
|
|
1384
|
+
}),
|
|
1298
1385
|
/** A module namespace boxed for typed code (scr_module_namespace_dyn.c). */
|
|
1299
1386
|
moduleNamespaceDyn: rule({ fns: ["module.namespaceDyn"] }),
|
|
1300
1387
|
/** Primitive wrapper objects (scr_js_wrapper.c). */
|
|
1301
1388
|
primitiveWrapper: rule({ prefixes: ["wrapper."] }),
|
|
1389
|
+
/** %Iterator% and %Iterator.prototype% as values (scr_js_iterator.c). */
|
|
1390
|
+
iteratorProto: rule({ prefixes: ["iterator."] }),
|
|
1302
1391
|
/** The WebAssembly API (scr_wasm.c). */
|
|
1303
1392
|
wasm: rule({ prefixes: ["wasm."] }),
|
|
1304
1393
|
/** crypto.subtle importKey/sign/verify/digest and CryptoKey:
|
|
@@ -1363,6 +1452,9 @@ const RUNTIME_FEATURE_RULES = {
|
|
|
1363
1452
|
/** node:zlib's Brotli forms: zlib.brotliInstall, which %main calls when
|
|
1364
1453
|
* the program uses Brotli (scr_brotli.c). */
|
|
1365
1454
|
brotli: rule({ fns: ["zlib.brotliInstall"] }),
|
|
1455
|
+
/** node:zlib's zstd forms: zlib.zstdInstall, which %main calls when the
|
|
1456
|
+
* program uses zstd (scr_zstd.c). */
|
|
1457
|
+
zstd: rule({ fns: ["zlib.zstdInstall"] }),
|
|
1366
1458
|
};
|
|
1367
1459
|
const RUNTIME_FEATURE_NAMES = [];
|
|
1368
1460
|
for (const name in RUNTIME_FEATURE_RULES)
|
|
@@ -1384,9 +1476,11 @@ function noRuntimeFeatures() {
|
|
|
1384
1476
|
textCodecDyn: false,
|
|
1385
1477
|
dnsPromises: false,
|
|
1386
1478
|
dynAsync: false,
|
|
1479
|
+
promiseGeneric: false,
|
|
1387
1480
|
dynBuiltinClass: false,
|
|
1388
1481
|
dynBuiltinStream: false,
|
|
1389
1482
|
stdlibPrototypeValue: false,
|
|
1483
|
+
hostAbsentGlobals: false,
|
|
1390
1484
|
dynInvoke: false,
|
|
1391
1485
|
arrayLikeDispatch: false,
|
|
1392
1486
|
builtinPrototypeValue: false,
|
|
@@ -1399,14 +1493,16 @@ function noRuntimeFeatures() {
|
|
|
1399
1493
|
eventsOnceSignal: false,
|
|
1400
1494
|
fetch: false,
|
|
1401
1495
|
fileHandle: false,
|
|
1402
|
-
fsBufferBrand: false,
|
|
1403
1496
|
fsFlags: false,
|
|
1404
1497
|
fsWatch: false,
|
|
1405
1498
|
fsWatchFile: false,
|
|
1499
|
+
genBind: false,
|
|
1406
1500
|
http2: false,
|
|
1407
1501
|
http: false,
|
|
1408
1502
|
icu: false,
|
|
1409
1503
|
inspect: false,
|
|
1504
|
+
jsObjectModel: false,
|
|
1505
|
+
mutableBuffers: false,
|
|
1410
1506
|
legacyTextDecoder: false,
|
|
1411
1507
|
mime: false,
|
|
1412
1508
|
webStreams: false,
|
|
@@ -1433,27 +1529,34 @@ function noRuntimeFeatures() {
|
|
|
1433
1529
|
moduleNamespace: false,
|
|
1434
1530
|
moduleNamespaceDyn: false,
|
|
1435
1531
|
primitiveWrapper: false,
|
|
1532
|
+
iteratorProto: false,
|
|
1436
1533
|
stream: false,
|
|
1437
1534
|
strdecDyn: false,
|
|
1438
1535
|
streamDyn: false,
|
|
1439
1536
|
handleProps: false,
|
|
1440
1537
|
childLifecycle: false,
|
|
1538
|
+
childOptionExt: false,
|
|
1441
1539
|
declAdopt: false,
|
|
1442
1540
|
typeOrigins: false,
|
|
1443
1541
|
dynForAwait: false,
|
|
1542
|
+
dynIntegrityQueries: false,
|
|
1444
1543
|
dynBuffer: false,
|
|
1544
|
+
dynBufferMembers: false,
|
|
1545
|
+
bufferPrototypeObject: false,
|
|
1445
1546
|
builtinValues: false,
|
|
1446
1547
|
computedRequire: false,
|
|
1447
1548
|
symbol: false,
|
|
1549
|
+
toPrimitiveNumber: false,
|
|
1448
1550
|
tls: false,
|
|
1449
1551
|
tlsCa: false,
|
|
1450
1552
|
utilPromisify: false,
|
|
1451
1553
|
warningReplace: false,
|
|
1452
|
-
|
|
1554
|
+
bigintBytes: false,
|
|
1453
1555
|
wasm: false,
|
|
1454
1556
|
webcrypto: false,
|
|
1455
1557
|
zlib: false,
|
|
1456
1558
|
brotli: false,
|
|
1559
|
+
zstd: false,
|
|
1457
1560
|
};
|
|
1458
1561
|
}
|
|
1459
1562
|
const ruleOf = (name) => RUNTIME_FEATURE_RULES[name];
|
|
@@ -1549,7 +1652,7 @@ function scanRuntimeFeatures(mod, stopAt, nodes) {
|
|
|
1549
1652
|
if (scan.result())
|
|
1550
1653
|
features[name] = true;
|
|
1551
1654
|
// Inline-cache sites of dynamic-tier functions use the tier's caches
|
|
1552
|
-
// (scr_js_object.c
|
|
1655
|
+
// (scr_js_object.c).
|
|
1553
1656
|
if (!features.dynTier && mod.functions.some((fn) => fn.tier === "dynamic")) {
|
|
1554
1657
|
const sites = new JsIcSites(mod);
|
|
1555
1658
|
features.dynTier = mod.functions.some((fn) => fn.tier === "dynamic" && hasJsIcSite(fn, sites));
|