eliscript 0.1.0 → 0.1.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.
- package/README.md +9 -8
- package/bootstrap/compiler/emitter.eli +161 -63
- package/bootstrap/host/check-cli.mjs +0 -1
- package/bootstrap/host/check-cli.mjs.map +1 -1
- package/bootstrap/host/compiler-session.eli +2 -1
- package/bootstrap/host/eliscript-cli.mjs +2 -9
- package/bootstrap/host/eliscript-cli.mjs.map +1 -1
- package/bootstrap/host/project-cli.mjs +1 -11
- package/bootstrap/host/project-cli.mjs.map +1 -1
- package/bootstrap/host/project.mjs +2 -8
- package/bootstrap/host/project.mjs.map +1 -1
- package/browser/README.md +1 -1
- package/compiler/README.md +2 -2
- package/compiler/eliscript-emitter.el +229 -85
- package/compiler/eliscript-ir-emitter.el +64 -34
- package/compiler/eliscript-project.el +20 -5
- package/dist/backends/async.mjs +1 -90
- package/dist/backends/async.mjs.map +1 -1
- package/dist/backends/binary.mjs +1 -91
- package/dist/backends/binary.mjs.map +1 -1
- package/dist/backends/capabilities.mjs +1 -90
- package/dist/backends/capabilities.mjs.map +1 -1
- package/dist/backends/elf.mjs +1 -90
- package/dist/backends/elf.mjs.map +1 -1
- package/dist/backends/managed.mjs +1 -94
- package/dist/backends/managed.mjs.map +1 -1
- package/dist/backends/memory.mjs +1 -90
- package/dist/backends/memory.mjs.map +1 -1
- package/dist/backends/native.mjs +1 -91
- package/dist/backends/native.mjs.map +1 -1
- package/dist/backends/numeric.mjs +1 -90
- package/dist/backends/numeric.mjs.map +1 -1
- package/dist/backends/optimize.mjs +1 -90
- package/dist/backends/optimize.mjs.map +1 -1
- package/dist/backends/regexp.mjs +1 -91
- package/dist/backends/regexp.mjs.map +1 -1
- package/dist/backends/sha256.mjs +2 -96
- package/dist/backends/sha256.mjs.map +1 -1
- package/dist/backends/wasm.mjs +1 -90
- package/dist/backends/wasm.mjs.map +1 -1
- package/dist/bootstrap/analyzer.mjs +1 -95
- package/dist/bootstrap/analyzer.mjs.map +1 -1
- package/dist/bootstrap/compiler.mjs +1 -105
- package/dist/bootstrap/compiler.mjs.map +1 -1
- package/dist/bootstrap/emitter.mjs +848 -807
- package/dist/bootstrap/emitter.mjs.map +1 -1
- package/dist/bootstrap/expander.mjs +1 -96
- package/dist/bootstrap/expander.mjs.map +1 -1
- package/dist/bootstrap/formatter.mjs +1 -104
- package/dist/bootstrap/formatter.mjs.map +1 -1
- package/dist/bootstrap/ir.mjs +18 -172
- package/dist/bootstrap/ir.mjs.map +1 -1
- package/dist/bootstrap/lower.mjs +1 -92
- package/dist/bootstrap/lower.mjs.map +1 -1
- package/dist/bootstrap/project.mjs +23 -209
- package/dist/bootstrap/project.mjs.map +1 -1
- package/dist/bootstrap/reader.mjs +1 -96
- package/dist/bootstrap/reader.mjs.map +1 -1
- package/dist/bootstrap/source-map.mjs +7 -112
- package/dist/bootstrap/source-map.mjs.map +1 -1
- package/dist/bootstrap/symbol.mjs +7 -114
- package/dist/bootstrap/symbol.mjs.map +1 -1
- package/dist/bootstrap/syntax.mjs +10 -176
- package/dist/bootstrap/syntax.mjs.map +1 -1
- package/dist/bootstrap/transient-analysis.mjs +1 -93
- package/dist/bootstrap/transient-analysis.mjs.map +1 -1
- package/dist/browser/compiler.js +105 -104
- package/dist/browser/loader.js +1 -1
- package/dist/browser/loader.mjs +5 -124
- package/dist/compiler-artifact.json +1 -1
- package/dist/host/compiler-session.mjs +205 -297
- package/dist/host/compiler-session.mjs.map +1 -1
- package/dist/host/compiler-tools.mjs +1 -91
- package/dist/host/compiler-tools.mjs.map +1 -1
- package/dist/literal-sources/runtime/core/order.eli +32 -10
- package/dist/literal-sources/runtime/core/sequence.eli +69 -28
- package/dist/literal-sources/runtime/core/vector.eli +2 -4
- package/dist/literal-sources/stdlib/managed-literal-protocols.eli +5 -5
- package/dist/literal-sources/stdlib/managed-literals.eli +1 -1
- package/dist/package.json +1 -0
- package/dist/runtime/math.mjs +62 -252
- package/dist/runtime/math.mjs.map +1 -1
- package/dist/runtime/prelude.mjs +95 -0
- package/dist/runtime/prelude.mjs.macro-origins.json +1 -0
- package/dist/runtime/prelude.mjs.map +1 -0
- package/dist/runtime/unicode-case-data.mjs +1 -95
- package/dist/runtime/unicode-case-data.mjs.map +1 -1
- package/dist/runtime/unicode-case.mjs +3 -97
- package/dist/runtime/unicode-case.mjs.map +1 -1
- package/dist/stage3-release.json +1 -1
- package/editor/README.md +9 -4
- package/editor/eliscript-compat.el +164 -2
- package/editor/eliscript-mode.el +1 -1
- package/editor/eliscript-repl.el +1 -1
- package/package.json +2 -1
- package/runtime/README.md +21 -1
- package/runtime/core/protocol-impl.mjs +1 -115
- package/runtime/core/protocol-impl.mjs.map +1 -1
- package/runtime/core/text-impl.mjs +1 -90
- package/runtime/core/text-impl.mjs.map +1 -1
- package/runtime/core/vector.eli +1 -1
- package/runtime/core/vector.mjs +0 -9
- package/runtime/emacs-compat.eli +5957 -2
- package/runtime/emacs-compat.mjs +13522 -2295
- package/runtime/emacs-compat.mjs.map +1 -0
- package/runtime/math.mjs +62 -252
- package/runtime/math.mjs.map +1 -1
- package/runtime/prelude.eli +4 -0
- package/runtime/prelude.mjs +95 -0
- package/runtime/prelude.mjs.map +1 -0
- package/runtime/unicode-case-data.mjs +1 -95
- package/runtime/unicode-case-data.mjs.map +1 -1
- package/runtime/unicode-case.mjs +3 -97
- package/runtime/unicode-case.mjs.map +1 -1
- package/stdlib/managed-literals.eli +1 -1
- package/stdlib/managed-runtime-vector.eli +2 -4
- package/tools/backends/compiler-build.mjs +3 -93
- package/tools/backends/compiler-cli.mjs +2 -15
- package/tools/backends/compiler-corpus-bit.mjs +2 -95
- package/tools/backends/compiler-corpus-cli-adapters.mjs +1 -97
- package/tools/backends/compiler-corpus-debugging.mjs +2 -95
- package/tools/backends/compiler-corpus-emitter.mjs +1 -97
- package/tools/backends/compiler-corpus-execution.mjs +2 -108
- package/tools/backends/compiler-corpus-fuzz.mjs +2 -95
- package/tools/backends/compiler-corpus-host-context.mjs +2 -99
- package/tools/backends/compiler-corpus-identity-host.mjs +18 -123
- package/tools/backends/compiler-corpus-identity-value-adapters.mjs +0 -9
- package/tools/backends/compiler-corpus-literal-provider.mjs +1 -91
- package/tools/backends/compiler-corpus-managed-adapters.mjs +1 -99
- package/tools/backends/compiler-corpus-managed-fixtures.mjs +2 -113
- package/tools/backends/compiler-corpus-matchers.mjs +3 -106
- package/tools/backends/compiler-corpus-original-program.mjs +1 -91
- package/tools/backends/compiler-corpus-process.mjs +1 -92
- package/tools/backends/compiler-corpus-program-driver.mjs +1 -3
- package/tools/backends/compiler-corpus-project-adapters.mjs +1 -95
- package/tools/backends/compiler-corpus-project-entry-host.mjs +2 -92
- package/tools/backends/compiler-corpus-project-transport.mjs +1 -90
- package/tools/backends/compiler-corpus-raw-fixture-observer.mjs +1 -91
- package/tools/backends/compiler-corpus-raw-language-fixtures.mjs +1 -92
- package/tools/backends/compiler-corpus-raw-math-fixture.mjs +1 -91
- package/tools/backends/compiler-corpus-raw-special-fixtures.mjs +1 -91
- package/tools/backends/compiler-corpus-reference.mjs +1 -90
- package/tools/backends/compiler-corpus-runtime-adapters.mjs +2 -110
- package/tools/backends/compiler-corpus-tools-cli.mjs +1 -95
- package/tools/backends/compiler-corpus-tools-reference.mjs +22 -163
- package/tools/backends/compiler-corpus.mjs +3 -125
- package/tools/backends/compiler-matrix.mjs +1 -92
- package/tools/backends/compiler-package-browser.mjs +1 -90
- package/tools/backends/compiler-package.mjs +3 -95
- package/tools/backends/compiler-unicode-profile-host.mjs +1 -91
- package/tools/backends/dist/bootstrap-js-stages.mjs +1 -91
- package/tools/backends/dist/bootstrap-js-stages.mjs.map +1 -1
- package/tools/backends/dist/managed-ir-inventory.mjs +1 -91
- package/tools/backends/dist/managed-ir-inventory.mjs.map +1 -1
- package/tools/backends/dist/record-grid.mjs +1 -91
- package/tools/backends/dist/record-grid.mjs.map +1 -1
- package/tools/backends/dist/release-cli.mjs +4 -94
- package/tools/backends/dist/release-cli.mjs.map +1 -1
- package/tools/backends/dist/run-artifact.mjs +1 -91
- package/tools/backends/dist/run-artifact.mjs.map +1 -1
- package/tools/backends/eliscript/compiler-corpus-bit.eli +1 -0
- package/tools/backends/managed-foreign-binding.mjs +1 -95
- package/tools/backends/managed-host-lifecycle.mjs +1 -91
- package/tools/backends/managed-host-object-provider.mjs +18 -59
- package/tools/backends/managed-host-object-realm.mjs +1 -91
- package/tools/backends/managed-host-proxy.mjs +9 -18
- package/tools/backends/managed-host-runtime.mjs +3 -105
- package/tools/backends/managed-host.mjs +1 -104
- package/tools/backends/managed-module-graph.mjs +1 -97
- package/tools/backends/managed-runtime.mjs +1 -96
- package/tools/backends/managed-source-view.mjs +13 -108
- package/tools/backends/native-managed-runtime.mjs +1 -91
- package/tools/backends/native-memory.mjs +1 -91
- package/tools/backends/stage3-targets.mjs +1 -91
- package/tools/bootstrap-runtime.el +3 -2
- package/tools/project/project.eli +1 -1
- package/tools/testing/stdlib-bit-corpus-host.mjs +1 -90
- package/tools/testing/stdlib-bit.mjs +1 -90
- package/dist/bootstrap/package.json +0 -1
- package/dist/bootstrap/runtime/math.mjs +0 -1117
- package/dist/bootstrap/runtime/math.mjs.map +0 -1
- package/dist/bootstrap/runtime/unicode-case-data.mjs +0 -10125
- package/dist/bootstrap/runtime/unicode-case-data.mjs.map +0 -1
- package/dist/bootstrap/runtime/unicode-case.mjs +0 -281
- package/dist/bootstrap/runtime/unicode-case.mjs.map +0 -1
|
@@ -1,125 +1,20 @@
|
|
|
1
1
|
// Generated by Eliscript. Do not edit.
|
|
2
2
|
import { tdz as __eliscript_tdz_error, immutable as __eliscript_const_error } from "data:text/javascript;base64,Y29uc3QgRSA9IFJlZmVyZW5jZUVycm9yOyBjb25zdCBUID0gVHlwZUVycm9yOyBleHBvcnQgZnVuY3Rpb24gdGR6KG5hbWUpIHsgdGhyb3cgbmV3IEUoIkNhbm5vdCBhY2Nlc3MgJyIgKyBuYW1lICsgIicgYmVmb3JlIGluaXRpYWxpemF0aW9uIik7IH0gZXhwb3J0IGZ1bmN0aW9uIGltbXV0YWJsZSgpIHsgdGhyb3cgbmV3IFQoIkFzc2lnbm1lbnQgdG8gY29uc3RhbnQgdmFyaWFibGUuIik7IH0K";
|
|
3
|
-
var __eliscript_tdz_ready_0;
|
|
4
|
-
function __eliscript_tdz_read_0() { if (__eliscript_tdz_ready_0 !== true) __eliscript_tdz_error("originalRuntimeSourceSuites"); return originalRuntimeSourceSuites; }
|
|
5
|
-
function __eliscript_tdz_write_0(__eliscript_tdz_value_0) { if (__eliscript_tdz_ready_0 !== true) __eliscript_tdz_error("originalRuntimeSourceSuites"); return __eliscript_const_error(); }
|
|
6
|
-
var __eliscript_tdz_ready_1;
|
|
7
|
-
function __eliscript_tdz_read_1() { if (__eliscript_tdz_ready_1 !== true) __eliscript_tdz_error("isOriginalRuntimeHostOnly"); return isOriginalRuntimeHostOnly; }
|
|
8
|
-
function __eliscript_tdz_write_1(__eliscript_tdz_value_1) { if (__eliscript_tdz_ready_1 !== true) __eliscript_tdz_error("isOriginalRuntimeHostOnly"); return __eliscript_const_error(); }
|
|
9
|
-
var __eliscript_tdz_ready_2;
|
|
10
|
-
function __eliscript_tdz_read_2() { if (__eliscript_tdz_ready_2 !== true) __eliscript_tdz_error("originalRuntimeOnlyCase"); return originalRuntimeOnlyCase; }
|
|
11
|
-
function __eliscript_tdz_write_2(__eliscript_tdz_value_2) { if (__eliscript_tdz_ready_2 !== true) __eliscript_tdz_error("originalRuntimeOnlyCase"); return __eliscript_const_error(); }
|
|
12
3
|
var __eliscript_tdz_ready_3;
|
|
13
4
|
function __eliscript_tdz_read_3() { if (__eliscript_tdz_ready_3 !== true) __eliscript_tdz_error("suite"); return suite; }
|
|
14
|
-
function __eliscript_tdz_write_3(__eliscript_tdz_value_3) { if (__eliscript_tdz_ready_3 !== true) __eliscript_tdz_error("suite"); return __eliscript_const_error(); }
|
|
15
5
|
var __eliscript_tdz_ready_4;
|
|
16
6
|
function __eliscript_tdz_read_4() { if (__eliscript_tdz_ready_4 !== true) __eliscript_tdz_error("eli_source"); return eli_source; }
|
|
17
|
-
function __eliscript_tdz_write_4(__eliscript_tdz_value_4) { if (__eliscript_tdz_ready_4 !== true) __eliscript_tdz_error("eli_source"); return __eliscript_const_error(); }
|
|
18
7
|
var __eliscript_tdz_ready_5;
|
|
19
8
|
function __eliscript_tdz_read_5() { if (__eliscript_tdz_ready_5 !== true) __eliscript_tdz_error("titles"); return titles; }
|
|
20
|
-
function __eliscript_tdz_write_5(__eliscript_tdz_value_5) { if (__eliscript_tdz_ready_5 !== true) __eliscript_tdz_error("titles"); return __eliscript_const_error(); }
|
|
21
9
|
var __eliscript_tdz_ready_6;
|
|
22
10
|
function __eliscript_tdz_read_6() { if (__eliscript_tdz_ready_6 !== true) __eliscript_tdz_error("plans"); return plans; }
|
|
23
|
-
function __eliscript_tdz_write_6(__eliscript_tdz_value_6) { if (__eliscript_tdz_ready_6 !== true) __eliscript_tdz_error("plans"); return __eliscript_const_error(); }
|
|
24
11
|
var __eliscript_tdz_ready_7;
|
|
25
12
|
function __eliscript_tdz_read_7() { if (__eliscript_tdz_ready_7 !== true) __eliscript_tdz_error("originalRuntimeHostCompletionSource"); return originalRuntimeHostCompletionSource; }
|
|
26
|
-
function __eliscript_tdz_write_7(__eliscript_tdz_value_7) { if (__eliscript_tdz_ready_7 !== true) __eliscript_tdz_error("originalRuntimeHostCompletionSource"); return __eliscript_const_error(); }
|
|
27
13
|
var __eliscript_tdz_ready_8;
|
|
28
14
|
function __eliscript_tdz_read_8() { if (__eliscript_tdz_ready_8 !== true) __eliscript_tdz_error("core_project_records"); return core_project_records; }
|
|
29
|
-
function __eliscript_tdz_write_8(__eliscript_tdz_value_8) { if (__eliscript_tdz_ready_8 !== true) __eliscript_tdz_error("core_project_records"); return __eliscript_const_error(); }
|
|
30
15
|
import "eliscript/runtime/unicode-case.mjs";
|
|
31
|
-
import {
|
|
16
|
+
import { __eliscript_at, __eliscript_at_direct, __eliscript_to_number, __eliscript_numeric_decrement, __eliscript_numeric_relation, __eliscript_numeric_sub, __eliscript_numeric_mul, __eliscript_numeric_div, __eliscript_numeric_rem, __eliscript_numeric_and, __eliscript_numeric_or, __eliscript_numeric_xor, __eliscript_numeric_shl, __eliscript_numeric_shr, __eliscript_numeric_ushr, __eliscript_numeric_neg, __eliscript_numeric_int32, __eliscript_numeric_uint32, __eliscript_numeric_not } from "eliscript/runtime/prelude.mjs";
|
|
32
17
|
const __eliscript_truthy = (value) => value !== false && value != null;
|
|
33
|
-
const __eliscript_number_intrinsic = globalThis.Number;
|
|
34
|
-
const __eliscript_bigint_intrinsic = globalThis.BigInt;
|
|
35
|
-
const __eliscript_numeric_apply = globalThis.Reflect.apply;
|
|
36
|
-
const __eliscript_numeric_symbol = globalThis.Symbol.toPrimitive;
|
|
37
|
-
const __eliscript_numeric_error = globalThis.TypeError;
|
|
38
|
-
const __eliscript_numeric_trim = globalThis.String.prototype.trim;
|
|
39
|
-
const __eliscript_numeric_slice = globalThis.String.prototype.slice;
|
|
40
|
-
const __eliscript_numeric_exec = globalThis.RegExp.prototype.exec;
|
|
41
|
-
const __eliscript_numeric_radix = /^(?:0[xX][0-9a-fA-F]+|0[oO][0-7]+|0[bB][01]+)$/;
|
|
42
|
-
const __eliscript_numeric_object = (value) => value !== null && (typeof value === "object" || typeof value === "function" || (typeof value === "undefined" && value !== void 0));
|
|
43
|
-
const __eliscript_numeric_primitive = (value) => {
|
|
44
|
-
if (!__eliscript_numeric_object(value)) return value;
|
|
45
|
-
const exotic = value[__eliscript_numeric_symbol];
|
|
46
|
-
if (exotic !== void 0 && exotic !== null) {
|
|
47
|
-
const result = __eliscript_numeric_apply(exotic, value, ["number"]);
|
|
48
|
-
if (!__eliscript_numeric_object(result)) return result;
|
|
49
|
-
throw new __eliscript_numeric_error("Cannot convert object to primitive value");
|
|
50
|
-
}
|
|
51
|
-
for (let index = 0; index < 2; index++) {
|
|
52
|
-
const method = value[index === 0 ? "valueOf" : "toString"];
|
|
53
|
-
if (typeof method === "function" || (typeof method === "undefined" && method !== void 0)) {
|
|
54
|
-
const result = __eliscript_numeric_apply(method, value, []);
|
|
55
|
-
if (!__eliscript_numeric_object(result)) return result;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
throw new __eliscript_numeric_error("Cannot convert object to primitive value");
|
|
59
|
-
};
|
|
60
|
-
const __eliscript_to_number = (value) => {
|
|
61
|
-
const primitive = __eliscript_numeric_primitive(value);
|
|
62
|
-
if (typeof primitive === "string") {
|
|
63
|
-
const text = __eliscript_numeric_apply(__eliscript_numeric_trim, primitive, []);
|
|
64
|
-
if (__eliscript_numeric_apply(__eliscript_numeric_exec, __eliscript_numeric_radix, [text]) !== null) {
|
|
65
|
-
let first = 2;
|
|
66
|
-
while (first < text.length && text[first] === "0") first++;
|
|
67
|
-
if (first === text.length) return 0;
|
|
68
|
-
const prefix = text[1];
|
|
69
|
-
const limit = prefix === "x" || prefix === "X" ? 256 : prefix === "b" || prefix === "B" ? 1024 : 342;
|
|
70
|
-
if (text.length - first > limit) return 1 / 0;
|
|
71
|
-
const token = __eliscript_numeric_apply(__eliscript_numeric_slice, text, [0, 2]) + __eliscript_numeric_apply(__eliscript_numeric_slice, text, [first]);
|
|
72
|
-
return __eliscript_number_intrinsic(__eliscript_bigint_intrinsic(token));
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
return __eliscript_number_intrinsic(primitive);
|
|
76
|
-
};
|
|
77
|
-
const __eliscript_numeric = (value) => {
|
|
78
|
-
if (typeof value === "number" || typeof value === "bigint") return value;
|
|
79
|
-
const primitive = __eliscript_numeric_primitive(value);
|
|
80
|
-
if (typeof primitive === "number" || typeof primitive === "bigint") return primitive;
|
|
81
|
-
return typeof primitive === "string" ? __eliscript_to_number(primitive) : +primitive;
|
|
82
|
-
};
|
|
83
|
-
const __eliscript_implicit_number = (value) => {
|
|
84
|
-
if (typeof value === "number") return value;
|
|
85
|
-
const primitive = __eliscript_numeric_primitive(value);
|
|
86
|
-
if (typeof primitive === "bigint") throw new __eliscript_numeric_error("Cannot convert a BigInt value to a number");
|
|
87
|
-
return typeof primitive === "string" ? __eliscript_to_number(primitive) : +primitive;
|
|
88
|
-
};
|
|
89
|
-
const __eliscript_numeric_decrement = (value) => __eliscript_implicit_number(value) - 1;
|
|
90
|
-
const __eliscript_numeric_sub = (a, b) => { if (typeof a === "number" && typeof b === "number") return a - b; return __eliscript_numeric(a) - __eliscript_numeric(b); };
|
|
91
|
-
const __eliscript_numeric_mul = (a, b) => { if (typeof a === "number" && typeof b === "number") return a * b; return __eliscript_numeric(a) * __eliscript_numeric(b); };
|
|
92
|
-
const __eliscript_numeric_div = (a, b) => { if (typeof a === "number" && typeof b === "number") return a / b; return __eliscript_numeric(a) / __eliscript_numeric(b); };
|
|
93
|
-
const __eliscript_numeric_rem = (a, b) => { if (typeof a === "number" && typeof b === "number") return a % b; return __eliscript_numeric(a) % __eliscript_numeric(b); };
|
|
94
|
-
const __eliscript_numeric_and = (a, b) => { if (typeof a === "number" && typeof b === "number") return a & b; return __eliscript_numeric(a) & __eliscript_numeric(b); };
|
|
95
|
-
const __eliscript_numeric_or = (a, b) => { if (typeof a === "number" && typeof b === "number") return a | b; return __eliscript_numeric(a) | __eliscript_numeric(b); };
|
|
96
|
-
const __eliscript_numeric_xor = (a, b) => { if (typeof a === "number" && typeof b === "number") return a ^ b; return __eliscript_numeric(a) ^ __eliscript_numeric(b); };
|
|
97
|
-
const __eliscript_numeric_shl = (a, b) => { if (typeof a === "number" && typeof b === "number") return a << b; return __eliscript_numeric(a) << __eliscript_numeric(b); };
|
|
98
|
-
const __eliscript_numeric_shr = (a, b) => { if (typeof a === "number" && typeof b === "number") return a >> b; return __eliscript_numeric(a) >> __eliscript_numeric(b); };
|
|
99
|
-
const __eliscript_numeric_ushr = (a, b) => { if (typeof a === "number" && typeof b === "number") return a >>> b; return __eliscript_numeric(a) >>> __eliscript_numeric(b); };
|
|
100
|
-
const __eliscript_numeric_neg = (a) => typeof a === "number" ? -a : -__eliscript_numeric(a);
|
|
101
|
-
const __eliscript_numeric_int32 = (a) => typeof a === "number" ? a | 0 : __eliscript_numeric(a) | 0;
|
|
102
|
-
const __eliscript_numeric_uint32 = (a) => typeof a === "number" ? a >>> 0 : __eliscript_numeric(a) >>> 0;
|
|
103
|
-
const __eliscript_numeric_not = (a) => typeof a === "number" ? ~a : ~__eliscript_numeric(a);
|
|
104
|
-
const __eliscript_numeric_relation = (operator, left, right) => {
|
|
105
|
-
if (typeof left === "number" && typeof right === "number") {
|
|
106
|
-
if (operator === "<") return left < right;
|
|
107
|
-
if (operator === "<=") return left <= right;
|
|
108
|
-
if (operator === ">") return left > right;
|
|
109
|
-
return left >= right;
|
|
110
|
-
}
|
|
111
|
-
let a = __eliscript_numeric_primitive(left);
|
|
112
|
-
let b = __eliscript_numeric_primitive(right);
|
|
113
|
-
const x = typeof a, y = typeof b;
|
|
114
|
-
if (!((x === "string" && y === "string") || (x === "bigint" && y === "string") || (x === "string" && y === "bigint"))) {
|
|
115
|
-
a = __eliscript_numeric(a);
|
|
116
|
-
b = __eliscript_numeric(b);
|
|
117
|
-
}
|
|
118
|
-
if (operator === "<") return a < b;
|
|
119
|
-
if (operator === "<=") return a <= b;
|
|
120
|
-
if (operator === ">") return a > b;
|
|
121
|
-
return a >= b;
|
|
122
|
-
};
|
|
123
18
|
|
|
124
19
|
import {createHash} from "node:crypto";
|
|
125
20
|
import {Buffer} from "node:buffer";
|
|
@@ -129,18 +24,15 @@ import {compile_ir_string, emit_ir_string} from "../../dist/bootstrap/compiler.m
|
|
|
129
24
|
import {originalSourceCaseLocators} from "./compiler-corpus-managed-cases.mjs";
|
|
130
25
|
import * as legacy from "./compiler-corpus-runtime-adapters-legacy.mjs";
|
|
131
26
|
const originalRuntimeSourceSuites = (legacy)["originalRuntimeSourceSuites"];
|
|
132
|
-
__eliscript_tdz_ready_0 = true;
|
|
133
27
|
const isOriginalRuntimeHostOnly = (legacy)["isOriginalRuntimeHostOnly"];
|
|
134
|
-
__eliscript_tdz_ready_1 = true;
|
|
135
28
|
const originalRuntimeOnlyCase = (legacy)["originalRuntimeOnlyCase"];
|
|
136
|
-
__eliscript_tdz_ready_2 = true;
|
|
137
29
|
const suite = "tests/literal-runtime.test.mjs";
|
|
138
30
|
__eliscript_tdz_ready_3 = true;
|
|
139
31
|
const eli_source = "tests/eliscript/literal-runtime.eli";
|
|
140
32
|
__eliscript_tdz_ready_4 = true;
|
|
141
33
|
const titles = ["persistent literals and quoted data preserve language value categories", "hash-map rejects incomplete pairs in both compilers", "explicit host-only modules do not link the persistent runtime", "maintained Eliscript sources use explicit host constructors", "portable closures produce persistent values for the versioned worker codec"];
|
|
142
34
|
__eliscript_tdz_ready_5 = true;
|
|
143
|
-
const plans = [({"id": "host-only-shape", "title": (
|
|
35
|
+
const plans = [({"id": "host-only-shape", "title": (titles)[2], "record": "original-program:literal-runtime-host-only"}), ({"id": "portable-codec", "title": (titles)[4], "record": "original-program:literal-runtime-portable-codec"}), ({"id": "incomplete-map-input", "title": (titles)[1], "record": "original-sequence:literal-runtime-invalid-inputs"}), ({"id": "unbound-portable-input", "title": (titles)[4], "record": "original-sequence:literal-runtime-invalid-inputs"})];
|
|
144
36
|
__eliscript_tdz_ready_6 = true;
|
|
145
37
|
function hash(value) {
|
|
146
38
|
return ((createHash("sha256"))["update"](value))["digest"]("hex");
|
|
@@ -2,102 +2,9 @@
|
|
|
2
2
|
import { tdz as __eliscript_tdz_error, immutable as __eliscript_const_error } from "data:text/javascript;base64,Y29uc3QgRSA9IFJlZmVyZW5jZUVycm9yOyBjb25zdCBUID0gVHlwZUVycm9yOyBleHBvcnQgZnVuY3Rpb24gdGR6KG5hbWUpIHsgdGhyb3cgbmV3IEUoIkNhbm5vdCBhY2Nlc3MgJyIgKyBuYW1lICsgIicgYmVmb3JlIGluaXRpYWxpemF0aW9uIik7IH0gZXhwb3J0IGZ1bmN0aW9uIGltbXV0YWJsZSgpIHsgdGhyb3cgbmV3IFQoIkFzc2lnbm1lbnQgdG8gY29uc3RhbnQgdmFyaWFibGUuIik7IH0K";
|
|
3
3
|
var __eliscript_tdz_ready_0;
|
|
4
4
|
function __eliscript_tdz_read_0() { if (__eliscript_tdz_ready_0 !== true) __eliscript_tdz_error("original_tools_cli_records"); return original_tools_cli_records; }
|
|
5
|
-
function __eliscript_tdz_write_0(__eliscript_tdz_value_0) { if (__eliscript_tdz_ready_0 !== true) __eliscript_tdz_error("original_tools_cli_records"); return __eliscript_const_error(); }
|
|
6
|
-
var __eliscript_tdz_ready_1;
|
|
7
|
-
function __eliscript_tdz_read_1() { if (__eliscript_tdz_ready_1 !== true) __eliscript_tdz_error("main"); return main; }
|
|
8
|
-
function __eliscript_tdz_write_1(__eliscript_tdz_value_1) { if (__eliscript_tdz_ready_1 !== true) __eliscript_tdz_error("main"); return __eliscript_const_error(); }
|
|
9
5
|
import "eliscript/runtime/unicode-case.mjs";
|
|
6
|
+
import { __eliscript_to_number, __eliscript_numeric_decrement, __eliscript_numeric_relation, __eliscript_numeric_sub, __eliscript_numeric_mul, __eliscript_numeric_div, __eliscript_numeric_rem, __eliscript_numeric_and, __eliscript_numeric_or, __eliscript_numeric_xor, __eliscript_numeric_shl, __eliscript_numeric_shr, __eliscript_numeric_ushr, __eliscript_numeric_neg, __eliscript_numeric_int32, __eliscript_numeric_uint32, __eliscript_numeric_not } from "eliscript/runtime/prelude.mjs";
|
|
10
7
|
const __eliscript_truthy = (value) => value !== false && value != null;
|
|
11
|
-
const __eliscript_number_intrinsic = globalThis.Number;
|
|
12
|
-
const __eliscript_bigint_intrinsic = globalThis.BigInt;
|
|
13
|
-
const __eliscript_numeric_apply = globalThis.Reflect.apply;
|
|
14
|
-
const __eliscript_numeric_symbol = globalThis.Symbol.toPrimitive;
|
|
15
|
-
const __eliscript_numeric_error = globalThis.TypeError;
|
|
16
|
-
const __eliscript_numeric_trim = globalThis.String.prototype.trim;
|
|
17
|
-
const __eliscript_numeric_slice = globalThis.String.prototype.slice;
|
|
18
|
-
const __eliscript_numeric_exec = globalThis.RegExp.prototype.exec;
|
|
19
|
-
const __eliscript_numeric_radix = /^(?:0[xX][0-9a-fA-F]+|0[oO][0-7]+|0[bB][01]+)$/;
|
|
20
|
-
const __eliscript_numeric_object = (value) => value !== null && (typeof value === "object" || typeof value === "function" || (typeof value === "undefined" && value !== void 0));
|
|
21
|
-
const __eliscript_numeric_primitive = (value) => {
|
|
22
|
-
if (!__eliscript_numeric_object(value)) return value;
|
|
23
|
-
const exotic = value[__eliscript_numeric_symbol];
|
|
24
|
-
if (exotic !== void 0 && exotic !== null) {
|
|
25
|
-
const result = __eliscript_numeric_apply(exotic, value, ["number"]);
|
|
26
|
-
if (!__eliscript_numeric_object(result)) return result;
|
|
27
|
-
throw new __eliscript_numeric_error("Cannot convert object to primitive value");
|
|
28
|
-
}
|
|
29
|
-
for (let index = 0; index < 2; index++) {
|
|
30
|
-
const method = value[index === 0 ? "valueOf" : "toString"];
|
|
31
|
-
if (typeof method === "function" || (typeof method === "undefined" && method !== void 0)) {
|
|
32
|
-
const result = __eliscript_numeric_apply(method, value, []);
|
|
33
|
-
if (!__eliscript_numeric_object(result)) return result;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
throw new __eliscript_numeric_error("Cannot convert object to primitive value");
|
|
37
|
-
};
|
|
38
|
-
const __eliscript_to_number = (value) => {
|
|
39
|
-
const primitive = __eliscript_numeric_primitive(value);
|
|
40
|
-
if (typeof primitive === "string") {
|
|
41
|
-
const text = __eliscript_numeric_apply(__eliscript_numeric_trim, primitive, []);
|
|
42
|
-
if (__eliscript_numeric_apply(__eliscript_numeric_exec, __eliscript_numeric_radix, [text]) !== null) {
|
|
43
|
-
let first = 2;
|
|
44
|
-
while (first < text.length && text[first] === "0") first++;
|
|
45
|
-
if (first === text.length) return 0;
|
|
46
|
-
const prefix = text[1];
|
|
47
|
-
const limit = prefix === "x" || prefix === "X" ? 256 : prefix === "b" || prefix === "B" ? 1024 : 342;
|
|
48
|
-
if (text.length - first > limit) return 1 / 0;
|
|
49
|
-
const token = __eliscript_numeric_apply(__eliscript_numeric_slice, text, [0, 2]) + __eliscript_numeric_apply(__eliscript_numeric_slice, text, [first]);
|
|
50
|
-
return __eliscript_number_intrinsic(__eliscript_bigint_intrinsic(token));
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
return __eliscript_number_intrinsic(primitive);
|
|
54
|
-
};
|
|
55
|
-
const __eliscript_numeric = (value) => {
|
|
56
|
-
if (typeof value === "number" || typeof value === "bigint") return value;
|
|
57
|
-
const primitive = __eliscript_numeric_primitive(value);
|
|
58
|
-
if (typeof primitive === "number" || typeof primitive === "bigint") return primitive;
|
|
59
|
-
return typeof primitive === "string" ? __eliscript_to_number(primitive) : +primitive;
|
|
60
|
-
};
|
|
61
|
-
const __eliscript_implicit_number = (value) => {
|
|
62
|
-
if (typeof value === "number") return value;
|
|
63
|
-
const primitive = __eliscript_numeric_primitive(value);
|
|
64
|
-
if (typeof primitive === "bigint") throw new __eliscript_numeric_error("Cannot convert a BigInt value to a number");
|
|
65
|
-
return typeof primitive === "string" ? __eliscript_to_number(primitive) : +primitive;
|
|
66
|
-
};
|
|
67
|
-
const __eliscript_numeric_decrement = (value) => __eliscript_implicit_number(value) - 1;
|
|
68
|
-
const __eliscript_numeric_sub = (a, b) => { if (typeof a === "number" && typeof b === "number") return a - b; return __eliscript_numeric(a) - __eliscript_numeric(b); };
|
|
69
|
-
const __eliscript_numeric_mul = (a, b) => { if (typeof a === "number" && typeof b === "number") return a * b; return __eliscript_numeric(a) * __eliscript_numeric(b); };
|
|
70
|
-
const __eliscript_numeric_div = (a, b) => { if (typeof a === "number" && typeof b === "number") return a / b; return __eliscript_numeric(a) / __eliscript_numeric(b); };
|
|
71
|
-
const __eliscript_numeric_rem = (a, b) => { if (typeof a === "number" && typeof b === "number") return a % b; return __eliscript_numeric(a) % __eliscript_numeric(b); };
|
|
72
|
-
const __eliscript_numeric_and = (a, b) => { if (typeof a === "number" && typeof b === "number") return a & b; return __eliscript_numeric(a) & __eliscript_numeric(b); };
|
|
73
|
-
const __eliscript_numeric_or = (a, b) => { if (typeof a === "number" && typeof b === "number") return a | b; return __eliscript_numeric(a) | __eliscript_numeric(b); };
|
|
74
|
-
const __eliscript_numeric_xor = (a, b) => { if (typeof a === "number" && typeof b === "number") return a ^ b; return __eliscript_numeric(a) ^ __eliscript_numeric(b); };
|
|
75
|
-
const __eliscript_numeric_shl = (a, b) => { if (typeof a === "number" && typeof b === "number") return a << b; return __eliscript_numeric(a) << __eliscript_numeric(b); };
|
|
76
|
-
const __eliscript_numeric_shr = (a, b) => { if (typeof a === "number" && typeof b === "number") return a >> b; return __eliscript_numeric(a) >> __eliscript_numeric(b); };
|
|
77
|
-
const __eliscript_numeric_ushr = (a, b) => { if (typeof a === "number" && typeof b === "number") return a >>> b; return __eliscript_numeric(a) >>> __eliscript_numeric(b); };
|
|
78
|
-
const __eliscript_numeric_neg = (a) => typeof a === "number" ? -a : -__eliscript_numeric(a);
|
|
79
|
-
const __eliscript_numeric_int32 = (a) => typeof a === "number" ? a | 0 : __eliscript_numeric(a) | 0;
|
|
80
|
-
const __eliscript_numeric_uint32 = (a) => typeof a === "number" ? a >>> 0 : __eliscript_numeric(a) >>> 0;
|
|
81
|
-
const __eliscript_numeric_not = (a) => typeof a === "number" ? ~a : ~__eliscript_numeric(a);
|
|
82
|
-
const __eliscript_numeric_relation = (operator, left, right) => {
|
|
83
|
-
if (typeof left === "number" && typeof right === "number") {
|
|
84
|
-
if (operator === "<") return left < right;
|
|
85
|
-
if (operator === "<=") return left <= right;
|
|
86
|
-
if (operator === ">") return left > right;
|
|
87
|
-
return left >= right;
|
|
88
|
-
}
|
|
89
|
-
let a = __eliscript_numeric_primitive(left);
|
|
90
|
-
let b = __eliscript_numeric_primitive(right);
|
|
91
|
-
const x = typeof a, y = typeof b;
|
|
92
|
-
if (!((x === "string" && y === "string") || (x === "bigint" && y === "string") || (x === "string" && y === "bigint"))) {
|
|
93
|
-
a = __eliscript_numeric(a);
|
|
94
|
-
b = __eliscript_numeric(b);
|
|
95
|
-
}
|
|
96
|
-
if (operator === "<") return a < b;
|
|
97
|
-
if (operator === "<=") return a <= b;
|
|
98
|
-
if (operator === ">") return a > b;
|
|
99
|
-
return a >= b;
|
|
100
|
-
};
|
|
101
8
|
|
|
102
9
|
import {readFile, writeFile, realpath, lstat} from "node:fs/promises";
|
|
103
10
|
import {resolve, dirname, basename, isAbsolute} from "node:path";
|
|
@@ -358,6 +265,5 @@ async function runOriginalToolsCLI(arguments$) {
|
|
|
358
265
|
return ((globalThis.process)["exitCode"] = 1);
|
|
359
266
|
})) : null);
|
|
360
267
|
const main = runOriginalToolsCLI;
|
|
361
|
-
__eliscript_tdz_ready_1 = true;
|
|
362
268
|
export {authenticateOriginalToolsCLI, projectOriginalToolsCLIArguments, runOriginalToolsCLI, main};
|
|
363
269
|
//# sourceMappingURL=compiler-corpus-tools-cli.mjs.map
|
|
@@ -1,143 +1,14 @@
|
|
|
1
1
|
// Generated by Eliscript. Do not edit.
|
|
2
2
|
import { tdz as __eliscript_tdz_error, immutable as __eliscript_const_error } from "data:text/javascript;base64,Y29uc3QgRSA9IFJlZmVyZW5jZUVycm9yOyBjb25zdCBUID0gVHlwZUVycm9yOyBleHBvcnQgZnVuY3Rpb24gdGR6KG5hbWUpIHsgdGhyb3cgbmV3IEUoIkNhbm5vdCBhY2Nlc3MgJyIgKyBuYW1lICsgIicgYmVmb3JlIGluaXRpYWxpemF0aW9uIik7IH0gZXhwb3J0IGZ1bmN0aW9uIGltbXV0YWJsZSgpIHsgdGhyb3cgbmV3IFQoIkFzc2lnbm1lbnQgdG8gY29uc3RhbnQgdmFyaWFibGUuIik7IH0K";
|
|
3
|
-
var __eliscript_tdz_ready_0;
|
|
4
|
-
function __eliscript_tdz_read_0() { if (__eliscript_tdz_ready_0 !== true) __eliscript_tdz_error("configuration_path"); return configuration_path; }
|
|
5
|
-
function __eliscript_tdz_write_0(__eliscript_tdz_value_0) { if (__eliscript_tdz_ready_0 !== true) __eliscript_tdz_error("configuration_path"); return __eliscript_const_error(); }
|
|
6
|
-
var __eliscript_tdz_ready_1;
|
|
7
|
-
function __eliscript_tdz_read_1() { if (__eliscript_tdz_ready_1 !== true) __eliscript_tdz_error("configuration"); return configuration; }
|
|
8
|
-
function __eliscript_tdz_write_1(__eliscript_tdz_value_1) { if (__eliscript_tdz_ready_1 !== true) __eliscript_tdz_error("configuration"); return __eliscript_const_error(); }
|
|
9
|
-
var __eliscript_tdz_ready_2;
|
|
10
|
-
function __eliscript_tdz_read_2() { if (__eliscript_tdz_ready_2 !== true) __eliscript_tdz_error("proof"); return proof; }
|
|
11
|
-
function __eliscript_tdz_write_2(__eliscript_tdz_value_2) { if (__eliscript_tdz_ready_2 !== true) __eliscript_tdz_error("proof"); return __eliscript_const_error(); }
|
|
12
|
-
var __eliscript_tdz_ready_3;
|
|
13
|
-
function __eliscript_tdz_read_3() { if (__eliscript_tdz_ready_3 !== true) __eliscript_tdz_error("self"); return self; }
|
|
14
|
-
function __eliscript_tdz_write_3(__eliscript_tdz_value_3) { if (__eliscript_tdz_ready_3 !== true) __eliscript_tdz_error("self"); return __eliscript_const_error(); }
|
|
15
|
-
var __eliscript_tdz_ready_4;
|
|
16
|
-
function __eliscript_tdz_read_4() { if (__eliscript_tdz_ready_4 !== true) __eliscript_tdz_error("module_file"); return module_file; }
|
|
17
|
-
function __eliscript_tdz_write_4(__eliscript_tdz_value_4) { if (__eliscript_tdz_ready_4 !== true) __eliscript_tdz_error("module_file"); return __eliscript_const_error(); }
|
|
18
3
|
var __eliscript_tdz_ready_5;
|
|
19
4
|
function __eliscript_tdz_read_5() { if (__eliscript_tdz_ready_5 !== true) __eliscript_tdz_error("host"); return host; }
|
|
20
|
-
function __eliscript_tdz_write_5(__eliscript_tdz_value_5) { if (__eliscript_tdz_ready_5 !== true) __eliscript_tdz_error("host"); return __eliscript_const_error(); }
|
|
21
|
-
var __eliscript_tdz_ready_6;
|
|
22
|
-
function __eliscript_tdz_read_6() { if (__eliscript_tdz_ready_6 !== true) __eliscript_tdz_error("assets"); return assets; }
|
|
23
|
-
function __eliscript_tdz_write_6(__eliscript_tdz_value_6) { if (__eliscript_tdz_ready_6 !== true) __eliscript_tdz_error("assets"); return __eliscript_const_error(); }
|
|
24
|
-
var __eliscript_tdz_ready_7;
|
|
25
|
-
function __eliscript_tdz_read_7() { if (__eliscript_tdz_ready_7 !== true) __eliscript_tdz_error("asset"); return asset; }
|
|
26
|
-
function __eliscript_tdz_write_7(__eliscript_tdz_value_7) { if (__eliscript_tdz_ready_7 !== true) __eliscript_tdz_error("asset"); return __eliscript_const_error(); }
|
|
27
|
-
var __eliscript_tdz_ready_8;
|
|
28
|
-
function __eliscript_tdz_read_8() { if (__eliscript_tdz_ready_8 !== true) __eliscript_tdz_error("record_match"); return record_match; }
|
|
29
|
-
function __eliscript_tdz_write_8(__eliscript_tdz_value_8) { if (__eliscript_tdz_ready_8 !== true) __eliscript_tdz_error("record_match"); return __eliscript_const_error(); }
|
|
30
|
-
var __eliscript_tdz_ready_9;
|
|
31
|
-
function __eliscript_tdz_read_9() { if (__eliscript_tdz_ready_9 !== true) __eliscript_tdz_error("runtime_file"); return runtime_file; }
|
|
32
|
-
function __eliscript_tdz_write_9(__eliscript_tdz_value_9) { if (__eliscript_tdz_ready_9 !== true) __eliscript_tdz_error("runtime_file"); return __eliscript_const_error(); }
|
|
33
|
-
var __eliscript_tdz_ready_10;
|
|
34
|
-
function __eliscript_tdz_read_10() { if (__eliscript_tdz_ready_10 !== true) __eliscript_tdz_error("runtime_path"); return runtime_path; }
|
|
35
|
-
function __eliscript_tdz_write_10(__eliscript_tdz_value_10) { if (__eliscript_tdz_ready_10 !== true) __eliscript_tdz_error("runtime_path"); return __eliscript_const_error(); }
|
|
36
5
|
var __eliscript_tdz_ready_11;
|
|
37
6
|
function __eliscript_tdz_read_11() { if (__eliscript_tdz_ready_11 !== true) __eliscript_tdz_error("host_url"); return host_url; }
|
|
38
|
-
function __eliscript_tdz_write_11(__eliscript_tdz_value_11) { if (__eliscript_tdz_ready_11 !== true) __eliscript_tdz_error("host_url"); return __eliscript_const_error(); }
|
|
39
|
-
var __eliscript_tdz_ready_12;
|
|
40
|
-
function __eliscript_tdz_read_12() { if (__eliscript_tdz_ready_12 !== true) __eliscript_tdz_error("runtime_url"); return runtime_url; }
|
|
41
|
-
function __eliscript_tdz_write_12(__eliscript_tdz_value_12) { if (__eliscript_tdz_ready_12 !== true) __eliscript_tdz_error("runtime_url"); return __eliscript_const_error(); }
|
|
42
7
|
var __eliscript_tdz_ready_13;
|
|
43
8
|
function __eliscript_tdz_read_13() { if (__eliscript_tdz_ready_13 !== true) __eliscript_tdz_error("prefix"); return prefix; }
|
|
44
|
-
function __eliscript_tdz_write_13(__eliscript_tdz_value_13) { if (__eliscript_tdz_ready_13 !== true) __eliscript_tdz_error("prefix"); return __eliscript_const_error(); }
|
|
45
|
-
var __eliscript_tdz_ready_14;
|
|
46
|
-
function __eliscript_tdz_read_14() { if (__eliscript_tdz_ready_14 !== true) __eliscript_tdz_error("parents"); return parents; }
|
|
47
|
-
function __eliscript_tdz_write_14(__eliscript_tdz_value_14) { if (__eliscript_tdz_ready_14 !== true) __eliscript_tdz_error("parents"); return __eliscript_const_error(); }
|
|
48
9
|
import "eliscript/runtime/unicode-case.mjs";
|
|
49
|
-
import {
|
|
10
|
+
import { __eliscript_at, __eliscript_at_direct, __eliscript_to_number, __eliscript_numeric_decrement, __eliscript_numeric_relation, __eliscript_numeric_sub, __eliscript_numeric_mul, __eliscript_numeric_div, __eliscript_numeric_rem, __eliscript_numeric_and, __eliscript_numeric_or, __eliscript_numeric_xor, __eliscript_numeric_shl, __eliscript_numeric_shr, __eliscript_numeric_ushr, __eliscript_numeric_neg, __eliscript_numeric_int32, __eliscript_numeric_uint32, __eliscript_numeric_not } from "eliscript/runtime/prelude.mjs";
|
|
50
11
|
const __eliscript_truthy = (value) => value !== false && value != null;
|
|
51
|
-
const __eliscript_number_intrinsic = globalThis.Number;
|
|
52
|
-
const __eliscript_bigint_intrinsic = globalThis.BigInt;
|
|
53
|
-
const __eliscript_numeric_apply = globalThis.Reflect.apply;
|
|
54
|
-
const __eliscript_numeric_symbol = globalThis.Symbol.toPrimitive;
|
|
55
|
-
const __eliscript_numeric_error = globalThis.TypeError;
|
|
56
|
-
const __eliscript_numeric_trim = globalThis.String.prototype.trim;
|
|
57
|
-
const __eliscript_numeric_slice = globalThis.String.prototype.slice;
|
|
58
|
-
const __eliscript_numeric_exec = globalThis.RegExp.prototype.exec;
|
|
59
|
-
const __eliscript_numeric_radix = /^(?:0[xX][0-9a-fA-F]+|0[oO][0-7]+|0[bB][01]+)$/;
|
|
60
|
-
const __eliscript_numeric_object = (value) => value !== null && (typeof value === "object" || typeof value === "function" || (typeof value === "undefined" && value !== void 0));
|
|
61
|
-
const __eliscript_numeric_primitive = (value) => {
|
|
62
|
-
if (!__eliscript_numeric_object(value)) return value;
|
|
63
|
-
const exotic = value[__eliscript_numeric_symbol];
|
|
64
|
-
if (exotic !== void 0 && exotic !== null) {
|
|
65
|
-
const result = __eliscript_numeric_apply(exotic, value, ["number"]);
|
|
66
|
-
if (!__eliscript_numeric_object(result)) return result;
|
|
67
|
-
throw new __eliscript_numeric_error("Cannot convert object to primitive value");
|
|
68
|
-
}
|
|
69
|
-
for (let index = 0; index < 2; index++) {
|
|
70
|
-
const method = value[index === 0 ? "valueOf" : "toString"];
|
|
71
|
-
if (typeof method === "function" || (typeof method === "undefined" && method !== void 0)) {
|
|
72
|
-
const result = __eliscript_numeric_apply(method, value, []);
|
|
73
|
-
if (!__eliscript_numeric_object(result)) return result;
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
throw new __eliscript_numeric_error("Cannot convert object to primitive value");
|
|
77
|
-
};
|
|
78
|
-
const __eliscript_to_number = (value) => {
|
|
79
|
-
const primitive = __eliscript_numeric_primitive(value);
|
|
80
|
-
if (typeof primitive === "string") {
|
|
81
|
-
const text = __eliscript_numeric_apply(__eliscript_numeric_trim, primitive, []);
|
|
82
|
-
if (__eliscript_numeric_apply(__eliscript_numeric_exec, __eliscript_numeric_radix, [text]) !== null) {
|
|
83
|
-
let first = 2;
|
|
84
|
-
while (first < text.length && text[first] === "0") first++;
|
|
85
|
-
if (first === text.length) return 0;
|
|
86
|
-
const prefix = text[1];
|
|
87
|
-
const limit = prefix === "x" || prefix === "X" ? 256 : prefix === "b" || prefix === "B" ? 1024 : 342;
|
|
88
|
-
if (text.length - first > limit) return 1 / 0;
|
|
89
|
-
const token = __eliscript_numeric_apply(__eliscript_numeric_slice, text, [0, 2]) + __eliscript_numeric_apply(__eliscript_numeric_slice, text, [first]);
|
|
90
|
-
return __eliscript_number_intrinsic(__eliscript_bigint_intrinsic(token));
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
return __eliscript_number_intrinsic(primitive);
|
|
94
|
-
};
|
|
95
|
-
const __eliscript_numeric = (value) => {
|
|
96
|
-
if (typeof value === "number" || typeof value === "bigint") return value;
|
|
97
|
-
const primitive = __eliscript_numeric_primitive(value);
|
|
98
|
-
if (typeof primitive === "number" || typeof primitive === "bigint") return primitive;
|
|
99
|
-
return typeof primitive === "string" ? __eliscript_to_number(primitive) : +primitive;
|
|
100
|
-
};
|
|
101
|
-
const __eliscript_implicit_number = (value) => {
|
|
102
|
-
if (typeof value === "number") return value;
|
|
103
|
-
const primitive = __eliscript_numeric_primitive(value);
|
|
104
|
-
if (typeof primitive === "bigint") throw new __eliscript_numeric_error("Cannot convert a BigInt value to a number");
|
|
105
|
-
return typeof primitive === "string" ? __eliscript_to_number(primitive) : +primitive;
|
|
106
|
-
};
|
|
107
|
-
const __eliscript_numeric_decrement = (value) => __eliscript_implicit_number(value) - 1;
|
|
108
|
-
const __eliscript_numeric_sub = (a, b) => { if (typeof a === "number" && typeof b === "number") return a - b; return __eliscript_numeric(a) - __eliscript_numeric(b); };
|
|
109
|
-
const __eliscript_numeric_mul = (a, b) => { if (typeof a === "number" && typeof b === "number") return a * b; return __eliscript_numeric(a) * __eliscript_numeric(b); };
|
|
110
|
-
const __eliscript_numeric_div = (a, b) => { if (typeof a === "number" && typeof b === "number") return a / b; return __eliscript_numeric(a) / __eliscript_numeric(b); };
|
|
111
|
-
const __eliscript_numeric_rem = (a, b) => { if (typeof a === "number" && typeof b === "number") return a % b; return __eliscript_numeric(a) % __eliscript_numeric(b); };
|
|
112
|
-
const __eliscript_numeric_and = (a, b) => { if (typeof a === "number" && typeof b === "number") return a & b; return __eliscript_numeric(a) & __eliscript_numeric(b); };
|
|
113
|
-
const __eliscript_numeric_or = (a, b) => { if (typeof a === "number" && typeof b === "number") return a | b; return __eliscript_numeric(a) | __eliscript_numeric(b); };
|
|
114
|
-
const __eliscript_numeric_xor = (a, b) => { if (typeof a === "number" && typeof b === "number") return a ^ b; return __eliscript_numeric(a) ^ __eliscript_numeric(b); };
|
|
115
|
-
const __eliscript_numeric_shl = (a, b) => { if (typeof a === "number" && typeof b === "number") return a << b; return __eliscript_numeric(a) << __eliscript_numeric(b); };
|
|
116
|
-
const __eliscript_numeric_shr = (a, b) => { if (typeof a === "number" && typeof b === "number") return a >> b; return __eliscript_numeric(a) >> __eliscript_numeric(b); };
|
|
117
|
-
const __eliscript_numeric_ushr = (a, b) => { if (typeof a === "number" && typeof b === "number") return a >>> b; return __eliscript_numeric(a) >>> __eliscript_numeric(b); };
|
|
118
|
-
const __eliscript_numeric_neg = (a) => typeof a === "number" ? -a : -__eliscript_numeric(a);
|
|
119
|
-
const __eliscript_numeric_int32 = (a) => typeof a === "number" ? a | 0 : __eliscript_numeric(a) | 0;
|
|
120
|
-
const __eliscript_numeric_uint32 = (a) => typeof a === "number" ? a >>> 0 : __eliscript_numeric(a) >>> 0;
|
|
121
|
-
const __eliscript_numeric_not = (a) => typeof a === "number" ? ~a : ~__eliscript_numeric(a);
|
|
122
|
-
const __eliscript_numeric_relation = (operator, left, right) => {
|
|
123
|
-
if (typeof left === "number" && typeof right === "number") {
|
|
124
|
-
if (operator === "<") return left < right;
|
|
125
|
-
if (operator === "<=") return left <= right;
|
|
126
|
-
if (operator === ">") return left > right;
|
|
127
|
-
return left >= right;
|
|
128
|
-
}
|
|
129
|
-
let a = __eliscript_numeric_primitive(left);
|
|
130
|
-
let b = __eliscript_numeric_primitive(right);
|
|
131
|
-
const x = typeof a, y = typeof b;
|
|
132
|
-
if (!((x === "string" && y === "string") || (x === "bigint" && y === "string") || (x === "string" && y === "bigint"))) {
|
|
133
|
-
a = __eliscript_numeric(a);
|
|
134
|
-
b = __eliscript_numeric(b);
|
|
135
|
-
}
|
|
136
|
-
if (operator === "<") return a < b;
|
|
137
|
-
if (operator === "<=") return a <= b;
|
|
138
|
-
if (operator === ">") return a > b;
|
|
139
|
-
return a >= b;
|
|
140
|
-
};
|
|
141
12
|
|
|
142
13
|
import {spawnSync} from "node:child_process";
|
|
143
14
|
import * as Module from "node:module";
|
|
@@ -154,39 +25,27 @@ function digest(bytes) {
|
|
|
154
25
|
return ((createHash("sha256"))["update"](bytes))["digest"]("hex");
|
|
155
26
|
}
|
|
156
27
|
const configuration_path = ((globalThis.process)["env"])["ELISCRIPT_ORIGINAL_COMPILER_SESSION"];
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
const
|
|
160
|
-
__eliscript_tdz_ready_1 = true;
|
|
161
|
-
const proof = JSON.parse(readFileSync(resolve(dirname((__eliscript_tdz_read_0())), "__eliscript_tools_data_reference.json"), "utf8"));
|
|
162
|
-
__eliscript_tdz_ready_2 = true;
|
|
28
|
+
((!((((__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; } })(configuration_path) === "string") && __eliscript_numeric_relation(">", ((configuration_path) ?? []).length, 0))) ? fail("the actual original session configuration is required") : null);
|
|
29
|
+
const configuration = JSON.parse(readFileSync(configuration_path, "utf8"));
|
|
30
|
+
const proof = JSON.parse(readFileSync(resolve(dirname(configuration_path), "__eliscript_tools_data_reference.json"), "utf8"));
|
|
163
31
|
const self = fileURLToPath(import.meta.url);
|
|
164
|
-
__eliscript_tdz_ready_3 = true;
|
|
165
32
|
const module_file = "tools/backends/compiler-corpus-tools-reference.mjs";
|
|
166
|
-
__eliscript_tdz_ready_4 = true;
|
|
167
33
|
const host = realpathSync(((globalThis.process)["argv"])[1]);
|
|
168
34
|
__eliscript_tdz_ready_5 = true;
|
|
169
|
-
const assets = (
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
return ((entry)["file"] === (__eliscript_tdz_read_4()));
|
|
35
|
+
const assets = (proof)["sourceAssets"];
|
|
36
|
+
const asset = (__eliscript_truthy(Array.isArray(assets)) ? (assets)["find"](((entry) => {
|
|
37
|
+
return ((entry)["file"] === module_file);
|
|
173
38
|
})) : null);
|
|
174
|
-
|
|
175
|
-
const record_match = ((((__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; } })(((__eliscript_tdz_read_2()))["recordId"]) === "string") ? (new (globalThis.RegExp)("^original-(?:tools-artifact|managed):compiler-session-tools:(node|bun)$"))["exec"](((__eliscript_tdz_read_2()))["recordId"]) : null);
|
|
176
|
-
__eliscript_tdz_ready_8 = true;
|
|
39
|
+
const record_match = ((((__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; } })((proof)["recordId"]) === "string") ? (new (globalThis.RegExp)("^original-(?:tools-artifact|managed):compiler-session-tools:(node|bun)$"))["exec"]((proof)["recordId"]) : null);
|
|
177
40
|
const runtime_file = "runtime/unicode-case.mjs";
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
((!__eliscript_truthy(((__eliscript_value_2) => (__eliscript_truthy(__eliscript_value_2) ? ((__eliscript_value_3) => (__eliscript_truthy(__eliscript_value_3) ? ((__eliscript_value_4) => (__eliscript_truthy(__eliscript_value_4) ? ((__eliscript_value_5) => (__eliscript_truthy(__eliscript_value_5) ? ((__eliscript_value_6) => (__eliscript_truthy(__eliscript_value_6) ? ((__eliscript_value_7) => (__eliscript_truthy(__eliscript_value_7) ? ((__eliscript_value_8) => (__eliscript_truthy(__eliscript_value_8) ? ((__eliscript_value_9) => (__eliscript_truthy(__eliscript_value_9) ? ((__eliscript_value_10) => (__eliscript_truthy(__eliscript_value_10) ? ((__eliscript_value_11) => (__eliscript_truthy(__eliscript_value_11) ? ((__eliscript_value_12) => (__eliscript_truthy(__eliscript_value_12) ? ((__eliscript_value_13) => (__eliscript_truthy(__eliscript_value_13) ? ((__eliscript_value_14) => (__eliscript_truthy(__eliscript_value_14) ? ((__eliscript_value_15) => (__eliscript_truthy(__eliscript_value_15) ? ((((__eliscript_tdz_read_7()))["sourceSha256"] === digest(readFileSync((__eliscript_tdz_read_3())))) && (((__eliscript_tdz_read_2()))["transportHostSha256"] === digest(readFileSync((__eliscript_tdz_read_5()))))) : __eliscript_value_15))((__eliscript_tdz_read_7())) : __eliscript_value_14))((((__eliscript_tdz_read_2()))["runtimeSha256"] === digest(readFileSync((__eliscript_tdz_read_10()))))) : __eliscript_value_13))((realpathSync((__eliscript_tdz_read_10())) === (__eliscript_tdz_read_10()))) : __eliscript_value_12))((realpathSync((__eliscript_tdz_read_3())) === realpathSync(resolve(root, (__eliscript_tdz_read_4()))))) : __eliscript_value_11))((((__eliscript_tdz_read_2()))["runtimeFile"] === (__eliscript_tdz_read_9()))) : __eliscript_value_10))((((__eliscript_tdz_read_2()))["moduleFile"] === (__eliscript_tdz_read_4()))) : __eliscript_value_9))((realpathSync((__eliscript_tdz_read_0())) === realpathSync(((__eliscript_tdz_read_2()))["configurationPath"]))) : __eliscript_value_8))((((__eliscript_tdz_read_2()))["sourceRoot"] === ((__eliscript_tdz_read_1()))["sourceRoot"])) : __eliscript_value_7))((realpathSync(root) === realpathSync(((__eliscript_tdz_read_1()))["sourceRoot"]))) : __eliscript_value_6))((((__eliscript_tdz_read_1()))["target"] === "javascript")) : __eliscript_value_5))((((__eliscript_tdz_read_8()))[1] === (__eliscript_truthy(globalThis.Bun) ? "bun" : "node"))) : __eliscript_value_4))((__eliscript_tdz_read_8())) : __eliscript_value_3))((((__eliscript_tdz_read_2()))["version"] === 1)) : __eliscript_value_2))((((__eliscript_tdz_read_2()))["kind"] === "original-tools-data-reference")))) ? fail("the original host or dependency differs from its authenticated source transport") : null);
|
|
182
|
-
const host_url = (pathToFileURL((__eliscript_tdz_read_5())))["href"];
|
|
41
|
+
const runtime_path = resolve(root, runtime_file);
|
|
42
|
+
((!__eliscript_truthy(((__eliscript_value_2) => (__eliscript_truthy(__eliscript_value_2) ? ((__eliscript_value_3) => (__eliscript_truthy(__eliscript_value_3) ? ((__eliscript_value_4) => (__eliscript_truthy(__eliscript_value_4) ? ((__eliscript_value_5) => (__eliscript_truthy(__eliscript_value_5) ? ((__eliscript_value_6) => (__eliscript_truthy(__eliscript_value_6) ? ((__eliscript_value_7) => (__eliscript_truthy(__eliscript_value_7) ? ((__eliscript_value_8) => (__eliscript_truthy(__eliscript_value_8) ? ((__eliscript_value_9) => (__eliscript_truthy(__eliscript_value_9) ? ((__eliscript_value_10) => (__eliscript_truthy(__eliscript_value_10) ? ((__eliscript_value_11) => (__eliscript_truthy(__eliscript_value_11) ? ((__eliscript_value_12) => (__eliscript_truthy(__eliscript_value_12) ? ((__eliscript_value_13) => (__eliscript_truthy(__eliscript_value_13) ? ((__eliscript_value_14) => (__eliscript_truthy(__eliscript_value_14) ? ((__eliscript_value_15) => (__eliscript_truthy(__eliscript_value_15) ? (((asset)["sourceSha256"] === digest(readFileSync(self))) && ((proof)["transportHostSha256"] === digest(readFileSync(host)))) : __eliscript_value_15))(asset) : __eliscript_value_14))(((proof)["runtimeSha256"] === digest(readFileSync(runtime_path)))) : __eliscript_value_13))((realpathSync(runtime_path) === runtime_path)) : __eliscript_value_12))((realpathSync(self) === realpathSync(resolve(root, module_file)))) : __eliscript_value_11))(((proof)["runtimeFile"] === runtime_file)) : __eliscript_value_10))(((proof)["moduleFile"] === module_file)) : __eliscript_value_9))((realpathSync(configuration_path) === realpathSync((proof)["configurationPath"]))) : __eliscript_value_8))(((proof)["sourceRoot"] === (configuration)["sourceRoot"])) : __eliscript_value_7))((realpathSync(root) === realpathSync((configuration)["sourceRoot"]))) : __eliscript_value_6))(((configuration)["target"] === "javascript")) : __eliscript_value_5))(((record_match)[1] === (__eliscript_truthy(globalThis.Bun) ? "bun" : "node"))) : __eliscript_value_4))(record_match) : __eliscript_value_3))(((proof)["version"] === 1)) : __eliscript_value_2))(((proof)["kind"] === "original-tools-data-reference")))) ? fail("the original host or dependency differs from its authenticated source transport") : null);
|
|
43
|
+
const host_url = (pathToFileURL(host))["href"];
|
|
183
44
|
__eliscript_tdz_ready_11 = true;
|
|
184
|
-
const runtime_url = (pathToFileURL(
|
|
185
|
-
__eliscript_tdz_ready_12 = true;
|
|
45
|
+
const runtime_url = (pathToFileURL(runtime_path))["href"];
|
|
186
46
|
const prefix = "data:text/javascript;base64,";
|
|
187
47
|
__eliscript_tdz_ready_13 = true;
|
|
188
48
|
const parents = new (globalThis.Set)();
|
|
189
|
-
__eliscript_tdz_ready_14 = true;
|
|
190
49
|
function data_bytes(specifier) {
|
|
191
50
|
{
|
|
192
51
|
let encoded = (specifier)["slice"]((((__eliscript_tdz_read_13())) ?? []).length);
|
|
@@ -205,11 +64,11 @@ function host_parent_p(parent) {
|
|
|
205
64
|
fail("the selected Node host requires synchronous module hooks");
|
|
206
65
|
}
|
|
207
66
|
return (Module)["registerHooks"](({"resolve": ((specifier, context, nextResolve) => {
|
|
208
|
-
if (__eliscript_truthy(((__eliscript_value_16) => (__eliscript_truthy(__eliscript_value_16) ? ((__eliscript_value_18) => (__eliscript_truthy(__eliscript_value_18) ? (specifier)["startsWith"](
|
|
67
|
+
if (__eliscript_truthy(((__eliscript_value_16) => (__eliscript_truthy(__eliscript_value_16) ? ((__eliscript_value_18) => (__eliscript_truthy(__eliscript_value_18) ? (specifier)["startsWith"](prefix) : __eliscript_value_18))((((__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; } })(specifier) === "string")) : __eliscript_value_16))(((__eliscript_value_17) => (__eliscript_truthy(__eliscript_value_17) ? __eliscript_value_17 : (parents)["has"]((context)["parentURL"])))(host_parent_p((context)["parentURL"]))))) {
|
|
209
68
|
data_bytes(specifier);
|
|
210
|
-
(
|
|
69
|
+
(parents)["add"](specifier);
|
|
211
70
|
}
|
|
212
|
-
return nextResolve((__eliscript_truthy(((__eliscript_value_19) => (__eliscript_truthy(__eliscript_value_19) ? (
|
|
71
|
+
return nextResolve((__eliscript_truthy(((__eliscript_value_19) => (__eliscript_truthy(__eliscript_value_19) ? (parents)["has"]((context)["parentURL"]) : __eliscript_value_19))((specifier === "eliscript/runtime/unicode-case.mjs"))) ? runtime_url : specifier), context);
|
|
213
72
|
})}));
|
|
214
73
|
})() : (globalThis.Bun)["plugin"](({"name": "authenticated-original-tools-data", "setup": ((builder) => {
|
|
215
74
|
(builder)["onResolve"](({"filter": new (globalThis.RegExp)("^data:text/javascript;base64,")}), ((request) => {
|
|
@@ -219,7 +78,7 @@ function host_parent_p(parent) {
|
|
|
219
78
|
{
|
|
220
79
|
let path = __eliscript_value_20;
|
|
221
80
|
data_bytes(path);
|
|
222
|
-
(
|
|
81
|
+
(parents)["add"](path);
|
|
223
82
|
return ({"path": path, "namespace": "original-tools-data"});
|
|
224
83
|
}
|
|
225
84
|
}
|
|
@@ -228,7 +87,7 @@ function host_parent_p(parent) {
|
|
|
228
87
|
}
|
|
229
88
|
}));
|
|
230
89
|
(builder)["onResolve"](({"filter": new (globalThis.RegExp)("^data:text/javascript;base64,"), "namespace": "original-tools-data"}), ((request) => {
|
|
231
|
-
if ((!__eliscript_truthy((
|
|
90
|
+
if ((!__eliscript_truthy((parents)["has"]((request)["importer"])))) {
|
|
232
91
|
fail("unrecognized original data importer");
|
|
233
92
|
}
|
|
234
93
|
{
|
|
@@ -236,25 +95,25 @@ function host_parent_p(parent) {
|
|
|
236
95
|
{
|
|
237
96
|
let path = __eliscript_value_21;
|
|
238
97
|
data_bytes(path);
|
|
239
|
-
(
|
|
98
|
+
(parents)["add"](path);
|
|
240
99
|
return ({"path": path, "namespace": "original-tools-data"});
|
|
241
100
|
}
|
|
242
101
|
}
|
|
243
102
|
}));
|
|
244
103
|
(builder)["onLoad"](({"filter": new (globalThis.RegExp)(".*"), "namespace": "original-tools-data"}), ((request) => {
|
|
245
|
-
if ((!__eliscript_truthy((
|
|
104
|
+
if ((!__eliscript_truthy((parents)["has"]((request)["path"])))) {
|
|
246
105
|
fail("unrecognized original data module");
|
|
247
106
|
}
|
|
248
107
|
return ({"contents": data_bytes((request)["path"]), "loader": "js"});
|
|
249
108
|
}));
|
|
250
109
|
(builder)["onResolve"](({"filter": new (globalThis.RegExp)("^eliscript/runtime/unicode-case[.]mjs$"), "namespace": "original-tools-data"}), ((request) => {
|
|
251
|
-
if ((!__eliscript_truthy((
|
|
110
|
+
if ((!__eliscript_truthy((parents)["has"]((request)["importer"])))) {
|
|
252
111
|
fail("unrecognized original data importer");
|
|
253
112
|
}
|
|
254
|
-
return ({"path":
|
|
113
|
+
return ({"path": runtime_path, "namespace": "file"});
|
|
255
114
|
}));
|
|
256
115
|
return (builder)["onResolve"](({"filter": new (globalThis.RegExp)("^file:"), "namespace": "original-tools-data"}), ((request) => {
|
|
257
|
-
if ((!__eliscript_truthy((
|
|
116
|
+
if ((!__eliscript_truthy((parents)["has"]((request)["importer"])))) {
|
|
258
117
|
fail("unrecognized original data importer");
|
|
259
118
|
}
|
|
260
119
|
return ({"path": fileURLToPath((request)["path"]), "namespace": "file"});
|