@scriptc/compiler 0.2.10 → 0.3.0
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 +2 -36
- package/ambient/scriptc-overrides.d.ts +1 -25
- package/ambient/scriptc.d.ts +1 -9
- package/dist/backend/cycle-analysis.test.js +1 -1
- package/dist/backend/cycle-mutability.d.ts +1 -1
- package/dist/backend/cycle-mutability.js +1 -18
- package/dist/backend/cycle-mutability.js.map +1 -1
- package/dist/backend/executable-features.d.ts +1 -1
- package/dist/backend/executable-features.js +3 -8
- package/dist/backend/executable-features.js.map +1 -1
- package/dist/backend/immutability.d.ts +1 -1
- package/dist/backend/immutability.js +1 -1
- package/dist/backend/immutability.test.js +1 -1
- package/dist/backend/library-pack.js +0 -2
- package/dist/backend/library-pack.js.map +1 -1
- package/dist/backend/linker.js +1 -1
- package/dist/backend/linker.js.map +1 -1
- package/dist/backend/llvm/checked-narrows.test.js +1 -1
- package/dist/backend/llvm/classes.js +3 -9
- package/dist/backend/llvm/classes.js.map +1 -1
- package/dist/backend/llvm/classes.test.js +7 -7
- package/dist/backend/llvm/constant-callbacks.d.ts +1 -1
- package/dist/backend/llvm/constant-callbacks.js +3 -3
- package/dist/backend/llvm/constant-callbacks.js.map +1 -1
- package/dist/backend/llvm/constant-callbacks.test.js +1 -1
- package/dist/backend/llvm/dense-array-access.test.js +1 -1
- package/dist/backend/llvm/dyn.d.ts +0 -1
- package/dist/backend/llvm/dyn.js +0 -73
- package/dist/backend/llvm/dyn.js.map +1 -1
- package/dist/backend/llvm/emitter.d.ts +3 -17
- package/dist/backend/llvm/emitter.js +53 -181
- package/dist/backend/llvm/emitter.js.map +1 -1
- package/dist/backend/llvm/emitter.test.js +3 -3
- package/dist/backend/llvm/expr-async.test.js +1 -1
- package/dist/backend/llvm/expr-containers.js +12 -8
- package/dist/backend/llvm/expr-containers.js.map +1 -1
- package/dist/backend/llvm/expr-control.js +4 -107
- package/dist/backend/llvm/expr-control.js.map +1 -1
- package/dist/backend/llvm/expr-dispatch.d.ts +1 -2
- package/dist/backend/llvm/expr-dispatch.js +0 -41
- package/dist/backend/llvm/expr-dispatch.js.map +1 -1
- package/dist/backend/llvm/expr-dynamic.d.ts +1 -1
- package/dist/backend/llvm/expr-dynamic.js +13 -27
- package/dist/backend/llvm/expr-dynamic.js.map +1 -1
- package/dist/backend/llvm/expr-primitives.test.js +2 -2
- package/dist/backend/llvm/expr-stream-bridges.test.js +1 -1
- package/dist/backend/llvm/lib-dispatch.js +0 -1
- package/dist/backend/llvm/lib-dispatch.js.map +1 -1
- package/dist/backend/llvm/lib-filesystem.js +0 -13
- package/dist/backend/llvm/lib-filesystem.js.map +1 -1
- package/dist/backend/llvm/lib-shared.js +0 -8
- package/dist/backend/llvm/lib-shared.js.map +1 -1
- package/dist/backend/llvm/local-array-reads.test.js +1 -1
- package/dist/backend/llvm/local-union-storage.test.js +1 -1
- package/dist/backend/llvm/map-number-lookup.d.ts +7 -0
- package/dist/backend/llvm/map-number-lookup.js +16 -2
- package/dist/backend/llvm/map-number-lookup.js.map +1 -1
- package/dist/backend/llvm/map-read-lifetimes.js +7 -1
- package/dist/backend/llvm/map-read-lifetimes.js.map +1 -1
- package/dist/backend/llvm/map-read-lifetimes.test.js +24 -7
- package/dist/backend/llvm/map-read-lifetimes.test.js.map +1 -1
- package/dist/backend/llvm/shapes.js +1 -2
- package/dist/backend/llvm/shapes.js.map +1 -1
- package/dist/backend/llvm/shapes.test.js +3 -3
- package/dist/backend/llvm/stack-unions.test.js +1 -1
- package/dist/backend/llvm/string-construction.test.js +1 -1
- package/dist/backend/llvm/string-lifetimes.test.js +1 -1
- package/dist/backend/llvm/switch-dispatch.test.js +1 -1
- package/dist/backend/may-throw.js +0 -9
- package/dist/backend/may-throw.js.map +1 -1
- package/dist/backend/may-throw.test.js +1 -1
- package/dist/backend/native/artifact-stamps.js +0 -2
- package/dist/backend/native/artifact-stamps.js.map +1 -1
- package/dist/backend/native/cache-warm.d.ts +1 -1
- package/dist/backend/native/cache-warm.js +2 -3
- package/dist/backend/native/cache-warm.js.map +1 -1
- package/dist/backend/native/compiler-fingerprint.d.ts +1 -1
- package/dist/backend/native/compiler-fingerprint.js +4 -7
- package/dist/backend/native/compiler-fingerprint.js.map +1 -1
- package/dist/backend/native/contracts.d.ts +3 -28
- package/dist/backend/native/driver.js +1 -3
- package/dist/backend/native/driver.js.map +1 -1
- package/dist/backend/native/executable.d.ts +0 -15
- package/dist/backend/native/executable.js +17 -172
- package/dist/backend/native/executable.js.map +1 -1
- package/dist/backend/native/tool-identity.js +0 -1
- package/dist/backend/native/tool-identity.js.map +1 -1
- package/dist/backend/native/vendor.d.ts +1 -1
- package/dist/backend/native/vendor.js +1 -1
- package/dist/backend/native/vendor.js.map +1 -1
- package/dist/backend/native-link-info-core.d.ts +0 -2
- package/dist/backend/native-link-info-core.js.map +1 -1
- package/dist/backend/native-toolchain.test.js +23 -33
- package/dist/backend/native-toolchain.test.js.map +1 -1
- package/dist/backend/publication.test.js +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 +1 -2
- package/dist/backend/runtime-pack-core.js +5 -14
- package/dist/backend/runtime-pack-core.js.map +1 -1
- package/dist/backend/runtime-pack-targets.test.js +3 -8
- package/dist/backend/runtime-pack-targets.test.js.map +1 -1
- package/dist/backend/runtime-pack.test.js +22 -19
- package/dist/backend/runtime-pack.test.js.map +1 -1
- package/dist/backend/target-diagnostics.d.ts +0 -5
- package/dist/backend/target-diagnostics.js +1 -11
- package/dist/backend/target-diagnostics.js.map +1 -1
- package/dist/backend/target-diagnostics.test.js +1 -1
- package/dist/backend/vendor-archives.d.ts +1 -7
- package/dist/backend/vendor-archives.js +9 -189
- package/dist/backend/vendor-archives.js.map +1 -1
- package/dist/backend/vendor-inputs.d.ts +0 -1
- package/dist/backend/vendor-inputs.js +0 -1
- package/dist/backend/vendor-inputs.js.map +1 -1
- package/dist/backend/warm-cache.js +3 -5
- package/dist/backend/warm-cache.js.map +1 -1
- package/dist/cli/command.js +4 -8
- package/dist/cli/command.js.map +1 -1
- package/dist/cli/host.d.ts +1 -1
- package/dist/cli/usage.d.ts +1 -5
- package/dist/cli/usage.js +4 -9
- package/dist/cli/usage.js.map +1 -1
- package/dist/compat/fetch-profile.d.ts +2 -2
- package/dist/compat/fetch-profile.js +16 -25
- package/dist/compat/fetch-profile.js.map +1 -1
- package/dist/compile-types.d.ts +2 -17
- package/dist/contracts/check.js +2 -6
- package/dist/contracts/check.js.map +1 -1
- package/dist/coverage/report.d.ts +5 -22
- package/dist/coverage/report.js +12 -76
- package/dist/coverage/report.js.map +1 -1
- package/dist/coverage/surface-manifest.d.ts +3 -3
- package/dist/coverage/surface-manifest.js +22 -27
- package/dist/coverage/surface-manifest.js.map +1 -1
- package/dist/coverage/verdict-cache.d.ts +1 -3
- package/dist/coverage/verdict-cache.js +2 -7
- package/dist/coverage/verdict-cache.js.map +1 -1
- package/dist/diagnostics/diagnostic.d.ts +11 -60
- package/dist/diagnostics/diagnostic.js +39 -118
- package/dist/diagnostics/diagnostic.js.map +1 -1
- package/dist/diagnostics/envelope.d.ts +3 -4
- package/dist/diagnostics/envelope.js +0 -9
- package/dist/diagnostics/envelope.js.map +1 -1
- package/dist/diagnostics/envelope.test.js +1 -1
- package/dist/diagnostics/envelope.test.js.map +1 -1
- package/dist/executable/executable-cache.d.ts +0 -3
- package/dist/executable/executable-cache.js +2 -4
- package/dist/executable/executable-cache.js.map +1 -1
- package/dist/executable/executable-cache.test.js +0 -4
- package/dist/executable/executable-cache.test.js.map +1 -1
- package/dist/executable/prepare.js +5 -2
- package/dist/executable/prepare.js.map +1 -1
- package/dist/frontend/analysis.js +10 -10
- package/dist/frontend/analysis.js.map +1 -1
- package/dist/frontend/cjs-syntax.js +0 -88
- package/dist/frontend/cjs-syntax.js.map +1 -1
- package/dist/frontend/dts-paths.d.ts +1 -1
- package/dist/frontend/dts-paths.js +1 -1
- package/dist/frontend/lowering/abstract-equality.js +1 -4
- package/dist/frontend/lowering/abstract-equality.js.map +1 -1
- package/dist/frontend/lowering/array-values.js +4 -11
- package/dist/frontend/lowering/array-values.js.map +1 -1
- package/dist/frontend/lowering/builtins/arguments.js +0 -13
- package/dist/frontend/lowering/builtins/arguments.js.map +1 -1
- package/dist/frontend/lowering/builtins/crypto.d.ts +0 -4
- package/dist/frontend/lowering/builtins/crypto.js +0 -4
- package/dist/frontend/lowering/builtins/crypto.js.map +1 -1
- package/dist/frontend/lowering/builtins/json.js +1 -39
- package/dist/frontend/lowering/builtins/json.js.map +1 -1
- package/dist/frontend/lowering/builtins/module-resolution.d.ts +0 -15
- package/dist/frontend/lowering/builtins/module-resolution.js +5 -44
- package/dist/frontend/lowering/builtins/module-resolution.js.map +1 -1
- package/dist/frontend/lowering/builtins/numbers.d.ts +0 -6
- package/dist/frontend/lowering/builtins/numbers.js +6 -57
- package/dist/frontend/lowering/builtins/numbers.js.map +1 -1
- package/dist/frontend/lowering/builtins/promises.js +4 -67
- package/dist/frontend/lowering/builtins/promises.js.map +1 -1
- package/dist/frontend/lowering/builtins/workers.js +1 -1
- package/dist/frontend/lowering/builtins/workers.js.map +1 -1
- package/dist/frontend/lowering/call-arguments.d.ts +1 -37
- package/dist/frontend/lowering/call-arguments.js +11 -94
- package/dist/frontend/lowering/call-arguments.js.map +1 -1
- package/dist/frontend/lowering/call-signatures.d.ts +1 -6
- package/dist/frontend/lowering/call-signatures.js +16 -68
- package/dist/frontend/lowering/call-signatures.js.map +1 -1
- package/dist/frontend/lowering/class-dynamic-dispatch.d.ts +19 -4
- package/dist/frontend/lowering/class-dynamic-dispatch.js +168 -98
- package/dist/frontend/lowering/class-dynamic-dispatch.js.map +1 -1
- package/dist/frontend/lowering/class-dynamic-dispatch.test.js +44 -4
- package/dist/frontend/lowering/class-dynamic-dispatch.test.js.map +1 -1
- package/dist/frontend/lowering/class-method-mutations.js +0 -2
- package/dist/frontend/lowering/class-method-mutations.js.map +1 -1
- package/dist/frontend/lowering/class-protocols.js +1 -1
- package/dist/frontend/lowering/class-protocols.js.map +1 -1
- package/dist/frontend/lowering/coercions/function-adapters.js +5 -35
- package/dist/frontend/lowering/coercions/function-adapters.js.map +1 -1
- package/dist/frontend/lowering/coercions/state.d.ts +0 -1
- package/dist/frontend/lowering/coercions/state.js +0 -1
- package/dist/frontend/lowering/coercions/state.js.map +1 -1
- package/dist/frontend/lowering/coercions/structural-plans.js +2 -4
- package/dist/frontend/lowering/coercions/structural-plans.js.map +1 -1
- package/dist/frontend/lowering/coercions/structural.js +2 -12
- package/dist/frontend/lowering/coercions/structural.js.map +1 -1
- package/dist/frontend/lowering/coercions/unions.js +0 -1
- package/dist/frontend/lowering/coercions/unions.js.map +1 -1
- package/dist/frontend/lowering/containers/array-callbacks.js +9 -28
- package/dist/frontend/lowering/containers/array-callbacks.js.map +1 -1
- package/dist/frontend/lowering/containers/array-construction.js +2 -3
- package/dist/frontend/lowering/containers/array-construction.js.map +1 -1
- package/dist/frontend/lowering/containers/array-methods.js +10 -54
- package/dist/frontend/lowering/containers/array-methods.js.map +1 -1
- package/dist/frontend/lowering/containers/bytes.js +0 -1
- package/dist/frontend/lowering/containers/bytes.js.map +1 -1
- package/dist/frontend/lowering/containers/callback-arguments.js +2 -10
- package/dist/frontend/lowering/containers/callback-arguments.js.map +1 -1
- package/dist/frontend/lowering/containers/collection-methods.js +1 -6
- package/dist/frontend/lowering/containers/collection-methods.js.map +1 -1
- package/dist/frontend/lowering/containers/indexed-objects.js +0 -2
- package/dist/frontend/lowering/containers/indexed-objects.js.map +1 -1
- package/dist/frontend/lowering/containers/string-and-regexp.d.ts +0 -6
- package/dist/frontend/lowering/containers/string-and-regexp.js +2 -10
- package/dist/frontend/lowering/containers/string-and-regexp.js.map +1 -1
- package/dist/frontend/lowering/expressions/evaluation-safety.js +0 -3
- package/dist/frontend/lowering/expressions/evaluation-safety.js.map +1 -1
- package/dist/frontend/lowering/expressions/native-proxy.js +1 -1
- package/dist/frontend/lowering/expressions/native-proxy.js.map +1 -1
- package/dist/frontend/lowering/expressions/nullish-assignment.js +0 -1
- package/dist/frontend/lowering/expressions/nullish-assignment.js.map +1 -1
- package/dist/frontend/lowering/expressions/object-literals.d.ts +0 -8
- package/dist/frontend/lowering/expressions/object-literals.js +8 -35
- package/dist/frontend/lowering/expressions/object-literals.js.map +1 -1
- package/dist/frontend/lowering/expressions/optional-chains.d.ts +0 -4
- package/dist/frontend/lowering/expressions/optional-chains.js +3 -66
- package/dist/frontend/lowering/expressions/optional-chains.js.map +1 -1
- package/dist/frontend/lowering/function-context.js +0 -1
- package/dist/frontend/lowering/function-context.js.map +1 -1
- package/dist/frontend/lowering/generic-functions.js +0 -1
- package/dist/frontend/lowering/generic-functions.js.map +1 -1
- package/dist/frontend/lowering/lib-boundary.js +10 -77
- package/dist/frontend/lowering/lib-boundary.js.map +1 -1
- package/dist/frontend/lowering/lower-array-sort.js +1 -10
- package/dist/frontend/lowering/lower-array-sort.js.map +1 -1
- package/dist/frontend/lowering/lower-array-sort.test.js +2 -2
- package/dist/frontend/lowering/lower-array-sort.test.js.map +1 -1
- package/dist/frontend/lowering/lower-assert.js +2 -3
- package/dist/frontend/lowering/lower-assert.js.map +1 -1
- package/dist/frontend/lowering/lower-async-iteration.js +1 -1
- package/dist/frontend/lowering/lower-calls.d.ts +2 -27
- package/dist/frontend/lowering/lower-calls.js +47 -463
- package/dist/frontend/lowering/lower-calls.js.map +1 -1
- package/dist/frontend/lowering/lower-classes.js +11 -49
- package/dist/frontend/lowering/lower-classes.js.map +1 -1
- package/dist/frontend/lowering/lower-comptime.js +2 -3
- package/dist/frontend/lowering/lower-comptime.js.map +1 -1
- package/dist/frontend/lowering/lower-enums.js +5 -8
- package/dist/frontend/lowering/lower-enums.js.map +1 -1
- package/dist/frontend/lowering/lower-event-emitter.js +3 -4
- package/dist/frontend/lowering/lower-event-emitter.js.map +1 -1
- package/dist/frontend/lowering/lower-expando.js +3 -5
- package/dist/frontend/lowering/lower-expando.js.map +1 -1
- package/dist/frontend/lowering/lower-exprs.d.ts +0 -8
- package/dist/frontend/lowering/lower-exprs.js +50 -907
- package/dist/frontend/lowering/lower-exprs.js.map +1 -1
- package/dist/frontend/lowering/lower-functions.js +2 -5
- package/dist/frontend/lowering/lower-functions.js.map +1 -1
- package/dist/frontend/lowering/lower-inspect.js +1 -50
- package/dist/frontend/lowering/lower-inspect.js.map +1 -1
- package/dist/frontend/lowering/lower-modules.d.ts +0 -43
- package/dist/frontend/lowering/lower-modules.js +25 -329
- package/dist/frontend/lowering/lower-modules.js.map +1 -1
- package/dist/frontend/lowering/lower-modules.test.js +5 -5
- package/dist/frontend/lowering/lower-modules.test.js.map +1 -1
- package/dist/frontend/lowering/lower-server.js +0 -30
- package/dist/frontend/lowering/lower-server.js.map +1 -1
- package/dist/frontend/lowering/lower-stdlib.d.ts +98 -0
- package/dist/frontend/lowering/{lower-island.js → lower-stdlib.js} +97 -1160
- package/dist/frontend/lowering/lower-stdlib.js.map +1 -0
- package/dist/frontend/lowering/lower-stmts.d.ts +0 -16
- package/dist/frontend/lowering/lower-stmts.js +58 -1016
- package/dist/frontend/lowering/lower-stmts.js.map +1 -1
- package/dist/frontend/lowering/lower-stmts.test.js +1 -1
- package/dist/frontend/lowering/lower-stmts.test.js.map +1 -1
- package/dist/frontend/lowering/lower-stream.js +1 -3
- package/dist/frontend/lowering/lower-stream.js.map +1 -1
- package/dist/frontend/lowering/lowerer.d.ts +17 -151
- package/dist/frontend/lowering/lowerer.js +73 -770
- package/dist/frontend/lowering/lowerer.js.map +1 -1
- package/dist/frontend/lowering/lowerer.test.js +4 -51
- package/dist/frontend/lowering/lowerer.test.js.map +1 -1
- package/dist/frontend/lowering/narrowing-stability.js +1 -1
- package/dist/frontend/lowering/narrowing-stability.js.map +1 -1
- package/dist/frontend/lowering/optional-arguments.js +0 -2
- package/dist/frontend/lowering/optional-arguments.js.map +1 -1
- package/dist/frontend/lowering/sanitize-class-types.test.js +2 -2
- package/dist/frontend/lowering/strict-equality.js +1 -1
- package/dist/frontend/lowering/strict-equality.js.map +1 -1
- package/dist/frontend/lowering/surfaces.d.ts +6 -45
- package/dist/frontend/lowering/surfaces.js +5 -65
- package/dist/frontend/lowering/surfaces.js.map +1 -1
- package/dist/frontend/module-syntax.d.ts +0 -3
- package/dist/frontend/module-syntax.js.map +1 -1
- package/dist/frontend/npm-node.d.ts +0 -7
- package/dist/frontend/npm-node.js +0 -7
- package/dist/frontend/npm-node.js.map +1 -1
- package/dist/frontend/npm-static-rewrite-syntax.d.ts +1 -1
- package/dist/frontend/npm-static-rewrite-syntax.js +6 -82
- package/dist/frontend/npm-static-rewrite-syntax.js.map +1 -1
- package/dist/frontend/npm-static.d.ts +1 -1
- package/dist/frontend/npm-static.js +6 -71
- package/dist/frontend/npm-static.js.map +1 -1
- package/dist/frontend/npm.d.ts +3 -319
- package/dist/frontend/npm.js +6 -1007
- package/dist/frontend/npm.js.map +1 -1
- package/dist/frontend/npm.test.js +2 -197
- package/dist/frontend/npm.test.js.map +1 -1
- package/dist/frontend/pipeline-native.js +1 -2
- package/dist/frontend/pipeline-native.js.map +1 -1
- package/dist/frontend/pipeline.d.ts +3 -11
- package/dist/frontend/pipeline.js +37 -56
- package/dist/frontend/pipeline.js.map +1 -1
- package/dist/frontend/pipeline.test.js +12 -6
- package/dist/frontend/pipeline.test.js.map +1 -1
- package/dist/frontend/program.d.ts +0 -34
- package/dist/frontend/program.js +12 -97
- package/dist/frontend/program.js.map +1 -1
- package/dist/frontend/provenance-core.d.ts +0 -4
- package/dist/frontend/provenance-core.js +4 -37
- package/dist/frontend/provenance-core.js.map +1 -1
- package/dist/frontend/provenance-registry.d.ts +0 -4
- package/dist/frontend/provenance-registry.js +0 -20
- package/dist/frontend/provenance-registry.js.map +1 -1
- package/dist/frontend/resolve.d.ts +0 -12
- package/dist/frontend/resolve.js +0 -34
- package/dist/frontend/resolve.js.map +1 -1
- package/dist/frontend/runtime-resolve.js +2 -2
- package/dist/frontend/runtime-resolve.js.map +1 -1
- package/dist/frontend/services-node.js +2 -3
- package/dist/frontend/services-node.js.map +1 -1
- package/dist/frontend/services.d.ts +1 -8
- package/dist/frontend/services.js +2 -22
- package/dist/frontend/services.js.map +1 -1
- package/dist/frontend/services.test.js +0 -38
- package/dist/frontend/services.test.js.map +1 -1
- package/dist/frontend/tsc-codes.js +0 -11
- package/dist/frontend/tsc-codes.js.map +1 -1
- package/dist/frontend/type-mapper.d.ts +2 -27
- package/dist/frontend/type-mapper.js +42 -153
- package/dist/frontend/type-mapper.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +7 -10
- package/dist/index.js.map +1 -1
- package/dist/ir/api.d.ts +1 -1
- package/dist/ir/api.js +1 -1
- package/dist/ir/api.js.map +1 -1
- package/dist/ir/builtin-effects.js +0 -5
- package/dist/ir/builtin-effects.js.map +1 -1
- package/dist/ir/builtin-signatures.d.ts +1 -1
- package/dist/ir/builtin-signatures.js +1 -55
- package/dist/ir/builtin-signatures.js.map +1 -1
- package/dist/ir/constant-globals.test.js +1 -1
- package/dist/ir/constant-tables.test.js +1 -1
- package/dist/ir/final-fields.test.js +1 -1
- package/dist/ir/initializer-bindings.test.js +1 -1
- package/dist/ir/int32-slots.d.ts +3 -3
- package/dist/ir/int32-slots.js +5 -19
- package/dist/ir/int32-slots.js.map +1 -1
- package/dist/ir/int32-slots.test.js +1 -1
- package/dist/ir/ir.d.ts +12 -284
- package/dist/ir/ir.js +10 -259
- package/dist/ir/ir.js.map +1 -1
- package/dist/ir/ir.test.js +2 -7
- package/dist/ir/ir.test.js.map +1 -1
- package/dist/ir/runtime-features.d.ts +3 -30
- package/dist/ir/runtime-features.js +5 -41
- package/dist/ir/runtime-features.js.map +1 -1
- package/dist/ir/scalar-records.test.js +1 -1
- package/dist/ir/serialize.d.ts +1 -1
- package/dist/ir/serialize.js +3 -3
- package/dist/ir/serialize.js.map +1 -1
- package/dist/ir/traverse.js +0 -21
- package/dist/ir/traverse.js.map +1 -1
- package/dist/ir/unshare.test.js +1 -1
- package/dist/ir/validate.js +9 -207
- package/dist/ir/validate.js.map +1 -1
- package/dist/ir/validate.test.js +6 -6
- package/dist/library/fence-eval.test.js +1 -1
- package/dist/library/int-infer.test.js +4 -4
- package/dist/library/library-cache.test.js +5 -5
- package/dist/library/prepare.js +5 -20
- package/dist/library/prepare.js.map +1 -1
- package/dist/native/cli.js +0 -2
- package/dist/native/cli.js.map +1 -1
- package/dist/native/compiler.test.js +2 -4
- package/dist/native/compiler.test.js.map +1 -1
- package/dist/native/prepare.js +2 -4
- package/dist/native/prepare.js.map +1 -1
- package/dist/native/sanitizer.js +2 -16
- package/dist/native/sanitizer.js.map +1 -1
- package/dist/native/sanitizer.test.js +0 -3
- package/dist/native/sanitizer.test.js.map +1 -1
- package/dist/startup-cache.js +0 -2
- package/dist/startup-cache.js.map +1 -1
- package/package.json +20 -20
- package/surface-manifest.json +80 -88
- package/dist/backend/llvm/expr-island.d.ts +0 -15
- package/dist/backend/llvm/expr-island.js +0 -709
- package/dist/backend/llvm/expr-island.js.map +0 -1
- package/dist/frontend/lowering/coercions/island.d.ts +0 -37
- package/dist/frontend/lowering/coercions/island.js +0 -350
- package/dist/frontend/lowering/coercions/island.js.map +0 -1
- package/dist/frontend/lowering/lower-island.d.ts +0 -229
- package/dist/frontend/lowering/lower-island.js.map +0 -1
- package/dist/frontend/lowering/lower-island.test.d.ts +0 -1
- package/dist/frontend/lowering/lower-island.test.js +0 -56
- package/dist/frontend/lowering/lower-island.test.js.map +0 -1
- package/dist/frontend/npm-fetch-analysis.d.ts +0 -17
- package/dist/frontend/npm-fetch-analysis.js +0 -109
- package/dist/frontend/npm-fetch-analysis.js.map +0 -1
- package/dist/frontend/npm-fetch-analysis.test.d.ts +0 -1
- package/dist/frontend/npm-fetch-analysis.test.js +0 -130
- package/dist/frontend/npm-fetch-analysis.test.js.map +0 -1
- package/dist/frontend/npm-fetch-node.d.ts +0 -2
- package/dist/frontend/npm-fetch-node.js +0 -12
- package/dist/frontend/npm-fetch-node.js.map +0 -1
- package/dist/frontend/npm-fetch-syntax.d.ts +0 -6
- package/dist/frontend/npm-fetch-syntax.js +0 -202
- package/dist/frontend/npm-fetch-syntax.js.map +0 -1
- package/dist/native/runtime-typescript.d.ts +0 -4
- package/dist/native/runtime-typescript.js +0 -74
- package/dist/native/runtime-typescript.js.map +0 -1
- package/dist/native/runtime-typescript.test.d.ts +0 -1
- package/dist/native/runtime-typescript.test.js +0 -41
- package/dist/native/runtime-typescript.test.js.map +0 -1
package/dist/ir/ir.d.ts
CHANGED
|
@@ -275,8 +275,7 @@ export type IrType = {
|
|
|
275
275
|
/** Heap, refcounted closure. `rest` marks a variadic function value.
|
|
276
276
|
* `restAbi: "typed"` spells one trailing typed array in `params`; static
|
|
277
277
|
* call sites pack their surplus arguments into it before `callValue`.
|
|
278
|
-
* `restAbi
|
|
279
|
-
* island host callback. An absent `restAbi` is the legacy checked-dynamic
|
|
278
|
+
* An absent `restAbi` is the checked-dynamic
|
|
280
279
|
* JS form: `params` stays the declared non-rest list and the lifted
|
|
281
280
|
* function has one hidden trailing ScrDyn array filled by its boxed call
|
|
282
281
|
* thunk. `argumentsAll` keeps that hidden ABI but fills it with every
|
|
@@ -288,7 +287,7 @@ export type IrType = {
|
|
|
288
287
|
params: IrType[];
|
|
289
288
|
ret: IrType;
|
|
290
289
|
rest?: true;
|
|
291
|
-
restAbi?: "
|
|
290
|
+
restAbi?: "typed";
|
|
292
291
|
argumentsAll?: true;
|
|
293
292
|
} | {
|
|
294
293
|
kind: "object";
|
|
@@ -306,7 +305,7 @@ export type IrType = {
|
|
|
306
305
|
* completion against C's one signature sound. Allowed in locals,
|
|
307
306
|
* globals, params, returns, class/record fields, capture boxes, array
|
|
308
307
|
* elements, Map VALUES, and union arms; fenced out of Map keys, Set
|
|
309
|
-
* elements, JSON,
|
|
308
|
+
* elements, JSON, and ToString. Unknown slots retain
|
|
310
309
|
* class identity and allow an exact typed constructor round trip. */
|
|
311
310
|
| {
|
|
312
311
|
kind: "classval";
|
|
@@ -354,16 +353,6 @@ export type IrType = {
|
|
|
354
353
|
| {
|
|
355
354
|
kind: "dyn";
|
|
356
355
|
}
|
|
357
|
-
/** An island value handle — the type of `any` under --dynamic. Runtime
|
|
358
|
-
* representation is a refcounted cell (ScrJsval) owning one embedded-
|
|
359
|
-
* engine value. It can live in locals, globals, parameters, returns,
|
|
360
|
-
* arrays, class fields, and ambient AbortSignal/AbortController record
|
|
361
|
-
* fields. Operations on jsval compile to engine calls (jsOp) with
|
|
362
|
-
* JS-exact semantics; exits back to static types are validated (jsExit).
|
|
363
|
-
* This kind exists only with the dynamic option. */
|
|
364
|
-
| {
|
|
365
|
-
kind: "jsval";
|
|
366
|
-
}
|
|
367
356
|
/** A catch binding or its closure capture (never parameters, returns,
|
|
368
357
|
* fields, arms or elements). The one global form is a module's recorded
|
|
369
358
|
* evaluation error, written only from that module's catch binding and
|
|
@@ -429,9 +418,9 @@ declare const HANDLE_KIND_LIST: readonly ["stats", "fileHandle", "spawnRes", "ch
|
|
|
429
418
|
export type HandleKind = (typeof HANDLE_KIND_LIST)[number];
|
|
430
419
|
export declare const HANDLE_KINDS: IrKindSet<"child" | "childStream" | "childWriter" | "cryptoHash" | "cryptoHmac" | "dgramSocket" | "fileHandle" | "fsWatcher" | "http2Session" | "http2Stream" | "httpClientReq" | "httpReq" | "httpRes" | "netServer" | "netSocket" | "procStream" | "secureCtx" | "spawnRes" | "stats" | "testCtx">;
|
|
431
420
|
/** The IR kinds represented as pointers in native code. */
|
|
432
|
-
declare const POINTER_KIND_LIST: readonly ["string", "bigint", "array", "map", "set", "regex", "bytes", "url", "searchParams", "symbol", "stats", "fileHandle", "spawnRes", "child", "netServer", "netSocket", "http2Session", "http2Stream", "dgramSocket", "testCtx", "httpReq", "httpRes", "httpClientReq", "secureCtx", "cryptoHash", "cryptoHmac", "fsWatcher", "childStream", "childWriter", "func", "object", "classval", "moduleNs", "record", "union", "dyn", "
|
|
421
|
+
declare const POINTER_KIND_LIST: readonly ["string", "bigint", "array", "map", "set", "regex", "bytes", "url", "searchParams", "symbol", "stats", "fileHandle", "spawnRes", "child", "netServer", "netSocket", "http2Session", "http2Stream", "dgramSocket", "testCtx", "httpReq", "httpRes", "httpClientReq", "secureCtx", "cryptoHash", "cryptoHmac", "fsWatcher", "childStream", "childWriter", "func", "object", "classval", "moduleNs", "record", "union", "dyn", "caught", "promise", "generator"];
|
|
433
422
|
export type PointerKind = (typeof POINTER_KIND_LIST)[number];
|
|
434
|
-
export declare const POINTER_KINDS: IrKindSet<"array" | "bigint" | "bytes" | "caught" | "child" | "childStream" | "childWriter" | "classval" | "cryptoHash" | "cryptoHmac" | "dgramSocket" | "dyn" | "fileHandle" | "fsWatcher" | "func" | "generator" | "http2Session" | "http2Stream" | "httpClientReq" | "httpReq" | "httpRes" | "
|
|
423
|
+
export declare const POINTER_KINDS: IrKindSet<"array" | "bigint" | "bytes" | "caught" | "child" | "childStream" | "childWriter" | "classval" | "cryptoHash" | "cryptoHmac" | "dgramSocket" | "dyn" | "fileHandle" | "fsWatcher" | "func" | "generator" | "http2Session" | "http2Stream" | "httpClientReq" | "httpReq" | "httpRes" | "map" | "moduleNs" | "netServer" | "netSocket" | "object" | "promise" | "record" | "regex" | "searchParams" | "secureCtx" | "set" | "spawnRes" | "stats" | "string" | "symbol" | "testCtx" | "union" | "url">;
|
|
435
424
|
/** Runtime RC symbol stem for each IR type kind. An empty stem means the
|
|
436
425
|
* kind is scalar/unit or uses an emitted per-shape helper (object/record).
|
|
437
426
|
* Keeping this exhaustive makes a new runtime handle kind a compile error
|
|
@@ -477,7 +466,6 @@ export declare const CHILDWRITER_T: IrType;
|
|
|
477
466
|
export declare const PROCSTREAM_T: IrType;
|
|
478
467
|
export declare const VOID: IrType;
|
|
479
468
|
export declare const DYN: IrType;
|
|
480
|
-
export declare const JSVAL: IrType;
|
|
481
469
|
export declare const CAUGHT: IrType;
|
|
482
470
|
export declare const UNDEFINED_T: IrType;
|
|
483
471
|
export declare const NULL_T: IrType;
|
|
@@ -508,7 +496,7 @@ export declare function isSupportedMapKey(t: IrType, unionArms?: IrType[]): bool
|
|
|
508
496
|
/** Set elements and Map keys share storage, equality and ownership rules. */
|
|
509
497
|
export declare function isSupportedSetElem(t: IrType, unionArms?: IrType[]): boolean;
|
|
510
498
|
/** The Map VALUE fence: scalars, supported native references and checked
|
|
511
|
-
* values. Functions require checked-value boxing
|
|
499
|
+
* values. Functions require checked-value boxing.
|
|
512
500
|
* Record/object/union values can point back at the map holding them, which
|
|
513
501
|
* is exactly why ref-valued maps are cycle-capable (see the backend's
|
|
514
502
|
* cycle analysis and docs/memory.md). Shared frontend/validator. */
|
|
@@ -544,7 +532,7 @@ export declare function typeEquals(a: IrType, b: IrType): boolean;
|
|
|
544
532
|
export declare function isRefCounted(t: IrType): boolean;
|
|
545
533
|
export interface IrModule {
|
|
546
534
|
/** Bumped on any breaking IR change; serialize.ts refuses mismatches. */
|
|
547
|
-
irVersion:
|
|
535
|
+
irVersion: 16;
|
|
548
536
|
sourceFile: string;
|
|
549
537
|
functions: IrFunction[];
|
|
550
538
|
/** Class shapes. Constructors and methods are ordinary module functions
|
|
@@ -560,36 +548,6 @@ export interface IrModule {
|
|
|
560
548
|
* per-file `%init.<i>` functions; ids live in a distinct "%g." namespace so
|
|
561
549
|
* they can never collide with function-local ids. */
|
|
562
550
|
globals?: IrGlobal[];
|
|
563
|
-
/** The embedded npm runtime graph (--dynamic builds with npm imports):
|
|
564
|
-
* every reached module's SOURCE, keyed by resolved path, plus the
|
|
565
|
-
* (importer, specifier) → target edges the island's module loader and
|
|
566
|
-
* require shim resolve against. Emitted as static strings — binaries
|
|
567
|
-
* never read node_modules at runtime. Edge targets are module keys or
|
|
568
|
-
* "node:*" builtins (island-shimmed). */
|
|
569
|
-
embedded?: {
|
|
570
|
-
/** `esm` (CommonJS modules only) is the synthesized ESM facade the
|
|
571
|
-
* island loader evaluates when an ES module imports the CJS file:
|
|
572
|
-
* default plus the named exports LEXED from the source at build time
|
|
573
|
-
* (cjs-lexer.ts — the compiler's port of Node's vendored CJS lexer). */
|
|
574
|
-
modules: {
|
|
575
|
-
key: string;
|
|
576
|
-
source: string;
|
|
577
|
-
format: "esm" | "cjs" | "json";
|
|
578
|
-
esm?: string;
|
|
579
|
-
/** Parsed/bound embedded source reaches the engine's global fetch. */
|
|
580
|
-
usesFetch?: true;
|
|
581
|
-
}[];
|
|
582
|
-
/** `kind` picks Node's "exports" condition set per CALL FORM: one
|
|
583
|
-
* (from, specifier) can name a dual package's ESM entry behind an
|
|
584
|
-
* "import" edge AND its CJS entry behind a "require" edge; "any"
|
|
585
|
-
* serves both lookups (relative files, builtins). */
|
|
586
|
-
edges: {
|
|
587
|
-
from: string;
|
|
588
|
-
specifier: string;
|
|
589
|
-
to: string;
|
|
590
|
-
kind: "any" | "import" | "require";
|
|
591
|
-
}[];
|
|
592
|
-
};
|
|
593
551
|
/** Record shapes, in first-seen (`r0`, `r1`, ...) order. Fields are in
|
|
594
552
|
* CANONICAL order (sorted by name) — the shape's identity; a `recordLit`'s
|
|
595
553
|
* fields stay in source order (evaluation order) independently. The
|
|
@@ -1496,7 +1454,7 @@ export declare const MAY_THROW_ARR_METHODS: ReadonlySet<IrArrIntrinsicMethod>;
|
|
|
1496
1454
|
/** Element types whose comparator sort can run in the runtime over raw
|
|
1497
1455
|
* slots: numbers, and reference-counted values passed to the comparator by
|
|
1498
1456
|
* pointer. Unions with an undefined arm order undefined last without a
|
|
1499
|
-
* comparator call, and checked
|
|
1457
|
+
* comparator call, and checked values have their own ABI; those
|
|
1500
1458
|
* keep the IR sort helper. */
|
|
1501
1459
|
export declare function isSortValuesElement(elem: IrType, unionArms?: readonly IrType[]): boolean;
|
|
1502
1460
|
/** The Map method/property surface (mirrors ambient/scriptc.d.ts) plus the
|
|
@@ -1790,8 +1748,7 @@ export type IrExpr =
|
|
|
1790
1748
|
* dyn asks its runtime kind. The other operand form is a UNION — the ARM
|
|
1791
1749
|
* value's ToBoolean via a per-union interned helper (unit arms false;
|
|
1792
1750
|
* f64/string/bool arms per-value; ref arms — arrays, records, objects,
|
|
1793
|
-
* functions, maps, sets, promises, ... — always true
|
|
1794
|
-
* engine). Result is bool. */
|
|
1751
|
+
* functions, maps, sets, promises, ... — always true). Result is bool. */
|
|
1795
1752
|
| {
|
|
1796
1753
|
kind: "toBool";
|
|
1797
1754
|
operand: IrExpr;
|
|
@@ -2594,23 +2551,6 @@ export type IrExpr =
|
|
|
2594
2551
|
type: IrType;
|
|
2595
2552
|
loc: SrcLoc;
|
|
2596
2553
|
}
|
|
2597
|
-
/** Island value → dyn conversion (`type` is always dyn; the operand
|
|
2598
|
-
* is always jsval): the jsval→dyn crossing — an 'any'-typed engine
|
|
2599
|
-
* value flowing into an 'unknown'/'object'/JS-residue slot wraps BY
|
|
2600
|
-
* REFERENCE as the checked-dynamic tree's SCR_DYN_JSVAL kind (scr_dyn_from_jsval).
|
|
2601
|
-
* Engine scalars (number/string/boolean/null/undefined) normalize to
|
|
2602
|
-
* the native dyn kinds at wrap time, so wrapped nodes only ever hold
|
|
2603
|
-
* engine objects/arrays/functions; typeof/truthiness/String()/=== on
|
|
2604
|
-
* the wrapped node route to the engine, un-armed dyn walks fence
|
|
2605
|
-
* loudly, and scr_jsval_from_dyn unwraps the SAME engine value back
|
|
2606
|
-
* (identity round trip). The operand is borrowed; the result is owned
|
|
2607
|
-
* (+1). Never throws. */
|
|
2608
|
-
| {
|
|
2609
|
-
kind: "dynFromJsval";
|
|
2610
|
-
value: IrExpr;
|
|
2611
|
-
type: IrType;
|
|
2612
|
-
loc: SrcLoc;
|
|
2613
|
-
}
|
|
2614
2554
|
/** CALLING a dyn value — `fn(a, b)` where fn is checked-dynamic (an
|
|
2615
2555
|
* implicit-any JS binding, a dyn record member, a dynKeyGet result).
|
|
2616
2556
|
* Arguments are ALREADY dyn-typed (typed values box through dynFrom at
|
|
@@ -2823,8 +2763,7 @@ export type IrExpr =
|
|
|
2823
2763
|
* 'FIRSTPROP' of 'SPELLING' …" when `firstProp` is set (V8 names the
|
|
2824
2764
|
* pattern's first property) — and yields the value unchanged otherwise.
|
|
2825
2765
|
* `spelling` is the RHS's compile-time source spelling. Value and type
|
|
2826
|
-
* are dyn
|
|
2827
|
-
* engine-thrown, catchable like every boundary throw). */
|
|
2766
|
+
* are dyn; the helper throws a catchable error. */
|
|
2828
2767
|
| {
|
|
2829
2768
|
kind: "dynDestrCheck";
|
|
2830
2769
|
value: IrExpr;
|
|
@@ -2837,10 +2776,7 @@ export type IrExpr =
|
|
|
2837
2776
|
* it. Over a dyn value: arrays step by index, strings by code point,
|
|
2838
2777
|
* Buffers by byte; everything else throws V8's exact "<desc> is not
|
|
2839
2778
|
* iterable (cannot read property Symbol(Symbol.iterator))" TypeError.
|
|
2840
|
-
*
|
|
2841
|
-
* protocol (user iterables included, IteratorClose per spec) behind the
|
|
2842
|
-
* same V8 message for non-iterables. The result is a FRESH array (dyn
|
|
2843
|
-
* or engine, matching the operand) of exactly `count` elements
|
|
2779
|
+
* The result is a fresh dyn array of exactly `count` elements
|
|
2844
2780
|
* (undefined-padded past the end) — the empty pattern passes count 0
|
|
2845
2781
|
* and uses only the validation. Value is borrowed; the result is owned
|
|
2846
2782
|
* (+1). */
|
|
@@ -3193,144 +3129,7 @@ export type IrExpr =
|
|
|
3193
3129
|
preserveRefs?: true;
|
|
3194
3130
|
type: IrType;
|
|
3195
3131
|
loc: SrcLoc;
|
|
3196
|
-
}
|
|
3197
|
-
/** Static → island marshal (--dynamic builds only). `value`'s type is
|
|
3198
|
-
* f64/string/bool (marshaled by value) or a JSON-safe composite
|
|
3199
|
-
* (record/array/union — marshaled as a DEEP COPY through the emitted
|
|
3200
|
-
* type-directed JSON serializer and the engine's JSON parser; the
|
|
3201
|
-
* aliasing divergence is documented in SEMANTICS.md). Result is an
|
|
3202
|
-
* owned (+1) jsval; the operand is borrowed. Never throws. */
|
|
3203
|
-
| {
|
|
3204
|
-
kind: "jsMarshal";
|
|
3205
|
-
value: IrExpr;
|
|
3206
|
-
type: IrType;
|
|
3207
|
-
loc: SrcLoc;
|
|
3208
|
-
}
|
|
3209
|
-
/** An operation on island values (--dynamic builds only), executed by
|
|
3210
|
-
* the embedded engine with JS-exact semantics (coercions come from
|
|
3211
|
-
* pinned prelude closures, not C reimplementations). `args` are
|
|
3212
|
-
* jsval-typed and borrowed. Result `type` per op: arithmetic
|
|
3213
|
-
* (add/sub/mul/div/mod/pow), unary neg/plus, getProp/getIdx,
|
|
3214
|
-
* callMethod/callFn/callFnThis/globalGet → jsval (+1); comparisons
|
|
3215
|
-
* (lt/le/gt/ge/eq/neq), truthy, not → bool; typeof, toStr → string (+1);
|
|
3216
|
-
* setProp/setIdx → void. `name` carries the property/method identifier
|
|
3217
|
-
* for getProp/setProp/callMethod/globalGet, absent otherwise. MAY THROW
|
|
3218
|
-
* (engine
|
|
3219
|
-
* exceptions bridge into the exception cell, catchably) — backends'
|
|
3220
|
-
* may-throw analyses must seed on every jsOp like a `throw`. */
|
|
3221
|
-
| {
|
|
3222
|
-
kind: "jsOp";
|
|
3223
|
-
op: IrJsOp;
|
|
3224
|
-
name?: string;
|
|
3225
|
-
args: IrExpr[];
|
|
3226
|
-
type: IrType;
|
|
3227
|
-
loc: SrcLoc;
|
|
3228
|
-
}
|
|
3229
|
-
/** Island → static validated exit (--dynamic builds only): `value` is
|
|
3230
|
-
* jsval-typed, `type` is the static target. STRICT for primitives (a
|
|
3231
|
-
* non-number refuses to exit as number — no coercion); composite
|
|
3232
|
-
* targets round-trip through the engine's JSON.stringify and the
|
|
3233
|
-
* existing dynCheck walker for the target (width-tolerant records,
|
|
3234
|
-
* path-annotated failures — identical semantics to `dyn as T`). MAY
|
|
3235
|
-
* THROW a catchable TypeError-shaped string. The operand is borrowed;
|
|
3236
|
-
* the result is owned (+1) for refcounted targets. */
|
|
3237
|
-
| {
|
|
3238
|
-
kind: "jsExit";
|
|
3239
|
-
value: IrExpr;
|
|
3240
|
-
type: IrType;
|
|
3241
|
-
loc: SrcLoc;
|
|
3242
|
-
}
|
|
3243
|
-
/** Island → static PROMISE bridge (--dynamic builds only): `value` is a
|
|
3244
|
-
* jsval whose declared type is Promise<T> (a package call's promise —
|
|
3245
|
-
* it lives in the engine); the result is a fresh pending static promise
|
|
3246
|
-
* the engine promise settles. `type` is promise-of-jsval (the settled
|
|
3247
|
-
* engine value crosses as a retained handle; typed uses exit like any
|
|
3248
|
-
* jsval) or promise-of-void (T mapped to void — nothing to carry).
|
|
3249
|
-
* Fulfillment wakes parked awaiters through the ready queue; rejection
|
|
3250
|
-
* crosses like a bridged exception (engine Errors become real static
|
|
3251
|
-
* Errors) and re-throws at the await or enters the unhandled ledger.
|
|
3252
|
-
* Bridging one engine promise twice makes two independent static
|
|
3253
|
-
* observers of the same settlement — semantically equivalent, slightly
|
|
3254
|
-
* redundant (SEMANTICS.md). Operand borrowed; result +1. MAY THROW
|
|
3255
|
-
* only on an engine-level surprise minting the subscription — backends
|
|
3256
|
-
* seed may-throw and emit the pending check like other island ops. */
|
|
3257
|
-
| {
|
|
3258
|
-
kind: "jsBridgePromise";
|
|
3259
|
-
value: IrExpr;
|
|
3260
|
-
type: IrType;
|
|
3261
|
-
loc: SrcLoc;
|
|
3262
3132
|
};
|
|
3263
|
-
/** The island operation set. Grouped by result type — see the jsOp node
|
|
3264
|
-
* doc. A closed union: every member has a lowering rule in the frontend,
|
|
3265
|
-
* a validation rule, and a scr_jsval_* implementation in scr_island.c. */
|
|
3266
|
-
export type IrJsOp = "add" | "sub" | "mul" | "div" | "mod" | "pow" | "neg" | "plus" | "lt" | "le" | "gt" | "ge" | "eq" | "neq"
|
|
3267
|
-
/** `v instanceof C` where BOTH sides are island values (a package-
|
|
3268
|
-
* exported class as the RHS): the spec's InstanceofOperator in the
|
|
3269
|
-
* engine, Symbol.hasInstance included; a non-object RHS throws the
|
|
3270
|
-
* engine's own TypeError, bridged catchably. */
|
|
3271
|
-
| "instanceOf" | "truthy" | "not" | "typeof" | "toStr" | "getProp" | "setProp" | "getIdx" | "setIdx" | "callMethod" | "callFn"
|
|
3272
|
-
/** Calls an already-resolved island function with an explicit receiver.
|
|
3273
|
-
* Args are (callee, receiver, ...arguments); this preserves computed
|
|
3274
|
-
* method evaluation order without reading a getter twice. */
|
|
3275
|
-
| "callFnThis"
|
|
3276
|
-
/** Spread application on an island callee — `f(...pre, ...s)`, the
|
|
3277
|
-
* rest-forwarding idiom (`(...args) => g(...args)` under --dynamic).
|
|
3278
|
-
* Args are exactly (callee, pre, spread): `pre` is the engine array of
|
|
3279
|
-
* leading fixed arguments (jsOp arrLit), `spread` the spread source;
|
|
3280
|
-
* `name` carries the spread expression's source spelling (V8's nullish
|
|
3281
|
-
* spread-call TypeError spells it). The prelude helper uses REAL spread
|
|
3282
|
-
* syntax, so iterator protocols are the engine's own, with guards
|
|
3283
|
-
* front-running V8's exact spread-call TypeError texts. May throw. */
|
|
3284
|
-
| "callSpread"
|
|
3285
|
-
/** `new X(...)` where X is jsval-typed (package-declared classes):
|
|
3286
|
-
* JS_CallConstructor — args are the callee then the constructor
|
|
3287
|
-
* arguments, mirroring callFn. */
|
|
3288
|
-
| "construct"
|
|
3289
|
-
/** A member of the engine's global object by name (Math, parseFloat, ...)
|
|
3290
|
-
* — the receiver/callee for the island-backed ambient surface. Zero args;
|
|
3291
|
-
* `name` carries the global's identifier. May-throw for uniformity with
|
|
3292
|
-
* the other engine entries (the emitter's pending check runs after it). */
|
|
3293
|
-
| "globalGet"
|
|
3294
|
-
/** Island-native literals: an object literal / array literal whose
|
|
3295
|
-
* contextual type is `any` builds directly in the engine — objLit args
|
|
3296
|
-
* are alternating key/value jsvals (keys are marshaled strings), arrLit
|
|
3297
|
-
* args are the elements. Never throw. */
|
|
3298
|
-
| "objLit" | "arrLit"
|
|
3299
|
-
/** The engine-native TemplateStringsArray for an ISLAND TAG call: args
|
|
3300
|
-
* are 2n marshaled strings — n cooked then n raw — building a fresh
|
|
3301
|
-
* engine array whose `.raw` carries the raw spellings (tags dispatch on
|
|
3302
|
-
* it). Never throws. */
|
|
3303
|
-
| "tplStrings"
|
|
3304
|
-
/** Spread completion for an island-native object literal: copies
|
|
3305
|
-
* args[1]'s own enumerable properties onto args[0] (the spec's
|
|
3306
|
-
* CopyDataProperties — the engine's own Object.assign; null/undefined
|
|
3307
|
-
* sources spread nothing) and answers args[0] for chaining. May throw
|
|
3308
|
-
* (getters run). */
|
|
3309
|
-
| "objSpread"
|
|
3310
|
-
/** Accessor completion for an island-native object literal: defines a
|
|
3311
|
-
* GETTER property on args[0] (the object) — args are (obj, key string
|
|
3312
|
-
* marshal, getter function handle) — and answers the same object (the
|
|
3313
|
-
* chainable spelling: `defineGetter(objLit(...), k, f)`). The
|
|
3314
|
-
* self-referential doc-printer root-indent shape. Never throws. */
|
|
3315
|
-
| "defineGetter"
|
|
3316
|
-
/** The engine's own undefined / null as island values (zero args, never
|
|
3317
|
-
* throw): the unit arms of a union marshaling IN (`string | undefined`
|
|
3318
|
-
* into an 'any' slot — the undefined arm IS the engine undefined), and
|
|
3319
|
-
* conceptually the unit path of `x?.y` on 'any' (the emitter inlines
|
|
3320
|
-
* that one). */
|
|
3321
|
-
| "undefLit" | "nullLit"
|
|
3322
|
-
/** GetIterator over an island value — the for-of head over 'any' (the
|
|
3323
|
-
* engine's own protocol lookup; V8's not-iterable TypeError on refusal).
|
|
3324
|
-
* The loop drives next() through callMethod and reads value/done with
|
|
3325
|
-
* getProp/truthy. */
|
|
3326
|
-
| "iterNew"
|
|
3327
|
-
/** `o.name?.(...)` — the optional METHOD call on an island receiver: a
|
|
3328
|
-
* nullish member answers the engine's undefined, anything else calls
|
|
3329
|
-
* with `this = o` (JS-exact; non-callables throw in the engine). */
|
|
3330
|
-
| "optCallMethod";
|
|
3331
|
-
/** Result-type rule for each island op (the validator enforces it; the
|
|
3332
|
-
* frontend constructs nodes with exactly these). */
|
|
3333
|
-
export declare function jsOpResultKind(op: IrJsOp): "jsval" | "bool" | "string" | "void";
|
|
3334
3133
|
/** True when a type is a union with an undefined arm — the optional-flavored
|
|
3335
3134
|
* slot marker shared by the frontend (record literals may omit such fields)
|
|
3336
3135
|
* and backends (JSON serializers DROP such fields when they hold undefined,
|
|
@@ -3360,60 +3159,9 @@ export declare function isJsonStringifySafeType(t: IrType, getRecord: (shapeId:
|
|
|
3360
3159
|
/** A JSON-shaped container with unknown payloads needs the runtime JSON
|
|
3361
3160
|
* traversal. Its declared structure can be boxed, but payloads may carry
|
|
3362
3161
|
* omitted values, toJSON methods, or cycles. This predicate does not widen
|
|
3363
|
-
* the type-directed serializer, checked-
|
|
3162
|
+
* the type-directed serializer, checked-value boundary, or root-undefined
|
|
3364
3163
|
* contract; callers must select the checked runtime traversal explicitly. */
|
|
3365
3164
|
export declare function isJsonStringifyDynamicType(t: IrType, getRecord: (shapeId: string) => IrRecordShape | undefined, getUnion: (unionId: string) => IrUnionDef | undefined): boolean;
|
|
3366
|
-
/** THE island boundary predicate: true when a static type can cross into
|
|
3367
|
-
* the island (jsMarshal — primitives by value, composites as deep JSON
|
|
3368
|
-
* copies) and back out (jsExit — strict primitive extraction, composites
|
|
3369
|
-
* through the dynCheck walker). Primitives are JSON-safe, so the rule
|
|
3370
|
-
* coincides with isJsonSafeType; it has its own name because the boundary
|
|
3371
|
-
* is its own concept — the frontend's implicit coercions, the explicit-cast
|
|
3372
|
-
* lowering, and the validator's jsMarshal/jsExit rules all ask this ONE
|
|
3373
|
-
* question, and the boundary rejection messages describe exactly this set. */
|
|
3374
|
-
export declare function canCrossIslandBoundary(t: IrType, getRecord: (shapeId: string) => IrRecordShape | undefined, getUnion: (unionId: string) => IrUnionDef | undefined): boolean;
|
|
3375
|
-
/** True for a closure type that can cross INTO the island as a host
|
|
3376
|
-
* function: every parameter jsval (the engine's arguments pass through as
|
|
3377
|
-
* handles — no per-type extraction exists inside a host call) and the
|
|
3378
|
-
* result jsval, void, or a primitive (which marshals back by value —
|
|
3379
|
-
* `(x) => x * 2` on an 'any' x infers a number return). Contextual typing
|
|
3380
|
-
* produces exactly this shape for callbacks passed to package APIs
|
|
3381
|
-
* (`.action((a, b) => ...)` against `(...args: any[]) => void`). Arity is
|
|
3382
|
-
* capped by the runtime's host-call argument buffer (scr_island.c). */
|
|
3383
|
-
export declare const MAX_ISLAND_CALLBACK_ARITY = 16;
|
|
3384
|
-
export declare function canMarshalFuncIntoIsland(t: IrType): boolean;
|
|
3385
|
-
/** Parameter types a TYPED closure may declare when it crosses INTO the
|
|
3386
|
-
* island as a host function: jsval params take the engine argument as a
|
|
3387
|
-
* handle (the all-'any' shape above); dyn params normalize scalars or retain
|
|
3388
|
-
* engine objects by reference. Every other admitted type converts
|
|
3389
|
-
* AT CALL TIME through the validated-exit machinery — strict primitives,
|
|
3390
|
-
* JSON round-trip composites (the dynCheck walker: width-tolerant records,
|
|
3391
|
-
* path-annotated failures). On top of the jsExit set, a bare `T | undefined`
|
|
3392
|
-
* union is admitted here — an absent or undefined engine argument takes the
|
|
3393
|
-
* undefined arm, exactly the missing-optional-field rule (and exactly the
|
|
3394
|
-
* commander case: `.action((text: string | undefined, opts) => ...)` sees
|
|
3395
|
-
* undefined when the command argument is omitted). */
|
|
3396
|
-
export declare function isIslandCallbackParamType(t: IrType, getRecord: (shapeId: string) => IrRecordShape | undefined, getUnion: (unionId: string) => IrUnionDef | undefined): boolean;
|
|
3397
|
-
/** Classify a typed island callback's RETURN for adapter synthesis: sync
|
|
3398
|
-
* kinds marshal back by value ('void'|'jsval'|'f64'|'bool'|'string' — the
|
|
3399
|
-
* canMarshalFuncIntoIsland set), 'json' marshals a JSON-safe composite
|
|
3400
|
-
* through the type-directed serializer + engine parse (the jsMarshal
|
|
3401
|
-
* composite path — commander's option-argument collectors return arrays
|
|
3402
|
-
* this way), and a Promise of the by-value kinds wraps as an engine
|
|
3403
|
-
* promise settled when the scriptc promise settles (async callbacks —
|
|
3404
|
-
* the `.action(async ...)` case). Null for anything else (Promise of
|
|
3405
|
-
* composites: still fenced). */
|
|
3406
|
-
export declare function islandCallbackRet(t: IrType, getRecord: (shapeId: string) => IrRecordShape | undefined, getUnion: (unionId: string) => IrUnionDef | undefined): {
|
|
3407
|
-
async: boolean;
|
|
3408
|
-
tag: "void" | "jsval" | "f64" | "bool" | "string" | "json" | "dyn";
|
|
3409
|
-
} | null;
|
|
3410
|
-
/** The TYPED extension of canMarshalFuncIntoIsland (a strict superset):
|
|
3411
|
-
* closures whose params are per-argument-convertible at call time
|
|
3412
|
-
* (isIslandCallbackParamType) and whose return classifies
|
|
3413
|
-
* (islandCallbackRet). Same arity cap — the runtime's host-call argument
|
|
3414
|
-
* buffer. Statically typed closure parameters stay fenced; unknown values
|
|
3415
|
-
* enter as checked-dynamic values and are validated at each typed use. */
|
|
3416
|
-
export declare function canMarshalTypedFuncIntoIsland(t: IrType, getRecord: (shapeId: string) => IrRecordShape | undefined, getUnion: (unionId: string) => IrUnionDef | undefined): boolean;
|
|
3417
3165
|
/** The runtime HANDLE kinds that cross the checked-dynamic boundary as
|
|
3418
3166
|
* the checked-dynamic tree's HANDLE kind (SCR_DYN_HANDLE): boxed by REFERENCE (identity —
|
|
3419
3167
|
* stateful I/O objects never copy), unboxed by tag check, members
|
|
@@ -3470,23 +3218,3 @@ export declare function canBoxFuncIntoDyn(t: IrType, getRecord: (shapeId: string
|
|
|
3470
3218
|
* dyn), return void, dyn, or dynCheckable (the adapter validates the dyn
|
|
3471
3219
|
* result). */
|
|
3472
3220
|
export declare function canAdaptDynFuncTo(t: IrType, getRecord: (shapeId: string) => IrRecordShape | undefined, getUnion: (unionId: string) => IrUnionDef | undefined, visiting?: Set<string>): boolean;
|
|
3473
|
-
/** The MARSHAL-direction boundary (jsMarshal): everything that can cross
|
|
3474
|
-
* out and back (canCrossIslandBoundary) plus qualifying closures — those
|
|
3475
|
-
* enter as host functions but never EXIT (jsExit keeps the narrower
|
|
3476
|
-
* predicate). */
|
|
3477
|
-
export declare function canMarshalIntoIsland(t: IrType, getRecord: (shapeId: string) => IrRecordShape | undefined, getUnion: (unionId: string) => IrUnionDef | undefined): boolean;
|
|
3478
|
-
/** The EXIT-direction boundary (jsExit): everything round-trippable
|
|
3479
|
-
* (canCrossIslandBoundary) plus BARE undefined/null-armed unions whose
|
|
3480
|
-
* data arms are all JSON-safe — the engine's undefined takes the
|
|
3481
|
-
* undefined arm before the JSON detour (JSON cannot spell undefined, and
|
|
3482
|
-
* bare undefined-armed unions are JSON-unsafe for exactly that reason),
|
|
3483
|
-
* null and data ride the round trip into the union's dynCheck. The
|
|
3484
|
-
* package-API shape `result.headers` : `Record<string, string> |
|
|
3485
|
-
* undefined` is the motivating case. */
|
|
3486
|
-
/** The static-promise→engine bridge's payload domain: the fulfillment
|
|
3487
|
-
* types a scriptc promise may deliver INTO the island as a real engine
|
|
3488
|
-
* thenable (scr_jsval_from_promise — the async-callback return bridge,
|
|
3489
|
-
* reused by promise VALUES crossing at jsvalIn edges and the island
|
|
3490
|
-
* Promise.all arm). Null = outside the domain (the boundary fence). */
|
|
3491
|
-
export declare function islandPromisePayloadTag(inner: IrType): "void" | "f64" | "bool" | "string" | "jsval" | "jsvalArr" | null;
|
|
3492
|
-
export declare function canExitIslandToType(t: IrType, getRecord: (shapeId: string) => IrRecordShape | undefined, getUnion: (unionId: string) => IrUnionDef | undefined): boolean;
|