eliscript 0.0.3 → 0.1.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/README.md +6 -6
- package/bootstrap/README.md +13 -8
- package/bootstrap/host/build.eli +2 -0
- package/bootstrap/host/bun.eli +2 -0
- package/bootstrap/host/check-cli-legacy.eli +2 -0
- package/bootstrap/host/evaluation-cli.eli +2 -0
- package/bootstrap/host/evaluation.eli +2 -0
- package/bootstrap/host/format-cli.eli +2 -0
- package/bootstrap/host/project-cli-legacy.eli +2 -0
- package/bootstrap/host/project-legacy.eli +2 -0
- package/bootstrap/host/watch-cli.eli +2 -0
- package/bootstrap/host/watch.eli +2 -0
- package/browser/README.md +33 -0
- package/browser/host.eli +2 -0
- package/browser/worker.eli +2 -0
- package/editor/eliscript-abi.el +170 -0
- package/editor/eliscript-async.el +375 -0
- package/editor/eliscript-bind.el +822 -0
- package/editor/eliscript-compat.el +184 -0
- package/editor/eliscript-contract.el +334 -0
- package/editor/eliscript-data.el +1544 -0
- package/editor/eliscript-js.el +318 -0
- package/editor/eliscript-mode.el +1 -1
- package/editor/eliscript-module.el +340 -0
- package/editor/eliscript-repl.el +1 -1
- package/package.json +4 -1
- package/platform/README.md +33 -12
- package/platform/browser.eli +2 -0
- package/platform/http.eli +2 -0
- package/platform/worker.eli +2 -0
- package/runtime/README.md +34 -14
- package/runtime/array-text.eli +2 -0
- package/runtime/core/collection-internals.eli +2 -0
- package/runtime/core/collection.eli +2 -0
- package/runtime/core/collection.mjs +99 -17
- package/runtime/core/data-text.eli +2 -0
- package/runtime/core/data.eli +2 -0
- package/runtime/core/data.mjs +7 -5
- package/runtime/core/identifier.eli +2 -0
- package/runtime/core/lazy-sequence.eli +2 -0
- package/runtime/core/list-internals.eli +2 -0
- package/runtime/core/list.eli +2 -0
- package/runtime/core/list.mjs +3 -0
- package/runtime/core/map-internals.eli +2 -0
- package/runtime/core/map.eli +2 -0
- package/runtime/core/map.mjs +5 -0
- package/runtime/core/metadata-internals.eli +2 -0
- package/runtime/core/metadata.eli +2 -0
- package/runtime/core/metadata.mjs +14 -0
- package/runtime/core/object.eli +2 -0
- package/runtime/core/order.eli +2 -0
- package/runtime/core/order.mjs +35 -6
- package/runtime/core/persistent-kind.eli +2 -0
- package/runtime/core/persistent-kind.mjs +6 -0
- package/runtime/core/protocol-error.eli +2 -0
- package/runtime/core/protocol.eli +2 -0
- package/runtime/core/queue-internals.eli +2 -0
- package/runtime/core/queue.eli +2 -0
- package/runtime/core/queue.mjs +3 -0
- package/runtime/core/record.eli +2 -0
- package/runtime/core/regex.eli +2 -0
- package/runtime/core/sequence.eli +2 -0
- package/runtime/core/sequence.mjs +75 -13
- package/runtime/core/set-algebra.eli +2 -0
- package/runtime/core/set-internals.eli +2 -0
- package/runtime/core/set.eli +2 -0
- package/runtime/core/sorted-internals.eli +2 -0
- package/runtime/core/sorted.eli +2 -0
- package/runtime/core/text.eli +2 -0
- package/runtime/core/transducer.eli +2 -0
- package/runtime/core/transient-internals.eli +2 -0
- package/runtime/core/transient.eli +2 -0
- package/runtime/core/transient.mjs +59 -10
- package/runtime/core/truth.eli +2 -0
- package/runtime/core/type.eli +2 -0
- package/runtime/core/value-internals.eli +2 -0
- package/runtime/core/value.eli +2 -0
- package/runtime/core/vector-internals.eli +2 -0
- package/runtime/core/vector-internals.mjs +3 -6
- package/runtime/core/vector.eli +2 -0
- package/runtime/core/vector.mjs +125 -7
- package/runtime/emacs-compat.eli +2 -0
- package/runtime/emacs-compat.mjs +2507 -0
- package/runtime/literals.eli +2 -0
- package/runtime/number-radix.eli +2 -0
- package/runtime/source-mapping.eli +2 -0
- package/runtime/testing/list.eli +2 -0
- package/runtime/testing/map.eli +2 -0
- package/runtime/testing/queue.eli +2 -0
- package/runtime/testing/set.eli +2 -0
- package/runtime/testing/sorted.eli +2 -0
- package/runtime/testing/value.eli +2 -0
- package/runtime/testing/vector.eli +2 -0
- package/runtime/wire/http-rpc.eli +2 -0
- package/runtime/wire/markdown.eli +2 -0
- package/runtime/wire/schema.eli +2 -0
- package/runtime/worker-value-codec.eli +2 -0
- package/runtime/worker-value-stream.eli +2 -0
- package/runtime/worker.eli +2 -0
- package/stdlib/README.md +2 -2
- package/stdlib/core/order.eli +36 -10
- package/stdlib/core/seq.eli +104 -75
- package/stdlib/core/zipper.eli +238 -98
- package/stdlib/managed-literal-protocols.eli +5 -5
- package/stdlib/managed-runtime-order.eli +32 -10
- package/stdlib/managed-runtime-sequence.eli +69 -28
- package/tools/acceptance/check.eli +13 -3
- package/tools/backends/compiler-build.mjs +140 -140
|
@@ -258,7 +258,7 @@ async function read_compiler_source(path) {
|
|
|
258
258
|
}
|
|
259
259
|
async function compiler_source_names(source_root, directory) {
|
|
260
260
|
return ((await (readdir(resolve(source_root, directory))))["filter"](((name) => {
|
|
261
|
-
return (new (globalThis.RegExp)("^[a-z][a-z0-9-]*[.]eli$"))["test"](name);
|
|
261
|
+
return ((__eliscript_value_13) => (__eliscript_truthy(__eliscript_value_13) ? (((__eliscript_value_14, __eliscript_value_15) => (__eliscript_value_14 !== __eliscript_value_15))(directory, "bootstrap/host") || (name === "compiler-session.eli") || (name === "compiler-tools.eli")) : __eliscript_value_13))((new (globalThis.RegExp)("^[a-z][a-z0-9-]*[.]eli$"))["test"](name));
|
|
262
262
|
})))["sort"]();
|
|
263
263
|
}
|
|
264
264
|
async function loadCompilerSources(...arguments$) {
|
|
@@ -280,9 +280,9 @@ async function loadCompilerSources(...arguments$) {
|
|
|
280
280
|
((index = 0));
|
|
281
281
|
while (__eliscript_numeric_relation("<", index, ((entries) ?? []).length)) {
|
|
282
282
|
{
|
|
283
|
-
const
|
|
283
|
+
const __eliscript_value_16 = (entries)[index];
|
|
284
284
|
{
|
|
285
|
-
let name =
|
|
285
|
+
let name = __eliscript_value_16;
|
|
286
286
|
(records)["push"](({"id": ((group)[1] + (name)["slice"](0, -4) + ".mjs"), "filename": ((group)[2] + name)}));
|
|
287
287
|
}
|
|
288
288
|
}
|
|
@@ -325,16 +325,16 @@ function decodeCompilerBinary(value) {
|
|
|
325
325
|
} else {
|
|
326
326
|
if (__eliscript_truthy(Array.isArray(value))) {
|
|
327
327
|
{
|
|
328
|
-
const
|
|
328
|
+
const __eliscript_value_17 = 0;
|
|
329
329
|
{
|
|
330
|
-
let index =
|
|
330
|
+
let index = __eliscript_value_17;
|
|
331
331
|
while (__eliscript_numeric_relation("<", index, ((value) ?? []).length)) {
|
|
332
332
|
{
|
|
333
|
-
const
|
|
333
|
+
const __eliscript_value_18 = (value)[index];
|
|
334
334
|
{
|
|
335
|
-
let byte =
|
|
336
|
-
if ((!__eliscript_truthy(((
|
|
337
|
-
((
|
|
335
|
+
let byte = __eliscript_value_18;
|
|
336
|
+
if ((!__eliscript_truthy(((__eliscript_value_19) => (__eliscript_truthy(__eliscript_value_19) ? (__eliscript_numeric_relation(">=", byte, 0) && __eliscript_numeric_relation("<=", byte, 255)) : __eliscript_value_19))(Number.isInteger(byte))))) {
|
|
337
|
+
((__eliscript_value_20) => { throw __eliscript_value_20; })(new (globalThis.TypeError)("compiler binary contains an invalid byte"));
|
|
338
338
|
}
|
|
339
339
|
}
|
|
340
340
|
}
|
|
@@ -345,52 +345,52 @@ function decodeCompilerBinary(value) {
|
|
|
345
345
|
return (globalThis.Uint8Array)["from"](value);
|
|
346
346
|
} else {
|
|
347
347
|
if ((!((!(value === null)) && (((__eliscript_value) => { if (__eliscript_value === null) return "null"; const __eliscript_host_type = typeof __eliscript_value; if (__eliscript_host_type !== "object" && __eliscript_host_type !== "function") return __eliscript_host_type; try { const __eliscript_type = Object.getOwnPropertyDescriptor(__eliscript_value, Symbol.for("eliscript.value.type")); if (__eliscript_type && Object.prototype.hasOwnProperty.call(__eliscript_type, "value") && (__eliscript_type.value === "keyword" || __eliscript_type.value === "symbol")) return __eliscript_type.value; const __eliscript_kind = Object.getOwnPropertyDescriptor(__eliscript_value, "kind"); if (__eliscript_kind && Object.prototype.hasOwnProperty.call(__eliscript_kind, "value")) { if (__eliscript_kind.value === "eliscript/keyword") return "keyword"; if (__eliscript_kind.value === "eliscript/symbol") return "symbol"; } return __eliscript_host_type; } catch { return __eliscript_host_type; } })(value) === "object") && ((value)["encoding"] === "u16le-chunks")))) {
|
|
348
|
-
((
|
|
348
|
+
((__eliscript_value_21) => { throw __eliscript_value_21; })(new (globalThis.TypeError)("compiler binary has an unsupported encoding"));
|
|
349
349
|
}
|
|
350
350
|
{
|
|
351
|
-
const
|
|
352
|
-
const
|
|
353
|
-
const
|
|
351
|
+
const __eliscript_value_22 = (value)["byteLength"];
|
|
352
|
+
const __eliscript_value_23 = (value)["chunks"];
|
|
353
|
+
const __eliscript_value_24 = 0;
|
|
354
354
|
{
|
|
355
|
-
let byte_length =
|
|
356
|
-
let chunks =
|
|
357
|
-
let index =
|
|
358
|
-
if ((!__eliscript_truthy(((
|
|
359
|
-
((
|
|
355
|
+
let byte_length = __eliscript_value_22;
|
|
356
|
+
let chunks = __eliscript_value_23;
|
|
357
|
+
let index = __eliscript_value_24;
|
|
358
|
+
if ((!__eliscript_truthy(((__eliscript_value_25) => (__eliscript_truthy(__eliscript_value_25) ? ((__eliscript_value_26) => (__eliscript_truthy(__eliscript_value_26) ? ((__eliscript_value_27) => (__eliscript_truthy(__eliscript_value_27) ? ((__eliscript_value_28) => (__eliscript_truthy(__eliscript_value_28) ? (((chunks) ?? []).length === Math.ceil(__eliscript_numeric_div(byte_length, 4096))) : __eliscript_value_28))(Array.isArray(chunks)) : __eliscript_value_27))(__eliscript_numeric_relation("<=", byte_length, 4294967295)) : __eliscript_value_26))(__eliscript_numeric_relation(">=", byte_length, 0)) : __eliscript_value_25))(Number.isSafeInteger(byte_length))))) {
|
|
359
|
+
((__eliscript_value_29) => { throw __eliscript_value_29; })(new (globalThis.TypeError)("compiler binary has an invalid chunk layout"));
|
|
360
360
|
}
|
|
361
361
|
while (__eliscript_numeric_relation("<", index, ((chunks) ?? []).length)) {
|
|
362
362
|
{
|
|
363
|
-
const
|
|
364
|
-
const
|
|
363
|
+
const __eliscript_value_30 = (chunks)[index];
|
|
364
|
+
const __eliscript_value_31 = Math.min(4096, __eliscript_numeric_sub(byte_length, __eliscript_numeric_mul(index, 4096)));
|
|
365
365
|
{
|
|
366
|
-
let chunk =
|
|
367
|
-
let size =
|
|
366
|
+
let chunk = __eliscript_value_30;
|
|
367
|
+
let size = __eliscript_value_31;
|
|
368
368
|
if ((!((((__eliscript_value) => { if (__eliscript_value === null) return "null"; const __eliscript_host_type = typeof __eliscript_value; if (__eliscript_host_type !== "object" && __eliscript_host_type !== "function") return __eliscript_host_type; try { const __eliscript_type = Object.getOwnPropertyDescriptor(__eliscript_value, Symbol.for("eliscript.value.type")); if (__eliscript_type && Object.prototype.hasOwnProperty.call(__eliscript_type, "value") && (__eliscript_type.value === "keyword" || __eliscript_type.value === "symbol")) return __eliscript_type.value; const __eliscript_kind = Object.getOwnPropertyDescriptor(__eliscript_value, "kind"); if (__eliscript_kind && Object.prototype.hasOwnProperty.call(__eliscript_kind, "value")) { if (__eliscript_kind.value === "eliscript/keyword") return "keyword"; if (__eliscript_kind.value === "eliscript/symbol") return "symbol"; } return __eliscript_host_type; } catch { return __eliscript_host_type; } })(chunk) === "string") && (((chunk) ?? []).length === Math.ceil(__eliscript_numeric_div(size, 2))) && ((__eliscript_numeric_rem(size, 2) === 0) || __eliscript_numeric_relation("<=", (chunk)["charCodeAt"](__eliscript_numeric_decrement(((chunk) ?? []).length)), 255))))) {
|
|
369
|
-
((
|
|
369
|
+
((__eliscript_value_32) => { throw __eliscript_value_32; })(new (globalThis.TypeError)("compiler binary has a noncanonical chunk"));
|
|
370
370
|
}
|
|
371
371
|
}
|
|
372
372
|
}
|
|
373
373
|
((index = (index + 1)));
|
|
374
374
|
}
|
|
375
375
|
{
|
|
376
|
-
const
|
|
376
|
+
const __eliscript_value_33 = new (globalThis.Uint8Array)(byte_length);
|
|
377
377
|
{
|
|
378
|
-
let bytes =
|
|
378
|
+
let bytes = __eliscript_value_33;
|
|
379
379
|
((index = 0));
|
|
380
380
|
while (__eliscript_numeric_relation("<", index, ((chunks) ?? []).length)) {
|
|
381
381
|
{
|
|
382
|
-
const
|
|
383
|
-
const
|
|
382
|
+
const __eliscript_value_34 = (chunks)[index];
|
|
383
|
+
const __eliscript_value_35 = 0;
|
|
384
384
|
{
|
|
385
|
-
let chunk =
|
|
386
|
-
let unit =
|
|
385
|
+
let chunk = __eliscript_value_34;
|
|
386
|
+
let unit = __eliscript_value_35;
|
|
387
387
|
while (__eliscript_numeric_relation("<", unit, ((chunk) ?? []).length)) {
|
|
388
388
|
{
|
|
389
|
-
const
|
|
390
|
-
const
|
|
389
|
+
const __eliscript_value_36 = (chunk)["charCodeAt"](unit);
|
|
390
|
+
const __eliscript_value_37 = (__eliscript_numeric_mul(index, 4096) + __eliscript_numeric_mul(unit, 2));
|
|
391
391
|
{
|
|
392
|
-
let word =
|
|
393
|
-
let at =
|
|
392
|
+
let word = __eliscript_value_36;
|
|
393
|
+
let at = __eliscript_value_37;
|
|
394
394
|
((bytes)[at] = __eliscript_numeric_and(word, 255));
|
|
395
395
|
if (__eliscript_numeric_relation("<", (at + 1), byte_length)) {
|
|
396
396
|
((bytes)[(at + 1)] = __eliscript_numeric_ushr(word, 8));
|
|
@@ -414,7 +414,7 @@ function decodeCompilerBinary(value) {
|
|
|
414
414
|
async function write_module(directory, id, javascript) {
|
|
415
415
|
return (await (async (path) => {
|
|
416
416
|
if ((!__eliscript_truthy((path)["startsWith"]((resolve(directory) + sep))))) {
|
|
417
|
-
((
|
|
417
|
+
((__eliscript_value_38) => { throw __eliscript_value_38; })(new (globalThis.TypeError)("compiler module escapes output directory"));
|
|
418
418
|
}
|
|
419
419
|
await (mkdir(dirname(path), ({"recursive": true})));
|
|
420
420
|
await (writeFile(path, javascript));
|
|
@@ -429,7 +429,7 @@ async function write_compiler_math_scope(directory) {
|
|
|
429
429
|
try {
|
|
430
430
|
return await (writeFile(path, text, ({"flag": "wx"})));
|
|
431
431
|
} catch (error) {
|
|
432
|
-
return ((!(await (async (
|
|
432
|
+
return ((!(await (async (__eliscript_value_39) => (__eliscript_truthy(__eliscript_value_39) ? (await (readFile(path, "utf8")) === text) : __eliscript_value_39))(((error)["code"] === "EEXIST")))) ? ((__eliscript_value_40) => { throw __eliscript_value_40; })(error) : null);
|
|
433
433
|
}
|
|
434
434
|
})());
|
|
435
435
|
return path;
|
|
@@ -446,7 +446,7 @@ async function write_compiler_seed_scope(directory) {
|
|
|
446
446
|
try {
|
|
447
447
|
return await (writeFile(path, text, ({"flag": "wx"})));
|
|
448
448
|
} catch (error) {
|
|
449
|
-
return ((!(await (async (
|
|
449
|
+
return ((!(await (async (__eliscript_value_41) => (__eliscript_truthy(__eliscript_value_41) ? (await (readFile(path, "utf8")) === text) : __eliscript_value_41))(((error)["code"] === "EEXIST")))) ? ((__eliscript_value_42) => { throw __eliscript_value_42; })(error) : null);
|
|
450
450
|
}
|
|
451
451
|
})());
|
|
452
452
|
return path;
|
|
@@ -461,15 +461,15 @@ function target_for_host(host) {
|
|
|
461
461
|
if (((host === "wasm") || (host === "native"))) {
|
|
462
462
|
return host;
|
|
463
463
|
} else {
|
|
464
|
-
return ((
|
|
464
|
+
return ((__eliscript_value_43) => { throw __eliscript_value_43; })(new (globalThis.TypeError)(("unknown compiler host: " + host)));
|
|
465
465
|
}
|
|
466
466
|
}
|
|
467
467
|
}
|
|
468
468
|
function compiler_metadata_utf8_block(encoder, bytes, text, start) {
|
|
469
469
|
{
|
|
470
|
-
const
|
|
470
|
+
const __eliscript_value_44 = Math.min((start + 65536), ((text) ?? []).length);
|
|
471
471
|
{
|
|
472
|
-
let end =
|
|
472
|
+
let end = __eliscript_value_44;
|
|
473
473
|
if ((__eliscript_numeric_relation("<", end, ((text) ?? []).length) && __eliscript_numeric_relation(">=", (text)["charCodeAt"](__eliscript_numeric_decrement(end)), 55296) && __eliscript_numeric_relation("<=", (text)["charCodeAt"](__eliscript_numeric_decrement(end)), 56319) && __eliscript_numeric_relation(">=", (text)["charCodeAt"](end), 56320) && __eliscript_numeric_relation("<=", (text)["charCodeAt"](end), 57343))) {
|
|
474
474
|
((end = __eliscript_numeric_decrement(end)));
|
|
475
475
|
}
|
|
@@ -477,11 +477,11 @@ function compiler_metadata_utf8_block(encoder, bytes, text, start) {
|
|
|
477
477
|
return ({"read": 0, "written": 0});
|
|
478
478
|
} else {
|
|
479
479
|
{
|
|
480
|
-
const
|
|
480
|
+
const __eliscript_value_45 = (encoder)["encodeInto"]((text)["slice"](start, end), bytes);
|
|
481
481
|
{
|
|
482
|
-
let result =
|
|
483
|
-
if ((!__eliscript_truthy(((
|
|
484
|
-
((
|
|
482
|
+
let result = __eliscript_value_45;
|
|
483
|
+
if ((!__eliscript_truthy(((__eliscript_value_46) => (__eliscript_truthy(__eliscript_value_46) ? ((__eliscript_value_47) => (__eliscript_truthy(__eliscript_value_47) ? ((__eliscript_value_48) => (__eliscript_truthy(__eliscript_value_48) ? ((__eliscript_value_49) => (__eliscript_truthy(__eliscript_value_49) ? (__eliscript_numeric_relation(">=", (result)["written"], 1) && __eliscript_numeric_relation("<=", (result)["written"], ((bytes) ?? []).length)) : __eliscript_value_49))(Number.isInteger((result)["written"])) : __eliscript_value_48))(__eliscript_numeric_relation("<=", (result)["read"], __eliscript_numeric_sub(end, start))) : __eliscript_value_47))(__eliscript_numeric_relation(">=", (result)["read"], 1)) : __eliscript_value_46))(Number.isInteger((result)["read"]))))) {
|
|
484
|
+
((__eliscript_value_50) => { throw __eliscript_value_50; })(new (globalThis.Error)("compiler metadata UTF8 encoding did not advance"));
|
|
485
485
|
}
|
|
486
486
|
return result;
|
|
487
487
|
}
|
|
@@ -492,23 +492,23 @@ function compiler_metadata_utf8_block(encoder, bytes, text, start) {
|
|
|
492
492
|
}
|
|
493
493
|
function compilerMetadataDigest(value) {
|
|
494
494
|
{
|
|
495
|
-
const
|
|
496
|
-
const
|
|
497
|
-
const
|
|
495
|
+
const __eliscript_value_51 = createHash("sha256");
|
|
496
|
+
const __eliscript_value_52 = new (globalThis.TextEncoder)();
|
|
497
|
+
const __eliscript_value_53 = new (globalThis.Uint8Array)(65536);
|
|
498
498
|
{
|
|
499
|
-
let hash =
|
|
500
|
-
let encoder =
|
|
501
|
-
let bytes =
|
|
499
|
+
let hash = __eliscript_value_51;
|
|
500
|
+
let encoder = __eliscript_value_52;
|
|
501
|
+
let bytes = __eliscript_value_53;
|
|
502
502
|
forEachCompilerMetadataChunk(value, ((chunk) => {
|
|
503
503
|
{
|
|
504
|
-
const
|
|
504
|
+
const __eliscript_value_54 = 0;
|
|
505
505
|
{
|
|
506
|
-
let start =
|
|
506
|
+
let start = __eliscript_value_54;
|
|
507
507
|
while (__eliscript_numeric_relation("<", start, ((chunk) ?? []).length)) {
|
|
508
508
|
{
|
|
509
|
-
const
|
|
509
|
+
const __eliscript_value_55 = compiler_metadata_utf8_block(encoder, bytes, chunk, start);
|
|
510
510
|
{
|
|
511
|
-
let result =
|
|
511
|
+
let result = __eliscript_value_55;
|
|
512
512
|
(hash)["update"]((bytes)["subarray"](0, (result)["written"]));
|
|
513
513
|
((start = (start + (result)["read"])));
|
|
514
514
|
}
|
|
@@ -534,8 +534,8 @@ async function compiler_file_identity(path, buffer) {
|
|
|
534
534
|
(await (async () => {
|
|
535
535
|
while ((!__eliscript_truthy(done))) {
|
|
536
536
|
((count) => {
|
|
537
|
-
if ((!__eliscript_truthy(((
|
|
538
|
-
((
|
|
537
|
+
if ((!__eliscript_truthy(((__eliscript_value_56) => (__eliscript_truthy(__eliscript_value_56) ? (__eliscript_numeric_relation(">=", count, 0) && __eliscript_numeric_relation("<=", count, ((buffer) ?? []).length)) : __eliscript_value_56))(Number.isInteger(count))))) {
|
|
538
|
+
((__eliscript_value_57) => { throw __eliscript_value_57; })(new (globalThis.Error)("compiler artifact read returned an invalid byte count"));
|
|
539
539
|
}
|
|
540
540
|
if ((count === 0)) {
|
|
541
541
|
return ((done = true));
|
|
@@ -551,14 +551,14 @@ async function compiler_file_identity(path, buffer) {
|
|
|
551
551
|
})());
|
|
552
552
|
} catch (error) {
|
|
553
553
|
((failed = true));
|
|
554
|
-
return ((
|
|
554
|
+
return ((__eliscript_value_58) => { throw __eliscript_value_58; })(error);
|
|
555
555
|
} finally {
|
|
556
556
|
(await (async () => {
|
|
557
557
|
try {
|
|
558
558
|
return await ((file)["close"]());
|
|
559
559
|
} catch (error) {
|
|
560
560
|
if ((!__eliscript_truthy(failed))) {
|
|
561
|
-
return ((
|
|
561
|
+
return ((__eliscript_value_59) => { throw __eliscript_value_59; })(error);
|
|
562
562
|
} else {
|
|
563
563
|
return null;
|
|
564
564
|
}
|
|
@@ -594,8 +594,8 @@ async function writeCompilerMetadata(path, value, options = null) {
|
|
|
594
594
|
(await (async () => {
|
|
595
595
|
while (__eliscript_numeric_relation("<", offset, written)) {
|
|
596
596
|
((count) => {
|
|
597
|
-
if ((!__eliscript_truthy(((
|
|
598
|
-
((
|
|
597
|
+
if ((!__eliscript_truthy(((__eliscript_value_60) => (__eliscript_truthy(__eliscript_value_60) ? (__eliscript_numeric_relation(">=", count, 1) && __eliscript_numeric_relation("<=", count, __eliscript_numeric_sub(written, offset))) : __eliscript_value_60))(Number.isInteger(count))))) {
|
|
598
|
+
((__eliscript_value_61) => { throw __eliscript_value_61; })(new (globalThis.Error)("compiler metadata write did not advance"));
|
|
599
599
|
}
|
|
600
600
|
return ((offset = (offset + count)));
|
|
601
601
|
})((await ((file)["write"](bytes, offset, __eliscript_numeric_sub(written, offset), null)))["bytesWritten"]);
|
|
@@ -620,14 +620,14 @@ async function writeCompilerMetadata(path, value, options = null) {
|
|
|
620
620
|
})(new (globalThis.TextEncoder)(), new (globalThis.Uint8Array)(65536), 0));
|
|
621
621
|
} catch (error) {
|
|
622
622
|
((failed = true));
|
|
623
|
-
return ((
|
|
623
|
+
return ((__eliscript_value_62) => { throw __eliscript_value_62; })(error);
|
|
624
624
|
} finally {
|
|
625
625
|
(await (async () => {
|
|
626
626
|
try {
|
|
627
627
|
return await ((file)["close"]());
|
|
628
628
|
} catch (error) {
|
|
629
629
|
if ((!__eliscript_truthy(failed))) {
|
|
630
|
-
return ((
|
|
630
|
+
return ((__eliscript_value_63) => { throw __eliscript_value_63; })(error);
|
|
631
631
|
} else {
|
|
632
632
|
return null;
|
|
633
633
|
}
|
|
@@ -647,9 +647,9 @@ async function write_owned_compiler_metadata(path, value) {
|
|
|
647
647
|
let bytes = new (globalThis.Uint8Array)(65536);
|
|
648
648
|
let consume = ((chunk) => {
|
|
649
649
|
{
|
|
650
|
-
const
|
|
650
|
+
const __eliscript_value_64 = 0;
|
|
651
651
|
{
|
|
652
|
-
let start =
|
|
652
|
+
let start = __eliscript_value_64;
|
|
653
653
|
while (__eliscript_numeric_relation("<", start, ((chunk) ?? []).length)) {
|
|
654
654
|
{
|
|
655
655
|
let result = compiler_metadata_utf8_block(encoder, bytes, chunk, start);
|
|
@@ -657,11 +657,11 @@ async function write_owned_compiler_metadata(path, value) {
|
|
|
657
657
|
let offset = 0;
|
|
658
658
|
while (__eliscript_numeric_relation("<", offset, written)) {
|
|
659
659
|
{
|
|
660
|
-
const
|
|
660
|
+
const __eliscript_value_65 = writeSync((file)["fd"], bytes, offset, __eliscript_numeric_sub(written, offset));
|
|
661
661
|
{
|
|
662
|
-
let count =
|
|
663
|
-
if ((!__eliscript_truthy(((
|
|
664
|
-
((
|
|
662
|
+
let count = __eliscript_value_65;
|
|
663
|
+
if ((!__eliscript_truthy(((__eliscript_value_66) => (__eliscript_truthy(__eliscript_value_66) ? (__eliscript_numeric_relation(">=", count, 1) && __eliscript_numeric_relation("<=", count, __eliscript_numeric_sub(written, offset))) : __eliscript_value_66))(Number.isInteger(count))))) {
|
|
664
|
+
((__eliscript_value_67) => { throw __eliscript_value_67; })(new (globalThis.Error)("compiler metadata write did not advance"));
|
|
665
665
|
}
|
|
666
666
|
((offset = (offset + count)));
|
|
667
667
|
}
|
|
@@ -680,14 +680,14 @@ async function write_owned_compiler_metadata(path, value) {
|
|
|
680
680
|
}
|
|
681
681
|
} catch (error) {
|
|
682
682
|
((failed = true));
|
|
683
|
-
return ((
|
|
683
|
+
return ((__eliscript_value_68) => { throw __eliscript_value_68; })(error);
|
|
684
684
|
} finally {
|
|
685
685
|
(await (async () => {
|
|
686
686
|
try {
|
|
687
687
|
return await ((file)["close"]());
|
|
688
688
|
} catch (error) {
|
|
689
689
|
if ((!__eliscript_truthy(failed))) {
|
|
690
|
-
return ((
|
|
690
|
+
return ((__eliscript_value_69) => { throw __eliscript_value_69; })(error);
|
|
691
691
|
} else {
|
|
692
692
|
return null;
|
|
693
693
|
}
|
|
@@ -731,17 +731,17 @@ function independentCompilerProductIdentity(input) {
|
|
|
731
731
|
}
|
|
732
732
|
function seed_javascript_product(sources, compiler, debug) {
|
|
733
733
|
{
|
|
734
|
-
const
|
|
735
|
-
const
|
|
736
|
-
const
|
|
737
|
-
const
|
|
738
|
-
const
|
|
734
|
+
const __eliscript_value_70 = [];
|
|
735
|
+
const __eliscript_value_71 = false;
|
|
736
|
+
const __eliscript_value_72 = undefined;
|
|
737
|
+
const __eliscript_value_73 = 0;
|
|
738
|
+
const __eliscript_value_74 = (sources)["modules"];
|
|
739
739
|
{
|
|
740
|
-
let modules =
|
|
741
|
-
let failed =
|
|
742
|
-
let failure =
|
|
743
|
-
let index =
|
|
744
|
-
let records =
|
|
740
|
+
let modules = __eliscript_value_70;
|
|
741
|
+
let failed = __eliscript_value_71;
|
|
742
|
+
let failure = __eliscript_value_72;
|
|
743
|
+
let index = __eliscript_value_73;
|
|
744
|
+
let records = __eliscript_value_74;
|
|
745
745
|
while (__eliscript_numeric_relation("<", index, ((records) ?? []).length)) {
|
|
746
746
|
{
|
|
747
747
|
let record = (records)[index];
|
|
@@ -749,9 +749,9 @@ function seed_javascript_product(sources, compiler, debug) {
|
|
|
749
749
|
let origins = undefined;
|
|
750
750
|
if (__eliscript_truthy(build_truth(debug))) {
|
|
751
751
|
{
|
|
752
|
-
const
|
|
752
|
+
const __eliscript_value_75 = (compiler)["compile_ir_string_with_origins"]((record)["source"], build_nullish((record)["filename"], (record)["id"]));
|
|
753
753
|
{
|
|
754
|
-
let expansion =
|
|
754
|
+
let expansion = __eliscript_value_75;
|
|
755
755
|
((program = (expansion)["program"]));
|
|
756
756
|
((origins = (expansion)["macroOrigins"]));
|
|
757
757
|
}
|
|
@@ -780,9 +780,9 @@ function seed_javascript_product(sources, compiler, debug) {
|
|
|
780
780
|
((index = (index + 1)));
|
|
781
781
|
}
|
|
782
782
|
{
|
|
783
|
-
const
|
|
783
|
+
const __eliscript_value_76 = (sources)["runtime"];
|
|
784
784
|
{
|
|
785
|
-
let runtime =
|
|
785
|
+
let runtime = __eliscript_value_76;
|
|
786
786
|
if (__eliscript_truthy(build_truth(debug))) {
|
|
787
787
|
(compiler)["compile_ir_string_with_origins"]((runtime)["source"], (runtime)["filename"]);
|
|
788
788
|
} else {
|
|
@@ -791,7 +791,7 @@ function seed_javascript_product(sources, compiler, debug) {
|
|
|
791
791
|
}
|
|
792
792
|
}
|
|
793
793
|
if (__eliscript_truthy(failed)) {
|
|
794
|
-
((
|
|
794
|
+
((__eliscript_value_77) => { throw __eliscript_value_77; })(failure);
|
|
795
795
|
}
|
|
796
796
|
return ({"target": "javascript", "modules": modules});
|
|
797
797
|
}
|
|
@@ -818,9 +818,9 @@ async function seed_product(sources, host, directory, frontend, memory, native_t
|
|
|
818
818
|
if (((frontend === undefined) && (host === "javascript") && (!__eliscript_truthy(build_truth(retain_ir))))) {
|
|
819
819
|
phase("seed-javascript-start");
|
|
820
820
|
{
|
|
821
|
-
const
|
|
821
|
+
const __eliscript_value_78 = seed_javascript_product(sources, compiler, debug);
|
|
822
822
|
{
|
|
823
|
-
let product =
|
|
823
|
+
let product = __eliscript_value_78;
|
|
824
824
|
phase("seed-javascript-complete");
|
|
825
825
|
return product;
|
|
826
826
|
}
|
|
@@ -838,14 +838,14 @@ async function seed_product(sources, host, directory, frontend, memory, native_t
|
|
|
838
838
|
let runtime_source = (sources)["runtime"];
|
|
839
839
|
let runtime_emission = (__eliscript_truthy(build_truth(debug)) ? (compiler)["compile_ir_string_with_origins"]((runtime_source)["source"], (runtime_source)["filename"]) : undefined);
|
|
840
840
|
let runtime = ((build_optional_get(runtime_emission, "program") == null) ? (compiler)["compile_ir_string"]((runtime_source)["source"], (runtime_source)["filename"]) : (runtime_emission)["program"]);
|
|
841
|
-
let literal_modules = (__eliscript_truthy(((
|
|
841
|
+
let literal_modules = (__eliscript_truthy(((__eliscript_value_79) => (__eliscript_truthy(__eliscript_value_79) ? __eliscript_value_79 : build_truth(retain_ir)))((!(host === "javascript")))) ? (build_nullish((sources)["literalSources"], []))["map"](((record) => {
|
|
842
842
|
if ((!__eliscript_truthy(build_truth(debug)))) {
|
|
843
843
|
return ({"id": (record)["id"], "program": (compiler)["compile_ir_string"]((record)["source"], (record)["filename"])});
|
|
844
844
|
} else {
|
|
845
845
|
{
|
|
846
|
-
const
|
|
846
|
+
const __eliscript_value_80 = (compiler)["compile_ir_string_with_origins"]((record)["source"], (record)["filename"]);
|
|
847
847
|
{
|
|
848
|
-
let emission =
|
|
848
|
+
let emission = __eliscript_value_80;
|
|
849
849
|
(origins)["set"]((record)["id"], (emission)["macroOrigins"]);
|
|
850
850
|
return ({"id": (record)["id"], "program": (emission)["program"]});
|
|
851
851
|
}
|
|
@@ -862,7 +862,7 @@ async function seed_product(sources, host, directory, frontend, memory, native_t
|
|
|
862
862
|
((runtime_emission = null));
|
|
863
863
|
}
|
|
864
864
|
{
|
|
865
|
-
const
|
|
865
|
+
const __eliscript_value_81 = ({"target": "javascript", "modules": (modules)["map"](((record, index) => {
|
|
866
866
|
{
|
|
867
867
|
let source = ((sources)["modules"])[index];
|
|
868
868
|
let emission = (__eliscript_truthy(build_truth(debug)) ? (compiler)["emit_ir_string_with_source_map"]((record)["program"], (source)["source"], (record)["id"], (source)["filename"]) : ({"javascript": (compiler)["emit_ir_string"]((record)["program"])}));
|
|
@@ -877,7 +877,7 @@ async function seed_product(sources, host, directory, frontend, memory, native_t
|
|
|
877
877
|
}
|
|
878
878
|
}))});
|
|
879
879
|
{
|
|
880
|
-
let product =
|
|
880
|
+
let product = __eliscript_value_81;
|
|
881
881
|
if (__eliscript_truthy(build_truth(retain_ir))) {
|
|
882
882
|
compiler_retain_ir(product, compiler, modules, runtime, literal_ir);
|
|
883
883
|
}
|
|
@@ -898,7 +898,7 @@ async function seed_product(sources, host, directory, frontend, memory, native_t
|
|
|
898
898
|
});
|
|
899
899
|
phase("seed-managed-lower-start");
|
|
900
900
|
{
|
|
901
|
-
const
|
|
901
|
+
const __eliscript_value_82 = ((host === "wasm") ? ((backend)["wasm"])["emit_managed_project_wasm_product"](modules, (sources)["entry"], runtime, lower_options, (() => {
|
|
902
902
|
if ((!__eliscript_truthy(build_truth(retain_ir)))) {
|
|
903
903
|
release_programs();
|
|
904
904
|
}
|
|
@@ -907,7 +907,7 @@ async function seed_product(sources, host, directory, frontend, memory, native_t
|
|
|
907
907
|
return ({"memory": ({...((memory) ?? {}), ["binaryEncoding"]: "u16le-chunks"}), "debug": debug});
|
|
908
908
|
})) : ((backend)["managed"])["lower_managed_project"](modules, (sources)["entry"], runtime, lower_options));
|
|
909
909
|
{
|
|
910
|
-
let lowered =
|
|
910
|
+
let lowered = __eliscript_value_82;
|
|
911
911
|
if ((!__eliscript_truthy(build_truth(retain_ir)))) {
|
|
912
912
|
release_programs();
|
|
913
913
|
}
|
|
@@ -934,9 +934,9 @@ async function seed_product(sources, host, directory, frontend, memory, native_t
|
|
|
934
934
|
}
|
|
935
935
|
}
|
|
936
936
|
{
|
|
937
|
-
const
|
|
937
|
+
const __eliscript_value_83 = ({"target": target_for_host(host), "bytes": bytes, "descriptor": (lowered)["descriptor"]});
|
|
938
938
|
{
|
|
939
|
-
let product =
|
|
939
|
+
let product = __eliscript_value_83;
|
|
940
940
|
if ((host === "native")) {
|
|
941
941
|
((product)["typed"] = (lowered)["typed"]);
|
|
942
942
|
}
|
|
@@ -981,9 +981,9 @@ function compiler_portable_path(directory, path) {
|
|
|
981
981
|
}
|
|
982
982
|
function compiler_portable_ir_record(directory, record) {
|
|
983
983
|
{
|
|
984
|
-
const
|
|
984
|
+
const __eliscript_value_84 = build_copy_properties(({}), record);
|
|
985
985
|
{
|
|
986
|
-
let output =
|
|
986
|
+
let output = __eliscript_value_84;
|
|
987
987
|
((output)["path"] = compiler_portable_path(directory, (record)["path"]));
|
|
988
988
|
((output)["canonicalPath"] = compiler_portable_path(directory, (record)["canonicalPath"]));
|
|
989
989
|
return output;
|
|
@@ -992,9 +992,9 @@ function compiler_portable_ir_record(directory, record) {
|
|
|
992
992
|
}
|
|
993
993
|
function compiler_artifact_metadata(artifact, directory) {
|
|
994
994
|
{
|
|
995
|
-
const
|
|
995
|
+
const __eliscript_value_85 = build_copy_properties(({}), artifact, ["bytes", "lowered", "load", "directory", "url", "metadataPath"]);
|
|
996
996
|
{
|
|
997
|
-
let metadata =
|
|
997
|
+
let metadata = __eliscript_value_85;
|
|
998
998
|
((metadata)["path"] = compiler_portable_path(directory, (artifact)["path"]));
|
|
999
999
|
((metadata)["runtimePath"] = compiler_portable_path(directory, (artifact)["runtimePath"]));
|
|
1000
1000
|
if (__eliscript_truthy(build_truth((artifact)["debugPath"]))) {
|
|
@@ -1013,9 +1013,9 @@ function compiler_artifact_metadata(artifact, directory) {
|
|
|
1013
1013
|
if (__eliscript_truthy(build_truth((artifact)["modules"]))) {
|
|
1014
1014
|
((metadata)["modules"] = ((artifact)["modules"])["map"](((record) => {
|
|
1015
1015
|
{
|
|
1016
|
-
const
|
|
1016
|
+
const __eliscript_value_86 = ({"id": (record)["id"], "path": compiler_portable_path(directory, (record)["path"])});
|
|
1017
1017
|
{
|
|
1018
|
-
let output =
|
|
1018
|
+
let output = __eliscript_value_86;
|
|
1019
1019
|
if (__eliscript_truthy(build_truth((record)["sourceMapPath"]))) {
|
|
1020
1020
|
((output)["sourceMapPath"] = compiler_portable_path(directory, (record)["sourceMapPath"]));
|
|
1021
1021
|
}
|
|
@@ -1066,7 +1066,7 @@ async function compiler_runtime_ir_checkpoint(producer, graph, ready, directory,
|
|
|
1066
1066
|
Reflect.deleteProperty(identity, "modules");
|
|
1067
1067
|
(await (async (record) => {
|
|
1068
1068
|
if ((!((build_optional_get(record, "id") === "runtime") && (((__eliscript_value) => { if (__eliscript_value === null) return "null"; const __eliscript_host_type = typeof __eliscript_value; if (__eliscript_host_type !== "object" && __eliscript_host_type !== "function") return __eliscript_host_type; try { const __eliscript_type = Object.getOwnPropertyDescriptor(__eliscript_value, Symbol.for("eliscript.value.type")); if (__eliscript_type && Object.prototype.hasOwnProperty.call(__eliscript_type, "value") && (__eliscript_type.value === "keyword" || __eliscript_type.value === "symbol")) return __eliscript_type.value; const __eliscript_kind = Object.getOwnPropertyDescriptor(__eliscript_value, "kind"); if (__eliscript_kind && Object.prototype.hasOwnProperty.call(__eliscript_kind, "value")) { if (__eliscript_kind.value === "eliscript/keyword") return "keyword"; if (__eliscript_kind.value === "eliscript/symbol") return "symbol"; } return __eliscript_host_type; } catch { return __eliscript_host_type; } })((record)["ir"]) === "string") && (((__eliscript_value) => { if (__eliscript_value === null) return "null"; const __eliscript_host_type = typeof __eliscript_value; if (__eliscript_host_type !== "object" && __eliscript_host_type !== "function") return __eliscript_host_type; try { const __eliscript_type = Object.getOwnPropertyDescriptor(__eliscript_value, Symbol.for("eliscript.value.type")); if (__eliscript_type && Object.prototype.hasOwnProperty.call(__eliscript_type, "value") && (__eliscript_type.value === "keyword" || __eliscript_type.value === "symbol")) return __eliscript_type.value; const __eliscript_kind = Object.getOwnPropertyDescriptor(__eliscript_value, "kind"); if (__eliscript_kind && Object.prototype.hasOwnProperty.call(__eliscript_kind, "value")) { if (__eliscript_kind.value === "eliscript/keyword") return "keyword"; if (__eliscript_kind.value === "eliscript/symbol") return "symbol"; } return __eliscript_host_type; } catch { return __eliscript_host_type; } })((record)["canonicalIR"]) === "string")))) {
|
|
1069
|
-
((
|
|
1069
|
+
((__eliscript_value_87) => { throw __eliscript_value_87; })(new (globalThis.TypeError)("compiler omitted its original frontend IR"));
|
|
1070
1070
|
}
|
|
1071
1071
|
return ((checkpoint)["runtime"] = await (compiler_save_ir(directory, record, (((graph)["modules"]) ?? []).length, false)));
|
|
1072
1072
|
})(await (build_observed_request(trace, request, (() => {
|
|
@@ -1082,7 +1082,7 @@ async function compiler_runtime_ir_checkpoint(producer, graph, ready, directory,
|
|
|
1082
1082
|
return (await (async (record) => {
|
|
1083
1083
|
return (await (async () => {
|
|
1084
1084
|
if ((!((build_optional_get(record, "id") === (expected)["id"]) && (((__eliscript_value) => { if (__eliscript_value === null) return "null"; const __eliscript_host_type = typeof __eliscript_value; if (__eliscript_host_type !== "object" && __eliscript_host_type !== "function") return __eliscript_host_type; try { const __eliscript_type = Object.getOwnPropertyDescriptor(__eliscript_value, Symbol.for("eliscript.value.type")); if (__eliscript_type && Object.prototype.hasOwnProperty.call(__eliscript_type, "value") && (__eliscript_type.value === "keyword" || __eliscript_type.value === "symbol")) return __eliscript_type.value; const __eliscript_kind = Object.getOwnPropertyDescriptor(__eliscript_value, "kind"); if (__eliscript_kind && Object.prototype.hasOwnProperty.call(__eliscript_kind, "value")) { if (__eliscript_kind.value === "eliscript/keyword") return "keyword"; if (__eliscript_kind.value === "eliscript/symbol") return "symbol"; } return __eliscript_host_type; } catch { return __eliscript_host_type; } })((record)["ir"]) === "string") && (((__eliscript_value) => { if (__eliscript_value === null) return "null"; const __eliscript_host_type = typeof __eliscript_value; if (__eliscript_host_type !== "object" && __eliscript_host_type !== "function") return __eliscript_host_type; try { const __eliscript_type = Object.getOwnPropertyDescriptor(__eliscript_value, Symbol.for("eliscript.value.type")); if (__eliscript_type && Object.prototype.hasOwnProperty.call(__eliscript_type, "value") && (__eliscript_type.value === "keyword" || __eliscript_type.value === "symbol")) return __eliscript_type.value; const __eliscript_kind = Object.getOwnPropertyDescriptor(__eliscript_value, "kind"); if (__eliscript_kind && Object.prototype.hasOwnProperty.call(__eliscript_kind, "value")) { if (__eliscript_kind.value === "eliscript/keyword") return "keyword"; if (__eliscript_kind.value === "eliscript/symbol") return "symbol"; } return __eliscript_host_type; } catch { return __eliscript_host_type; } })((record)["canonicalIR"]) === "string")))) {
|
|
1085
|
-
((
|
|
1085
|
+
((__eliscript_value_88) => { throw __eliscript_value_88; })(new (globalThis.TypeError)("compiler changed its persistent literal frontend IR identity"));
|
|
1086
1086
|
}
|
|
1087
1087
|
return ((checkpoint)["literals"])["push"](await (compiler_save_ir(directory, record, index, true)));
|
|
1088
1088
|
})());
|
|
@@ -1136,11 +1136,11 @@ async function buildIndependentCompiler(...arguments$) {
|
|
|
1136
1136
|
return (await (async () => {
|
|
1137
1137
|
((host = target));
|
|
1138
1138
|
if ((!__eliscript_truthy((["arm64-macos", "arm64-linux"])["includes"](native_target)))) {
|
|
1139
|
-
((
|
|
1139
|
+
((__eliscript_value_89) => { throw __eliscript_value_89; })(new (globalThis.TypeError)("unsupported native compiler target"));
|
|
1140
1140
|
}
|
|
1141
1141
|
return (await (async (resources) => {
|
|
1142
1142
|
if ((!((on_phase === undefined) || (((__eliscript_value) => { if (__eliscript_value === null) return "null"; const __eliscript_host_type = typeof __eliscript_value; if (__eliscript_host_type !== "object" && __eliscript_host_type !== "function") return __eliscript_host_type; try { const __eliscript_type = Object.getOwnPropertyDescriptor(__eliscript_value, Symbol.for("eliscript.value.type")); if (__eliscript_type && Object.prototype.hasOwnProperty.call(__eliscript_type, "value") && (__eliscript_type.value === "keyword" || __eliscript_type.value === "symbol")) return __eliscript_type.value; const __eliscript_kind = Object.getOwnPropertyDescriptor(__eliscript_value, "kind"); if (__eliscript_kind && Object.prototype.hasOwnProperty.call(__eliscript_kind, "value")) { if (__eliscript_kind.value === "eliscript/keyword") return "keyword"; if (__eliscript_kind.value === "eliscript/symbol") return "symbol"; } return __eliscript_host_type; } catch { return __eliscript_host_type; } })(on_phase) === "function")))) {
|
|
1143
|
-
((
|
|
1143
|
+
((__eliscript_value_90) => { throw __eliscript_value_90; })(new (globalThis.TypeError)("compiler phase observer must be a function"));
|
|
1144
1144
|
}
|
|
1145
1145
|
return (await (async (trace) => {
|
|
1146
1146
|
return (await (async (phase) => {
|
|
@@ -1151,12 +1151,12 @@ async function buildIndependentCompiler(...arguments$) {
|
|
|
1151
1151
|
phase("sources-complete");
|
|
1152
1152
|
return (await (async (producer) => {
|
|
1153
1153
|
if (((!(session === undefined)) && (!(((__eliscript_value) => { if (__eliscript_value === null) return "null"; const __eliscript_host_type = typeof __eliscript_value; if (__eliscript_host_type !== "object" && __eliscript_host_type !== "function") return __eliscript_host_type; try { const __eliscript_type = Object.getOwnPropertyDescriptor(__eliscript_value, Symbol.for("eliscript.value.type")); if (__eliscript_type && Object.prototype.hasOwnProperty.call(__eliscript_type, "value") && (__eliscript_type.value === "keyword" || __eliscript_type.value === "symbol")) return __eliscript_type.value; const __eliscript_kind = Object.getOwnPropertyDescriptor(__eliscript_value, "kind"); if (__eliscript_kind && Object.prototype.hasOwnProperty.call(__eliscript_kind, "value")) { if (__eliscript_kind.value === "eliscript/keyword") return "keyword"; if (__eliscript_kind.value === "eliscript/symbol") return "symbol"; } return __eliscript_host_type; } catch { return __eliscript_host_type; } })(build_optional_get(session, "request")) === "function")))) {
|
|
1154
|
-
((
|
|
1154
|
+
((__eliscript_value_91) => { throw __eliscript_value_91; })(new (globalThis.TypeError)("independent compiler producer requires session.request"));
|
|
1155
1155
|
}
|
|
1156
1156
|
await (mkdir(directory, ({"recursive": true})));
|
|
1157
|
-
(__eliscript_truthy(((
|
|
1157
|
+
(__eliscript_truthy(((__eliscript_value_92) => (__eliscript_truthy(__eliscript_value_92) ? ((graph)["modules"])["some"](((record) => {
|
|
1158
1158
|
return ((record)["id"] === "runtime/math.mjs");
|
|
1159
|
-
})) :
|
|
1159
|
+
})) : __eliscript_value_92))((host === "javascript"))) ? await (write_compiler_math_scope(directory)) : null);
|
|
1160
1160
|
return (await (async (product, owned_product, runtime_checkpoint) => {
|
|
1161
1161
|
(__eliscript_truthy(build_truth(producer)) ? (await (async () => {
|
|
1162
1162
|
phase("runtime-start");
|
|
@@ -1170,7 +1170,7 @@ async function buildIndependentCompiler(...arguments$) {
|
|
|
1170
1170
|
(((host === "native") || (host === "wasm")) ? (await (async (capability_request) => {
|
|
1171
1171
|
return ((capabilities) => {
|
|
1172
1172
|
return ((modes) => {
|
|
1173
|
-
return (__eliscript_truthy(((
|
|
1173
|
+
return (__eliscript_truthy(((__eliscript_value_93) => (__eliscript_truthy(__eliscript_value_93) ? ((__eliscript_value_94) => (__eliscript_truthy(__eliscript_value_94) ? (modes)["includes"]("graph-events-v1") : __eliscript_value_94))((!(modes == null))) : __eliscript_value_93))(((host === "native") || (debug === true)))) ? ((response_options = ({"signal": signal, "responseMode": "graph-events-v1"}))) : (__eliscript_truthy(((__eliscript_value_95) => (__eliscript_truthy(__eliscript_value_95) ? (modes)["includes"]("events-v1") : __eliscript_value_95))((!(modes == null)))) ? ((response_options = ({"signal": signal, "responseMode": "events-v1"}))) : (__eliscript_truthy(((__eliscript_value_96) => (__eliscript_truthy(__eliscript_value_96) ? (modes)["includes"]("graph-events-v1") : __eliscript_value_96))((!(modes == null)))) ? ((response_options = ({"signal": signal, "responseMode": "graph-events-v1"}))) : null)));
|
|
1174
1174
|
})(build_optional_get(capabilities, "responseModes"));
|
|
1175
1175
|
})(await (build_observed_request(trace, capability_request, (() => {
|
|
1176
1176
|
return (producer)["request"](capability_request, ({"signal": signal}));
|
|
@@ -1234,10 +1234,10 @@ async function buildIndependentCompiler(...arguments$) {
|
|
|
1234
1234
|
})()) : (await (async () => {
|
|
1235
1235
|
if (__eliscript_truthy(build_truth(build_optional_get(signal, "aborted")))) {
|
|
1236
1236
|
{
|
|
1237
|
-
const
|
|
1237
|
+
const __eliscript_value_97 = (signal)["reason"];
|
|
1238
1238
|
{
|
|
1239
|
-
let reason =
|
|
1240
|
-
((
|
|
1239
|
+
let reason = __eliscript_value_97;
|
|
1240
|
+
((__eliscript_value_98) => { throw __eliscript_value_98; })(((reason == null) ? new (globalThis.Error)("compiler build aborted") : reason));
|
|
1241
1241
|
}
|
|
1242
1242
|
}
|
|
1243
1243
|
}
|
|
@@ -1245,7 +1245,7 @@ async function buildIndependentCompiler(...arguments$) {
|
|
|
1245
1245
|
return ((owned_product = true));
|
|
1246
1246
|
})()));
|
|
1247
1247
|
if ((!(build_optional_get(product, "target") === target))) {
|
|
1248
|
-
((
|
|
1248
|
+
((__eliscript_value_99) => { throw __eliscript_value_99; })(new (globalThis.TypeError)("compiler producer returned a different target"));
|
|
1249
1249
|
}
|
|
1250
1250
|
return (await (async (artifact) => {
|
|
1251
1251
|
return (await (async (files) => {
|
|
@@ -1263,15 +1263,15 @@ async function buildIndependentCompiler(...arguments$) {
|
|
|
1263
1263
|
((host === "javascript") ? (await (async () => {
|
|
1264
1264
|
phase("javascript-files-start");
|
|
1265
1265
|
if ((!__eliscript_truthy(Array.isArray((product)["modules"])))) {
|
|
1266
|
-
((
|
|
1266
|
+
((__eliscript_value_100) => { throw __eliscript_value_100; })(new (globalThis.TypeError)("JavaScript compiler product has no modules"));
|
|
1267
1267
|
}
|
|
1268
1268
|
(await (async (expected, index) => {
|
|
1269
1269
|
((artifact)["modules"] = []);
|
|
1270
1270
|
(await (async () => {
|
|
1271
1271
|
while (__eliscript_numeric_relation("<", index, (((product)["modules"]) ?? []).length)) {
|
|
1272
1272
|
(await (async (record) => {
|
|
1273
|
-
if ((!__eliscript_truthy(((
|
|
1274
|
-
((
|
|
1273
|
+
if ((!__eliscript_truthy(((__eliscript_value_101) => (__eliscript_truthy(__eliscript_value_101) ? (((__eliscript_value) => { if (__eliscript_value === null) return "null"; const __eliscript_host_type = typeof __eliscript_value; if (__eliscript_host_type !== "object" && __eliscript_host_type !== "function") return __eliscript_host_type; try { const __eliscript_type = Object.getOwnPropertyDescriptor(__eliscript_value, Symbol.for("eliscript.value.type")); if (__eliscript_type && Object.prototype.hasOwnProperty.call(__eliscript_type, "value") && (__eliscript_type.value === "keyword" || __eliscript_type.value === "symbol")) return __eliscript_type.value; const __eliscript_kind = Object.getOwnPropertyDescriptor(__eliscript_value, "kind"); if (__eliscript_kind && Object.prototype.hasOwnProperty.call(__eliscript_kind, "value")) { if (__eliscript_kind.value === "eliscript/keyword") return "keyword"; if (__eliscript_kind.value === "eliscript/symbol") return "symbol"; } return __eliscript_host_type; } catch { return __eliscript_host_type; } })((record)["javascript"]) === "string") : __eliscript_value_101))((expected)["delete"]((record)["id"]))))) {
|
|
1274
|
+
((__eliscript_value_102) => { throw __eliscript_value_102; })(new (globalThis.TypeError)("JavaScript compiler product contains an unexpected module"));
|
|
1275
1275
|
}
|
|
1276
1276
|
(await (async (path) => {
|
|
1277
1277
|
return (await (async (output) => {
|
|
@@ -1299,7 +1299,7 @@ async function buildIndependentCompiler(...arguments$) {
|
|
|
1299
1299
|
return null;
|
|
1300
1300
|
})());
|
|
1301
1301
|
if ((!((expected)["size"] === 0))) {
|
|
1302
|
-
return ((
|
|
1302
|
+
return ((__eliscript_value_103) => { throw __eliscript_value_103; })(new (globalThis.TypeError)("JavaScript compiler product omitted modules"));
|
|
1303
1303
|
} else {
|
|
1304
1304
|
return null;
|
|
1305
1305
|
}
|
|
@@ -1309,11 +1309,11 @@ async function buildIndependentCompiler(...arguments$) {
|
|
|
1309
1309
|
((artifact)["path"] = resolve(directory, (graph)["entry"]));
|
|
1310
1310
|
((artifact)["url"] = (pathToFileURL((artifact)["path"]))["href"]);
|
|
1311
1311
|
{
|
|
1312
|
-
const
|
|
1313
|
-
const
|
|
1312
|
+
const __eliscript_value_104 = createRequire(resolve(root, "tools/backends/compiler-build.mjs"));
|
|
1313
|
+
const __eliscript_value_105 = (artifact)["path"];
|
|
1314
1314
|
{
|
|
1315
|
-
let require_module =
|
|
1316
|
-
let module_path =
|
|
1315
|
+
let require_module = __eliscript_value_104;
|
|
1316
|
+
let module_path = __eliscript_value_105;
|
|
1317
1317
|
((artifact)["load"] = (async () => {
|
|
1318
1318
|
return require_module(module_path);
|
|
1319
1319
|
}));
|
|
@@ -1321,8 +1321,8 @@ async function buildIndependentCompiler(...arguments$) {
|
|
|
1321
1321
|
}
|
|
1322
1322
|
return phase("javascript-files-complete");
|
|
1323
1323
|
})()) : (await (async () => {
|
|
1324
|
-
if ((!__eliscript_truthy(((
|
|
1325
|
-
((
|
|
1324
|
+
if ((!__eliscript_truthy(((__eliscript_value_106) => (__eliscript_truthy(__eliscript_value_106) ? ((__eliscript_value_107) => (__eliscript_truthy(__eliscript_value_107) ? ((__eliscript_value_108) => (__eliscript_truthy(__eliscript_value_108) ? __eliscript_value_108 : build_truth((product)["typed"])))((!(host === "native"))) : __eliscript_value_107))(build_truth((product)["bytes"])) : __eliscript_value_106))(build_truth((product)["descriptor"]))))) {
|
|
1325
|
+
((__eliscript_value_109) => { throw __eliscript_value_109; })(new (globalThis.TypeError)("binary compiler product omitted its bytes or lowering record"));
|
|
1326
1326
|
}
|
|
1327
1327
|
phase("binary-decode-start");
|
|
1328
1328
|
((artifact)["bytes"] = decodeCompilerBinary((product)["bytes"]));
|
|
@@ -1348,9 +1348,9 @@ async function buildIndependentCompiler(...arguments$) {
|
|
|
1348
1348
|
})(encodeCompilerSourceAsset(((graph)["runtime"])["source"])));
|
|
1349
1349
|
((files = ((host === "javascript") ? ((artifact)["modules"])["flatMap"](((record) => {
|
|
1350
1350
|
{
|
|
1351
|
-
const
|
|
1351
|
+
const __eliscript_value_110 = [(record)["path"]];
|
|
1352
1352
|
{
|
|
1353
|
-
let paths =
|
|
1353
|
+
let paths = __eliscript_value_110;
|
|
1354
1354
|
if (__eliscript_truthy(build_truth((record)["sourceMapPath"]))) {
|
|
1355
1355
|
(paths)["push"]((record)["sourceMapPath"]);
|
|
1356
1356
|
}
|
|
@@ -1361,9 +1361,9 @@ async function buildIndependentCompiler(...arguments$) {
|
|
|
1361
1361
|
}
|
|
1362
1362
|
}
|
|
1363
1363
|
})) : [(artifact)["path"]])));
|
|
1364
|
-
(__eliscript_truthy(((
|
|
1364
|
+
(__eliscript_truthy(((__eliscript_value_111) => (__eliscript_truthy(__eliscript_value_111) ? ((artifact)["modules"])["some"](((record) => {
|
|
1365
1365
|
return ((record)["id"] === "runtime/math.mjs");
|
|
1366
|
-
})) :
|
|
1366
|
+
})) : __eliscript_value_111))((host === "javascript"))) ? (files)["push"](await (write_compiler_math_scope(directory))) : null);
|
|
1367
1367
|
((reserved = new (globalThis.Set)(((host === "javascript") ? ((artifact)["modules"])["map"](((record) => {
|
|
1368
1368
|
return (record)["id"];
|
|
1369
1369
|
})) : [compiler_portable_path(directory, (artifact)["path"])]))));
|
|
@@ -1373,7 +1373,7 @@ async function buildIndependentCompiler(...arguments$) {
|
|
|
1373
1373
|
while (__eliscript_numeric_relation("<", index, (((facades)["files"]) ?? []).length)) {
|
|
1374
1374
|
(await (async (record) => {
|
|
1375
1375
|
if (__eliscript_truthy((reserved)["has"]((record)["id"]))) {
|
|
1376
|
-
((
|
|
1376
|
+
((__eliscript_value_112) => { throw __eliscript_value_112; })(new (globalThis.TypeError)("managed facade collides with a compiler artifact"));
|
|
1377
1377
|
}
|
|
1378
1378
|
(reserved)["add"]((record)["id"]);
|
|
1379
1379
|
return ((path) => {
|
|
@@ -1392,10 +1392,10 @@ async function buildIndependentCompiler(...arguments$) {
|
|
|
1392
1392
|
return (await (async () => {
|
|
1393
1393
|
while (__eliscript_numeric_relation("<", index, ((records) ?? []).length)) {
|
|
1394
1394
|
(await (async (record) => {
|
|
1395
|
-
if ((!__eliscript_truthy(((
|
|
1395
|
+
if ((!__eliscript_truthy(((__eliscript_value_113) => (__eliscript_truthy(__eliscript_value_113) ? ((__eliscript_value_114) => (__eliscript_truthy(__eliscript_value_114) ? ((!__eliscript_truthy((((record)["id"])["split"]("/"))["some"](((part) => {
|
|
1396
1396
|
return ((!__eliscript_truthy(build_truth(part))) || (part === ".") || (part === ".."));
|
|
1397
|
-
})))) && (!__eliscript_truthy((reserved)["has"]((record)["id"]))) && (((__eliscript_value) => { if (__eliscript_value === null) return "null"; const __eliscript_host_type = typeof __eliscript_value; if (__eliscript_host_type !== "object" && __eliscript_host_type !== "function") return __eliscript_host_type; try { const __eliscript_type = Object.getOwnPropertyDescriptor(__eliscript_value, Symbol.for("eliscript.value.type")); if (__eliscript_type && Object.prototype.hasOwnProperty.call(__eliscript_type, "value") && (__eliscript_type.value === "keyword" || __eliscript_type.value === "symbol")) return __eliscript_type.value; const __eliscript_kind = Object.getOwnPropertyDescriptor(__eliscript_value, "kind"); if (__eliscript_kind && Object.prototype.hasOwnProperty.call(__eliscript_kind, "value")) { if (__eliscript_kind.value === "eliscript/keyword") return "keyword"; if (__eliscript_kind.value === "eliscript/symbol") return "symbol"; } return __eliscript_host_type; } catch { return __eliscript_host_type; } })((record)["source"]) === "string")) :
|
|
1398
|
-
((
|
|
1397
|
+
})))) && (!__eliscript_truthy((reserved)["has"]((record)["id"]))) && (((__eliscript_value) => { if (__eliscript_value === null) return "null"; const __eliscript_host_type = typeof __eliscript_value; if (__eliscript_host_type !== "object" && __eliscript_host_type !== "function") return __eliscript_host_type; try { const __eliscript_type = Object.getOwnPropertyDescriptor(__eliscript_value, Symbol.for("eliscript.value.type")); if (__eliscript_type && Object.prototype.hasOwnProperty.call(__eliscript_type, "value") && (__eliscript_type.value === "keyword" || __eliscript_type.value === "symbol")) return __eliscript_type.value; const __eliscript_kind = Object.getOwnPropertyDescriptor(__eliscript_value, "kind"); if (__eliscript_kind && Object.prototype.hasOwnProperty.call(__eliscript_kind, "value")) { if (__eliscript_kind.value === "eliscript/keyword") return "keyword"; if (__eliscript_kind.value === "eliscript/symbol") return "symbol"; } return __eliscript_host_type; } catch { return __eliscript_host_type; } })((record)["source"]) === "string")) : __eliscript_value_114))(((record)["id"])["endsWith"](".mjs")) : __eliscript_value_113))((((__eliscript_value) => { if (__eliscript_value === null) return "null"; const __eliscript_host_type = typeof __eliscript_value; if (__eliscript_host_type !== "object" && __eliscript_host_type !== "function") return __eliscript_host_type; try { const __eliscript_type = Object.getOwnPropertyDescriptor(__eliscript_value, Symbol.for("eliscript.value.type")); if (__eliscript_type && Object.prototype.hasOwnProperty.call(__eliscript_type, "value") && (__eliscript_type.value === "keyword" || __eliscript_type.value === "symbol")) return __eliscript_type.value; const __eliscript_kind = Object.getOwnPropertyDescriptor(__eliscript_value, "kind"); if (__eliscript_kind && Object.prototype.hasOwnProperty.call(__eliscript_kind, "value")) { if (__eliscript_kind.value === "eliscript/keyword") return "keyword"; if (__eliscript_kind.value === "eliscript/symbol") return "symbol"; } return __eliscript_host_type; } catch { return __eliscript_host_type; } })(build_optional_get(record, "id")) === "string"))))) {
|
|
1398
|
+
((__eliscript_value_115) => { throw __eliscript_value_115; })(new (globalThis.TypeError)("invalid or colliding host source artifact"));
|
|
1399
1399
|
}
|
|
1400
1400
|
(reserved)["add"]((record)["id"]);
|
|
1401
1401
|
return ((path) => {
|
|
@@ -1416,14 +1416,14 @@ async function buildIndependentCompiler(...arguments$) {
|
|
|
1416
1416
|
return (await (async () => {
|
|
1417
1417
|
while (__eliscript_numeric_relation("<", index, ((records) ?? []).length)) {
|
|
1418
1418
|
(await (async (record) => {
|
|
1419
|
-
if ((!__eliscript_truthy(((
|
|
1420
|
-
((
|
|
1419
|
+
if ((!__eliscript_truthy(((__eliscript_value_116) => (__eliscript_truthy(__eliscript_value_116) ? ((__eliscript_value_117) => (__eliscript_truthy(__eliscript_value_117) ? ((((__eliscript_value) => { if (__eliscript_value === null) return "null"; const __eliscript_host_type = typeof __eliscript_value; if (__eliscript_host_type !== "object" && __eliscript_host_type !== "function") return __eliscript_host_type; try { const __eliscript_type = Object.getOwnPropertyDescriptor(__eliscript_value, Symbol.for("eliscript.value.type")); if (__eliscript_type && Object.prototype.hasOwnProperty.call(__eliscript_type, "value") && (__eliscript_type.value === "keyword" || __eliscript_type.value === "symbol")) return __eliscript_type.value; const __eliscript_kind = Object.getOwnPropertyDescriptor(__eliscript_value, "kind"); if (__eliscript_kind && Object.prototype.hasOwnProperty.call(__eliscript_kind, "value")) { if (__eliscript_kind.value === "eliscript/keyword") return "keyword"; if (__eliscript_kind.value === "eliscript/symbol") return "symbol"; } return __eliscript_host_type; } catch { return __eliscript_host_type; } })((record)["filename"]) === "string") && (((__eliscript_value) => { if (__eliscript_value === null) return "null"; const __eliscript_host_type = typeof __eliscript_value; if (__eliscript_host_type !== "object" && __eliscript_host_type !== "function") return __eliscript_host_type; try { const __eliscript_type = Object.getOwnPropertyDescriptor(__eliscript_value, Symbol.for("eliscript.value.type")); if (__eliscript_type && Object.prototype.hasOwnProperty.call(__eliscript_type, "value") && (__eliscript_type.value === "keyword" || __eliscript_type.value === "symbol")) return __eliscript_type.value; const __eliscript_kind = Object.getOwnPropertyDescriptor(__eliscript_value, "kind"); if (__eliscript_kind && Object.prototype.hasOwnProperty.call(__eliscript_kind, "value")) { if (__eliscript_kind.value === "eliscript/keyword") return "keyword"; if (__eliscript_kind.value === "eliscript/symbol") return "symbol"; } return __eliscript_host_type; } catch { return __eliscript_host_type; } })((record)["source"]) === "string")) : __eliscript_value_117))((new (globalThis.RegExp)("^(?:stdlib|runtime)/(?:[a-z][a-z0-9-]*/)*[a-z][a-z0-9-]*[.]mjs$"))["test"]((record)["id"])) : __eliscript_value_116))((((__eliscript_value) => { if (__eliscript_value === null) return "null"; const __eliscript_host_type = typeof __eliscript_value; if (__eliscript_host_type !== "object" && __eliscript_host_type !== "function") return __eliscript_host_type; try { const __eliscript_type = Object.getOwnPropertyDescriptor(__eliscript_value, Symbol.for("eliscript.value.type")); if (__eliscript_type && Object.prototype.hasOwnProperty.call(__eliscript_type, "value") && (__eliscript_type.value === "keyword" || __eliscript_type.value === "symbol")) return __eliscript_type.value; const __eliscript_kind = Object.getOwnPropertyDescriptor(__eliscript_value, "kind"); if (__eliscript_kind && Object.prototype.hasOwnProperty.call(__eliscript_kind, "value")) { if (__eliscript_kind.value === "eliscript/keyword") return "keyword"; if (__eliscript_kind.value === "eliscript/symbol") return "symbol"; } return __eliscript_host_type; } catch { return __eliscript_host_type; } })(build_optional_get(record, "id")) === "string"))))) {
|
|
1420
|
+
((__eliscript_value_118) => { throw __eliscript_value_118; })(new (globalThis.TypeError)("invalid persistent literal source"));
|
|
1421
1421
|
}
|
|
1422
1422
|
return (await (async (encoded) => {
|
|
1423
1423
|
return (await (async (asset) => {
|
|
1424
1424
|
return (await (async () => {
|
|
1425
1425
|
if (__eliscript_truthy((reserved)["has"](asset))) {
|
|
1426
|
-
((
|
|
1426
|
+
((__eliscript_value_119) => { throw __eliscript_value_119; })(new (globalThis.TypeError)("persistent literal source collides with a compiler artifact"));
|
|
1427
1427
|
}
|
|
1428
1428
|
(reserved)["add"](asset);
|
|
1429
1429
|
return (await (async (path) => {
|
|
@@ -1471,7 +1471,7 @@ async function buildIndependentCompiler(...arguments$) {
|
|
|
1471
1471
|
while (__eliscript_numeric_relation("<", index, ((records) ?? []).length)) {
|
|
1472
1472
|
(await (async (record) => {
|
|
1473
1473
|
if ((!((((__eliscript_value) => { if (__eliscript_value === null) return "null"; const __eliscript_host_type = typeof __eliscript_value; if (__eliscript_host_type !== "object" && __eliscript_host_type !== "function") return __eliscript_host_type; try { const __eliscript_type = Object.getOwnPropertyDescriptor(__eliscript_value, Symbol.for("eliscript.value.type")); if (__eliscript_type && Object.prototype.hasOwnProperty.call(__eliscript_type, "value") && (__eliscript_type.value === "keyword" || __eliscript_type.value === "symbol")) return __eliscript_type.value; const __eliscript_kind = Object.getOwnPropertyDescriptor(__eliscript_value, "kind"); if (__eliscript_kind && Object.prototype.hasOwnProperty.call(__eliscript_kind, "value")) { if (__eliscript_kind.value === "eliscript/keyword") return "keyword"; if (__eliscript_kind.value === "eliscript/symbol") return "symbol"; } return __eliscript_host_type; } catch { return __eliscript_host_type; } })(build_optional_get(record, "id")) === "string") && (((__eliscript_value) => { if (__eliscript_value === null) return "null"; const __eliscript_host_type = typeof __eliscript_value; if (__eliscript_host_type !== "object" && __eliscript_host_type !== "function") return __eliscript_host_type; try { const __eliscript_type = Object.getOwnPropertyDescriptor(__eliscript_value, Symbol.for("eliscript.value.type")); if (__eliscript_type && Object.prototype.hasOwnProperty.call(__eliscript_type, "value") && (__eliscript_type.value === "keyword" || __eliscript_type.value === "symbol")) return __eliscript_type.value; const __eliscript_kind = Object.getOwnPropertyDescriptor(__eliscript_value, "kind"); if (__eliscript_kind && Object.prototype.hasOwnProperty.call(__eliscript_kind, "value")) { if (__eliscript_kind.value === "eliscript/keyword") return "keyword"; if (__eliscript_kind.value === "eliscript/symbol") return "symbol"; } return __eliscript_host_type; } catch { return __eliscript_host_type; } })((record)["ir"]) === "string") && (((__eliscript_value) => { if (__eliscript_value === null) return "null"; const __eliscript_host_type = typeof __eliscript_value; if (__eliscript_host_type !== "object" && __eliscript_host_type !== "function") return __eliscript_host_type; try { const __eliscript_type = Object.getOwnPropertyDescriptor(__eliscript_value, Symbol.for("eliscript.value.type")); if (__eliscript_type && Object.prototype.hasOwnProperty.call(__eliscript_type, "value") && (__eliscript_type.value === "keyword" || __eliscript_type.value === "symbol")) return __eliscript_type.value; const __eliscript_kind = Object.getOwnPropertyDescriptor(__eliscript_value, "kind"); if (__eliscript_kind && Object.prototype.hasOwnProperty.call(__eliscript_kind, "value")) { if (__eliscript_kind.value === "eliscript/keyword") return "keyword"; if (__eliscript_kind.value === "eliscript/symbol") return "symbol"; } return __eliscript_host_type; } catch { return __eliscript_host_type; } })((record)["canonicalIR"]) === "string")))) {
|
|
1474
|
-
((
|
|
1474
|
+
((__eliscript_value_120) => { throw __eliscript_value_120; })(new (globalThis.TypeError)("compiler omitted its original frontend IR"));
|
|
1475
1475
|
}
|
|
1476
1476
|
((saved) => {
|
|
1477
1477
|
((artifact)["frontendIR"])["push"](saved);
|
|
@@ -1495,17 +1495,17 @@ async function buildIndependentCompiler(...arguments$) {
|
|
|
1495
1495
|
})(Array.from((product)["frontendIR"]), 0));
|
|
1496
1496
|
if (__eliscript_truthy(runtime_checkpoint)) {
|
|
1497
1497
|
{
|
|
1498
|
-
const
|
|
1498
|
+
const __eliscript_value_121 = (runtime_checkpoint)["runtime"];
|
|
1499
1499
|
{
|
|
1500
|
-
let saved =
|
|
1500
|
+
let saved = __eliscript_value_121;
|
|
1501
1501
|
((artifact)["frontendIR"])["push"](saved);
|
|
1502
1502
|
(files)["push"]((saved)["path"], (saved)["canonicalPath"]);
|
|
1503
1503
|
}
|
|
1504
1504
|
}
|
|
1505
1505
|
}
|
|
1506
1506
|
return (__eliscript_truthy(Object.hasOwn(graph, "literalSources")) ? (await (async () => {
|
|
1507
|
-
if ((!__eliscript_truthy(((
|
|
1508
|
-
((
|
|
1507
|
+
if ((!__eliscript_truthy(((__eliscript_value_122) => (__eliscript_truthy(__eliscript_value_122) ? __eliscript_value_122 : ((__eliscript_value_123) => (__eliscript_truthy(__eliscript_value_123) ? ((((product)["literalIR"]) ?? []).length === (((graph)["literalSources"]) ?? []).length) : __eliscript_value_123))(Array.isArray((product)["literalIR"]))))(runtime_checkpoint)))) {
|
|
1508
|
+
((__eliscript_value_124) => { throw __eliscript_value_124; })(new (globalThis.TypeError)("compiler omitted its persistent literal frontend IR"));
|
|
1509
1509
|
}
|
|
1510
1510
|
((artifact)["literalIR"] = []);
|
|
1511
1511
|
return (__eliscript_truthy(runtime_checkpoint) ? ((runtime_checkpoint)["literals"])["forEach"](((saved) => {
|
|
@@ -1516,7 +1516,7 @@ async function buildIndependentCompiler(...arguments$) {
|
|
|
1516
1516
|
while (__eliscript_numeric_relation("<", index, (((product)["literalIR"]) ?? []).length)) {
|
|
1517
1517
|
(await (async (record) => {
|
|
1518
1518
|
if ((!((build_optional_get(record, "id") === (((graph)["literalSources"])[index])["id"]) && (((__eliscript_value) => { if (__eliscript_value === null) return "null"; const __eliscript_host_type = typeof __eliscript_value; if (__eliscript_host_type !== "object" && __eliscript_host_type !== "function") return __eliscript_host_type; try { const __eliscript_type = Object.getOwnPropertyDescriptor(__eliscript_value, Symbol.for("eliscript.value.type")); if (__eliscript_type && Object.prototype.hasOwnProperty.call(__eliscript_type, "value") && (__eliscript_type.value === "keyword" || __eliscript_type.value === "symbol")) return __eliscript_type.value; const __eliscript_kind = Object.getOwnPropertyDescriptor(__eliscript_value, "kind"); if (__eliscript_kind && Object.prototype.hasOwnProperty.call(__eliscript_kind, "value")) { if (__eliscript_kind.value === "eliscript/keyword") return "keyword"; if (__eliscript_kind.value === "eliscript/symbol") return "symbol"; } return __eliscript_host_type; } catch { return __eliscript_host_type; } })((record)["ir"]) === "string") && (((__eliscript_value) => { if (__eliscript_value === null) return "null"; const __eliscript_host_type = typeof __eliscript_value; if (__eliscript_host_type !== "object" && __eliscript_host_type !== "function") return __eliscript_host_type; try { const __eliscript_type = Object.getOwnPropertyDescriptor(__eliscript_value, Symbol.for("eliscript.value.type")); if (__eliscript_type && Object.prototype.hasOwnProperty.call(__eliscript_type, "value") && (__eliscript_type.value === "keyword" || __eliscript_type.value === "symbol")) return __eliscript_type.value; const __eliscript_kind = Object.getOwnPropertyDescriptor(__eliscript_value, "kind"); if (__eliscript_kind && Object.prototype.hasOwnProperty.call(__eliscript_kind, "value")) { if (__eliscript_kind.value === "eliscript/keyword") return "keyword"; if (__eliscript_kind.value === "eliscript/symbol") return "symbol"; } return __eliscript_host_type; } catch { return __eliscript_host_type; } })((record)["canonicalIR"]) === "string")))) {
|
|
1519
|
-
((
|
|
1519
|
+
((__eliscript_value_125) => { throw __eliscript_value_125; })(new (globalThis.TypeError)("compiler changed its persistent literal frontend IR identity"));
|
|
1520
1520
|
}
|
|
1521
1521
|
((saved) => {
|
|
1522
1522
|
((artifact)["literalIR"])["push"](saved);
|