@oseo/compiler 0.0.0-stage → 0.1.0-canary.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +674 -0
- package/README.md +172 -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,64 @@
|
|
|
1
|
+
import { Diagnostic } from "./source.js";
|
|
2
|
+
import { ModuleGraph, ScriptRequestClosure, SyntaxProgram } from "./syntax.js";
|
|
3
|
+
import { HirProgram } from "./hir.js";
|
|
4
|
+
import { CompilerOptions, MirProgram } from "./mir.js";
|
|
5
|
+
import { HirHostOptions } from "./hir-build.js";
|
|
6
|
+
import { LinkedModuleGraph } from "./modules.js";
|
|
7
|
+
//#region src/module-compile.d.ts
|
|
8
|
+
/** Result of the host-neutral compiler pipeline. */
|
|
9
|
+
interface CompilationResult {
|
|
10
|
+
/**
|
|
11
|
+
* The agent programs a Script compiled for the test262 host can start,
|
|
12
|
+
* each linked beside `mir` as a unit of its own.
|
|
13
|
+
*/
|
|
14
|
+
readonly agents?: readonly MirProgram[];
|
|
15
|
+
readonly diagnostics: readonly Diagnostic[];
|
|
16
|
+
readonly hir?: HirProgram;
|
|
17
|
+
readonly mir?: MirProgram;
|
|
18
|
+
readonly syntax?: SyntaxProgram;
|
|
19
|
+
}
|
|
20
|
+
/** Whole-graph compilation result for one closed ECMAScript module entry. */
|
|
21
|
+
interface ModuleCompilationResult {
|
|
22
|
+
readonly diagnostics: readonly Diagnostic[];
|
|
23
|
+
readonly graph?: LinkedModuleGraph;
|
|
24
|
+
readonly hir?: HirProgram;
|
|
25
|
+
readonly mir?: MirProgram;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Link and lower a closed module graph to shared-cell scheduled MIR.
|
|
29
|
+
* A `prelude` Script runs to completion in the same realm before any
|
|
30
|
+
* module links or evaluates; modules resolve its global declarations as
|
|
31
|
+
* names of their outer global environment. The table does not exist
|
|
32
|
+
* while the prelude runs, so an `import()` in it keeps the profile
|
|
33
|
+
* diagnostic.
|
|
34
|
+
*
|
|
35
|
+
* The table holds every discovered module. A literal `import()` site
|
|
36
|
+
* lowers to the runtime import operation with its target's constant
|
|
37
|
+
* table index; modules that only such sites reach are linked and
|
|
38
|
+
* instantiated at startup but evaluate only on request.
|
|
39
|
+
*/
|
|
40
|
+
declare function compileModuleGraph(graph: ModuleGraph, options?: CompilerOptions, prelude?: SyntaxProgram): ModuleCompilationResult;
|
|
41
|
+
/** The modules a Script's `import()` calls reach, keyed for its build. */
|
|
42
|
+
interface ScriptModuleRequests {
|
|
43
|
+
/** The canonical identity the Script's requests resolved against. */
|
|
44
|
+
readonly canonicalId: string;
|
|
45
|
+
readonly closure: ScriptRequestClosure;
|
|
46
|
+
}
|
|
47
|
+
/** A Script's HIR with every module it requests instantiated first. */
|
|
48
|
+
interface ScriptGraphHirResult {
|
|
49
|
+
readonly diagnostics: readonly Diagnostic[];
|
|
50
|
+
readonly nextBindingId: number;
|
|
51
|
+
readonly nextFunctionId: number;
|
|
52
|
+
readonly program?: HirProgram;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Resolve a Script whose `import()` calls name modules of `requests`.
|
|
56
|
+
* The program instantiates every module environment and installs the
|
|
57
|
+
* module table without evaluating any module, then runs the Script; each
|
|
58
|
+
* module evaluates on its first request. The modules resolve the
|
|
59
|
+
* Script's global declarations as names of their outer environment.
|
|
60
|
+
*/
|
|
61
|
+
declare function buildScriptGraphHir(script: SyntaxProgram, requests: ScriptModuleRequests, seed?: HirHostOptions): ScriptGraphHirResult;
|
|
62
|
+
//#endregion
|
|
63
|
+
export { CompilationResult, ModuleCompilationResult, ScriptGraphHirResult, ScriptModuleRequests, buildScriptGraphHir, compileModuleGraph };
|
|
64
|
+
//# sourceMappingURL=module-compile.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"module-compile.d.ts","names":[],"sources":["../src/module-compile.ts"],"mappings":";;;;;;;;UA2CiB;;;;;WAKN,kBAAkB;WAClB,sBAAsB;WACtB,MAAM;WACN,MAAM;WACN,SAAS;;;UAIH;WACN,sBAAsB;WACtB,QAAQ;WACR,MAAM;WACN,MAAM;;;;;;;;;;;;;;;iBAg6BD,mBACd,OAAO,aACP,UAAS,iBACT,UAAU,gBACT;;UA2Fc;;WAEN;WACA,SAAS;;;UAIH;WACN,sBAAsB;WACtB;WACA;WACA,UAAU;;;;;;;;;iBAUL,oBACd,QAAQ,eACR,UAAU,sBACV,OAAM,iBACL"}
|