eliscript 0.0.1

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 (195) hide show
  1. package/LICENSE +674 -0
  2. package/README.md +135 -0
  3. package/bin/eliscript +16 -0
  4. package/bin/eliscript-bootstrap +15 -0
  5. package/bin/eliscript-build +15 -0
  6. package/bin/eliscript-check +15 -0
  7. package/bin/eliscript-eval +15 -0
  8. package/bin/eliscript-format +15 -0
  9. package/bin/eliscript-org +10 -0
  10. package/bin/eliscript-portable +17 -0
  11. package/bin/eliscript-seed +10 -0
  12. package/bin/eliscript-seed-build +10 -0
  13. package/bin/eliscript-watch +15 -0
  14. package/bootstrap/README.md +100 -0
  15. package/bootstrap/compiler/analyzer.eli +1426 -0
  16. package/bootstrap/compiler/compiler.eli +472 -0
  17. package/bootstrap/compiler/emitter.eli +1745 -0
  18. package/bootstrap/compiler/expander.eli +2522 -0
  19. package/bootstrap/compiler/formatter.eli +359 -0
  20. package/bootstrap/compiler/ir.eli +297 -0
  21. package/bootstrap/compiler/lower.eli +661 -0
  22. package/bootstrap/compiler/project.eli +1120 -0
  23. package/bootstrap/compiler/reader.eli +321 -0
  24. package/bootstrap/compiler/source-map.eli +165 -0
  25. package/bootstrap/compiler/symbol.eli +92 -0
  26. package/bootstrap/compiler/syntax.eli +54 -0
  27. package/bootstrap/compiler/transient-analysis.eli +825 -0
  28. package/bootstrap/host/build.mjs +28 -0
  29. package/bootstrap/host/bun.mjs +282 -0
  30. package/bootstrap/host/check-cli.mjs +163 -0
  31. package/bootstrap/host/eliscript-cli.mjs +36 -0
  32. package/bootstrap/host/evaluation-cli.mjs +401 -0
  33. package/bootstrap/host/evaluation.mjs +560 -0
  34. package/bootstrap/host/format-cli.mjs +139 -0
  35. package/bootstrap/host/project-cli.mjs +295 -0
  36. package/bootstrap/host/project.mjs +1080 -0
  37. package/bootstrap/host/watch-cli.mjs +129 -0
  38. package/bootstrap/host/watch.mjs +267 -0
  39. package/browser/host.mjs +357 -0
  40. package/browser/worker.mjs +60 -0
  41. package/compiler/README.md +118 -0
  42. package/compiler/eliscript-analyzer.el +716 -0
  43. package/compiler/eliscript-cli.el +108 -0
  44. package/compiler/eliscript-diagnostic.el +158 -0
  45. package/compiler/eliscript-emitter.el +1351 -0
  46. package/compiler/eliscript-evaluation.el +259 -0
  47. package/compiler/eliscript-expander.el +1630 -0
  48. package/compiler/eliscript-form.el +79 -0
  49. package/compiler/eliscript-ir-emitter.el +1460 -0
  50. package/compiler/eliscript-ir.el +356 -0
  51. package/compiler/eliscript-lower.el +463 -0
  52. package/compiler/eliscript-macro-eval.el +811 -0
  53. package/compiler/eliscript-parameters.el +324 -0
  54. package/compiler/eliscript-portable.el +492 -0
  55. package/compiler/eliscript-project-cli.el +156 -0
  56. package/compiler/eliscript-project.el +1676 -0
  57. package/compiler/eliscript-reader.el +421 -0
  58. package/compiler/eliscript-source-map.el +192 -0
  59. package/compiler/eliscript-symbol.el +101 -0
  60. package/compiler/eliscript-transient-analysis.el +817 -0
  61. package/compiler/eliscript.el +239 -0
  62. package/dist/bootstrap/analyzer.mjs +968 -0
  63. package/dist/bootstrap/analyzer.mjs.map +1 -0
  64. package/dist/bootstrap/compiler.mjs +228 -0
  65. package/dist/bootstrap/compiler.mjs.map +1 -0
  66. package/dist/bootstrap/emitter.mjs +1173 -0
  67. package/dist/bootstrap/emitter.mjs.map +1 -0
  68. package/dist/bootstrap/expander.mjs +1469 -0
  69. package/dist/bootstrap/expander.mjs.map +1 -0
  70. package/dist/bootstrap/formatter.mjs +304 -0
  71. package/dist/bootstrap/formatter.mjs.map +1 -0
  72. package/dist/bootstrap/ir.mjs +193 -0
  73. package/dist/bootstrap/ir.mjs.map +1 -0
  74. package/dist/bootstrap/lower.mjs +344 -0
  75. package/dist/bootstrap/lower.mjs.map +1 -0
  76. package/dist/bootstrap/project.mjs +585 -0
  77. package/dist/bootstrap/project.mjs.map +1 -0
  78. package/dist/bootstrap/reader.mjs +259 -0
  79. package/dist/bootstrap/reader.mjs.map +1 -0
  80. package/dist/bootstrap/source-map.mjs +154 -0
  81. package/dist/bootstrap/source-map.mjs.map +1 -0
  82. package/dist/bootstrap/symbol.mjs +74 -0
  83. package/dist/bootstrap/symbol.mjs.map +1 -0
  84. package/dist/bootstrap/syntax.mjs +38 -0
  85. package/dist/bootstrap/syntax.mjs.map +1 -0
  86. package/dist/bootstrap/transient-analysis.mjs +660 -0
  87. package/dist/bootstrap/transient-analysis.mjs.map +1 -0
  88. package/dist/browser/compiler.js +6491 -0
  89. package/editor/README.md +83 -0
  90. package/editor/eliscript-mode.el +878 -0
  91. package/editor/eliscript-repl.el +501 -0
  92. package/package.json +163 -0
  93. package/platform/README.md +48 -0
  94. package/platform/browser.mjs +204 -0
  95. package/platform/worker.mjs +166 -0
  96. package/runtime/README.md +296 -0
  97. package/runtime/core/collection-internals.mjs +512 -0
  98. package/runtime/core/collection.mjs +645 -0
  99. package/runtime/core/data-text.mjs +532 -0
  100. package/runtime/core/data.mjs +268 -0
  101. package/runtime/core/identifier.mjs +314 -0
  102. package/runtime/core/lazy-sequence.mjs +244 -0
  103. package/runtime/core/list-internals.mjs +18 -0
  104. package/runtime/core/list.mjs +273 -0
  105. package/runtime/core/map-internals.mjs +793 -0
  106. package/runtime/core/map.mjs +394 -0
  107. package/runtime/core/metadata-internals.mjs +14 -0
  108. package/runtime/core/metadata.mjs +44 -0
  109. package/runtime/core/object-impl.mjs +65 -0
  110. package/runtime/core/object-impl.mjs.map +1 -0
  111. package/runtime/core/object.mjs +13 -0
  112. package/runtime/core/order.mjs +234 -0
  113. package/runtime/core/persistent-kind.mjs +43 -0
  114. package/runtime/core/protocol-error.mjs +36 -0
  115. package/runtime/core/protocol-impl.mjs +326 -0
  116. package/runtime/core/protocol-impl.mjs.map +1 -0
  117. package/runtime/core/protocol.mjs +14 -0
  118. package/runtime/core/queue-internals.mjs +27 -0
  119. package/runtime/core/queue.mjs +238 -0
  120. package/runtime/core/record.mjs +346 -0
  121. package/runtime/core/regex.mjs +184 -0
  122. package/runtime/core/sequence.mjs +632 -0
  123. package/runtime/core/set-algebra.mjs +287 -0
  124. package/runtime/core/set-internals.mjs +33 -0
  125. package/runtime/core/set.mjs +378 -0
  126. package/runtime/core/sorted-internals.mjs +215 -0
  127. package/runtime/core/sorted.mjs +598 -0
  128. package/runtime/core/text-impl.mjs +95 -0
  129. package/runtime/core/text-impl.mjs.map +1 -0
  130. package/runtime/core/text.mjs +15 -0
  131. package/runtime/core/transducer.mjs +668 -0
  132. package/runtime/core/transient-internals.mjs +38 -0
  133. package/runtime/core/transient.mjs +53 -0
  134. package/runtime/core/truth.mjs +3 -0
  135. package/runtime/core/type.mjs +262 -0
  136. package/runtime/core/value-internals.mjs +188 -0
  137. package/runtime/core/value.mjs +93 -0
  138. package/runtime/core/vector-internals.mjs +102 -0
  139. package/runtime/core/vector.mjs +951 -0
  140. package/runtime/literals.mjs +34 -0
  141. package/runtime/source-mapping.mjs +220 -0
  142. package/runtime/testing/list.mjs +52 -0
  143. package/runtime/testing/map.mjs +145 -0
  144. package/runtime/testing/queue.mjs +49 -0
  145. package/runtime/testing/set.mjs +61 -0
  146. package/runtime/testing/sorted.mjs +105 -0
  147. package/runtime/testing/value.mjs +17 -0
  148. package/runtime/testing/vector.mjs +102 -0
  149. package/runtime/worker-value-codec.mjs +565 -0
  150. package/runtime/worker-value-stream.mjs +786 -0
  151. package/runtime/worker.mjs +975 -0
  152. package/stdlib/README.md +774 -0
  153. package/stdlib/bit.eli +36 -0
  154. package/stdlib/core/collection.eli +134 -0
  155. package/stdlib/core/data-text.eli +16 -0
  156. package/stdlib/core/data.eli +306 -0
  157. package/stdlib/core/identifier.eli +32 -0
  158. package/stdlib/core/lazy-sequence.eli +63 -0
  159. package/stdlib/core/metadata.eli +20 -0
  160. package/stdlib/core/object.eli +89 -0
  161. package/stdlib/core/order.eli +133 -0
  162. package/stdlib/core/protocol.eli +387 -0
  163. package/stdlib/core/record.eli +16 -0
  164. package/stdlib/core/regex.eli +17 -0
  165. package/stdlib/core/seq.eli +701 -0
  166. package/stdlib/core/set.eli +312 -0
  167. package/stdlib/core/sorted.eli +53 -0
  168. package/stdlib/core/text.eli +103 -0
  169. package/stdlib/core/transducer.eli +59 -0
  170. package/stdlib/core/transient.eli +24 -0
  171. package/stdlib/core/type.eli +19 -0
  172. package/stdlib/core/walk.eli +195 -0
  173. package/stdlib/core/zipper.eli +508 -0
  174. package/stdlib/data-text.eli +1092 -0
  175. package/stdlib/data.eli +42 -0
  176. package/stdlib/deferred.eli +70 -0
  177. package/stdlib/function.eli +120 -0
  178. package/stdlib/hierarchy.eli +245 -0
  179. package/stdlib/identifier.eli +147 -0
  180. package/stdlib/interop/js.eli +616 -0
  181. package/stdlib/json.eli +870 -0
  182. package/stdlib/metadata.eli +56 -0
  183. package/stdlib/multimethod.eli +464 -0
  184. package/stdlib/numeric.eli +193 -0
  185. package/stdlib/object.eli +96 -0
  186. package/stdlib/persistent-list.eli +145 -0
  187. package/stdlib/persistent-map.eli +724 -0
  188. package/stdlib/persistent-queue.eli +32 -0
  189. package/stdlib/persistent-set.eli +236 -0
  190. package/stdlib/persistent-vector.eli +342 -0
  191. package/stdlib/result.eli +141 -0
  192. package/stdlib/sequence.eli +106 -0
  193. package/stdlib/state/atom.eli +265 -0
  194. package/stdlib/text.eli +88 -0
  195. package/stdlib/value.eli +325 -0
