@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.
Files changed (105) hide show
  1. package/LICENSE +674 -0
  2. package/README.md +59 -2
  3. package/dist/agent-programs.d.ts +28 -0
  4. package/dist/agent-programs.d.ts.map +1 -0
  5. package/dist/agent-programs.js +134 -0
  6. package/dist/agent-programs.js.map +1 -0
  7. package/dist/agent-templates.d.ts +33 -0
  8. package/dist/agent-templates.d.ts.map +1 -0
  9. package/dist/agent-templates.js +45 -0
  10. package/dist/agent-templates.js.map +1 -0
  11. package/dist/compile.d.ts +20 -0
  12. package/dist/compile.d.ts.map +1 -0
  13. package/dist/compile.js +75 -0
  14. package/dist/compile.js.map +1 -0
  15. package/dist/fragments.d.ts +72 -0
  16. package/dist/fragments.d.ts.map +1 -0
  17. package/dist/fragments.js +158 -0
  18. package/dist/fragments.js.map +1 -0
  19. package/dist/hir-build.d.ts +80 -0
  20. package/dist/hir-build.d.ts.map +1 -0
  21. package/dist/hir-build.js +3077 -0
  22. package/dist/hir-build.js.map +1 -0
  23. package/dist/hir-print.d.ts +10 -0
  24. package/dist/hir-print.d.ts.map +1 -0
  25. package/dist/hir-print.js +271 -0
  26. package/dist/hir-print.js.map +1 -0
  27. package/dist/hir.d.ts +1246 -0
  28. package/dist/hir.d.ts.map +1 -0
  29. package/dist/hir.js +147 -0
  30. package/dist/hir.js.map +1 -0
  31. package/dist/host-scripts.d.ts +14 -0
  32. package/dist/host-scripts.d.ts.map +1 -0
  33. package/dist/host-scripts.js +204 -0
  34. package/dist/host-scripts.js.map +1 -0
  35. package/dist/index.d.ts +26 -0
  36. package/dist/index.d.ts.map +1 -0
  37. package/dist/index.js +27 -0
  38. package/dist/index.js.map +1 -0
  39. package/dist/mir-build.d.ts +8 -0
  40. package/dist/mir-build.d.ts.map +1 -0
  41. package/dist/mir-build.js +5113 -0
  42. package/dist/mir-build.js.map +1 -0
  43. package/dist/mir-print.d.ts +7 -0
  44. package/dist/mir-print.d.ts.map +1 -0
  45. package/dist/mir-print.js +65 -0
  46. package/dist/mir-print.js.map +1 -0
  47. package/dist/mir-specialize.d.ts +7 -0
  48. package/dist/mir-specialize.d.ts.map +1 -0
  49. package/dist/mir-specialize.js +182 -0
  50. package/dist/mir-specialize.js.map +1 -0
  51. package/dist/mir.d.ts +571 -0
  52. package/dist/mir.d.ts.map +1 -0
  53. package/dist/mir.js +1 -0
  54. package/dist/module-builtin.d.ts +20 -0
  55. package/dist/module-builtin.d.ts.map +1 -0
  56. package/dist/module-builtin.js +57 -0
  57. package/dist/module-builtin.js.map +1 -0
  58. package/dist/module-compile.d.ts +64 -0
  59. package/dist/module-compile.d.ts.map +1 -0
  60. package/dist/module-compile.js +690 -0
  61. package/dist/module-compile.js.map +1 -0
  62. package/dist/module-json.d.ts +7 -0
  63. package/dist/module-json.d.ts.map +1 -0
  64. package/dist/module-json.js +88 -0
  65. package/dist/module-json.js.map +1 -0
  66. package/dist/modules.d.ts +87 -0
  67. package/dist/modules.d.ts.map +1 -0
  68. package/dist/modules.js +734 -0
  69. package/dist/modules.js.map +1 -0
  70. package/dist/native-fragments.d.ts +36 -0
  71. package/dist/native-fragments.d.ts.map +1 -0
  72. package/dist/native-fragments.js +110 -0
  73. package/dist/native-fragments.js.map +1 -0
  74. package/dist/native.d.ts +282 -0
  75. package/dist/native.d.ts.map +1 -0
  76. package/dist/native.js +47 -0
  77. package/dist/native.js.map +1 -0
  78. package/dist/regexp-execute.d.ts +74 -0
  79. package/dist/regexp-execute.d.ts.map +1 -0
  80. package/dist/regexp-execute.js +480 -0
  81. package/dist/regexp-execute.js.map +1 -0
  82. package/dist/regexp-matcher.d.ts +279 -0
  83. package/dist/regexp-matcher.d.ts.map +1 -0
  84. package/dist/regexp-matcher.js +1098 -0
  85. package/dist/regexp-matcher.js.map +1 -0
  86. package/dist/regexp-parse.d.ts +22 -0
  87. package/dist/regexp-parse.d.ts.map +1 -0
  88. package/dist/regexp-parse.js +1440 -0
  89. package/dist/regexp-parse.js.map +1 -0
  90. package/dist/regexp-print.d.ts +24 -0
  91. package/dist/regexp-print.d.ts.map +1 -0
  92. package/dist/regexp-print.js +147 -0
  93. package/dist/regexp-print.js.map +1 -0
  94. package/dist/regexp.d.ts +324 -0
  95. package/dist/regexp.d.ts.map +1 -0
  96. package/dist/regexp.js +22 -0
  97. package/dist/regexp.js.map +1 -0
  98. package/dist/source.d.ts +38 -0
  99. package/dist/source.d.ts.map +1 -0
  100. package/dist/source.js +10 -0
  101. package/dist/source.js.map +1 -0
  102. package/dist/syntax.d.ts +1232 -0
  103. package/dist/syntax.d.ts.map +1 -0
  104. package/dist/syntax.js +1 -0
  105. 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":";;;;;;;;UA6DiB;;;;;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"}