eliscript 0.0.4 → 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-abi.el +170 -0
- package/editor/eliscript-async.el +375 -0
- package/editor/eliscript-bind.el +822 -0
- package/editor/eliscript-compat.el +346 -0
- package/editor/eliscript-contract.el +334 -0
- package/editor/eliscript-data.el +1544 -0
- package/editor/eliscript-js.el +318 -0
- package/editor/eliscript-mode.el +1 -1
- package/editor/eliscript-module.el +340 -0
- package/editor/eliscript-repl.el +1 -1
- package/package.json +4 -1
- package/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 -0
- package/runtime/emacs-compat.mjs +13734 -0
- 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,108 +2,15 @@
|
|
|
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("id"); return id; }
|
|
5
|
-
function __eliscript_tdz_write_0(__eliscript_tdz_value_0) { if (__eliscript_tdz_ready_0 !== true) __eliscript_tdz_error("id"); 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("suite"); return suite; }
|
|
8
|
-
function __eliscript_tdz_write_1(__eliscript_tdz_value_1) { if (__eliscript_tdz_ready_1 !== true) __eliscript_tdz_error("suite"); 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("suite_sha"); return suite_sha; }
|
|
11
|
-
function __eliscript_tdz_write_2(__eliscript_tdz_value_2) { if (__eliscript_tdz_ready_2 !== true) __eliscript_tdz_error("suite_sha"); 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("files"); return files; }
|
|
14
|
-
function __eliscript_tdz_write_3(__eliscript_tdz_value_3) { if (__eliscript_tdz_ready_3 !== true) __eliscript_tdz_error("files"); return __eliscript_const_error(); }
|
|
15
11
|
import "eliscript/runtime/unicode-case.mjs";
|
|
12
|
+
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";
|
|
16
13
|
const __eliscript_truthy = (value) => value !== false && value != null;
|
|
17
|
-
const __eliscript_number_intrinsic = globalThis.Number;
|
|
18
|
-
const __eliscript_bigint_intrinsic = globalThis.BigInt;
|
|
19
|
-
const __eliscript_numeric_apply = globalThis.Reflect.apply;
|
|
20
|
-
const __eliscript_numeric_symbol = globalThis.Symbol.toPrimitive;
|
|
21
|
-
const __eliscript_numeric_error = globalThis.TypeError;
|
|
22
|
-
const __eliscript_numeric_trim = globalThis.String.prototype.trim;
|
|
23
|
-
const __eliscript_numeric_slice = globalThis.String.prototype.slice;
|
|
24
|
-
const __eliscript_numeric_exec = globalThis.RegExp.prototype.exec;
|
|
25
|
-
const __eliscript_numeric_radix = /^(?:0[xX][0-9a-fA-F]+|0[oO][0-7]+|0[bB][01]+)$/;
|
|
26
|
-
const __eliscript_numeric_object = (value) => value !== null && (typeof value === "object" || typeof value === "function" || (typeof value === "undefined" && value !== void 0));
|
|
27
|
-
const __eliscript_numeric_primitive = (value) => {
|
|
28
|
-
if (!__eliscript_numeric_object(value)) return value;
|
|
29
|
-
const exotic = value[__eliscript_numeric_symbol];
|
|
30
|
-
if (exotic !== void 0 && exotic !== null) {
|
|
31
|
-
const result = __eliscript_numeric_apply(exotic, value, ["number"]);
|
|
32
|
-
if (!__eliscript_numeric_object(result)) return result;
|
|
33
|
-
throw new __eliscript_numeric_error("Cannot convert object to primitive value");
|
|
34
|
-
}
|
|
35
|
-
for (let index = 0; index < 2; index++) {
|
|
36
|
-
const method = value[index === 0 ? "valueOf" : "toString"];
|
|
37
|
-
if (typeof method === "function" || (typeof method === "undefined" && method !== void 0)) {
|
|
38
|
-
const result = __eliscript_numeric_apply(method, value, []);
|
|
39
|
-
if (!__eliscript_numeric_object(result)) return result;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
throw new __eliscript_numeric_error("Cannot convert object to primitive value");
|
|
43
|
-
};
|
|
44
|
-
const __eliscript_to_number = (value) => {
|
|
45
|
-
const primitive = __eliscript_numeric_primitive(value);
|
|
46
|
-
if (typeof primitive === "string") {
|
|
47
|
-
const text = __eliscript_numeric_apply(__eliscript_numeric_trim, primitive, []);
|
|
48
|
-
if (__eliscript_numeric_apply(__eliscript_numeric_exec, __eliscript_numeric_radix, [text]) !== null) {
|
|
49
|
-
let first = 2;
|
|
50
|
-
while (first < text.length && text[first] === "0") first++;
|
|
51
|
-
if (first === text.length) return 0;
|
|
52
|
-
const prefix = text[1];
|
|
53
|
-
const limit = prefix === "x" || prefix === "X" ? 256 : prefix === "b" || prefix === "B" ? 1024 : 342;
|
|
54
|
-
if (text.length - first > limit) return 1 / 0;
|
|
55
|
-
const token = __eliscript_numeric_apply(__eliscript_numeric_slice, text, [0, 2]) + __eliscript_numeric_apply(__eliscript_numeric_slice, text, [first]);
|
|
56
|
-
return __eliscript_number_intrinsic(__eliscript_bigint_intrinsic(token));
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
return __eliscript_number_intrinsic(primitive);
|
|
60
|
-
};
|
|
61
|
-
const __eliscript_numeric = (value) => {
|
|
62
|
-
if (typeof value === "number" || typeof value === "bigint") return value;
|
|
63
|
-
const primitive = __eliscript_numeric_primitive(value);
|
|
64
|
-
if (typeof primitive === "number" || typeof primitive === "bigint") return primitive;
|
|
65
|
-
return typeof primitive === "string" ? __eliscript_to_number(primitive) : +primitive;
|
|
66
|
-
};
|
|
67
|
-
const __eliscript_implicit_number = (value) => {
|
|
68
|
-
if (typeof value === "number") return value;
|
|
69
|
-
const primitive = __eliscript_numeric_primitive(value);
|
|
70
|
-
if (typeof primitive === "bigint") throw new __eliscript_numeric_error("Cannot convert a BigInt value to a number");
|
|
71
|
-
return typeof primitive === "string" ? __eliscript_to_number(primitive) : +primitive;
|
|
72
|
-
};
|
|
73
|
-
const __eliscript_numeric_decrement = (value) => __eliscript_implicit_number(value) - 1;
|
|
74
|
-
const __eliscript_numeric_sub = (a, b) => { if (typeof a === "number" && typeof b === "number") return a - b; return __eliscript_numeric(a) - __eliscript_numeric(b); };
|
|
75
|
-
const __eliscript_numeric_mul = (a, b) => { if (typeof a === "number" && typeof b === "number") return a * b; return __eliscript_numeric(a) * __eliscript_numeric(b); };
|
|
76
|
-
const __eliscript_numeric_div = (a, b) => { if (typeof a === "number" && typeof b === "number") return a / b; return __eliscript_numeric(a) / __eliscript_numeric(b); };
|
|
77
|
-
const __eliscript_numeric_rem = (a, b) => { if (typeof a === "number" && typeof b === "number") return a % b; return __eliscript_numeric(a) % __eliscript_numeric(b); };
|
|
78
|
-
const __eliscript_numeric_and = (a, b) => { if (typeof a === "number" && typeof b === "number") return a & b; return __eliscript_numeric(a) & __eliscript_numeric(b); };
|
|
79
|
-
const __eliscript_numeric_or = (a, b) => { if (typeof a === "number" && typeof b === "number") return a | b; return __eliscript_numeric(a) | __eliscript_numeric(b); };
|
|
80
|
-
const __eliscript_numeric_xor = (a, b) => { if (typeof a === "number" && typeof b === "number") return a ^ b; return __eliscript_numeric(a) ^ __eliscript_numeric(b); };
|
|
81
|
-
const __eliscript_numeric_shl = (a, b) => { if (typeof a === "number" && typeof b === "number") return a << b; return __eliscript_numeric(a) << __eliscript_numeric(b); };
|
|
82
|
-
const __eliscript_numeric_shr = (a, b) => { if (typeof a === "number" && typeof b === "number") return a >> b; return __eliscript_numeric(a) >> __eliscript_numeric(b); };
|
|
83
|
-
const __eliscript_numeric_ushr = (a, b) => { if (typeof a === "number" && typeof b === "number") return a >>> b; return __eliscript_numeric(a) >>> __eliscript_numeric(b); };
|
|
84
|
-
const __eliscript_numeric_neg = (a) => typeof a === "number" ? -a : -__eliscript_numeric(a);
|
|
85
|
-
const __eliscript_numeric_int32 = (a) => typeof a === "number" ? a | 0 : __eliscript_numeric(a) | 0;
|
|
86
|
-
const __eliscript_numeric_uint32 = (a) => typeof a === "number" ? a >>> 0 : __eliscript_numeric(a) >>> 0;
|
|
87
|
-
const __eliscript_numeric_not = (a) => typeof a === "number" ? ~a : ~__eliscript_numeric(a);
|
|
88
|
-
const __eliscript_numeric_relation = (operator, left, right) => {
|
|
89
|
-
if (typeof left === "number" && typeof right === "number") {
|
|
90
|
-
if (operator === "<") return left < right;
|
|
91
|
-
if (operator === "<=") return left <= right;
|
|
92
|
-
if (operator === ">") return left > right;
|
|
93
|
-
return left >= right;
|
|
94
|
-
}
|
|
95
|
-
let a = __eliscript_numeric_primitive(left);
|
|
96
|
-
let b = __eliscript_numeric_primitive(right);
|
|
97
|
-
const x = typeof a, y = typeof b;
|
|
98
|
-
if (!((x === "string" && y === "string") || (x === "bigint" && y === "string") || (x === "string" && y === "bigint"))) {
|
|
99
|
-
a = __eliscript_numeric(a);
|
|
100
|
-
b = __eliscript_numeric(b);
|
|
101
|
-
}
|
|
102
|
-
if (operator === "<") return a < b;
|
|
103
|
-
if (operator === "<=") return a <= b;
|
|
104
|
-
if (operator === ">") return a > b;
|
|
105
|
-
return a >= b;
|
|
106
|
-
};
|
|
107
14
|
|
|
108
15
|
import {createHash} from "node:crypto";
|
|
109
16
|
import {Buffer} from "node:buffer";
|
|
@@ -206,7 +113,7 @@ async function transportOriginalFuzzCorpus(document, options) {
|
|
|
206
113
|
return ((proof)["file"] === "tools/fuzz/reader-program-acceptance.eli");
|
|
207
114
|
})))["sourceSha256"], "generatedFile": "tools/fuzz/reader-program-acceptance.mjs", "generatedSha256": ((proofs)["find"](((proof) => {
|
|
208
115
|
return ((proof)["file"] === "tools/fuzz/reader-program-acceptance.mjs");
|
|
209
|
-
})))["sourceSha256"]}), "maintainedTransport": ({"kind": "maintained-eli-complete-fuzz-acceptance", "version": 1, "logicalSuite": (__eliscript_tdz_read_1()), "originalSourceSha256": (__eliscript_tdz_read_2()), "sourceFile": "tools/fuzz/reader-program-corpus-host.eli", "generatedFile": host_file, "generatedSha256": hash(host), "programInputs": 50000, "readerInputs": 50000, "originalTimeoutMs": 320000, "independentOracle": "tools/fuzz/program-emission-oracle.el", "historicalUnicodeCompatibilityDigest": "
|
|
116
|
+
})))["sourceSha256"]}), "maintainedTransport": ({"kind": "maintained-eli-complete-fuzz-acceptance", "version": 1, "logicalSuite": (__eliscript_tdz_read_1()), "originalSourceSha256": (__eliscript_tdz_read_2()), "sourceFile": "tools/fuzz/reader-program-corpus-host.eli", "generatedFile": host_file, "generatedSha256": hash(host), "programInputs": 50000, "readerInputs": 50000, "originalTimeoutMs": 320000, "independentOracle": "tools/fuzz/program-emission-oracle.el", "historicalUnicodeCompatibilityDigest": "4fb6c781f78ad6237a8d7c3fae85841bf717fe6b2e938eaf24e5e6501a530130", "currentDigest": "unmodified-complete-emission-bytes", "fallback": false})})));
|
|
210
117
|
})();
|
|
211
118
|
})((((original)["sourceAssets"] ?? []))["slice"]());
|
|
212
119
|
})(await ((reader)["text"](host_file)));
|
|
@@ -2,118 +2,21 @@
|
|
|
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("own_url"); return own_url; }
|
|
5
|
-
function __eliscript_tdz_write_0(__eliscript_tdz_value_0) { if (__eliscript_tdz_ready_0 !== true) __eliscript_tdz_error("own_url"); 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("environment_key"); return environment_key; }
|
|
8
|
-
function __eliscript_tdz_write_1(__eliscript_tdz_value_1) { if (__eliscript_tdz_ready_1 !== true) __eliscript_tdz_error("environment_key"); 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("program_contexts"); return program_contexts; }
|
|
11
|
-
function __eliscript_tdz_write_2(__eliscript_tdz_value_2) { if (__eliscript_tdz_ready_2 !== true) __eliscript_tdz_error("program_contexts"); 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("contexts"); return contexts; }
|
|
14
|
-
function __eliscript_tdz_write_3(__eliscript_tdz_value_3) { if (__eliscript_tdz_ready_3 !== true) __eliscript_tdz_error("contexts"); 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("interop_main_sha"); return interop_main_sha; }
|
|
17
|
-
function __eliscript_tdz_write_4(__eliscript_tdz_value_4) { if (__eliscript_tdz_ready_4 !== true) __eliscript_tdz_error("interop_main_sha"); 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("interop_host_sha"); return interop_host_sha; }
|
|
20
|
-
function __eliscript_tdz_write_5(__eliscript_tdz_value_5) { if (__eliscript_tdz_ready_5 !== true) __eliscript_tdz_error("interop_host_sha"); 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("inherited_completion"); return inherited_completion; }
|
|
23
|
-
function __eliscript_tdz_write_6(__eliscript_tdz_value_6) { if (__eliscript_tdz_ready_6 !== true) __eliscript_tdz_error("inherited_completion"); return __eliscript_const_error(); }
|
|
24
17
|
import "eliscript/runtime/unicode-case.mjs";
|
|
25
|
-
import {
|
|
18
|
+
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";
|
|
26
19
|
const __eliscript_truthy = (value) => value !== false && value != null;
|
|
27
|
-
const __eliscript_number_intrinsic = globalThis.Number;
|
|
28
|
-
const __eliscript_bigint_intrinsic = globalThis.BigInt;
|
|
29
|
-
const __eliscript_numeric_apply = globalThis.Reflect.apply;
|
|
30
|
-
const __eliscript_numeric_symbol = globalThis.Symbol.toPrimitive;
|
|
31
|
-
const __eliscript_numeric_error = globalThis.TypeError;
|
|
32
|
-
const __eliscript_numeric_trim = globalThis.String.prototype.trim;
|
|
33
|
-
const __eliscript_numeric_slice = globalThis.String.prototype.slice;
|
|
34
|
-
const __eliscript_numeric_exec = globalThis.RegExp.prototype.exec;
|
|
35
|
-
const __eliscript_numeric_radix = /^(?:0[xX][0-9a-fA-F]+|0[oO][0-7]+|0[bB][01]+)$/;
|
|
36
|
-
const __eliscript_numeric_object = (value) => value !== null && (typeof value === "object" || typeof value === "function" || (typeof value === "undefined" && value !== void 0));
|
|
37
|
-
const __eliscript_numeric_primitive = (value) => {
|
|
38
|
-
if (!__eliscript_numeric_object(value)) return value;
|
|
39
|
-
const exotic = value[__eliscript_numeric_symbol];
|
|
40
|
-
if (exotic !== void 0 && exotic !== null) {
|
|
41
|
-
const result = __eliscript_numeric_apply(exotic, value, ["number"]);
|
|
42
|
-
if (!__eliscript_numeric_object(result)) return result;
|
|
43
|
-
throw new __eliscript_numeric_error("Cannot convert object to primitive value");
|
|
44
|
-
}
|
|
45
|
-
for (let index = 0; index < 2; index++) {
|
|
46
|
-
const method = value[index === 0 ? "valueOf" : "toString"];
|
|
47
|
-
if (typeof method === "function" || (typeof method === "undefined" && method !== void 0)) {
|
|
48
|
-
const result = __eliscript_numeric_apply(method, value, []);
|
|
49
|
-
if (!__eliscript_numeric_object(result)) return result;
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
throw new __eliscript_numeric_error("Cannot convert object to primitive value");
|
|
53
|
-
};
|
|
54
|
-
const __eliscript_to_number = (value) => {
|
|
55
|
-
const primitive = __eliscript_numeric_primitive(value);
|
|
56
|
-
if (typeof primitive === "string") {
|
|
57
|
-
const text = __eliscript_numeric_apply(__eliscript_numeric_trim, primitive, []);
|
|
58
|
-
if (__eliscript_numeric_apply(__eliscript_numeric_exec, __eliscript_numeric_radix, [text]) !== null) {
|
|
59
|
-
let first = 2;
|
|
60
|
-
while (first < text.length && text[first] === "0") first++;
|
|
61
|
-
if (first === text.length) return 0;
|
|
62
|
-
const prefix = text[1];
|
|
63
|
-
const limit = prefix === "x" || prefix === "X" ? 256 : prefix === "b" || prefix === "B" ? 1024 : 342;
|
|
64
|
-
if (text.length - first > limit) return 1 / 0;
|
|
65
|
-
const token = __eliscript_numeric_apply(__eliscript_numeric_slice, text, [0, 2]) + __eliscript_numeric_apply(__eliscript_numeric_slice, text, [first]);
|
|
66
|
-
return __eliscript_number_intrinsic(__eliscript_bigint_intrinsic(token));
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
return __eliscript_number_intrinsic(primitive);
|
|
70
|
-
};
|
|
71
|
-
const __eliscript_numeric = (value) => {
|
|
72
|
-
if (typeof value === "number" || typeof value === "bigint") return value;
|
|
73
|
-
const primitive = __eliscript_numeric_primitive(value);
|
|
74
|
-
if (typeof primitive === "number" || typeof primitive === "bigint") return primitive;
|
|
75
|
-
return typeof primitive === "string" ? __eliscript_to_number(primitive) : +primitive;
|
|
76
|
-
};
|
|
77
|
-
const __eliscript_implicit_number = (value) => {
|
|
78
|
-
if (typeof value === "number") return value;
|
|
79
|
-
const primitive = __eliscript_numeric_primitive(value);
|
|
80
|
-
if (typeof primitive === "bigint") throw new __eliscript_numeric_error("Cannot convert a BigInt value to a number");
|
|
81
|
-
return typeof primitive === "string" ? __eliscript_to_number(primitive) : +primitive;
|
|
82
|
-
};
|
|
83
|
-
const __eliscript_numeric_decrement = (value) => __eliscript_implicit_number(value) - 1;
|
|
84
|
-
const __eliscript_numeric_sub = (a, b) => { if (typeof a === "number" && typeof b === "number") return a - b; return __eliscript_numeric(a) - __eliscript_numeric(b); };
|
|
85
|
-
const __eliscript_numeric_mul = (a, b) => { if (typeof a === "number" && typeof b === "number") return a * b; return __eliscript_numeric(a) * __eliscript_numeric(b); };
|
|
86
|
-
const __eliscript_numeric_div = (a, b) => { if (typeof a === "number" && typeof b === "number") return a / b; return __eliscript_numeric(a) / __eliscript_numeric(b); };
|
|
87
|
-
const __eliscript_numeric_rem = (a, b) => { if (typeof a === "number" && typeof b === "number") return a % b; return __eliscript_numeric(a) % __eliscript_numeric(b); };
|
|
88
|
-
const __eliscript_numeric_and = (a, b) => { if (typeof a === "number" && typeof b === "number") return a & b; return __eliscript_numeric(a) & __eliscript_numeric(b); };
|
|
89
|
-
const __eliscript_numeric_or = (a, b) => { if (typeof a === "number" && typeof b === "number") return a | b; return __eliscript_numeric(a) | __eliscript_numeric(b); };
|
|
90
|
-
const __eliscript_numeric_xor = (a, b) => { if (typeof a === "number" && typeof b === "number") return a ^ b; return __eliscript_numeric(a) ^ __eliscript_numeric(b); };
|
|
91
|
-
const __eliscript_numeric_shl = (a, b) => { if (typeof a === "number" && typeof b === "number") return a << b; return __eliscript_numeric(a) << __eliscript_numeric(b); };
|
|
92
|
-
const __eliscript_numeric_shr = (a, b) => { if (typeof a === "number" && typeof b === "number") return a >> b; return __eliscript_numeric(a) >> __eliscript_numeric(b); };
|
|
93
|
-
const __eliscript_numeric_ushr = (a, b) => { if (typeof a === "number" && typeof b === "number") return a >>> b; return __eliscript_numeric(a) >>> __eliscript_numeric(b); };
|
|
94
|
-
const __eliscript_numeric_neg = (a) => typeof a === "number" ? -a : -__eliscript_numeric(a);
|
|
95
|
-
const __eliscript_numeric_int32 = (a) => typeof a === "number" ? a | 0 : __eliscript_numeric(a) | 0;
|
|
96
|
-
const __eliscript_numeric_uint32 = (a) => typeof a === "number" ? a >>> 0 : __eliscript_numeric(a) >>> 0;
|
|
97
|
-
const __eliscript_numeric_not = (a) => typeof a === "number" ? ~a : ~__eliscript_numeric(a);
|
|
98
|
-
const __eliscript_numeric_relation = (operator, left, right) => {
|
|
99
|
-
if (typeof left === "number" && typeof right === "number") {
|
|
100
|
-
if (operator === "<") return left < right;
|
|
101
|
-
if (operator === "<=") return left <= right;
|
|
102
|
-
if (operator === ">") return left > right;
|
|
103
|
-
return left >= right;
|
|
104
|
-
}
|
|
105
|
-
let a = __eliscript_numeric_primitive(left);
|
|
106
|
-
let b = __eliscript_numeric_primitive(right);
|
|
107
|
-
const x = typeof a, y = typeof b;
|
|
108
|
-
if (!((x === "string" && y === "string") || (x === "bigint" && y === "string") || (x === "string" && y === "bigint"))) {
|
|
109
|
-
a = __eliscript_numeric(a);
|
|
110
|
-
b = __eliscript_numeric(b);
|
|
111
|
-
}
|
|
112
|
-
if (operator === "<") return a < b;
|
|
113
|
-
if (operator === "<=") return a <= b;
|
|
114
|
-
if (operator === ">") return a > b;
|
|
115
|
-
return a >= b;
|
|
116
|
-
};
|
|
117
20
|
|
|
118
21
|
import {readFile, writeFile, copyFile, chmod} from "node:fs/promises";
|
|
119
22
|
import {constants} from "node:fs";
|
|
@@ -538,7 +441,7 @@ async function inherited_context() {
|
|
|
538
441
|
}
|
|
539
442
|
const inherited_completion = inherited_context();
|
|
540
443
|
__eliscript_tdz_ready_6 = true;
|
|
541
|
-
(
|
|
444
|
+
(inherited_completion)["catch"](((ignored) => {
|
|
542
445
|
return undefined;
|
|
543
446
|
}));
|
|
544
447
|
function then(fulfill, reject) {
|
|
@@ -1,116 +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("arguments$"); return arguments$; }
|
|
5
|
-
function __eliscript_tdz_write_0(__eliscript_tdz_value_0) { if (__eliscript_tdz_ready_0 !== true) __eliscript_tdz_error("arguments$"); 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("host_file"); return host_file; }
|
|
8
|
-
function __eliscript_tdz_write_1(__eliscript_tdz_value_1) { if (__eliscript_tdz_ready_1 !== true) __eliscript_tdz_error("host_file"); return __eliscript_const_error(); }
|
|
9
3
|
var __eliscript_tdz_ready_2;
|
|
10
4
|
function __eliscript_tdz_read_2() { if (__eliscript_tdz_ready_2 !== true) __eliscript_tdz_error("require_module"); return require_module; }
|
|
11
|
-
function __eliscript_tdz_write_2(__eliscript_tdz_value_2) { if (__eliscript_tdz_ready_2 !== true) __eliscript_tdz_error("require_module"); 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("main_invocation"); return main_invocation; }
|
|
14
|
-
function __eliscript_tdz_write_3(__eliscript_tdz_value_3) { if (__eliscript_tdz_ready_3 !== true) __eliscript_tdz_error("main_invocation"); 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("helperAPI"); return helperAPI; }
|
|
17
|
-
function __eliscript_tdz_write_4(__eliscript_tdz_value_4) { if (__eliscript_tdz_ready_4 !== true) __eliscript_tdz_error("helperAPI"); 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("completion"); return completion; }
|
|
20
|
-
function __eliscript_tdz_write_5(__eliscript_tdz_value_5) { if (__eliscript_tdz_ready_5 !== true) __eliscript_tdz_error("completion"); return __eliscript_const_error(); }
|
|
21
9
|
import "eliscript/runtime/unicode-case.mjs";
|
|
22
|
-
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";
|
|
23
11
|
const __eliscript_truthy = (value) => value !== false && value != null;
|
|
24
|
-
const __eliscript_number_intrinsic = globalThis.Number;
|
|
25
|
-
const __eliscript_bigint_intrinsic = globalThis.BigInt;
|
|
26
|
-
const __eliscript_numeric_apply = globalThis.Reflect.apply;
|
|
27
|
-
const __eliscript_numeric_symbol = globalThis.Symbol.toPrimitive;
|
|
28
|
-
const __eliscript_numeric_error = globalThis.TypeError;
|
|
29
|
-
const __eliscript_numeric_trim = globalThis.String.prototype.trim;
|
|
30
|
-
const __eliscript_numeric_slice = globalThis.String.prototype.slice;
|
|
31
|
-
const __eliscript_numeric_exec = globalThis.RegExp.prototype.exec;
|
|
32
|
-
const __eliscript_numeric_radix = /^(?:0[xX][0-9a-fA-F]+|0[oO][0-7]+|0[bB][01]+)$/;
|
|
33
|
-
const __eliscript_numeric_object = (value) => value !== null && (typeof value === "object" || typeof value === "function" || (typeof value === "undefined" && value !== void 0));
|
|
34
|
-
const __eliscript_numeric_primitive = (value) => {
|
|
35
|
-
if (!__eliscript_numeric_object(value)) return value;
|
|
36
|
-
const exotic = value[__eliscript_numeric_symbol];
|
|
37
|
-
if (exotic !== void 0 && exotic !== null) {
|
|
38
|
-
const result = __eliscript_numeric_apply(exotic, value, ["number"]);
|
|
39
|
-
if (!__eliscript_numeric_object(result)) return result;
|
|
40
|
-
throw new __eliscript_numeric_error("Cannot convert object to primitive value");
|
|
41
|
-
}
|
|
42
|
-
for (let index = 0; index < 2; index++) {
|
|
43
|
-
const method = value[index === 0 ? "valueOf" : "toString"];
|
|
44
|
-
if (typeof method === "function" || (typeof method === "undefined" && method !== void 0)) {
|
|
45
|
-
const result = __eliscript_numeric_apply(method, value, []);
|
|
46
|
-
if (!__eliscript_numeric_object(result)) return result;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
throw new __eliscript_numeric_error("Cannot convert object to primitive value");
|
|
50
|
-
};
|
|
51
|
-
const __eliscript_to_number = (value) => {
|
|
52
|
-
const primitive = __eliscript_numeric_primitive(value);
|
|
53
|
-
if (typeof primitive === "string") {
|
|
54
|
-
const text = __eliscript_numeric_apply(__eliscript_numeric_trim, primitive, []);
|
|
55
|
-
if (__eliscript_numeric_apply(__eliscript_numeric_exec, __eliscript_numeric_radix, [text]) !== null) {
|
|
56
|
-
let first = 2;
|
|
57
|
-
while (first < text.length && text[first] === "0") first++;
|
|
58
|
-
if (first === text.length) return 0;
|
|
59
|
-
const prefix = text[1];
|
|
60
|
-
const limit = prefix === "x" || prefix === "X" ? 256 : prefix === "b" || prefix === "B" ? 1024 : 342;
|
|
61
|
-
if (text.length - first > limit) return 1 / 0;
|
|
62
|
-
const token = __eliscript_numeric_apply(__eliscript_numeric_slice, text, [0, 2]) + __eliscript_numeric_apply(__eliscript_numeric_slice, text, [first]);
|
|
63
|
-
return __eliscript_number_intrinsic(__eliscript_bigint_intrinsic(token));
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
return __eliscript_number_intrinsic(primitive);
|
|
67
|
-
};
|
|
68
|
-
const __eliscript_numeric = (value) => {
|
|
69
|
-
if (typeof value === "number" || typeof value === "bigint") return value;
|
|
70
|
-
const primitive = __eliscript_numeric_primitive(value);
|
|
71
|
-
if (typeof primitive === "number" || typeof primitive === "bigint") return primitive;
|
|
72
|
-
return typeof primitive === "string" ? __eliscript_to_number(primitive) : +primitive;
|
|
73
|
-
};
|
|
74
|
-
const __eliscript_implicit_number = (value) => {
|
|
75
|
-
if (typeof value === "number") return value;
|
|
76
|
-
const primitive = __eliscript_numeric_primitive(value);
|
|
77
|
-
if (typeof primitive === "bigint") throw new __eliscript_numeric_error("Cannot convert a BigInt value to a number");
|
|
78
|
-
return typeof primitive === "string" ? __eliscript_to_number(primitive) : +primitive;
|
|
79
|
-
};
|
|
80
|
-
const __eliscript_numeric_decrement = (value) => __eliscript_implicit_number(value) - 1;
|
|
81
|
-
const __eliscript_numeric_sub = (a, b) => { if (typeof a === "number" && typeof b === "number") return a - b; return __eliscript_numeric(a) - __eliscript_numeric(b); };
|
|
82
|
-
const __eliscript_numeric_mul = (a, b) => { if (typeof a === "number" && typeof b === "number") return a * b; return __eliscript_numeric(a) * __eliscript_numeric(b); };
|
|
83
|
-
const __eliscript_numeric_div = (a, b) => { if (typeof a === "number" && typeof b === "number") return a / b; return __eliscript_numeric(a) / __eliscript_numeric(b); };
|
|
84
|
-
const __eliscript_numeric_rem = (a, b) => { if (typeof a === "number" && typeof b === "number") return a % b; return __eliscript_numeric(a) % __eliscript_numeric(b); };
|
|
85
|
-
const __eliscript_numeric_and = (a, b) => { if (typeof a === "number" && typeof b === "number") return a & b; return __eliscript_numeric(a) & __eliscript_numeric(b); };
|
|
86
|
-
const __eliscript_numeric_or = (a, b) => { if (typeof a === "number" && typeof b === "number") return a | b; return __eliscript_numeric(a) | __eliscript_numeric(b); };
|
|
87
|
-
const __eliscript_numeric_xor = (a, b) => { if (typeof a === "number" && typeof b === "number") return a ^ b; return __eliscript_numeric(a) ^ __eliscript_numeric(b); };
|
|
88
|
-
const __eliscript_numeric_shl = (a, b) => { if (typeof a === "number" && typeof b === "number") return a << b; return __eliscript_numeric(a) << __eliscript_numeric(b); };
|
|
89
|
-
const __eliscript_numeric_shr = (a, b) => { if (typeof a === "number" && typeof b === "number") return a >> b; return __eliscript_numeric(a) >> __eliscript_numeric(b); };
|
|
90
|
-
const __eliscript_numeric_ushr = (a, b) => { if (typeof a === "number" && typeof b === "number") return a >>> b; return __eliscript_numeric(a) >>> __eliscript_numeric(b); };
|
|
91
|
-
const __eliscript_numeric_neg = (a) => typeof a === "number" ? -a : -__eliscript_numeric(a);
|
|
92
|
-
const __eliscript_numeric_int32 = (a) => typeof a === "number" ? a | 0 : __eliscript_numeric(a) | 0;
|
|
93
|
-
const __eliscript_numeric_uint32 = (a) => typeof a === "number" ? a >>> 0 : __eliscript_numeric(a) >>> 0;
|
|
94
|
-
const __eliscript_numeric_not = (a) => typeof a === "number" ? ~a : ~__eliscript_numeric(a);
|
|
95
|
-
const __eliscript_numeric_relation = (operator, left, right) => {
|
|
96
|
-
if (typeof left === "number" && typeof right === "number") {
|
|
97
|
-
if (operator === "<") return left < right;
|
|
98
|
-
if (operator === "<=") return left <= right;
|
|
99
|
-
if (operator === ">") return left > right;
|
|
100
|
-
return left >= right;
|
|
101
|
-
}
|
|
102
|
-
let a = __eliscript_numeric_primitive(left);
|
|
103
|
-
let b = __eliscript_numeric_primitive(right);
|
|
104
|
-
const x = typeof a, y = typeof b;
|
|
105
|
-
if (!((x === "string" && y === "string") || (x === "bigint" && y === "string") || (x === "string" && y === "bigint"))) {
|
|
106
|
-
a = __eliscript_numeric(a);
|
|
107
|
-
b = __eliscript_numeric(b);
|
|
108
|
-
}
|
|
109
|
-
if (operator === "<") return a < b;
|
|
110
|
-
if (operator === "<=") return a <= b;
|
|
111
|
-
if (operator === ">") return a > b;
|
|
112
|
-
return a >= b;
|
|
113
|
-
};
|
|
114
12
|
|
|
115
13
|
import {readOriginalCorpusExecutionContext} from "./compiler-corpus-process.mjs";
|
|
116
14
|
import assert from "node:assert/strict";
|
|
@@ -120,10 +18,8 @@ import {pathToFileURL, fileURLToPath} from "node:url";
|
|
|
120
18
|
import {createRequire} from "node:module";
|
|
121
19
|
import {createHash} from "node:crypto";
|
|
122
20
|
const arguments$ = ((globalThis.process)["argv"])["slice"](2);
|
|
123
|
-
__eliscript_tdz_ready_0 = true;
|
|
124
21
|
const host_file = ((globalThis.process)["argv"])[1];
|
|
125
|
-
|
|
126
|
-
const require_module = createRequire((__eliscript_tdz_read_1()));
|
|
22
|
+
const require_module = createRequire(host_file);
|
|
127
23
|
__eliscript_tdz_ready_2 = true;
|
|
128
24
|
function observe(module) {
|
|
129
25
|
{
|
|
@@ -165,8 +61,8 @@ async function independent(engine, path, root) {
|
|
|
165
61
|
return ((receipt) => {
|
|
166
62
|
return JSON.parse((receipt)["stdout"]);
|
|
167
63
|
})(await ((process_tools)["runOriginalCorpusProcess"]((launch)["command"], (launch)["args"], (launch)["options"])));
|
|
168
|
-
})((
|
|
169
|
-
})(identityOracleLaunch(engine, path, root,
|
|
64
|
+
})(require_module(resolve(root, "tools/backends/compiler-corpus-process.mjs"))));
|
|
65
|
+
})(identityOracleLaunch(engine, path, root, host_file, context, environment)));
|
|
170
66
|
})(readOriginalCorpusExecutionContext((environment)["ELISCRIPT_ORIGINAL_EXECUTION_CONTEXT"])));
|
|
171
67
|
})((globalThis.process)["env"]));
|
|
172
68
|
}
|
|
@@ -192,7 +88,7 @@ async function copy_instance(product, entry, label, bytes) {
|
|
|
192
88
|
return (assert)["strictEqual"]((await (readFile(path)))["equals"](bytes), true);
|
|
193
89
|
})(await (lstat(path))));
|
|
194
90
|
(assert)["notStrictEqual"](await (realpath(path)), await (realpath(resolve(product, entry))));
|
|
195
|
-
return ({"id": id, "path": path, "module": (
|
|
91
|
+
return ({"id": id, "path": path, "module": require_module(path)});
|
|
196
92
|
})());
|
|
197
93
|
})(resolve(product, id)));
|
|
198
94
|
})(("original-identity-isolation/" + label + "/" + entry)));
|
|
@@ -275,18 +171,18 @@ async function fresh_runtime(root, selected) {
|
|
|
275
171
|
(((selected)["target"] === "wasm") ? ((bytes, backend) => {
|
|
276
172
|
(assert)["deepStrictEqual"]((globalThis.WebAssembly.Module)["imports"](new (globalThis.WebAssembly.Module)(bytes)), []);
|
|
277
173
|
return ((runtime = (backend)["instantiateManagedRuntime"](bytes, options)));
|
|
278
|
-
})(new (globalThis.Uint8Array)(await (readFile((selected)["path"]))), (
|
|
174
|
+
})(new (globalThis.Uint8Array)(await (readFile((selected)["path"]))), require_module(resolve(root, "tools/backends/managed-runtime.mjs"))) : (await (async (backend) => {
|
|
279
175
|
return ((runtime = await ((backend)["instantiateNativeManagedRuntime"]((selected)["path"], ({"typed": (selected)["typed"], "descriptor": (selected)["descriptor"]}), options))));
|
|
280
|
-
})((
|
|
176
|
+
})(require_module(resolve(root, "tools/backends/native-managed-runtime.mjs")))));
|
|
281
177
|
return (() => {
|
|
282
178
|
try {
|
|
283
179
|
(runtime)["initializeModule"]();
|
|
284
180
|
(runtime)["auto"](((selected)["runtimeOptions"])["auto"]);
|
|
285
181
|
{
|
|
286
|
-
const __eliscript_value_15 = (
|
|
182
|
+
const __eliscript_value_15 = require_module(resolve(root, "tools/backends/compiler-corpus-host-context.mjs"));
|
|
287
183
|
{
|
|
288
184
|
let context = __eliscript_value_15;
|
|
289
|
-
return ((context)["bindOriginalManagedProgramContext"](Object.assign(({}), selected, ({"host":
|
|
185
|
+
return ((context)["bindOriginalManagedProgramContext"](Object.assign(({}), selected, ({"host": host_file})), ({"runtime": runtime})))["runtime"];
|
|
290
186
|
}
|
|
291
187
|
}
|
|
292
188
|
} catch (error) {
|
|
@@ -432,7 +328,7 @@ async function binary_identities(root, selected, reference) {
|
|
|
432
328
|
})(await (fresh_runtime(root, selected)));
|
|
433
329
|
}
|
|
434
330
|
async function run() {
|
|
435
|
-
return (((
|
|
331
|
+
return (((arguments$)[0] === "--observe") ? ((globalThis.process)["stdout"])["write"](JSON.stringify(observe(require_module((arguments$)[1])))) : (await (async (environment) => {
|
|
436
332
|
return (await (async (root) => {
|
|
437
333
|
return (await (async (reference_directory) => {
|
|
438
334
|
return (await (async (product) => {
|
|
@@ -456,7 +352,7 @@ async function run() {
|
|
|
456
352
|
return (await (async (selected) => {
|
|
457
353
|
return await (binary_identities(root, selected, reference));
|
|
458
354
|
})(await ((metadata)["readCompilerMetadata"]((environment)["ELISCRIPT_ORIGINAL_PROGRAM_CONTEXT"]))));
|
|
459
|
-
})((
|
|
355
|
+
})(require_module(resolve(root, "tools/backends/compiler-metadata.mjs")))) : (await (async () => {
|
|
460
356
|
(await (async (bytes) => {
|
|
461
357
|
return (await (async (first) => {
|
|
462
358
|
return (await (async (second) => {
|
|
@@ -515,21 +411,20 @@ async function run() {
|
|
|
515
411
|
return (reference)["safe"](value);
|
|
516
412
|
}))));
|
|
517
413
|
})([null, undefined, false, true, -0.0, globalThis.NaN, ""]));
|
|
518
|
-
})((
|
|
519
|
-
})((
|
|
414
|
+
})(require_module(resolve(product, entry))));
|
|
415
|
+
})(require_module(reference_path)));
|
|
520
416
|
})(resolve(reference_directory, entry)));
|
|
521
417
|
})());
|
|
522
|
-
})((
|
|
523
|
-
})((
|
|
418
|
+
})((arguments$)[1]));
|
|
419
|
+
})((arguments$)[0]));
|
|
524
420
|
})((environment)["ELISCRIPT_ORIGINAL_REFERENCE_PRODUCT_ROOT"]));
|
|
525
421
|
})((environment)["ELISCRIPT_ORIGINAL_SOURCE_ROOT"]));
|
|
526
422
|
})((globalThis.process)["env"])));
|
|
527
423
|
}
|
|
528
|
-
const main_invocation = ((((__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; } })(
|
|
529
|
-
__eliscript_tdz_ready_3 = true;
|
|
424
|
+
const main_invocation = ((((__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; } })(host_file) === "string") && (resolve(host_file) === resolve(fileURLToPath(import.meta.url))));
|
|
530
425
|
const helperAPI = Object.freeze(({"identityOracleLaunch": identityOracleLaunch}));
|
|
531
426
|
__eliscript_tdz_ready_4 = true;
|
|
532
|
-
const completion = (__eliscript_truthy(
|
|
427
|
+
const completion = (__eliscript_truthy(main_invocation) ? run() : Promise.resolve());
|
|
533
428
|
__eliscript_tdz_ready_5 = true;
|
|
534
429
|
function identityHostCompletionThen(pending, resolve, reject) {
|
|
535
430
|
return (pending)["then"]((() => {
|
|
@@ -539,7 +434,7 @@ function identityHostCompletionThen(pending, resolve, reject) {
|
|
|
539
434
|
function then(resolve, reject) {
|
|
540
435
|
return identityHostCompletionThen((__eliscript_tdz_read_5()), resolve, reject);
|
|
541
436
|
}
|
|
542
|
-
(__eliscript_truthy(
|
|
437
|
+
(__eliscript_truthy(main_invocation) ? (completion)["catch"](((error) => {
|
|
543
438
|
((globalThis.process)["exitCode"] = 1);
|
|
544
439
|
return (() => {
|
|
545
440
|
try {
|
|
@@ -1,11 +1,4 @@
|
|
|
1
1
|
// Generated by Eliscript. Do not edit.
|
|
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("originalIdentityValueSuites"); return originalIdentityValueSuites; }
|
|
5
|
-
function __eliscript_tdz_write_0(__eliscript_tdz_value_0) { if (__eliscript_tdz_ready_0 !== true) __eliscript_tdz_error("originalIdentityValueSuites"); 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("originalIdentityValueCaseLocators"); return originalIdentityValueCaseLocators; }
|
|
8
|
-
function __eliscript_tdz_write_1(__eliscript_tdz_value_1) { if (__eliscript_tdz_ready_1 !== true) __eliscript_tdz_error("originalIdentityValueCaseLocators"); return __eliscript_const_error(); }
|
|
9
2
|
import "eliscript/runtime/unicode-case.mjs";
|
|
10
3
|
const __eliscript_truthy = (value) => value !== false && value != null;
|
|
11
4
|
|
|
@@ -14,9 +7,7 @@ import {Buffer} from "node:buffer";
|
|
|
14
7
|
import * as legacy from "./compiler-corpus-identity-value-adapters-legacy.mjs";
|
|
15
8
|
import {readOriginalProcessHostDependency, bindOriginalProcessHostDependency} from "./compiler-corpus-process.mjs";
|
|
16
9
|
const originalIdentityValueSuites = (legacy)["originalIdentityValueSuites"];
|
|
17
|
-
__eliscript_tdz_ready_0 = true;
|
|
18
10
|
const originalIdentityValueCaseLocators = (legacy)["originalIdentityValueCaseLocators"];
|
|
19
|
-
__eliscript_tdz_ready_1 = true;
|
|
20
11
|
async function addOriginalIdentityValueAdapters(options) {
|
|
21
12
|
return (await (async (text) => {
|
|
22
13
|
return (await (async (file) => {
|