@@ -0,0 +1,472 @@
1
+ (module bootstrap.compiler.compiler
2
+ (import "./reader.mjs" read-string)
3
+ (import "./formatter.mjs"
4
+ formatter-format
5
+ formatter-version
6
+ formatter-width
7
+ formatter-indent
8
+ format-source)
9
+ (import "./expander.mjs" expand-module)
10
+ (import "./analyzer.mjs" analyze-module select-portable-module)
11
+ (import "./lower.mjs" lower-module)
12
+ (import "./ir.mjs" ir-format ir-version serialize-program deserialize-program)
13
+ (import "./emitter.mjs" emit-module emit-module-with-source-map)
14
+ (import "./project.mjs"
15
+ project-plan-format
16
+ project-plan-version
17
+ project-plan
18
+ portable-project-plan
19
+ project-build-report-format
20
+ project-build-report-version
21
+ project-build-report
22
+ project-request-format
23
+ project-request-version
24
+ project-request
25
+ project-configuration
26
+ build-operation-format
27
+ build-operation-version
28
+ build-operation-request
29
+ check-operation-format
30
+ check-operation-version
31
+ check-operation-request
32
+ project-check-report-format
33
+ project-check-report-version
34
+ project-check-report
35
+ project-cache-format
36
+ project-cache-version
37
+ project-cache-lookup
38
+ project-cache-decision)
39
+ (defconst evaluation-operation-format "eliscript-evaluation-operation")
40
+ (defconst evaluation-operation-version 1)
41
+ (defconst evaluation-input-format "eliscript-evaluation-input")
42
+ (defconst evaluation-input-version 1)
43
+ (defconst evaluation-form-format "eliscript-evaluation-form")
44
+ (defconst evaluation-form-version 1)
45
+ (defconst evaluation-module-format "eliscript-evaluation-module")
46
+ (defconst evaluation-module-version 1)
47
+ (defconst evaluation-operation-keys
48
+ (js-array "id" "operation" "source" "filename" "root" "line" "column"))
49
+ (defconst evaluation-definition-heads
50
+ (js-array
51
+ "defasync" "defconst" "defmacro" "defmulti"
52
+ "defn" "defportable" "defprotocol" "defun" "defvar"))
53
+ (defconst evaluation-module-heads
54
+ (js-array "export" "export-default" "import" "import-portable" "module"))
55
+ (defconst evaluation-fail
56
+ (js*
57
+ "(message, filename) => { const error = new Error(message); error.eliscriptDiagnostic = { format: 'eliscript-diagnostic', version: 1, code: 'ELI-E0001', severity: 'error', phase: 'evaluation-request', message, ...(filename ? { location: { file: filename } } : {}) }; throw error; }"))
58
+ (defconst evaluation-object-p
59
+ (js*
60
+ "(value) => value !== null && typeof value === 'object' && !Array.isArray(value)"))
61
+ (defconst evaluation-id-p
62
+ (js*
63
+ "(value) => value === null || (typeof value === 'string' && value.length > 0) || (Number.isSafeInteger(value) && value >= 0)"))
64
+ (defconst evaluation-positive-integer-p
65
+ (js* "(value) => Number.isSafeInteger(value) && value >= 1"))
66
+ (defun compile-ir-string
67
+ (source filename &optional macro-context)
68
+ (let*
69
+ ((read-forms (read-string source filename))
70
+ (expanded-forms (expand-module read-forms filename macro-context)))
71
+ (analyze-module expanded-forms filename)
72
+ (lower-module expanded-forms filename)))
73
+ (defun evaluation-object-field
74
+ (value key fallback)
75
+ (if (js-call globalThis.Object :hasOwn value key) (get value key) fallback))
76
+ (defun evaluation-require-source
77
+ (source filename)
78
+ (unless (and (= (js* "typeof source") "string") (> (get source :length) 0))
79
+ (funcall evaluation-fail "evaluation source must be a non-empty string" filename))
80
+ source)
81
+ (defun evaluation-require-filename
82
+ (filename)
83
+ (unless (and (= (js* "typeof filename") "string") (> (get filename :length) 0))
84
+ (funcall evaluation-fail "evaluation filename must be a non-empty string" false))
85
+ filename)
86
+ (defun evaluation-input-result
87
+ (status filename)
88
+ (js-call
89
+ globalThis.Object
90
+ :freeze
91
+ (js-object
92
+ :format
93
+ evaluation-input-format
94
+ :version
95
+ evaluation-input-version
96
+ :status
97
+ status
98
+ :filename
99
+ filename)))
100
+ (defun evaluation-input-description
101
+ (source filename)
102
+ (evaluation-require-filename filename)
103
+ (unless (= (js* "typeof source") "string")
104
+ (funcall evaluation-fail "evaluation input source must be a string" filename))
105
+ (try
106
+ (let ((forms (read-string source filename)))
107
+ (cond ((= (get forms :length) 0) (evaluation-input-result "empty" filename))
108
+ ((= (get forms :length) 1) (evaluation-input-result "complete" filename))
109
+ (t
110
+ (funcall
111
+ evaluation-fail
112
+ "interactive input must contain exactly one top-level form"
113
+ filename))))
114
+ (catch error
115
+ (let ((diagnostic (get error :eliscriptDiagnostic nil)))
116
+ (if
117
+ (and
118
+ diagnostic
119
+ (= (get diagnostic :code nil) "ELI-R0001")
120
+ (= (get diagnostic :message nil) "unexpected end of input"))
121
+ (evaluation-input-result "incomplete" filename)
122
+ (throw error))))))
123
+ (defun evaluation-operation-request
124
+ (input)
125
+ (unless (funcall evaluation-object-p input)
126
+ (funcall evaluation-fail "evaluation operation request must be an object" false))
127
+ (js-call
128
+ (js-call globalThis.Object :keys input)
129
+ :forEach
130
+ (lambda
131
+ (key)
132
+ (unless (js-call evaluation-operation-keys :includes key)
133
+ (funcall evaluation-fail (str "unknown evaluation operation key: " key) false))))
134
+ (let*
135
+ ((id (evaluation-object-field input "id" (js* "null")))
136
+ (operation (get input :operation)))
137
+ (unless (funcall evaluation-id-p id)
138
+ (funcall
139
+ evaluation-fail
140
+ "evaluation operation id must be null, a non-empty string, or a non-negative safe integer"
141
+ false))
142
+ (unless
143
+ (js-call (js-array "describe" "evaluate" "load" "reset") :includes operation)
144
+ (funcall
145
+ evaluation-fail
146
+ "evaluation operation must be describe, evaluate, load, or reset"
147
+ false))
148
+ (if (or (= operation "evaluate") (= operation "load"))
149
+ (let*
150
+ ((filename (evaluation-require-filename (get input :filename)))
151
+ (source (evaluation-require-source (get input :source) filename))
152
+ (root (evaluation-object-field input "root" (js* "null")))
153
+ (line (evaluation-object-field input "line" 1))
154
+ (column (evaluation-object-field input "column" 1)))
155
+ (unless
156
+ (or
157
+ (nil? root)
158
+ (and (= (js* "typeof root") "string") (> (get root :length) 0)))
159
+ (funcall
160
+ evaluation-fail
161
+ "evaluation root must be null or a non-empty string"
162
+ filename))
163
+ (unless (funcall evaluation-positive-integer-p line)
164
+ (funcall
165
+ evaluation-fail
166
+ "evaluation line must be a positive safe integer"
167
+ filename))
168
+ (unless (funcall evaluation-positive-integer-p column)
169
+ (funcall
170
+ evaluation-fail
171
+ "evaluation column must be a positive safe integer"
172
+ filename))
173
+ (js-call
174
+ globalThis.Object
175
+ :freeze
176
+ (js-object
177
+ :format
178
+ evaluation-operation-format
179
+ :version
180
+ evaluation-operation-version
181
+ :id
182
+ id
183
+ :operation
184
+ operation
185
+ :source
186
+ source
187
+ :filename
188
+ filename
189
+ :root
190
+ root
191
+ :line
192
+ line
193
+ :column
194
+ column)))
195
+ (progn
196
+ (when
197
+ (or
198
+ (js-call globalThis.Object :hasOwn input "source")
199
+ (js-call globalThis.Object :hasOwn input "filename")
200
+ (js-call globalThis.Object :hasOwn input "root")
201
+ (js-call globalThis.Object :hasOwn input "line")
202
+ (js-call globalThis.Object :hasOwn input "column"))
203
+ (funcall
204
+ evaluation-fail
205
+ (str operation " evaluation operation does not accept source fields")
206
+ false))
207
+ (js-call
208
+ globalThis.Object
209
+ :freeze
210
+ (js-object
211
+ :format
212
+ evaluation-operation-format
213
+ :version
214
+ evaluation-operation-version
215
+ :id
216
+ id
217
+ :operation
218
+ operation))))))
219
+ (defun evaluation-form-head
220
+ (form)
221
+ (if (= (get form :kind) "list")
222
+ (let ((items (get form :items)))
223
+ (if (> (get items :length) 0)
224
+ (let ((head (js-nth 0 items)))
225
+ (if (= (get head :kind) "symbol") (get head :name) false))
226
+ false))
227
+ false))
228
+ (defun evaluation-form-description
229
+ (source filename)
230
+ (evaluation-require-filename filename)
231
+ (evaluation-require-source source filename)
232
+ (let ((forms (read-string source filename)))
233
+ (unless (= (get forms :length) 1)
234
+ (funcall
235
+ evaluation-fail
236
+ "evaluate requires exactly one top-level form"
237
+ filename))
238
+ (let*
239
+ ((form (js-nth 0 forms))
240
+ (head (evaluation-form-head form))
241
+ (definition (and head (js-call evaluation-definition-heads :includes head)))
242
+ (module-form (and head (js-call evaluation-module-heads :includes head)))
243
+ (name
244
+ (if definition
245
+ (let ((items (get form :items)))
246
+ (if (> (get items :length) 1)
247
+ (let ((candidate (js-nth 1 items)))
248
+ (if (= (get candidate :kind) "symbol") (get candidate :name) false))
249
+ false))
250
+ false)))
251
+ (when (and definition (not name))
252
+ (funcall
253
+ evaluation-fail
254
+ (str head " evaluation form requires a symbol name")
255
+ filename))
256
+ (js-call
257
+ globalThis.Object
258
+ :freeze
259
+ (js-object
260
+ :format
261
+ evaluation-form-format
262
+ :version
263
+ evaluation-form-version
264
+ :kind
265
+ (cond (definition "definition") (module-form "module") (t "expression"))
266
+ :head
267
+ (or head (js* "null"))
268
+ :name
269
+ (or name (js* "null"))
270
+ :runtimeBinding
271
+ (and definition (not (= head "defmacro")))
272
+ :filename
273
+ filename)))))
274
+ (defun evaluation-add-name
275
+ (names seen value)
276
+ (when
277
+ (and
278
+ (= (js* "typeof value") "string")
279
+ (> (get value :length) 0)
280
+ (not (js-call seen :has value)))
281
+ (js-call seen :add value)
282
+ (js-call names :push value)))
283
+ (defun evaluation-collect-ir-names
284
+ (nodes bindings binding-set exports export-set)
285
+ (js-call
286
+ nodes
287
+ :forEach
288
+ (lambda
289
+ (node)
290
+ (let ((kind (get node :kind)))
291
+ (cond
292
+ ((or (= kind "function-declaration") (= kind "variable-declaration"))
293
+ (evaluation-add-name bindings binding-set (get node :value)))
294
+ ((= kind "import-declaration")
295
+ (js-call
296
+ (get node :children)
297
+ :forEach
298
+ (lambda
299
+ (child)
300
+ (when (= (get child :kind) "import-named")
301
+ (evaluation-add-name bindings binding-set (get child :value))))))
302
+ ((= kind "export-declaration")
303
+ (js-call
304
+ (get node :children)
305
+ :forEach
306
+ (lambda
307
+ (child)
308
+ (evaluation-add-name exports export-set (get child :value)))))
309
+ ((= kind "module-declaration")
310
+ (evaluation-collect-ir-names
311
+ (get node :children)
312
+ bindings
313
+ binding-set
314
+ exports
315
+ export-set)))))))
316
+ (defun evaluation-collect-macro-sources
317
+ (forms source result)
318
+ (js-call
319
+ forms
320
+ :forEach
321
+ (lambda
322
+ (form)
323
+ (let ((head (evaluation-form-head form)))
324
+ (cond
325
+ ((= head "defmacro")
326
+ (let ((span (get form :span)))
327
+ (js-call
328
+ result
329
+ :push
330
+ (js-call source :slice (get span :start) (get span :end)))))
331
+ ((= head "module")
332
+ (evaluation-collect-macro-sources
333
+ (js-call (get form :items) :slice 2)
334
+ source
335
+ result)))))))
336
+ (defun evaluation-module-description
337
+ (source filename)
338
+ (evaluation-require-filename filename)
339
+ (evaluation-require-source source filename)
340
+ (let*
341
+ ((program (compile-ir-string source filename))
342
+ (bindings (js-array))
343
+ (binding-set (new globalThis.Set))
344
+ (exports (js-array))
345
+ (export-set (new globalThis.Set))
346
+ (macro-sources (js-array)))
347
+ (evaluation-collect-ir-names
348
+ (get program :body)
349
+ bindings
350
+ binding-set
351
+ exports
352
+ export-set)
353
+ (evaluation-collect-macro-sources
354
+ (read-string source filename)
355
+ source
356
+ macro-sources)
357
+ (js-call bindings :sort)
358
+ (js-call exports :sort)
359
+ (js-call globalThis.Object :freeze bindings)
360
+ (js-call globalThis.Object :freeze exports)
361
+ (js-call globalThis.Object :freeze macro-sources)
362
+ (js-call
363
+ globalThis.Object
364
+ :freeze
365
+ (js-object
366
+ :format
367
+ evaluation-module-format
368
+ :version
369
+ evaluation-module-version
370
+ :filename
371
+ filename
372
+ :bindings
373
+ bindings
374
+ :exports
375
+ exports
376
+ :macroSources
377
+ macro-sources))))
378
+ (defun compile-string
379
+ (source filename)
380
+ (emit-module (compile-ir-string source filename)))
381
+ (defun compile-portable-ir-string
382
+ (source entries filename &optional macro-context)
383
+ (let*
384
+ ((read-forms (read-string source filename))
385
+ (expanded-forms (expand-module read-forms filename macro-context)))
386
+ (analyze-module expanded-forms filename)
387
+ (lower-module (select-portable-module expanded-forms entries filename) filename)))
388
+ (defun compile-project-portable-ir-string
389
+ (source entries filename &optional macro-context)
390
+ (let*
391
+ ((read-forms (read-string source filename))
392
+ (expanded-forms (expand-module read-forms filename macro-context)))
393
+ (analyze-module expanded-forms filename)
394
+ (lower-module (select-portable-module expanded-forms entries filename t) filename)))
395
+ (defun emit-ir-string (program) (emit-module program))
396
+ (defun serialize-ir-program (program) (serialize-program program))
397
+ (defun deserialize-ir-program (source) (deserialize-program source))
398
+ (defun emit-ir-string-with-source-map
399
+ (program source generated-name source-name)
400
+ (emit-module-with-source-map program source generated-name source-name))
401
+ (defun compile-portable-string
402
+ (source entries filename)
403
+ (emit-module (compile-portable-ir-string source entries filename)))
404
+ (defun compile-portable-string-with-source-map
405
+ (source entries filename generated-name source-name)
406
+ (emit-module-with-source-map
407
+ (compile-portable-ir-string source entries filename)
408
+ source
409
+ generated-name
410
+ (or source-name filename "<string>")))
411
+ (defun compile-string-with-source-map
412
+ (source filename generated-name source-name)
413
+ (emit-module-with-source-map
414
+ (compile-ir-string source filename)
415
+ source
416
+ generated-name
417
+ (or source-name filename "<string>")))
418
+ (export
419
+ compile-ir-string
420
+ compile-project-portable-ir-string
421
+ compile-string
422
+ compile-portable-ir-string
423
+ compile-portable-string
424
+ compile-portable-string-with-source-map
425
+ compile-string-with-source-map
426
+ emit-ir-string
427
+ emit-ir-string-with-source-map
428
+ serialize-ir-program
429
+ deserialize-ir-program
430
+ evaluation-operation-format
431
+ evaluation-operation-version
432
+ evaluation-operation-request
433
+ evaluation-input-format
434
+ evaluation-input-version
435
+ evaluation-input-description
436
+ evaluation-form-format
437
+ evaluation-form-version
438
+ evaluation-form-description
439
+ evaluation-module-format
440
+ evaluation-module-version
441
+ evaluation-module-description
442
+ formatter-format
443
+ formatter-version
444
+ formatter-width
445
+ formatter-indent
446
+ format-source
447
+ ir-format
448
+ ir-version
449
+ project-plan-format
450
+ project-plan-version
451
+ project-plan
452
+ portable-project-plan
453
+ project-build-report-format
454
+ project-build-report-version
455
+ project-build-report
456
+ project-request-format
457
+ project-request-version
458
+ project-request
459
+ project-configuration
460
+ build-operation-format
461
+ build-operation-version
462
+ build-operation-request
463
+ check-operation-format
464
+ check-operation-version
465
+ check-operation-request
466
+ project-check-report-format
467
+ project-check-report-version
468
+ project-check-report
469
+ project-cache-format
470
+ project-cache-version
471
+ project-cache-lookup
472
+ project-cache-decision))