@scriptc/compiler 0.4.8 → 0.4.9
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/buffer.d.ts +2 -0
- package/ambient/node-fallback/child_process.d.ts +9 -3
- package/ambient/node-fallback/dns-promises.d.ts +25 -0
- package/ambient/node-fallback/dns.d.ts +29 -0
- package/ambient/node-fallback/test.d.ts +7 -0
- package/ambient/scriptc-node-fallback.d.ts +145 -2
- package/ambient/scriptc-overrides.d.ts +22 -13
- package/dist/backend/build-cache.d.ts +1 -1
- package/dist/backend/build-cache.js +1 -1
- package/dist/backend/build-cache.js.map +1 -1
- package/dist/backend/cache-root.d.ts +7 -0
- package/dist/backend/cache-root.js +27 -0
- package/dist/backend/cache-root.js.map +1 -1
- package/dist/backend/executable-features.js +5 -1
- package/dist/backend/executable-features.js.map +1 -1
- package/dist/backend/link-plan.js +7 -1
- package/dist/backend/link-plan.js.map +1 -1
- package/dist/backend/llvm/bytes-loop-versions.d.ts +12 -1
- package/dist/backend/llvm/bytes-loop-versions.js +107 -30
- package/dist/backend/llvm/bytes-loop-versions.js.map +1 -1
- package/dist/backend/llvm/bytes-loop-versions.test.js +96 -0
- package/dist/backend/llvm/bytes-loop-versions.test.js.map +1 -1
- package/dist/backend/llvm/checked-value-lifetimes.js +1 -0
- package/dist/backend/llvm/checked-value-lifetimes.js.map +1 -1
- package/dist/backend/llvm/classes.d.ts +16 -5
- package/dist/backend/llvm/classes.js +34 -6
- package/dist/backend/llvm/classes.js.map +1 -1
- package/dist/backend/llvm/classes.test.js +21 -2
- package/dist/backend/llvm/classes.test.js.map +1 -1
- package/dist/backend/llvm/common.d.ts +9 -0
- package/dist/backend/llvm/common.js +9 -0
- package/dist/backend/llvm/common.js.map +1 -1
- package/dist/backend/llvm/cpu-dispatch.d.ts +36 -2
- package/dist/backend/llvm/cpu-dispatch.js +96 -2
- package/dist/backend/llvm/cpu-dispatch.js.map +1 -1
- package/dist/backend/llvm/dense-array-access.d.ts +5 -2
- package/dist/backend/llvm/dense-array-access.js +16 -12
- package/dist/backend/llvm/dense-array-access.js.map +1 -1
- package/dist/backend/llvm/dense-array-access.test.js +3 -1
- package/dist/backend/llvm/dense-array-access.test.js.map +1 -1
- package/dist/backend/llvm/dyn.d.ts +24 -0
- package/dist/backend/llvm/dyn.js +117 -3
- package/dist/backend/llvm/dyn.js.map +1 -1
- package/dist/backend/llvm/emit-function.js +6 -0
- package/dist/backend/llvm/emit-function.js.map +1 -1
- package/dist/backend/llvm/emit-journal.d.ts +1 -0
- package/dist/backend/llvm/emit-journal.js.map +1 -1
- package/dist/backend/llvm/emit-module.js +48 -5
- package/dist/backend/llvm/emit-module.js.map +1 -1
- package/dist/backend/llvm/emit-module.test.js +41 -0
- package/dist/backend/llvm/emit-module.test.js.map +1 -1
- package/dist/backend/llvm/emit-statements.js +11 -0
- package/dist/backend/llvm/emit-statements.js.map +1 -1
- package/dist/backend/llvm/emitter.d.ts +87 -7
- package/dist/backend/llvm/emitter.js +136 -15
- package/dist/backend/llvm/emitter.js.map +1 -1
- package/dist/backend/llvm/expr-async.js +28 -6
- package/dist/backend/llvm/expr-async.js.map +1 -1
- package/dist/backend/llvm/expr-containers.js +19 -5
- package/dist/backend/llvm/expr-containers.js.map +1 -1
- package/dist/backend/llvm/expr-dynamic.js +29 -1
- package/dist/backend/llvm/expr-dynamic.js.map +1 -1
- package/dist/backend/llvm/expr-primitives.js +104 -6
- package/dist/backend/llvm/expr-primitives.js.map +1 -1
- package/dist/backend/llvm/expr-records.js +15 -1
- package/dist/backend/llvm/expr-records.js.map +1 -1
- package/dist/backend/llvm/expr-stream-bridges.js +53 -5
- package/dist/backend/llvm/expr-stream-bridges.js.map +1 -1
- package/dist/backend/llvm/inline-arrays.js +1 -1
- package/dist/backend/llvm/inline-arrays.js.map +1 -1
- package/dist/backend/llvm/js-ic.js +126 -2
- package/dist/backend/llvm/js-ic.js.map +1 -1
- package/dist/backend/llvm/lanes.d.ts +38 -0
- package/dist/backend/llvm/lanes.js +778 -0
- package/dist/backend/llvm/lanes.js.map +1 -0
- package/dist/backend/llvm/lanes.test.d.ts +1 -0
- package/dist/backend/llvm/lanes.test.js +402 -0
- package/dist/backend/llvm/lanes.test.js.map +1 -0
- package/dist/backend/llvm/lib-dispatch.js +9 -4
- package/dist/backend/llvm/lib-dispatch.js.map +1 -1
- package/dist/backend/llvm/lib-network.js +20 -0
- package/dist/backend/llvm/lib-network.js.map +1 -1
- package/dist/backend/llvm/lib-shared.js +27 -0
- package/dist/backend/llvm/lib-shared.js.map +1 -1
- package/dist/backend/llvm/lib-test.js +11 -0
- package/dist/backend/llvm/lib-test.js.map +1 -1
- package/dist/backend/llvm/local-array-reads.js +2 -2
- package/dist/backend/llvm/local-array-reads.js.map +1 -1
- package/dist/backend/llvm/map-number-lookup.js +8 -2
- package/dist/backend/llvm/map-number-lookup.js.map +1 -1
- package/dist/backend/llvm/nullable-unions.js +5 -2
- package/dist/backend/llvm/nullable-unions.js.map +1 -1
- package/dist/backend/llvm/publish.d.ts +3 -0
- package/dist/backend/llvm/publish.js +2 -2
- package/dist/backend/llvm/publish.js.map +1 -1
- package/dist/backend/llvm/reference-writes.js +1 -0
- package/dist/backend/llvm/reference-writes.js.map +1 -1
- package/dist/backend/llvm/region-groups.js +43 -4
- package/dist/backend/llvm/region-groups.js.map +1 -1
- package/dist/backend/llvm/region-groups.test.js +79 -0
- package/dist/backend/llvm/region-groups.test.js.map +1 -1
- package/dist/backend/llvm/runtime-registries.test.js +32 -1
- package/dist/backend/llvm/runtime-registries.test.js.map +1 -1
- package/dist/backend/llvm/shapes.js +10 -1
- package/dist/backend/llvm/shapes.js.map +1 -1
- package/dist/backend/llvm/string-reads.d.ts +1 -1
- package/dist/backend/llvm/string-reads.js +1 -1
- package/dist/backend/llvm/string-reads.js.map +1 -1
- package/dist/backend/llvm/unwind-abi.js +24 -2
- package/dist/backend/llvm/unwind-abi.js.map +1 -1
- package/dist/backend/llvm/unwind-abi.test.js +38 -0
- package/dist/backend/llvm/unwind-abi.test.js.map +1 -1
- package/dist/backend/llvm/walkers.d.ts +3 -0
- package/dist/backend/llvm/walkers.js +20 -2
- package/dist/backend/llvm/walkers.js.map +1 -1
- package/dist/backend/native/contracts.d.ts +15 -3
- package/dist/backend/native/executable.js +19 -5
- package/dist/backend/native/executable.js.map +1 -1
- package/dist/backend/native-codegen-core.d.ts +20 -0
- package/dist/backend/native-codegen-core.js +15 -0
- package/dist/backend/native-codegen-core.js.map +1 -1
- package/dist/backend/native-codegen.d.ts +5 -0
- package/dist/backend/native-codegen.js +62 -8
- package/dist/backend/native-codegen.js.map +1 -1
- package/dist/backend/native-codegen.test.js +48 -8
- package/dist/backend/native-codegen.test.js.map +1 -1
- package/dist/backend/native-link-info-core.d.ts +27 -3
- package/dist/backend/native-link-info-core.js.map +1 -1
- package/dist/backend/native-link-info.test.js +17 -1
- package/dist/backend/native-link-info.test.js.map +1 -1
- package/dist/backend/native-toolchain.d.ts +1 -1
- package/dist/backend/native-toolchain.js +1 -1
- package/dist/backend/native-toolchain.js.map +1 -1
- package/dist/backend/native-toolchain.test.js +14 -1
- package/dist/backend/native-toolchain.test.js.map +1 -1
- package/dist/backend/runtime-pack-core.d.ts +9 -3
- package/dist/backend/runtime-pack-core.js +6 -1
- package/dist/backend/runtime-pack-core.js.map +1 -1
- package/dist/backend/runtime-pack.test.js +32 -1
- package/dist/backend/runtime-pack.test.js.map +1 -1
- package/dist/backend/targets.d.ts +9 -1
- package/dist/backend/targets.js +11 -2
- package/dist/backend/targets.js.map +1 -1
- package/dist/backend/targets.test.js +6 -0
- package/dist/backend/targets.test.js.map +1 -1
- package/dist/cli/command.js +15 -1
- package/dist/cli/command.js.map +1 -1
- package/dist/cli/host.d.ts +6 -0
- package/dist/cli/mcp.d.ts +72 -0
- package/dist/cli/mcp.js +601 -0
- package/dist/cli/mcp.js.map +1 -0
- package/dist/cli/mcp.test.d.ts +1 -0
- package/dist/cli/mcp.test.js +380 -0
- package/dist/cli/mcp.test.js.map +1 -0
- package/dist/cli/output-options.d.ts +1 -0
- package/dist/cli/output-options.js +3 -0
- package/dist/cli/output-options.js.map +1 -1
- package/dist/cli/usage.d.ts +51 -1
- package/dist/cli/usage.js +709 -186
- package/dist/cli/usage.js.map +1 -1
- package/dist/compat/fetch-profile.js +9 -4
- package/dist/compat/fetch-profile.js.map +1 -1
- package/dist/compile-types.d.ts +17 -0
- package/dist/coverage/report.d.ts +5 -9
- package/dist/coverage/report.js.map +1 -1
- package/dist/executable/executable-cache.d.ts +17 -3
- package/dist/executable/executable-cache.js +17 -3
- package/dist/executable/executable-cache.js.map +1 -1
- package/dist/executable/prepare.js +87 -10
- package/dist/executable/prepare.js.map +1 -1
- package/dist/frontend/analysis.js +3 -2
- package/dist/frontend/analysis.js.map +1 -1
- package/dist/frontend/canon-map.js +13 -8
- package/dist/frontend/canon-map.js.map +1 -1
- package/dist/frontend/decl-projection.d.ts +18 -0
- package/dist/frontend/decl-projection.js +90 -22
- package/dist/frontend/decl-projection.js.map +1 -1
- package/dist/frontend/decl-projection.test.js +47 -1
- package/dist/frontend/decl-projection.test.js.map +1 -1
- package/dist/frontend/default-library.d.ts +10 -0
- package/dist/frontend/default-library.js +43 -0
- package/dist/frontend/default-library.js.map +1 -0
- package/dist/frontend/fork-target.js +54 -9
- package/dist/frontend/fork-target.js.map +1 -1
- package/dist/frontend/fork-target.test.js +82 -0
- package/dist/frontend/fork-target.test.js.map +1 -1
- package/dist/frontend/inferred-js-diagnostics.test.js +73 -0
- package/dist/frontend/inferred-js-diagnostics.test.js.map +1 -1
- package/dist/frontend/lowering/abstract-equality.d.ts +2 -1
- package/dist/frontend/lowering/abstract-equality.js +7 -1
- package/dist/frontend/lowering/abstract-equality.js.map +1 -1
- package/dist/frontend/lowering/array-values.js +2 -2
- package/dist/frontend/lowering/array-values.js.map +1 -1
- package/dist/frontend/lowering/assertion-members.js +52 -2
- package/dist/frontend/lowering/assertion-members.js.map +1 -1
- package/dist/frontend/lowering/builtin-namespaces.d.ts +5 -0
- package/dist/frontend/lowering/builtin-namespaces.js +19 -12
- package/dist/frontend/lowering/builtin-namespaces.js.map +1 -1
- package/dist/frontend/lowering/builtins/callable-aliases.js +42 -6
- package/dist/frontend/lowering/builtins/callable-aliases.js.map +1 -1
- package/dist/frontend/lowering/builtins/child-process.d.ts +12 -11
- package/dist/frontend/lowering/builtins/child-process.js +235 -38
- package/dist/frontend/lowering/builtins/child-process.js.map +1 -1
- package/dist/frontend/lowering/builtins/compression.d.ts +6 -1
- package/dist/frontend/lowering/builtins/compression.js +3 -3
- package/dist/frontend/lowering/builtins/compression.js.map +1 -1
- package/dist/frontend/lowering/builtins/constants.js +2 -2
- package/dist/frontend/lowering/builtins/constants.js.map +1 -1
- package/dist/frontend/lowering/builtins/crypto.d.ts +3 -1
- package/dist/frontend/lowering/builtins/crypto.js +9 -1
- package/dist/frontend/lowering/builtins/crypto.js.map +1 -1
- package/dist/frontend/lowering/builtins/dates.js +26 -6
- package/dist/frontend/lowering/builtins/dates.js.map +1 -1
- package/dist/frontend/lowering/builtins/environment.d.ts +13 -1
- package/dist/frontend/lowering/builtins/environment.js +15 -4
- package/dist/frontend/lowering/builtins/environment.js.map +1 -1
- package/dist/frontend/lowering/builtins/module-bindings.d.ts +33 -0
- package/dist/frontend/lowering/builtins/module-bindings.js +213 -11
- package/dist/frontend/lowering/builtins/module-bindings.js.map +1 -1
- package/dist/frontend/lowering/builtins/module-resolution.d.ts +9 -2
- package/dist/frontend/lowering/builtins/module-resolution.js +187 -19
- package/dist/frontend/lowering/builtins/module-resolution.js.map +1 -1
- package/dist/frontend/lowering/builtins/performance.js +1 -1
- package/dist/frontend/lowering/builtins/performance.js.map +1 -1
- package/dist/frontend/lowering/builtins/process.js +40 -2
- package/dist/frontend/lowering/builtins/process.js.map +1 -1
- package/dist/frontend/lowering/builtins/promises.js +33 -0
- package/dist/frontend/lowering/builtins/promises.js.map +1 -1
- package/dist/frontend/lowering/builtins/readline.d.ts +9 -5
- package/dist/frontend/lowering/builtins/readline.js +184 -75
- package/dist/frontend/lowering/builtins/readline.js.map +1 -1
- package/dist/frontend/lowering/builtins/url.d.ts +4 -0
- package/dist/frontend/lowering/builtins/url.js +6 -0
- package/dist/frontend/lowering/builtins/url.js.map +1 -1
- package/dist/frontend/lowering/call-arguments.js +15 -0
- package/dist/frontend/lowering/call-arguments.js.map +1 -1
- package/dist/frontend/lowering/callable-properties.d.ts +34 -0
- package/dist/frontend/lowering/callable-properties.js +210 -0
- package/dist/frontend/lowering/callable-properties.js.map +1 -0
- package/dist/frontend/lowering/cjs-inline-require.d.ts +16 -0
- package/dist/frontend/lowering/cjs-inline-require.js +105 -0
- package/dist/frontend/lowering/cjs-inline-require.js.map +1 -1
- package/dist/frontend/lowering/cjs-inline-require.test.d.ts +1 -0
- package/dist/frontend/lowering/cjs-inline-require.test.js +61 -0
- package/dist/frontend/lowering/cjs-inline-require.test.js.map +1 -0
- package/dist/frontend/lowering/class-dynamic-dispatch.js +82 -2
- package/dist/frontend/lowering/class-dynamic-dispatch.js.map +1 -1
- package/dist/frontend/lowering/class-protocols.d.ts +57 -4
- package/dist/frontend/lowering/class-protocols.js +597 -30
- package/dist/frontend/lowering/class-protocols.js.map +1 -1
- package/dist/frontend/lowering/class-unions.js +2 -2
- package/dist/frontend/lowering/class-unions.js.map +1 -1
- package/dist/frontend/lowering/coercions/function-adapters.d.ts +12 -0
- package/dist/frontend/lowering/coercions/function-adapters.js +62 -0
- package/dist/frontend/lowering/coercions/function-adapters.js.map +1 -1
- package/dist/frontend/lowering/coercions/structural-plans.js +56 -1
- package/dist/frontend/lowering/coercions/structural-plans.js.map +1 -1
- package/dist/frontend/lowering/coercions/structural.js +9 -4
- package/dist/frontend/lowering/coercions/structural.js.map +1 -1
- package/dist/frontend/lowering/collection-ingestion.d.ts +9 -0
- package/dist/frontend/lowering/collection-ingestion.js +115 -41
- package/dist/frontend/lowering/collection-ingestion.js.map +1 -1
- package/dist/frontend/lowering/containers/array-callbacks.js +16 -0
- package/dist/frontend/lowering/containers/array-callbacks.js.map +1 -1
- package/dist/frontend/lowering/containers/bytes.js +66 -10
- package/dist/frontend/lowering/containers/bytes.js.map +1 -1
- package/dist/frontend/lowering/containers/collection-methods.js +61 -5
- package/dist/frontend/lowering/containers/collection-methods.js.map +1 -1
- package/dist/frontend/lowering/containers/filter-predicates.js +11 -0
- package/dist/frontend/lowering/containers/filter-predicates.js.map +1 -1
- package/dist/frontend/lowering/containers/indexed-objects.d.ts +15 -0
- package/dist/frontend/lowering/containers/indexed-objects.js +213 -30
- package/dist/frontend/lowering/containers/indexed-objects.js.map +1 -1
- package/dist/frontend/lowering/error-name-order.d.ts +16 -0
- package/dist/frontend/lowering/error-name-order.js +61 -0
- package/dist/frontend/lowering/error-name-order.js.map +1 -1
- package/dist/frontend/lowering/expressions/asserted-receiver.d.ts +17 -0
- package/dist/frontend/lowering/expressions/asserted-receiver.js +123 -1
- package/dist/frontend/lowering/expressions/asserted-receiver.js.map +1 -1
- package/dist/frontend/lowering/expressions/binary.js +147 -20
- package/dist/frontend/lowering/expressions/binary.js.map +1 -1
- package/dist/frontend/lowering/expressions/element-access.js +63 -14
- package/dist/frontend/lowering/expressions/element-access.js.map +1 -1
- package/dist/frontend/lowering/expressions/erased-delete.d.ts +59 -0
- package/dist/frontend/lowering/expressions/erased-delete.js +247 -0
- package/dist/frontend/lowering/expressions/erased-delete.js.map +1 -0
- package/dist/frontend/lowering/expressions/hosted-narrowing.d.ts +10 -0
- package/dist/frontend/lowering/expressions/hosted-narrowing.js +48 -1
- package/dist/frontend/lowering/expressions/hosted-narrowing.js.map +1 -1
- package/dist/frontend/lowering/expressions/identifiers.js +20 -0
- package/dist/frontend/lowering/expressions/identifiers.js.map +1 -1
- package/dist/frontend/lowering/expressions/narrowing.d.ts +7 -2
- package/dist/frontend/lowering/expressions/narrowing.js +77 -45
- package/dist/frontend/lowering/expressions/narrowing.js.map +1 -1
- package/dist/frontend/lowering/expressions/object-literals.js +62 -19
- package/dist/frontend/lowering/expressions/object-literals.js.map +1 -1
- package/dist/frontend/lowering/expressions/optional-chains.js +19 -0
- package/dist/frontend/lowering/expressions/optional-chains.js.map +1 -1
- package/dist/frontend/lowering/expressions/property-access.d.ts +7 -7
- package/dist/frontend/lowering/expressions/property-access.js +247 -48
- package/dist/frontend/lowering/expressions/property-access.js.map +1 -1
- package/dist/frontend/lowering/expressions/relational.d.ts +1 -0
- package/dist/frontend/lowering/expressions/relational.js +18 -8
- package/dist/frontend/lowering/expressions/relational.js.map +1 -1
- package/dist/frontend/lowering/expressions/union-fields.js +11 -5
- package/dist/frontend/lowering/expressions/union-fields.js.map +1 -1
- package/dist/frontend/lowering/expressions/updates.js +121 -11
- package/dist/frontend/lowering/expressions/updates.js.map +1 -1
- package/dist/frontend/lowering/function-context.d.ts +10 -0
- package/dist/frontend/lowering/function-context.js +36 -0
- package/dist/frontend/lowering/function-context.js.map +1 -1
- package/dist/frontend/lowering/function-returns.js +8 -8
- package/dist/frontend/lowering/function-returns.js.map +1 -1
- package/dist/frontend/lowering/handle-properties.d.ts +62 -3
- package/dist/frontend/lowering/handle-properties.js +674 -26
- package/dist/frontend/lowering/handle-properties.js.map +1 -1
- package/dist/frontend/lowering/handle-properties.test.js +95 -2
- package/dist/frontend/lowering/handle-properties.test.js.map +1 -1
- package/dist/frontend/lowering/lower-builtin-values.d.ts +12 -0
- package/dist/frontend/lowering/lower-builtin-values.js +44 -0
- package/dist/frontend/lowering/lower-builtin-values.js.map +1 -1
- package/dist/frontend/lowering/lower-calls.js +328 -136
- package/dist/frontend/lowering/lower-calls.js.map +1 -1
- package/dist/frontend/lowering/lower-classes.js +82 -17
- package/dist/frontend/lowering/lower-classes.js.map +1 -1
- package/dist/frontend/lowering/lower-event-emitter.js +113 -9
- package/dist/frontend/lowering/lower-event-emitter.js.map +1 -1
- package/dist/frontend/lowering/lower-expando.d.ts +13 -21
- package/dist/frontend/lowering/lower-expando.js +90 -126
- package/dist/frontend/lowering/lower-expando.js.map +1 -1
- package/dist/frontend/lowering/lower-exprs.js +2 -2
- package/dist/frontend/lowering/lower-exprs.js.map +1 -1
- package/dist/frontend/lowering/lower-functions.js +65 -0
- package/dist/frontend/lowering/lower-functions.js.map +1 -1
- package/dist/frontend/lowering/lower-inspect.js +471 -0
- package/dist/frontend/lowering/lower-inspect.js.map +1 -1
- package/dist/frontend/lowering/lower-modules.js +36 -10
- package/dist/frontend/lowering/lower-modules.js.map +1 -1
- package/dist/frontend/lowering/lower-node-island.js +28 -0
- package/dist/frontend/lowering/lower-node-island.js.map +1 -1
- package/dist/frontend/lowering/lower-server.d.ts +53 -7
- package/dist/frontend/lowering/lower-server.js +213 -42
- package/dist/frontend/lowering/lower-server.js.map +1 -1
- package/dist/frontend/lowering/lower-stdlib.js +50 -7
- package/dist/frontend/lowering/lower-stdlib.js.map +1 -1
- package/dist/frontend/lowering/lower-stmts.d.ts +24 -0
- package/dist/frontend/lowering/lower-stmts.js +463 -220
- package/dist/frontend/lowering/lower-stmts.js.map +1 -1
- package/dist/frontend/lowering/lower-stream.js +2 -2
- package/dist/frontend/lowering/lower-stream.js.map +1 -1
- package/dist/frontend/lowering/lower-test.js +71 -2
- package/dist/frontend/lowering/lower-test.js.map +1 -1
- package/dist/frontend/lowering/lowerer.d.ts +81 -10
- package/dist/frontend/lowering/lowerer.js +319 -72
- package/dist/frontend/lowering/lowerer.js.map +1 -1
- package/dist/frontend/lowering/new-target.js +10 -2
- package/dist/frontend/lowering/new-target.js.map +1 -1
- package/dist/frontend/lowering/nullish-empty-pattern.js +3 -3
- package/dist/frontend/lowering/nullish-empty-pattern.js.map +1 -1
- package/dist/frontend/lowering/partial-assertions.js +30 -5
- package/dist/frontend/lowering/partial-assertions.js.map +1 -1
- package/dist/frontend/lowering/primitive-throws.js +91 -1
- package/dist/frontend/lowering/primitive-throws.js.map +1 -1
- package/dist/frontend/lowering/primitive-wrappers.d.ts +9 -0
- package/dist/frontend/lowering/primitive-wrappers.js +2 -2
- package/dist/frontend/lowering/primitive-wrappers.js.map +1 -1
- package/dist/frontend/lowering/promise-executor-adapter.js +5 -2
- package/dist/frontend/lowering/promise-executor-adapter.js.map +1 -1
- package/dist/frontend/lowering/record-links.js +7 -2
- package/dist/frontend/lowering/record-links.js.map +1 -1
- package/dist/frontend/lowering/surfaces.d.ts +4 -0
- package/dist/frontend/lowering/surfaces.js +118 -2
- package/dist/frontend/lowering/surfaces.js.map +1 -1
- package/dist/frontend/lowering/surfaces.test.d.ts +1 -0
- package/dist/frontend/lowering/surfaces.test.js +31 -0
- package/dist/frontend/lowering/surfaces.test.js.map +1 -0
- package/dist/frontend/mock-shapes.js +3 -3
- package/dist/frontend/mock-shapes.js.map +1 -1
- package/dist/frontend/npm-static-ladder.d.ts +21 -0
- package/dist/frontend/npm-static-ladder.js +2 -0
- package/dist/frontend/npm-static-ladder.js.map +1 -0
- package/dist/frontend/npm-static-ladder.test.d.ts +1 -0
- package/dist/frontend/npm-static-ladder.test.js +138 -0
- package/dist/frontend/npm-static-ladder.test.js.map +1 -0
- package/dist/frontend/npm-static-status.d.ts +15 -0
- package/dist/frontend/npm-static-status.js +2 -0
- package/dist/frontend/npm-static-status.js.map +1 -0
- package/dist/frontend/package-shims.js +1 -1
- package/dist/frontend/package-shims.js.map +1 -1
- package/dist/frontend/pipeline.d.ts +1 -1
- package/dist/frontend/pipeline.js +222 -25
- package/dist/frontend/pipeline.js.map +1 -1
- package/dist/frontend/program-analysis.d.ts +4 -0
- package/dist/frontend/program-analysis.js +6 -0
- package/dist/frontend/program-analysis.js.map +1 -1
- package/dist/frontend/program.js +258 -32
- package/dist/frontend/program.js.map +1 -1
- package/dist/frontend/program.test.js +30 -0
- package/dist/frontend/program.test.js.map +1 -1
- package/dist/frontend/resolve.js +29 -5
- package/dist/frontend/resolve.js.map +1 -1
- package/dist/frontend/resolve.test.js +40 -0
- package/dist/frontend/resolve.test.js.map +1 -1
- package/dist/frontend/services.d.ts +8 -0
- package/dist/frontend/services.js +7 -0
- package/dist/frontend/services.js.map +1 -1
- package/dist/frontend/ts7/checker.d.ts +7 -0
- package/dist/frontend/ts7/checker.js +12 -0
- package/dist/frontend/ts7/checker.js.map +1 -1
- package/dist/frontend/ts7/checker.test.js +1 -0
- package/dist/frontend/ts7/checker.test.js.map +1 -1
- package/dist/frontend/ts7/program-host.d.ts +39 -2
- package/dist/frontend/ts7/program-host.js +62 -8
- package/dist/frontend/ts7/program-host.js.map +1 -1
- package/dist/frontend/ts7/program-host.test.js +33 -0
- package/dist/frontend/ts7/program-host.test.js.map +1 -1
- package/dist/frontend/ts7/session-cache.d.ts +5 -1
- package/dist/frontend/ts7/session-cache.js +7 -1
- package/dist/frontend/ts7/session-cache.js.map +1 -1
- package/dist/frontend/ts7/session-cache.test.js +37 -0
- package/dist/frontend/ts7/session-cache.test.js.map +1 -1
- package/dist/frontend/ts7/session.js +19 -1
- package/dist/frontend/ts7/session.js.map +1 -1
- package/dist/frontend/ts7/source-parser.d.ts +17 -2
- package/dist/frontend/ts7/source-parser.js +61 -2
- package/dist/frontend/ts7/source-parser.js.map +1 -1
- package/dist/frontend/ts7/source-parser.test.js +55 -2
- package/dist/frontend/ts7/source-parser.test.js.map +1 -1
- package/dist/frontend/tsc-codes.d.ts +3 -2
- package/dist/frontend/tsc-codes.js +129 -22
- package/dist/frontend/tsc-codes.js.map +1 -1
- package/dist/frontend/type-mapper.d.ts +5 -11
- package/dist/frontend/type-mapper.js +380 -70
- package/dist/frontend/type-mapper.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +67 -7
- package/dist/index.js.map +1 -1
- package/dist/ir/builtin-effects.js +29 -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 +72 -6
- package/dist/ir/builtin-signatures.js.map +1 -1
- package/dist/ir/codec.generated.d.ts +1 -1
- package/dist/ir/codec.generated.js +321 -263
- package/dist/ir/codec.generated.js.map +1 -1
- package/dist/ir/constant-length-clones.d.ts +26 -0
- package/dist/ir/constant-length-clones.js +589 -0
- package/dist/ir/constant-length-clones.js.map +1 -0
- package/dist/ir/constant-length-clones.test.d.ts +1 -0
- package/dist/ir/constant-length-clones.test.js +292 -0
- package/dist/ir/constant-length-clones.test.js.map +1 -0
- package/dist/ir/constant-tables.d.ts +10 -5
- package/dist/ir/constant-tables.js +83 -17
- package/dist/ir/constant-tables.js.map +1 -1
- package/dist/ir/constant-tables.test.js +58 -1
- package/dist/ir/constant-tables.test.js.map +1 -1
- package/dist/ir/fields.generated.js +5 -2
- package/dist/ir/fields.generated.js.map +1 -1
- package/dist/ir/function-references.js +2 -0
- package/dist/ir/function-references.js.map +1 -1
- package/dist/ir/function-references.test.js +13 -0
- package/dist/ir/function-references.test.js.map +1 -1
- package/dist/ir/integer-loops.js +1 -0
- package/dist/ir/integer-loops.js.map +1 -1
- package/dist/ir/integer-loops.test.js +16 -0
- package/dist/ir/integer-loops.test.js.map +1 -1
- package/dist/ir/ir.d.ts +50 -6
- package/dist/ir/ir.js +44 -2
- package/dist/ir/ir.js.map +1 -1
- package/dist/ir/ir.test.js +83 -1
- package/dist/ir/ir.test.js.map +1 -1
- package/dist/ir/js-groups.js +5 -1
- package/dist/ir/js-groups.js.map +1 -1
- package/dist/ir/js-ic.d.ts +20 -0
- package/dist/ir/js-ic.js +81 -4
- package/dist/ir/js-ic.js.map +1 -1
- package/dist/ir/js-ic.test.js +8 -1
- package/dist/ir/js-ic.test.js.map +1 -1
- package/dist/ir/lane-plans.d.ts +86 -0
- package/dist/ir/lane-plans.js +589 -0
- package/dist/ir/lane-plans.js.map +1 -0
- package/dist/ir/lane-plans.test.d.ts +1 -0
- package/dist/ir/lane-plans.test.js +549 -0
- package/dist/ir/lane-plans.test.js.map +1 -0
- package/dist/ir/runtime-features.d.ts +68 -10
- package/dist/ir/runtime-features.js +285 -17
- package/dist/ir/runtime-features.js.map +1 -1
- package/dist/ir/runtime-features.test.js +190 -1
- package/dist/ir/runtime-features.test.js.map +1 -1
- package/dist/ir/validate.js +61 -24
- package/dist/ir/validate.js.map +1 -1
- package/dist/native/cache.d.ts +5 -0
- package/dist/native/cache.js +23 -1
- package/dist/native/cache.js.map +1 -1
- package/dist/native/cache.test.js +29 -1
- package/dist/native/cache.test.js.map +1 -1
- package/dist/native/cli.js +4 -2
- package/dist/native/cli.js.map +1 -1
- package/dist/native/compiler.d.ts +11 -3
- package/dist/native/compiler.js +102 -16
- package/dist/native/compiler.js.map +1 -1
- package/dist/native/compiler.test.js +244 -2
- package/dist/native/compiler.test.js.map +1 -1
- package/dist/native/prepare.d.ts +14 -1
- package/dist/native/prepare.js +79 -29
- package/dist/native/prepare.js.map +1 -1
- package/dist/native/sanitizer.test.js +3 -0
- package/dist/native/sanitizer.test.js.map +1 -1
- package/dist/native/unchanged.d.ts +80 -0
- package/dist/native/unchanged.js +301 -0
- package/dist/native/unchanged.js.map +1 -0
- package/dist/native/unchanged.test.d.ts +1 -0
- package/dist/native/unchanged.test.js +249 -0
- package/dist/native/unchanged.test.js.map +1 -0
- package/dist/node-islands/boundary.d.ts +16 -0
- package/dist/node-islands/boundary.js +70 -7
- package/dist/node-islands/boundary.js.map +1 -1
- package/dist/node-islands/boundary.test.js +59 -14
- package/dist/node-islands/boundary.test.js.map +1 -1
- package/dist/node-islands/detect.js +203 -47
- package/dist/node-islands/detect.js.map +1 -1
- package/dist/node-islands/detect.test.js +45 -0
- package/dist/node-islands/detect.test.js.map +1 -1
- package/dist/node-islands/growth.js +4 -16
- package/dist/node-islands/growth.js.map +1 -1
- package/dist/node-islands/modules.d.ts +3 -0
- package/dist/node-islands/modules.js +143 -12
- package/dist/node-islands/modules.js.map +1 -1
- package/dist/node-islands/modules.test.js +125 -0
- package/dist/node-islands/modules.test.js.map +1 -1
- package/dist/node-islands/report.d.ts +1 -1
- package/dist/node-islands/report.js +2 -1
- package/dist/node-islands/report.js.map +1 -1
- package/package.json +20 -20
- package/shims/undici/core/request.ts +7 -1
- package/surface-manifest.json +380 -2
|
@@ -36,6 +36,7 @@ import { InternalCompilerError } from "../../errors.js";
|
|
|
36
36
|
import { isFsStreamMember, lowerFsStreamCall, lowerFsStreamMethodCall, } from "./builtins/fs-streams.js";
|
|
37
37
|
import * as ts from "../ts7/adapter.js";
|
|
38
38
|
import { isZlibStreamMember, lowerPromisifiedZlibCall, lowerZlibStreamMethodCall, } from "./builtins/compression.js";
|
|
39
|
+
import { callableMemberFieldTarget, lowerCallableAssign } from "./callable-properties.js";
|
|
39
40
|
import { inlineNamespaceRequireOf, lowerInlineRequireValue, lowerUncompiledRequireCall, lowerWithInlineRequireInit, } from "./cjs-inline-require.js";
|
|
40
41
|
import { cjsExportCallIgnoresThis, cjsInFileExportGlobalOf } from "./cjs-exports-object.js";
|
|
41
42
|
import { lowerGenMethodCall } from "./lower-generators.js";
|
|
@@ -83,11 +84,11 @@ import { lowerAbsenceProbe, v8CalleeText, lowerPromiseAllTupleCall, lowerPromise
|
|
|
83
84
|
import { isSafeToDiscard } from "./expressions/evaluation-safety.js";
|
|
84
85
|
import { nullishLiteral, nullishReadTypeError, throwAfterEach } from "./primitive-throws.js";
|
|
85
86
|
import { tryLowerExpression } from "./expressions/try-lower-expression.js";
|
|
86
|
-
import { lowerChildMethodValue, lowerChildPropertyCall } from "./handle-properties.js";
|
|
87
|
+
import { boxedHandleReceiver, lowerChildMethodValue, lowerChildPropertyCall, lowerHandleMemberCall, refuseShadowedImplicitReader, } from "./handle-properties.js";
|
|
87
88
|
import { classObjectTag, classToNumberConversion } from "./class-to-primitive.js";
|
|
88
89
|
import { hasRuntimeStatics } from "./class-runtime-statics.js";
|
|
89
90
|
import { structuralReadType } from "./class-unions.js";
|
|
90
|
-
import { httpClientFnBindingOf, lowerCompatReqStreamOptionalCall, lowerHttpClientFnCall, } from "./lower-server.js";
|
|
91
|
+
import { httpClientFnBindingOf, httpClientFnRefOf, lowerCompatReqStreamOptionalCall, lowerHttpClientFnCall, lowerHttpClientFnRefCall, } from "./lower-server.js";
|
|
91
92
|
import { EMITTER_API_MEMBERS, exactClassOfReceiver, exactInstanceClassOf, findGenericMethodOn, lowerClassGenericMethodCall, lowerStaticMethodCall, lowerStaticFieldRead, returnsOnlyThis, storedClassValueType, } from "./lower-classes.js";
|
|
92
93
|
import { classCallbackCall, isClassCallback } from "./class-callbacks.js";
|
|
93
94
|
import { emitOverrideAtOrAbove, emitterRooted, lowerEmitterMethodCall, } from "./lower-event-emitter.js";
|
|
@@ -97,7 +98,7 @@ import { lowerConsoleInstanceCall, lowerConsoleMethodCall, lowerConsoleOutput, }
|
|
|
97
98
|
import { STREAM_API_MEMBERS, STREAM_OPERATORS, lowerStreamMethodCall, lowerStreamStaticCall, streamSidesOf, } from "./lower-stream.js";
|
|
98
99
|
import { ambientNsRootOf, ambientUndefReadType, ambientUndefVarRootOf, ambientUndefinedFnSymbolOf, contextualUndefReadType, fenceEarlyAliasUse, fenceEarlyNsMemberRef, nsMemberIdentOf, nsUndefRead, } from "./lower-namespaces.js";
|
|
99
100
|
import { hostGlobalNameOfRead, hostGlobalPrototypeMemberOf } from "./host-globals.js";
|
|
100
|
-
import {
|
|
101
|
+
import { fenceExpandoRead } from "./lower-expando.js";
|
|
101
102
|
import { fenceNodeModuleMutationCall, isCjsRequireGlobal, lowerRequireCacheKeys, } from "./lower-node-module.js";
|
|
102
103
|
import { pathModuleValue } from "./lower-builtin-values.js";
|
|
103
104
|
import { defaultAfterUndefined, lowerOptionalArgument, lowerStaticallyUndefinedArgument, positionNumber, } from "./optional-arguments.js";
|
|
@@ -186,6 +187,29 @@ function receiverlessCalleeOf(callee) {
|
|
|
186
187
|
right = right.expression;
|
|
187
188
|
return right;
|
|
188
189
|
}
|
|
190
|
+
/** `fn.member(args)` where `member` is a key of the callable's own-property
|
|
191
|
+
* table: the member read through the table (checked back into the declared
|
|
192
|
+
* member type, like every other table read) yields the function value, and
|
|
193
|
+
* the call goes through that value. A function's own data property shadows
|
|
194
|
+
* an inherited `Function.prototype` member (`fn.toString` above all), so
|
|
195
|
+
* this is the call form of that shadowing. */
|
|
196
|
+
function lowerCallableMemberCall(lowerer, call) {
|
|
197
|
+
const access = call.expression;
|
|
198
|
+
if (!ts.isPropertyAccessExpression(access))
|
|
199
|
+
return null;
|
|
200
|
+
if (access.questionDotToken || call.questionDotToken)
|
|
201
|
+
return null;
|
|
202
|
+
const receiverIr = lowerer.mapTypeOf(lowerer.typeOf(access.expression));
|
|
203
|
+
if (receiverIr?.kind !== "func")
|
|
204
|
+
return null;
|
|
205
|
+
const target = callableMemberFieldTarget(lowerer, access, receiverIr);
|
|
206
|
+
if (!target || target.fieldType.kind !== "func")
|
|
207
|
+
return null;
|
|
208
|
+
const callee = lowerer.fieldGetExpr(target, locOf(access), access);
|
|
209
|
+
if (callee.type.kind !== "func")
|
|
210
|
+
return null;
|
|
211
|
+
return lowerCallThroughValue(lowerer, call, callee, locOf(call));
|
|
212
|
+
}
|
|
189
213
|
export function lowerCall(lowerer, expr) {
|
|
190
214
|
const loc = locOf(expr);
|
|
191
215
|
// A JavaScript source calling a member that resizes, grows or detaches a
|
|
@@ -824,6 +848,7 @@ export function lowerCall(lowerer, expr) {
|
|
|
824
848
|
const arg = lowerer.lowerExpr(argNode);
|
|
825
849
|
if (name === "String" &&
|
|
826
850
|
(arg.type.kind === "dyn" ||
|
|
851
|
+
arg.type.kind === "symbol" ||
|
|
827
852
|
(arg.type.kind === "union" &&
|
|
828
853
|
lowerer.unions.get(arg.type.unionId)?.arms.some((arm) => arm.kind === "symbol") &&
|
|
829
854
|
lowerer.dynConvertible(arg.type)))) {
|
|
@@ -873,7 +898,7 @@ export function lowerCall(lowerer, expr) {
|
|
|
873
898
|
kind: "dynCall",
|
|
874
899
|
callee,
|
|
875
900
|
receiver,
|
|
876
|
-
calleeName:
|
|
901
|
+
calleeName: v8CalleeText(access),
|
|
877
902
|
args,
|
|
878
903
|
...(spreads.length > 0 ? { spreads } : {}),
|
|
879
904
|
type: DYN,
|
|
@@ -923,6 +948,11 @@ export function lowerCall(lowerer, expr) {
|
|
|
923
948
|
if (projection?.kind === "builtin-function") {
|
|
924
949
|
return lowerBuiltinCall(lowerer, expr, { module: projection.module, member: projection.member }, loc);
|
|
925
950
|
}
|
|
951
|
+
// A call through an immutable alias of an http/https client
|
|
952
|
+
// function (`const httpsRequest = https.request`).
|
|
953
|
+
if (projection?.kind === "client-function") {
|
|
954
|
+
return lowerHttpClientFnRefCall(lowerer, expr, { module: projection.module, member: projection.member }, loc);
|
|
955
|
+
}
|
|
926
956
|
// A call through a `const requestFn = tls ? https.request :
|
|
927
957
|
// http.request` binding (the client-function ternary): the http
|
|
928
958
|
// client lowering with the RUNTIME-secure dial.
|
|
@@ -941,6 +971,13 @@ export function lowerCall(lowerer, expr) {
|
|
|
941
971
|
const bi = lowerer.builtinImportOf(expr.expression);
|
|
942
972
|
if (bi)
|
|
943
973
|
return lowerBuiltinCall(lowerer, expr, bi, loc);
|
|
974
|
+
// A call through an alias of an http/https client function whose
|
|
975
|
+
// declaration is another module's (`import { request } from "./net"`).
|
|
976
|
+
{
|
|
977
|
+
const ref = httpClientFnRefOf(lowerer, expr.expression);
|
|
978
|
+
if (ref)
|
|
979
|
+
return lowerHttpClientFnRefCall(lowerer, expr, ref, loc);
|
|
980
|
+
}
|
|
944
981
|
// A constant bound to an assert method (`const ok = assert.ok`) called
|
|
945
982
|
// directly is that assertion, with the message Node quotes the call for.
|
|
946
983
|
{
|
|
@@ -1202,18 +1239,13 @@ export function lowerCall(lowerer, expr) {
|
|
|
1202
1239
|
}
|
|
1203
1240
|
}
|
|
1204
1241
|
// Expando member calls (`example.isFoo('test')` after `example.isFoo
|
|
1205
|
-
// = fn`):
|
|
1206
|
-
//
|
|
1242
|
+
// = fn`): the member read goes through the closure's own-property table
|
|
1243
|
+
// like any other member (lowering/callable-properties.ts); only the
|
|
1244
|
+
// source-order fence lives here (lower-expando.ts).
|
|
1207
1245
|
if ((ts.isPropertyAccessExpression(expr.expression) ||
|
|
1208
1246
|
ts.isElementAccessExpression(expr.expression)) &&
|
|
1209
1247
|
!expr.expression.questionDotToken) {
|
|
1210
|
-
|
|
1211
|
-
if (callee) {
|
|
1212
|
-
if (callee.type.kind !== "func")
|
|
1213
|
-
lowerer.badType(expr.expression, lowerer.typeOf(expr.expression));
|
|
1214
|
-
const args = completeFuncValueArgs(lowerer, expr, callee.type, loc);
|
|
1215
|
-
return { kind: "callValue", callee, args, type: callee.type.ret, loc };
|
|
1216
|
-
}
|
|
1248
|
+
fenceExpandoRead(lowerer, expr.expression);
|
|
1217
1249
|
}
|
|
1218
1250
|
// Namespace-qualified calls (`N.f(1)`, `A.B.g()`, calls through
|
|
1219
1251
|
// import= alias chains): the member resolves like a bare identifier —
|
|
@@ -1354,6 +1386,11 @@ export function lowerCall(lowerer, expr) {
|
|
|
1354
1386
|
const intrinsic =
|
|
1355
1387
|
// Checked-dynamic stream slots dispatch per value (dyn-streams.ts).
|
|
1356
1388
|
lowerDynStreamMemberCall(lowerer, expr, expr.expression) ??
|
|
1389
|
+
// A class member the program's JavaScript shadows on a typed handle
|
|
1390
|
+
// (`d.getTime = () => 42; d.getTime()`): the own property's call on
|
|
1391
|
+
// the handle's checked-dynamic box, before the typed method lowerings
|
|
1392
|
+
// below claim the name (handle-properties.ts).
|
|
1393
|
+
lowerHandleMemberCall(lowerer, expr, expr.expression) ??
|
|
1357
1394
|
fenceNodeModuleMutationCall(lowerer, expr, expr.expression) ??
|
|
1358
1395
|
// `f.apply(thisArg, args)` forwarding a fixed argument tuple (typed
|
|
1359
1396
|
// `arguments`, a tuple rest parameter): a direct call.
|
|
@@ -1604,6 +1641,11 @@ export function lowerCall(lowerer, expr) {
|
|
|
1604
1641
|
if (childCall)
|
|
1605
1642
|
return childCall;
|
|
1606
1643
|
}
|
|
1644
|
+
{
|
|
1645
|
+
const tableCall = lowerCallableMemberCall(lowerer, expr);
|
|
1646
|
+
if (tableCall)
|
|
1647
|
+
return tableCall;
|
|
1648
|
+
}
|
|
1607
1649
|
// The lib fence's METHOD-CALL chokepoint: a stdlib-declared member
|
|
1608
1650
|
// that every lowering above declined — an unlowered member
|
|
1609
1651
|
// (m.keys(), p.then(f), Object.keys(o)) or an unlowered call FORM of
|
|
@@ -1711,7 +1753,7 @@ export function lowerCall(lowerer, expr) {
|
|
|
1711
1753
|
kind: "dynCall",
|
|
1712
1754
|
callee,
|
|
1713
1755
|
receiver,
|
|
1714
|
-
calleeName:
|
|
1756
|
+
calleeName: v8CalleeText(access),
|
|
1715
1757
|
args: expr.arguments.nodes.map((arg) => lowerer.lowerExprExpecting(arg, DYN)),
|
|
1716
1758
|
type: DYN,
|
|
1717
1759
|
loc,
|
|
@@ -1737,6 +1779,12 @@ export function lowerCall(lowerer, expr) {
|
|
|
1737
1779
|
const memberName = ts.isNumericLiteral(expr.expression.argumentExpression)
|
|
1738
1780
|
? String(Number(expr.expression.argumentExpression.text))
|
|
1739
1781
|
: expr.expression.argumentExpression.text;
|
|
1782
|
+
// `d["getTime"]()` over a typed handle whose member the program shadows:
|
|
1783
|
+
// the own property's call on the checked-dynamic box, before the typed
|
|
1784
|
+
// member lowering below claims the name (handle-properties.ts).
|
|
1785
|
+
const shadowed = lowerHandleMemberCall(lowerer, expr, expr.expression, memberName);
|
|
1786
|
+
if (shadowed)
|
|
1787
|
+
return shadowed;
|
|
1740
1788
|
const receiverType = lowerer.mapTypeOf(lowerer.typeOf(expr.expression.expression));
|
|
1741
1789
|
if (receiverType?.kind === "object") {
|
|
1742
1790
|
const info = lowerer.classes.get(receiverType.className);
|
|
@@ -2000,12 +2048,9 @@ function lowerCallThroughValueRaw(lowerer, expr, callee, loc) {
|
|
|
2000
2048
|
lowerer.unsupported("SC1090", expr, "spread arguments in calls through 'unknown' values");
|
|
2001
2049
|
}
|
|
2002
2050
|
const args = expr.arguments.nodes.map((a) => lowerer.lowerExprExpecting(a, DYN));
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
: ts.isIdentifier(expr.expression)
|
|
2007
|
-
? expr.expression.text
|
|
2008
|
-
: "value";
|
|
2051
|
+
// V8 names the callee it could not call with the source spelling minus
|
|
2052
|
+
// the type-only syntax the running JavaScript never had.
|
|
2053
|
+
const calleeName = v8CalleeText(expr.expression);
|
|
2009
2054
|
return { kind: "dynCall", callee, calleeName, args, type: DYN, loc };
|
|
2010
2055
|
}
|
|
2011
2056
|
if (callee.type.kind === "union" &&
|
|
@@ -2062,7 +2107,7 @@ function lowerCallThroughValueRaw(lowerer, expr, callee, loc) {
|
|
|
2062
2107
|
!expr.arguments.nodes.some((a) => ts.isSpreadElement(a)) &&
|
|
2063
2108
|
canBoxFuncIntoDyn(callee.type, (id) => lowerer.shapes.get(id), (id) => lowerer.unions.get(id))) {
|
|
2064
2109
|
const args = expr.arguments.nodes.map((a) => lowerer.lowerExprExpecting(a, DYN));
|
|
2065
|
-
const calleeName =
|
|
2110
|
+
const calleeName = v8CalleeText(expr.expression);
|
|
2066
2111
|
const boxed = { kind: "dynFrom", value: callee, type: DYN, loc };
|
|
2067
2112
|
return { kind: "dynCall", callee: boxed, calleeName, args, type: DYN, loc };
|
|
2068
2113
|
}
|
|
@@ -2351,9 +2396,13 @@ function lowerNumberConstructorValue(lowerer, argNode, loc) {
|
|
|
2351
2396
|
const optionalNumber = lowerOptionalStringNumber(lowerer, arg, loc);
|
|
2352
2397
|
if (optionalNumber)
|
|
2353
2398
|
return optionalNumber;
|
|
2354
|
-
// A Date's number hint answers its time value.
|
|
2355
|
-
|
|
2399
|
+
// A Date's number hint answers its time value. The number hint reads
|
|
2400
|
+
// valueOf, which the program may have replaced with an own property this
|
|
2401
|
+
// typed path cannot see.
|
|
2402
|
+
if (arg.type.kind === "date") {
|
|
2403
|
+
refuseShadowedImplicitReader(lowerer, argNode, arg.type, "valueOf", "number conversion");
|
|
2356
2404
|
return { kind: "libCall", fn: "date.valueOf", args: [arg], type: F64, loc };
|
|
2405
|
+
}
|
|
2357
2406
|
// A program class instance converts through its own methods.
|
|
2358
2407
|
const classNumber = classToNumberConversion(lowerer, arg, argNode);
|
|
2359
2408
|
if (classNumber)
|
|
@@ -2752,7 +2801,9 @@ function lowerObjectOwnMethodCall(lowerer, call, access) {
|
|
|
2752
2801
|
return null;
|
|
2753
2802
|
if (!lowerer.isStdlibMember(access)) {
|
|
2754
2803
|
const receiver = tryLowerExpression(lowerer, access.expression);
|
|
2755
|
-
|
|
2804
|
+
// A typed handle in a program that adds properties to handles answers
|
|
2805
|
+
// from its own property table (scr_dyn_handle_props.c).
|
|
2806
|
+
if (receiver?.type.kind !== "dyn" && !boxedHandleReceiver(lowerer, receiver))
|
|
2756
2807
|
return null;
|
|
2757
2808
|
}
|
|
2758
2809
|
return lowerObjectOwnCall(lowerer, call, access.expression, call.arguments.nodes[0], call.arguments.nodes.slice(1), method, access);
|
|
@@ -2801,6 +2852,9 @@ methodAccess = null) {
|
|
|
2801
2852
|
stmts.push({ kind: "varDecl", localId: local.id, init: receiver, loc });
|
|
2802
2853
|
receiverRef = varRef(local.id, receiver.type, loc);
|
|
2803
2854
|
}
|
|
2855
|
+
// A typed handle in a program that adds properties to handles answers
|
|
2856
|
+
// from its own property table (scr_dyn_handle_props.c).
|
|
2857
|
+
const handleBox = boxedHandleReceiver(lowerer, receiverRef);
|
|
2804
2858
|
const rawKey = keyNode ? lowerer.lowerExpr(keyNode) : null;
|
|
2805
2859
|
let keyRef = rawKey;
|
|
2806
2860
|
if (rawKey && (isUnitType(rawKey.type) || rawKey.type.kind === "void")) {
|
|
@@ -2961,6 +3015,18 @@ methodAccess = null) {
|
|
|
2961
3015
|
: no;
|
|
2962
3016
|
result = { kind: "logical", op: "||", left: lengthOwn, right: indexOwn, type: BOOL, loc };
|
|
2963
3017
|
}
|
|
3018
|
+
else if (handleBox) {
|
|
3019
|
+
if (enumerable)
|
|
3020
|
+
result = {
|
|
3021
|
+
kind: "libCall",
|
|
3022
|
+
fn: "dyn.propertyIsEnumerable",
|
|
3023
|
+
args: [handleBox, key],
|
|
3024
|
+
type: BOOL,
|
|
3025
|
+
loc,
|
|
3026
|
+
};
|
|
3027
|
+
else
|
|
3028
|
+
result = { kind: "libCall", fn: "dyn.hasOwn", args: [handleBox, key], type: BOOL, loc };
|
|
3029
|
+
}
|
|
2964
3030
|
else if (type.kind === "f64" ||
|
|
2965
3031
|
type.kind === "bool" ||
|
|
2966
3032
|
type.kind === "bigint" ||
|
|
@@ -3150,6 +3216,14 @@ function lowerStringPrototypeCall(lowerer, call, access) {
|
|
|
3150
3216
|
if (receiverType.kind === "dyn") {
|
|
3151
3217
|
return lowerDynamicStringPrototypeCall(lowerer, call, methodAccess, receiverValue, method);
|
|
3152
3218
|
}
|
|
3219
|
+
// A symbol receiver is no String wrapper, and every method admitted above
|
|
3220
|
+
// begins with ToString(this): Node throws
|
|
3221
|
+
// "TypeError: Cannot convert a Symbol value to a string" after evaluating
|
|
3222
|
+
// the arguments. The dynamic string-method lowering performs exactly that
|
|
3223
|
+
// conversion, in that order.
|
|
3224
|
+
if (receiverType.kind === "symbol") {
|
|
3225
|
+
return lowerDynamicStringPrototypeCall(lowerer, call, methodAccess, lowerer.coerceToExpected(receiverValue, DYN), method);
|
|
3226
|
+
}
|
|
3153
3227
|
const padding = entry?.method === "padStart" || entry?.method === "padEnd";
|
|
3154
3228
|
const scalar = receiverType.kind === "string" ||
|
|
3155
3229
|
receiverType.kind === "f64" ||
|
|
@@ -3377,9 +3451,15 @@ function isFreshCallResult(node) {
|
|
|
3377
3451
|
* and calls it. Box the receiver into the checked-dynamic value and lower
|
|
3378
3452
|
* the read and the call dynamically, so the member lookup and the call stay
|
|
3379
3453
|
* checked (a missing member throws V8's own TypeError) and the result
|
|
3380
|
-
* crosses back through the expected type's checked conversion.
|
|
3381
|
-
*
|
|
3382
|
-
*
|
|
3454
|
+
* crosses back through the expected type's checked conversion.
|
|
3455
|
+
*
|
|
3456
|
+
* A non-object arm joins the union when it does not declare the member at
|
|
3457
|
+
* all (commander's `string | Command` from `name()`, whose JSDoc returns
|
|
3458
|
+
* both): calling the member there is the same "is not a function" TypeError
|
|
3459
|
+
* the dynamic call throws, so the result is Node-exact. An arm that DOES
|
|
3460
|
+
* declare it (a string's toUpperCase) stays fenced: the dynamic tier cannot
|
|
3461
|
+
* run a primitive's own methods, and calling through would throw where Node
|
|
3462
|
+
* succeeds. Null for anything else, leaving the method-call fence in place. */
|
|
3383
3463
|
function lowerUnionReceiverMethodCall(lowerer, call, access) {
|
|
3384
3464
|
if (access.questionDotToken || call.questionDotToken)
|
|
3385
3465
|
return null;
|
|
@@ -3389,9 +3469,8 @@ function lowerUnionReceiverMethodCall(lowerer, call, access) {
|
|
|
3389
3469
|
if (value?.type.kind !== "union")
|
|
3390
3470
|
return null;
|
|
3391
3471
|
const union = lowerer.unions.get(value.type.unionId);
|
|
3392
|
-
if (!union || !union.arms
|
|
3472
|
+
if (!union || !unionArmsDispatchMember(lowerer, union.arms, access))
|
|
3393
3473
|
return null;
|
|
3394
|
-
}
|
|
3395
3474
|
if (!lowerer.dynConvertible(value.type))
|
|
3396
3475
|
return null;
|
|
3397
3476
|
const loc = locOf(call);
|
|
@@ -3412,7 +3491,7 @@ function lowerUnionReceiverMethodCall(lowerer, call, access) {
|
|
|
3412
3491
|
kind: "dynCall",
|
|
3413
3492
|
callee: member,
|
|
3414
3493
|
receiver,
|
|
3415
|
-
calleeName:
|
|
3494
|
+
calleeName: v8CalleeText(access),
|
|
3416
3495
|
args: call.arguments.nodes.map((arg) => lowerer.lowerExprExpecting(arg, DYN)),
|
|
3417
3496
|
type: DYN,
|
|
3418
3497
|
loc,
|
|
@@ -3421,6 +3500,40 @@ function lowerUnionReceiverMethodCall(lowerer, call, access) {
|
|
|
3421
3500
|
loc,
|
|
3422
3501
|
};
|
|
3423
3502
|
}
|
|
3503
|
+
/** Primitive arms a union receiver may carry next to its object/record
|
|
3504
|
+
* arms (commander's `string | Command`): the dynamic value holds each one
|
|
3505
|
+
* as its own kind, so a member the arm does not have reads as undefined. */
|
|
3506
|
+
const UNION_RECEIVER_PRIMITIVE_ARMS = new Set([
|
|
3507
|
+
"string",
|
|
3508
|
+
"f64",
|
|
3509
|
+
"bool",
|
|
3510
|
+
"bigint",
|
|
3511
|
+
"undefinedT",
|
|
3512
|
+
"nullT",
|
|
3513
|
+
]);
|
|
3514
|
+
/** True when every arm of the receiver union can ride the dynamic call:
|
|
3515
|
+
* object and record arms always (the lookup and the call stay checked), and
|
|
3516
|
+
* a primitive arm only when its static type does not declare the member at
|
|
3517
|
+
* all — the call there is V8's "is not a function" TypeError, which the
|
|
3518
|
+
* dynamic call reproduces. An arm with the member (a string's toUpperCase)
|
|
3519
|
+
* keeps the fence: the dynamic tier cannot run a primitive's own methods. */
|
|
3520
|
+
function unionArmsDispatchMember(lowerer, arms, access) {
|
|
3521
|
+
if (arms.every((arm) => arm.kind === "object" || arm.kind === "record"))
|
|
3522
|
+
return true;
|
|
3523
|
+
if (!arms.every((arm) => arm.kind === "object" ||
|
|
3524
|
+
arm.kind === "record" ||
|
|
3525
|
+
UNION_RECEIVER_PRIMITIVE_ARMS.has(arm.kind)))
|
|
3526
|
+
return false;
|
|
3527
|
+
const receiver = lowerer.typeOf(access.expression);
|
|
3528
|
+
const parts = receiver.isUnionType() ? ts.constituentTypes(receiver) : [receiver];
|
|
3529
|
+
for (const part of parts) {
|
|
3530
|
+
if ((part.flags & ts.TypeFlags.Object) !== 0)
|
|
3531
|
+
continue;
|
|
3532
|
+
if (lowerer.checker.getPropertyOfType(part, access.name.text) !== undefined)
|
|
3533
|
+
return false;
|
|
3534
|
+
}
|
|
3535
|
+
return true;
|
|
3536
|
+
}
|
|
3424
3537
|
/** METHOD calls on dyn receivers (`pkg.name.replace(...)`, `rawName.split`,
|
|
3425
3538
|
* `ws.packages.filter(...)` — JSON.parse-derived values): validate the
|
|
3426
3539
|
* receiver's dyn kind, extract, and ride the STATIC method machinery — the
|
|
@@ -3535,7 +3648,7 @@ function lowerDynReceiverMethodCall(lowerer, call, access, boxTypedTemporary = f
|
|
|
3535
3648
|
kind: "dynCall",
|
|
3536
3649
|
callee: member,
|
|
3537
3650
|
receiver,
|
|
3538
|
-
calleeName:
|
|
3651
|
+
calleeName: v8CalleeText(access),
|
|
3539
3652
|
args: call.arguments.nodes.map((arg) => lowerer.lowerExprExpecting(arg, DYN)),
|
|
3540
3653
|
type: DYN,
|
|
3541
3654
|
loc,
|
|
@@ -3695,7 +3808,7 @@ function lowerDynReceiverMethodCall(lowerer, call, access, boxTypedTemporary = f
|
|
|
3695
3808
|
kind: "dynInvoke",
|
|
3696
3809
|
recv: value,
|
|
3697
3810
|
method: "normalize",
|
|
3698
|
-
calleeName:
|
|
3811
|
+
calleeName: v8CalleeText(access),
|
|
3699
3812
|
args: hasArgument ? [argument] : [],
|
|
3700
3813
|
type: DYN,
|
|
3701
3814
|
loc,
|
|
@@ -3957,7 +4070,7 @@ function lowerDynReceiverMethodCall(lowerer, call, access, boxTypedTemporary = f
|
|
|
3957
4070
|
kind: "dynCall",
|
|
3958
4071
|
callee,
|
|
3959
4072
|
receiver,
|
|
3960
|
-
calleeName:
|
|
4073
|
+
calleeName: v8CalleeText(access),
|
|
3961
4074
|
args,
|
|
3962
4075
|
type: DYN,
|
|
3963
4076
|
loc,
|
|
@@ -4070,7 +4183,7 @@ function lowerStringOrMemberCall(lowerer, call, access, recv) {
|
|
|
4070
4183
|
kind: "dynCall",
|
|
4071
4184
|
callee,
|
|
4072
4185
|
receiver,
|
|
4073
|
-
calleeName:
|
|
4186
|
+
calleeName: v8CalleeText(access),
|
|
4074
4187
|
args: args.map((arg) => lowerer.coerceToExpected(arg.value, DYN)),
|
|
4075
4188
|
type: DYN,
|
|
4076
4189
|
loc,
|
|
@@ -4498,7 +4611,7 @@ export function lowerDynDispatchMethodCall(lowerer, call, access, recv, arrayRec
|
|
|
4498
4611
|
kind: "dynInvoke",
|
|
4499
4612
|
recv: { kind: "varRef", localId: saved.id, type: DYN, loc: locOf(access.expression) },
|
|
4500
4613
|
method,
|
|
4501
|
-
calleeName:
|
|
4614
|
+
calleeName: v8CalleeText(access),
|
|
4502
4615
|
args: [dynUndefinedExpr(locOf(call.arguments.nodes[0]))],
|
|
4503
4616
|
type: DYN,
|
|
4504
4617
|
loc: locOf(call),
|
|
@@ -4533,7 +4646,7 @@ export function lowerDynDispatchMethodCall(lowerer, call, access, recv, arrayRec
|
|
|
4533
4646
|
kind: "dynInvoke",
|
|
4534
4647
|
recv,
|
|
4535
4648
|
method,
|
|
4536
|
-
calleeName:
|
|
4649
|
+
calleeName: v8CalleeText(access),
|
|
4537
4650
|
args,
|
|
4538
4651
|
type: DYN,
|
|
4539
4652
|
loc: locOf(call),
|
|
@@ -5094,7 +5207,7 @@ function lowerPrimitiveProtoCall(lowerer, call, recv, name, memberSym) {
|
|
|
5094
5207
|
kind: "dynInvoke",
|
|
5095
5208
|
recv: lowerer.coerceToExpected(operand, DYN),
|
|
5096
5209
|
method: name,
|
|
5097
|
-
calleeName: `${
|
|
5210
|
+
calleeName: `${v8CalleeText(recv)}.${name}`,
|
|
5098
5211
|
args: call.arguments.nodes.map((argument) => lowerer.lowerExprExpecting(argument, DYN)),
|
|
5099
5212
|
type: DYN,
|
|
5100
5213
|
loc: locOf(call),
|
|
@@ -5534,11 +5647,7 @@ export function lowerTaggedTemplate(lowerer, expr) {
|
|
|
5534
5647
|
loweredTemplateStrings(lowerer, expr, pieces.map((piece) => piece.text), loc, pieces.map(templateRawTextOf)),
|
|
5535
5648
|
...values.map((a) => lowerer.lowerExprExpecting(a, DYN)),
|
|
5536
5649
|
];
|
|
5537
|
-
const calleeName =
|
|
5538
|
-
? ts.getTextOfNode(expr.tag)
|
|
5539
|
-
: ts.isIdentifier(expr.tag)
|
|
5540
|
-
? expr.tag.text
|
|
5541
|
-
: "value";
|
|
5650
|
+
const calleeName = v8CalleeText(expr.tag);
|
|
5542
5651
|
return { kind: "dynCall", callee, calleeName, args, type: DYN, loc };
|
|
5543
5652
|
}
|
|
5544
5653
|
lowerer.unsupported("SC1090", expr, "tagged templates with this tag form (top-level functions and dynamic values tag; call the function directly otherwise)");
|
|
@@ -5840,7 +5949,7 @@ export function lowerPromiseMethodCall(lowerer, call, access) {
|
|
|
5840
5949
|
kind: "dynInvoke",
|
|
5841
5950
|
recv: lowerer.coerceToExpected(receiver, DYN),
|
|
5842
5951
|
method: "then",
|
|
5843
|
-
calleeName:
|
|
5952
|
+
calleeName: v8CalleeText(access),
|
|
5844
5953
|
args: [
|
|
5845
5954
|
lowerer.lowerExprExpecting(fulfilledNode, DYN),
|
|
5846
5955
|
lowerer.lowerExprExpecting(rejectedNode, DYN),
|
|
@@ -6288,7 +6397,7 @@ export function lowerPromiseMethodCall(lowerer, call, access) {
|
|
|
6288
6397
|
kind: "dynInvoke",
|
|
6289
6398
|
recv: lowerer.coerceToExpected(receiver, DYN),
|
|
6290
6399
|
method: "finally",
|
|
6291
|
-
calleeName:
|
|
6400
|
+
calleeName: v8CalleeText(access),
|
|
6292
6401
|
args: [lowerer.coerceToExpected(cb, DYN)],
|
|
6293
6402
|
type: DYN,
|
|
6294
6403
|
loc,
|
|
@@ -6498,12 +6607,6 @@ export function lowerPromiseMethodCall(lowerer, call, access) {
|
|
|
6498
6607
|
if (param && (!ts.isIdentifier(param.name) || param.dotDotDotToken || param.initializer)) {
|
|
6499
6608
|
lowerer.unsupported("SC1062", param);
|
|
6500
6609
|
}
|
|
6501
|
-
if (param?.type &&
|
|
6502
|
-
param.type.kind !== ts.SyntaxKind.AnyKeyword &&
|
|
6503
|
-
param.type.kind !== ts.SyntaxKind.UnknownKeyword) {
|
|
6504
|
-
lowerer.unsupported("SC1090", param, "catch handlers with a typed parameter (the reject payload can be any thrown " +
|
|
6505
|
-
"value — take `(e)` or `(e: unknown)` and narrow with instanceof)");
|
|
6506
|
-
}
|
|
6507
6610
|
const resultT = callResultType();
|
|
6508
6611
|
if (resultT?.kind !== "promise") {
|
|
6509
6612
|
lowerer.noLowering("catch with this handler's result type", call, "the combined result must be representable — a handler with no return value over a " +
|
|
@@ -6531,13 +6634,61 @@ export function lowerPromiseMethodCall(lowerer, call, access) {
|
|
|
6531
6634
|
]
|
|
6532
6635
|
: [{ kind: "return", value: lowerer.coerceInto(call, awaitE, R), loc }];
|
|
6533
6636
|
// The handler body lowers as the catch clause, its parameter bound
|
|
6534
|
-
// as the CAUGHT local — exactly `catch (e) { ... }`.
|
|
6637
|
+
// as the CAUGHT local — exactly `catch (e) { ... }`. An ANNOTATED
|
|
6638
|
+
// parameter (`.catch((error: Error) => ...)`) is a claim the checker
|
|
6639
|
+
// cannot verify — the reject payload is whatever was thrown — so it
|
|
6640
|
+
// is never trusted: the snapshot binds as a hidden CAUGHT local and
|
|
6641
|
+
// the parameter as an ordinary local of the claimed class, converted
|
|
6642
|
+
// by the checked extraction (`caughtCheck`: an instanceof match
|
|
6643
|
+
// extracts the payload, anything else raises the catchable TypeError
|
|
6644
|
+
// at handler entry). Reads inside the handler are then plain typed
|
|
6645
|
+
// reads of a verified value.
|
|
6535
6646
|
let catchLocalId = null;
|
|
6647
|
+
let claimInit = null;
|
|
6536
6648
|
let catchBody;
|
|
6537
6649
|
lowerer.scopes.push(new Map());
|
|
6538
6650
|
try {
|
|
6539
6651
|
if (param && ts.isIdentifier(param.name)) {
|
|
6540
|
-
|
|
6652
|
+
const claim = param.type;
|
|
6653
|
+
const annotated = claim !== undefined &&
|
|
6654
|
+
claim.kind !== ts.SyntaxKind.AnyKeyword &&
|
|
6655
|
+
claim.kind !== ts.SyntaxKind.UnknownKeyword;
|
|
6656
|
+
if (annotated) {
|
|
6657
|
+
const target = lowerer.mapTypeOf(lowerer.checker.getTypeFromTypeNode(claim));
|
|
6658
|
+
const info = target?.kind === "object" ? lowerer.classes.get(target.className) : undefined;
|
|
6659
|
+
if (target === null || target.kind !== "object" || info === undefined) {
|
|
6660
|
+
lowerer.unsupported("SC1090", claim, "catch parameters annotated with a type other than a class (the reject payload " +
|
|
6661
|
+
"is whatever was thrown, so an annotation is a claim the checker cannot " +
|
|
6662
|
+
"verify — it is accepted only as a checked conversion against a class) — take " +
|
|
6663
|
+
"`(e)` and narrow with instanceof, or assert `e as C` inside the handler");
|
|
6664
|
+
}
|
|
6665
|
+
const snapshot = lowerer.declareHiddenLocal("%catch", CAUGHT);
|
|
6666
|
+
catchLocalId = snapshot.id;
|
|
6667
|
+
const local = lowerer.declareLocal(param.name, param.name.text, target, false);
|
|
6668
|
+
const caught = { kind: "varRef", localId: snapshot.id, type: CAUGHT, loc };
|
|
6669
|
+
// caughtCheck tests the class's preorder interval, which only
|
|
6670
|
+
// classes in an inheritance relation have; a standalone class
|
|
6671
|
+
// converts the payload as an untyped value, whose checked
|
|
6672
|
+
// conversion recovers a thrown instance and raises a catchable
|
|
6673
|
+
// TypeError for anything else.
|
|
6674
|
+
claimInit = {
|
|
6675
|
+
kind: "varDecl",
|
|
6676
|
+
localId: local.id,
|
|
6677
|
+
init: lowerer.inHierarchy(info)
|
|
6678
|
+
? {
|
|
6679
|
+
kind: "caughtCheck",
|
|
6680
|
+
value: caught,
|
|
6681
|
+
className: target.className,
|
|
6682
|
+
type: target,
|
|
6683
|
+
loc,
|
|
6684
|
+
}
|
|
6685
|
+
: lowerer.coerceToExpected({ kind: "caughtToDyn", value: caught, type: DYN, loc }, target),
|
|
6686
|
+
loc,
|
|
6687
|
+
};
|
|
6688
|
+
}
|
|
6689
|
+
else {
|
|
6690
|
+
catchLocalId = lowerer.declareLocal(param.name, param.name.text, CAUGHT, false).id;
|
|
6691
|
+
}
|
|
6541
6692
|
}
|
|
6542
6693
|
const hb = handlerNode.body;
|
|
6543
6694
|
if (ts.isBlock(hb)) {
|
|
@@ -6558,6 +6709,8 @@ export function lowerPromiseMethodCall(lowerer, call, access) {
|
|
|
6558
6709
|
finally {
|
|
6559
6710
|
lowerer.scopes.pop();
|
|
6560
6711
|
}
|
|
6712
|
+
if (claimInit !== null)
|
|
6713
|
+
catchBody.unshift(claimInit);
|
|
6561
6714
|
// A handler falling off its end resolves with undefined — the
|
|
6562
6715
|
// checker already typed R with the undefined arm; the appended wrap
|
|
6563
6716
|
// also satisfies the validator's always-returns analysis.
|
|
@@ -7822,9 +7975,12 @@ function lowerObjectStaticCall(lowerer, call, access) {
|
|
|
7822
7975
|
const onError = lowerObjectAssignOntoError(lowerer, call);
|
|
7823
7976
|
if (onError)
|
|
7824
7977
|
return onError;
|
|
7825
|
-
|
|
7826
|
-
|
|
7827
|
-
|
|
7978
|
+
// `Object.assign(fn, ...)` on a TYPED callable: the source keys land on
|
|
7979
|
+
// the closure's own-property table and the expression is that function
|
|
7980
|
+
// (one representation — no record stands for it).
|
|
7981
|
+
const callableAssign = lowerCallableAssign(lowerer, call);
|
|
7982
|
+
if (callableAssign)
|
|
7983
|
+
return callableAssign;
|
|
7828
7984
|
// `Object.assign({}, lit)` — an EMPTY fresh-literal target and one
|
|
7829
7985
|
// object-literal source: the result is a fresh object carrying
|
|
7830
7986
|
// exactly the source literal's properties, which IS the source
|
|
@@ -8179,6 +8335,13 @@ function lowerObjectStaticCall(lowerer, call, access) {
|
|
|
8179
8335
|
const descriptorPrimitive = member === "getOwnPropertyDescriptor" &&
|
|
8180
8336
|
target &&
|
|
8181
8337
|
(target.type.kind === "bool" || target.type.kind === "f64" || target.type.kind === "string");
|
|
8338
|
+
// A typed handle target in a program that adds properties to handles:
|
|
8339
|
+
// its property table answers (scr_dyn_handle_props.c).
|
|
8340
|
+
if (target && target.type.kind !== "dyn") {
|
|
8341
|
+
const boxed = boxedHandleReceiver(lowerer, target);
|
|
8342
|
+
if (boxed)
|
|
8343
|
+
target = boxed;
|
|
8344
|
+
}
|
|
8182
8345
|
if (!target || (target.type.kind !== "dyn" && !isUnitType(target.type) && !descriptorPrimitive))
|
|
8183
8346
|
return null;
|
|
8184
8347
|
if (target.type.kind !== "dyn")
|
|
@@ -8258,6 +8421,13 @@ function lowerObjectStaticCall(lowerer, call, access) {
|
|
|
8258
8421
|
lowerer.dynConvertible(target.type)))) {
|
|
8259
8422
|
target = { kind: "dynFrom", value: target, type: DYN, loc: locOf(call.arguments.nodes[0]) };
|
|
8260
8423
|
}
|
|
8424
|
+
// A typed handle target in a program that adds properties to handles:
|
|
8425
|
+
// its property table answers (scr_dyn_handle_props.c).
|
|
8426
|
+
if (target && target.type.kind !== "dyn") {
|
|
8427
|
+
const boxed = boxedHandleReceiver(lowerer, target);
|
|
8428
|
+
if (boxed)
|
|
8429
|
+
target = boxed;
|
|
8430
|
+
}
|
|
8261
8431
|
if (target?.type.kind === "dyn") {
|
|
8262
8432
|
const descs = lowerer.lowerExprExpecting(call.arguments.nodes[1], DYN);
|
|
8263
8433
|
if (descs.type.kind === "dyn") {
|
|
@@ -8303,6 +8473,29 @@ function lowerObjectStaticCall(lowerer, call, access) {
|
|
|
8303
8473
|
const fnIntegrity = functionIntegrity(lowerer, member, value, call.arguments.nodes[0], locOf(call));
|
|
8304
8474
|
if (fnIntegrity)
|
|
8305
8475
|
return fnIntegrity;
|
|
8476
|
+
// A typed handle in a program that adds properties to handles: the
|
|
8477
|
+
// table holds the integrity state, so the checked-dynamic entries
|
|
8478
|
+
// answer (scr_dyn_handle_props.c). The queries are the hook-carrying
|
|
8479
|
+
// entries; with the table installed they answer from it.
|
|
8480
|
+
{
|
|
8481
|
+
const boxed = boxedHandleReceiver(lowerer, value);
|
|
8482
|
+
if (boxed) {
|
|
8483
|
+
const operation = {
|
|
8484
|
+
preventExtensions: "dyn.preventExtensions",
|
|
8485
|
+
isExtensible: "dyn.isExtensibleQuery",
|
|
8486
|
+
seal: "dyn.seal",
|
|
8487
|
+
isSealed: "dyn.isSealedQuery",
|
|
8488
|
+
};
|
|
8489
|
+
const query = member.startsWith("is");
|
|
8490
|
+
return {
|
|
8491
|
+
kind: "libCall",
|
|
8492
|
+
fn: operation[member],
|
|
8493
|
+
args: [boxed],
|
|
8494
|
+
type: query ? BOOL : DYN,
|
|
8495
|
+
loc: locOf(call),
|
|
8496
|
+
};
|
|
8497
|
+
}
|
|
8498
|
+
}
|
|
8306
8499
|
// A Map or Set has no own properties: freeze, seal and preventExtensions
|
|
8307
8500
|
// all only make it not extensible.
|
|
8308
8501
|
if (value.type.kind === "map" || value.type.kind === "set") {
|
|
@@ -8378,7 +8571,15 @@ function lowerObjectStaticCall(lowerer, call, access) {
|
|
|
8378
8571
|
// reference would need a runtime frozen bit (strict mode throws).
|
|
8379
8572
|
if (member === "isFrozen" && call.arguments.nodes.length === 1) {
|
|
8380
8573
|
const argNode = call.arguments.nodes[0];
|
|
8381
|
-
const
|
|
8574
|
+
const probed = tryLowerExpression(lowerer, argNode);
|
|
8575
|
+
// A typed handle in a program that adds properties to handles: the
|
|
8576
|
+
// table holds the integrity state (scr_dyn_handle_props.c).
|
|
8577
|
+
{
|
|
8578
|
+
const boxed = boxedHandleReceiver(lowerer, probed);
|
|
8579
|
+
if (boxed)
|
|
8580
|
+
return { kind: "libCall", fn: "dyn.isFrozen", args: [boxed], type: BOOL, loc: locOf(call) };
|
|
8581
|
+
}
|
|
8582
|
+
const probedKind = probed?.type.kind;
|
|
8382
8583
|
if (probedKind === "record" ||
|
|
8383
8584
|
probedKind === "array" ||
|
|
8384
8585
|
probedKind === "map" ||
|
|
@@ -8429,6 +8630,13 @@ function lowerObjectStaticCall(lowerer, call, access) {
|
|
|
8429
8630
|
noteUntypedIntegrity(lowerer, argNode);
|
|
8430
8631
|
return { kind: "libCall", fn: "dyn.freeze", args: [value], type: DYN, loc: locOf(call) };
|
|
8431
8632
|
}
|
|
8633
|
+
// A typed handle in a program that adds properties to handles freezes
|
|
8634
|
+
// its own property table (scr_dyn_handle_props.c).
|
|
8635
|
+
{
|
|
8636
|
+
const boxed = boxedHandleReceiver(lowerer, value);
|
|
8637
|
+
if (boxed)
|
|
8638
|
+
return { kind: "libCall", fn: "dyn.freeze", args: [boxed], type: DYN, loc: locOf(call) };
|
|
8639
|
+
}
|
|
8432
8640
|
if (ts.isObjectLiteralExpression(inner) || ts.isArrayLiteralExpression(inner)) {
|
|
8433
8641
|
// A fresh literal can still reach untyped code, which observes and
|
|
8434
8642
|
// must honor its frozen state: records and arrays keep the bit.
|
|
@@ -8695,18 +8903,22 @@ function lowerObjectStaticCall(lowerer, call, access) {
|
|
|
8695
8903
|
// An array walks its live view: the present indices, then its numeric
|
|
8696
8904
|
// and named properties.
|
|
8697
8905
|
const isArray = probed?.type.kind === "array" && lowerer.dynConvertible(probed.type);
|
|
8906
|
+
// A typed handle in a program that adds properties to handles reads its
|
|
8907
|
+
// own property table through the checked-dynamic walk.
|
|
8908
|
+
const isHandle = probed ? boxedHandleReceiver(lowerer, probed) : null;
|
|
8698
8909
|
if (isDyn ||
|
|
8699
8910
|
isPrimitive ||
|
|
8700
8911
|
isFunction ||
|
|
8701
8912
|
isJsUnion ||
|
|
8702
8913
|
isArray ||
|
|
8914
|
+
isHandle !== null ||
|
|
8703
8915
|
(probed && isDynTypedRefType(probed.type))) {
|
|
8704
8916
|
const fn = member === "keys"
|
|
8705
8917
|
? "dyn.objKeys"
|
|
8706
8918
|
: member === "values"
|
|
8707
8919
|
? "dyn.objValues"
|
|
8708
8920
|
: "dyn.objEntries";
|
|
8709
|
-
let v = lowerer.lowerExpr(argNode);
|
|
8921
|
+
let v = isHandle ?? lowerer.lowerExpr(argNode);
|
|
8710
8922
|
if (v.type.kind !== "dyn")
|
|
8711
8923
|
v = {
|
|
8712
8924
|
kind: "dynFrom",
|
|
@@ -8902,9 +9114,33 @@ function lowerObjectStaticCall(lowerer, call, access) {
|
|
|
8902
9114
|
if (tag >= 0) {
|
|
8903
9115
|
return { kind: "unionWrap", unionId: valueT.unionId, tag, value, type: valueT, loc };
|
|
8904
9116
|
}
|
|
9117
|
+
// A field value the element union has no arm for, but which
|
|
9118
|
+
// WIDTH-LIFTS into one: a concrete record field enumerated
|
|
9119
|
+
// against a checker-typed element that is a shared record's
|
|
9120
|
+
// union of layouts (a table of metric definitions whose value
|
|
9121
|
+
// type is the declared `counter | histogram` shape, a settings
|
|
9122
|
+
// map whose declared value type is the option record). The
|
|
9123
|
+
// lift picks the arm and copies the value into it — the same
|
|
9124
|
+
// conversion coerceToExpected applies at a union slot.
|
|
9125
|
+
const lift = lowerer.widthLiftPlan(vt, valueT);
|
|
9126
|
+
if (lift)
|
|
9127
|
+
return lowerer.applyWidthLift(lift, value, valueT, loc);
|
|
8905
9128
|
}
|
|
8906
9129
|
return null;
|
|
8907
9130
|
};
|
|
9131
|
+
// A field whose own type is a union (`ColorValue` = `string | number`)
|
|
9132
|
+
// flows into a result element union that may be wider: `Object.entries`
|
|
9133
|
+
// over a record with optional fields yields `string | number |
|
|
9134
|
+
// undefined` for every key. That is the same conversion an assignment
|
|
9135
|
+
// of the value to such a slot performs, so it re-tags at runtime
|
|
9136
|
+
// through the interned helper; an arm the destination cannot take
|
|
9137
|
+
// still refuses with the flat story.
|
|
9138
|
+
const retagInto = (from) => {
|
|
9139
|
+
if (!valueT || valueT.kind !== "union")
|
|
9140
|
+
return null;
|
|
9141
|
+
const helper = lowerer.unionRetagHelper(from.unionId, valueT.unionId, loc);
|
|
9142
|
+
return helper ? { kind: "call", callee: helper, args: [raw], type: valueT, loc } : null;
|
|
9143
|
+
};
|
|
8908
9144
|
// Undefined-armed fields: the push is guarded by the field's
|
|
8909
9145
|
// presence; a narrowed push re-tags the non-undefined arm.
|
|
8910
9146
|
let guardUndefTag = null;
|
|
@@ -8943,13 +9179,22 @@ function lowerObjectStaticCall(lowerer, call, access) {
|
|
|
8943
9179
|
};
|
|
8944
9180
|
}
|
|
8945
9181
|
else {
|
|
8946
|
-
|
|
9182
|
+
const retagged = retagInto(f.type);
|
|
9183
|
+
if (!retagged)
|
|
9184
|
+
return `field '${f.name}' is a multi-arm union that cannot re-tag into the result element type`;
|
|
9185
|
+
value = retagged;
|
|
9186
|
+
vt = valueT;
|
|
8947
9187
|
}
|
|
8948
9188
|
}
|
|
8949
|
-
else if (valueT?.kind !== "dyn" &&
|
|
8950
|
-
|
|
8951
|
-
|
|
8952
|
-
|
|
9189
|
+
else if (valueT?.kind !== "dyn" && !typeEquals(f.type, valueT ?? f.type)) {
|
|
9190
|
+
const retagged = retagInto(f.type);
|
|
9191
|
+
if (retagged) {
|
|
9192
|
+
value = retagged;
|
|
9193
|
+
vt = valueT;
|
|
9194
|
+
}
|
|
9195
|
+
else if (!(valueT?.kind === "union" && lowerer.unionRetagMappable(f.type.unionId, valueT.unionId))) {
|
|
9196
|
+
return `field '${f.name}' is a union that cannot re-tag into the result element type`;
|
|
9197
|
+
}
|
|
8953
9198
|
}
|
|
8954
9199
|
}
|
|
8955
9200
|
const coerced = elemOf(value, vt);
|
|
@@ -9033,6 +9278,17 @@ function lowerObjectStaticCall(lowerer, call, access) {
|
|
|
9033
9278
|
loc,
|
|
9034
9279
|
};
|
|
9035
9280
|
}
|
|
9281
|
+
else if (f.optional === true && f.type.kind === "dyn") {
|
|
9282
|
+
// An optional checked-dynamic field with the ABSENT marker
|
|
9283
|
+
// contributes no key either.
|
|
9284
|
+
stmt = {
|
|
9285
|
+
kind: "if",
|
|
9286
|
+
cond: lowerer.recordFieldPresent(obj, shapeId, f.name, loc),
|
|
9287
|
+
then: [stmt],
|
|
9288
|
+
else_: null,
|
|
9289
|
+
loc,
|
|
9290
|
+
};
|
|
9291
|
+
}
|
|
9036
9292
|
return stmt;
|
|
9037
9293
|
};
|
|
9038
9294
|
// The walk that pushes the fields of `obj` (of `current`) into out.0,
|
|
@@ -9236,70 +9492,6 @@ function runtimeOptionalEntriesType(lowerer, record, resultT) {
|
|
|
9236
9492
|
* ordinary indirect call through the field's closure value. Deliberately
|
|
9237
9493
|
* record-only — calling a func-typed CLASS field stays rejected (the
|
|
9238
9494
|
* generic method-call rejection in lowerCall). */
|
|
9239
|
-
/** `Object.assign(fn, { bold, ... })` → a HYBRID record literal: the
|
|
9240
|
-
* reserved %call field takes the function, each source object literal's
|
|
9241
|
-
* properties fill their declared fields (later sources override, JS's
|
|
9242
|
-
* last-write-wins — one entry per name, source values still evaluate in
|
|
9243
|
-
* order through the literal lowering's shared rules). Bounded to the
|
|
9244
|
-
* chalk shape on purpose: the RESULT type must map to a %call-carrying
|
|
9245
|
-
* record, sources must be plain object literals (an `as` cast unwraps),
|
|
9246
|
-
* and every declared field must be filled. REPRESENTATION NOTE
|
|
9247
|
-
* (SEMANTICS.md): the result is a FRESH record, not the mutated `fn` —
|
|
9248
|
-
* `assigned === fn` is false here where JS answers true, and `typeof`
|
|
9249
|
-
* would answer object; portless's colors.ts never observes either.
|
|
9250
|
-
* Null (→ the stdlib fence) for every other Object.assign form. */
|
|
9251
|
-
function lowerObjectAssignHybrid(lowerer, call) {
|
|
9252
|
-
const mapped = lowerer.mapTypeOf(lowerer.typeOf(call));
|
|
9253
|
-
if (mapped?.kind !== "record")
|
|
9254
|
-
return null;
|
|
9255
|
-
const shape = lowerer.shapes.get(mapped.shapeId);
|
|
9256
|
-
const callField = shape?.fields.find((f) => f.name === "%call");
|
|
9257
|
-
if (!shape || !callField || callField.type.kind !== "func")
|
|
9258
|
-
return null;
|
|
9259
|
-
if (call.arguments.nodes.length < 2 || call.arguments.nodes.some((a) => ts.isSpreadElement(a)))
|
|
9260
|
-
return null;
|
|
9261
|
-
const loc = locOf(call);
|
|
9262
|
-
const values = new Map();
|
|
9263
|
-
values.set("%call", lowerer.lowerExprExpecting(call.arguments.nodes[0], callField.type));
|
|
9264
|
-
for (const argNode of call.arguments.nodes.slice(1)) {
|
|
9265
|
-
let src = argNode;
|
|
9266
|
-
while (ts.isParenthesizedExpression(src) || ts.isAsExpression(src) || ts.isTypeAssertion(src))
|
|
9267
|
-
src = src.expression;
|
|
9268
|
-
if (!ts.isObjectLiteralExpression(src)) {
|
|
9269
|
-
lowerer.unsupported("SC1090", argNode, "Object.assign sources other than plain object literals when building a function-with-properties value");
|
|
9270
|
-
}
|
|
9271
|
-
for (const prop of src.properties.nodes) {
|
|
9272
|
-
const nameOk = (ts.isPropertyAssignment(prop) || ts.isShorthandPropertyAssignment(prop)) &&
|
|
9273
|
-
(ts.isIdentifier(prop.name) || ts.isStringLiteral(prop.name));
|
|
9274
|
-
if (!nameOk) {
|
|
9275
|
-
lowerer.unsupported("SC1090", prop, "this property form in an Object.assign source building a function-with-properties value");
|
|
9276
|
-
}
|
|
9277
|
-
const name = prop.name.text;
|
|
9278
|
-
const fieldType = shape.fields.find((f) => f.name === name)?.type;
|
|
9279
|
-
if (!fieldType) {
|
|
9280
|
-
lowerer.unsupported("SC1090", prop, `the property '${name}' missing from the assigned result type '${lowerer.fmt(mapped)}'`);
|
|
9281
|
-
}
|
|
9282
|
-
const value = ts.isPropertyAssignment(prop)
|
|
9283
|
-
? lowerer.lowerExprExpecting(prop.initializer, fieldType)
|
|
9284
|
-
: lowerer.coerceInto(prop, lowerer.lowerShorthandValue(prop), fieldType);
|
|
9285
|
-
values.set(name, value);
|
|
9286
|
-
}
|
|
9287
|
-
}
|
|
9288
|
-
const fields = [];
|
|
9289
|
-
for (const f of shape.fields) {
|
|
9290
|
-
const v = values.get(f.name);
|
|
9291
|
-
if (!v) {
|
|
9292
|
-
const absent = lowerer.absentFieldValue(f.type, loc);
|
|
9293
|
-
if (!absent) {
|
|
9294
|
-
lowerer.unsupported("SC1090", call, `Object.assign leaving the required field '${f.name}' of '${lowerer.fmt(mapped)}' unfilled`);
|
|
9295
|
-
}
|
|
9296
|
-
fields.push({ name: f.name, value: absent });
|
|
9297
|
-
continue;
|
|
9298
|
-
}
|
|
9299
|
-
fields.push({ name: f.name, value: v });
|
|
9300
|
-
}
|
|
9301
|
-
return { kind: "recordLit", fields, type: mapped, loc };
|
|
9302
|
-
}
|
|
9303
9495
|
/** The accessed member is an overload set (isOverloadedCallableMemberType),
|
|
9304
9496
|
* also under an optional chain whose access still spells `| undefined`. */
|
|
9305
9497
|
function isOverloadedMemberAccess(lowerer, access) {
|
|
@@ -9406,7 +9598,7 @@ export function lowerRecordFieldCall(lowerer, call, access) {
|
|
|
9406
9598
|
kind: "dynCall",
|
|
9407
9599
|
callee,
|
|
9408
9600
|
...(receiver ? { receiver } : {}),
|
|
9409
|
-
calleeName:
|
|
9601
|
+
calleeName: v8CalleeText(access),
|
|
9410
9602
|
args: call.arguments.nodes.map((arg) => lowerer.lowerExprExpecting(arg, DYN)),
|
|
9411
9603
|
type: DYN,
|
|
9412
9604
|
loc,
|
|
@@ -9929,7 +10121,7 @@ function lowerObjLitGenericMethodCall(lowerer, call, access) {
|
|
|
9929
10121
|
kind: "dynInvoke",
|
|
9930
10122
|
recv: value.type.kind === "dyn" ? value : { kind: "dynFrom", value, type: DYN, loc },
|
|
9931
10123
|
method: name,
|
|
9932
|
-
calleeName:
|
|
10124
|
+
calleeName: v8CalleeText(access),
|
|
9933
10125
|
args: call.arguments.nodes.map((arg) => lowerer.lowerExprExpecting(arg, DYN)),
|
|
9934
10126
|
type: DYN,
|
|
9935
10127
|
loc,
|
|
@@ -9942,7 +10134,7 @@ function lowerObjLitGenericMethodCall(lowerer, call, access) {
|
|
|
9942
10134
|
kind: "dynInvoke",
|
|
9943
10135
|
recv: childMethod,
|
|
9944
10136
|
method: name,
|
|
9945
|
-
calleeName:
|
|
10137
|
+
calleeName: v8CalleeText(access),
|
|
9946
10138
|
args: call.arguments.nodes.map((arg) => lowerer.lowerExprExpecting(arg, DYN)),
|
|
9947
10139
|
type: DYN,
|
|
9948
10140
|
loc,
|
|
@@ -9974,7 +10166,7 @@ function lowerObjLitGenericMethodCall(lowerer, call, access) {
|
|
|
9974
10166
|
kind: "dynInvoke",
|
|
9975
10167
|
recv: receiver,
|
|
9976
10168
|
method: name,
|
|
9977
|
-
calleeName:
|
|
10169
|
+
calleeName: v8CalleeText(access),
|
|
9978
10170
|
args: call.arguments.nodes.map((arg) => lowerer.lowerExprExpecting(arg, DYN)),
|
|
9979
10171
|
type: DYN,
|
|
9980
10172
|
loc,
|
|
@@ -10216,7 +10408,7 @@ export function lowerObjectMethodCall(lowerer, call, access) {
|
|
|
10216
10408
|
kind: "dynCall",
|
|
10217
10409
|
callee: boxed,
|
|
10218
10410
|
...receiver,
|
|
10219
|
-
calleeName:
|
|
10411
|
+
calleeName: v8CalleeText(access),
|
|
10220
10412
|
args,
|
|
10221
10413
|
type: DYN,
|
|
10222
10414
|
loc,
|
|
@@ -10234,7 +10426,7 @@ export function lowerObjectMethodCall(lowerer, call, access) {
|
|
|
10234
10426
|
kind: "dynCall",
|
|
10235
10427
|
callee,
|
|
10236
10428
|
...receiver,
|
|
10237
|
-
calleeName:
|
|
10429
|
+
calleeName: v8CalleeText(access),
|
|
10238
10430
|
args,
|
|
10239
10431
|
type: DYN,
|
|
10240
10432
|
loc,
|
|
@@ -10270,7 +10462,7 @@ export function lowerObjectMethodCall(lowerer, call, access) {
|
|
|
10270
10462
|
kind: "dynCall",
|
|
10271
10463
|
callee,
|
|
10272
10464
|
receiver,
|
|
10273
|
-
calleeName:
|
|
10465
|
+
calleeName: v8CalleeText(access),
|
|
10274
10466
|
args: call.arguments.nodes.map((arg) => lowerer.lowerExprExpecting(arg, DYN)),
|
|
10275
10467
|
type: DYN,
|
|
10276
10468
|
loc,
|
|
@@ -10442,7 +10634,7 @@ function lowerUnionObjectMethodCall(lowerer, call, access, receiverT) {
|
|
|
10442
10634
|
kind: "dynCall",
|
|
10443
10635
|
callee,
|
|
10444
10636
|
receiver,
|
|
10445
|
-
calleeName:
|
|
10637
|
+
calleeName: v8CalleeText(access),
|
|
10446
10638
|
args: call.arguments.nodes.map((arg) => lowerer.lowerExprExpecting(arg, DYN)),
|
|
10447
10639
|
type: DYN,
|
|
10448
10640
|
loc,
|
|
@@ -10579,7 +10771,7 @@ function lowerUnionObjectDynFieldCall(lowerer, call, access, receiverT) {
|
|
|
10579
10771
|
kind: "dynCall",
|
|
10580
10772
|
callee,
|
|
10581
10773
|
receiver: lowerer.coerceToExpected(receiverRef, DYN),
|
|
10582
|
-
calleeName:
|
|
10774
|
+
calleeName: v8CalleeText(access),
|
|
10583
10775
|
args,
|
|
10584
10776
|
type: DYN,
|
|
10585
10777
|
loc,
|
|
@@ -11292,7 +11484,7 @@ function lowerEmitterMethodValueCall(lowerer, call, access) {
|
|
|
11292
11484
|
loc,
|
|
11293
11485
|
},
|
|
11294
11486
|
method: "call",
|
|
11295
|
-
calleeName:
|
|
11487
|
+
calleeName: v8CalleeText(access),
|
|
11296
11488
|
args: args.map((arg) => lowerer.lowerExprExpecting(arg, DYN)),
|
|
11297
11489
|
type: DYN,
|
|
11298
11490
|
loc,
|