@scriptc/compiler 0.0.7 → 0.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ambient/scriptc-node-fallback.d.ts +13 -0
- package/dist/backend/cc.js +14 -0
- package/dist/backend/cc.js.map +1 -1
- package/dist/backend/emission/emit-exprs.js +155 -6
- package/dist/backend/emission/emit-exprs.js.map +1 -1
- package/dist/backend/emission/emit-island.js +9 -1
- package/dist/backend/emission/emit-island.js.map +1 -1
- package/dist/backend/emission/emit-stmts.js +3 -1
- package/dist/backend/emission/emit-stmts.js.map +1 -1
- package/dist/backend/emission/emit-types.d.ts +3 -0
- package/dist/backend/emission/emit-types.js +12 -0
- package/dist/backend/emission/emit-types.js.map +1 -1
- package/dist/backend/emission/emit-walkers.d.ts +7 -5
- package/dist/backend/emission/emit-walkers.js +45 -18
- package/dist/backend/emission/emit-walkers.js.map +1 -1
- package/dist/backend/emission/emitter.d.ts +1 -1
- package/dist/backend/emission/emitter.js +35 -10
- package/dist/backend/emission/emitter.js.map +1 -1
- package/dist/backend/emission/may-throw.js +4 -3
- package/dist/backend/emission/may-throw.js.map +1 -1
- package/dist/backend/llvm/emitter.js +300 -18
- package/dist/backend/llvm/emitter.js.map +1 -1
- package/dist/diagnostics/diagnostic.d.ts +98 -11
- package/dist/diagnostics/diagnostic.js +185 -25
- package/dist/diagnostics/diagnostic.js.map +1 -1
- package/dist/frontend/lib-contract.d.ts +24 -6
- package/dist/frontend/lib-contract.js +125 -44
- package/dist/frontend/lib-contract.js.map +1 -1
- package/dist/frontend/lowering/lower-assert.js +16 -0
- package/dist/frontend/lowering/lower-assert.js.map +1 -1
- package/dist/frontend/lowering/lower-builtins.d.ts +11 -0
- package/dist/frontend/lowering/lower-builtins.js +127 -4
- package/dist/frontend/lowering/lower-builtins.js.map +1 -1
- package/dist/frontend/lowering/lower-calls.d.ts +77 -18
- package/dist/frontend/lowering/lower-calls.js +978 -44
- package/dist/frontend/lowering/lower-calls.js.map +1 -1
- package/dist/frontend/lowering/lower-classes.d.ts +14 -1
- package/dist/frontend/lowering/lower-classes.js +112 -16
- package/dist/frontend/lowering/lower-classes.js.map +1 -1
- package/dist/frontend/lowering/lower-containers.d.ts +4 -2
- package/dist/frontend/lowering/lower-containers.js +236 -44
- package/dist/frontend/lowering/lower-containers.js.map +1 -1
- package/dist/frontend/lowering/lower-emitter.js +55 -1
- package/dist/frontend/lowering/lower-emitter.js.map +1 -1
- package/dist/frontend/lowering/lower-exprs.d.ts +26 -3
- package/dist/frontend/lowering/lower-exprs.js +507 -47
- package/dist/frontend/lowering/lower-exprs.js.map +1 -1
- package/dist/frontend/lowering/lower-island.d.ts +7 -0
- package/dist/frontend/lowering/lower-island.js +71 -10
- package/dist/frontend/lowering/lower-island.js.map +1 -1
- package/dist/frontend/lowering/lower-mixins.d.ts +1 -1
- package/dist/frontend/lowering/lower-mixins.js +1 -1
- package/dist/frontend/lowering/lower-modules.js +95 -4
- package/dist/frontend/lowering/lower-modules.js.map +1 -1
- package/dist/frontend/lowering/lower-stmts.js +866 -56
- package/dist/frontend/lowering/lower-stmts.js.map +1 -1
- package/dist/frontend/lowering/lower-stream.js +28 -2
- package/dist/frontend/lowering/lower-stream.js.map +1 -1
- package/dist/frontend/lowering/lowerer.d.ts +85 -17
- package/dist/frontend/lowering/lowerer.js +459 -37
- package/dist/frontend/lowering/lowerer.js.map +1 -1
- package/dist/frontend/lowering/surfaces.js +20 -3
- package/dist/frontend/lowering/surfaces.js.map +1 -1
- package/dist/frontend/npm-static-rewrite.d.ts +7 -2
- package/dist/frontend/npm-static-rewrite.js +566 -138
- package/dist/frontend/npm-static-rewrite.js.map +1 -1
- package/dist/frontend/npm-static.js +11 -2
- package/dist/frontend/npm-static.js.map +1 -1
- package/dist/frontend/program.js +5 -5
- package/dist/frontend/program.js.map +1 -1
- package/dist/frontend/shared.d.ts +6 -1
- package/dist/frontend/shared.js +46 -1
- package/dist/frontend/shared.js.map +1 -1
- package/dist/frontend/types.d.ts +28 -1
- package/dist/frontend/types.js +304 -10
- package/dist/frontend/types.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +181 -26
- package/dist/index.js.map +1 -1
- package/dist/ir/nodes.d.ts +159 -9
- package/dist/ir/nodes.js +76 -6
- package/dist/ir/nodes.js.map +1 -1
- package/dist/ir/validate.js +93 -14
- package/dist/ir/validate.js.map +1 -1
- package/dist/library/profile.d.ts +17 -3
- package/dist/library/profile.js +38 -9
- package/dist/library/profile.js.map +1 -1
- package/dist/library/sidecar.js +162 -43
- package/dist/library/sidecar.js.map +1 -1
- package/dist/library/trap-teaching.d.ts +11 -0
- package/dist/library/trap-teaching.js +49 -0
- package/dist/library/trap-teaching.js.map +1 -0
- package/package.json +2 -2
- package/surface-manifest.json +46 -4
|
@@ -74,12 +74,36 @@ export declare function requiresDynamicTypeDiag(typeText: string, loc: SrcLoc):
|
|
|
74
74
|
export declare function genericSignatureTypeDiag(typeText: string, loc: SrcLoc): ScrDiagnostic;
|
|
75
75
|
/** An index-signature object type that STILL does not map: STRING and
|
|
76
76
|
* NUMBER index signatures compile (declared fields + an overflow map for
|
|
77
|
-
* undeclared keys, number keys canonicalized to their JS string spelling)
|
|
78
|
-
*
|
|
79
|
-
*
|
|
80
|
-
*
|
|
81
|
-
*
|
|
77
|
+
* undeclared keys, number keys canonicalized to their JS string spelling)
|
|
78
|
+
* over the whole overflow-store value domain — data values, functions
|
|
79
|
+
* (the command-registry pattern), Maps/Sets, nested index-signature
|
|
80
|
+
* records, and 'unknown' — so reaching this means a symbol-keyed
|
|
81
|
+
* signature, dual signatures with UNEQUAL value types, or a value type
|
|
82
|
+
* with no representation at all (Dates, typed arrays beyond the domain,
|
|
83
|
+
* lib API objects). The message points at the working alternatives. */
|
|
82
84
|
export declare function indexSignatureTypeDiag(typeText: string, loc: SrcLoc): ScrDiagnostic;
|
|
85
|
+
/** A value whose type declares TWO OR MORE call signatures (an overloaded
|
|
86
|
+
* function type: `{ (x: "a"): string; (x: "b"): number }`, the on()-style
|
|
87
|
+
* listener registries, overloaded stdlib functions stored as values): a
|
|
88
|
+
* compiled function value is exactly one signature, so a multi-signature
|
|
89
|
+
* slot has no instance to hold. CALLS of overloaded declarations resolve
|
|
90
|
+
* per call site and compile — it is the VALUE position that fences. */
|
|
91
|
+
export declare function overloadedSignatureTypeDiag(typeText: string, loc: SrcLoc): ScrDiagnostic;
|
|
92
|
+
/** An intersection type that resolved to no lowering. The intersections
|
|
93
|
+
* that DO compile never reach this: object-member intersections resolve
|
|
94
|
+
* through the record path (`A & B` interns the combined shape),
|
|
95
|
+
* function-with-properties hybrids map to `%call` records, and
|
|
96
|
+
* mixin-instantiation intersections resolve by chain structure to their
|
|
97
|
+
* pinned instantiation. What lands here is the remainder — an intersection
|
|
98
|
+
* part outside those rules, or a mixin intersection no chain pins. */
|
|
99
|
+
export declare function intersectionTypeDiag(typeText: string, loc: SrcLoc): ScrDiagnostic;
|
|
100
|
+
/** A SUPPORTED shape over a component type outside its slot: the Map/Set
|
|
101
|
+
* key-value domains, array and tuple elements, union arms, function
|
|
102
|
+
* parameters/returns, and record members. The container is not the blocker
|
|
103
|
+
* — `detail` (computed by describeComponentBlocker/
|
|
104
|
+
* describeRecordMemberBlocker in frontend/types.ts, which mirror mapType's
|
|
105
|
+
* own rules) names the component and the slot it cannot fill. */
|
|
106
|
+
export declare function componentTypeDiag(typeText: string, detail: string, loc: SrcLoc): ScrDiagnostic;
|
|
83
107
|
/** A REACHED use of standard-library surface with no lowering — the scope
|
|
84
108
|
* fence of the real-lib type world. The checker sees the full es2025
|
|
85
109
|
* standard library, so `Symbol`, `new Date()`, `p.then(...)`, `Math.min`
|
|
@@ -89,10 +113,13 @@ export declare function indexSignatureTypeDiag(typeText: string, loc: SrcLoc): S
|
|
|
89
113
|
* used ('Symbol', 'Math.sumPrecise', 'new Date', 'string.normalize'). */
|
|
90
114
|
export declare function noLoweringDiag(surface: string, loc: SrcLoc, hint?: string, viaNodeTypes?: boolean): ScrDiagnostic;
|
|
91
115
|
/** Records are monomorphic structs, so a value's shape must match the
|
|
92
|
-
* expected shape
|
|
93
|
-
* (
|
|
94
|
-
*
|
|
95
|
-
|
|
116
|
+
* expected shape exactly OR narrow through the width-copy family
|
|
117
|
+
* (recordWidthPlan / the overflow capture: target fields copied off the
|
|
118
|
+
* source, extra fields dropped, per-field lifts). What reaches this is
|
|
119
|
+
* the RESIDUE those rules decline — `detail`, when the classifier has a
|
|
120
|
+
* pointed answer (describeRecordWidthBlocker), names the first blocking
|
|
121
|
+
* rule instead of leaving two near-identical type prints to eyeball. */
|
|
122
|
+
export declare function recordShapeMismatchDiag(expectedText: string, actualText: string, loc: SrcLoc, detail?: string): ScrDiagnostic;
|
|
96
123
|
/** Union values carry a runtime tag assigned per-union: a value of one
|
|
97
124
|
* union type flowing into a DIFFERENT union's slot re-tags at runtime when
|
|
98
125
|
* every source arm has a home in the destination (`A | B` into `A | B | C`
|
|
@@ -171,10 +198,12 @@ export declare function libAsyncExportDiag(exportName: string, kind: "async" | "
|
|
|
171
198
|
* graph, never observed at runtime. Carries the profile's teaching. */
|
|
172
199
|
export declare function libAsyncSurfaceDiag(surface: string, loc: SrcLoc, teaching?: string): ScrDiagnostic;
|
|
173
200
|
/** SC4006 — island/dynamic machinery on the library path: --dynamic,
|
|
174
|
-
* --npm-static
|
|
201
|
+
* --npm-static as a FLAG, `any`-typed island surface. Bare npm imports
|
|
202
|
+
* themselves are not this code: an eligible package compiles statically
|
|
203
|
+
* as part of the library graph, an ineligible one refuses SC4013. */
|
|
175
204
|
export declare function libDynamicDiag(what: string, loc: SrcLoc): ScrDiagnostic;
|
|
176
205
|
/** SC4007 — a mapped export whose signature keeps type parameters: every
|
|
177
|
-
* compiled function is one concrete signature (the
|
|
206
|
+
* compiled function is one concrete signature (the SC2005 monomorphization
|
|
178
207
|
* rule, re-anchored at the profile entry). */
|
|
179
208
|
export declare function libGenericExportDiag(exportName: string, loc: SrcLoc): ScrDiagnostic;
|
|
180
209
|
/** SC4009 — the contract sidecar cannot be projected: a profile
|
|
@@ -183,5 +212,63 @@ export declare function libGenericExportDiag(exportName: string, loc: SrcLoc): S
|
|
|
183
212
|
* is malformed. The sidecar records verdicts, never guesses — anything
|
|
184
213
|
* unprojectable refuses with the offending declaration named. */
|
|
185
214
|
export declare function libSidecarDiag(detail: string, loc: SrcLoc, hint?: string): ScrDiagnostic;
|
|
215
|
+
/** SC4010 — a tabled or designated type's members gather from MORE THAN
|
|
216
|
+
* ONE declaration site (interface merging, module augmentation, a
|
|
217
|
+
* same-name exported declaration in another module): the merged member
|
|
218
|
+
* order is a checker implementation detail no sidecar consumer can
|
|
219
|
+
* reproduce from source, and declaration order IS the wire contract. The
|
|
220
|
+
* teaching names every contributing site. */
|
|
221
|
+
export declare function libSidecarMergedDiag(name: string, sites: readonly string[], loc: SrcLoc): ScrDiagnostic;
|
|
222
|
+
/** SC4011 — a conditional or mapped type produces a tabled or designated
|
|
223
|
+
* type: type-level computation has no author-visible declaration order,
|
|
224
|
+
* so its member order cannot be the wire contract. */
|
|
225
|
+
export declare function libSidecarComputedDiag(name: string, which: "conditional" | "mapped", loc: SrcLoc): ScrDiagnostic;
|
|
226
|
+
/** SC4012 — the library-mode host-contract violation trap a generated
|
|
227
|
+
* entry wrapper raises when an inbound bytes buffer's declared length falls
|
|
228
|
+
* outside the marshalling class's range (past 2^53−1 — no real buffer, so
|
|
229
|
+
* the host and the library disagree about the call contract). A RUNTIME
|
|
230
|
+
* code, never a compile-time refusal: it rides the structured trap-teaching
|
|
231
|
+
* message (library/trap-teaching.ts) the wrapper delivers through the panic
|
|
232
|
+
* sink, alongside the trapping export's C symbol and the profile's teaching
|
|
233
|
+
* and remediation text for this code when the profile supplies them. */
|
|
234
|
+
export declare const LIB_INBOUND_BYTES_TRAP_CODE = "SC4012";
|
|
235
|
+
/** SC4013–SC4019 — the library-mode runtime detected-trap family. RUNTIME
|
|
236
|
+
* codes like SC4012, never compile-time refusals: every trap the runtime
|
|
237
|
+
* DETECTS in library mode reaches the panic sink as a structured
|
|
238
|
+
* trap-teaching message (library/trap-teaching.ts's encoding), assembled by
|
|
239
|
+
* the library trap funnel (scr_library.c) with the baseline human line
|
|
240
|
+
* unchanged as field 0, one of these codes, and the trapping entry's
|
|
241
|
+
* symbol; a profile may overlay teaching/remediation text per code through
|
|
242
|
+
* the program TU's overlay table. The kinds are the runtime's ACTUAL trap
|
|
243
|
+
* sites, classified by the funnel over the sites' message conventions:
|
|
244
|
+
*
|
|
245
|
+
* SC4013 escaped exception at an entry (the "Uncaught ..." renderer,
|
|
246
|
+
* scr_library_check_exc — declared entries do not throw)
|
|
247
|
+
* SC4014 range trap ("scriptc: RangeError: ...": array/typed-array
|
|
248
|
+
* index out of bounds, pop() on empty, invalid count value)
|
|
249
|
+
* SC4015 type trap ("scriptc: TypeError: ...": a keyed read miss on a
|
|
250
|
+
* result type that cannot say undefined)
|
|
251
|
+
* SC4016 syntax trap ("scriptc: SyntaxError: ...": invalid regular
|
|
252
|
+
* expression at runtime construction)
|
|
253
|
+
* SC4017 out of memory ("scriptc: out of memory")
|
|
254
|
+
* SC4018 internal invariant failure ("scriptc: internal error: ...")
|
|
255
|
+
* SC4019 other detected trap (the family's residual: environment
|
|
256
|
+
* failures like getcwd/os lookups, unsupported regex
|
|
257
|
+
* operations, circular-structure conversion, the RC audit)
|
|
258
|
+
*
|
|
259
|
+
* There is no arithmetic/div-by-zero kind: JS division never traps, so the
|
|
260
|
+
* runtime has no such site. The list here is the compile-time face of the
|
|
261
|
+
* family (profile overlay filtering); the funnel's classification table in
|
|
262
|
+
* scr_library.c is the runtime face — keep the two in step. */
|
|
263
|
+
export declare const LIB_RUNTIME_TRAP_CODES: readonly ["SC4013", "SC4014", "SC4015", "SC4016", "SC4017", "SC4018", "SC4019"];
|
|
264
|
+
/** SC4020 — a bare npm specifier in a library graph naming a package that
|
|
265
|
+
* fails the npm-static eligibility bar (own .d.ts, unminified shipped JS,
|
|
266
|
+
* no build-transform markers) or whose static compilation the preflight
|
|
267
|
+
* had to refuse. Library mode is STATIC-OR-REFUSE by construction: the
|
|
268
|
+
* island/dynamic tier the executable lane falls back to does not exist on
|
|
269
|
+
* this path (SC4006's ground), so the refusal names the package, the
|
|
270
|
+
* specific bar it missed, and the remedy. Carries the profile's teaching
|
|
271
|
+
* for this code when supplied. */
|
|
272
|
+
export declare function libNpmIneligibleDiag(pkg: string, reason: string, loc: SrcLoc, teaching?: string): ScrDiagnostic;
|
|
186
273
|
export declare function iceDiag(message: string, loc: SrcLoc): ScrDiagnostic;
|
|
187
274
|
export {};
|
|
@@ -7,10 +7,11 @@ export const UNSUPPORTED = {
|
|
|
7
7
|
"exports), installed npm packages (their code runs under --dynamic), " +
|
|
8
8
|
"and the built-in fs, fs/promises, path, os, url, crypto, zlib, " +
|
|
9
9
|
"child_process, net, http, tls, https, http2, dgram, dns, util, " +
|
|
10
|
-
"util/types, string_decoder, readline, events, stream,
|
|
11
|
-
"assert, assert/strict, worker_threads,
|
|
12
|
-
"
|
|
13
|
-
"node:test and node:module
|
|
10
|
+
"util/types, string_decoder, querystring, readline, events, stream, " +
|
|
11
|
+
"stream/promises, buffer, assert, assert/strict, worker_threads, " +
|
|
12
|
+
"cluster, tty, async_hooks, timers, timers/promises, " +
|
|
13
|
+
"diagnostics_channel, perf_hooks, and node:test and node:module " +
|
|
14
|
+
"modules (bare or node:-prefixed) are supported",
|
|
14
15
|
},
|
|
15
16
|
// SC1011 (exports) shipped via export modifiers — retired, do not reuse.
|
|
16
17
|
// Default exports/imports SHIPPED (expression, function/class declaration
|
|
@@ -142,10 +143,20 @@ export const UNSUPPORTED = {
|
|
|
142
143
|
* (SC9001/SC9002) report problems or engine tiers, not language/stdlib
|
|
143
144
|
* surface. */
|
|
144
145
|
export const FENCE_CODES = {
|
|
145
|
-
SC2001
|
|
146
|
-
|
|
146
|
+
// SC2001 is the residual type fence: the named type-shape families each
|
|
147
|
+
// carry their own code (SC2005 generic signatures, SC2006 index
|
|
148
|
+
// signatures, SC2007 overloads, SC2008 intersections, SC2009 component
|
|
149
|
+
// fences; standard-library types with no lowering report SC2020). What
|
|
150
|
+
// remains here is the remainder the name enumerates.
|
|
151
|
+
SC2001: { name: "values of types outside the compilable set (bigint and symbol primitives, constructor objects, and library-derived or unresolved generic shapes)", status: "unsupported" },
|
|
152
|
+
SC2002: { name: "record shape flows outside the width-copy rules (shapes must match exactly or width-coerce)", status: "unsupported" },
|
|
147
153
|
SC2003: { name: "union-to-union conversions outside the re-tagging rule", status: "unsupported" },
|
|
148
154
|
SC2004: { name: "uses of a binding whose declaration did not compile (cascade marker)", status: "unsupported" },
|
|
155
|
+
SC2005: { name: "values whose type keeps a generic call signature (a compiled function is one concrete signature)", status: "unsupported" },
|
|
156
|
+
SC2006: { name: "index-signature object types outside the supported shape", status: "unsupported" },
|
|
157
|
+
SC2007: { name: "values of overloaded function type (a compiled function value is one signature)", status: "unsupported" },
|
|
158
|
+
SC2008: { name: "intersection types with no resolved lowering", status: "unsupported" },
|
|
159
|
+
SC2009: { name: "supported container and function shapes over a component type outside its slot", status: "unsupported" },
|
|
149
160
|
SC2010: { name: "constructs that exist only in the embedded dynamic engine", status: "dynamic-only" },
|
|
150
161
|
SC2011: { name: "'any'-typed values and the operations on them", status: "dynamic-only" },
|
|
151
162
|
SC2012: { name: "standard-library surface that runs in the embedded dynamic engine", status: "dynamic-only" },
|
|
@@ -245,6 +256,12 @@ export function unsupportedTypeDiag(typeText, loc) {
|
|
|
245
256
|
hint: "build with --dynamic to run 'any'-typed code in the embedded engine (adds ~620KB to the binary), or stay static with 'unknown' and a checked cast ('x as T')",
|
|
246
257
|
};
|
|
247
258
|
}
|
|
259
|
+
// The RESIDUAL type fence: the named families (generic signatures —
|
|
260
|
+
// SC2005, index signatures — SC2006, overloads — SC2007, intersections —
|
|
261
|
+
// SC2008, component fences — SC2009, standard-library types — SC2020)
|
|
262
|
+
// all speak before badType reaches for this, so what lands here is the
|
|
263
|
+
// remainder the registry entry enumerates: bigint/symbol primitives,
|
|
264
|
+
// constructor objects, and library-derived or unresolved generic shapes.
|
|
248
265
|
return {
|
|
249
266
|
code: "SC2001",
|
|
250
267
|
message: `values of type '${typeText}' cannot be compiled yet ` +
|
|
@@ -278,8 +295,8 @@ export function requiresDynamicTypeDiag(typeText, loc) {
|
|
|
278
295
|
* supported-types recitation. */
|
|
279
296
|
export function genericSignatureTypeDiag(typeText, loc) {
|
|
280
297
|
return {
|
|
281
|
-
code: "
|
|
282
|
-
message: `values of type '${typeText}' cannot be compiled: the signature keeps its type parameters, and a compiled function is always one concrete signature (generic functions monomorphize per pinned signature — declarations, methods, and never-reassigned
|
|
298
|
+
code: "SC2005",
|
|
299
|
+
message: `values of type '${typeText}' cannot be compiled: the signature keeps its type parameters, and a compiled function is always one concrete signature (generic functions monomorphize per pinned signature — declarations, methods, and never-reassigned bindings holding a generic arrow/function expression, an alias of a registered generic function, or a function initializer under a generic-signature annotation)`,
|
|
283
300
|
loc,
|
|
284
301
|
milestone: "M2",
|
|
285
302
|
hint: "annotate the destination with a concrete signature (e.g. '(x: number) => number'), instantiate explicitly ('f<number>'), or call the generic function directly",
|
|
@@ -287,18 +304,66 @@ export function genericSignatureTypeDiag(typeText, loc) {
|
|
|
287
304
|
}
|
|
288
305
|
/** An index-signature object type that STILL does not map: STRING and
|
|
289
306
|
* NUMBER index signatures compile (declared fields + an overflow map for
|
|
290
|
-
* undeclared keys, number keys canonicalized to their JS string spelling)
|
|
291
|
-
*
|
|
292
|
-
*
|
|
293
|
-
*
|
|
294
|
-
*
|
|
307
|
+
* undeclared keys, number keys canonicalized to their JS string spelling)
|
|
308
|
+
* over the whole overflow-store value domain — data values, functions
|
|
309
|
+
* (the command-registry pattern), Maps/Sets, nested index-signature
|
|
310
|
+
* records, and 'unknown' — so reaching this means a symbol-keyed
|
|
311
|
+
* signature, dual signatures with UNEQUAL value types, or a value type
|
|
312
|
+
* with no representation at all (Dates, typed arrays beyond the domain,
|
|
313
|
+
* lib API objects). The message points at the working alternatives. */
|
|
295
314
|
export function indexSignatureTypeDiag(typeText, loc) {
|
|
296
315
|
return {
|
|
297
|
-
code: "
|
|
298
|
-
message: `values of type '${typeText}' cannot be compiled: this index signature is outside the supported shape (string or number keys; values limited to numbers, strings, booleans, records, classes, arrays, unions, or 'unknown')`,
|
|
316
|
+
code: "SC2006",
|
|
317
|
+
message: `values of type '${typeText}' cannot be compiled: this index signature is outside the supported shape (string or number keys; values limited to numbers, strings, booleans, records, classes, arrays, unions, functions, Maps, Sets, RegExps, Promises, or 'unknown')`,
|
|
318
|
+
loc,
|
|
319
|
+
milestone: "M2",
|
|
320
|
+
hint: "string- and number-keyed index signatures over the supported value types compile directly; symbol keys and dual signatures with unequal value types have no lowering",
|
|
321
|
+
};
|
|
322
|
+
}
|
|
323
|
+
/** A value whose type declares TWO OR MORE call signatures (an overloaded
|
|
324
|
+
* function type: `{ (x: "a"): string; (x: "b"): number }`, the on()-style
|
|
325
|
+
* listener registries, overloaded stdlib functions stored as values): a
|
|
326
|
+
* compiled function value is exactly one signature, so a multi-signature
|
|
327
|
+
* slot has no instance to hold. CALLS of overloaded declarations resolve
|
|
328
|
+
* per call site and compile — it is the VALUE position that fences. */
|
|
329
|
+
export function overloadedSignatureTypeDiag(typeText, loc) {
|
|
330
|
+
return {
|
|
331
|
+
code: "SC2007",
|
|
332
|
+
message: `values of type '${typeText}' cannot be compiled: the type declares multiple call signatures (overloads), and a compiled function value is always one concrete signature`,
|
|
333
|
+
loc,
|
|
334
|
+
milestone: "M2",
|
|
335
|
+
hint: "annotate the slot with the ONE signature the program actually calls (e.g. '(x: number) => string'), or wrap the overloaded function in a single-signature arrow",
|
|
336
|
+
};
|
|
337
|
+
}
|
|
338
|
+
/** An intersection type that resolved to no lowering. The intersections
|
|
339
|
+
* that DO compile never reach this: object-member intersections resolve
|
|
340
|
+
* through the record path (`A & B` interns the combined shape),
|
|
341
|
+
* function-with-properties hybrids map to `%call` records, and
|
|
342
|
+
* mixin-instantiation intersections resolve by chain structure to their
|
|
343
|
+
* pinned instantiation. What lands here is the remainder — an intersection
|
|
344
|
+
* part outside those rules, or a mixin intersection no chain pins. */
|
|
345
|
+
export function intersectionTypeDiag(typeText, loc) {
|
|
346
|
+
return {
|
|
347
|
+
code: "SC2008",
|
|
348
|
+
message: `values of type '${typeText}' cannot be compiled: this intersection resolves to no runtime shape`,
|
|
349
|
+
loc,
|
|
350
|
+
milestone: "M2",
|
|
351
|
+
hint: "restate the intersection as a single interface or type literal with the combined members; mixin-produced intersections compile where the mixin chain pins one instantiation",
|
|
352
|
+
};
|
|
353
|
+
}
|
|
354
|
+
/** A SUPPORTED shape over a component type outside its slot: the Map/Set
|
|
355
|
+
* key-value domains, array and tuple elements, union arms, function
|
|
356
|
+
* parameters/returns, and record members. The container is not the blocker
|
|
357
|
+
* — `detail` (computed by describeComponentBlocker/
|
|
358
|
+
* describeRecordMemberBlocker in frontend/types.ts, which mirror mapType's
|
|
359
|
+
* own rules) names the component and the slot it cannot fill. */
|
|
360
|
+
export function componentTypeDiag(typeText, detail, loc) {
|
|
361
|
+
return {
|
|
362
|
+
code: "SC2009",
|
|
363
|
+
message: `values of type '${typeText}' cannot be compiled: ${detail}`,
|
|
299
364
|
loc,
|
|
300
365
|
milestone: "M2",
|
|
301
|
-
hint: "
|
|
366
|
+
hint: "the outer shape is supported — the named component is the blocker; restate it inside the compilable set (number, string, boolean, arrays, Maps, Sets, RegExp, functions, classes, records, unions of those, and 'unknown')",
|
|
302
367
|
};
|
|
303
368
|
}
|
|
304
369
|
/** A REACHED use of standard-library surface with no lowering — the scope
|
|
@@ -329,17 +394,20 @@ export function noLoweringDiag(surface, loc, hint, viaNodeTypes = false) {
|
|
|
329
394
|
};
|
|
330
395
|
}
|
|
331
396
|
/** Records are monomorphic structs, so a value's shape must match the
|
|
332
|
-
* expected shape
|
|
333
|
-
* (
|
|
334
|
-
*
|
|
335
|
-
|
|
397
|
+
* expected shape exactly OR narrow through the width-copy family
|
|
398
|
+
* (recordWidthPlan / the overflow capture: target fields copied off the
|
|
399
|
+
* source, extra fields dropped, per-field lifts). What reaches this is
|
|
400
|
+
* the RESIDUE those rules decline — `detail`, when the classifier has a
|
|
401
|
+
* pointed answer (describeRecordWidthBlocker), names the first blocking
|
|
402
|
+
* rule instead of leaving two near-identical type prints to eyeball. */
|
|
403
|
+
export function recordShapeMismatchDiag(expectedText, actualText, loc, detail) {
|
|
336
404
|
return {
|
|
337
405
|
code: "SC2002",
|
|
338
|
-
message: `record shapes must match exactly: expected '${expectedText}', got '${actualText}'
|
|
339
|
-
|
|
406
|
+
message: `record shapes must match exactly or width-coerce: expected '${expectedText}', got '${actualText}'` +
|
|
407
|
+
(detail !== undefined ? ` — ${detail}` : ""),
|
|
340
408
|
loc,
|
|
341
409
|
milestone: "later",
|
|
342
|
-
hint: "
|
|
410
|
+
hint: "width subtyping compiles as a copy (each expected field copied off the source; extra fields drop) — this pair is outside the copy's rules; build a literal with exactly the expected fields instead",
|
|
343
411
|
};
|
|
344
412
|
}
|
|
345
413
|
/** Union values carry a runtime tag assigned per-union: a value of one
|
|
@@ -537,7 +605,9 @@ export function libAsyncSurfaceDiag(surface, loc, teaching) {
|
|
|
537
605
|
};
|
|
538
606
|
}
|
|
539
607
|
/** SC4006 — island/dynamic machinery on the library path: --dynamic,
|
|
540
|
-
* --npm-static
|
|
608
|
+
* --npm-static as a FLAG, `any`-typed island surface. Bare npm imports
|
|
609
|
+
* themselves are not this code: an eligible package compiles statically
|
|
610
|
+
* as part of the library graph, an ineligible one refuses SC4013. */
|
|
541
611
|
export function libDynamicDiag(what, loc) {
|
|
542
612
|
return {
|
|
543
613
|
code: "SC4006",
|
|
@@ -547,7 +617,7 @@ export function libDynamicDiag(what, loc) {
|
|
|
547
617
|
};
|
|
548
618
|
}
|
|
549
619
|
/** SC4007 — a mapped export whose signature keeps type parameters: every
|
|
550
|
-
* compiled function is one concrete signature (the
|
|
620
|
+
* compiled function is one concrete signature (the SC2005 monomorphization
|
|
551
621
|
* rule, re-anchored at the profile entry). */
|
|
552
622
|
export function libGenericExportDiag(exportName, loc) {
|
|
553
623
|
return {
|
|
@@ -574,6 +644,96 @@ export function libSidecarDiag(detail, loc, hint) {
|
|
|
574
644
|
"module's exported declarations in source order",
|
|
575
645
|
};
|
|
576
646
|
}
|
|
647
|
+
/** SC4010 — a tabled or designated type's members gather from MORE THAN
|
|
648
|
+
* ONE declaration site (interface merging, module augmentation, a
|
|
649
|
+
* same-name exported declaration in another module): the merged member
|
|
650
|
+
* order is a checker implementation detail no sidecar consumer can
|
|
651
|
+
* reproduce from source, and declaration order IS the wire contract. The
|
|
652
|
+
* teaching names every contributing site. */
|
|
653
|
+
export function libSidecarMergedDiag(name, sites, loc) {
|
|
654
|
+
return {
|
|
655
|
+
code: "SC4010",
|
|
656
|
+
message: `contract sidecar: '${name}' gathers members from ${sites.length} declaration sites (${sites.join(", ")}) — a tabled type's order must derive from ONE declaration site`,
|
|
657
|
+
loc,
|
|
658
|
+
hint: `merged declaration order is a checker implementation detail that no sidecar consumer can reproduce from source — ` +
|
|
659
|
+
`collapse '${name}' into a single declaration and delete or rename the other site(s): ${sites.join(", ")}`,
|
|
660
|
+
};
|
|
661
|
+
}
|
|
662
|
+
/** SC4011 — a conditional or mapped type produces a tabled or designated
|
|
663
|
+
* type: type-level computation has no author-visible declaration order,
|
|
664
|
+
* so its member order cannot be the wire contract. */
|
|
665
|
+
export function libSidecarComputedDiag(name, which, loc) {
|
|
666
|
+
return {
|
|
667
|
+
code: "SC4011",
|
|
668
|
+
message: `contract sidecar: '${name}' is produced by a ${which} type — a tabled or designated type needs literal, declaration-ordered members`,
|
|
669
|
+
loc,
|
|
670
|
+
hint: "table and arm order is wire contract read from the declaration site, and a computed type's member order is " +
|
|
671
|
+
"checker evaluation, not source — spell the union's arms (or the record's fields) literally in one declaration",
|
|
672
|
+
};
|
|
673
|
+
}
|
|
674
|
+
/** SC4012 — the library-mode host-contract violation trap a generated
|
|
675
|
+
* entry wrapper raises when an inbound bytes buffer's declared length falls
|
|
676
|
+
* outside the marshalling class's range (past 2^53−1 — no real buffer, so
|
|
677
|
+
* the host and the library disagree about the call contract). A RUNTIME
|
|
678
|
+
* code, never a compile-time refusal: it rides the structured trap-teaching
|
|
679
|
+
* message (library/trap-teaching.ts) the wrapper delivers through the panic
|
|
680
|
+
* sink, alongside the trapping export's C symbol and the profile's teaching
|
|
681
|
+
* and remediation text for this code when the profile supplies them. */
|
|
682
|
+
export const LIB_INBOUND_BYTES_TRAP_CODE = "SC4012";
|
|
683
|
+
/** SC4013–SC4019 — the library-mode runtime detected-trap family. RUNTIME
|
|
684
|
+
* codes like SC4012, never compile-time refusals: every trap the runtime
|
|
685
|
+
* DETECTS in library mode reaches the panic sink as a structured
|
|
686
|
+
* trap-teaching message (library/trap-teaching.ts's encoding), assembled by
|
|
687
|
+
* the library trap funnel (scr_library.c) with the baseline human line
|
|
688
|
+
* unchanged as field 0, one of these codes, and the trapping entry's
|
|
689
|
+
* symbol; a profile may overlay teaching/remediation text per code through
|
|
690
|
+
* the program TU's overlay table. The kinds are the runtime's ACTUAL trap
|
|
691
|
+
* sites, classified by the funnel over the sites' message conventions:
|
|
692
|
+
*
|
|
693
|
+
* SC4013 escaped exception at an entry (the "Uncaught ..." renderer,
|
|
694
|
+
* scr_library_check_exc — declared entries do not throw)
|
|
695
|
+
* SC4014 range trap ("scriptc: RangeError: ...": array/typed-array
|
|
696
|
+
* index out of bounds, pop() on empty, invalid count value)
|
|
697
|
+
* SC4015 type trap ("scriptc: TypeError: ...": a keyed read miss on a
|
|
698
|
+
* result type that cannot say undefined)
|
|
699
|
+
* SC4016 syntax trap ("scriptc: SyntaxError: ...": invalid regular
|
|
700
|
+
* expression at runtime construction)
|
|
701
|
+
* SC4017 out of memory ("scriptc: out of memory")
|
|
702
|
+
* SC4018 internal invariant failure ("scriptc: internal error: ...")
|
|
703
|
+
* SC4019 other detected trap (the family's residual: environment
|
|
704
|
+
* failures like getcwd/os lookups, unsupported regex
|
|
705
|
+
* operations, circular-structure conversion, the RC audit)
|
|
706
|
+
*
|
|
707
|
+
* There is no arithmetic/div-by-zero kind: JS division never traps, so the
|
|
708
|
+
* runtime has no such site. The list here is the compile-time face of the
|
|
709
|
+
* family (profile overlay filtering); the funnel's classification table in
|
|
710
|
+
* scr_library.c is the runtime face — keep the two in step. */
|
|
711
|
+
export const LIB_RUNTIME_TRAP_CODES = [
|
|
712
|
+
"SC4013",
|
|
713
|
+
"SC4014",
|
|
714
|
+
"SC4015",
|
|
715
|
+
"SC4016",
|
|
716
|
+
"SC4017",
|
|
717
|
+
"SC4018",
|
|
718
|
+
"SC4019",
|
|
719
|
+
];
|
|
720
|
+
/** SC4020 — a bare npm specifier in a library graph naming a package that
|
|
721
|
+
* fails the npm-static eligibility bar (own .d.ts, unminified shipped JS,
|
|
722
|
+
* no build-transform markers) or whose static compilation the preflight
|
|
723
|
+
* had to refuse. Library mode is STATIC-OR-REFUSE by construction: the
|
|
724
|
+
* island/dynamic tier the executable lane falls back to does not exist on
|
|
725
|
+
* this path (SC4006's ground), so the refusal names the package, the
|
|
726
|
+
* specific bar it missed, and the remedy. Carries the profile's teaching
|
|
727
|
+
* for this code when supplied. */
|
|
728
|
+
export function libNpmIneligibleDiag(pkg, reason, loc, teaching) {
|
|
729
|
+
return {
|
|
730
|
+
code: "SC4020",
|
|
731
|
+
message: `library mode compiles npm packages statically or not at all, and '${pkg}' cannot compile statically: ${reason}`,
|
|
732
|
+
loc,
|
|
733
|
+
hint: "library artifacts have no island/dynamic tier to fall back to — vendor the code you need from the package as project modules, or drop the dependency" +
|
|
734
|
+
(teaching !== undefined ? ` — ${teaching}` : ""),
|
|
735
|
+
};
|
|
736
|
+
}
|
|
577
737
|
export function iceDiag(message, loc) {
|
|
578
738
|
return {
|
|
579
739
|
code: "SC9001",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"diagnostic.js","sourceRoot":"","sources":["../../src/diagnostics/diagnostic.ts"],"names":[],"mappings":"AA8CA,MA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TypeShape[];
|
|
34
|
-
}
|
|
34
|
+
}
|
|
35
|
+
/** `computed` marks type-level computation (conditional/mapped types):
|
|
36
|
+
* the members such a type produces have no author-visible declaration
|
|
37
|
+
* order, so a tabled/designated one refuses with its own teaching. */
|
|
38
|
+
| {
|
|
35
39
|
k: "unsupported";
|
|
36
40
|
text: string;
|
|
41
|
+
computed?: "conditional" | "mapped";
|
|
37
42
|
};
|
|
38
43
|
export interface ContractField {
|
|
39
44
|
name: string;
|
|
@@ -66,8 +71,19 @@ export interface ContractConst<T> {
|
|
|
66
71
|
loc: SrcLoc;
|
|
67
72
|
}
|
|
68
73
|
export interface ContractFacts {
|
|
69
|
-
/** Exported interface/type-alias declarations
|
|
74
|
+
/** Exported interface/type-alias declarations: the entry module's in
|
|
75
|
+
* statement order, then the other modules' (canonical path order, each
|
|
76
|
+
* module's in statement order). One entry per name — a later same-name
|
|
77
|
+
* exported declaration lands in `multiSiteTypes` instead. */
|
|
70
78
|
types: ContractTypeDecl[];
|
|
79
|
+
/** Type names whose members gather from more than one declaration site
|
|
80
|
+
* (see the module comment). `sites` are `file:line`, in scan order
|
|
81
|
+
* (entry first, then path-ordered modules) — the emitter's refusal
|
|
82
|
+
* names every site. */
|
|
83
|
+
multiSiteTypes: {
|
|
84
|
+
name: string;
|
|
85
|
+
sites: string[];
|
|
86
|
+
}[];
|
|
71
87
|
/** Exported function declarations, statement order. */
|
|
72
88
|
functions: ContractFnDecl[];
|
|
73
89
|
modelUnbound: ContractConst<string[]> | null;
|
|
@@ -90,7 +106,9 @@ export interface ContractFacts {
|
|
|
90
106
|
* sidecar schema can express. Anything else lands as `unsupported` with
|
|
91
107
|
* the source text preserved for the refusal message. */
|
|
92
108
|
export declare function typeShape(file: ts.SourceFile, node: ts.TypeNode): ContractTypeShape;
|
|
93
|
-
/** Everything the sidecar projection needs from the
|
|
94
|
-
*
|
|
95
|
-
*
|
|
96
|
-
|
|
109
|
+
/** Everything the sidecar projection needs from the program's syntax
|
|
110
|
+
* trees: functions and convention consts from the entry module, type
|
|
111
|
+
* declarations from the whole graph (entry first, other modules in
|
|
112
|
+
* canonical path order), each in statement (declaration) order. Call
|
|
113
|
+
* before the frontend is disposed. */
|
|
114
|
+
export declare function entryContractFacts(entry: ts.SourceFile, modules?: readonly ts.SourceFile[]): ContractFacts;
|