@oseo/compiler 0.0.0-stage → 0.1.0-canary.368
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/LICENSE +674 -0
- package/README.md +59 -2
- package/dist/agent-programs.d.ts +28 -0
- package/dist/agent-programs.d.ts.map +1 -0
- package/dist/agent-programs.js +134 -0
- package/dist/agent-programs.js.map +1 -0
- package/dist/agent-templates.d.ts +33 -0
- package/dist/agent-templates.d.ts.map +1 -0
- package/dist/agent-templates.js +45 -0
- package/dist/agent-templates.js.map +1 -0
- package/dist/compile.d.ts +20 -0
- package/dist/compile.d.ts.map +1 -0
- package/dist/compile.js +75 -0
- package/dist/compile.js.map +1 -0
- package/dist/fragments.d.ts +72 -0
- package/dist/fragments.d.ts.map +1 -0
- package/dist/fragments.js +158 -0
- package/dist/fragments.js.map +1 -0
- package/dist/hir-build.d.ts +80 -0
- package/dist/hir-build.d.ts.map +1 -0
- package/dist/hir-build.js +3077 -0
- package/dist/hir-build.js.map +1 -0
- package/dist/hir-print.d.ts +10 -0
- package/dist/hir-print.d.ts.map +1 -0
- package/dist/hir-print.js +271 -0
- package/dist/hir-print.js.map +1 -0
- package/dist/hir.d.ts +1246 -0
- package/dist/hir.d.ts.map +1 -0
- package/dist/hir.js +147 -0
- package/dist/hir.js.map +1 -0
- package/dist/host-scripts.d.ts +14 -0
- package/dist/host-scripts.d.ts.map +1 -0
- package/dist/host-scripts.js +204 -0
- package/dist/host-scripts.js.map +1 -0
- package/dist/index.d.ts +26 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +27 -0
- package/dist/index.js.map +1 -0
- package/dist/mir-build.d.ts +8 -0
- package/dist/mir-build.d.ts.map +1 -0
- package/dist/mir-build.js +5113 -0
- package/dist/mir-build.js.map +1 -0
- package/dist/mir-print.d.ts +7 -0
- package/dist/mir-print.d.ts.map +1 -0
- package/dist/mir-print.js +65 -0
- package/dist/mir-print.js.map +1 -0
- package/dist/mir-specialize.d.ts +7 -0
- package/dist/mir-specialize.d.ts.map +1 -0
- package/dist/mir-specialize.js +182 -0
- package/dist/mir-specialize.js.map +1 -0
- package/dist/mir.d.ts +571 -0
- package/dist/mir.d.ts.map +1 -0
- package/dist/mir.js +1 -0
- package/dist/module-builtin.d.ts +20 -0
- package/dist/module-builtin.d.ts.map +1 -0
- package/dist/module-builtin.js +57 -0
- package/dist/module-builtin.js.map +1 -0
- package/dist/module-compile.d.ts +64 -0
- package/dist/module-compile.d.ts.map +1 -0
- package/dist/module-compile.js +690 -0
- package/dist/module-compile.js.map +1 -0
- package/dist/module-json.d.ts +7 -0
- package/dist/module-json.d.ts.map +1 -0
- package/dist/module-json.js +88 -0
- package/dist/module-json.js.map +1 -0
- package/dist/modules.d.ts +87 -0
- package/dist/modules.d.ts.map +1 -0
- package/dist/modules.js +734 -0
- package/dist/modules.js.map +1 -0
- package/dist/native-fragments.d.ts +36 -0
- package/dist/native-fragments.d.ts.map +1 -0
- package/dist/native-fragments.js +110 -0
- package/dist/native-fragments.js.map +1 -0
- package/dist/native.d.ts +282 -0
- package/dist/native.d.ts.map +1 -0
- package/dist/native.js +47 -0
- package/dist/native.js.map +1 -0
- package/dist/regexp-execute.d.ts +74 -0
- package/dist/regexp-execute.d.ts.map +1 -0
- package/dist/regexp-execute.js +480 -0
- package/dist/regexp-execute.js.map +1 -0
- package/dist/regexp-matcher.d.ts +279 -0
- package/dist/regexp-matcher.d.ts.map +1 -0
- package/dist/regexp-matcher.js +1098 -0
- package/dist/regexp-matcher.js.map +1 -0
- package/dist/regexp-parse.d.ts +22 -0
- package/dist/regexp-parse.d.ts.map +1 -0
- package/dist/regexp-parse.js +1440 -0
- package/dist/regexp-parse.js.map +1 -0
- package/dist/regexp-print.d.ts +24 -0
- package/dist/regexp-print.d.ts.map +1 -0
- package/dist/regexp-print.js +147 -0
- package/dist/regexp-print.js.map +1 -0
- package/dist/regexp.d.ts +324 -0
- package/dist/regexp.d.ts.map +1 -0
- package/dist/regexp.js +22 -0
- package/dist/regexp.js.map +1 -0
- package/dist/source.d.ts +38 -0
- package/dist/source.d.ts.map +1 -0
- package/dist/source.js +10 -0
- package/dist/source.js.map +1 -0
- package/dist/syntax.d.ts +1232 -0
- package/dist/syntax.d.ts.map +1 -0
- package/dist/syntax.js +1 -0
- package/package.json +32 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"module-compile.js","names":[],"sources":["../src/module-compile.ts"],"sourcesContent":["/*\n * Oseo, an ahead-of-time compiler for JavaScript and TypeScript.\n * Copyright (C) 2026 Hong Minhee <https://hongminhee.org/>\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <https://www.gnu.org/licenses/>.\n */\n\nimport type {\n Binding,\n HirExpression,\n HirFunction,\n HirGlobalBinding,\n HirProgram,\n HirStatement,\n} from \"./hir.ts\";\nimport {\n buildSeededHir,\n type HirHostOptions,\n hirBindingIdentifiers,\n hirBindingPatternHasAwait,\n hirExpressionHasAwait,\n sourceDiagnostic,\n type SyntaxStatementItem,\n} from \"./hir-build.ts\";\nimport type { CompilerOptions, MirProgram } from \"./mir.ts\";\nimport { buildMir } from \"./mir-build.ts\";\nimport {\n builtinModuleExports,\n moduleNodeRange,\n moduleNodeSyntax,\n} from \"./module-builtin.ts\";\nimport { linkModuleGraph } from \"./modules.ts\";\nimport type { LinkedModule, LinkedModuleGraph } from \"./modules.ts\";\nimport type { Diagnostic, SourceRange } from \"./source.ts\";\nimport type {\n LocatedSyntax,\n ModuleGraph,\n ScriptRequestClosure,\n SyntaxExpression,\n SyntaxModule,\n SyntaxProgram,\n} from \"./syntax.ts\";\n\nfunction includePropertiesWhen<const Properties extends object>(\n properties: () => Properties | undefined,\n): Properties | { [Key in keyof Properties]?: never } {\n return properties() ?? {};\n}\n\n/** Result of the host-neutral compiler pipeline. */\nexport interface CompilationResult {\n /**\n * The agent programs a Script compiled for the test262 host can start,\n * each linked beside `mir` as a unit of its own.\n */\n readonly agents?: readonly MirProgram[];\n readonly diagnostics: readonly Diagnostic[];\n readonly hir?: HirProgram;\n readonly mir?: MirProgram;\n readonly syntax?: SyntaxProgram;\n}\n\n/** Whole-graph compilation result for one closed ECMAScript module entry. */\nexport interface ModuleCompilationResult {\n readonly diagnostics: readonly Diagnostic[];\n readonly graph?: LinkedModuleGraph;\n readonly hir?: HirProgram;\n readonly mir?: MirProgram;\n}\n\nfunction moduleProgramBody(\n module: SyntaxModule,\n): readonly SyntaxStatementItem[] {\n const items: SyntaxStatementItem[] = [...module.body];\n for (const [index, entry] of module.exports.entries()) {\n if (entry.kind !== \"default\") continue;\n const bindingName = `*default:${index}*`;\n if (\"parameters\" in entry.declaration) {\n items.push({ ...entry.declaration, bindingName });\n continue;\n }\n let initializer: SyntaxExpression = entry.declaration;\n if (\n entry.declaration.kind === \"function\" &&\n entry.declaration.functionValue.name == null\n ) {\n initializer = { ...entry.declaration, inferredName: \"default\" };\n } else if (\n entry.declaration.kind === \"class\" &&\n entry.declaration.constructorFunction.name == null\n ) {\n initializer = { ...entry.declaration, inferredName: \"default\" };\n }\n items.push({\n ...includePropertiesWhen(() => {\n if (entry.byteRange == null) return undefined;\n return {\n byteRange: entry.byteRange,\n };\n }),\n hint: undefined,\n initializer,\n kind: \"const\",\n name: bindingName,\n range: entry.range,\n });\n }\n return items.toSorted(\n (left, right) =>\n (left.byteRange?.start ?? Number.MAX_SAFE_INTEGER) -\n (right.byteRange?.start ?? Number.MAX_SAFE_INTEGER),\n );\n}\n\n/**\n * The top-level declaration that binds one name, used to locate a\n * duplicate-declaration diagnostic. A lexical declaration list is\n * searched by declarator, so the diagnostic names the declarator rather\n * than the whole module.\n */\nfunction declarationNamed(\n items: readonly SyntaxStatementItem[],\n name: string,\n): LocatedSyntax | undefined {\n for (const item of items) {\n if (item.kind === \"declaration-list\") {\n const declarator = declarationNamed(item.declarations, name);\n if (declarator != null) return declarator;\n continue;\n }\n if (\n (item.kind === \"const\" ||\n item.kind === \"let\" ||\n item.kind === \"function\") &&\n item.name === name\n ) {\n return item;\n }\n }\n return undefined;\n}\n\nfunction isSourceRange<T>(value: T): value is T & SourceRange {\n if (value == null || typeof value !== \"object\") return false;\n // SAFETY: The object check permits reading only optional range fields here.\n const candidate = value as Partial<SourceRange>;\n return (\n candidate.start != null &&\n typeof candidate.start.line === \"number\" &&\n typeof candidate.start.column === \"number\" &&\n candidate.end != null &&\n typeof candidate.end.line === \"number\" &&\n typeof candidate.end.column === \"number\"\n );\n}\n\nfunction isNonNullObject<T>(value: T): value is T & object {\n return value !== null && typeof value === \"object\";\n}\n\n/** Retain module identity on every owned range before graph HIR is merged. */\nfunction retainModuleSource<T>(value: T, sourceId: string): T {\n if (isSourceRange(value)) {\n return (\n // SAFETY: Updating the source ID preserves every other SourceRange field.\n { ...value, sourceId } as T\n );\n }\n if (Array.isArray(value)) {\n return (\n // SAFETY: Recursing element-wise preserves the input array's structure.\n value.map((item) => retainModuleSource(item, sourceId)) as T\n );\n }\n if (!isNonNullObject(value)) return value;\n // SAFETY: Recursing over every entry preserves the input object's structure.\n return Object.fromEntries(\n Object.entries(value).map(([key, item]) => [\n key,\n retainModuleSource(item, sourceId),\n ]),\n ) as T;\n}\n\n/** Whether one statement itself declares an `await using` binding. */\nfunction hirStatementDisposesAsynchronously(statement: HirStatement): boolean {\n if (statement.kind === \"const\") return statement.disposal === \"async\";\n if (statement.kind === \"for\") {\n return (statement.declarations ?? []).some(\n (declaration) =>\n declaration.kind === \"binding\" && declaration.disposal === \"async\",\n );\n }\n return (\n statement.kind === \"for-of\" &&\n statement.target.kind === \"declaration\" &&\n statement.target.disposal === \"async\"\n );\n}\n\n/**\n * Whether one statement contains an await the module continuation\n * transform can extract. A `for await` head awaits every iteration step\n * without being such a point, because the loop stays in place, so this\n * predicate must not report it: it drives both the extraction search and\n * the rejection of awaits in positions the transform does not own. The\n * `awaitedIteration` variant instead reports whether the statement makes\n * its module's evaluation asynchronous at all, which the scheduler and\n * the cycle check need.\n */\nfunction hirStatementAwaits(\n statement: HirStatement,\n awaitedIteration: boolean,\n): boolean {\n const recurse = (child: HirStatement): boolean =>\n hirStatementAwaits(child, awaitedIteration);\n if (\n awaitedIteration &&\n statement.kind === \"for-of\" &&\n statement.awaited === true\n ) {\n return true;\n }\n // An `await using` scope awaits during its disposal, at the scope's\n // exit rather than at an extractable expression, so like a `for await`\n // head it only makes evaluation asynchronous.\n if (awaitedIteration && hirStatementDisposesAsynchronously(statement)) {\n return true;\n }\n if (statement.kind === \"block\") {\n return statement.body.some(recurse);\n }\n if (\n statement.kind === \"binding-init\" ||\n statement.kind === \"const\" ||\n statement.kind === \"let\"\n ) {\n return hirExpressionHasAwait(statement.initializer);\n }\n if (statement.kind === \"binding-pattern\") {\n return (\n hirExpressionHasAwait(statement.initializer) ||\n hirBindingPatternHasAwait(statement.pattern)\n );\n }\n if (statement.kind === \"expression\" || statement.kind === \"throw\") {\n return hirExpressionHasAwait(statement.expression);\n }\n if (statement.kind === \"return\") {\n return (\n statement.expression != null &&\n hirExpressionHasAwait(statement.expression)\n );\n }\n if (statement.kind === \"if\") {\n return (\n hirExpressionHasAwait(statement.test) ||\n recurse(statement.consequent) ||\n (statement.alternate != null && recurse(statement.alternate))\n );\n }\n if (statement.kind === \"try\") {\n return (\n recurse(statement.block) ||\n (statement.handler != null &&\n ((statement.handler.pattern != null &&\n hirBindingPatternHasAwait(statement.handler.pattern)) ||\n recurse(statement.handler.body))) ||\n (statement.finalizer != null && recurse(statement.finalizer))\n );\n }\n if (statement.kind === \"labeled\") {\n return recurse(statement.body);\n }\n if (statement.kind === \"switch\") {\n return (\n hirExpressionHasAwait(statement.discriminant) ||\n statement.cases.some(\n (switchCase) =>\n (switchCase.test != null && hirExpressionHasAwait(switchCase.test)) ||\n switchCase.body.some(recurse),\n )\n );\n }\n if (statement.kind === \"for\") {\n return (\n (statement.declarations ?? []).some(\n (declaration) =>\n hirExpressionHasAwait(declaration.initializer) ||\n (declaration.kind === \"pattern\" &&\n hirBindingPatternHasAwait(declaration.pattern)),\n ) ||\n (statement.init != null && hirExpressionHasAwait(statement.init)) ||\n (statement.test != null && hirExpressionHasAwait(statement.test)) ||\n (statement.update != null && hirExpressionHasAwait(statement.update)) ||\n recurse(statement.body)\n );\n }\n if (statement.kind === \"for-of\") {\n return (\n hirExpressionHasAwait(statement.iterable) ||\n ((statement.target.kind === \"pattern-declaration\" ||\n statement.target.kind === \"assignment-pattern\") &&\n hirBindingPatternHasAwait(statement.target.pattern)) ||\n (statement.target.kind === \"property\" &&\n (hirExpressionHasAwait(statement.target.object) ||\n hirExpressionHasAwait(statement.target.key))) ||\n recurse(statement.body)\n );\n }\n if (statement.kind === \"for-in\") {\n return (\n hirExpressionHasAwait(statement.subject) ||\n ((statement.target.kind === \"pattern-declaration\" ||\n statement.target.kind === \"assignment-pattern\") &&\n hirBindingPatternHasAwait(statement.target.pattern)) ||\n (statement.target.kind === \"property\" &&\n (hirExpressionHasAwait(statement.target.object) ||\n hirExpressionHasAwait(statement.target.key))) ||\n (statement.target.kind === \"private\" &&\n hirExpressionHasAwait(statement.target.object)) ||\n recurse(statement.body)\n );\n }\n return (\n (statement.kind === \"while\" || statement.kind === \"do-while\") &&\n (hirExpressionHasAwait(statement.test) || recurse(statement.body))\n );\n}\n\nfunction hirStatementIsAsynchronous(statement: HirStatement): boolean {\n return hirStatementAwaits(statement, true);\n}\n\nfunction hirStatementsAreAsynchronous(\n statements: readonly HirStatement[],\n): boolean {\n return statements.some(hirStatementIsAsynchronous);\n}\n\nfunction collectHirBindings(\n statements: readonly HirStatement[],\n): readonly HirGlobalBinding[] {\n const bindings: HirGlobalBinding[] = [];\n const collect = (statement: HirStatement): void => {\n if (\n statement.kind === \"const\" ||\n statement.kind === \"let\" ||\n statement.kind === \"function-init\"\n ) {\n bindings.push({ id: statement.bindingId, name: statement.name });\n } else if (\n statement.kind === \"binding-pattern\" &&\n statement.mode === \"declare\" &&\n statement.declarationKind !== \"var\"\n ) {\n for (const binding of hirBindingIdentifiers(statement.pattern)) {\n bindings.push({ id: binding.bindingId, name: binding.name });\n }\n } else if (statement.kind === \"block\") {\n statement.body.forEach(collect);\n } else if (statement.kind === \"if\") {\n collect(statement.consequent);\n if (statement.alternate != null) collect(statement.alternate);\n } else if (statement.kind === \"try\") {\n collect(statement.block);\n if (statement.handler != null) {\n if (statement.handler.pattern != null) {\n for (const binding of hirBindingIdentifiers(\n statement.handler.pattern,\n )) {\n bindings.push({ id: binding.bindingId, name: binding.name });\n }\n }\n collect(statement.handler.body);\n }\n if (statement.finalizer != null) collect(statement.finalizer);\n } else if (\n statement.kind === \"while\" ||\n statement.kind === \"do-while\" ||\n statement.kind === \"labeled\"\n ) {\n collect(statement.body);\n } else if (statement.kind === \"for\") {\n for (const declaration of statement.declarations ?? []) {\n if (declaration.declarationKind === \"var\") continue;\n if (declaration.kind === \"binding\") {\n bindings.push({\n id: declaration.bindingId,\n name: declaration.name,\n });\n } else {\n for (const binding of hirBindingIdentifiers(declaration.pattern)) {\n bindings.push({ id: binding.bindingId, name: binding.name });\n }\n }\n }\n collect(statement.body);\n } else if (statement.kind === \"for-of\") {\n if (\n statement.target.kind === \"declaration\" &&\n statement.target.declarationKind !== \"var\"\n ) {\n bindings.push({\n id: statement.target.bindingId,\n name: statement.target.name,\n });\n } else if (\n statement.target.kind === \"pattern-declaration\" &&\n statement.target.declarationKind !== \"var\"\n ) {\n for (const binding of hirBindingIdentifiers(statement.target.pattern)) {\n bindings.push({ id: binding.bindingId, name: binding.name });\n }\n }\n collect(statement.body);\n } else if (statement.kind === \"for-in\") {\n if (\n statement.target.kind === \"declaration\" &&\n statement.target.declarationKind !== \"var\"\n ) {\n bindings.push({\n id: statement.target.bindingId,\n name: statement.target.name,\n });\n } else if (\n statement.target.kind === \"pattern-declaration\" &&\n statement.target.declarationKind !== \"var\"\n ) {\n for (const binding of hirBindingIdentifiers(statement.target.pattern)) {\n bindings.push({ id: binding.bindingId, name: binding.name });\n }\n }\n collect(statement.body);\n } else if (statement.kind === \"switch\") {\n (statement.functionInits ?? []).forEach(collect);\n for (const switchCase of statement.cases) {\n switchCase.body.forEach(collect);\n }\n }\n };\n statements.forEach(collect);\n return bindings;\n}\n\n/** The link-time initializer of one module's namespace object cell. */\nfunction moduleNamespaceInitializer(\n target: LinkedModule,\n bindingId: number,\n range: SourceRange,\n): HirStatement {\n return {\n bindingId,\n hint: undefined,\n initializer: {\n entries: target.exports.map((entry) => ({\n bindingId: entry.cellId,\n name: entry.exportedName,\n })),\n kind: \"module-namespace\",\n range,\n },\n kind: \"const\",\n name: `*namespace:${target.canonicalId}*`,\n range,\n };\n}\n\nfunction moduleUndefined(range: SourceRange): HirExpression {\n return { kind: \"undefined\", range };\n}\n\nfunction moduleNumber(value: number, range: SourceRange): HirExpression {\n return { kind: \"number\", range, value };\n}\n\nfunction moduleFunctionExpression(functionValue: HirFunction): HirExpression {\n return {\n functionId: functionValue.id,\n functionKind: functionValue.functionKind,\n functionLength: functionValue.functionLength,\n kind: \"function\",\n name: functionValue.name,\n range: functionValue.range,\n ...includePropertiesWhen(() => {\n if (functionValue.sourceText == null) return undefined;\n return {\n sourceText: functionValue.sourceText,\n };\n }),\n };\n}\n\n/**\n * The resolved Script a host evaluates in the realm before the graph, as\n * the test262 harness is. Its bindings seed every module's outer scope\n * the way the global Environment Record would answer them.\n */\ninterface ModulePrelude {\n readonly hir: HirProgram;\n readonly bindings: ReadonlyMap<string, Binding>;\n readonly globalObjectBindingIds: readonly number[];\n}\n\n/** A resolved prelude, or the diagnostics that rejected it. */\ninterface ModulePreludeResolution {\n readonly diagnostics: readonly Diagnostic[];\n readonly nextBindingId: number;\n readonly nextFunctionId: number;\n readonly prelude?: ModulePrelude;\n}\n\n/**\n * A module reading a name that a Script's `with` statement may initialize\n * could not observe the hidden fallback cell the Script writes.\n */\nfunction withInitializingDiagnostic(\n script: SyntaxProgram,\n names: readonly string[],\n role: string,\n): Diagnostic {\n return sourceDiagnostic(\n script.sourceId,\n script,\n `A ${role}Script whose with statement may initialize ` +\n `${names.toSorted().join(\", \")} is unsupported before ` +\n \"a module graph.\",\n );\n}\n\n/**\n * Resolve the prelude Script after the graph's cells, so its IDs never\n * collide with a module binding. A top-level `with` assignment that may\n * write a hidden fallback cell is rejected, because a module reading the\n * same name could not observe that cell.\n */\nfunction resolveModulePrelude(\n prelude: SyntaxProgram,\n nextBindingId: number,\n): ModulePreludeResolution {\n // The prelude runs before the module table exists, so an `import()` in\n // it names no target and keeps the profile diagnostic.\n const resolved = buildSeededHir(prelude, {\n fragmentMetadata: true,\n nextBindingId,\n });\n const failed = {\n diagnostics: resolved.diagnostics,\n nextBindingId: resolved.nextBindingId,\n nextFunctionId: resolved.nextFunctionId,\n };\n if (resolved.program == null || resolved.scriptBindings == null) {\n return failed;\n }\n const initializing = resolved.initializingWithNames ?? [];\n if (initializing.length > 0) {\n return {\n ...failed,\n diagnostics: [\n withInitializingDiagnostic(prelude, initializing, \"prelude \"),\n ],\n };\n }\n return {\n ...failed,\n prelude: {\n bindings: resolved.scriptBindings,\n globalObjectBindingIds: (resolved.program.globalObjectBindings ?? []).map(\n (binding) => binding.id,\n ),\n // Every range names the Script, as each module's ranges name the\n // module, so a runtime location never falls back to the entry's.\n hir: retainModuleSource(resolved.program, prelude.sourceId),\n },\n };\n}\n\n/**\n * The module table order: the entry's static closure in startup\n * evaluation order, then every module that only `import()` reaches, in\n * discovery order. Startup never evaluates the latter; the driver\n * evaluates each on its first request.\n */\nfunction moduleTableOrder(linked: LinkedModuleGraph): readonly string[] {\n const scheduled = new Set(linked.evaluationOrder);\n return [\n ...linked.evaluationOrder,\n ...linked.modules\n .map((module) => module.canonicalId)\n .filter((moduleId) => !scheduled.has(moduleId)),\n ];\n}\n\n/**\n * The module table index of every `import()` site one referrer makes,\n * keyed by the call's start byte, as the HIR builder expects.\n */\nfunction importCallTargetsFor(\n graph: ModuleGraph,\n moduleIndices: ReadonlyMap<string, number>,\n referrerId: string,\n referrerKind: \"module\" | \"script\",\n): ReadonlyMap<number, number> {\n const targets = new Map<number, number>();\n for (const request of graph.requests ?? []) {\n if (\n request.edgeKind !== \"discovery\" ||\n request.referrer.id !== referrerId ||\n request.referrer.kind !== referrerKind\n ) {\n continue;\n }\n const index = moduleIndices.get(request.targetId);\n if (index == null) {\n throw new Error(`Import target '${request.targetId}' is unavailable.`);\n }\n targets.set(request.byteRange.start, index);\n }\n return targets;\n}\n\n/** The instantiated module environments and the table that names them. */\ninterface ModuleTableParts {\n readonly functions: readonly HirFunction[];\n readonly globalBindings: readonly HirGlobalBinding[];\n /**\n * Statements that instantiate every module environment, which run no\n * user code, in the order a program must run them.\n */\n readonly instantiation: readonly HirStatement[];\n readonly nextBindingId: number;\n readonly nextFunctionId: number;\n /** Per module: evaluator, await flag, namespace, and requests. */\n readonly tableArguments: readonly HirExpression[];\n}\n\n/**\n * Resolve every module body of a linked graph and build its table. The\n * `outer` Script's global declarations enclose each module environment.\n */\nfunction compileModuleTable(\n graph: ModuleGraph,\n linked: LinkedModuleGraph,\n tableOrder: readonly string[],\n moduleIndices: ReadonlyMap<string, number>,\n ids: { readonly nextBindingId: number; readonly nextFunctionId: number },\n outer: ModulePrelude | undefined,\n): ModuleTableParts | { readonly diagnostics: readonly Diagnostic[] } {\n const nodes = new Map(\n graph.modules.map((module) => [module.canonicalId, module]),\n );\n const linkedModules = new Map(\n linked.modules.map((module) => [module.canonicalId, module]),\n );\n const cells = new Map(linked.cells.map((cell) => [cell.id, cell]));\n const functionInitializers: HirStatement[] = [];\n const functions: HirFunction[] = [];\n const globalBindings: HirGlobalBinding[] = [];\n const intrinsicInitializers: HirStatement[] = [];\n const importMetaInitializers: HirStatement[] = [];\n const jsonInitializers: HirStatement[] = [];\n const moduleBodies = new Map<string, readonly HirStatement[]>();\n const varInitializers: HirStatement[] = [];\n let { nextBindingId, nextFunctionId } = ids;\n const namespaceBindings = new Map<string, number>();\n const namespaceInitializers: HirStatement[] = [];\n\n for (const module of linked.modules) {\n for (const imported of module.imports) {\n const targetId = imported.namespaceModuleId;\n if (targetId == null || namespaceBindings.has(targetId)) continue;\n const target = linkedModules.get(targetId);\n const targetNode = nodes.get(targetId);\n if (target == null || targetNode == null) {\n throw new Error(`Namespace module '${targetId}' is unavailable.`);\n }\n const bindingId = imported.cellId;\n if (bindingId == null) {\n throw new Error(\"Module namespace cell is unavailable.\");\n }\n namespaceBindings.set(targetId, bindingId);\n const targetRange = retainModuleSource(\n moduleNodeRange(targetNode),\n targetId,\n );\n namespaceInitializers.push(\n moduleNamespaceInitializer(target, bindingId, targetRange),\n );\n }\n }\n // An `export * as` entry can name a namespace that no module imports.\n for (const target of linked.modules) {\n const bindingId = target.namespaceCellId;\n if (bindingId == null || namespaceBindings.has(target.canonicalId)) {\n continue;\n }\n const targetNode = nodes.get(target.canonicalId);\n if (targetNode == null) {\n throw new Error(\n `Namespace module '${target.canonicalId}' is unavailable.`,\n );\n }\n namespaceBindings.set(target.canonicalId, bindingId);\n namespaceInitializers.push(\n moduleNamespaceInitializer(\n target,\n bindingId,\n retainModuleSource(moduleNodeRange(targetNode), target.canonicalId),\n ),\n );\n }\n\n for (const moduleId of tableOrder) {\n const node = nodes.get(moduleId);\n const linkedModule = linkedModules.get(moduleId);\n if (node == null || linkedModule == null) {\n throw new Error(`Linked module '${moduleId}' is unavailable.`);\n }\n if (node.moduleKind === \"builtin\") {\n const range = moduleNodeRange(node);\n for (const cellId of linkedModule.cellIds) {\n const cell = cells.get(cellId);\n if (cell == null) throw new Error(\"Missing builtin export cell.\");\n const names: readonly string[] = builtinModuleExports[node.builtin];\n const exportIndex = names.indexOf(cell.localName);\n if (exportIndex < 0) continue;\n globalBindings.push({ id: cellId, name: cell.localName });\n intrinsicInitializers.push({\n kind: \"const\",\n hint: undefined,\n bindingId: cellId,\n name: cell.localName,\n range,\n initializer: {\n kind: \"call\",\n target: { kind: \"builtin-export\" },\n arguments: [\n moduleNumber(node.builtin === \"node:process\" ? 0 : 1, range),\n moduleNumber(exportIndex, range),\n ],\n range,\n },\n });\n }\n moduleBodies.set(moduleId, []);\n continue;\n }\n const bindings = new Map<string, Binding>();\n for (const imported of linkedModule.imports) {\n if (imported.namespaceModuleId != null) {\n const bindingId = namespaceBindings.get(imported.namespaceModuleId);\n if (bindingId == null) {\n throw new Error(\"Module namespace binding is unavailable.\");\n }\n bindings.set(imported.localName, {\n id: bindingId,\n importedBinding: true,\n mutable: false,\n name: imported.localName,\n });\n continue;\n }\n if (imported.cellId == null) continue;\n bindings.set(imported.localName, {\n id: imported.cellId,\n importedBinding: true,\n mutable: false,\n name: imported.localName,\n });\n }\n for (const cellId of linkedModule.cellIds) {\n const cell = cells.get(cellId);\n if (cell == null) throw new Error(`Module cell '${cellId}' is missing.`);\n if (bindings.has(cell.localName)) {\n const declaration = declarationNamed(\n moduleNodeSyntax(node).body,\n cell.localName,\n );\n return {\n diagnostics: [\n sourceDiagnostic(\n moduleId,\n declaration ?? { range: moduleNodeRange(node) },\n `Duplicate declaration '${cell.localName}'.`,\n ),\n ],\n };\n }\n bindings.set(cell.localName, {\n id: cell.id,\n mutable: false,\n name: cell.localName,\n pendingDeclaration: true,\n });\n }\n // The prelude's global names enclose the module environment, so a\n // module's own declarations and imports shadow them.\n const result = buildSeededHir(\n {\n body: moduleProgramBody(moduleNodeSyntax(node)),\n kind: \"program\",\n range: moduleNodeRange(node),\n sourceId: moduleId,\n strict: true,\n },\n {\n bindings,\n globalObjectBindingIds: outer?.globalObjectBindingIds ?? [],\n importCallTargets: importCallTargetsFor(\n graph,\n moduleIndices,\n moduleId,\n \"module\",\n ),\n moduleBody: true,\n nextBindingId,\n nextFunctionId,\n ...includePropertiesWhen(() => {\n if (outer == null) return undefined;\n return { outerBindings: outer.bindings };\n }),\n },\n );\n nextBindingId = result.nextBindingId;\n nextFunctionId = result.nextFunctionId;\n if (result.program == null) return { diagnostics: result.diagnostics };\n const moduleBody = retainModuleSource(result.program.body, moduleId);\n globalBindings.push(...(result.program.globalBindings ?? []));\n globalBindings.push(...collectHirBindings(moduleBody));\n const evaluationBody: HirStatement[] = [];\n const varNames = new Set(moduleNodeSyntax(node).varNames);\n for (const statement of moduleBody) {\n if (statement.kind === \"let\" && varNames.has(statement.name)) {\n // InitializeEnvironment creates each var binding as undefined\n // while linking; the source initializers stay in evaluation.\n if (statement.initializer.kind !== \"undefined\") {\n throw new Error(`Module var '${statement.name}' is not hoisted.`);\n }\n varInitializers.push(statement);\n } else if (\n statement.kind === \"const\" &&\n statement.bindingId === result.program.intrinsicGlobalObjectBindingId\n ) {\n intrinsicInitializers.push(statement);\n } else if (\n statement.kind === \"const\" &&\n statement.bindingId === result.program.importMetaBindingId\n ) {\n importMetaInitializers.push(statement);\n } else if (statement.kind === \"function-init\") {\n functionInitializers.push(statement);\n } else {\n evaluationBody.push(statement);\n }\n }\n // Asynchronous module evaluators use the same traced frames as async\n // functions, including suspension inside binding and assignment steps.\n if (node.moduleKind === \"json\") {\n const declaration = evaluationBody[0];\n if (evaluationBody.length !== 1 || declaration?.kind !== \"const\") {\n throw new Error(\"JSON module must construct one default value.\");\n }\n const dataId = nextBindingId;\n nextBindingId += 1;\n const dataName = `*json-data:${moduleId}*`;\n globalBindings.push({ id: dataId, name: dataName });\n // Prepare parsed data before realm code can modify its construction.\n // Synthetic Link initializes the export to undefined; only its\n // scheduled Evaluate publishes the prepared value, including cycles.\n jsonInitializers.push(\n { ...declaration, bindingId: dataId, name: dataName },\n {\n ...declaration,\n initializer: moduleUndefined(declaration.range),\n kind: \"let\",\n },\n );\n moduleBodies.set(moduleId, [\n {\n expression: {\n bindingId: declaration.bindingId,\n kind: \"binding-set\",\n mutable: true,\n name: declaration.name,\n range: declaration.range,\n value: {\n bindingId: dataId,\n kind: \"binding\",\n name: dataName,\n range: declaration.range,\n },\n },\n kind: \"expression\",\n range: declaration.range,\n },\n ]);\n } else {\n moduleBodies.set(moduleId, evaluationBody);\n }\n functions.push(...retainModuleSource(result.program.functions, moduleId));\n }\n\n // Each table entry passes the evaluator, a top-level await flag, the\n // namespace object an `import()` resolves with, and the requested\n // modules in source order; the runtime driver keeps every other Cyclic\n // Module Record field.\n const tableArguments: HirExpression[] = [];\n for (const moduleId of tableOrder) {\n const node = nodes.get(moduleId);\n const moduleBody = moduleBodies.get(moduleId);\n if (node == null || moduleBody == null) {\n throw new Error(`Module evaluation '${moduleId}' is unavailable.`);\n }\n const range = retainModuleSource(moduleNodeRange(node), moduleId);\n // Asynchronous module evaluators use the same traced frames as async\n // functions, including suspension inside binding and assignment\n // steps.\n const hasTopLevelAwait = hirStatementsAreAsynchronous(moduleBody);\n const evaluator: HirFunction = {\n body: [\n ...moduleBody,\n { expression: moduleUndefined(range), kind: \"return\", range },\n ],\n functionLength: 0,\n functionKind: hasTopLevelAwait ? \"async-arrow\" : \"arrow\",\n id: nextFunctionId,\n kind: \"hir-function\",\n localBindingIds: [],\n name: `*module:${moduleId}*`,\n parameters: [],\n range,\n returnHints: [],\n strict: true,\n };\n nextFunctionId += 1;\n functions.push(evaluator);\n const requested = node.dependencies.map((dependency) => {\n const index = moduleIndices.get(dependency.canonicalId);\n if (index == null) {\n throw new Error(\n `Module dependency '${dependency.canonicalId}' is unavailable.`,\n );\n }\n return index;\n });\n const namespaceBinding = namespaceBindings.get(moduleId);\n tableArguments.push(\n moduleFunctionExpression(evaluator),\n moduleNumber(hasTopLevelAwait ? 1 : 0, range),\n namespaceBinding == null\n ? moduleUndefined(range)\n : {\n bindingId: namespaceBinding,\n kind: \"binding\",\n name: `*namespace:${moduleId}*`,\n range,\n },\n moduleNumber(requested.length, range),\n ...requested.map((index) => moduleNumber(index, range)),\n );\n }\n\n return {\n functions,\n globalBindings,\n instantiation: [\n ...intrinsicInitializers,\n // Each module's import.meta object exists before any function\n // initializer, so a hoisted function that a cyclic dependency calls\n // before its own module evaluates still reads that module's object.\n ...importMetaInitializers,\n ...namespaceInitializers,\n ...jsonInitializers,\n ...varInitializers,\n ...functionInitializers,\n ],\n nextBindingId,\n nextFunctionId,\n tableArguments,\n };\n}\n\n/**\n * Link and lower a closed module graph to shared-cell scheduled MIR.\n * A `prelude` Script runs to completion in the same realm before any\n * module links or evaluates; modules resolve its global declarations as\n * names of their outer global environment. The table does not exist\n * while the prelude runs, so an `import()` in it keeps the profile\n * diagnostic.\n *\n * The table holds every discovered module. A literal `import()` site\n * lowers to the runtime import operation with its target's constant\n * table index; modules that only such sites reach are linked and\n * instantiated at startup but evaluate only on request.\n */\nexport function compileModuleGraph(\n graph: ModuleGraph,\n options: CompilerOptions = {},\n prelude?: SyntaxProgram,\n): ModuleCompilationResult {\n const linked = linkModuleGraph(graph);\n if (linked.graph == null) return { diagnostics: linked.diagnostics };\n const tableOrder = moduleTableOrder(linked.graph);\n const moduleIndices = new Map(\n tableOrder.map((moduleId, index) => [moduleId, index]),\n );\n const entryIndex = moduleIndices.get(graph.entryId);\n if (entryIndex == null) {\n throw new Error(\"The module entry has no evaluation index.\");\n }\n let nextBindingId = linked.graph.cells.length;\n let nextFunctionId = 0;\n let resolvedPrelude: ModulePrelude | undefined;\n if (prelude != null) {\n const result = resolveModulePrelude(prelude, nextBindingId);\n if (result.prelude == null) {\n return { diagnostics: result.diagnostics, graph: linked.graph };\n }\n resolvedPrelude = result.prelude;\n nextBindingId = result.nextBindingId;\n nextFunctionId = result.nextFunctionId;\n }\n const parts = compileModuleTable(\n graph,\n linked.graph,\n tableOrder,\n moduleIndices,\n { nextBindingId, nextFunctionId },\n resolvedPrelude,\n );\n if (\"diagnostics\" in parts) {\n return { diagnostics: parts.diagnostics, graph: linked.graph };\n }\n\n const entry = graph.modules.find(\n (module) => module.canonicalId === graph.entryId,\n );\n if (entry == null) throw new Error(\"The module entry is unavailable.\");\n const entryRange = retainModuleSource(moduleNodeRange(entry), graph.entryId);\n const preludeHir = resolvedPrelude?.hir;\n const hir: HirProgram = {\n body: [\n // The prelude Script completes before any module environment exists.\n ...(preludeHir?.body ?? []),\n ...parts.instantiation,\n // Evaluate the entry through the runtime driver. The returned\n // top-level capability promise is the entry task's completion.\n {\n expression: {\n arguments: [\n moduleNumber(entryIndex, entryRange),\n moduleNumber(tableOrder.length, entryRange),\n ...parts.tableArguments,\n ],\n kind: \"call\",\n range: entryRange,\n target: { kind: \"module-evaluate\" },\n },\n kind: \"return\",\n range: entryRange,\n },\n ],\n functions: [...(preludeHir?.functions ?? []), ...parts.functions],\n globalBindings: [\n ...(preludeHir?.globalBindings ?? []),\n ...parts.globalBindings,\n ],\n ...includePropertiesWhen(() => {\n if (preludeHir == null) return undefined;\n return {\n globalLexicalNames: preludeHir.globalLexicalNames ?? [],\n globalObjectBindings: preludeHir.globalObjectBindings ?? [],\n };\n }),\n kind: \"hir-program\",\n range: entryRange,\n sourceId: graph.entryId,\n // Every module body is its own strict evaluator function, so the\n // top-level statement list keeps the prelude Script's strictness.\n strict: preludeHir == null || preludeHir.strict === true,\n };\n return {\n diagnostics: [],\n graph: linked.graph,\n hir,\n mir: buildMir(hir, options),\n };\n}\n\n/** The modules a Script's `import()` calls reach, keyed for its build. */\nexport interface ScriptModuleRequests {\n /** The canonical identity the Script's requests resolved against. */\n readonly canonicalId: string;\n readonly closure: ScriptRequestClosure;\n}\n\n/** A Script's HIR with every module it requests instantiated first. */\nexport interface ScriptGraphHirResult {\n readonly diagnostics: readonly Diagnostic[];\n readonly nextBindingId: number;\n readonly nextFunctionId: number;\n readonly program?: HirProgram;\n}\n\n/**\n * Resolve a Script whose `import()` calls name modules of `requests`.\n * The program instantiates every module environment and installs the\n * module table without evaluating any module, then runs the Script; each\n * module evaluates on its first request. The modules resolve the\n * Script's global declarations as names of their outer environment.\n */\nexport function buildScriptGraphHir(\n script: SyntaxProgram,\n requests: ScriptModuleRequests,\n seed: HirHostOptions = {},\n): ScriptGraphHirResult {\n // A Script graph has no entry module, so startup schedules nothing.\n const graph: ModuleGraph = {\n entryId: \"\",\n kind: \"module-graph\",\n modules: requests.closure.modules,\n requests: requests.closure.requests,\n };\n const linked = linkModuleGraph(graph);\n if (linked.graph == null) {\n return {\n diagnostics: linked.diagnostics,\n nextBindingId: 0,\n nextFunctionId: 0,\n };\n }\n const tableOrder = moduleTableOrder(linked.graph);\n // A Script whose closure is empty has no table to install.\n if (tableOrder.length === 0) return buildSeededHir(script, seed);\n const moduleIndices = new Map(\n tableOrder.map((moduleId, index) => [moduleId, index]),\n );\n const resolved = buildSeededHir(script, {\n ...seed,\n fragmentMetadata: true,\n importCallTargets: importCallTargetsFor(\n graph,\n moduleIndices,\n requests.canonicalId,\n \"script\",\n ),\n nextBindingId: linked.graph.cells.length,\n });\n if (resolved.program == null || resolved.scriptBindings == null) {\n return resolved;\n }\n const initializing = resolved.initializingWithNames ?? [];\n if (initializing.length > 0) {\n return {\n diagnostics: [withInitializingDiagnostic(script, initializing, \"\")],\n nextBindingId: resolved.nextBindingId,\n nextFunctionId: resolved.nextFunctionId,\n };\n }\n const parts = compileModuleTable(\n graph,\n linked.graph,\n tableOrder,\n moduleIndices,\n {\n nextBindingId: resolved.nextBindingId,\n nextFunctionId: resolved.nextFunctionId,\n },\n {\n bindings: resolved.scriptBindings,\n globalObjectBindingIds: (resolved.program.globalObjectBindings ?? []).map(\n (binding) => binding.id,\n ),\n hir: resolved.program,\n },\n );\n if (\"diagnostics\" in parts) {\n return {\n diagnostics: parts.diagnostics,\n nextBindingId: resolved.nextBindingId,\n nextFunctionId: resolved.nextFunctionId,\n };\n }\n const range = script.range;\n return {\n diagnostics: [],\n nextBindingId: parts.nextBindingId,\n nextFunctionId: parts.nextFunctionId,\n program: {\n ...resolved.program,\n body: [\n // Instantiation runs no user code, and installing the table\n // evaluates nothing, so both may precede the Script.\n ...parts.instantiation,\n {\n expression: {\n arguments: [\n moduleNumber(tableOrder.length, range),\n moduleNumber(tableOrder.length, range),\n ...parts.tableArguments,\n ],\n kind: \"call\",\n range,\n target: { kind: \"module-evaluate\" },\n },\n kind: \"expression\",\n range,\n },\n ...resolved.program.body,\n ],\n functions: [...resolved.program.functions, ...parts.functions],\n globalBindings: [\n ...(resolved.program.globalBindings ?? []),\n ...parts.globalBindings,\n ],\n },\n };\n}\n"],"mappings":";;;;;;AAsDA,SAAS,sBACP,YACoD;CACpD,OAAO,WAAW,KAAK,CAAC;AAC1B;AAuBA,SAAS,kBACP,QACgC;CAChC,MAAM,QAA+B,CAAC,GAAG,OAAO,IAAI;CACpD,KAAK,MAAM,CAAC,OAAO,UAAU,OAAO,QAAQ,QAAQ,GAAG;EACrD,IAAI,MAAM,SAAS,WAAW;EAC9B,MAAM,cAAc,YAAY,MAAM;EACtC,IAAI,gBAAgB,MAAM,aAAa;GACrC,MAAM,KAAK;IAAE,GAAG,MAAM;IAAa;GAAY,CAAC;GAChD;EACF;EACA,IAAI,cAAgC,MAAM;EAC1C,IACE,MAAM,YAAY,SAAS,cAC3B,MAAM,YAAY,cAAc,QAAQ,MAExC,cAAc;GAAE,GAAG,MAAM;GAAa,cAAc;EAAU;OACzD,IACL,MAAM,YAAY,SAAS,WAC3B,MAAM,YAAY,oBAAoB,QAAQ,MAE9C,cAAc;GAAE,GAAG,MAAM;GAAa,cAAc;EAAU;EAEhE,MAAM,KAAK;GACT,GAAG,4BAA4B;IAC7B,IAAI,MAAM,aAAa,MAAM,OAAO;IACpC,OAAO,EACL,WAAW,MAAM,UACnB;GACF,CAAC;GACD,MAAM;GACN;GACA,MAAM;GACN,MAAM;GACN,OAAO,MAAM;EACf,CAAC;CACH;CACA,OAAO,MAAM,UACV,MAAM,WACJ,KAAK,WAAW,SAAS,OAAO,qBAChC,MAAM,WAAW,SAAS,OAAO,iBACtC;AACF;;;;;;;AAQA,SAAS,iBACP,OACA,MAC2B;CAC3B,KAAK,MAAM,QAAQ,OAAO;EACxB,IAAI,KAAK,SAAS,oBAAoB;GACpC,MAAM,aAAa,iBAAiB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,GAAG,SAAS,QAAQ;GACtB;GACA,WAAW,CAAC,GAAG,SAAS,QAAQ,WAAW,GAAG,MAAM,SAAS;GAC7D,gBAAgB,CACd,GAAI,SAAS,QAAQ,kBAAkB,CAAC,GACxC,GAAG,MAAM,cACX;EACF;CACF;AACF"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { LoadedJsonModule, SyntaxModule } from "./syntax.js";
|
|
2
|
+
//#region src/module-json.d.ts
|
|
3
|
+
/** Validate JSON and produce a default-only synthetic module. */
|
|
4
|
+
declare function jsonModuleSyntax(source: LoadedJsonModule): SyntaxModule;
|
|
5
|
+
//#endregion
|
|
6
|
+
export { jsonModuleSyntax };
|
|
7
|
+
//# sourceMappingURL=module-json.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"module-json.d.ts","names":[],"sources":["../src/module-json.ts"],"mappings":";;;iBAgFgB,iBAAiB,QAAQ,mBAAmB"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
//#region src/module-json.ts
|
|
2
|
+
function isJsonBoolean(value) {
|
|
3
|
+
return typeof value === "boolean";
|
|
4
|
+
}
|
|
5
|
+
function isJsonNumber(value) {
|
|
6
|
+
return typeof value === "number";
|
|
7
|
+
}
|
|
8
|
+
function isJsonString(value) {
|
|
9
|
+
return typeof value === "string";
|
|
10
|
+
}
|
|
11
|
+
function isJsonArray(value) {
|
|
12
|
+
return Array.isArray(value);
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Construct data through generic owned syntax, never a mutable JSON global
|
|
16
|
+
* or a JavaScript reparse. JSON.parse supplies edition JSON grammar only.
|
|
17
|
+
*/
|
|
18
|
+
function jsonExpression(value, range) {
|
|
19
|
+
if (value === null) return {
|
|
20
|
+
kind: "null",
|
|
21
|
+
range
|
|
22
|
+
};
|
|
23
|
+
if (isJsonBoolean(value)) return {
|
|
24
|
+
kind: "boolean",
|
|
25
|
+
range,
|
|
26
|
+
value
|
|
27
|
+
};
|
|
28
|
+
if (isJsonNumber(value)) return {
|
|
29
|
+
kind: "number",
|
|
30
|
+
range,
|
|
31
|
+
value
|
|
32
|
+
};
|
|
33
|
+
if (isJsonString(value)) return {
|
|
34
|
+
kind: "string",
|
|
35
|
+
range,
|
|
36
|
+
value
|
|
37
|
+
};
|
|
38
|
+
if (isJsonArray(value)) return {
|
|
39
|
+
elements: value.map((element) => jsonExpression(element, range)),
|
|
40
|
+
kind: "array",
|
|
41
|
+
range
|
|
42
|
+
};
|
|
43
|
+
return {
|
|
44
|
+
kind: "object",
|
|
45
|
+
properties: Object.entries(value).map(([key, element]) => ({
|
|
46
|
+
key: {
|
|
47
|
+
kind: "string",
|
|
48
|
+
range,
|
|
49
|
+
value: key
|
|
50
|
+
},
|
|
51
|
+
kind: "definition",
|
|
52
|
+
value: jsonExpression(element, range)
|
|
53
|
+
})),
|
|
54
|
+
range
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
/** Validate JSON and produce a default-only synthetic module. */
|
|
58
|
+
function jsonModuleSyntax(source) {
|
|
59
|
+
const range = {
|
|
60
|
+
end: {
|
|
61
|
+
column: 1,
|
|
62
|
+
line: 1
|
|
63
|
+
},
|
|
64
|
+
sourceId: source.sourceId,
|
|
65
|
+
start: {
|
|
66
|
+
column: 1,
|
|
67
|
+
line: 1
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
return {
|
|
71
|
+
body: [],
|
|
72
|
+
exports: [{
|
|
73
|
+
declaration: jsonExpression(JSON.parse(source.source), range),
|
|
74
|
+
exportedName: "default",
|
|
75
|
+
kind: "default",
|
|
76
|
+
range
|
|
77
|
+
}],
|
|
78
|
+
imports: [],
|
|
79
|
+
kind: "module",
|
|
80
|
+
range,
|
|
81
|
+
sourceId: source.sourceId,
|
|
82
|
+
varNames: []
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
//#endregion
|
|
87
|
+
export { jsonModuleSyntax };
|
|
88
|
+
//# sourceMappingURL=module-json.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"module-json.js","names":[],"sources":["../src/module-json.ts"],"sourcesContent":["/*\n * Oseo, an ahead-of-time compiler for JavaScript and TypeScript.\n * Copyright (C) 2026 Hong Minhee <https://hongminhee.org/>\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <https://www.gnu.org/licenses/>.\n */\n\nimport type {\n LoadedJsonModule,\n SyntaxExpression,\n SyntaxModule,\n} from \"./syntax.ts\";\nimport type { SourceRange } from \"./source.ts\";\n\n/** Shapes guaranteed by the edition JSON grammar at the parse boundary. */\ntype JsonValue =\n | null\n | boolean\n | number\n | string\n | readonly JsonValue[]\n | JsonObject;\ninterface JsonObject {\n readonly [key: string]: JsonValue;\n}\nfunction isJsonBoolean(value: JsonValue): value is boolean {\n return typeof value === \"boolean\";\n}\nfunction isJsonNumber(value: JsonValue): value is number {\n return typeof value === \"number\";\n}\nfunction isJsonString(value: JsonValue): value is string {\n return typeof value === \"string\";\n}\nfunction isJsonArray(value: JsonValue): value is readonly JsonValue[] {\n return Array.isArray(value);\n}\n\n/**\n * Construct data through generic owned syntax, never a mutable JSON global\n * or a JavaScript reparse. JSON.parse supplies edition JSON grammar only.\n */\nfunction jsonExpression(\n value: JsonValue,\n range: SourceRange,\n): SyntaxExpression {\n if (value === null) return { kind: \"null\", range };\n if (isJsonBoolean(value)) return { kind: \"boolean\", range, value };\n if (isJsonNumber(value)) return { kind: \"number\", range, value };\n if (isJsonString(value)) return { kind: \"string\", range, value };\n if (isJsonArray(value)) {\n return {\n elements: value.map((element) => jsonExpression(element, range)),\n kind: \"array\",\n range,\n };\n }\n return {\n kind: \"object\",\n properties: Object.entries(value).map(([key, element]) => ({\n key: { kind: \"string\", range, value: key },\n kind: \"definition\",\n value: jsonExpression(element, range),\n })),\n range,\n };\n}\n\n/** Validate JSON and produce a default-only synthetic module. */\nexport function jsonModuleSyntax(source: LoadedJsonModule): SyntaxModule {\n const range: SourceRange = {\n end: { column: 1, line: 1 },\n sourceId: source.sourceId,\n start: { column: 1, line: 1 },\n };\n // SAFETY: JSON.parse validates grammar and creates only JsonValue shapes.\n const value = JSON.parse(source.source) as JsonValue;\n return {\n body: [],\n exports: [\n {\n declaration: jsonExpression(value, range),\n exportedName: \"default\",\n kind: \"default\",\n range,\n },\n ],\n imports: [],\n kind: \"module\",\n range,\n sourceId: source.sourceId,\n varNames: [],\n };\n}\n"],"mappings":";AAoCA,SAAS,cAAc,OAAoC;CACzD,OAAO,OAAO,UAAU;AAC1B;AACA,SAAS,aAAa,OAAmC;CACvD,OAAO,OAAO,UAAU;AAC1B;AACA,SAAS,aAAa,OAAmC;CACvD,OAAO,OAAO,UAAU;AAC1B;AACA,SAAS,YAAY,OAAiD;CACpE,OAAO,MAAM,QAAQ,KAAK;AAC5B;;;;;AAMA,SAAS,eACP,OACA,OACkB;CAClB,IAAI,UAAU,MAAM,OAAO;EAAE,MAAM;EAAQ;CAAM;CACjD,IAAI,cAAc,KAAK,GAAG,OAAO;EAAE,MAAM;EAAW;EAAO;CAAM;CACjE,IAAI,aAAa,KAAK,GAAG,OAAO;EAAE,MAAM;EAAU;EAAO;CAAM;CAC/D,IAAI,aAAa,KAAK,GAAG,OAAO;EAAE,MAAM;EAAU;EAAO;CAAM;CAC/D,IAAI,YAAY,KAAK,GACnB,OAAO;EACL,UAAU,MAAM,KAAK,YAAY,eAAe,SAAS,KAAK,CAAC;EAC/D,MAAM;EACN;CACF;CAEF,OAAO;EACL,MAAM;EACN,YAAY,OAAO,QAAQ,KAAK,CAAC,CAAC,KAAK,CAAC,KAAK,cAAc;GACzD,KAAK;IAAE,MAAM;IAAU;IAAO,OAAO;GAAI;GACzC,MAAM;GACN,OAAO,eAAe,SAAS,KAAK;EACtC,EAAE;EACF;CACF;AACF;;AAGA,SAAgB,iBAAiB,QAAwC;CACvE,MAAM,QAAqB;EACzB,KAAK;GAAE,QAAQ;GAAG,MAAM;EAAE;EAC1B,UAAU,OAAO;EACjB,OAAO;GAAE,QAAQ;GAAG,MAAM;EAAE;CAC9B;CAGA,OAAO;EACL,MAAM,CAAC;EACP,SAAS,CACP;GACE,aAAa,eALL,KAAK,MAAM,OAAO,MAKM,GAAG,KAAK;GACxC,cAAc;GACd,MAAM;GACN;EACF,CACF;EACA,SAAS,CAAC;EACV,MAAM;EACN;EACA,UAAU,OAAO;EACjB,UAAU,CAAC;CACb;AACF"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { Diagnostic } from "./source.js";
|
|
2
|
+
import { ModuleGraph, ModuleGraphNode, ModuleGraphOptions, ModuleGraphResult, ModuleLoader, ModuleResolver, ModuleSourceFrontend, ScriptRequestReferrer, ScriptRequestResult, SyntaxImportEntry } from "./syntax.js";
|
|
3
|
+
//#region src/modules.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Discover and parse one closed module graph without evaluating its modules.
|
|
6
|
+
*
|
|
7
|
+
* Literal `import()` sites, which a module frontend produces only when
|
|
8
|
+
* static-specifier imports are enabled, add discovery edges: their
|
|
9
|
+
* targets and those targets' closures join {@link ModuleGraph.modules},
|
|
10
|
+
* but never a module's `dependencies`. A target that cannot be resolved,
|
|
11
|
+
* loaded, or parsed fails discovery with its source location and its
|
|
12
|
+
* importer chain in the diagnostic notes.
|
|
13
|
+
*/
|
|
14
|
+
declare function buildModuleGraph(frontend: ModuleSourceFrontend, loader: ModuleLoader, resolver: ModuleResolver, entryId: string, options?: ModuleGraphOptions): Promise<ModuleGraphResult>;
|
|
15
|
+
/**
|
|
16
|
+
* Discover the modules that Script referrers reach through `import()`,
|
|
17
|
+
* for a Script program with no module entry. Each Script resolves its
|
|
18
|
+
* requests against its own canonical identity, and a module with the same
|
|
19
|
+
* identity is a separate record.
|
|
20
|
+
*/
|
|
21
|
+
declare function buildScriptRequests(frontend: ModuleSourceFrontend, loader: ModuleLoader, resolver: ModuleResolver, scripts: readonly ScriptRequestReferrer[]): Promise<ScriptRequestResult>;
|
|
22
|
+
/** One runtime cell allocated during module instantiation. */
|
|
23
|
+
interface LinkedModuleCell {
|
|
24
|
+
readonly id: number;
|
|
25
|
+
readonly localName: string;
|
|
26
|
+
readonly moduleId: string;
|
|
27
|
+
}
|
|
28
|
+
/** One linked imported binding or namespace reference. */
|
|
29
|
+
interface LinkedModuleImport {
|
|
30
|
+
readonly cellId?: number;
|
|
31
|
+
readonly importedName: string;
|
|
32
|
+
readonly localName: string;
|
|
33
|
+
readonly namespaceModuleId?: string;
|
|
34
|
+
}
|
|
35
|
+
/** One export resolved to the cell that provides its live value. */
|
|
36
|
+
interface LinkedModuleExport {
|
|
37
|
+
readonly cellId: number;
|
|
38
|
+
readonly exportedName: string;
|
|
39
|
+
readonly sourceModuleId: string;
|
|
40
|
+
}
|
|
41
|
+
/** One module after import and export name resolution. */
|
|
42
|
+
interface LinkedModule {
|
|
43
|
+
readonly canonicalId: string;
|
|
44
|
+
readonly cellIds: readonly number[];
|
|
45
|
+
readonly componentId: number;
|
|
46
|
+
readonly exports: readonly LinkedModuleExport[];
|
|
47
|
+
readonly imports: readonly LinkedModuleImport[];
|
|
48
|
+
/**
|
|
49
|
+
* The cell holding this module's namespace object, present when an
|
|
50
|
+
* import or an `export * as` names that namespace. Every such reference
|
|
51
|
+
* shares the one cell, so namespace identity is per module.
|
|
52
|
+
*/
|
|
53
|
+
readonly namespaceCellId?: number;
|
|
54
|
+
readonly namespaceNames: readonly string[];
|
|
55
|
+
}
|
|
56
|
+
/** One deterministic strongly connected module component. */
|
|
57
|
+
interface ModuleComponent {
|
|
58
|
+
readonly cyclic: boolean;
|
|
59
|
+
readonly id: number;
|
|
60
|
+
/** Module IDs in evaluation order, ending with the component root. */
|
|
61
|
+
readonly moduleIds: readonly string[];
|
|
62
|
+
}
|
|
63
|
+
/** Closed graph with live-cell and evaluation identities fixed. */
|
|
64
|
+
interface LinkedModuleGraph {
|
|
65
|
+
readonly cells: readonly LinkedModuleCell[];
|
|
66
|
+
readonly components: readonly ModuleComponent[];
|
|
67
|
+
readonly entryId: string;
|
|
68
|
+
/**
|
|
69
|
+
* Startup evaluation order. A discovered graph lists only the entry's
|
|
70
|
+
* static closure; modules that only `import()` reaches are linked but
|
|
71
|
+
* not scheduled.
|
|
72
|
+
*/
|
|
73
|
+
readonly evaluationOrder: readonly string[];
|
|
74
|
+
readonly kind: "linked-module-graph";
|
|
75
|
+
readonly modules: readonly LinkedModule[];
|
|
76
|
+
}
|
|
77
|
+
/** Result of static module linking and instantiation planning. */
|
|
78
|
+
interface ModuleLinkResult {
|
|
79
|
+
readonly diagnostics: readonly Diagnostic[];
|
|
80
|
+
readonly graph?: LinkedModuleGraph;
|
|
81
|
+
}
|
|
82
|
+
declare function importedBinding(module: ModuleGraphNode, localName: string): SyntaxImportEntry | undefined;
|
|
83
|
+
/** Resolve live imports, exports, namespace keys, and cyclic graph order. */
|
|
84
|
+
declare function linkModuleGraph(graph: ModuleGraph): ModuleLinkResult;
|
|
85
|
+
//#endregion
|
|
86
|
+
export { LinkedModule, LinkedModuleCell, LinkedModuleExport, LinkedModuleGraph, LinkedModuleImport, ModuleComponent, ModuleLinkResult, buildModuleGraph, buildScriptRequests, importedBinding, linkModuleGraph };
|
|
87
|
+
//# sourceMappingURL=modules.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"modules.d.ts","names":[],"sources":["../src/modules.ts"],"mappings":";;;;;;;;;;;;;iBAmlBsB,iBACpB,UAAU,sBACV,QAAQ,cACR,UAAU,gBACV,iBACA,UAAS,qBACR,QAAQ;;;;;;;iBA2BW,oBACpB,UAAU,sBACV,QAAQ,cACR,UAAU,gBACV,kBAAkB,0BACjB,QAAQ;;UAqBM;WACN;WACA;WACA;;;UAIM;WACN;WACA;WACA;WACA;;;UAIM;WACN;WACA;WACA;;;UAIM;WACN;WACA;WACA;WACA,kBAAkB;WAClB,kBAAkB;;;;;;WAMlB;WACA;;;UAIM;WACN;WACA;;WAEA;;;UAIM;WACN,gBAAgB;WAChB,qBAAqB;WACrB;;;;;;WAMA;WACA;WACA,kBAAkB;;;UAIZ;WACN,sBAAsB;WACtB,QAAQ;;iBAmCH,gBACd,QAAQ,iBACR,oBACC;;iBA+Ka,gBAAgB,OAAO,cAAc"}
|