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
|
@@ -2,141 +2,37 @@
|
|
|
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("evaluation_operation_format"); return evaluation_operation_format; }
|
|
5
|
-
function __eliscript_tdz_write_0(__eliscript_tdz_value_0) { if (__eliscript_tdz_ready_0 !== true) __eliscript_tdz_error("evaluation_operation_format"); return __eliscript_const_error(); }
|
|
6
5
|
var __eliscript_tdz_ready_1;
|
|
7
6
|
function __eliscript_tdz_read_1() { if (__eliscript_tdz_ready_1 !== true) __eliscript_tdz_error("evaluation_operation_version"); return evaluation_operation_version; }
|
|
8
|
-
function __eliscript_tdz_write_1(__eliscript_tdz_value_1) { if (__eliscript_tdz_ready_1 !== true) __eliscript_tdz_error("evaluation_operation_version"); return __eliscript_const_error(); }
|
|
9
7
|
var __eliscript_tdz_ready_2;
|
|
10
8
|
function __eliscript_tdz_read_2() { if (__eliscript_tdz_ready_2 !== true) __eliscript_tdz_error("evaluation_input_format"); return evaluation_input_format; }
|
|
11
|
-
function __eliscript_tdz_write_2(__eliscript_tdz_value_2) { if (__eliscript_tdz_ready_2 !== true) __eliscript_tdz_error("evaluation_input_format"); return __eliscript_const_error(); }
|
|
12
9
|
var __eliscript_tdz_ready_3;
|
|
13
10
|
function __eliscript_tdz_read_3() { if (__eliscript_tdz_ready_3 !== true) __eliscript_tdz_error("evaluation_input_version"); return evaluation_input_version; }
|
|
14
|
-
function __eliscript_tdz_write_3(__eliscript_tdz_value_3) { if (__eliscript_tdz_ready_3 !== true) __eliscript_tdz_error("evaluation_input_version"); return __eliscript_const_error(); }
|
|
15
11
|
var __eliscript_tdz_ready_4;
|
|
16
12
|
function __eliscript_tdz_read_4() { if (__eliscript_tdz_ready_4 !== true) __eliscript_tdz_error("evaluation_form_format"); return evaluation_form_format; }
|
|
17
|
-
function __eliscript_tdz_write_4(__eliscript_tdz_value_4) { if (__eliscript_tdz_ready_4 !== true) __eliscript_tdz_error("evaluation_form_format"); return __eliscript_const_error(); }
|
|
18
13
|
var __eliscript_tdz_ready_5;
|
|
19
14
|
function __eliscript_tdz_read_5() { if (__eliscript_tdz_ready_5 !== true) __eliscript_tdz_error("evaluation_form_version"); return evaluation_form_version; }
|
|
20
|
-
function __eliscript_tdz_write_5(__eliscript_tdz_value_5) { if (__eliscript_tdz_ready_5 !== true) __eliscript_tdz_error("evaluation_form_version"); return __eliscript_const_error(); }
|
|
21
15
|
var __eliscript_tdz_ready_6;
|
|
22
16
|
function __eliscript_tdz_read_6() { if (__eliscript_tdz_ready_6 !== true) __eliscript_tdz_error("evaluation_module_format"); return evaluation_module_format; }
|
|
23
|
-
function __eliscript_tdz_write_6(__eliscript_tdz_value_6) { if (__eliscript_tdz_ready_6 !== true) __eliscript_tdz_error("evaluation_module_format"); return __eliscript_const_error(); }
|
|
24
17
|
var __eliscript_tdz_ready_7;
|
|
25
18
|
function __eliscript_tdz_read_7() { if (__eliscript_tdz_ready_7 !== true) __eliscript_tdz_error("evaluation_module_version"); return evaluation_module_version; }
|
|
26
|
-
function __eliscript_tdz_write_7(__eliscript_tdz_value_7) { if (__eliscript_tdz_ready_7 !== true) __eliscript_tdz_error("evaluation_module_version"); return __eliscript_const_error(); }
|
|
27
19
|
var __eliscript_tdz_ready_8;
|
|
28
20
|
function __eliscript_tdz_read_8() { if (__eliscript_tdz_ready_8 !== true) __eliscript_tdz_error("evaluation_operation_keys"); return evaluation_operation_keys; }
|
|
29
|
-
function __eliscript_tdz_write_8(__eliscript_tdz_value_8) { if (__eliscript_tdz_ready_8 !== true) __eliscript_tdz_error("evaluation_operation_keys"); return __eliscript_const_error(); }
|
|
30
21
|
var __eliscript_tdz_ready_9;
|
|
31
22
|
function __eliscript_tdz_read_9() { if (__eliscript_tdz_ready_9 !== true) __eliscript_tdz_error("evaluation_definition_heads"); return evaluation_definition_heads; }
|
|
32
|
-
function __eliscript_tdz_write_9(__eliscript_tdz_value_9) { if (__eliscript_tdz_ready_9 !== true) __eliscript_tdz_error("evaluation_definition_heads"); return __eliscript_const_error(); }
|
|
33
23
|
var __eliscript_tdz_ready_10;
|
|
34
24
|
function __eliscript_tdz_read_10() { if (__eliscript_tdz_ready_10 !== true) __eliscript_tdz_error("evaluation_module_heads"); return evaluation_module_heads; }
|
|
35
|
-
function __eliscript_tdz_write_10(__eliscript_tdz_value_10) { if (__eliscript_tdz_ready_10 !== true) __eliscript_tdz_error("evaluation_module_heads"); return __eliscript_const_error(); }
|
|
36
25
|
var __eliscript_tdz_ready_11;
|
|
37
26
|
function __eliscript_tdz_read_11() { if (__eliscript_tdz_ready_11 !== true) __eliscript_tdz_error("evaluation_fail"); return evaluation_fail; }
|
|
38
|
-
function __eliscript_tdz_write_11(__eliscript_tdz_value_11) { if (__eliscript_tdz_ready_11 !== true) __eliscript_tdz_error("evaluation_fail"); return __eliscript_const_error(); }
|
|
39
27
|
var __eliscript_tdz_ready_12;
|
|
40
28
|
function __eliscript_tdz_read_12() { if (__eliscript_tdz_ready_12 !== true) __eliscript_tdz_error("evaluation_object_p"); return evaluation_object_p; }
|
|
41
|
-
function __eliscript_tdz_write_12(__eliscript_tdz_value_12) { if (__eliscript_tdz_ready_12 !== true) __eliscript_tdz_error("evaluation_object_p"); return __eliscript_const_error(); }
|
|
42
29
|
var __eliscript_tdz_ready_13;
|
|
43
30
|
function __eliscript_tdz_read_13() { if (__eliscript_tdz_ready_13 !== true) __eliscript_tdz_error("evaluation_id_p"); return evaluation_id_p; }
|
|
44
|
-
function __eliscript_tdz_write_13(__eliscript_tdz_value_13) { if (__eliscript_tdz_ready_13 !== true) __eliscript_tdz_error("evaluation_id_p"); return __eliscript_const_error(); }
|
|
45
31
|
var __eliscript_tdz_ready_14;
|
|
46
32
|
function __eliscript_tdz_read_14() { if (__eliscript_tdz_ready_14 !== true) __eliscript_tdz_error("evaluation_positive_integer_p"); return evaluation_positive_integer_p; }
|
|
47
|
-
function __eliscript_tdz_write_14(__eliscript_tdz_value_14) { if (__eliscript_tdz_ready_14 !== true) __eliscript_tdz_error("evaluation_positive_integer_p"); return __eliscript_const_error(); }
|
|
48
33
|
import "eliscript/runtime/unicode-case.mjs";
|
|
34
|
+
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";
|
|
49
35
|
const __eliscript_truthy = (value) => value !== false && value != null;
|
|
50
|
-
const __eliscript_number_intrinsic = globalThis.Number;
|
|
51
|
-
const __eliscript_bigint_intrinsic = globalThis.BigInt;
|
|
52
|
-
const __eliscript_numeric_apply = globalThis.Reflect.apply;
|
|
53
|
-
const __eliscript_numeric_symbol = globalThis.Symbol.toPrimitive;
|
|
54
|
-
const __eliscript_numeric_error = globalThis.TypeError;
|
|
55
|
-
const __eliscript_numeric_trim = globalThis.String.prototype.trim;
|
|
56
|
-
const __eliscript_numeric_slice = globalThis.String.prototype.slice;
|
|
57
|
-
const __eliscript_numeric_exec = globalThis.RegExp.prototype.exec;
|
|
58
|
-
const __eliscript_numeric_radix = /^(?:0[xX][0-9a-fA-F]+|0[oO][0-7]+|0[bB][01]+)$/;
|
|
59
|
-
const __eliscript_numeric_object = (value) => value !== null && (typeof value === "object" || typeof value === "function" || (typeof value === "undefined" && value !== void 0));
|
|
60
|
-
const __eliscript_numeric_primitive = (value) => {
|
|
61
|
-
if (!__eliscript_numeric_object(value)) return value;
|
|
62
|
-
const exotic = value[__eliscript_numeric_symbol];
|
|
63
|
-
if (exotic !== void 0 && exotic !== null) {
|
|
64
|
-
const result = __eliscript_numeric_apply(exotic, value, ["number"]);
|
|
65
|
-
if (!__eliscript_numeric_object(result)) return result;
|
|
66
|
-
throw new __eliscript_numeric_error("Cannot convert object to primitive value");
|
|
67
|
-
}
|
|
68
|
-
for (let index = 0; index < 2; index++) {
|
|
69
|
-
const method = value[index === 0 ? "valueOf" : "toString"];
|
|
70
|
-
if (typeof method === "function" || (typeof method === "undefined" && method !== void 0)) {
|
|
71
|
-
const result = __eliscript_numeric_apply(method, value, []);
|
|
72
|
-
if (!__eliscript_numeric_object(result)) return result;
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
throw new __eliscript_numeric_error("Cannot convert object to primitive value");
|
|
76
|
-
};
|
|
77
|
-
const __eliscript_to_number = (value) => {
|
|
78
|
-
const primitive = __eliscript_numeric_primitive(value);
|
|
79
|
-
if (typeof primitive === "string") {
|
|
80
|
-
const text = __eliscript_numeric_apply(__eliscript_numeric_trim, primitive, []);
|
|
81
|
-
if (__eliscript_numeric_apply(__eliscript_numeric_exec, __eliscript_numeric_radix, [text]) !== null) {
|
|
82
|
-
let first = 2;
|
|
83
|
-
while (first < text.length && text[first] === "0") first++;
|
|
84
|
-
if (first === text.length) return 0;
|
|
85
|
-
const prefix = text[1];
|
|
86
|
-
const limit = prefix === "x" || prefix === "X" ? 256 : prefix === "b" || prefix === "B" ? 1024 : 342;
|
|
87
|
-
if (text.length - first > limit) return 1 / 0;
|
|
88
|
-
const token = __eliscript_numeric_apply(__eliscript_numeric_slice, text, [0, 2]) + __eliscript_numeric_apply(__eliscript_numeric_slice, text, [first]);
|
|
89
|
-
return __eliscript_number_intrinsic(__eliscript_bigint_intrinsic(token));
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
return __eliscript_number_intrinsic(primitive);
|
|
93
|
-
};
|
|
94
|
-
const __eliscript_numeric = (value) => {
|
|
95
|
-
if (typeof value === "number" || typeof value === "bigint") return value;
|
|
96
|
-
const primitive = __eliscript_numeric_primitive(value);
|
|
97
|
-
if (typeof primitive === "number" || typeof primitive === "bigint") return primitive;
|
|
98
|
-
return typeof primitive === "string" ? __eliscript_to_number(primitive) : +primitive;
|
|
99
|
-
};
|
|
100
|
-
const __eliscript_implicit_number = (value) => {
|
|
101
|
-
if (typeof value === "number") return value;
|
|
102
|
-
const primitive = __eliscript_numeric_primitive(value);
|
|
103
|
-
if (typeof primitive === "bigint") throw new __eliscript_numeric_error("Cannot convert a BigInt value to a number");
|
|
104
|
-
return typeof primitive === "string" ? __eliscript_to_number(primitive) : +primitive;
|
|
105
|
-
};
|
|
106
|
-
const __eliscript_numeric_decrement = (value) => __eliscript_implicit_number(value) - 1;
|
|
107
|
-
const __eliscript_numeric_sub = (a, b) => { if (typeof a === "number" && typeof b === "number") return a - b; return __eliscript_numeric(a) - __eliscript_numeric(b); };
|
|
108
|
-
const __eliscript_numeric_mul = (a, b) => { if (typeof a === "number" && typeof b === "number") return a * b; return __eliscript_numeric(a) * __eliscript_numeric(b); };
|
|
109
|
-
const __eliscript_numeric_div = (a, b) => { if (typeof a === "number" && typeof b === "number") return a / b; return __eliscript_numeric(a) / __eliscript_numeric(b); };
|
|
110
|
-
const __eliscript_numeric_rem = (a, b) => { if (typeof a === "number" && typeof b === "number") return a % b; return __eliscript_numeric(a) % __eliscript_numeric(b); };
|
|
111
|
-
const __eliscript_numeric_and = (a, b) => { if (typeof a === "number" && typeof b === "number") return a & b; return __eliscript_numeric(a) & __eliscript_numeric(b); };
|
|
112
|
-
const __eliscript_numeric_or = (a, b) => { if (typeof a === "number" && typeof b === "number") return a | b; return __eliscript_numeric(a) | __eliscript_numeric(b); };
|
|
113
|
-
const __eliscript_numeric_xor = (a, b) => { if (typeof a === "number" && typeof b === "number") return a ^ b; return __eliscript_numeric(a) ^ __eliscript_numeric(b); };
|
|
114
|
-
const __eliscript_numeric_shl = (a, b) => { if (typeof a === "number" && typeof b === "number") return a << b; return __eliscript_numeric(a) << __eliscript_numeric(b); };
|
|
115
|
-
const __eliscript_numeric_shr = (a, b) => { if (typeof a === "number" && typeof b === "number") return a >> b; return __eliscript_numeric(a) >> __eliscript_numeric(b); };
|
|
116
|
-
const __eliscript_numeric_ushr = (a, b) => { if (typeof a === "number" && typeof b === "number") return a >>> b; return __eliscript_numeric(a) >>> __eliscript_numeric(b); };
|
|
117
|
-
const __eliscript_numeric_neg = (a) => typeof a === "number" ? -a : -__eliscript_numeric(a);
|
|
118
|
-
const __eliscript_numeric_int32 = (a) => typeof a === "number" ? a | 0 : __eliscript_numeric(a) | 0;
|
|
119
|
-
const __eliscript_numeric_uint32 = (a) => typeof a === "number" ? a >>> 0 : __eliscript_numeric(a) >>> 0;
|
|
120
|
-
const __eliscript_numeric_not = (a) => typeof a === "number" ? ~a : ~__eliscript_numeric(a);
|
|
121
|
-
const __eliscript_numeric_relation = (operator, left, right) => {
|
|
122
|
-
if (typeof left === "number" && typeof right === "number") {
|
|
123
|
-
if (operator === "<") return left < right;
|
|
124
|
-
if (operator === "<=") return left <= right;
|
|
125
|
-
if (operator === ">") return left > right;
|
|
126
|
-
return left >= right;
|
|
127
|
-
}
|
|
128
|
-
let a = __eliscript_numeric_primitive(left);
|
|
129
|
-
let b = __eliscript_numeric_primitive(right);
|
|
130
|
-
const x = typeof a, y = typeof b;
|
|
131
|
-
if (!((x === "string" && y === "string") || (x === "bigint" && y === "string") || (x === "string" && y === "bigint"))) {
|
|
132
|
-
a = __eliscript_numeric(a);
|
|
133
|
-
b = __eliscript_numeric(b);
|
|
134
|
-
}
|
|
135
|
-
if (operator === "<") return a < b;
|
|
136
|
-
if (operator === "<=") return a <= b;
|
|
137
|
-
if (operator === ">") return a > b;
|
|
138
|
-
return a >= b;
|
|
139
|
-
};
|
|
140
36
|
|
|
141
37
|
import {read_string} from "./reader.mjs";
|
|
142
38
|
import {formatter_format, formatter_version, formatter_width, formatter_indent, format_source} from "./formatter.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bootstrap/compiler.mjs","sources":["bootstrap/compiler/compiler.eli"],"sourcesContent":["(module bootstrap.compiler.compiler\n (import \"./reader.mjs\" read-string)\n (import \"./formatter.mjs\"\n formatter-format\n formatter-version\n formatter-width\n formatter-indent\n format-source)\n (import \"./expander.mjs\" expand-module expand-module-with-origins\n expand-owned-module expand-owned-module-with-origins)\n (import \"./analyzer.mjs\" analyze-module select-portable-module)\n (import \"./lower.mjs\" lower-module lower-owned-module)\n (import \"./ir.mjs\" ir-format ir-version serialize-program deserialize-program)\n (import \"./emitter.mjs\" emit-module emit-module-with-source-map)\n (import \"./project.mjs\"\n project-plan-format\n project-plan-version\n project-plan\n portable-project-plan\n project-build-report-format\n project-build-report-version\n project-build-report\n project-request-format\n project-request-version\n project-request\n project-configuration\n build-operation-format\n build-operation-version\n build-operation-request\n check-operation-format\n check-operation-version\n check-operation-request\n project-check-report-format\n project-check-report-version\n project-check-report\n project-cache-format\n project-cache-version\n project-cache-lookup\n project-cache-decision)\n (defconst evaluation-operation-format \"eliscript-evaluation-operation\")\n (defconst evaluation-operation-version 1)\n (defconst evaluation-input-format \"eliscript-evaluation-input\")\n (defconst evaluation-input-version 1)\n (defconst evaluation-form-format \"eliscript-evaluation-form\")\n (defconst evaluation-form-version 1)\n (defconst evaluation-module-format \"eliscript-evaluation-module\")\n (defconst evaluation-module-version 1)\n (defconst evaluation-operation-keys\n (js-array \"id\" \"operation\" \"source\" \"filename\" \"root\" \"line\" \"column\"))\n (defconst evaluation-definition-heads\n (js-array\n \"defasync\" \"defconst\" \"defmacro\" \"defmulti\"\n \"defn\" \"defportable\" \"defprotocol\" \"defun\" \"defvar\"))\n (defconst evaluation-module-heads\n (js-array \"export\" \"export-default\" \"import\" \"import-portable\" \"module\"))\n (defconst evaluation-fail\n (lambda (message filename)\n (let* ((error (new (js* \"Error\") message))\n (diagnostic (js-object :format \"eliscript-diagnostic\" :version 1\n :code \"ELI-E0001\" :severity \"error\" :phase \"evaluation-request\" :message message)))\n (when (js* \"!!filename\")\n (put diagnostic :location (js-object :file filename)))\n (put error :eliscriptDiagnostic diagnostic)\n (throw error))))\n (defconst evaluation-object-p\n (lambda (value)\n (and (not (nil? value)) (= (js* \"typeof value\") \"object\") (not (Array/isArray value)))))\n (defconst evaluation-id-p\n (lambda (value)\n (or (nil? value) (and (= (js* \"typeof value\") \"string\") (> (js-length value) 0))\n (and (Number/isSafeInteger value) (>= value 0)))))\n (defconst evaluation-positive-integer-p\n (lambda (value)\n (and (Number/isSafeInteger value) (>= value 1))))\n (defun compile-ir-string\n (source filename &optional macro-context)\n (let*\n ((read-forms (read-string source filename))\n (expanded-forms (expand-owned-module read-forms filename macro-context)))\n ;; Expansion keeps any shared leaves it needs. Release the separate\n ;; reader tree before analysis and lowering allocate their output.\n (setq read-forms nil)\n (analyze-module expanded-forms filename)\n (lower-owned-module expanded-forms filename)))\n (defun compile-ir-string-with-origins (source filename &optional macro-context)\n (let* ((expansion (expand-owned-module-with-origins (read-string source filename) filename macro-context))\n (forms (get expansion :forms)))\n (analyze-module forms filename)\n (js-object :program (lower-owned-module forms filename) :macroOrigins (get expansion :macroOrigins))))\n (defun evaluation-object-field\n (value key fallback)\n (if (js-call globalThis.Object :hasOwn value key) (get value key) fallback))\n (defun evaluation-require-source\n (source filename)\n (unless (and (= (js* \"typeof source\") \"string\") (> (get source :length) 0))\n (funcall evaluation-fail \"evaluation source must be a non-empty string\" filename))\n source)\n (defun evaluation-require-filename\n (filename)\n (unless (and (= (js* \"typeof filename\") \"string\") (> (get filename :length) 0))\n (funcall evaluation-fail \"evaluation filename must be a non-empty string\" false))\n filename)\n (defun evaluation-input-result\n (status filename)\n (js-call\n globalThis.Object\n :freeze\n (js-object\n :format\n evaluation-input-format\n :version\n evaluation-input-version\n :status\n status\n :filename\n filename)))\n (defun evaluation-input-description\n (source filename)\n (evaluation-require-filename filename)\n (unless (= (js* \"typeof source\") \"string\")\n (funcall evaluation-fail \"evaluation input source must be a string\" filename))\n (try\n (let ((forms (read-string source filename)))\n (cond ((= (get forms :length) 0) (evaluation-input-result \"empty\" filename))\n ((= (get forms :length) 1) (evaluation-input-result \"complete\" filename))\n (t\n (funcall\n evaluation-fail\n \"interactive input must contain exactly one top-level form\"\n filename))))\n (catch error\n (let ((diagnostic (get error :eliscriptDiagnostic nil)))\n (if\n (and\n diagnostic\n (= (get diagnostic :code nil) \"ELI-R0001\")\n (= (get diagnostic :message nil) \"unexpected end of input\"))\n (evaluation-input-result \"incomplete\" filename)\n (throw error))))))\n (defun evaluation-operation-request\n (input)\n (unless (funcall evaluation-object-p input)\n (funcall evaluation-fail \"evaluation operation request must be an object\" false))\n (js-call\n (js-call globalThis.Object :keys input)\n :forEach\n (lambda\n (key)\n (unless (js-call evaluation-operation-keys :includes key)\n (funcall evaluation-fail (str \"unknown evaluation operation key: \" key) false))))\n (let*\n ((id (evaluation-object-field input \"id\" nil))\n (operation (get input :operation)))\n (unless (funcall evaluation-id-p id)\n (funcall\n evaluation-fail\n \"evaluation operation id must be null, a non-empty string, or a non-negative safe integer\"\n false))\n (unless\n (js-call (js-array \"describe\" \"evaluate\" \"load\" \"reset\") :includes operation)\n (funcall\n evaluation-fail\n \"evaluation operation must be describe, evaluate, load, or reset\"\n false))\n (if (or (= operation \"evaluate\") (= operation \"load\"))\n (let*\n ((filename (evaluation-require-filename (get input :filename)))\n (source (evaluation-require-source (get input :source) filename))\n (root (evaluation-object-field input \"root\" nil))\n (line (evaluation-object-field input \"line\" 1))\n (column (evaluation-object-field input \"column\" 1)))\n (unless\n (or\n (nil? root)\n (and (= (js* \"typeof root\") \"string\") (> (get root :length) 0)))\n (funcall\n evaluation-fail\n \"evaluation root must be null or a non-empty string\"\n filename))\n (unless (funcall evaluation-positive-integer-p line)\n (funcall\n evaluation-fail\n \"evaluation line must be a positive safe integer\"\n filename))\n (unless (funcall evaluation-positive-integer-p column)\n (funcall\n evaluation-fail\n \"evaluation column must be a positive safe integer\"\n filename))\n (js-call\n globalThis.Object\n :freeze\n (js-object\n :format\n evaluation-operation-format\n :version\n evaluation-operation-version\n :id\n id\n :operation\n operation\n :source\n source\n :filename\n filename\n :root\n root\n :line\n line\n :column\n column)))\n (progn\n (when\n (or\n (js-call globalThis.Object :hasOwn input \"source\")\n (js-call globalThis.Object :hasOwn input \"filename\")\n (js-call globalThis.Object :hasOwn input \"root\")\n (js-call globalThis.Object :hasOwn input \"line\")\n (js-call globalThis.Object :hasOwn input \"column\"))\n (funcall\n evaluation-fail\n (str operation \" evaluation operation does not accept source fields\")\n false))\n (js-call\n globalThis.Object\n :freeze\n (js-object\n :format\n evaluation-operation-format\n :version\n evaluation-operation-version\n :id\n id\n :operation\n operation))))))\n (defun evaluation-form-head\n (form)\n (if (= (get form :kind) \"list\")\n (let ((items (get form :items)))\n (if (> (get items :length) 0)\n (let ((head (js-nth 0 items)))\n (if (= (get head :kind) \"symbol\") (get head :name) false))\n false))\n false))\n (defun evaluation-form-description\n (source filename)\n (evaluation-require-filename filename)\n (evaluation-require-source source filename)\n (let ((forms (read-string source filename)))\n (unless (= (get forms :length) 1)\n (funcall\n evaluation-fail\n \"evaluate requires exactly one top-level form\"\n filename))\n (let*\n ((form (js-nth 0 forms))\n (head (evaluation-form-head form))\n (definition (and head (js-call evaluation-definition-heads :includes head)))\n (module-form (and head (js-call evaluation-module-heads :includes head)))\n (name\n (if definition\n (let ((items (get form :items)))\n (if (> (get items :length) 1)\n (let ((candidate (js-nth 1 items)))\n (if (= (get candidate :kind) \"symbol\") (get candidate :name) false))\n false))\n false)))\n (when (and definition (not name))\n (funcall\n evaluation-fail\n (str head \" evaluation form requires a symbol name\")\n filename))\n (js-call\n globalThis.Object\n :freeze\n (js-object\n :format\n evaluation-form-format\n :version\n evaluation-form-version\n :kind\n (cond (definition \"definition\") (module-form \"module\") (t \"expression\"))\n :head\n (or head nil)\n :name\n (or name nil)\n :runtimeBinding\n (and definition (not (= head \"defmacro\")))\n :filename\n filename)))))\n (defun evaluation-add-name\n (names seen value)\n (when\n (and\n (= (js* \"typeof value\") \"string\")\n (> (get value :length) 0)\n (not (js-call seen :has value)))\n (js-call seen :add value)\n (js-call names :push value)))\n (defun evaluation-collect-ir-names\n (nodes bindings binding-set exports export-set)\n (js-call\n nodes\n :forEach\n (lambda\n (node)\n (let ((kind (get node :kind)))\n (cond\n ((or (= kind \"function-declaration\") (= kind \"variable-declaration\"))\n (evaluation-add-name bindings binding-set (get node :value)))\n ((= kind \"import-declaration\")\n (js-call\n (get node :children)\n :forEach\n (lambda\n (child)\n (when (= (get child :kind) \"import-named\")\n (evaluation-add-name bindings binding-set (get child :value))))))\n ((= kind \"export-declaration\")\n (js-call\n (get node :children)\n :forEach\n (lambda\n (child)\n (evaluation-add-name exports export-set (get child :value)))))\n ((= kind \"module-declaration\")\n (evaluation-collect-ir-names\n (get node :children)\n bindings\n binding-set\n exports\n export-set)))))))\n (defun evaluation-collect-macro-sources\n (forms source result)\n (js-call\n forms\n :forEach\n (lambda\n (form)\n (let ((head (evaluation-form-head form)))\n (cond\n ((= head \"defmacro\")\n (let ((span (get form :span)))\n (js-call\n result\n :push\n (js-call source :slice (get span :start) (get span :end)))))\n ((= head \"module\")\n (evaluation-collect-macro-sources\n (js-call (get form :items) :slice 2)\n source\n result)))))))\n (defun evaluation-module-description\n (source filename)\n (evaluation-require-filename filename)\n (evaluation-require-source source filename)\n (let*\n ((program (compile-ir-string source filename))\n (bindings (js-array))\n (binding-set (new globalThis.Set))\n (exports (js-array))\n (export-set (new globalThis.Set))\n (macro-sources (js-array)))\n (evaluation-collect-ir-names\n (get program :body)\n bindings\n binding-set\n exports\n export-set)\n (evaluation-collect-macro-sources\n (read-string source filename)\n source\n macro-sources)\n (js-call bindings :sort)\n (js-call exports :sort)\n (js-call globalThis.Object :freeze bindings)\n (js-call globalThis.Object :freeze exports)\n (js-call globalThis.Object :freeze macro-sources)\n (js-call\n globalThis.Object\n :freeze\n (js-object\n :format\n evaluation-module-format\n :version\n evaluation-module-version\n :filename\n filename\n :bindings\n bindings\n :exports\n exports\n :macroSources\n macro-sources))))\n (defun compile-string\n (source filename)\n (emit-module (compile-ir-string source filename)))\n (defun compile-portable-ir-string\n (source entries filename &optional macro-context)\n (let*\n ((read-forms (read-string source filename))\n (expanded-forms (expand-owned-module read-forms filename macro-context)))\n (setq read-forms nil)\n (analyze-module expanded-forms filename)\n (let ((selected (select-portable-module expanded-forms entries filename)))\n (setq expanded-forms nil)\n (lower-owned-module selected filename))))\n (defun compile-project-portable-ir-string\n (source entries filename &optional macro-context)\n (let*\n ((read-forms (read-string source filename))\n (expanded-forms (expand-owned-module read-forms filename macro-context)))\n (setq read-forms nil)\n (analyze-module expanded-forms filename)\n (let ((selected (select-portable-module expanded-forms entries filename t)))\n (setq expanded-forms nil)\n (lower-owned-module selected filename))))\n (defun emit-ir-string (program) (emit-module program))\n (defun serialize-ir-program (program) (serialize-program program))\n (defun deserialize-ir-program (source) (deserialize-program source))\n (defun emit-ir-string-with-source-map\n (program source generated-name source-name)\n (emit-module-with-source-map program source generated-name source-name))\n (defun compile-portable-string\n (source entries filename)\n (emit-module (compile-portable-ir-string source entries filename)))\n (defun compile-portable-string-with-source-map\n (source entries filename generated-name source-name)\n (emit-module-with-source-map\n (compile-portable-ir-string source entries filename)\n source\n generated-name\n (or source-name filename \"<string>\")))\n (defun compile-string-with-source-map\n (source filename generated-name source-name)\n (emit-module-with-source-map\n (compile-ir-string source filename)\n source\n generated-name\n (or source-name filename \"<string>\")))\n (export\n compile-ir-string\n compile-ir-string-with-origins\n compile-project-portable-ir-string\n compile-string\n compile-portable-ir-string\n compile-portable-string\n compile-portable-string-with-source-map\n compile-string-with-source-map\n emit-ir-string\n emit-ir-string-with-source-map\n serialize-ir-program\n deserialize-ir-program\n evaluation-operation-format\n evaluation-operation-version\n evaluation-operation-request\n evaluation-input-format\n evaluation-input-version\n evaluation-input-description\n evaluation-form-format\n evaluation-form-version\n evaluation-form-description\n evaluation-module-format\n evaluation-module-version\n evaluation-module-description\n formatter-format\n formatter-version\n formatter-width\n formatter-indent\n format-source\n ir-format\n ir-version\n project-plan-format\n project-plan-version\n project-plan\n portable-project-plan\n project-build-report-format\n project-build-report-version\n project-build-report\n project-request-format\n project-request-version\n project-request\n project-configuration\n build-operation-format\n build-operation-version\n build-operation-request\n check-operation-format\n check-operation-version\n check-operation-request\n project-check-report-format\n project-check-report-version\n project-check-report\n project-cache-format\n project-cache-version\n project-cache-lookup\n project-cache-decision))\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACE,QAAuB;AACvB,QACE,kBACA,mBACA,iBACA,kBACA;AACF,QAAyB,eAAc,4BACrC,qBAAoB;AACtB,QAAyB,gBAAe;AACxC,QAAsB,cAAa;AACnC,QAAmB,WAAU,YAAW,mBAAkB;AAC1D,QAAwB,aAAY;AACpC,QACE,qBACA,sBACA,cACA,uBACA,6BACA,8BACA,sBACA,wBACA,yBACA,iBACA,uBACA,wBACA,yBACA,yBACA,wBACA,yBACA,yBACA,6BACA,8BACA,sBACA,sBACA,uBACA,sBACA;AACF,oCAAsC;;AACtC,qCAAuC;;AACvC,gCAAkC;;AAClC,iCAAmC;;AACnC,+BAAiC;;AACjC,gCAAkC;;AAClC,iCAAmC;;AACnC,kCAAoC;;AACpC,kCACE,CAAU,MAAK,aAAY,UAAS,YAAW,QAAO,QAAO;;AAC/D,oCACE,CACE,YAAW,YAAW,YAAW,YACjC,QAAO,eAAc,eAAc,SAAQ;;AAC/C,gCACE,CAAU,UAAS,kBAAiB,UAAS,mBAAkB;;AACjE,wBACE,EAAS,SAAQ;EACf;gCAAc,KAAK,OAAc;;UAA1B;;oCACY,EAAW,UAAQ,wBAAuB,WAAS,GAC7D,QAAM,aAAY,YAAU,SAAQ,SAAO,sBAAqB,WAAS;;cAD3E;UAEL,IAAM;YACJ,EAAK,YAAW,cAAU,EAAW,QAAM;;UA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,SAAQ,UAAS,gBAAe;EACxC,OAAC,4BACE,2BAA2B,QAAO,SAAQ,WAC3C,QACA,gBACA,4LAAyB,aAAT,YAAZ;;AACR,wCACG,QAAO,UAAS,gBAAe;EAChC,OAAC,4BACE,kBAAkB,QAAO,WAC1B,QACA,gBACA,4LAAyB,aAAT,YAAZ;;AACR,QACE,mBACA,gCACA,oCACA,gBACA,4BACA,yBACA,yCACA,gCACA,gBACA,gCACA,sBACA,wBACA,6BACA,8BACA,8BACA,yBACA,0BACA,8BACA,wBACA,yBACA,6BACA,0BACA,2BACA,+BACA,kBACA,mBACA,iBACA,kBACA,eACA,WACA,YACA,qBACA,sBACA,cACA,uBACA,6BACA,8BACA,sBACA,wBACA,yBACA,iBACA,uBACA,wBACA,yBACA,yBACA,wBACA,yBACA,yBACA,6BACA,8BACA,sBACA,sBACA,uBACA,sBACA"}
|
|
1
|
+
{"version":3,"file":"bootstrap/compiler.mjs","sources":["bootstrap/compiler/compiler.eli"],"sourcesContent":["(module bootstrap.compiler.compiler\n (import \"./reader.mjs\" read-string)\n (import \"./formatter.mjs\"\n formatter-format\n formatter-version\n formatter-width\n formatter-indent\n format-source)\n (import \"./expander.mjs\" expand-module expand-module-with-origins\n expand-owned-module expand-owned-module-with-origins)\n (import \"./analyzer.mjs\" analyze-module select-portable-module)\n (import \"./lower.mjs\" lower-module lower-owned-module)\n (import \"./ir.mjs\" ir-format ir-version serialize-program deserialize-program)\n (import \"./emitter.mjs\" emit-module emit-module-with-source-map)\n (import \"./project.mjs\"\n project-plan-format\n project-plan-version\n project-plan\n portable-project-plan\n project-build-report-format\n project-build-report-version\n project-build-report\n project-request-format\n project-request-version\n project-request\n project-configuration\n build-operation-format\n build-operation-version\n build-operation-request\n check-operation-format\n check-operation-version\n check-operation-request\n project-check-report-format\n project-check-report-version\n project-check-report\n project-cache-format\n project-cache-version\n project-cache-lookup\n project-cache-decision)\n (defconst evaluation-operation-format \"eliscript-evaluation-operation\")\n (defconst evaluation-operation-version 1)\n (defconst evaluation-input-format \"eliscript-evaluation-input\")\n (defconst evaluation-input-version 1)\n (defconst evaluation-form-format \"eliscript-evaluation-form\")\n (defconst evaluation-form-version 1)\n (defconst evaluation-module-format \"eliscript-evaluation-module\")\n (defconst evaluation-module-version 1)\n (defconst evaluation-operation-keys\n (js-array \"id\" \"operation\" \"source\" \"filename\" \"root\" \"line\" \"column\"))\n (defconst evaluation-definition-heads\n (js-array\n \"defasync\" \"defconst\" \"defmacro\" \"defmulti\"\n \"defn\" \"defportable\" \"defprotocol\" \"defun\" \"defvar\"))\n (defconst evaluation-module-heads\n (js-array \"export\" \"export-default\" \"import\" \"import-portable\" \"module\"))\n (defconst evaluation-fail\n (lambda (message filename)\n (let* ((error (new (js* \"Error\") message))\n (diagnostic (js-object :format \"eliscript-diagnostic\" :version 1\n :code \"ELI-E0001\" :severity \"error\" :phase \"evaluation-request\" :message message)))\n (when (js* \"!!filename\")\n (put diagnostic :location (js-object :file filename)))\n (put error :eliscriptDiagnostic diagnostic)\n (throw error))))\n (defconst evaluation-object-p\n (lambda (value)\n (and (not (nil? value)) (= (js* \"typeof value\") \"object\") (not (Array/isArray value)))))\n (defconst evaluation-id-p\n (lambda (value)\n (or (nil? value) (and (= (js* \"typeof value\") \"string\") (> (js-length value) 0))\n (and (Number/isSafeInteger value) (>= value 0)))))\n (defconst evaluation-positive-integer-p\n (lambda (value)\n (and (Number/isSafeInteger value) (>= value 1))))\n (defun compile-ir-string\n (source filename &optional macro-context)\n (let*\n ((read-forms (read-string source filename))\n (expanded-forms (expand-owned-module read-forms filename macro-context)))\n ;; Expansion keeps any shared leaves it needs. Release the separate\n ;; reader tree before analysis and lowering allocate their output.\n (setq read-forms nil)\n (analyze-module expanded-forms filename)\n (lower-owned-module expanded-forms filename)))\n (defun compile-ir-string-with-origins (source filename &optional macro-context)\n (let* ((expansion (expand-owned-module-with-origins (read-string source filename) filename macro-context))\n (forms (get expansion :forms)))\n (analyze-module forms filename)\n (js-object :program (lower-owned-module forms filename) :macroOrigins (get expansion :macroOrigins))))\n (defun evaluation-object-field\n (value key fallback)\n (if (js-call globalThis.Object :hasOwn value key) (get value key) fallback))\n (defun evaluation-require-source\n (source filename)\n (unless (and (= (js* \"typeof source\") \"string\") (> (get source :length) 0))\n (funcall evaluation-fail \"evaluation source must be a non-empty string\" filename))\n source)\n (defun evaluation-require-filename\n (filename)\n (unless (and (= (js* \"typeof filename\") \"string\") (> (get filename :length) 0))\n (funcall evaluation-fail \"evaluation filename must be a non-empty string\" false))\n filename)\n (defun evaluation-input-result\n (status filename)\n (js-call\n globalThis.Object\n :freeze\n (js-object\n :format\n evaluation-input-format\n :version\n evaluation-input-version\n :status\n status\n :filename\n filename)))\n (defun evaluation-input-description\n (source filename)\n (evaluation-require-filename filename)\n (unless (= (js* \"typeof source\") \"string\")\n (funcall evaluation-fail \"evaluation input source must be a string\" filename))\n (try\n (let ((forms (read-string source filename)))\n (cond ((= (get forms :length) 0) (evaluation-input-result \"empty\" filename))\n ((= (get forms :length) 1) (evaluation-input-result \"complete\" filename))\n (t\n (funcall\n evaluation-fail\n \"interactive input must contain exactly one top-level form\"\n filename))))\n (catch error\n (let ((diagnostic (get error :eliscriptDiagnostic nil)))\n (if\n (and\n diagnostic\n (= (get diagnostic :code nil) \"ELI-R0001\")\n (= (get diagnostic :message nil) \"unexpected end of input\"))\n (evaluation-input-result \"incomplete\" filename)\n (throw error))))))\n (defun evaluation-operation-request\n (input)\n (unless (funcall evaluation-object-p input)\n (funcall evaluation-fail \"evaluation operation request must be an object\" false))\n (js-call\n (js-call globalThis.Object :keys input)\n :forEach\n (lambda\n (key)\n (unless (js-call evaluation-operation-keys :includes key)\n (funcall evaluation-fail (str \"unknown evaluation operation key: \" key) false))))\n (let*\n ((id (evaluation-object-field input \"id\" nil))\n (operation (get input :operation)))\n (unless (funcall evaluation-id-p id)\n (funcall\n evaluation-fail\n \"evaluation operation id must be null, a non-empty string, or a non-negative safe integer\"\n false))\n (unless\n (js-call (js-array \"describe\" \"evaluate\" \"load\" \"reset\") :includes operation)\n (funcall\n evaluation-fail\n \"evaluation operation must be describe, evaluate, load, or reset\"\n false))\n (if (or (= operation \"evaluate\") (= operation \"load\"))\n (let*\n ((filename (evaluation-require-filename (get input :filename)))\n (source (evaluation-require-source (get input :source) filename))\n (root (evaluation-object-field input \"root\" nil))\n (line (evaluation-object-field input \"line\" 1))\n (column (evaluation-object-field input \"column\" 1)))\n (unless\n (or\n (nil? root)\n (and (= (js* \"typeof root\") \"string\") (> (get root :length) 0)))\n (funcall\n evaluation-fail\n \"evaluation root must be null or a non-empty string\"\n filename))\n (unless (funcall evaluation-positive-integer-p line)\n (funcall\n evaluation-fail\n \"evaluation line must be a positive safe integer\"\n filename))\n (unless (funcall evaluation-positive-integer-p column)\n (funcall\n evaluation-fail\n \"evaluation column must be a positive safe integer\"\n filename))\n (js-call\n globalThis.Object\n :freeze\n (js-object\n :format\n evaluation-operation-format\n :version\n evaluation-operation-version\n :id\n id\n :operation\n operation\n :source\n source\n :filename\n filename\n :root\n root\n :line\n line\n :column\n column)))\n (progn\n (when\n (or\n (js-call globalThis.Object :hasOwn input \"source\")\n (js-call globalThis.Object :hasOwn input \"filename\")\n (js-call globalThis.Object :hasOwn input \"root\")\n (js-call globalThis.Object :hasOwn input \"line\")\n (js-call globalThis.Object :hasOwn input \"column\"))\n (funcall\n evaluation-fail\n (str operation \" evaluation operation does not accept source fields\")\n false))\n (js-call\n globalThis.Object\n :freeze\n (js-object\n :format\n evaluation-operation-format\n :version\n evaluation-operation-version\n :id\n id\n :operation\n operation))))))\n (defun evaluation-form-head\n (form)\n (if (= (get form :kind) \"list\")\n (let ((items (get form :items)))\n (if (> (get items :length) 0)\n (let ((head (js-nth 0 items)))\n (if (= (get head :kind) \"symbol\") (get head :name) false))\n false))\n false))\n (defun evaluation-form-description\n (source filename)\n (evaluation-require-filename filename)\n (evaluation-require-source source filename)\n (let ((forms (read-string source filename)))\n (unless (= (get forms :length) 1)\n (funcall\n evaluation-fail\n \"evaluate requires exactly one top-level form\"\n filename))\n (let*\n ((form (js-nth 0 forms))\n (head (evaluation-form-head form))\n (definition (and head (js-call evaluation-definition-heads :includes head)))\n (module-form (and head (js-call evaluation-module-heads :includes head)))\n (name\n (if definition\n (let ((items (get form :items)))\n (if (> (get items :length) 1)\n (let ((candidate (js-nth 1 items)))\n (if (= (get candidate :kind) \"symbol\") (get candidate :name) false))\n false))\n false)))\n (when (and definition (not name))\n (funcall\n evaluation-fail\n (str head \" evaluation form requires a symbol name\")\n filename))\n (js-call\n globalThis.Object\n :freeze\n (js-object\n :format\n evaluation-form-format\n :version\n evaluation-form-version\n :kind\n (cond (definition \"definition\") (module-form \"module\") (t \"expression\"))\n :head\n (or head nil)\n :name\n (or name nil)\n :runtimeBinding\n (and definition (not (= head \"defmacro\")))\n :filename\n filename)))))\n (defun evaluation-add-name\n (names seen value)\n (when\n (and\n (= (js* \"typeof value\") \"string\")\n (> (get value :length) 0)\n (not (js-call seen :has value)))\n (js-call seen :add value)\n (js-call names :push value)))\n (defun evaluation-collect-ir-names\n (nodes bindings binding-set exports export-set)\n (js-call\n nodes\n :forEach\n (lambda\n (node)\n (let ((kind (get node :kind)))\n (cond\n ((or (= kind \"function-declaration\") (= kind \"variable-declaration\"))\n (evaluation-add-name bindings binding-set (get node :value)))\n ((= kind \"import-declaration\")\n (js-call\n (get node :children)\n :forEach\n (lambda\n (child)\n (when (= (get child :kind) \"import-named\")\n (evaluation-add-name bindings binding-set (get child :value))))))\n ((= kind \"export-declaration\")\n (js-call\n (get node :children)\n :forEach\n (lambda\n (child)\n (evaluation-add-name exports export-set (get child :value)))))\n ((= kind \"module-declaration\")\n (evaluation-collect-ir-names\n (get node :children)\n bindings\n binding-set\n exports\n export-set)))))))\n (defun evaluation-collect-macro-sources\n (forms source result)\n (js-call\n forms\n :forEach\n (lambda\n (form)\n (let ((head (evaluation-form-head form)))\n (cond\n ((= head \"defmacro\")\n (let ((span (get form :span)))\n (js-call\n result\n :push\n (js-call source :slice (get span :start) (get span :end)))))\n ((= head \"module\")\n (evaluation-collect-macro-sources\n (js-call (get form :items) :slice 2)\n source\n result)))))))\n (defun evaluation-module-description\n (source filename)\n (evaluation-require-filename filename)\n (evaluation-require-source source filename)\n (let*\n ((program (compile-ir-string source filename))\n (bindings (js-array))\n (binding-set (new globalThis.Set))\n (exports (js-array))\n (export-set (new globalThis.Set))\n (macro-sources (js-array)))\n (evaluation-collect-ir-names\n (get program :body)\n bindings\n binding-set\n exports\n export-set)\n (evaluation-collect-macro-sources\n (read-string source filename)\n source\n macro-sources)\n (js-call bindings :sort)\n (js-call exports :sort)\n (js-call globalThis.Object :freeze bindings)\n (js-call globalThis.Object :freeze exports)\n (js-call globalThis.Object :freeze macro-sources)\n (js-call\n globalThis.Object\n :freeze\n (js-object\n :format\n evaluation-module-format\n :version\n evaluation-module-version\n :filename\n filename\n :bindings\n bindings\n :exports\n exports\n :macroSources\n macro-sources))))\n (defun compile-string\n (source filename)\n (emit-module (compile-ir-string source filename)))\n (defun compile-portable-ir-string\n (source entries filename &optional macro-context)\n (let*\n ((read-forms (read-string source filename))\n (expanded-forms (expand-owned-module read-forms filename macro-context)))\n (setq read-forms nil)\n (analyze-module expanded-forms filename)\n (let ((selected (select-portable-module expanded-forms entries filename)))\n (setq expanded-forms nil)\n (lower-owned-module selected filename))))\n (defun compile-project-portable-ir-string\n (source entries filename &optional macro-context)\n (let*\n ((read-forms (read-string source filename))\n (expanded-forms (expand-owned-module read-forms filename macro-context)))\n (setq read-forms nil)\n (analyze-module expanded-forms filename)\n (let ((selected (select-portable-module expanded-forms entries filename t)))\n (setq expanded-forms nil)\n (lower-owned-module selected filename))))\n (defun emit-ir-string (program) (emit-module program))\n (defun serialize-ir-program (program) (serialize-program program))\n (defun deserialize-ir-program (source) (deserialize-program source))\n (defun emit-ir-string-with-source-map\n (program source generated-name source-name)\n (emit-module-with-source-map program source generated-name source-name))\n (defun compile-portable-string\n (source entries filename)\n (emit-module (compile-portable-ir-string source entries filename)))\n (defun compile-portable-string-with-source-map\n (source entries filename generated-name source-name)\n (emit-module-with-source-map\n (compile-portable-ir-string source entries filename)\n source\n generated-name\n (or source-name filename \"<string>\")))\n (defun compile-string-with-source-map\n (source filename generated-name source-name)\n (emit-module-with-source-map\n (compile-ir-string source filename)\n source\n generated-name\n (or source-name filename \"<string>\")))\n (export\n compile-ir-string\n compile-ir-string-with-origins\n compile-project-portable-ir-string\n compile-string\n compile-portable-ir-string\n compile-portable-string\n compile-portable-string-with-source-map\n compile-string-with-source-map\n emit-ir-string\n emit-ir-string-with-source-map\n serialize-ir-program\n deserialize-ir-program\n evaluation-operation-format\n evaluation-operation-version\n evaluation-operation-request\n evaluation-input-format\n evaluation-input-version\n evaluation-input-description\n evaluation-form-format\n evaluation-form-version\n evaluation-form-description\n evaluation-module-format\n evaluation-module-version\n evaluation-module-description\n formatter-format\n formatter-version\n formatter-width\n formatter-indent\n format-source\n ir-format\n ir-version\n project-plan-format\n project-plan-version\n project-plan\n portable-project-plan\n project-build-report-format\n project-build-report-version\n project-build-report\n project-request-format\n project-request-version\n project-request\n project-configuration\n build-operation-format\n build-operation-version\n build-operation-request\n check-operation-format\n check-operation-version\n check-operation-request\n project-check-report-format\n project-check-report-version\n project-check-report\n project-cache-format\n project-cache-version\n project-cache-lookup\n project-cache-decision))\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACE,QAAuB;AACvB,QACE,kBACA,mBACA,iBACA,kBACA;AACF,QAAyB,eAAc,4BACrC,qBAAoB;AACtB,QAAyB,gBAAe;AACxC,QAAsB,cAAa;AACnC,QAAmB,WAAU,YAAW,mBAAkB;AAC1D,QAAwB,aAAY;AACpC,QACE,qBACA,sBACA,cACA,uBACA,6BACA,8BACA,sBACA,wBACA,yBACA,iBACA,uBACA,wBACA,yBACA,yBACA,wBACA,yBACA,yBACA,6BACA,8BACA,sBACA,sBACA,uBACA,sBACA;AACF,oCAAsC;;AACtC,qCAAuC;;AACvC,g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