@scriptc/compiler 0.0.10 → 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 +34 -2
- package/dist/backend/emission/emit-exprs.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/emitter.js +59 -4
- 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 +20 -7
- package/dist/diagnostics/diagnostic.js +44 -11
- package/dist/diagnostics/diagnostic.js.map +1 -1
- package/dist/frontend/lowering/lower-builtins.d.ts +56 -0
- package/dist/frontend/lowering/lower-builtins.js +235 -4
- package/dist/frontend/lowering/lower-builtins.js.map +1 -1
- package/dist/frontend/lowering/lower-calls.js +38 -4
- 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 +4 -0
- package/dist/frontend/lowering/lower-containers.js +69 -7
- package/dist/frontend/lowering/lower-containers.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 +472 -13
- 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 +141 -47
- package/dist/frontend/lowering/lower-modules.js.map +1 -1
- package/dist/frontend/lowering/lower-namespaces.d.ts +14 -0
- package/dist/frontend/lowering/lower-namespaces.js +122 -15
- package/dist/frontend/lowering/lower-namespaces.js.map +1 -1
- package/dist/frontend/lowering/lower-stmts.js +80 -6
- package/dist/frontend/lowering/lower-stmts.js.map +1 -1
- package/dist/frontend/lowering/lower-stream.js +113 -6
- package/dist/frontend/lowering/lower-stream.js.map +1 -1
- package/dist/frontend/lowering/lowerer.d.ts +17 -0
- package/dist/frontend/lowering/lowerer.js +105 -17
- 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/index.d.ts +2 -1
- package/dist/index.js +137 -4
- package/dist/index.js.map +1 -1
- package/dist/ir/nodes.d.ts +64 -8
- package/dist/ir/nodes.js +21 -3
- package/dist/ir/nodes.js.map +1 -1
- package/dist/ir/validate.js +11 -2
- package/dist/ir/validate.js.map +1 -1
- package/dist/library/fence-eval.js +12 -2
- package/dist/library/fence-eval.js.map +1 -1
- 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 +32 -5
- package/dist/library/profile.js +77 -13
- 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
|
@@ -39,14 +39,15 @@
|
|
|
39
39
|
* order, and the output carries no timestamps or absolute paths. */
|
|
40
40
|
import { FENCE_CODES, UNSUPPORTED } from "../diagnostics/diagnostic.js";
|
|
41
41
|
import { SUPPORTED_BUILTIN_MODULES, SUPPORTED_NODE_MODULES } from "../frontend/shared.js";
|
|
42
|
-
import { ARRAY_METHODS, BUILTIN_MODULE_CONSTS, BUILTIN_MODULE_FENCE_HINTS, BUILTIN_MODULE_FNS, COMPOUND_ASSIGN_OPS, ISLAND_SURFACE, MAP_METHODS, SET_COMBINE_METHODS, SET_METHODS, STATIC_MATH_FNS, STR_METHODS, UNSUPPORTED_EXPR, UNSUPPORTED_STMT, } from "../frontend/lowering/surfaces.js";
|
|
42
|
+
import { AMBIENT_SURFACE_FNS, ARRAY_METHODS, BUILTIN_MODULE_CONSTS, BUILTIN_MODULE_FENCE_HINTS, BUILTIN_MODULE_FNS, COMPOUND_ASSIGN_OPS, ISLAND_SURFACE, MAP_METHODS, SET_COMBINE_METHODS, SET_METHODS, STATIC_MATH_FNS, STR_METHODS, UNSUPPORTED_EXPR, UNSUPPORTED_STMT, } from "../frontend/lowering/surfaces.js";
|
|
43
43
|
export const MANIFEST_SCHEMA_VERSION = 1;
|
|
44
44
|
/** The manifest's own scope statement: what the projection covers and —
|
|
45
45
|
* just as load-bearing — what it deliberately leaves out, so absence is
|
|
46
46
|
* never read as a support claim in either direction. */
|
|
47
47
|
const COVERAGE_NOTES = [
|
|
48
48
|
"Entries are projected mechanically from the compiler's own decision tables: the diagnostics registry, the unsupported-syntax dispatch tables, the stdlib and node-builtin lowering tables, and the supported-builtin-module list. Nothing is hand-maintained; the manifest regenerates byte-identically from the source tree at this version.",
|
|
49
|
-
"Absence from this manifest means 'not projected', never 'unsupported'. Surfaces lowered through dedicated code paths rather than tables are not yet projected: console, JSON,
|
|
49
|
+
"Absence from this manifest means 'not projected', never 'unsupported'. Surfaces lowered through dedicated code paths rather than tables are not yet projected: console, JSON, Promise/async and the timer surface, the net/http/tls/https/dgram/dns/assert/test/stream/readline module member surfaces, template literals, the regex slice, global functions (parseInt, parseFloat, isNaN, isFinite), and the process surface outside its ambient slice.",
|
|
50
|
+
"The ambient-nondeterminism and ambient-authority surfaces the library sidecar's determinism attestation scans ARE projected even where they lower through dedicated code paths — the Date compositions (stdlib.date.*), perf_hooks' performance.now, and the process global's ambient reads and authority calls (node-builtin.process.*) — so a determinism fence can name every surface the attestation demotes on.",
|
|
50
51
|
"stdlib and node-builtin member entries name surface whose LOWERED call forms are constrained (arity, argument shapes); declared call forms outside the lowered set are refused per site, with code SC2020 for standard-library and node-builtin surface.",
|
|
51
52
|
"Entries with status 'unsupported' or 'dynamic-only' describe where the named code is raised: forms of the construct outside the supported subset are refused with that code — not that every form of the named feature is refused. Supported forms appear as their own static entries where a table projects them.",
|
|
52
53
|
"Entries with status 'dynamic-only' compile when the build embeds the dynamic engine (--dynamic); without the flag each use site is refused with the entry's code.",
|
|
@@ -243,6 +244,19 @@ export function generateSurfaceManifest(compilerVersion) {
|
|
|
243
244
|
});
|
|
244
245
|
}
|
|
245
246
|
}
|
|
247
|
+
// ── ambient dedicated-path surfaces: the attestation's ground ─────────
|
|
248
|
+
// Date/perf_hooks/process rows from the one ambient table — each entry
|
|
249
|
+
// is fenceable by construction (its row carries the reach-witnessing
|
|
250
|
+
// libCall spellings the fence detector uses).
|
|
251
|
+
for (const row of AMBIENT_SURFACE_FNS) {
|
|
252
|
+
add({
|
|
253
|
+
id: row.id,
|
|
254
|
+
kind: row.kind,
|
|
255
|
+
name: row.name,
|
|
256
|
+
status: "static",
|
|
257
|
+
...(row.note !== undefined ? { note: row.note } : {}),
|
|
258
|
+
});
|
|
259
|
+
}
|
|
246
260
|
// ── diagnostic-fence: the enumerable refusal codes ─────────────────────
|
|
247
261
|
for (const [code, entry] of Object.entries(UNSUPPORTED)) {
|
|
248
262
|
add({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"surface-manifest.js","sourceRoot":"","sources":["../../src/coverage/surface-manifest.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oEAsCoE;AACpE,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AACxE,OAAO,EAAE,yBAAyB,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAC1F,OAAO,EACL,aAAa,EACb,qBAAqB,EACrB,0BAA0B,EAC1B,kBAAkB,EAClB,mBAAmB,EACnB,cAAc,EACd,WAAW,EACX,mBAAmB,EACnB,WAAW,EACX,eAAe,EACf,WAAW,EACX,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,kCAAkC,CAAC;AAsB1C,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC;AAEzC;;wDAEwD;AACxD,MAAM,cAAc,GAAa;IAC/B,+UAA+U;IAC/U,
|
|
1
|
+
{"version":3,"file":"surface-manifest.js","sourceRoot":"","sources":["../../src/coverage/surface-manifest.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oEAsCoE;AACpE,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AACxE,OAAO,EAAE,yBAAyB,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAC1F,OAAO,EACL,mBAAmB,EACnB,aAAa,EACb,qBAAqB,EACrB,0BAA0B,EAC1B,kBAAkB,EAClB,mBAAmB,EACnB,cAAc,EACd,WAAW,EACX,mBAAmB,EACnB,WAAW,EACX,eAAe,EACf,WAAW,EACX,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,kCAAkC,CAAC;AAsB1C,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC;AAEzC;;wDAEwD;AACxD,MAAM,cAAc,GAAa;IAC/B,+UAA+U;IAC/U,0bAA0b;IAC1b,sZAAsZ;IACtZ,0PAA0P;IAC1P,oTAAoT;IACpT,mKAAmK;IACnK,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,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC;AAClD,CAAC"}
|
|
@@ -239,13 +239,16 @@ export declare function libSidecarMergedDiag(name: string, sites: readonly strin
|
|
|
239
239
|
* so its member order cannot be the wire contract. */
|
|
240
240
|
export declare function libSidecarComputedDiag(name: string, which: "conditional" | "mapped", loc: SrcLoc): ScrDiagnostic;
|
|
241
241
|
/** SC4012 — the library-mode host-contract violation trap a generated
|
|
242
|
-
* entry wrapper raises when an inbound
|
|
243
|
-
*
|
|
244
|
-
*
|
|
245
|
-
*
|
|
246
|
-
*
|
|
247
|
-
*
|
|
248
|
-
*
|
|
242
|
+
* entry wrapper raises when an inbound value falls outside its marshalling
|
|
243
|
+
* class's f64-exact range: a bytes buffer's declared length past 2^53−1
|
|
244
|
+
* (no real buffer), or an i64/u64 parameter past ±(2^53−1) (ask 4 — the
|
|
245
|
+
* value cannot ride f64 exactly, and silent rounding is a coercion the
|
|
246
|
+
* author never wrote). In both shapes the host and the library disagree
|
|
247
|
+
* about the call contract. A RUNTIME code, never a compile-time refusal:
|
|
248
|
+
* it rides the structured trap-teaching message (library/trap-teaching.ts)
|
|
249
|
+
* the wrapper delivers through the panic sink, alongside the trapping
|
|
250
|
+
* export's C symbol and the profile's teaching and remediation text for
|
|
251
|
+
* this code when the profile supplies them. */
|
|
249
252
|
export declare const LIB_INBOUND_BYTES_TRAP_CODE = "SC4012";
|
|
250
253
|
/** SC4013–SC4019 — the library-mode runtime detected-trap family. RUNTIME
|
|
251
254
|
* codes like SC4012, never compile-time refusals: every trap the runtime
|
|
@@ -284,5 +287,15 @@ export declare const LIB_RUNTIME_TRAP_CODES: readonly ["SC4013", "SC4014", "SC40
|
|
|
284
287
|
* this path (SC4006's ground), so the refusal names the package, the
|
|
285
288
|
* specific bar it missed, and the remedy. */
|
|
286
289
|
export declare function libNpmIneligibleDiag(pkg: string, reason: string, loc: SrcLoc): ScrDiagnostic;
|
|
290
|
+
/** SC4021/SC4022/SC4023 — the ask-4 integer-boundary refusals, one code
|
|
291
|
+
* per failed obligation (the §2.4 check order picks exactly one). Every
|
|
292
|
+
* refusal carries the teaching triple: the SLOT (its sidecar slot path +
|
|
293
|
+
* the declared class), the FAILED OBLIGATION with the observed evidence
|
|
294
|
+
* (`detail` — the proven range, the may-be-NaN finding, or the spelling
|
|
295
|
+
* and its f64 read-back), and the AUTHOR'S FIX (`fix` — the concrete
|
|
296
|
+
* edit that states intent), anchored at the offending expression.
|
|
297
|
+
* Profile teachings ride any of the three codes as the attributed note
|
|
298
|
+
* via the shared decoration pass. */
|
|
299
|
+
export declare function libIntBoundaryDiag(path: string, cls: "i64" | "u64", obligation: "representability" | "wholeness" | "range", detail: string, fix: string, loc: SrcLoc): ScrDiagnostic;
|
|
287
300
|
export declare function iceDiag(message: string, loc: SrcLoc): ScrDiagnostic;
|
|
288
301
|
export {};
|
|
@@ -8,7 +8,7 @@ export const UNSUPPORTED = {
|
|
|
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
10
|
"util/types, string_decoder, querystring, readline, events, stream, " +
|
|
11
|
-
"stream/promises, buffer, assert, assert/strict, worker_threads, " +
|
|
11
|
+
"stream/promises, stream/consumers, buffer, assert, assert/strict, worker_threads, " +
|
|
12
12
|
"cluster, tty, async_hooks, timers, timers/promises, " +
|
|
13
13
|
"diagnostics_channel, perf_hooks, and node:test and node:module " +
|
|
14
14
|
"modules (bare or node:-prefixed) are supported",
|
|
@@ -39,7 +39,18 @@ export const UNSUPPORTED = {
|
|
|
39
39
|
hint: "export declarations directly: export function f() {}",
|
|
40
40
|
},
|
|
41
41
|
SC1015: { feature: "dynamic import()", milestone: "M4" },
|
|
42
|
-
|
|
42
|
+
// Benign cycles are ADMITTED (Node runs them as cache hits): cycles of
|
|
43
|
+
// ES modules whose top levels are declaration-only and whose
|
|
44
|
+
// cycle-crossing bindings are used only inside function bodies (mutual
|
|
45
|
+
// recursion, cross-module class references), plus closing edges that
|
|
46
|
+
// bind nothing readable. SC1016 remains for exactly the cycles where
|
|
47
|
+
// Node's partial initialization is observable — the message names the
|
|
48
|
+
// offending binding or top-level statement.
|
|
49
|
+
SC1016: {
|
|
50
|
+
feature: "circular imports",
|
|
51
|
+
milestone: "later",
|
|
52
|
+
hint: "cycles of ES modules with declaration-only top levels whose cycle-crossing bindings are only used inside function bodies compile as-is; move the named top-level read or call into a function body (or break the named edge) so nothing runs during the cycle's init window",
|
|
53
|
+
},
|
|
43
54
|
// Class DECLARATIONS shipped; SC1020's remaining use is class expressions.
|
|
44
55
|
SC1020: { feature: "class expressions", milestone: "later" },
|
|
45
56
|
// SC1021 (arrow functions/closures) and SC1022 (nested function
|
|
@@ -122,7 +133,7 @@ export const UNSUPPORTED = {
|
|
|
122
133
|
SC1120: {
|
|
123
134
|
feature: "this regex feature",
|
|
124
135
|
milestone: "later",
|
|
125
|
-
hint: "supported: literal regexes with the g/i/m/s/u/y flags — .test(), .source/.flags, and string replace/replaceAll/split with string replacement templates",
|
|
136
|
+
hint: "supported: literal regexes with the g/i/m/s/u/y flags — .test(), .exec()/.match()/.matchAll(), named capture groups (.groups, $<name> templates, \\k<name>), .source/.flags, and string replace/replaceAll/split with string replacement templates",
|
|
126
137
|
},
|
|
127
138
|
SC1121: {
|
|
128
139
|
feature: "'.test()' on a regex with the 'g' or 'y' flag",
|
|
@@ -578,7 +589,8 @@ export function libUnmappableSignatureDiag(exportName, position, detail, loc) {
|
|
|
578
589
|
code: "SC4003",
|
|
579
590
|
message: `library export '${exportName}': ${position} ${detail}`,
|
|
580
591
|
loc,
|
|
581
|
-
hint: "
|
|
592
|
+
hint: "marshalling classes: f64/u8/u32/i32 (TS number; the integer plumbing classes are param-only), i64/u64 (TS number, " +
|
|
593
|
+
"prove-or-refuse at compile time — params and returns), bool, string, bytes (Uint8Array/Buffer), and a void return; " +
|
|
582
594
|
"records and unions slot in when the contract-sidecar conversation (asks 2/3) lands — deferral, not permanent unsupport",
|
|
583
595
|
};
|
|
584
596
|
}
|
|
@@ -693,13 +705,16 @@ export function libSidecarComputedDiag(name, which, loc) {
|
|
|
693
705
|
};
|
|
694
706
|
}
|
|
695
707
|
/** SC4012 — the library-mode host-contract violation trap a generated
|
|
696
|
-
* entry wrapper raises when an inbound
|
|
697
|
-
*
|
|
698
|
-
*
|
|
699
|
-
*
|
|
700
|
-
*
|
|
701
|
-
*
|
|
702
|
-
*
|
|
708
|
+
* entry wrapper raises when an inbound value falls outside its marshalling
|
|
709
|
+
* class's f64-exact range: a bytes buffer's declared length past 2^53−1
|
|
710
|
+
* (no real buffer), or an i64/u64 parameter past ±(2^53−1) (ask 4 — the
|
|
711
|
+
* value cannot ride f64 exactly, and silent rounding is a coercion the
|
|
712
|
+
* author never wrote). In both shapes the host and the library disagree
|
|
713
|
+
* about the call contract. A RUNTIME code, never a compile-time refusal:
|
|
714
|
+
* it rides the structured trap-teaching message (library/trap-teaching.ts)
|
|
715
|
+
* the wrapper delivers through the panic sink, alongside the trapping
|
|
716
|
+
* export's C symbol and the profile's teaching and remediation text for
|
|
717
|
+
* this code when the profile supplies them. */
|
|
703
718
|
export const LIB_INBOUND_BYTES_TRAP_CODE = "SC4012";
|
|
704
719
|
/** SC4013–SC4019 — the library-mode runtime detected-trap family. RUNTIME
|
|
705
720
|
* codes like SC4012, never compile-time refusals: every trap the runtime
|
|
@@ -753,6 +768,24 @@ export function libNpmIneligibleDiag(pkg, reason, loc) {
|
|
|
753
768
|
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",
|
|
754
769
|
};
|
|
755
770
|
}
|
|
771
|
+
/** SC4021/SC4022/SC4023 — the ask-4 integer-boundary refusals, one code
|
|
772
|
+
* per failed obligation (the §2.4 check order picks exactly one). Every
|
|
773
|
+
* refusal carries the teaching triple: the SLOT (its sidecar slot path +
|
|
774
|
+
* the declared class), the FAILED OBLIGATION with the observed evidence
|
|
775
|
+
* (`detail` — the proven range, the may-be-NaN finding, or the spelling
|
|
776
|
+
* and its f64 read-back), and the AUTHOR'S FIX (`fix` — the concrete
|
|
777
|
+
* edit that states intent), anchored at the offending expression.
|
|
778
|
+
* Profile teachings ride any of the three codes as the attributed note
|
|
779
|
+
* via the shared decoration pass. */
|
|
780
|
+
export function libIntBoundaryDiag(path, cls, obligation, detail, fix, loc) {
|
|
781
|
+
const code = obligation === "representability" ? "SC4021" : obligation === "wholeness" ? "SC4022" : "SC4023";
|
|
782
|
+
return {
|
|
783
|
+
code,
|
|
784
|
+
message: `integer slot '${path}' (${cls}) cannot be proven — ${obligation} failed: ${detail}`,
|
|
785
|
+
loc,
|
|
786
|
+
hint: fix,
|
|
787
|
+
};
|
|
788
|
+
}
|
|
756
789
|
export function iceDiag(message, loc) {
|
|
757
790
|
return {
|
|
758
791
|
code: "SC9001",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"diagnostic.js","sourceRoot":"","sources":["../../src/diagnostics/diagnostic.ts"],"names":[],"mappings":"AA+DA,MAAM,CAAC,MAAM,WAAW,GAAqC;IAC3D,MAAM,EAAE;QACN,OAAO,EAAE,iBAAiB;QAC1B,SAAS,EAAE,IAAI;QACf,IAAI,EACF,wEAAwE;YACxE,kEAAkE;YAClE,sEAAsE;YACtE,iEAAiE;YACjE,iEAAiE;YACjE,qEAAqE;YACrE,kEAAkE;YAClE,sDAAsD;YACtD,iEAAiE;YACjE,gDAAgD;KACnD;IACD,yEAAyE;IACzE,0EAA0E;IAC1E,yEAAyE;IACzE,yEAAyE;IACzE,oEAAoE;IACpE,uEAAuE;IACvE,oEAAoE;IACpE,2BAA2B;IAC3B,MAAM,EAAE;QACN,OAAO,EAAE,yBAAyB;QAClC,SAAS,EAAE,OAAO;QAClB,IAAI,EAAE,uEAAuE;KAC9E;IACD,kEAAkE;IAClE,wEAAwE;IACxE,qEAAqE;IACrE,uEAAuE;IACvE,qEAAqE;IACrE,6BAA6B;IAC7B,MA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Q,CAAC,CAAC,CAAC,UAAU,KAAK,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC;IAC7G,OAAO;QACL,IAAI;QACJ,OAAO,EAAE,iBAAiB,IAAI,MAAM,GAAG,wBAAwB,UAAU,YAAY,MAAM,EAAE;QAC7F,GAAG;QACH,IAAI,EAAE,GAAG;KACV,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,OAAO,CAAC,OAAe,EAAE,GAAW;IAClD,OAAO;QACL,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,4BAA4B,OAAO,uBAAuB;QACnE,GAAG;KACJ,CAAC;AACJ,CAAC"}
|
|
@@ -34,6 +34,62 @@ export declare function builtinMemberRequireDecl(nameNode: ts.Node, init: ts.Exp
|
|
|
34
34
|
* namespace-as-value fence. The direct-require initializer answers null
|
|
35
35
|
* here (its own arm already resolves it). */
|
|
36
36
|
export declare function builtinNamespaceDestructureModuleOf(L: Lowerer, decl: ts.VariableDeclaration): string | null;
|
|
37
|
+
/** Strips the type-only wrappers the require pattern rides in typed
|
|
38
|
+
* code (`require("node:os") as typeof import("node:os")` — the
|
|
39
|
+
* fallback declarations answer `unknown`, so the cast IS the idiom),
|
|
40
|
+
* plus parens, legacy assertions, and non-null suffixes. */
|
|
41
|
+
export declare function stripTypeCasts(e: ts.Expression): ts.Expression;
|
|
42
|
+
/** The `createRequire(<base>)` call over the node:module import binding
|
|
43
|
+
* with a supported base — import.meta.url, import.meta.filename, or
|
|
44
|
+
* __filename, every spelling of "this file" — or null. The base never
|
|
45
|
+
* LOWERS (import.meta has no value representation): it only names the
|
|
46
|
+
* file whose directory anchors the returned require's relative
|
|
47
|
+
* resolution, and every supported spelling names the call's own file. */
|
|
48
|
+
export declare function createRequireBaseCallOf(L: Lowerer, expr: ts.Expression): ts.CallExpression | null;
|
|
49
|
+
/** True for `const require = createRequire(import.meta.url)` — the
|
|
50
|
+
* binding is compile-time plumbing (each call through it resolves per
|
|
51
|
+
* site) with no storage and no code; both declaration walks skip by
|
|
52
|
+
* this test. A reassignable (let/var) binding never matches — callers
|
|
53
|
+
* gate on constness like the other alias decls. */
|
|
54
|
+
export declare function createRequireBindingDecl(L: Lowerer, nameNode: ts.Node, init: ts.Expression | undefined): boolean;
|
|
55
|
+
/** The declaring source file when `callee` denotes a createRequire-made
|
|
56
|
+
* require: a CONST binding over createRequire(import.meta.url) (the
|
|
57
|
+
* binding's own file anchors resolution) or the inline
|
|
58
|
+
* `createRequire(import.meta.url)(...)` spelling (the call's file).
|
|
59
|
+
* Null off the pattern, so call chains keep trying. */
|
|
60
|
+
export declare function createRequireCalleeFileOf(L: Lowerer, callee: ts.Expression): ts.SourceFile | null;
|
|
61
|
+
/** The static require of `R("spec")` through a createRequire binding:
|
|
62
|
+
* the literal specifier plus the file anchoring relative resolution.
|
|
63
|
+
* Null when the callee is not a createRequire-made require; a matching
|
|
64
|
+
* callee with a non-literal (or missing) specifier answers spec null,
|
|
65
|
+
* so the call lowering fences by name instead of falling through to
|
|
66
|
+
* the generic call paths. */
|
|
67
|
+
export declare function createRequireSpecOf(L: Lowerer, call: ts.CallExpression): {
|
|
68
|
+
spec: string | null;
|
|
69
|
+
baseFile: ts.SourceFile;
|
|
70
|
+
} | null;
|
|
71
|
+
/** True for `const fs = require("node:fs")` through a createRequire
|
|
72
|
+
* binding — a builtin namespace import in const clothing: alias
|
|
73
|
+
* plumbing with no storage (uses resolve through
|
|
74
|
+
* builtinNamespaceModuleOf's createRequire arm); both declaration
|
|
75
|
+
* walks skip by this test. */
|
|
76
|
+
export declare function createRequireNamespaceDecl(L: Lowerer, nameNode: ts.Node, init: ts.Expression | undefined): boolean;
|
|
77
|
+
/** `require("spec")` through a createRequire binding — the erasure per
|
|
78
|
+
* target. Builtins are reached here only OUTSIDE the const-namespace-
|
|
79
|
+
* binding shape (that declaration erases; member uses resolve through
|
|
80
|
+
* the namespace tables) and fence toward it. A relative .json document
|
|
81
|
+
* bakes: the file's text validates as JSON at compile time and the
|
|
82
|
+
* call lowers to json.parse over the baked literal — JSON.parse's
|
|
83
|
+
* checked-dynamic `unknown` stance, and exactly Node's value (require
|
|
84
|
+
* of JSON IS JSON.parse of the file; the per-call re-parse forgoes
|
|
85
|
+
* Node's module-cache identity, unobservable without mutation). A bare
|
|
86
|
+
* specifier NOTHING installed resolves compiles to Node's catchable
|
|
87
|
+
* MODULE_NOT_FOUND throw (the optional-dependency try/require
|
|
88
|
+
* pattern); an installed package loads through the island's
|
|
89
|
+
* require-condition entry under --dynamic (collectCreateRequires
|
|
90
|
+
* embedded it) and reports the requires-dynamic diagnostic in a static
|
|
91
|
+
* build. Null when the callee is not a createRequire require. */
|
|
92
|
+
export declare function lowerCreateRequireCall(L: Lowerer, call: ts.CallExpression, loc: SrcLoc): IrExpr | null;
|
|
37
93
|
/** True when `node` denotes the http2.constants OBJECT — any of its
|
|
38
94
|
* spellings: `http2.constants` through a namespace/require binding, a
|
|
39
95
|
* destructured or member-bound `constants` alias from the http2 module,
|
|
@@ -2,10 +2,16 @@
|
|
|
2
2
|
* crypto, child_process spawn/spawnSync and child/stats/spawn-result
|
|
3
3
|
* methods), JSON.parse/stringify, process properties/methods and
|
|
4
4
|
* process.env access, and console.log detection. */
|
|
5
|
+
import { readFileSync } from "node:fs";
|
|
5
6
|
import { builtinModules } from "node:module";
|
|
7
|
+
import { dirname, resolve } from "node:path";
|
|
6
8
|
import * as ts from "../ts7/adapter.js";
|
|
7
|
-
import { dynUndefinedExpr, ladderFenceExpr, nodeThrowExpr, own } from "./lowerer.js";
|
|
9
|
+
import { PoisonError, dynUndefinedExpr, ladderFenceExpr, nodeThrowExpr, own } from "./lowerer.js";
|
|
8
10
|
import { canonicalBuiltinModule, isJsSourceFile, locOf, requireSpecOf } from "../program.js";
|
|
11
|
+
import { isRelativeSpecifier } from "../shared.js";
|
|
12
|
+
import { probeNodeRequireRefusal } from "../npm.js";
|
|
13
|
+
import { isNpmStaticPackage } from "../npm-static.js";
|
|
14
|
+
import { invalidJsonModuleDiag, requiresDynamicImportDiag } from "../../diagnostics/diagnostic.js";
|
|
9
15
|
import { builtinModuleFnOf, FS_READDIR_DOCUMENTED_OPTIONS, FS_WATCH_DOCUMENTED_OPTIONS, FS_WRITE_FILE_DOCUMENTED_OPTIONS, QS_PARSE_DOCUMENTED_OPTIONS, QS_STRINGIFY_DOCUMENTED_OPTIONS, READLINE_DOCUMENTED_OPTIONS, builtinConstLit, fenceOrDropOptionKey, isChildSurfaceMember, } from "./surfaces.js";
|
|
10
16
|
import { conditionalSpreadOf, lowerDynObjectLiteral } from "./lower-exprs.js";
|
|
11
17
|
import { HTTP2_CONSTANTS } from "./http2-constants.js";
|
|
@@ -132,9 +138,17 @@ export function builtinMemberRequireDecl(nameNode, init) {
|
|
|
132
138
|
export function builtinNamespaceDestructureModuleOf(L, decl) {
|
|
133
139
|
if (decl.name === undefined || !ts.isObjectBindingPattern(decl.name) || decl.initializer === undefined)
|
|
134
140
|
return null;
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
141
|
+
// `const { join } = require("node:path")` through a createRequire
|
|
142
|
+
// binding: the call IS the namespace — same table keying.
|
|
143
|
+
let module = null;
|
|
144
|
+
const init = stripTypeCasts(decl.initializer);
|
|
145
|
+
if (ts.isCallExpression(init)) {
|
|
146
|
+
const cr = createRequireSpecOf(L, init);
|
|
147
|
+
module = cr !== null && cr.spec !== null ? canonicalBuiltinModule(cr.spec) : null;
|
|
148
|
+
}
|
|
149
|
+
else if (ts.isIdentifier(init)) {
|
|
150
|
+
module = L.builtinNamespaceModuleOf(init);
|
|
151
|
+
}
|
|
138
152
|
if (module === null)
|
|
139
153
|
return null;
|
|
140
154
|
for (const el of decl.name.elements) {
|
|
@@ -145,6 +159,223 @@ export function builtinNamespaceDestructureModuleOf(L, decl) {
|
|
|
145
159
|
}
|
|
146
160
|
return module;
|
|
147
161
|
}
|
|
162
|
+
/* ── node:module — createRequire's static erasure ─────────────────────
|
|
163
|
+
* The config/version-reading pattern real CLIs ship:
|
|
164
|
+
* import { createRequire } from "node:module";
|
|
165
|
+
* const require = createRequire(import.meta.url);
|
|
166
|
+
* const pkg = require("../package.json");
|
|
167
|
+
* A compiled program's module graph is fixed at build time, so the
|
|
168
|
+
* indirection ERASES where the required specifier is a static string
|
|
169
|
+
* literal naming something the compiler already handles: a builtin (the
|
|
170
|
+
* binding is a namespace import in const clothing), a relative .json
|
|
171
|
+
* document (the file bakes and parses like JSON.parse of its text), or
|
|
172
|
+
* an installed npm package (the island's require-condition entry under
|
|
173
|
+
* --dynamic). Dynamic specifiers and other targets fence by name. */
|
|
174
|
+
/** Strips the type-only wrappers the require pattern rides in typed
|
|
175
|
+
* code (`require("node:os") as typeof import("node:os")` — the
|
|
176
|
+
* fallback declarations answer `unknown`, so the cast IS the idiom),
|
|
177
|
+
* plus parens, legacy assertions, and non-null suffixes. */
|
|
178
|
+
export function stripTypeCasts(e) {
|
|
179
|
+
let cur = e;
|
|
180
|
+
while (ts.isParenthesizedExpression(cur) || ts.isAsExpression(cur) ||
|
|
181
|
+
ts.isTypeAssertion(cur) || ts.isNonNullExpression(cur)) {
|
|
182
|
+
cur = cur.expression;
|
|
183
|
+
}
|
|
184
|
+
return cur;
|
|
185
|
+
}
|
|
186
|
+
/** The `createRequire(<base>)` call over the node:module import binding
|
|
187
|
+
* with a supported base — import.meta.url, import.meta.filename, or
|
|
188
|
+
* __filename, every spelling of "this file" — or null. The base never
|
|
189
|
+
* LOWERS (import.meta has no value representation): it only names the
|
|
190
|
+
* file whose directory anchors the returned require's relative
|
|
191
|
+
* resolution, and every supported spelling names the call's own file. */
|
|
192
|
+
export function createRequireBaseCallOf(L, expr) {
|
|
193
|
+
const e = stripTypeCasts(expr);
|
|
194
|
+
if (!ts.isCallExpression(e) || e.questionDotToken)
|
|
195
|
+
return null;
|
|
196
|
+
if (!ts.isIdentifier(e.expression))
|
|
197
|
+
return null;
|
|
198
|
+
const bi = builtinImportOf(L, e.expression);
|
|
199
|
+
if (!bi || bi.module !== "module" || bi.member !== "createRequire")
|
|
200
|
+
return null;
|
|
201
|
+
if (e.arguments.length !== 1)
|
|
202
|
+
return null;
|
|
203
|
+
const base = stripTypeCasts(e.arguments[0]);
|
|
204
|
+
if (ts.isIdentifier(base) && base.text === "__filename")
|
|
205
|
+
return e;
|
|
206
|
+
if (ts.isPropertyAccessExpression(base) &&
|
|
207
|
+
!base.questionDotToken &&
|
|
208
|
+
ts.isMetaProperty(base.expression) &&
|
|
209
|
+
base.expression.keywordToken === ts.SyntaxKind.ImportKeyword &&
|
|
210
|
+
(base.name.text === "url" || base.name.text === "filename")) {
|
|
211
|
+
return e;
|
|
212
|
+
}
|
|
213
|
+
return null;
|
|
214
|
+
}
|
|
215
|
+
/** True for `const require = createRequire(import.meta.url)` — the
|
|
216
|
+
* binding is compile-time plumbing (each call through it resolves per
|
|
217
|
+
* site) with no storage and no code; both declaration walks skip by
|
|
218
|
+
* this test. A reassignable (let/var) binding never matches — callers
|
|
219
|
+
* gate on constness like the other alias decls. */
|
|
220
|
+
export function createRequireBindingDecl(L, nameNode, init) {
|
|
221
|
+
if (!ts.isIdentifier(nameNode) || init === undefined)
|
|
222
|
+
return false;
|
|
223
|
+
return createRequireBaseCallOf(L, init) !== null;
|
|
224
|
+
}
|
|
225
|
+
/** The declaring source file when `callee` denotes a createRequire-made
|
|
226
|
+
* require: a CONST binding over createRequire(import.meta.url) (the
|
|
227
|
+
* binding's own file anchors resolution) or the inline
|
|
228
|
+
* `createRequire(import.meta.url)(...)` spelling (the call's file).
|
|
229
|
+
* Null off the pattern, so call chains keep trying. */
|
|
230
|
+
export function createRequireCalleeFileOf(L, callee) {
|
|
231
|
+
const e = stripTypeCasts(callee);
|
|
232
|
+
if (ts.isCallExpression(e)) {
|
|
233
|
+
return createRequireBaseCallOf(L, e) !== null ? e.getSourceFile() : null;
|
|
234
|
+
}
|
|
235
|
+
if (!ts.isIdentifier(e))
|
|
236
|
+
return null;
|
|
237
|
+
const symbol = L.checker.getSymbolAtLocation(e);
|
|
238
|
+
const decl = symbol ? L.checker.declarationsOf(symbol)[0] : undefined;
|
|
239
|
+
if (!decl || !ts.isVariableDeclaration(decl) || decl.initializer === undefined)
|
|
240
|
+
return null;
|
|
241
|
+
if (!ts.isVariableDeclarationList(decl.parent) || (decl.parent.flags & ts.NodeFlags.Const) === 0)
|
|
242
|
+
return null;
|
|
243
|
+
return createRequireBaseCallOf(L, decl.initializer) !== null ? decl.getSourceFile() : null;
|
|
244
|
+
}
|
|
245
|
+
/** The static require of `R("spec")` through a createRequire binding:
|
|
246
|
+
* the literal specifier plus the file anchoring relative resolution.
|
|
247
|
+
* Null when the callee is not a createRequire-made require; a matching
|
|
248
|
+
* callee with a non-literal (or missing) specifier answers spec null,
|
|
249
|
+
* so the call lowering fences by name instead of falling through to
|
|
250
|
+
* the generic call paths. */
|
|
251
|
+
export function createRequireSpecOf(L, call) {
|
|
252
|
+
if (call.questionDotToken)
|
|
253
|
+
return null;
|
|
254
|
+
const baseFile = createRequireCalleeFileOf(L, call.expression);
|
|
255
|
+
if (baseFile === null)
|
|
256
|
+
return null;
|
|
257
|
+
if (call.arguments.length !== 1)
|
|
258
|
+
return { spec: null, baseFile };
|
|
259
|
+
const a = call.arguments[0];
|
|
260
|
+
return { spec: ts.isStringLiteralLike(a) ? a.text : null, baseFile };
|
|
261
|
+
}
|
|
262
|
+
/** True for `const fs = require("node:fs")` through a createRequire
|
|
263
|
+
* binding — a builtin namespace import in const clothing: alias
|
|
264
|
+
* plumbing with no storage (uses resolve through
|
|
265
|
+
* builtinNamespaceModuleOf's createRequire arm); both declaration
|
|
266
|
+
* walks skip by this test. */
|
|
267
|
+
export function createRequireNamespaceDecl(L, nameNode, init) {
|
|
268
|
+
if (!ts.isIdentifier(nameNode) || init === undefined)
|
|
269
|
+
return false;
|
|
270
|
+
const call = stripTypeCasts(init);
|
|
271
|
+
if (!ts.isCallExpression(call))
|
|
272
|
+
return false;
|
|
273
|
+
const cr = createRequireSpecOf(L, call);
|
|
274
|
+
return cr !== null && cr.spec !== null && canonicalBuiltinModule(cr.spec) !== null;
|
|
275
|
+
}
|
|
276
|
+
/** `require("spec")` through a createRequire binding — the erasure per
|
|
277
|
+
* target. Builtins are reached here only OUTSIDE the const-namespace-
|
|
278
|
+
* binding shape (that declaration erases; member uses resolve through
|
|
279
|
+
* the namespace tables) and fence toward it. A relative .json document
|
|
280
|
+
* bakes: the file's text validates as JSON at compile time and the
|
|
281
|
+
* call lowers to json.parse over the baked literal — JSON.parse's
|
|
282
|
+
* checked-dynamic `unknown` stance, and exactly Node's value (require
|
|
283
|
+
* of JSON IS JSON.parse of the file; the per-call re-parse forgoes
|
|
284
|
+
* Node's module-cache identity, unobservable without mutation). A bare
|
|
285
|
+
* specifier NOTHING installed resolves compiles to Node's catchable
|
|
286
|
+
* MODULE_NOT_FOUND throw (the optional-dependency try/require
|
|
287
|
+
* pattern); an installed package loads through the island's
|
|
288
|
+
* require-condition entry under --dynamic (collectCreateRequires
|
|
289
|
+
* embedded it) and reports the requires-dynamic diagnostic in a static
|
|
290
|
+
* build. Null when the callee is not a createRequire require. */
|
|
291
|
+
export function lowerCreateRequireCall(L, call, loc) {
|
|
292
|
+
const cr = createRequireSpecOf(L, call);
|
|
293
|
+
if (cr === null)
|
|
294
|
+
return null;
|
|
295
|
+
if (cr.spec === null) {
|
|
296
|
+
L.noLowering("createRequire's require with this argument shape", call, "the compiled module graph is fixed at build time — the one lowered form is require(\"<static string literal>\")");
|
|
297
|
+
}
|
|
298
|
+
const spec = cr.spec;
|
|
299
|
+
if (canonicalBuiltinModule(spec) !== null) {
|
|
300
|
+
L.unsupported("SC1090", call, `module namespace objects as values (bind it first: const m = require("${spec}"), then access members through the binding)`);
|
|
301
|
+
}
|
|
302
|
+
if (spec.startsWith("#")) {
|
|
303
|
+
L.noLowering(`createRequire's require of the '${spec}' project import`, call, "imports-field specifiers have no require lowering yet — import the target statically");
|
|
304
|
+
}
|
|
305
|
+
if (isRelativeSpecifier(spec) || spec.startsWith("/")) {
|
|
306
|
+
if (!spec.endsWith(".json")) {
|
|
307
|
+
L.noLowering(`createRequire's require of '${spec}'`, call, "relative requires lower for .json documents only — a program module is a static import");
|
|
308
|
+
}
|
|
309
|
+
const abs = spec.startsWith("/")
|
|
310
|
+
? spec
|
|
311
|
+
: resolve(dirname(cr.baseFile.fileName), spec);
|
|
312
|
+
let text = null;
|
|
313
|
+
try {
|
|
314
|
+
text = readFileSync(abs, "utf8");
|
|
315
|
+
}
|
|
316
|
+
catch {
|
|
317
|
+
/* the fence below speaks */
|
|
318
|
+
}
|
|
319
|
+
if (text === null) {
|
|
320
|
+
L.noLowering(`createRequire's require of '${spec}' (no file at ${abs})`, call, "the required document resolves at build time — check the path against the requiring file");
|
|
321
|
+
}
|
|
322
|
+
try {
|
|
323
|
+
JSON.parse(text);
|
|
324
|
+
}
|
|
325
|
+
catch (e) {
|
|
326
|
+
L.pushDiag(invalidJsonModuleDiag(abs, e instanceof Error ? e.message : String(e), loc));
|
|
327
|
+
throw new PoisonError();
|
|
328
|
+
}
|
|
329
|
+
return {
|
|
330
|
+
kind: "libCall",
|
|
331
|
+
fn: "json.parse",
|
|
332
|
+
args: [{ kind: "strLit", value: text, type: STRING, loc }],
|
|
333
|
+
type: DYN,
|
|
334
|
+
loc,
|
|
335
|
+
};
|
|
336
|
+
}
|
|
337
|
+
// Bare package specifiers. --npm-static opt-ins are program modules —
|
|
338
|
+
// their exports bind through static imports, not a require value.
|
|
339
|
+
const pkgName = spec.startsWith("@")
|
|
340
|
+
? spec.split("/").slice(0, 2).join("/")
|
|
341
|
+
: spec.split("/")[0];
|
|
342
|
+
if (isNpmStaticPackage(pkgName)) {
|
|
343
|
+
L.noLowering(`createRequire's require of the --npm-static package '${pkgName}'`, call, "the opted-in package compiles as program modules — import it statically");
|
|
344
|
+
}
|
|
345
|
+
const refusal = probeNodeRequireRefusal(cr.baseFile.fileName, spec);
|
|
346
|
+
if (refusal !== null) {
|
|
347
|
+
// Node's require-site MODULE_NOT_FOUND, catchable — the compiled
|
|
348
|
+
// expression IS that throw (the typed dummy is abandoned by the
|
|
349
|
+
// pending check's unwind).
|
|
350
|
+
return nodeThrowExpr(0, "MODULE_NOT_FOUND", refusal.message, DYN, loc);
|
|
351
|
+
}
|
|
352
|
+
if (!L.dynamic) {
|
|
353
|
+
L.pushDiag(requiresDynamicImportDiag(pkgName, loc));
|
|
354
|
+
throw new PoisonError();
|
|
355
|
+
}
|
|
356
|
+
const res = L.createRequireImports.get(`${cr.baseFile.fileName}\u0000${spec}`);
|
|
357
|
+
if (res === undefined) {
|
|
358
|
+
// Collection never saw the site (a shape this walk and that walk
|
|
359
|
+
// disagree on) — fence rather than mis-embed.
|
|
360
|
+
L.noLowering(`createRequire's require of '${spec}'`, call, undefined);
|
|
361
|
+
}
|
|
362
|
+
if (res === "")
|
|
363
|
+
throw new PoisonError(); // reported at collection
|
|
364
|
+
// A CJS facade's default IS module.exports (Node's require answer);
|
|
365
|
+
// an ESM-resolved entry answers its namespace (Node's require(esm)).
|
|
366
|
+
const exportName = res.format === "esm" ? "*" : "default";
|
|
367
|
+
return {
|
|
368
|
+
kind: "libCall",
|
|
369
|
+
fn: "island.import",
|
|
370
|
+
args: [
|
|
371
|
+
{ kind: "strLit", value: res.entryKey, type: STRING, loc },
|
|
372
|
+
{ kind: "strLit", value: exportName, type: STRING, loc },
|
|
373
|
+
{ kind: "strLit", value: spec, type: STRING, loc },
|
|
374
|
+
],
|
|
375
|
+
type: JSVAL,
|
|
376
|
+
loc,
|
|
377
|
+
};
|
|
378
|
+
}
|
|
148
379
|
/** True when `node` denotes the http2.constants OBJECT — any of its
|
|
149
380
|
* spellings: `http2.constants` through a namespace/require binding, a
|
|
150
381
|
* destructured or member-bound `constants` alias from the http2 module,
|