@scriptc/compiler 0.4.0 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ambient/scriptc-node-fallback.d.ts +35 -5
- package/dist/backend/executable-features.js +7 -0
- package/dist/backend/executable-features.js.map +1 -1
- package/dist/backend/library-pack.js +3 -0
- package/dist/backend/library-pack.js.map +1 -1
- package/dist/backend/link-plan-core.d.ts +2 -0
- package/dist/backend/link-plan-core.js +2 -0
- package/dist/backend/link-plan-core.js.map +1 -1
- package/dist/backend/link-plan.d.ts +1 -0
- package/dist/backend/link-plan.js +1 -0
- package/dist/backend/link-plan.js.map +1 -1
- package/dist/backend/llvm/array-search.js +3 -1
- package/dist/backend/llvm/array-search.js.map +1 -1
- package/dist/backend/llvm/classes.d.ts +27 -1
- package/dist/backend/llvm/classes.js +115 -22
- package/dist/backend/llvm/classes.js.map +1 -1
- package/dist/backend/llvm/classes.test.js +21 -9
- package/dist/backend/llvm/classes.test.js.map +1 -1
- package/dist/backend/llvm/common.d.ts +21 -3
- package/dist/backend/llvm/common.js +50 -3
- package/dist/backend/llvm/common.js.map +1 -1
- package/dist/backend/llvm/dense-array-access.d.ts +3 -1
- package/dist/backend/llvm/dense-array-access.js +61 -38
- package/dist/backend/llvm/dense-array-access.js.map +1 -1
- package/dist/backend/llvm/dense-array-access.test.js +4 -0
- package/dist/backend/llvm/dense-array-access.test.js.map +1 -1
- package/dist/backend/llvm/dense-array-loops.js +3 -3
- package/dist/backend/llvm/dense-array-loops.js.map +1 -1
- package/dist/backend/llvm/dyn.d.ts +9 -0
- package/dist/backend/llvm/dyn.js +62 -6
- package/dist/backend/llvm/dyn.js.map +1 -1
- package/dist/backend/llvm/emit-function.js +5 -2
- package/dist/backend/llvm/emit-function.js.map +1 -1
- package/dist/backend/llvm/emit-module.js +54 -32
- package/dist/backend/llvm/emit-module.js.map +1 -1
- package/dist/backend/llvm/emit-statements.d.ts +3 -2
- package/dist/backend/llvm/emit-statements.js +90 -13
- package/dist/backend/llvm/emit-statements.js.map +1 -1
- package/dist/backend/llvm/emitter.d.ts +20 -9
- package/dist/backend/llvm/emitter.js +42 -31
- package/dist/backend/llvm/emitter.js.map +1 -1
- package/dist/backend/llvm/expr-calls.js +17 -4
- package/dist/backend/llvm/expr-calls.js.map +1 -1
- package/dist/backend/llvm/expr-containers.js +6 -9
- package/dist/backend/llvm/expr-containers.js.map +1 -1
- package/dist/backend/llvm/expr-dynamic.js +46 -4
- package/dist/backend/llvm/expr-dynamic.js.map +1 -1
- package/dist/backend/llvm/expr-primitives.js +3 -3
- package/dist/backend/llvm/expr-primitives.js.map +1 -1
- package/dist/backend/llvm/expr-primitives.test.js +55 -0
- package/dist/backend/llvm/expr-primitives.test.js.map +1 -1
- package/dist/backend/llvm/expr-stream-bridges.js +11 -15
- package/dist/backend/llvm/expr-stream-bridges.js.map +1 -1
- package/dist/backend/llvm/integer-clones.js +3 -3
- package/dist/backend/llvm/integer-clones.js.map +1 -1
- package/dist/backend/llvm/js-ic.d.ts +18 -0
- package/dist/backend/llvm/js-ic.js +712 -0
- package/dist/backend/llvm/js-ic.js.map +1 -0
- package/dist/backend/llvm/jsval.js +139 -11
- package/dist/backend/llvm/jsval.js.map +1 -1
- package/dist/backend/llvm/lib-process.js +4 -3
- package/dist/backend/llvm/lib-process.js.map +1 -1
- package/dist/backend/llvm/lib-shared.js +22 -0
- package/dist/backend/llvm/lib-shared.js.map +1 -1
- package/dist/backend/llvm/local-array-reads.js +40 -31
- package/dist/backend/llvm/local-array-reads.js.map +1 -1
- package/dist/backend/llvm/map-number-lookup.d.ts +20 -4
- package/dist/backend/llvm/map-number-lookup.js +43 -7
- package/dist/backend/llvm/map-number-lookup.js.map +1 -1
- package/dist/backend/llvm/narrow-guards.js +64 -0
- package/dist/backend/llvm/narrow-guards.js.map +1 -1
- package/dist/backend/llvm/publish.d.ts +3 -0
- package/dist/backend/llvm/publish.js +36 -17
- package/dist/backend/llvm/publish.js.map +1 -1
- package/dist/backend/llvm/regions.js +2 -2
- package/dist/backend/llvm/regions.js.map +1 -1
- package/dist/backend/llvm/regions.test.js +7 -1
- package/dist/backend/llvm/regions.test.js.map +1 -1
- package/dist/backend/llvm/shapes.d.ts +8 -2
- package/dist/backend/llvm/shapes.js +9 -7
- package/dist/backend/llvm/shapes.js.map +1 -1
- package/dist/backend/llvm/speculative-integers.d.ts +20 -1
- package/dist/backend/llvm/speculative-integers.js +94 -6
- package/dist/backend/llvm/speculative-integers.js.map +1 -1
- package/dist/backend/llvm/speculative-integers.test.js +55 -1
- package/dist/backend/llvm/speculative-integers.test.js.map +1 -1
- package/dist/backend/llvm/string-reads.d.ts +1 -1
- package/dist/backend/llvm/string-reads.js +4 -4
- package/dist/backend/llvm/string-reads.js.map +1 -1
- package/dist/backend/llvm/thread-slots.test.js +5 -4
- package/dist/backend/llvm/thread-slots.test.js.map +1 -1
- package/dist/backend/mangle.d.ts +5 -0
- package/dist/backend/mangle.js +7 -0
- package/dist/backend/mangle.js.map +1 -1
- package/dist/backend/native/contracts.d.ts +20 -0
- package/dist/backend/native/executable.js +20 -3
- package/dist/backend/native/executable.js.map +1 -1
- package/dist/backend/native/library.js +2 -1
- package/dist/backend/native/library.js.map +1 -1
- package/dist/backend/native-codegen.d.ts +6 -0
- package/dist/backend/native-codegen.js +19 -0
- package/dist/backend/native-codegen.js.map +1 -1
- package/dist/backend/native-codegen.test.js +27 -0
- package/dist/backend/native-codegen.test.js.map +1 -1
- package/dist/backend/native-link-info-core.d.ts +18 -0
- package/dist/backend/native-link-info-core.js.map +1 -1
- package/dist/backend/native-profile.d.ts +32 -0
- package/dist/backend/native-profile.js +39 -0
- package/dist/backend/native-profile.js.map +1 -0
- package/dist/backend/native-profile.test.d.ts +1 -0
- package/dist/backend/native-profile.test.js +58 -0
- package/dist/backend/native-profile.test.js.map +1 -0
- package/dist/backend/native-tools.d.ts +14 -0
- package/dist/backend/native-tools.js +13 -0
- package/dist/backend/native-tools.js.map +1 -1
- package/dist/backend/runtime-abi.d.ts +2 -2
- package/dist/backend/runtime-abi.js +2 -2
- package/dist/backend/runtime-pack-core.d.ts +4 -0
- package/dist/backend/runtime-pack-core.js +4 -0
- package/dist/backend/runtime-pack-core.js.map +1 -1
- package/dist/backend/runtime-pack-targets.test.js +4 -1
- package/dist/backend/runtime-pack-targets.test.js.map +1 -1
- package/dist/backend/runtime-pack.test.js +4 -1
- package/dist/backend/runtime-pack.test.js.map +1 -1
- package/dist/backend/target-diagnostics.js +7 -0
- package/dist/backend/target-diagnostics.js.map +1 -1
- package/dist/backend/warm-cache.js +3 -0
- package/dist/backend/warm-cache.js.map +1 -1
- package/dist/cli/command.js +63 -1
- package/dist/cli/command.js.map +1 -1
- package/dist/cli/host.d.ts +3 -0
- package/dist/cli/output-options.d.ts +2 -0
- package/dist/cli/output-options.js +9 -0
- package/dist/cli/output-options.js.map +1 -1
- package/dist/cli/usage.d.ts +11 -1
- package/dist/cli/usage.js +23 -0
- package/dist/cli/usage.js.map +1 -1
- package/dist/compile-types.d.ts +9 -0
- package/dist/contracts/check.js +1 -2
- package/dist/contracts/check.js.map +1 -1
- package/dist/executable/executable-cache.d.ts +10 -0
- package/dist/executable/executable-cache.js +6 -0
- package/dist/executable/executable-cache.js.map +1 -1
- package/dist/executable/executable-cache.test.js +5 -0
- package/dist/executable/executable-cache.test.js.map +1 -1
- package/dist/frontend/arguments-usage.d.ts +8 -0
- package/dist/frontend/arguments-usage.js +98 -0
- package/dist/frontend/arguments-usage.js.map +1 -1
- package/dist/frontend/arguments-usage.test.d.ts +1 -0
- package/dist/frontend/arguments-usage.test.js +32 -0
- package/dist/frontend/arguments-usage.test.js.map +1 -0
- package/dist/frontend/builtin-package-aliases.d.ts +24 -0
- package/dist/frontend/builtin-package-aliases.js +133 -0
- package/dist/frontend/builtin-package-aliases.js.map +1 -0
- package/dist/frontend/builtin-package-aliases.test.d.ts +1 -0
- package/dist/frontend/builtin-package-aliases.test.js +48 -0
- package/dist/frontend/builtin-package-aliases.test.js.map +1 -0
- package/dist/frontend/dts-paths.d.ts +4 -0
- package/dist/frontend/dts-paths.js +9 -1
- package/dist/frontend/dts-paths.js.map +1 -1
- package/dist/frontend/lowering/builtins/builtin-class-dyn.d.ts +8 -0
- package/dist/frontend/lowering/builtins/builtin-class-dyn.js +50 -1
- package/dist/frontend/lowering/builtins/builtin-class-dyn.js.map +1 -1
- package/dist/frontend/lowering/builtins/callable-aliases.js +3 -2
- package/dist/frontend/lowering/builtins/callable-aliases.js.map +1 -1
- package/dist/frontend/lowering/builtins/crypto.d.ts +3 -0
- package/dist/frontend/lowering/builtins/crypto.js +4 -1
- package/dist/frontend/lowering/builtins/crypto.js.map +1 -1
- package/dist/frontend/lowering/builtins/ecdh.d.ts +10 -0
- package/dist/frontend/lowering/builtins/ecdh.js +208 -0
- package/dist/frontend/lowering/builtins/ecdh.js.map +1 -0
- package/dist/frontend/lowering/builtins/json.js +52 -0
- package/dist/frontend/lowering/builtins/json.js.map +1 -1
- package/dist/frontend/lowering/builtins/process.d.ts +9 -0
- package/dist/frontend/lowering/builtins/process.js +44 -0
- package/dist/frontend/lowering/builtins/process.js.map +1 -1
- package/dist/frontend/lowering/builtins/promisify-callback.d.ts +3 -0
- package/dist/frontend/lowering/builtins/promisify-callback.js +21 -3
- package/dist/frontend/lowering/builtins/promisify-callback.js.map +1 -1
- package/dist/frontend/lowering/builtins/reflection.js +26 -0
- package/dist/frontend/lowering/builtins/reflection.js.map +1 -1
- package/dist/frontend/lowering/builtins/timers.js +5 -1
- package/dist/frontend/lowering/builtins/timers.js.map +1 -1
- package/dist/frontend/lowering/builtins/typed-array-members.d.ts +7 -0
- package/dist/frontend/lowering/builtins/typed-array-members.js +160 -0
- package/dist/frontend/lowering/builtins/typed-array-members.js.map +1 -0
- package/dist/frontend/lowering/call-signatures.d.ts +4 -0
- package/dist/frontend/lowering/call-signatures.js +126 -9
- package/dist/frontend/lowering/call-signatures.js.map +1 -1
- package/dist/frontend/lowering/cjs-exports-object.js +34 -1
- package/dist/frontend/lowering/cjs-exports-object.js.map +1 -1
- package/dist/frontend/lowering/class-dynamic-dispatch.js +9 -1
- package/dist/frontend/lowering/class-dynamic-dispatch.js.map +1 -1
- package/dist/frontend/lowering/class-protocols.d.ts +10 -0
- package/dist/frontend/lowering/class-protocols.js +53 -3
- package/dist/frontend/lowering/class-protocols.js.map +1 -1
- package/dist/frontend/lowering/class-prototypes.js +6 -1
- package/dist/frontend/lowering/class-prototypes.js.map +1 -1
- package/dist/frontend/lowering/class-to-primitive.d.ts +2 -2
- package/dist/frontend/lowering/class-to-primitive.js +6 -3
- package/dist/frontend/lowering/class-to-primitive.js.map +1 -1
- package/dist/frontend/lowering/coercions/fresh-spread.d.ts +13 -0
- package/dist/frontend/lowering/coercions/fresh-spread.js +95 -0
- package/dist/frontend/lowering/coercions/fresh-spread.js.map +1 -0
- package/dist/frontend/lowering/coercions/function-adapters.js +99 -70
- package/dist/frontend/lowering/coercions/function-adapters.js.map +1 -1
- package/dist/frontend/lowering/containers/array-callbacks.d.ts +8 -0
- package/dist/frontend/lowering/containers/array-callbacks.js +22 -19
- package/dist/frontend/lowering/containers/array-callbacks.js.map +1 -1
- package/dist/frontend/lowering/containers/array-construction.js +7 -0
- package/dist/frontend/lowering/containers/array-construction.js.map +1 -1
- package/dist/frontend/lowering/containers/array-methods.js +5 -0
- package/dist/frontend/lowering/containers/array-methods.js.map +1 -1
- package/dist/frontend/lowering/containers/bytes.d.ts +9 -0
- package/dist/frontend/lowering/containers/bytes.js +493 -17
- package/dist/frontend/lowering/containers/bytes.js.map +1 -1
- package/dist/frontend/lowering/containers/collection-methods.js +72 -3
- package/dist/frontend/lowering/containers/collection-methods.js.map +1 -1
- package/dist/frontend/lowering/containers/string-and-regexp.js +49 -13
- package/dist/frontend/lowering/containers/string-and-regexp.js.map +1 -1
- package/dist/frontend/lowering/cycle-initialization.d.ts +26 -10
- package/dist/frontend/lowering/cycle-initialization.js +152 -35
- package/dist/frontend/lowering/cycle-initialization.js.map +1 -1
- package/dist/frontend/lowering/expressions/array-literals.js +33 -13
- package/dist/frontend/lowering/expressions/array-literals.js.map +1 -1
- package/dist/frontend/lowering/expressions/binary.js +79 -5
- package/dist/frontend/lowering/expressions/binary.js.map +1 -1
- package/dist/frontend/lowering/expressions/element-access.js +13 -6
- package/dist/frontend/lowering/expressions/element-access.js.map +1 -1
- package/dist/frontend/lowering/expressions/keyed-field-targets.d.ts +14 -2
- package/dist/frontend/lowering/expressions/keyed-field-targets.js +91 -10
- package/dist/frontend/lowering/expressions/keyed-field-targets.js.map +1 -1
- package/dist/frontend/lowering/expressions/narrowing.js +17 -2
- package/dist/frontend/lowering/expressions/narrowing.js.map +1 -1
- package/dist/frontend/lowering/expressions/object-literals.js +48 -1
- package/dist/frontend/lowering/expressions/object-literals.js.map +1 -1
- package/dist/frontend/lowering/expressions/optional-chains.d.ts +1 -1
- package/dist/frontend/lowering/expressions/optional-chains.js +12 -3
- package/dist/frontend/lowering/expressions/optional-chains.js.map +1 -1
- package/dist/frontend/lowering/expressions/property-access.d.ts +5 -0
- package/dist/frontend/lowering/expressions/property-access.js +252 -9
- package/dist/frontend/lowering/expressions/property-access.js.map +1 -1
- package/dist/frontend/lowering/expressions/relational.js +49 -4
- package/dist/frontend/lowering/expressions/relational.js.map +1 -1
- package/dist/frontend/lowering/expressions/typeof.js +13 -0
- package/dist/frontend/lowering/expressions/typeof.js.map +1 -1
- package/dist/frontend/lowering/expressions/updates.js +1 -1
- package/dist/frontend/lowering/expressions/updates.js.map +1 -1
- package/dist/frontend/lowering/generator-delegation.d.ts +8 -0
- package/dist/frontend/lowering/generator-delegation.js +191 -1
- package/dist/frontend/lowering/generator-delegation.js.map +1 -1
- package/dist/frontend/lowering/generic-functions.d.ts +4 -0
- package/dist/frontend/lowering/generic-functions.js +213 -56
- package/dist/frontend/lowering/generic-functions.js.map +1 -1
- package/dist/frontend/lowering/handle-properties.d.ts +24 -0
- package/dist/frontend/lowering/handle-properties.js +281 -0
- package/dist/frontend/lowering/handle-properties.js.map +1 -0
- package/dist/frontend/lowering/iterable-spelling.d.ts +7 -0
- package/dist/frontend/lowering/iterable-spelling.js +38 -0
- package/dist/frontend/lowering/iterable-spelling.js.map +1 -0
- package/dist/frontend/lowering/lower-array-sort.d.ts +33 -15
- package/dist/frontend/lowering/lower-array-sort.js +117 -21
- package/dist/frontend/lowering/lower-array-sort.js.map +1 -1
- package/dist/frontend/lowering/lower-array-sort.test.js +93 -14
- package/dist/frontend/lowering/lower-array-sort.test.js.map +1 -1
- package/dist/frontend/lowering/lower-builtin-values.js +1 -0
- package/dist/frontend/lowering/lower-builtin-values.js.map +1 -1
- package/dist/frontend/lowering/lower-calls.js +166 -7
- package/dist/frontend/lowering/lower-calls.js.map +1 -1
- package/dist/frontend/lowering/lower-classes.d.ts +4 -0
- package/dist/frontend/lowering/lower-classes.js +59 -7
- package/dist/frontend/lowering/lower-classes.js.map +1 -1
- package/dist/frontend/lowering/lower-dgram.js +62 -13
- package/dist/frontend/lowering/lower-dgram.js.map +1 -1
- package/dist/frontend/lowering/lower-exprs.js +32 -1
- package/dist/frontend/lowering/lower-exprs.js.map +1 -1
- package/dist/frontend/lowering/lower-functions.js +4 -0
- package/dist/frontend/lowering/lower-functions.js.map +1 -1
- package/dist/frontend/lowering/lower-generators.js +10 -4
- package/dist/frontend/lowering/lower-generators.js.map +1 -1
- package/dist/frontend/lowering/lower-inspect.js +569 -11
- package/dist/frontend/lowering/lower-inspect.js.map +1 -1
- package/dist/frontend/lowering/lower-modules.d.ts +11 -3
- package/dist/frontend/lowering/lower-modules.js +212 -67
- package/dist/frontend/lowering/lower-modules.js.map +1 -1
- package/dist/frontend/lowering/lower-namespaces.js +20 -0
- package/dist/frontend/lowering/lower-namespaces.js.map +1 -1
- package/dist/frontend/lowering/lower-server.js +26 -1
- package/dist/frontend/lowering/lower-server.js.map +1 -1
- package/dist/frontend/lowering/lower-stdlib.js +28 -9
- package/dist/frontend/lowering/lower-stdlib.js.map +1 -1
- package/dist/frontend/lowering/lower-stmts.d.ts +7 -10
- package/dist/frontend/lowering/lower-stmts.js +418 -51
- package/dist/frontend/lowering/lower-stmts.js.map +1 -1
- package/dist/frontend/lowering/lower-timers.js +17 -1
- package/dist/frontend/lowering/lower-timers.js.map +1 -1
- package/dist/frontend/lowering/lowerer.d.ts +29 -5
- package/dist/frontend/lowering/lowerer.js +172 -25
- package/dist/frontend/lowering/lowerer.js.map +1 -1
- package/dist/frontend/lowering/rebindable-functions.d.ts +8 -0
- package/dist/frontend/lowering/rebindable-functions.js +54 -0
- package/dist/frontend/lowering/rebindable-functions.js.map +1 -0
- package/dist/frontend/lowering/static-typeof.d.ts +26 -0
- package/dist/frontend/lowering/static-typeof.js +133 -0
- package/dist/frontend/lowering/static-typeof.js.map +1 -0
- package/dist/frontend/lowering/string-index-bounds.js +3 -2
- package/dist/frontend/lowering/string-index-bounds.js.map +1 -1
- package/dist/frontend/lowering/surfaces.js +30 -4
- package/dist/frontend/lowering/surfaces.js.map +1 -1
- package/dist/frontend/lowering/thenables.d.ts +16 -0
- package/dist/frontend/lowering/thenables.js +124 -0
- package/dist/frontend/lowering/thenables.js.map +1 -0
- package/dist/frontend/npm-static-builtin-aliases.d.ts +8 -0
- package/dist/frontend/npm-static-builtin-aliases.js +65 -0
- package/dist/frontend/npm-static-builtin-aliases.js.map +1 -0
- package/dist/frontend/npm-static-bundled-chunks.d.ts +8 -1
- package/dist/frontend/npm-static-bundled-chunks.js +173 -2
- package/dist/frontend/npm-static-bundled-chunks.js.map +1 -1
- package/dist/frontend/npm-static-bundled-chunks.test.js +112 -0
- package/dist/frontend/npm-static-bundled-chunks.test.js.map +1 -1
- package/dist/frontend/npm-static-bundled-esm.js +224 -4
- package/dist/frontend/npm-static-bundled-esm.js.map +1 -1
- package/dist/frontend/npm-static-bundled-esm.test.js +129 -0
- package/dist/frontend/npm-static-bundled-esm.test.js.map +1 -1
- package/dist/frontend/npm-static-enum-iife.d.ts +6 -0
- package/dist/frontend/npm-static-enum-iife.js +280 -0
- package/dist/frontend/npm-static-enum-iife.js.map +1 -0
- package/dist/frontend/npm-static-enum-iife.test.d.ts +1 -0
- package/dist/frontend/npm-static-enum-iife.test.js +116 -0
- package/dist/frontend/npm-static-enum-iife.test.js.map +1 -0
- package/dist/frontend/npm-static.d.ts +8 -0
- package/dist/frontend/npm-static.js +46 -1
- package/dist/frontend/npm-static.js.map +1 -1
- package/dist/frontend/npm.js +13 -0
- package/dist/frontend/npm.js.map +1 -1
- package/dist/frontend/package-shims.d.ts +47 -0
- package/dist/frontend/package-shims.js +300 -0
- package/dist/frontend/package-shims.js.map +1 -0
- package/dist/frontend/pipeline.js +67 -1
- package/dist/frontend/pipeline.js.map +1 -1
- package/dist/frontend/program.d.ts +8 -0
- package/dist/frontend/program.js +72 -9
- package/dist/frontend/program.js.map +1 -1
- package/dist/frontend/resolve.js +13 -0
- package/dist/frontend/resolve.js.map +1 -1
- package/dist/frontend/services.d.ts +6 -0
- package/dist/frontend/services.js +19 -0
- package/dist/frontend/services.js.map +1 -1
- package/dist/frontend/ts7/program-host.d.ts +6 -5
- package/dist/frontend/ts7/program-host.js +7 -0
- package/dist/frontend/ts7/program-host.js.map +1 -1
- package/dist/frontend/ts7/semantic-model.d.ts +3 -0
- package/dist/frontend/ts7/semantic-model.js +26 -0
- package/dist/frontend/ts7/semantic-model.js.map +1 -1
- package/dist/frontend/ts7/session.d.ts +19 -4
- package/dist/frontend/ts7/session.js.map +1 -1
- package/dist/frontend/type-mapper.js +201 -15
- package/dist/frontend/type-mapper.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +58 -6
- package/dist/index.js.map +1 -1
- package/dist/ir/array-length-stability.d.ts +3 -2
- package/dist/ir/array-length-stability.js +15 -2
- package/dist/ir/array-length-stability.js.map +1 -1
- package/dist/ir/array-length-stability.test.js +22 -1
- package/dist/ir/array-length-stability.test.js.map +1 -1
- package/dist/ir/builtin-effects.js +13 -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 +46 -4
- package/dist/ir/builtin-signatures.js.map +1 -1
- package/dist/ir/integer-loop-facts.d.ts +5 -0
- package/dist/ir/integer-loop-facts.js +79 -14
- package/dist/ir/integer-loop-facts.js.map +1 -1
- package/dist/ir/integer-ranges.d.ts +10 -1
- package/dist/ir/integer-ranges.js +122 -25
- package/dist/ir/integer-ranges.js.map +1 -1
- package/dist/ir/integer-ranges.test.js +191 -1
- package/dist/ir/integer-ranges.test.js.map +1 -1
- package/dist/ir/ir.js +8 -0
- package/dist/ir/ir.js.map +1 -1
- package/dist/ir/js-ic.d.ts +52 -0
- package/dist/ir/js-ic.js +199 -0
- package/dist/ir/js-ic.js.map +1 -0
- package/dist/ir/js-ic.test.d.ts +1 -0
- package/dist/ir/js-ic.test.js +148 -0
- package/dist/ir/js-ic.test.js.map +1 -0
- package/dist/ir/jsval.js +38 -4
- package/dist/ir/jsval.js.map +1 -1
- package/dist/ir/runtime-features.d.ts +39 -4
- package/dist/ir/runtime-features.js +229 -99
- package/dist/ir/runtime-features.js.map +1 -1
- package/dist/ir/traverse.js +110 -68
- package/dist/ir/traverse.js.map +1 -1
- package/dist/ir/validate.js +21 -8
- package/dist/ir/validate.js.map +1 -1
- package/dist/ir/validate.test.js +15 -2
- package/dist/ir/validate.test.js.map +1 -1
- package/dist/library/ir-policy.js +1 -0
- package/dist/library/ir-policy.js.map +1 -1
- package/dist/native/cli.js +17 -0
- package/dist/native/cli.js.map +1 -1
- package/dist/native/compiler.js +33 -4
- package/dist/native/compiler.js.map +1 -1
- package/dist/native/executable-cache.js +3 -0
- package/dist/native/executable-cache.js.map +1 -1
- package/dist/native/prepare.js +3 -0
- package/dist/native/prepare.js.map +1 -1
- package/dist/native/sanitizer.test.js +7 -0
- package/dist/native/sanitizer.test.js.map +1 -1
- package/package.json +21 -20
- package/shims/fs-extra/core/api.ts +1192 -0
- package/shims/fs-extra/index.ts +9 -0
- package/shims/undici/core/agent.ts +163 -0
- package/shims/undici/core/api.ts +93 -0
- package/shims/undici/core/client.ts +1304 -0
- package/shims/undici/core/connector.ts +157 -0
- package/shims/undici/core/diagnostics-types.ts +68 -0
- package/shims/undici/core/diagnostics.ts +16 -0
- package/shims/undici/core/dispatcher.ts +574 -0
- package/shims/undici/core/errors-v5.ts +22 -0
- package/shims/undici/core/errors-v7.ts +25 -0
- package/shims/undici/core/errors.ts +255 -0
- package/shims/undici/core/fetch.ts +635 -0
- package/shims/undici/core/pool.ts +280 -0
- package/shims/undici/core/readable.ts +268 -0
- package/shims/undici/core/request.ts +313 -0
- package/shims/undici/core/timers.ts +80 -0
- package/shims/undici/core/types.ts +167 -0
- package/shims/undici/core/util.ts +67 -0
- package/shims/undici/v5.ts +119 -0
- package/shims/undici/v7.ts +119 -0
- package/surface-manifest.json +2 -4
|
@@ -0,0 +1,712 @@
|
|
|
1
|
+
/* Inline-cache lowering of the dynamic tier (two-tier design stage S4;
|
|
2
|
+
* runtime scr_js_object.c, sites ir/js-ic.ts).
|
|
3
|
+
*
|
|
4
|
+
* A property site in a dynamic-tier function owns one zeroed thread-local
|
|
5
|
+
* ScrJsIc record (`@sc_js_ic_N`). The code at the site is fixed:
|
|
6
|
+
*
|
|
7
|
+
* load ordinary object whose shape is entry 0's own-property shape:
|
|
8
|
+
* read entry `slot` inline unless it is an accessor; otherwise
|
|
9
|
+
* scr_js_load_probe (polymorphic, prototype hits, misses)
|
|
10
|
+
* store ordinary object whose shape is entry 0's replace shape, outside
|
|
11
|
+
* an intact parse region, writable data entry: replace inline;
|
|
12
|
+
* otherwise scr_js_store_probe (adds, polymorphic, misses)
|
|
13
|
+
* keyed dense array element at an integral number key: inline;
|
|
14
|
+
* otherwise scr_js_keyed_probe (string keys of ordinary objects)
|
|
15
|
+
* method dynInvoke's method read: scr_js_load_probe
|
|
16
|
+
*
|
|
17
|
+
* A probe that cannot answer from plain data leaves everything untouched,
|
|
18
|
+
* and the site calls its helper (or the generic runtime entry), which
|
|
19
|
+
* defines the operation's semantics; nothing is ever patched.
|
|
20
|
+
*
|
|
21
|
+
* Layout facts (64-bit only; 32-bit targets keep the helper calls):
|
|
22
|
+
* ScrDyn kind +8; v.obj {len +16, entries +32, region +72,
|
|
23
|
+
* shape +80}; v.arr {len +16, items +32, presence +56};
|
|
24
|
+
* v.num +16
|
|
25
|
+
* ScrDynEntry 48 bytes: value +16, accessor bit 0 of +40, writable +41
|
|
26
|
+
* ScrJsIc entries of 40 bytes {shape, target, holder, holder_shape,
|
|
27
|
+
* slot}; 168 bytes in all */
|
|
28
|
+
import { BOOL, DYN, F64, STRING } from "../../ir/ir.js";
|
|
29
|
+
import { jsIcMethodSites } from "../../ir/js-ic.js";
|
|
30
|
+
import { mangleBorrowedFunction } from "../mangle.js";
|
|
31
|
+
import { emitBorrowedInput } from "./borrowed-inputs.js";
|
|
32
|
+
import { DYN_KIND } from "./dyn.js";
|
|
33
|
+
import { JS_BITS } from "./jsval-encoding.js";
|
|
34
|
+
import { jsImmediates } from "./jsval.js";
|
|
35
|
+
/** Words of one ScrJsIc record. */
|
|
36
|
+
export const JS_IC_WORDS = 21;
|
|
37
|
+
const ENTRY_STRIDE = 48;
|
|
38
|
+
/** The cache site a call is, when it is emitted in a dynamic-tier function
|
|
39
|
+
* of a 64-bit target. */
|
|
40
|
+
export function jsIcSiteOf(host, e) {
|
|
41
|
+
if (!jsImmediates(host) || host.currentTier !== "dynamic")
|
|
42
|
+
return null;
|
|
43
|
+
if (host.int32Abis.has(e.callee))
|
|
44
|
+
return null;
|
|
45
|
+
return host.jsIcSites.site(e.callee);
|
|
46
|
+
}
|
|
47
|
+
/** Whether method dispatch in the current function reads through a cache. */
|
|
48
|
+
export function jsIcMethods(host) {
|
|
49
|
+
return (jsImmediates(host) &&
|
|
50
|
+
host.currentTier === "dynamic" &&
|
|
51
|
+
jsIcMethodSites(host.currentFunctionName));
|
|
52
|
+
}
|
|
53
|
+
function gep(host, base, offset) {
|
|
54
|
+
const p = host.B.tmp();
|
|
55
|
+
host.B.line(`${p} = getelementptr inbounds i8, ptr ${base}, i64 ${offset}`);
|
|
56
|
+
return p;
|
|
57
|
+
}
|
|
58
|
+
function load(host, type, base, offset) {
|
|
59
|
+
const v = host.B.tmp();
|
|
60
|
+
host.B.line(`${v} = load ${type}, ptr ${offset === 0 ? base : gep(host, base, offset)}`);
|
|
61
|
+
return v;
|
|
62
|
+
}
|
|
63
|
+
/** Branches to `yes` when the dyn cell `d` has kind `kind`. */
|
|
64
|
+
function kindIs(host, d, kind, yes, no) {
|
|
65
|
+
const k = load(host, "i32", d, 8);
|
|
66
|
+
const is = host.B.tmp();
|
|
67
|
+
host.B.line(`${is} = icmp eq i32 ${k}, ${kind}`);
|
|
68
|
+
host.B.condBr(is, yes, no);
|
|
69
|
+
}
|
|
70
|
+
/* How many cache entries a site tests inline, and whether those tests
|
|
71
|
+
* cover prototype hits. Measured (two-tier S4): testing all four entries
|
|
72
|
+
* inline made polymorphic reads 7-10% faster (the design prototype's W2/W3)
|
|
73
|
+
* and monomorphic method code no faster, for 65-225 more bytes per site;
|
|
74
|
+
* the prototype hit made method-heavy code 3-6% faster for 15-90 bytes.
|
|
75
|
+
* So a site tests entry 0, own or prototype, and its probe does the rest.
|
|
76
|
+
* (0 makes every access probe: with a runtime built with SCR_JS_VERIFY,
|
|
77
|
+
* that checks every cached shape against its object.) */
|
|
78
|
+
const INLINE_WAYS = 1;
|
|
79
|
+
const INLINE_PROTO = true;
|
|
80
|
+
/** The address of entry `slot` of object `d`'s entries. */
|
|
81
|
+
function entryAt(host, d, slot) {
|
|
82
|
+
const B = host.B;
|
|
83
|
+
const entries = load(host, "ptr", d, 32);
|
|
84
|
+
const offset = B.tmp();
|
|
85
|
+
const entry = B.tmp();
|
|
86
|
+
B.line(`${offset} = mul i64 ${slot}, ${ENTRY_STRIDE}`);
|
|
87
|
+
B.line(`${entry} = getelementptr inbounds i8, ptr ${entries}, i64 ${offset}`);
|
|
88
|
+
return entry;
|
|
89
|
+
}
|
|
90
|
+
/** Branches to `miss` when the entry at `entry` is an accessor. */
|
|
91
|
+
function dataEntry(host, entry, miss) {
|
|
92
|
+
const B = host.B;
|
|
93
|
+
const flags = load(host, "i8", entry, 40);
|
|
94
|
+
const accessor = B.tmp();
|
|
95
|
+
const isAccessor = B.tmp();
|
|
96
|
+
B.line(`${accessor} = and i8 ${flags}, 1`);
|
|
97
|
+
B.line(`${isAccessor} = icmp ne i8 ${accessor}, 0`);
|
|
98
|
+
const data = B.newLabel("ic.data");
|
|
99
|
+
B.condBr(isAccessor, miss, data);
|
|
100
|
+
B.startBlock(data);
|
|
101
|
+
}
|
|
102
|
+
/** The inline part of a load site, entered for an ordinary object `d`:
|
|
103
|
+
* tests the first `ways` cache entries (own properties, and prototype hits
|
|
104
|
+
* when `proto`); each hit converts the (borrowed) value with `result` and
|
|
105
|
+
* branches to `join`, recording its phi input. Anything else branches to
|
|
106
|
+
* `miss`. */
|
|
107
|
+
function inlineLoad(host, d, ic, ways, proto, result, incoming, join, miss) {
|
|
108
|
+
const B = host.B;
|
|
109
|
+
if (ways === 0) {
|
|
110
|
+
B.br(miss);
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
const shape = load(host, "ptr", d, 80);
|
|
114
|
+
const present = B.tmp();
|
|
115
|
+
B.line(`${present} = icmp ne ptr ${shape}, null`);
|
|
116
|
+
let next = B.newLabel("ic.w");
|
|
117
|
+
B.condBr(present, next, miss);
|
|
118
|
+
for (let way = 0; way < ways; way++) {
|
|
119
|
+
const base = way * 40;
|
|
120
|
+
B.startBlock(next);
|
|
121
|
+
next = way + 1 < ways ? B.newLabel("ic.w") : miss;
|
|
122
|
+
const cached = load(host, "ptr", ic, base);
|
|
123
|
+
const same = B.tmp();
|
|
124
|
+
B.line(`${same} = icmp eq ptr ${shape}, ${cached}`);
|
|
125
|
+
const matched = B.newLabel("ic.m");
|
|
126
|
+
B.condBr(same, matched, next);
|
|
127
|
+
B.startBlock(matched);
|
|
128
|
+
const target = load(host, "ptr", ic, base + 8);
|
|
129
|
+
const own = B.tmp();
|
|
130
|
+
B.line(`${own} = icmp eq ptr ${target}, null`);
|
|
131
|
+
const ownLabel = B.newLabel("ic.own");
|
|
132
|
+
const protoLabel = proto ? B.newLabel("ic.proto") : miss;
|
|
133
|
+
B.condBr(own, ownLabel, protoLabel);
|
|
134
|
+
const hit = (holder) => {
|
|
135
|
+
const slot = load(host, "i64", ic, base + 32);
|
|
136
|
+
const entry = entryAt(host, holder, slot);
|
|
137
|
+
dataEntry(host, entry, miss);
|
|
138
|
+
const value = load(host, "ptr", entry, 16);
|
|
139
|
+
const out = result(value);
|
|
140
|
+
incoming.push(`[ ${out}, %${B.currentLabel()} ]`);
|
|
141
|
+
B.br(join);
|
|
142
|
+
};
|
|
143
|
+
B.startBlock(ownLabel);
|
|
144
|
+
hit(d);
|
|
145
|
+
if (!proto)
|
|
146
|
+
continue;
|
|
147
|
+
B.startBlock(protoLabel);
|
|
148
|
+
const holder = load(host, "ptr", ic, base + 16);
|
|
149
|
+
const prototype = load(host, "ptr", d, 96);
|
|
150
|
+
const linked = B.tmp();
|
|
151
|
+
B.line(`${linked} = icmp eq ptr ${prototype}, ${holder}`);
|
|
152
|
+
const isLinked = B.newLabel("ic.pl");
|
|
153
|
+
B.condBr(linked, isLinked, miss);
|
|
154
|
+
B.startBlock(isLinked);
|
|
155
|
+
const holderObject = B.newLabel("ic.po");
|
|
156
|
+
kindIs(host, holder, DYN_KIND.OBJ, holderObject, miss);
|
|
157
|
+
B.startBlock(holderObject);
|
|
158
|
+
const holderShape = load(host, "ptr", holder, 80);
|
|
159
|
+
const current = B.tmp();
|
|
160
|
+
B.line(`${current} = icmp eq ptr ${holderShape}, ${target}`);
|
|
161
|
+
const holderHit = B.newLabel("ic.ph");
|
|
162
|
+
B.condBr(current, holderHit, miss);
|
|
163
|
+
B.startBlock(holderHit);
|
|
164
|
+
hit(holder);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
/** The inline part of a store site that replaces an own data property,
|
|
168
|
+
* entered for an ordinary object `d` outside an intact parse region:
|
|
169
|
+
* tests the first `ways` cache entries; a hit calls `store` with the
|
|
170
|
+
* address of the entry's value word, which must end its block by
|
|
171
|
+
* branching to the site's join. */
|
|
172
|
+
function inlineReplace(host, d, ic, ways, store, miss) {
|
|
173
|
+
const B = host.B;
|
|
174
|
+
if (ways === 0) {
|
|
175
|
+
B.br(miss);
|
|
176
|
+
return;
|
|
177
|
+
}
|
|
178
|
+
const shape = load(host, "ptr", d, 80);
|
|
179
|
+
const present = B.tmp();
|
|
180
|
+
B.line(`${present} = icmp ne ptr ${shape}, null`);
|
|
181
|
+
let next = B.newLabel("ic.w");
|
|
182
|
+
B.condBr(present, next, miss);
|
|
183
|
+
for (let way = 0; way < ways; way++) {
|
|
184
|
+
const base = way * 40;
|
|
185
|
+
B.startBlock(next);
|
|
186
|
+
next = way + 1 < ways ? B.newLabel("ic.w") : miss;
|
|
187
|
+
const cached = load(host, "ptr", ic, base);
|
|
188
|
+
const target = load(host, "ptr", ic, base + 8);
|
|
189
|
+
const same = B.tmp();
|
|
190
|
+
const replace = B.tmp();
|
|
191
|
+
const ok = B.tmp();
|
|
192
|
+
B.line(`${same} = icmp eq ptr ${shape}, ${cached}`);
|
|
193
|
+
B.line(`${replace} = icmp eq ptr ${target}, ${shape}`);
|
|
194
|
+
B.line(`${ok} = and i1 ${same}, ${replace}`);
|
|
195
|
+
const matched = B.newLabel("ic.m");
|
|
196
|
+
B.condBr(ok, matched, next);
|
|
197
|
+
B.startBlock(matched);
|
|
198
|
+
const slot = load(host, "i64", ic, base + 32);
|
|
199
|
+
const entry = entryAt(host, d, slot);
|
|
200
|
+
const flags = load(host, "i8", entry, 40);
|
|
201
|
+
const writable = load(host, "i8", entry, 41);
|
|
202
|
+
const accessor = B.tmp();
|
|
203
|
+
const data = B.tmp();
|
|
204
|
+
const canWrite = B.tmp();
|
|
205
|
+
const writes = B.tmp();
|
|
206
|
+
B.line(`${accessor} = and i8 ${flags}, 1`);
|
|
207
|
+
B.line(`${data} = icmp eq i8 ${accessor}, 0`);
|
|
208
|
+
B.line(`${canWrite} = icmp ne i8 ${writable}, 0`);
|
|
209
|
+
B.line(`${writes} = and i1 ${data}, ${canWrite}`);
|
|
210
|
+
const hit = B.newLabel("ic.st");
|
|
211
|
+
B.condBr(writes, hit, miss);
|
|
212
|
+
B.startBlock(hit);
|
|
213
|
+
store(gep(host, entry, 16));
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
/** A property value (a dyn cell, `owned` or borrowed from its entry) as
|
|
217
|
+
* the site's result type, owned. A jsval result reads a number cell as an
|
|
218
|
+
* immediate, so arithmetic on it takes no reference and a later store can
|
|
219
|
+
* update an unshared number cell in place; any other cell is carried under
|
|
220
|
+
* the cell tag. */
|
|
221
|
+
function asResult(host, cell, e, owned) {
|
|
222
|
+
const B = host.B;
|
|
223
|
+
/** Retains the cell unless the caller owns it. */
|
|
224
|
+
const hold = () => {
|
|
225
|
+
if (owned === true)
|
|
226
|
+
return cell;
|
|
227
|
+
if (owned === false)
|
|
228
|
+
return host.retainFrame(cell, DYN);
|
|
229
|
+
const borrowed = B.newLabel("icr.b");
|
|
230
|
+
const done = B.newLabel("icr.h");
|
|
231
|
+
const from = B.currentLabel();
|
|
232
|
+
B.condBr(owned, done, borrowed);
|
|
233
|
+
B.startBlock(borrowed);
|
|
234
|
+
const retained = host.retainFrame(cell, DYN);
|
|
235
|
+
const retainedEnd = B.currentLabel();
|
|
236
|
+
B.br(done);
|
|
237
|
+
B.startBlock(done);
|
|
238
|
+
const held = B.tmp();
|
|
239
|
+
B.line(`${held} = phi ptr [ ${cell}, %${from} ], [ ${retained}, %${retainedEnd} ]`);
|
|
240
|
+
return held;
|
|
241
|
+
};
|
|
242
|
+
if (e.type.kind !== "jsval")
|
|
243
|
+
return hold();
|
|
244
|
+
const number = B.newLabel("icr.num");
|
|
245
|
+
const other = B.newLabel("icr.cell");
|
|
246
|
+
const join = B.newLabel("icr.j");
|
|
247
|
+
kindIs(host, cell, DYN_KIND.NUM, number, other);
|
|
248
|
+
B.startBlock(number);
|
|
249
|
+
const d = load(host, "double", cell, 16);
|
|
250
|
+
const raw = B.tmp();
|
|
251
|
+
const nan = B.tmp();
|
|
252
|
+
const bits = B.tmp();
|
|
253
|
+
B.line(`${raw} = bitcast double ${d} to i64`);
|
|
254
|
+
B.line(`${nan} = fcmp uno double ${d}, ${d}`);
|
|
255
|
+
B.line(`${bits} = select i1 ${nan}, i64 ${JS_BITS.canonicalNan}, i64 ${raw}`);
|
|
256
|
+
const immediate = B.tmp();
|
|
257
|
+
B.line(`${immediate} = inttoptr i64 ${bits} to ptr`);
|
|
258
|
+
if (owned === true) {
|
|
259
|
+
host.releaseFrame(cell, DYN);
|
|
260
|
+
}
|
|
261
|
+
else if (owned !== false) {
|
|
262
|
+
const release = B.newLabel("icr.r");
|
|
263
|
+
const released = B.newLabel("icr.rd");
|
|
264
|
+
B.condBr(owned, release, released);
|
|
265
|
+
B.startBlock(release);
|
|
266
|
+
host.releaseFrame(cell, DYN);
|
|
267
|
+
B.br(released);
|
|
268
|
+
B.startBlock(released);
|
|
269
|
+
}
|
|
270
|
+
const numberEnd = B.currentLabel();
|
|
271
|
+
B.br(join);
|
|
272
|
+
B.startBlock(other);
|
|
273
|
+
const held = hold();
|
|
274
|
+
const cellBits = B.tmp();
|
|
275
|
+
const word = B.tmp();
|
|
276
|
+
const tagged = B.tmp();
|
|
277
|
+
B.line(`${cellBits} = ptrtoint ptr ${held} to i64`);
|
|
278
|
+
B.line(`${word} = or i64 ${cellBits}, ${JS_BITS.cellTag}`);
|
|
279
|
+
B.line(`${tagged} = inttoptr i64 ${word} to ptr`);
|
|
280
|
+
const otherEnd = B.currentLabel();
|
|
281
|
+
B.br(join);
|
|
282
|
+
B.startBlock(join);
|
|
283
|
+
const out = B.tmp();
|
|
284
|
+
B.line(`${out} = phi ptr [ ${immediate}, %${numberEnd} ], [ ${tagged}, %${otherEnd} ]`);
|
|
285
|
+
return out;
|
|
286
|
+
}
|
|
287
|
+
/** The helper call of a site's slow path, with the site's evaluated
|
|
288
|
+
* (borrowed) arguments. Ordinary parameters take a reference; borrowed
|
|
289
|
+
* ones lend it. Returns the owned result, or "" for a void helper. */
|
|
290
|
+
function helperCall(host, e, callee, args) {
|
|
291
|
+
const B = host.B;
|
|
292
|
+
const borrowed = host.callLifetimes.borrowed.get(e.callee);
|
|
293
|
+
const argList = args
|
|
294
|
+
.map((a, i) => {
|
|
295
|
+
const type = callee.params[i].type;
|
|
296
|
+
const value = borrowed?.has(i) ? a.name : host.retainFrame(a.name, a.type);
|
|
297
|
+
return `${host.llType(type)} ${value}`;
|
|
298
|
+
})
|
|
299
|
+
.join(", ");
|
|
300
|
+
const target = `@${borrowed ? mangleBorrowedFunction(e.callee) : host.callTarget(e.callee)}`;
|
|
301
|
+
// The helper is the site's cold path: keep its body out of line.
|
|
302
|
+
if (e.type.kind === "void") {
|
|
303
|
+
B.line(`call void ${target}(${argList}) noinline cold`);
|
|
304
|
+
if (host.mayThrow.has(e.callee))
|
|
305
|
+
host.emitPendingCheck();
|
|
306
|
+
return "";
|
|
307
|
+
}
|
|
308
|
+
let t = B.tmp();
|
|
309
|
+
B.line(`${t} = call ${host.llType(e.type)} ${target}(${argList}) noinline cold`);
|
|
310
|
+
if (host.mayThrow.has(e.callee))
|
|
311
|
+
host.emitPendingCheck();
|
|
312
|
+
if (borrowed && host.borrowedReturns.has(e.callee))
|
|
313
|
+
t = host.retainFrame(t, e.type);
|
|
314
|
+
return t;
|
|
315
|
+
}
|
|
316
|
+
function keyString(host, key, e) {
|
|
317
|
+
return host.emitExpr({ kind: "strLit", value: key, type: STRING, loc: e.loc }).name;
|
|
318
|
+
}
|
|
319
|
+
/** Emits a call to a classified helper as a cache site. */
|
|
320
|
+
export function emitJsIcCall(host, e, callee, site) {
|
|
321
|
+
switch (site.kind) {
|
|
322
|
+
case "get":
|
|
323
|
+
return emitGet(host, e, callee, site.key);
|
|
324
|
+
case "set":
|
|
325
|
+
return emitSet(host, e, callee, site.key);
|
|
326
|
+
case "keyed":
|
|
327
|
+
return emitKeyed(host, e, callee);
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
function emitGet(host, e, callee, key) {
|
|
331
|
+
const B = host.B;
|
|
332
|
+
const receiver = emitBorrowedInput(host, e.args[0]);
|
|
333
|
+
const name = keyString(host, key, e);
|
|
334
|
+
const ic = host.jsIcSite();
|
|
335
|
+
const object = B.newLabel("icg.obj");
|
|
336
|
+
const probe = B.newLabel("icg.probe");
|
|
337
|
+
const slow = B.newLabel("icg.slow");
|
|
338
|
+
const join = B.newLabel("icg.j");
|
|
339
|
+
const incoming = [];
|
|
340
|
+
if (key === "length") {
|
|
341
|
+
// An array's length is its element count (the generic read answers
|
|
342
|
+
// it before any property table).
|
|
343
|
+
const array = B.newLabel("icg.arr");
|
|
344
|
+
const other = B.newLabel("icg.other");
|
|
345
|
+
kindIs(host, receiver.name, DYN_KIND.ARR, array, other);
|
|
346
|
+
B.startBlock(array);
|
|
347
|
+
const len = load(host, "i64", receiver.name, 16);
|
|
348
|
+
const count = B.tmp();
|
|
349
|
+
B.line(`${count} = uitofp i64 ${len} to double`);
|
|
350
|
+
incoming.push(`[ ${numberResult(host, count, e)}, %${B.currentLabel()} ]`);
|
|
351
|
+
B.br(join);
|
|
352
|
+
B.startBlock(other);
|
|
353
|
+
}
|
|
354
|
+
// Inline hits (borrowed values) and probe hits (owned ones) share one
|
|
355
|
+
// conversion to the result type.
|
|
356
|
+
const hit = B.newLabel("icg.hit");
|
|
357
|
+
const hits = [];
|
|
358
|
+
kindIs(host, receiver.name, DYN_KIND.OBJ, object, probe);
|
|
359
|
+
B.startBlock(object);
|
|
360
|
+
inlineLoad(host, receiver.name, ic, INLINE_WAYS, INLINE_PROTO, (cell) => cell, hits, hit, probe);
|
|
361
|
+
B.startBlock(probe);
|
|
362
|
+
host.declare(`declare ptr @scr_js_load_probe(ptr, ptr, ptr)`);
|
|
363
|
+
const probed = B.tmp();
|
|
364
|
+
B.line(`${probed} = call ptr @scr_js_load_probe(ptr ${receiver.name}, ptr ${name}, ptr ${ic})`);
|
|
365
|
+
const found = B.tmp();
|
|
366
|
+
B.line(`${found} = icmp ne ptr ${probed}, null`);
|
|
367
|
+
const probeEnd = B.currentLabel();
|
|
368
|
+
B.condBr(found, hit, slow);
|
|
369
|
+
B.startBlock(hit);
|
|
370
|
+
const cell = B.tmp();
|
|
371
|
+
const owned = B.tmp();
|
|
372
|
+
const ownedIn = hits.map((h) => h.replace(/^\[ [^,]+,/, "[ false,"));
|
|
373
|
+
B.line(`${cell} = phi ptr ${[...hits, `[ ${probed}, %${probeEnd} ]`].join(", ")}`);
|
|
374
|
+
B.line(`${owned} = phi i1 ${[...ownedIn, `[ true, %${probeEnd} ]`].join(", ")}`);
|
|
375
|
+
{
|
|
376
|
+
const out = asResult(host, cell, e, owned);
|
|
377
|
+
incoming.push(`[ ${out}, %${B.currentLabel()} ]`);
|
|
378
|
+
}
|
|
379
|
+
B.br(join);
|
|
380
|
+
B.startBlock(slow);
|
|
381
|
+
const result = helperCall(host, e, callee, [receiver]);
|
|
382
|
+
incoming.push(`[ ${result}, %${B.currentLabel()} ]`);
|
|
383
|
+
B.br(join);
|
|
384
|
+
B.startBlock(join);
|
|
385
|
+
const out = B.tmp();
|
|
386
|
+
B.line(`${out} = phi ptr ${incoming.join(", ")}`);
|
|
387
|
+
return host.own({ name: out, type: e.type });
|
|
388
|
+
}
|
|
389
|
+
/** A number as the site's result type: an immediate for a jsval result,
|
|
390
|
+
* a fresh cell (as the generic read makes) for a dyn one. */
|
|
391
|
+
function numberResult(host, d, e) {
|
|
392
|
+
const B = host.B;
|
|
393
|
+
if (e.type.kind === "jsval") {
|
|
394
|
+
// Counts are never NaN: the bits are the word.
|
|
395
|
+
const bits = B.tmp();
|
|
396
|
+
const word = B.tmp();
|
|
397
|
+
B.line(`${bits} = bitcast double ${d} to i64`);
|
|
398
|
+
B.line(`${word} = inttoptr i64 ${bits} to ptr`);
|
|
399
|
+
return word;
|
|
400
|
+
}
|
|
401
|
+
host.declare(`declare ptr @scr_dyn_new_num(double)`);
|
|
402
|
+
const cell = B.tmp();
|
|
403
|
+
B.line(`${cell} = call ptr @scr_dyn_new_num(double ${d})`);
|
|
404
|
+
return cell;
|
|
405
|
+
}
|
|
406
|
+
function emitSet(host, e, callee, key) {
|
|
407
|
+
const B = host.B;
|
|
408
|
+
const receiver = emitBorrowedInput(host, e.args[0]);
|
|
409
|
+
// A value the jsval pass left as `js.toDyn(x)` is stored from the jsval
|
|
410
|
+
// itself: a number replaces the value of an unshared number cell in
|
|
411
|
+
// place instead of boxing a new one.
|
|
412
|
+
const stored = e.args[1];
|
|
413
|
+
const word = stored.kind === "libCall" && stored.fn === "js.toDyn"
|
|
414
|
+
? host.emitExpr(stored.args[0]).name
|
|
415
|
+
: null;
|
|
416
|
+
const value = word === null ? emitBorrowedInput(host, stored) : null;
|
|
417
|
+
const name = keyString(host, key, e);
|
|
418
|
+
const ic = host.jsIcSite();
|
|
419
|
+
const object = B.newLabel("ics.obj");
|
|
420
|
+
const probe = B.newLabel("ics.probe");
|
|
421
|
+
const slow = B.newLabel("ics.slow");
|
|
422
|
+
const join = B.newLabel("ics.j");
|
|
423
|
+
// The cell the probe and the helper store when the value is a jsval;
|
|
424
|
+
// the statement's frame releases it.
|
|
425
|
+
let boxedSlot = null;
|
|
426
|
+
if (word !== null) {
|
|
427
|
+
boxedSlot = B.slot();
|
|
428
|
+
B.entryAllocas.push(`${boxedSlot} = alloca ptr`);
|
|
429
|
+
B.line(`store ptr null, ptr ${boxedSlot}`);
|
|
430
|
+
host.ownSlot(boxedSlot, DYN);
|
|
431
|
+
}
|
|
432
|
+
kindIs(host, receiver.name, DYN_KIND.OBJ, object, probe);
|
|
433
|
+
B.startBlock(object);
|
|
434
|
+
const region = load(host, "ptr", receiver.name, 72);
|
|
435
|
+
const outside = B.tmp();
|
|
436
|
+
B.line(`${outside} = icmp eq ptr ${region}, null`);
|
|
437
|
+
const unshared = B.newLabel("ics.r");
|
|
438
|
+
B.condBr(outside, unshared, probe);
|
|
439
|
+
B.startBlock(unshared);
|
|
440
|
+
host.declare(`declare ptr @scr_js_to_dyn_borrow(ptr)`);
|
|
441
|
+
inlineReplace(host, receiver.name, ic, INLINE_WAYS, (slot) => {
|
|
442
|
+
const old = B.tmp();
|
|
443
|
+
B.line(`${old} = load ptr, ptr ${slot}`);
|
|
444
|
+
if (word === null) {
|
|
445
|
+
B.line(`store ptr ${host.retainHeap(value.name, DYN)}, ptr ${slot}`);
|
|
446
|
+
host.releaseHeap(old, DYN);
|
|
447
|
+
B.br(join);
|
|
448
|
+
return;
|
|
449
|
+
}
|
|
450
|
+
const bits = B.tmp();
|
|
451
|
+
const isDouble = B.tmp();
|
|
452
|
+
B.line(`${bits} = ptrtoint ptr ${word} to i64`);
|
|
453
|
+
B.line(`${isDouble} = icmp ult i64 ${bits}, ${JS_BITS.limit}`);
|
|
454
|
+
const number = B.newLabel("ics.dbl");
|
|
455
|
+
const box = B.newLabel("ics.box");
|
|
456
|
+
B.condBr(isDouble, number, box);
|
|
457
|
+
B.startBlock(number);
|
|
458
|
+
const oldKind = load(host, "i32", old, 8);
|
|
459
|
+
const oldRc = load(host, "i64", old, 0);
|
|
460
|
+
const isNumber = B.tmp();
|
|
461
|
+
const unshared = B.tmp();
|
|
462
|
+
const inPlace = B.tmp();
|
|
463
|
+
B.line(`${isNumber} = icmp eq i32 ${oldKind}, ${DYN_KIND.NUM}`);
|
|
464
|
+
B.line(`${unshared} = icmp eq i64 ${oldRc}, 1`);
|
|
465
|
+
B.line(`${inPlace} = and i1 ${isNumber}, ${unshared}`);
|
|
466
|
+
const update = B.newLabel("ics.inplace");
|
|
467
|
+
B.condBr(inPlace, update, box);
|
|
468
|
+
B.startBlock(update);
|
|
469
|
+
const d = B.tmp();
|
|
470
|
+
B.line(`${d} = bitcast i64 ${bits} to double`);
|
|
471
|
+
B.line(`store double ${d}, ptr ${gep(host, old, 16)}`);
|
|
472
|
+
B.br(join);
|
|
473
|
+
B.startBlock(box);
|
|
474
|
+
const cell = B.tmp();
|
|
475
|
+
B.line(`${cell} = call ptr @scr_js_to_dyn_borrow(ptr ${word})`);
|
|
476
|
+
B.line(`store ptr ${cell}, ptr ${slot}`);
|
|
477
|
+
host.releaseHeap(old, DYN);
|
|
478
|
+
B.br(join);
|
|
479
|
+
}, probe);
|
|
480
|
+
B.startBlock(probe);
|
|
481
|
+
let cell;
|
|
482
|
+
if (word !== null) {
|
|
483
|
+
cell = B.tmp();
|
|
484
|
+
B.line(`${cell} = call ptr @scr_js_to_dyn_borrow(ptr ${word})`);
|
|
485
|
+
B.line(`store ptr ${cell}, ptr ${boxedSlot}`);
|
|
486
|
+
}
|
|
487
|
+
else {
|
|
488
|
+
cell = value.name;
|
|
489
|
+
}
|
|
490
|
+
host.declare(`declare zeroext i1 @scr_js_store_probe(ptr, ptr, ptr, ptr)`);
|
|
491
|
+
const done = B.tmp();
|
|
492
|
+
B.line(`${done} = call zeroext i1 @scr_js_store_probe(ptr ${receiver.name}, ptr ${name}, ptr ${cell}, ptr ${ic})`);
|
|
493
|
+
B.condBr(done, join, slow);
|
|
494
|
+
B.startBlock(slow);
|
|
495
|
+
helperCall(host, e, callee, [receiver, { name: cell, type: DYN }]);
|
|
496
|
+
B.br(join);
|
|
497
|
+
B.startBlock(join);
|
|
498
|
+
return { name: "", type: e.type };
|
|
499
|
+
}
|
|
500
|
+
function numberKey(host, key) {
|
|
501
|
+
if (key.kind !== "dynFrom" || key.liveRef !== undefined || key.fnName !== undefined)
|
|
502
|
+
return null;
|
|
503
|
+
const source = key.value;
|
|
504
|
+
if (source.type.kind === "f64") {
|
|
505
|
+
const value = host.emitExpr(source).name;
|
|
506
|
+
// Request the converter where the boxing it replaces did: converters
|
|
507
|
+
// are numbered in request order.
|
|
508
|
+
const conv = host.dyn.toDynHelper(source.type);
|
|
509
|
+
return {
|
|
510
|
+
present: "true",
|
|
511
|
+
value,
|
|
512
|
+
box: () => {
|
|
513
|
+
const cell = host.B.tmp();
|
|
514
|
+
host.B.line(`${cell} = call ptr @${conv}(double ${value})`);
|
|
515
|
+
return cell;
|
|
516
|
+
},
|
|
517
|
+
};
|
|
518
|
+
}
|
|
519
|
+
if (source.type.kind !== "union" || source.kind !== "varRef")
|
|
520
|
+
return null;
|
|
521
|
+
const unionId = source.type.unionId;
|
|
522
|
+
const tag = host.unionsById.get(unionId)?.arms.findIndex((arm) => arm.kind === "f64") ?? -1;
|
|
523
|
+
if (tag < 0)
|
|
524
|
+
return null;
|
|
525
|
+
const B = host.B;
|
|
526
|
+
const present = host.emitExpr({
|
|
527
|
+
kind: "unionIsTag",
|
|
528
|
+
unionId,
|
|
529
|
+
tag,
|
|
530
|
+
negated: false,
|
|
531
|
+
value: source,
|
|
532
|
+
type: BOOL,
|
|
533
|
+
loc: key.loc,
|
|
534
|
+
}).name;
|
|
535
|
+
const slot = B.slot();
|
|
536
|
+
B.entryAllocas.push(`${slot} = alloca double`);
|
|
537
|
+
B.line(`store double 0.0, ptr ${slot}`);
|
|
538
|
+
const number = B.newLabel("ick.k");
|
|
539
|
+
const done = B.newLabel("ick.kd");
|
|
540
|
+
B.condBr(present, number, done);
|
|
541
|
+
B.startBlock(number);
|
|
542
|
+
// Temps of a conditional block are released in it.
|
|
543
|
+
host.frames.push([]);
|
|
544
|
+
const d = host.emitExpr({
|
|
545
|
+
kind: "unionNarrow",
|
|
546
|
+
unionId,
|
|
547
|
+
tag,
|
|
548
|
+
value: source,
|
|
549
|
+
type: F64,
|
|
550
|
+
loc: key.loc,
|
|
551
|
+
});
|
|
552
|
+
B.line(`store double ${d.name}, ptr ${slot}`);
|
|
553
|
+
host.releaseTemps(host.frames.pop());
|
|
554
|
+
B.br(done);
|
|
555
|
+
B.startBlock(done);
|
|
556
|
+
const value = B.tmp();
|
|
557
|
+
B.line(`${value} = load double, ptr ${slot}`);
|
|
558
|
+
return {
|
|
559
|
+
present,
|
|
560
|
+
value,
|
|
561
|
+
box: () => {
|
|
562
|
+
// The local is a plain read: boxing it again evaluates nothing else.
|
|
563
|
+
host.frames.push([]);
|
|
564
|
+
const boxed = host.emitExpr(key);
|
|
565
|
+
host.toFrame(boxed);
|
|
566
|
+
host.releaseTemps(host.frames.pop());
|
|
567
|
+
return boxed.name;
|
|
568
|
+
},
|
|
569
|
+
};
|
|
570
|
+
}
|
|
571
|
+
function emitKeyed(host, e, callee) {
|
|
572
|
+
const B = host.B;
|
|
573
|
+
const receiver = emitBorrowedInput(host, e.args[0]);
|
|
574
|
+
const keyExpr = e.args[1];
|
|
575
|
+
const numeric = numberKey(host, keyExpr);
|
|
576
|
+
const key = numeric === null ? emitBorrowedInput(host, keyExpr) : null;
|
|
577
|
+
const ic = host.jsIcSite();
|
|
578
|
+
const array = B.newLabel("ick.arr");
|
|
579
|
+
const number = B.newLabel("ick.num");
|
|
580
|
+
const probe = B.newLabel("ick.probe");
|
|
581
|
+
const slow = B.newLabel("ick.slow");
|
|
582
|
+
const join = B.newLabel("ick.j");
|
|
583
|
+
const incoming = [];
|
|
584
|
+
// The boxed key of the miss paths when the site indexes with a double;
|
|
585
|
+
// the statement's frame releases it.
|
|
586
|
+
let keySlot = null;
|
|
587
|
+
if (numeric !== null) {
|
|
588
|
+
keySlot = B.slot();
|
|
589
|
+
B.entryAllocas.push(`${keySlot} = alloca ptr`);
|
|
590
|
+
B.line(`store ptr null, ptr ${keySlot}`);
|
|
591
|
+
host.ownSlot(keySlot, DYN);
|
|
592
|
+
}
|
|
593
|
+
kindIs(host, receiver.name, DYN_KIND.ARR, array, probe);
|
|
594
|
+
B.startBlock(array);
|
|
595
|
+
let index;
|
|
596
|
+
if (numeric === null) {
|
|
597
|
+
kindIs(host, key.name, DYN_KIND.NUM, number, probe);
|
|
598
|
+
B.startBlock(number);
|
|
599
|
+
index = load(host, "double", key.name, 16);
|
|
600
|
+
}
|
|
601
|
+
else {
|
|
602
|
+
B.condBr(numeric.present, number, probe);
|
|
603
|
+
B.startBlock(number);
|
|
604
|
+
index = numeric.value;
|
|
605
|
+
}
|
|
606
|
+
const len = load(host, "i64", receiver.name, 16);
|
|
607
|
+
const i = B.tmp();
|
|
608
|
+
const back = B.tmp();
|
|
609
|
+
const integral = B.tmp();
|
|
610
|
+
const inRange = B.tmp();
|
|
611
|
+
const nonNegative = B.tmp();
|
|
612
|
+
const ok1 = B.tmp();
|
|
613
|
+
const ok2 = B.tmp();
|
|
614
|
+
// fptoui of a negative or out-of-range double is poison: test the
|
|
615
|
+
// double's range before trusting the integer.
|
|
616
|
+
B.line(`${nonNegative} = fcmp oge double ${index}, 0.0`);
|
|
617
|
+
const lenD = B.tmp();
|
|
618
|
+
B.line(`${lenD} = uitofp i64 ${len} to double`);
|
|
619
|
+
B.line(`${inRange} = fcmp olt double ${index}, ${lenD}`);
|
|
620
|
+
B.line(`${ok1} = and i1 ${nonNegative}, ${inRange}`);
|
|
621
|
+
const ranged = B.newLabel("ick.rng");
|
|
622
|
+
B.condBr(ok1, ranged, probe);
|
|
623
|
+
B.startBlock(ranged);
|
|
624
|
+
B.line(`${i} = fptoui double ${index} to i64`);
|
|
625
|
+
B.line(`${back} = uitofp i64 ${i} to double`);
|
|
626
|
+
B.line(`${integral} = fcmp oeq double ${back}, ${index}`);
|
|
627
|
+
const presence = load(host, "ptr", receiver.name, 56);
|
|
628
|
+
const dense = B.tmp();
|
|
629
|
+
B.line(`${dense} = icmp eq ptr ${presence}, null`);
|
|
630
|
+
B.line(`${ok2} = and i1 ${integral}, ${dense}`);
|
|
631
|
+
const hit = B.newLabel("ick.hit");
|
|
632
|
+
B.condBr(ok2, hit, probe);
|
|
633
|
+
B.startBlock(hit);
|
|
634
|
+
const items = load(host, "ptr", receiver.name, 32);
|
|
635
|
+
const itemPtr = B.tmp();
|
|
636
|
+
B.line(`${itemPtr} = getelementptr inbounds ptr, ptr ${items}, i64 ${i}`);
|
|
637
|
+
const item = B.tmp();
|
|
638
|
+
B.line(`${item} = load ptr, ptr ${itemPtr}`);
|
|
639
|
+
const itemEnd = B.currentLabel();
|
|
640
|
+
const shared = B.newLabel("ick.shared");
|
|
641
|
+
B.br(shared);
|
|
642
|
+
B.startBlock(probe);
|
|
643
|
+
let keyCell;
|
|
644
|
+
if (numeric === null) {
|
|
645
|
+
keyCell = key.name;
|
|
646
|
+
}
|
|
647
|
+
else {
|
|
648
|
+
keyCell = numeric.box();
|
|
649
|
+
B.line(`store ptr ${keyCell}, ptr ${keySlot}`);
|
|
650
|
+
}
|
|
651
|
+
host.declare(`declare ptr @scr_js_keyed_probe(ptr, ptr, ptr)`);
|
|
652
|
+
const probed = B.tmp();
|
|
653
|
+
B.line(`${probed} = call ptr @scr_js_keyed_probe(ptr ${receiver.name}, ptr ${keyCell}, ptr ${ic})`);
|
|
654
|
+
const found = B.tmp();
|
|
655
|
+
B.line(`${found} = icmp ne ptr ${probed}, null`);
|
|
656
|
+
const probeEnd = B.currentLabel();
|
|
657
|
+
B.condBr(found, shared, slow);
|
|
658
|
+
B.startBlock(shared);
|
|
659
|
+
{
|
|
660
|
+
const cell = B.tmp();
|
|
661
|
+
const owned = B.tmp();
|
|
662
|
+
B.line(`${cell} = phi ptr [ ${item}, %${itemEnd} ], [ ${probed}, %${probeEnd} ]`);
|
|
663
|
+
B.line(`${owned} = phi i1 [ false, %${itemEnd} ], [ true, %${probeEnd} ]`);
|
|
664
|
+
const out = asResult(host, cell, e, owned);
|
|
665
|
+
incoming.push(`[ ${out}, %${B.currentLabel()} ]`);
|
|
666
|
+
}
|
|
667
|
+
B.br(join);
|
|
668
|
+
B.startBlock(slow);
|
|
669
|
+
const result = helperCall(host, e, callee, [receiver, { name: keyCell, type: DYN }]);
|
|
670
|
+
incoming.push(`[ ${result}, %${B.currentLabel()} ]`);
|
|
671
|
+
B.br(join);
|
|
672
|
+
B.startBlock(join);
|
|
673
|
+
const out = B.tmp();
|
|
674
|
+
B.line(`${out} = phi ptr ${incoming.join(", ")}`);
|
|
675
|
+
return host.own({ name: out, type: e.type });
|
|
676
|
+
}
|
|
677
|
+
/** dynInvoke's method read on an ordinary object through the site's
|
|
678
|
+
* cache, else scr_dyn_prepare_method. Returns the owned method (or NULL,
|
|
679
|
+
* which scr_dyn_invoke_prepared answers with the full dispatch). */
|
|
680
|
+
export function emitJsIcMethod(host, e, receiver) {
|
|
681
|
+
const B = host.B;
|
|
682
|
+
const method = e.method;
|
|
683
|
+
const ic = host.jsIcSite();
|
|
684
|
+
const name = keyString(host, method, e);
|
|
685
|
+
host.declare(`declare ptr @scr_js_load_probe(ptr, ptr, ptr)`);
|
|
686
|
+
host.declare(`declare ptr @scr_dyn_prepare_method(ptr, ptr)`);
|
|
687
|
+
const object = B.newLabel("icm.obj");
|
|
688
|
+
const probe = B.newLabel("icm.probe");
|
|
689
|
+
const slow = B.newLabel("icm.slow");
|
|
690
|
+
const join = B.newLabel("icm.j");
|
|
691
|
+
const incoming = [];
|
|
692
|
+
kindIs(host, receiver, DYN_KIND.OBJ, object, probe);
|
|
693
|
+
B.startBlock(object);
|
|
694
|
+
inlineLoad(host, receiver, ic, INLINE_WAYS, INLINE_PROTO, (cell) => host.retainFrame(cell, DYN), incoming, join, probe);
|
|
695
|
+
B.startBlock(probe);
|
|
696
|
+
const probed = B.tmp();
|
|
697
|
+
B.line(`${probed} = call ptr @scr_js_load_probe(ptr ${receiver}, ptr ${name}, ptr ${ic})`);
|
|
698
|
+
const found = B.tmp();
|
|
699
|
+
B.line(`${found} = icmp ne ptr ${probed}, null`);
|
|
700
|
+
incoming.push(`[ ${probed}, %${B.currentLabel()} ]`);
|
|
701
|
+
B.condBr(found, join, slow);
|
|
702
|
+
B.startBlock(slow);
|
|
703
|
+
const prepared = B.tmp();
|
|
704
|
+
B.line(`${prepared} = call ptr @scr_dyn_prepare_method(ptr ${receiver}, ptr ${host.cstr(method)}) cold`);
|
|
705
|
+
incoming.push(`[ ${prepared}, %${B.currentLabel()} ]`);
|
|
706
|
+
B.br(join);
|
|
707
|
+
B.startBlock(join);
|
|
708
|
+
const out = B.tmp();
|
|
709
|
+
B.line(`${out} = phi ptr ${incoming.join(", ")}`);
|
|
710
|
+
return out;
|
|
711
|
+
}
|
|
712
|
+
//# sourceMappingURL=js-ic.js.map
|