@scriptc/compiler 0.0.9 → 0.0.11
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 +54 -9
- package/dist/backend/emission/emit-exprs.js +170 -14
- package/dist/backend/emission/emit-exprs.js.map +1 -1
- package/dist/backend/emission/emit-walkers.js +29 -2
- package/dist/backend/emission/emit-walkers.js.map +1 -1
- package/dist/backend/emission/emitter.js +25 -1
- package/dist/backend/emission/emitter.js.map +1 -1
- package/dist/backend/llvm/dyn.d.ts +1 -0
- package/dist/backend/llvm/dyn.js +83 -1
- package/dist/backend/llvm/dyn.js.map +1 -1
- package/dist/backend/llvm/emitter.js +210 -13
- package/dist/backend/llvm/emitter.js.map +1 -1
- package/dist/coverage/surface-manifest.js +16 -2
- package/dist/coverage/surface-manifest.js.map +1 -1
- package/dist/diagnostics/diagnostic.d.ts +41 -14
- package/dist/diagnostics/diagnostic.js +79 -27
- package/dist/diagnostics/diagnostic.js.map +1 -1
- package/dist/diagnostics/render.js +8 -0
- package/dist/diagnostics/render.js.map +1 -1
- package/dist/frontend/lowering/lib-boundary.js +11 -1
- package/dist/frontend/lowering/lib-boundary.js.map +1 -1
- package/dist/frontend/lowering/lower-builtins.d.ts +69 -0
- package/dist/frontend/lowering/lower-builtins.js +380 -4
- package/dist/frontend/lowering/lower-builtins.js.map +1 -1
- package/dist/frontend/lowering/lower-calls.d.ts +41 -0
- package/dist/frontend/lowering/lower-calls.js +559 -11
- package/dist/frontend/lowering/lower-calls.js.map +1 -1
- package/dist/frontend/lowering/lower-classes.d.ts +7 -0
- package/dist/frontend/lowering/lower-classes.js +51 -1
- package/dist/frontend/lowering/lower-classes.js.map +1 -1
- package/dist/frontend/lowering/lower-containers.d.ts +21 -0
- package/dist/frontend/lowering/lower-containers.js +262 -17
- package/dist/frontend/lowering/lower-containers.js.map +1 -1
- package/dist/frontend/lowering/lower-dgram.js +92 -17
- package/dist/frontend/lowering/lower-dgram.js.map +1 -1
- package/dist/frontend/lowering/lower-emitter.d.ts +70 -3
- package/dist/frontend/lowering/lower-emitter.js +436 -29
- package/dist/frontend/lowering/lower-emitter.js.map +1 -1
- package/dist/frontend/lowering/lower-exprs.d.ts +80 -5
- package/dist/frontend/lowering/lower-exprs.js +651 -23
- package/dist/frontend/lowering/lower-exprs.js.map +1 -1
- package/dist/frontend/lowering/lower-modules.d.ts +8 -5
- package/dist/frontend/lowering/lower-modules.js +144 -19
- package/dist/frontend/lowering/lower-modules.js.map +1 -1
- package/dist/frontend/lowering/lower-namespaces.d.ts +39 -11
- package/dist/frontend/lowering/lower-namespaces.js +166 -24
- package/dist/frontend/lowering/lower-namespaces.js.map +1 -1
- package/dist/frontend/lowering/lower-server.js +211 -4
- package/dist/frontend/lowering/lower-server.js.map +1 -1
- package/dist/frontend/lowering/lower-stmts.d.ts +1 -5
- package/dist/frontend/lowering/lower-stmts.js +293 -10
- package/dist/frontend/lowering/lower-stmts.js.map +1 -1
- package/dist/frontend/lowering/lower-stream.js +178 -10
- package/dist/frontend/lowering/lower-stream.js.map +1 -1
- package/dist/frontend/lowering/lowerer.d.ts +53 -1
- package/dist/frontend/lowering/lowerer.js +210 -19
- package/dist/frontend/lowering/lowerer.js.map +1 -1
- package/dist/frontend/lowering/surfaces.d.ts +44 -0
- package/dist/frontend/lowering/surfaces.js +234 -3
- package/dist/frontend/lowering/surfaces.js.map +1 -1
- package/dist/frontend/npm.d.ts +12 -0
- package/dist/frontend/npm.js +30 -0
- package/dist/frontend/npm.js.map +1 -1
- package/dist/frontend/program.d.ts +25 -0
- package/dist/frontend/program.js +144 -135
- package/dist/frontend/program.js.map +1 -1
- package/dist/frontend/shared.d.ts +1 -1
- package/dist/frontend/shared.js +1 -1
- package/dist/frontend/shared.js.map +1 -1
- package/dist/frontend/types.d.ts +13 -0
- package/dist/frontend/types.js +84 -7
- package/dist/frontend/types.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +157 -12
- package/dist/index.js.map +1 -1
- package/dist/ir/nodes.d.ts +163 -13
- package/dist/ir/nodes.js +65 -6
- package/dist/ir/nodes.js.map +1 -1
- package/dist/ir/validate.js +64 -5
- package/dist/ir/validate.js.map +1 -1
- package/dist/library/fence-eval.d.ts +77 -0
- package/dist/library/fence-eval.js +395 -0
- package/dist/library/fence-eval.js.map +1 -0
- package/dist/library/int-infer.d.ts +119 -0
- package/dist/library/int-infer.js +1301 -0
- package/dist/library/int-infer.js.map +1 -0
- package/dist/library/int-infer.test.d.ts +1 -0
- package/dist/library/int-infer.test.js +279 -0
- package/dist/library/int-infer.test.js.map +1 -0
- package/dist/library/profile.d.ts +43 -6
- package/dist/library/profile.js +179 -31
- package/dist/library/profile.js.map +1 -1
- package/dist/library/sidecar.d.ts +23 -0
- package/dist/library/sidecar.js +150 -16
- package/dist/library/sidecar.js.map +1 -1
- package/package.json +2 -2
- package/surface-manifest.json +208 -10
|
@@ -577,6 +577,47 @@ export declare function objLitGenericFnInfoOf(L: Lowerer, blame: ts.Node, name:
|
|
|
577
577
|
* bindings are read-only — no other file can write one. Cached per
|
|
578
578
|
* symbol (the scan walks the whole file once). */
|
|
579
579
|
export declare function bindingNeverReassigned(L: Lowerer, sym: ts.Symbol, decl: ts.Node): boolean;
|
|
580
|
+
/** Strips the value-preserving wrappers off an expression: parens,
|
|
581
|
+
* non-null assertions, `as`/`satisfies`/angle-bracket casts. What
|
|
582
|
+
* remains is the expression that actually evaluates. */
|
|
583
|
+
export declare function stripValueWrappers(e: ts.Expression): ts.Expression;
|
|
584
|
+
/** The nullish unit `e` provably evaluates to: a bare null/undefined
|
|
585
|
+
* literal (assertion-wrapped — `null as any`, `null!`), or a read of a
|
|
586
|
+
* registered NULLISH binding (nullishGenericBindingUnitOf). Null when
|
|
587
|
+
* the value could be anything else. */
|
|
588
|
+
export declare function nullishExprUnitOf(L: Lowerer, e: ts.Expression): "null" | "undefined" | null;
|
|
589
|
+
/** The nullish unit a binding provably holds FOREVER, by VALUE alone: its
|
|
590
|
+
* initializer is nullish (`const i: I<A & B> = null as any`) and every
|
|
591
|
+
* write in its declaring file is nullish too (`a = b` where b is
|
|
592
|
+
* another nullish binding). No type condition — callers add their own
|
|
593
|
+
* (nullishGenericBindingUnitOf gates the no-storage family on
|
|
594
|
+
* unmappable types; the generic-method call path rescues its fence with
|
|
595
|
+
* the value fact alone). Cached per symbol; the pre-seeded null entry
|
|
596
|
+
* guards probe cycles (mutually-assigned bindings resolve link by link,
|
|
597
|
+
* declaration order). */
|
|
598
|
+
export declare function nullishValueUnitOf(L: Lowerer, sym: ts.Symbol | null): "null" | "undefined" | null;
|
|
599
|
+
/** nullishValueUnitOf gated on a declared type that CANNOT hold the
|
|
600
|
+
* value — the NO-STORAGE family: an unmappable type has no other story,
|
|
601
|
+
* and a RECORD-mapped one (`const i: I<A & B> = null as any` — an
|
|
602
|
+
* interface whose members are all generic signatures interns an empty
|
|
603
|
+
* shape) has a slot null can never inhabit, so storing would throw the
|
|
604
|
+
* representation error where Node stores null silently. Either way the
|
|
605
|
+
* declaration emits nothing and reads know the value. Null-tolerant
|
|
606
|
+
* mappings (unions with a null/undefined arm, dyn) keep their real
|
|
607
|
+
* storage and every ordinary lowering. */
|
|
608
|
+
export declare function nullishGenericBindingUnitOf(L: Lowerer, sym: ts.Symbol | null): "null" | "undefined" | null;
|
|
609
|
+
/** True when `sym` — a binding whose type has NO static mapping — is DEAD:
|
|
610
|
+
* never read anywhere in the program, not exported through a specifier,
|
|
611
|
+
* declared with no initializer or a side-effect-free one, and written
|
|
612
|
+
* (if at all) only by plain assignments of side-effect-free values. Node
|
|
613
|
+
* materializes those values and drops them — zero observable effect —
|
|
614
|
+
* so the declaration and its writes lower to NOTHING instead of fencing
|
|
615
|
+
* on a type the program never consumes (`var xs2: typeof Array;`, the
|
|
616
|
+
* write-only `var f2: { <T, U>(x: T, y: U): T }`). TS program files
|
|
617
|
+
* only: JS bindings keep their checked-dynamic fallbacks. Positive
|
|
618
|
+
* answers register in L.deadBindings (the assignment lowering skips
|
|
619
|
+
* writes by the same set). */
|
|
620
|
+
export declare function deadUnmappableBinding(L: Lowerer, sym: ts.Symbol | null, decl: ts.VariableDeclaration): boolean;
|
|
580
621
|
/** The generic function-like INITIALIZER behind a binding declaration —
|
|
581
622
|
* `const f = <T>(x: T) => x` or `const f = function g<T>(x: T) {...}`
|
|
582
623
|
* (parens stripped). Null when the declaration isn't that shape; the
|