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
|
@@ -1,183 +1,61 @@
|
|
|
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("array_text_import"); return array_text_import; }
|
|
5
|
-
function __eliscript_tdz_write_0(__eliscript_tdz_value_0) { if (__eliscript_tdz_ready_0 !== true) __eliscript_tdz_error("array_text_import"); return __eliscript_const_error(); }
|
|
6
3
|
var __eliscript_tdz_ready_1;
|
|
7
4
|
function __eliscript_tdz_read_1() { if (__eliscript_tdz_ready_1 !== true) __eliscript_tdz_error("literal_runtime_import"); return literal_runtime_import; }
|
|
8
|
-
function __eliscript_tdz_write_1(__eliscript_tdz_value_1) { if (__eliscript_tdz_ready_1 !== true) __eliscript_tdz_error("literal_runtime_import"); return __eliscript_const_error(); }
|
|
9
5
|
var __eliscript_tdz_ready_2;
|
|
10
6
|
function __eliscript_tdz_read_2() { if (__eliscript_tdz_ready_2 !== true) __eliscript_tdz_error("collection_runtime_import"); return collection_runtime_import; }
|
|
11
|
-
function __eliscript_tdz_write_2(__eliscript_tdz_value_2) { if (__eliscript_tdz_ready_2 !== true) __eliscript_tdz_error("collection_runtime_import"); return __eliscript_const_error(); }
|
|
12
7
|
var __eliscript_tdz_ready_3;
|
|
13
8
|
function __eliscript_tdz_read_3() { if (__eliscript_tdz_ready_3 !== true) __eliscript_tdz_error("list_runtime_import"); return list_runtime_import; }
|
|
14
|
-
function __eliscript_tdz_write_3(__eliscript_tdz_value_3) { if (__eliscript_tdz_ready_3 !== true) __eliscript_tdz_error("list_runtime_import"); return __eliscript_const_error(); }
|
|
15
9
|
var __eliscript_tdz_ready_4;
|
|
16
10
|
function __eliscript_tdz_read_4() { if (__eliscript_tdz_ready_4 !== true) __eliscript_tdz_error("value_runtime_import"); return value_runtime_import; }
|
|
17
|
-
function __eliscript_tdz_write_4(__eliscript_tdz_value_4) { if (__eliscript_tdz_ready_4 !== true) __eliscript_tdz_error("value_runtime_import"); return __eliscript_const_error(); }
|
|
18
11
|
var __eliscript_tdz_ready_5;
|
|
19
12
|
function __eliscript_tdz_read_5() { if (__eliscript_tdz_ready_5 !== true) __eliscript_tdz_error("binding_runtime"); return binding_runtime; }
|
|
20
|
-
function __eliscript_tdz_write_5(__eliscript_tdz_value_5) { if (__eliscript_tdz_ready_5 !== true) __eliscript_tdz_error("binding_runtime"); return __eliscript_const_error(); }
|
|
21
|
-
var __eliscript_tdz_ready_6;
|
|
22
|
-
function __eliscript_tdz_read_6() { if (__eliscript_tdz_ready_6 !== true) __eliscript_tdz_error("number_conversion_intrinsics"); return number_conversion_intrinsics; }
|
|
23
|
-
function __eliscript_tdz_write_6(__eliscript_tdz_value_6) { if (__eliscript_tdz_ready_6 !== true) __eliscript_tdz_error("number_conversion_intrinsics"); return __eliscript_const_error(); }
|
|
24
|
-
var __eliscript_tdz_ready_7;
|
|
25
|
-
function __eliscript_tdz_read_7() { if (__eliscript_tdz_ready_7 !== true) __eliscript_tdz_error("number_conversion_capsule"); return number_conversion_capsule; }
|
|
26
|
-
function __eliscript_tdz_write_7(__eliscript_tdz_value_7) { if (__eliscript_tdz_ready_7 !== true) __eliscript_tdz_error("number_conversion_capsule"); return __eliscript_const_error(); }
|
|
27
|
-
var __eliscript_tdz_ready_8;
|
|
28
|
-
function __eliscript_tdz_read_8() { if (__eliscript_tdz_ready_8 !== true) __eliscript_tdz_error("number_conversion_body"); return number_conversion_body; }
|
|
29
|
-
function __eliscript_tdz_write_8(__eliscript_tdz_value_8) { if (__eliscript_tdz_ready_8 !== true) __eliscript_tdz_error("number_conversion_body"); return __eliscript_const_error(); }
|
|
30
|
-
var __eliscript_tdz_ready_9;
|
|
31
|
-
function __eliscript_tdz_read_9() { if (__eliscript_tdz_ready_9 !== true) __eliscript_tdz_error("number_conversion_helper"); return number_conversion_helper; }
|
|
32
|
-
function __eliscript_tdz_write_9(__eliscript_tdz_value_9) { if (__eliscript_tdz_ready_9 !== true) __eliscript_tdz_error("number_conversion_helper"); return __eliscript_const_error(); }
|
|
33
|
-
var __eliscript_tdz_ready_10;
|
|
34
|
-
function __eliscript_tdz_read_10() { if (__eliscript_tdz_ready_10 !== true) __eliscript_tdz_error("numeric_operator_helper"); return numeric_operator_helper; }
|
|
35
|
-
function __eliscript_tdz_write_10(__eliscript_tdz_value_10) { if (__eliscript_tdz_ready_10 !== true) __eliscript_tdz_error("numeric_operator_helper"); return __eliscript_const_error(); }
|
|
36
|
-
var __eliscript_tdz_ready_11;
|
|
37
|
-
function __eliscript_tdz_read_11() { if (__eliscript_tdz_ready_11 !== true) __eliscript_tdz_error("imul_intrinsic"); return imul_intrinsic; }
|
|
38
|
-
function __eliscript_tdz_write_11(__eliscript_tdz_value_11) { if (__eliscript_tdz_ready_11 !== true) __eliscript_tdz_error("imul_intrinsic"); return __eliscript_const_error(); }
|
|
39
13
|
var __eliscript_tdz_ready_12;
|
|
40
|
-
function __eliscript_tdz_read_12() { if (__eliscript_tdz_ready_12 !== true) __eliscript_tdz_error("
|
|
41
|
-
function __eliscript_tdz_write_12(__eliscript_tdz_value_12) { if (__eliscript_tdz_ready_12 !== true) __eliscript_tdz_error("imul_capsule"); return __eliscript_const_error(); }
|
|
14
|
+
function __eliscript_tdz_read_12() { if (__eliscript_tdz_ready_12 !== true) __eliscript_tdz_error("prelude_array_text_names"); return prelude_array_text_names; }
|
|
42
15
|
var __eliscript_tdz_ready_13;
|
|
43
|
-
function __eliscript_tdz_read_13() { if (__eliscript_tdz_ready_13 !== true) __eliscript_tdz_error("
|
|
44
|
-
function __eliscript_tdz_write_13(__eliscript_tdz_value_13) { if (__eliscript_tdz_ready_13 !== true) __eliscript_tdz_error("imul_operator_helper"); return __eliscript_const_error(); }
|
|
16
|
+
function __eliscript_tdz_read_13() { if (__eliscript_tdz_ready_13 !== true) __eliscript_tdz_error("prelude_number_conversion_names"); return prelude_number_conversion_names; }
|
|
45
17
|
var __eliscript_tdz_ready_14;
|
|
46
|
-
function __eliscript_tdz_read_14() { if (__eliscript_tdz_ready_14 !== true) __eliscript_tdz_error("
|
|
47
|
-
function __eliscript_tdz_write_14(__eliscript_tdz_value_14) { if (__eliscript_tdz_ready_14 !== true) __eliscript_tdz_error("numeric_emission_profile"); return (numeric_emission_profile = __eliscript_tdz_value_14); }
|
|
18
|
+
function __eliscript_tdz_read_14() { if (__eliscript_tdz_ready_14 !== true) __eliscript_tdz_error("prelude_numeric_coercion_names"); return prelude_numeric_coercion_names; }
|
|
48
19
|
var __eliscript_tdz_ready_15;
|
|
49
|
-
function __eliscript_tdz_read_15() { if (__eliscript_tdz_ready_15 !== true) __eliscript_tdz_error("
|
|
50
|
-
function __eliscript_tdz_write_15(__eliscript_tdz_value_15) { if (__eliscript_tdz_ready_15 !== true) __eliscript_tdz_error("host_identity_token_helper"); return __eliscript_const_error(); }
|
|
20
|
+
function __eliscript_tdz_read_15() { if (__eliscript_tdz_ready_15 !== true) __eliscript_tdz_error("prelude_imul_names"); return prelude_imul_names; }
|
|
51
21
|
var __eliscript_tdz_ready_16;
|
|
52
|
-
function __eliscript_tdz_read_16() { if (__eliscript_tdz_ready_16 !== true) __eliscript_tdz_error("
|
|
53
|
-
function __eliscript_tdz_write_16(__eliscript_tdz_value_16) { if (__eliscript_tdz_ready_16 !== true) __eliscript_tdz_error("fail"); return __eliscript_const_error(); }
|
|
22
|
+
function __eliscript_tdz_read_16() { if (__eliscript_tdz_ready_16 !== true) __eliscript_tdz_error("prelude_module"); return prelude_module; }
|
|
54
23
|
var __eliscript_tdz_ready_17;
|
|
55
|
-
function __eliscript_tdz_read_17() { if (__eliscript_tdz_ready_17 !== true) __eliscript_tdz_error("
|
|
56
|
-
function __eliscript_tdz_write_17(__eliscript_tdz_value_17) { if (__eliscript_tdz_ready_17 !== true) __eliscript_tdz_error("
|
|
24
|
+
function __eliscript_tdz_read_17() { if (__eliscript_tdz_ready_17 !== true) __eliscript_tdz_error("numeric_emission_profile"); return numeric_emission_profile; }
|
|
25
|
+
function __eliscript_tdz_write_17(__eliscript_tdz_value_17) { if (__eliscript_tdz_ready_17 !== true) __eliscript_tdz_error("numeric_emission_profile"); return (numeric_emission_profile = __eliscript_tdz_value_17); }
|
|
57
26
|
var __eliscript_tdz_ready_18;
|
|
58
|
-
function __eliscript_tdz_read_18() { if (__eliscript_tdz_ready_18 !== true) __eliscript_tdz_error("
|
|
59
|
-
function __eliscript_tdz_write_18(__eliscript_tdz_value_18) { if (__eliscript_tdz_ready_18 !== true) __eliscript_tdz_error("function_source_profile"); return (function_source_profile = __eliscript_tdz_value_18); }
|
|
27
|
+
function __eliscript_tdz_read_18() { if (__eliscript_tdz_ready_18 !== true) __eliscript_tdz_error("host_identity_token_helper"); return host_identity_token_helper; }
|
|
60
28
|
var __eliscript_tdz_ready_19;
|
|
61
|
-
function __eliscript_tdz_read_19() { if (__eliscript_tdz_ready_19 !== true) __eliscript_tdz_error("
|
|
62
|
-
function __eliscript_tdz_write_19(__eliscript_tdz_value_19) { if (__eliscript_tdz_ready_19 !== true) __eliscript_tdz_error("native_locate"); return __eliscript_const_error(); }
|
|
63
|
-
var __eliscript_tdz_ready_20;
|
|
64
|
-
function __eliscript_tdz_read_20() { if (__eliscript_tdz_ready_20 !== true) __eliscript_tdz_error("temporary_counter"); return temporary_counter; }
|
|
65
|
-
function __eliscript_tdz_write_20(__eliscript_tdz_value_20) { if (__eliscript_tdz_ready_20 !== true) __eliscript_tdz_error("temporary_counter"); return (temporary_counter = __eliscript_tdz_value_20); }
|
|
29
|
+
function __eliscript_tdz_read_19() { if (__eliscript_tdz_ready_19 !== true) __eliscript_tdz_error("fail"); return fail; }
|
|
66
30
|
var __eliscript_tdz_ready_21;
|
|
67
|
-
function __eliscript_tdz_read_21() { if (__eliscript_tdz_ready_21 !== true) __eliscript_tdz_error("
|
|
68
|
-
function __eliscript_tdz_write_21(__eliscript_tdz_value_21) { if (__eliscript_tdz_ready_21 !== true) __eliscript_tdz_error("
|
|
31
|
+
function __eliscript_tdz_read_21() { if (__eliscript_tdz_ready_21 !== true) __eliscript_tdz_error("function_source_profile"); return function_source_profile; }
|
|
32
|
+
function __eliscript_tdz_write_21(__eliscript_tdz_value_21) { if (__eliscript_tdz_ready_21 !== true) __eliscript_tdz_error("function_source_profile"); return (function_source_profile = __eliscript_tdz_value_21); }
|
|
69
33
|
var __eliscript_tdz_ready_22;
|
|
70
|
-
function __eliscript_tdz_read_22() { if (__eliscript_tdz_ready_22 !== true) __eliscript_tdz_error("
|
|
71
|
-
function __eliscript_tdz_write_22(__eliscript_tdz_value_22) { if (__eliscript_tdz_ready_22 !== true) __eliscript_tdz_error("tdz_import"); return __eliscript_const_error(); }
|
|
34
|
+
function __eliscript_tdz_read_22() { if (__eliscript_tdz_ready_22 !== true) __eliscript_tdz_error("native_locate"); return native_locate; }
|
|
72
35
|
var __eliscript_tdz_ready_23;
|
|
73
|
-
function __eliscript_tdz_read_23() { if (__eliscript_tdz_ready_23 !== true) __eliscript_tdz_error("
|
|
74
|
-
function __eliscript_tdz_write_23(__eliscript_tdz_value_23) { if (__eliscript_tdz_ready_23 !== true) __eliscript_tdz_error("
|
|
36
|
+
function __eliscript_tdz_read_23() { if (__eliscript_tdz_ready_23 !== true) __eliscript_tdz_error("temporary_counter"); return temporary_counter; }
|
|
37
|
+
function __eliscript_tdz_write_23(__eliscript_tdz_value_23) { if (__eliscript_tdz_ready_23 !== true) __eliscript_tdz_error("temporary_counter"); return (temporary_counter = __eliscript_tdz_value_23); }
|
|
75
38
|
var __eliscript_tdz_ready_24;
|
|
76
|
-
function __eliscript_tdz_read_24() { if (__eliscript_tdz_ready_24 !== true) __eliscript_tdz_error("
|
|
77
|
-
function __eliscript_tdz_write_24(__eliscript_tdz_value_24) { if (__eliscript_tdz_ready_24 !== true) __eliscript_tdz_error("
|
|
39
|
+
function __eliscript_tdz_read_24() { if (__eliscript_tdz_ready_24 !== true) __eliscript_tdz_error("binding_temporaries"); return binding_temporaries; }
|
|
40
|
+
function __eliscript_tdz_write_24(__eliscript_tdz_value_24) { if (__eliscript_tdz_ready_24 !== true) __eliscript_tdz_error("binding_temporaries"); return (binding_temporaries = __eliscript_tdz_value_24); }
|
|
78
41
|
var __eliscript_tdz_ready_25;
|
|
79
|
-
function __eliscript_tdz_read_25() { if (__eliscript_tdz_ready_25 !== true) __eliscript_tdz_error("
|
|
80
|
-
|
|
42
|
+
function __eliscript_tdz_read_25() { if (__eliscript_tdz_ready_25 !== true) __eliscript_tdz_error("tdz_import"); return tdz_import; }
|
|
43
|
+
var __eliscript_tdz_ready_26;
|
|
44
|
+
function __eliscript_tdz_read_26() { if (__eliscript_tdz_ready_26 !== true) __eliscript_tdz_error("tdz_state"); return tdz_state; }
|
|
45
|
+
function __eliscript_tdz_write_26(__eliscript_tdz_value_26) { if (__eliscript_tdz_ready_26 !== true) __eliscript_tdz_error("tdz_state"); return (tdz_state = __eliscript_tdz_value_26); }
|
|
46
|
+
var __eliscript_tdz_ready_27;
|
|
47
|
+
function __eliscript_tdz_read_27() { if (__eliscript_tdz_ready_27 !== true) __eliscript_tdz_error("native_indent"); return native_indent; }
|
|
48
|
+
var __eliscript_tdz_ready_28;
|
|
49
|
+
function __eliscript_tdz_read_28() { if (__eliscript_tdz_ready_28 !== true) __eliscript_tdz_error("closed_scalar_operators"); return closed_scalar_operators; }
|
|
81
50
|
import "eliscript/runtime/unicode-case.mjs";
|
|
82
51
|
import "eliscript/runtime/math.mjs";
|
|
83
|
-
import {
|
|
52
|
+
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";
|
|
84
53
|
const __eliscript_truthy = (value) => value !== false && value != null;
|
|
85
|
-
const __eliscript_number_intrinsic = globalThis.Number;
|
|
86
|
-
const __eliscript_bigint_intrinsic = globalThis.BigInt;
|
|
87
|
-
const __eliscript_numeric_apply = globalThis.Reflect.apply;
|
|
88
|
-
const __eliscript_numeric_symbol = globalThis.Symbol.toPrimitive;
|
|
89
|
-
const __eliscript_numeric_error = globalThis.TypeError;
|
|
90
|
-
const __eliscript_numeric_trim = globalThis.String.prototype.trim;
|
|
91
|
-
const __eliscript_numeric_slice = globalThis.String.prototype.slice;
|
|
92
|
-
const __eliscript_numeric_exec = globalThis.RegExp.prototype.exec;
|
|
93
|
-
const __eliscript_numeric_radix = /^(?:0[xX][0-9a-fA-F]+|0[oO][0-7]+|0[bB][01]+)$/;
|
|
94
|
-
const __eliscript_numeric_object = (value) => value !== null && (typeof value === "object" || typeof value === "function" || (typeof value === "undefined" && value !== void 0));
|
|
95
|
-
const __eliscript_numeric_primitive = (value) => {
|
|
96
|
-
if (!__eliscript_numeric_object(value)) return value;
|
|
97
|
-
const exotic = value[__eliscript_numeric_symbol];
|
|
98
|
-
if (exotic !== void 0 && exotic !== null) {
|
|
99
|
-
const result = __eliscript_numeric_apply(exotic, value, ["number"]);
|
|
100
|
-
if (!__eliscript_numeric_object(result)) return result;
|
|
101
|
-
throw new __eliscript_numeric_error("Cannot convert object to primitive value");
|
|
102
|
-
}
|
|
103
|
-
for (let index = 0; index < 2; index++) {
|
|
104
|
-
const method = value[index === 0 ? "valueOf" : "toString"];
|
|
105
|
-
if (typeof method === "function" || (typeof method === "undefined" && method !== void 0)) {
|
|
106
|
-
const result = __eliscript_numeric_apply(method, value, []);
|
|
107
|
-
if (!__eliscript_numeric_object(result)) return result;
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
throw new __eliscript_numeric_error("Cannot convert object to primitive value");
|
|
111
|
-
};
|
|
112
|
-
const __eliscript_to_number = (value) => {
|
|
113
|
-
const primitive = __eliscript_numeric_primitive(value);
|
|
114
|
-
if (typeof primitive === "string") {
|
|
115
|
-
const text = __eliscript_numeric_apply(__eliscript_numeric_trim, primitive, []);
|
|
116
|
-
if (__eliscript_numeric_apply(__eliscript_numeric_exec, __eliscript_numeric_radix, [text]) !== null) {
|
|
117
|
-
let first = 2;
|
|
118
|
-
while (first < text.length && text[first] === "0") first++;
|
|
119
|
-
if (first === text.length) return 0;
|
|
120
|
-
const prefix = text[1];
|
|
121
|
-
const limit = prefix === "x" || prefix === "X" ? 256 : prefix === "b" || prefix === "B" ? 1024 : 342;
|
|
122
|
-
if (text.length - first > limit) return 1 / 0;
|
|
123
|
-
const token = __eliscript_numeric_apply(__eliscript_numeric_slice, text, [0, 2]) + __eliscript_numeric_apply(__eliscript_numeric_slice, text, [first]);
|
|
124
|
-
return __eliscript_number_intrinsic(__eliscript_bigint_intrinsic(token));
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
return __eliscript_number_intrinsic(primitive);
|
|
128
|
-
};
|
|
129
|
-
const __eliscript_numeric = (value) => {
|
|
130
|
-
if (typeof value === "number" || typeof value === "bigint") return value;
|
|
131
|
-
const primitive = __eliscript_numeric_primitive(value);
|
|
132
|
-
if (typeof primitive === "number" || typeof primitive === "bigint") return primitive;
|
|
133
|
-
return typeof primitive === "string" ? __eliscript_to_number(primitive) : +primitive;
|
|
134
|
-
};
|
|
135
|
-
const __eliscript_implicit_number = (value) => {
|
|
136
|
-
if (typeof value === "number") return value;
|
|
137
|
-
const primitive = __eliscript_numeric_primitive(value);
|
|
138
|
-
if (typeof primitive === "bigint") throw new __eliscript_numeric_error("Cannot convert a BigInt value to a number");
|
|
139
|
-
return typeof primitive === "string" ? __eliscript_to_number(primitive) : +primitive;
|
|
140
|
-
};
|
|
141
|
-
const __eliscript_numeric_decrement = (value) => __eliscript_implicit_number(value) - 1;
|
|
142
|
-
const __eliscript_numeric_sub = (a, b) => { if (typeof a === "number" && typeof b === "number") return a - b; return __eliscript_numeric(a) - __eliscript_numeric(b); };
|
|
143
|
-
const __eliscript_numeric_mul = (a, b) => { if (typeof a === "number" && typeof b === "number") return a * b; return __eliscript_numeric(a) * __eliscript_numeric(b); };
|
|
144
|
-
const __eliscript_numeric_div = (a, b) => { if (typeof a === "number" && typeof b === "number") return a / b; return __eliscript_numeric(a) / __eliscript_numeric(b); };
|
|
145
|
-
const __eliscript_numeric_rem = (a, b) => { if (typeof a === "number" && typeof b === "number") return a % b; return __eliscript_numeric(a) % __eliscript_numeric(b); };
|
|
146
|
-
const __eliscript_numeric_and = (a, b) => { if (typeof a === "number" && typeof b === "number") return a & b; return __eliscript_numeric(a) & __eliscript_numeric(b); };
|
|
147
|
-
const __eliscript_numeric_or = (a, b) => { if (typeof a === "number" && typeof b === "number") return a | b; return __eliscript_numeric(a) | __eliscript_numeric(b); };
|
|
148
|
-
const __eliscript_numeric_xor = (a, b) => { if (typeof a === "number" && typeof b === "number") return a ^ b; return __eliscript_numeric(a) ^ __eliscript_numeric(b); };
|
|
149
|
-
const __eliscript_numeric_shl = (a, b) => { if (typeof a === "number" && typeof b === "number") return a << b; return __eliscript_numeric(a) << __eliscript_numeric(b); };
|
|
150
|
-
const __eliscript_numeric_shr = (a, b) => { if (typeof a === "number" && typeof b === "number") return a >> b; return __eliscript_numeric(a) >> __eliscript_numeric(b); };
|
|
151
|
-
const __eliscript_numeric_ushr = (a, b) => { if (typeof a === "number" && typeof b === "number") return a >>> b; return __eliscript_numeric(a) >>> __eliscript_numeric(b); };
|
|
152
|
-
const __eliscript_numeric_neg = (a) => typeof a === "number" ? -a : -__eliscript_numeric(a);
|
|
153
|
-
const __eliscript_numeric_int32 = (a) => typeof a === "number" ? a | 0 : __eliscript_numeric(a) | 0;
|
|
154
|
-
const __eliscript_numeric_uint32 = (a) => typeof a === "number" ? a >>> 0 : __eliscript_numeric(a) >>> 0;
|
|
155
|
-
const __eliscript_numeric_not = (a) => typeof a === "number" ? ~a : ~__eliscript_numeric(a);
|
|
156
|
-
const __eliscript_numeric_relation = (operator, left, right) => {
|
|
157
|
-
if (typeof left === "number" && typeof right === "number") {
|
|
158
|
-
if (operator === "<") return left < right;
|
|
159
|
-
if (operator === "<=") return left <= right;
|
|
160
|
-
if (operator === ">") return left > right;
|
|
161
|
-
return left >= right;
|
|
162
|
-
}
|
|
163
|
-
let a = __eliscript_numeric_primitive(left);
|
|
164
|
-
let b = __eliscript_numeric_primitive(right);
|
|
165
|
-
const x = typeof a, y = typeof b;
|
|
166
|
-
if (!((x === "string" && y === "string") || (x === "bigint" && y === "string") || (x === "string" && y === "bigint"))) {
|
|
167
|
-
a = __eliscript_numeric(a);
|
|
168
|
-
b = __eliscript_numeric(b);
|
|
169
|
-
}
|
|
170
|
-
if (operator === "<") return a < b;
|
|
171
|
-
if (operator === "<=") return a <= b;
|
|
172
|
-
if (operator === ">") return a > b;
|
|
173
|
-
return a >= b;
|
|
174
|
-
};
|
|
175
54
|
|
|
176
55
|
import {binding_name, reference_name} from "./symbol.mjs";
|
|
177
56
|
import {node_p, program_filename, program_body, ir_kind, ir_span, ir_value, ir_children, ir_property} from "./ir.mjs";
|
|
178
57
|
import {create_source_map} from "./source-map.mjs";
|
|
179
58
|
const array_text_import = "import { c as __eliscript_at, d as __eliscript_at_direct } from \"data:text/javascript;base64,dmFyIG09UmVmbGVjdC5hcHBseSx0dD1OdW1iZXIucHJvdG90eXBlLnZhbHVlT2Ysaj1OdW1iZXIucHJvdG90eXBlLnRvU3RyaW5nLFU9TnVtYmVyLG50PU9iamVjdC5jcmVhdGUsaD1CaWdJbnQsZXQ9RGF0YVZpZXcsb3Q9QXJyYXlCdWZmZXIsaXQ9RGF0YVZpZXcucHJvdG90eXBlLnNldEZsb2F0NjQsSj1EYXRhVmlldy5wcm90b3R5cGUuZ2V0VWludDMyLHJ0PVJhbmdlRXJyb3I7ZnVuY3Rpb24gY3QodCxuKXtsZXQgZT1oKG4pLG89aCh0KSxpPSIiO2lmKG88MG4pbz0tbztkb3tsZXQgZj1vJWU7aT0iMDEyMzQ1Njc4OWFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6IltVKGYpXStpLG8vPWV9d2hpbGUobyE9PTBuKTtyZXR1cm4gdDwwPyItIitpOml9ZnVuY3Rpb24gc3QodCxuKXtsZXQgZT1uZXcgZXQobmV3IG90KDgpKTttKGl0LGUsWzAsdCwhMV0pO2xldCBvPW0oSixlLFswLCExXSksaT1tKEosZSxbNCwhMV0pLGY9bz4+PjIwJjIwNDcsYj1vJjEwNDg1NzUscD1vPj4+MzEscj1oKGIpPDwzMm58aChpKTtpZihmIT09MClyKz0xbjw8NTJuO3I8PD0ybjtsZXQgbD00bix1PWY+MSYmYj09PTAmJmk9PT0wPzFuOjJuLGs9Mm47aWYoZj49MTA3NSl7bGV0IGM9aChmLTEwNzUpO3I8PD1jLHU8PD1jLGs8PD1jfWVsc2UgbDw8PWgoZj09PTA/MTA3NDoxMDc1LWYpO2xldCBkPWgobiksZz1udChudWxsKSxhPTAsUz0wLEQ9MDtpZihyPGwpd2hpbGUocjxsKXtpZihyKjJuPmwmJnIraz5sKWJyZWFrO3IqPWQsdSo9ZCxrKj1kLFMtLX1lbHNlIHdoaWxlKHI+PWwqZClsKj1kLFMrKztmb3IoOzspe2xldCBjPVUoci9sKTtyJT1sO2xldCBJPXI8dSx4PXIraz5sO2dbYSsrXT1jLEQ9RCoobiYxKStjJjE7bGV0IHE9cioybixQPXE+bHx8cT09PWwmJkQ9PT0xO2lmKFAmJnh8fCFQJiZJKXtpZihQKXtsZXQgUj1hLEI9ITA7d2hpbGUoUj4wJiZCKXtSLS07bGV0IEg9Z1tSXSsxO2lmKEg9PT1uKWdbUl09MDtlbHNlIGdbUl09SCxCPSExfWlmKEIpZ1swXT0xLFMrK31icmVha31pZihhPj02NCl0aHJvdyBuZXcgcnQoIm51bWJlciByYWRpeCBmb3JtYXR0aW5nIGRpZCBub3QgY29udmVyZ2UiKTtyKj1kLHUqPWQsayo9ZH13aGlsZShhPjEmJmdbYS0xXT09PTApYS0tO2xldCB3PSIiO2lmKFM8MCl7dz0iMC4iO2ZvcihsZXQgYz0wO2M8LTEtUztjKyspdys9IjAiO2ZvcihsZXQgYz0wO2M8YTtjKyspdys9IjAxMjM0NTY3ODlhYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5eiJbZ1tjXV19ZWxzZXtsZXQgYz1TKzEsST1jPmE/YzphO2ZvcihsZXQgeD0wO3g8STt4Kyspe2lmKHg9PT1jJiZjPGEpdys9Ii4iO3crPXg8YT8iMDEyMzQ1Njc4OWFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6IltnW3hdXToiMCJ9fXJldHVybiBwPyItIit3Ond9ZnVuY3Rpb24gRyh0LG4pe2xldCBlO3RyeXtlPW0odHQsdCxbXSl9Y2F0Y2h7cmV0dXJuIG0oaix0LFtuXSl9bGV0IG89MTA7aWYobiE9PXZvaWQgMCl7bGV0IGk9K247aWYobz1pIT09aT8wOmktaSUxLG88Mnx8bz4zNnx8byE9PW8pcmV0dXJuIG0oaixlLFtvXSl9aWYobz09PTEwfHxlPT09MHx8ZSE9PWV8fGU9PT0xLzB8fGU9PT0tMS8wKXJldHVybiBtKGosZSxbMTBdKTtyZXR1cm4gZSUxPT09MD9jdChlLG8pOnN0KGUsbyl9dmFyIHM9UmVmbGVjdC5hcHBseSxNPUZ1bmN0aW9uLnByb3RvdHlwZS5jYWxsLE49RnVuY3Rpb24ucHJvdG90eXBlLmFwcGx5LEU9RnVuY3Rpb24ucHJvdG90eXBlLmJpbmQsVD1PYmplY3QuZGVmaW5lUHJvcGVydHksbHQ9T2JqZWN0LmdldE93blByb3BlcnR5RGVzY3JpcHRvcixmdD1PYmplY3QuZ2V0UHJvdG90eXBlT2YsdXQ9T2JqZWN0LnNldFByb3RvdHlwZU9mLGF0PVJlZmxlY3Qub3duS2V5cyxwdD1TeW1ib2wuaGFzSW5zdGFuY2UsVj1BcnJheS5pc0FycmF5LEs9QXJyYXkucHJvdG90eXBlLmpvaW4sej1BcnJheS5wcm90b3R5cGUudG9TdHJpbmcseXQ9T2JqZWN0LnByb3RvdHlwZS50b1N0cmluZyxidD1TdHJpbmcsQz1UeXBlRXJyb3IsZHQ9U3ltYm9sLnRvUHJpbWl0aXZlLGd0PVdlYWtTZXQucHJvdG90eXBlLmhhcyx3dD1XZWFrU2V0LnByb3RvdHlwZS5hZGQseHQ9V2Vha1NldC5wcm90b3R5cGUuZGVsZXRlLEY9bmV3IFdlYWtTZXQsTz1udWxsLFc9KHQpPT50IT09bnVsbCYmKHR5cGVvZiB0PT09Im9iamVjdCJ8fHR5cGVvZiB0PT09ImZ1bmN0aW9uInx8dHlwZW9mIHQ+InUiJiZ0IT09dm9pZCAwKSxBPSh0KT0+dHlwZW9mIHQ9PT0iZnVuY3Rpb24ifHx0eXBlb2YgdD4idSImJnQhPT12b2lkIDA7ZnVuY3Rpb24gaHQoKXtsZXQgbj1uZXcgQygiY3ljbGljIGFycmF5IHRleHQgY29udmVyc2lvbiIpO3Rocm93IG4uZWxpc2NyaXB0RGlhZ25vc3RpYz17Zm9ybWF0OiJlbGlzY3JpcHQtZGlhZ25vc3RpYyIsdmVyc2lvbjoxLGNvZGU6IkVMSS1SVDAwMDkiLHNldmVyaXR5OiJlcnJvciIscGhhc2U6InJ1bnRpbWUiLG1lc3NhZ2U6ImN5Y2xpYyBhcnJheSB0ZXh0IGNvbnZlcnNpb24ifSxufWZ1bmN0aW9uIG10KHQpe2lmKCFXKHQpKXJldHVybiB0O2xldCBuPXRbZHRdO2lmKG4hPT12b2lkIDAmJm4hPT1udWxsKXtsZXQgZT1zKG4sdCxbInN0cmluZyJdKTtpZighVyhlKSlyZXR1cm4gZTt0aHJvdyBuZXcgQygiQ2Fubm90IGNvbnZlcnQgb2JqZWN0IHRvIHByaW1pdGl2ZSB2YWx1ZSIpfWZvcihsZXQgZT0wO2U8MjtlKyspe2xldCBvPXRbZT09PTA/InRvU3RyaW5nIjoidmFsdWVPZiJdO2lmKEEobykpe2xldCBpPW89PT16JiZWKHQpP3YodCk6cyhvLHQsW10pO2lmKCFXKGkpKXJldHVybiBpfX10aHJvdyBuZXcgQygiQ2Fubm90IGNvbnZlcnQgb2JqZWN0IHRvIHByaW1pdGl2ZSB2YWx1ZSIpfWZ1bmN0aW9uIFEodCl7bGV0IG49bXQodCk7aWYodHlwZW9mIG49PT0ic3ltYm9sIil0aHJvdyBuZXcgQygiQ2Fubm90IGNvbnZlcnQgYSBTeW1ib2wgdmFsdWUgdG8gYSBzdHJpbmciKTtyZXR1cm4gYnQobil9ZnVuY3Rpb24gXyh0LG4pe2xldCBlPSt0Lmxlbmd0aCxvPWUhPT1lfHxlPD0wPzA6ZT49OTAwNzE5OTI1NDc0MDk5MT85MDA3MTk5MjU0NzQwOTkxOmUtZSUxLGk9bj09PXZvaWQgMD8iLCI6UShuKSxmPU89PT1udWxsO2lmKGYpTz10O2Vsc2V7aWYodD09PU98fHMoZ3QsRixbdF0pKWh0KCk7cyh3dCxGLFt0XSl9dHJ5e2xldCBiPSIiO2ZvcihsZXQgcD0wO3A8bztwKyspe2lmKHApYis9aTtsZXQgcj10W3BdO2lmKHIhPT1udWxsJiZyIT09dm9pZCAwKWIrPVEocil9cmV0dXJuIGJ9ZmluYWxseXtpZihmKU89bnVsbDtlbHNlIHMoeHQsRixbdF0pfX1mdW5jdGlvbiB2KHQpe2xldCBuPXQuam9pbjtyZXR1cm4gQShuKT9uPT09Sz9fKHQsdm9pZCAwKTpzKG4sdCxbXSk6cyh5dCx0LFtdKX1mdW5jdGlvbiB5KHQsbil7cmV0dXJuIG48dC5sZW5ndGg/dFtuXTp2b2lkIDB9ZnVuY3Rpb24gWCh0LG4pe2xldCBlPVtdO2ZvcihsZXQgbz1uO288dC5sZW5ndGg7bysrKVQoZSxlLmxlbmd0aCx7dmFsdWU6dFtvXSx3cml0YWJsZTohMCxlbnVtZXJhYmxlOiEwLGNvbmZpZ3VyYWJsZTohMH0pO3JldHVybiBlfWZ1bmN0aW9uIFN0KHQsbil7bGV0IGU9W107Zm9yKGxldCBvPTA7bzx0Lmxlbmd0aCtuLmxlbmd0aDtvKyspVChlLG8se3ZhbHVlOm88dC5sZW5ndGg/dFtvXTpuW28tdC5sZW5ndGhdLHdyaXRhYmxlOiEwLGVudW1lcmFibGU6ITAsY29uZmlndXJhYmxlOiEwfSk7cmV0dXJuIGV9ZnVuY3Rpb24gWSguLi50KXtyZXR1cm4gdH1mdW5jdGlvbiBaKHQsbil7cmV0dXJuIG4/cyhOLFksW3ZvaWQgMCx0XSk6cyhZLHZvaWQgMCx0KX1mdW5jdGlvbiBMKHQsbixlKXtmb3IoOzspe2lmKHQ9PT1qKXJldHVybiBHKG4seShlLDApKTtpZih0PT09SyYmVihuKSlyZXR1cm4gXyhuLHkoZSwwKSk7aWYodD09PXomJlYobikpcmV0dXJuIHYobik7aWYodD09PU0pe2lmKCFBKG4pKXJldHVybiBzKHQsbixlKTtsZXQgbz1uLGk9eShlLDApO2U9WChlLDEpLHQ9byxuPWk7Y29udGludWV9aWYodD09PU4pe2lmKCFBKG4pKXJldHVybiBzKHQsbixlKTtsZXQgbz1uLGk9eShlLDApO2U9Wih5KGUsMSksITApLHQ9byxuPWk7Y29udGludWV9aWYodD09PXMpe2xldCBvPXkoZSwwKSxpPXkoZSwxKTtpZighQShvKSlyZXR1cm4gcyh0LG4sZSk7ZT1aKHkoZSwyKSwhMSksdD1vLG49aTtjb250aW51ZX1pZih0PT09RSl7bGV0IG89cyh0LG4sZSk7aWYobiE9PWomJm4hPT1LJiZuIT09eiYmbiE9PU0mJm4hPT1OJiZuIT09cyYmbiE9PUUpcmV0dXJuIG87bGV0IGk9bixmPXkoZSwwKSxiPVgoZSwxKSxwPSguLi51KT0+TChpLGYsU3QoYix1KSk7VChwLHB0LHt2YWx1ZToodSk9PnUgaW5zdGFuY2VvZiBpLGNvbmZpZ3VyYWJsZTohMH0pO2xldCByPXMoRSxwLFt2b2lkIDBdKTt1dChyLGZ0KG8pKTtsZXQgbD1hdChvKTtmb3IobGV0IHU9MDt1PGwubGVuZ3RoO3UrKylUKHIsbFt1XSxsdChvLGxbdV0pKTtyZXR1cm4gcn1yZXR1cm4gcyh0LG4sZSl9fWZ1bmN0aW9uIFJ0KHQsbil7bGV0IGU9dFtuXTtyZXR1cm4oLi4ubyk9PkwoZSx0LG8pfWZ1bmN0aW9uIEF0KHQsbiwuLi5lKXtsZXQgbz10W25dO3JldHVybiBMKG8sdCxlKX1leHBvcnR7UnQgYXMgYyxBdCBhcyBkfTs=\";\n";
|
|
180
|
-
__eliscript_tdz_ready_0 = true;
|
|
181
59
|
const literal_runtime_import = "import { hashMap as __eliscript_hash_map, hashSet as __eliscript_hash_set, keyword as __eliscript_keyword, list as __eliscript_list, queue as __eliscript_queue, symbol as __eliscript_symbol, vector as __eliscript_vector } from \"eliscript/runtime/literals.mjs\";\n";
|
|
182
60
|
__eliscript_tdz_ready_1 = true;
|
|
183
61
|
const collection_runtime_import = "import { count as __eliscript_count, nth as __eliscript_nth } from \"eliscript/runtime/core/collection.mjs\";\n";
|
|
@@ -189,45 +67,57 @@ __eliscript_tdz_ready_4 = true;
|
|
|
189
67
|
const binding_runtime = "import { get as __eliscript_get } from \"eliscript/runtime/core/collection.mjs\";\nconst __eliscript_binding_missing = Symbol(\"eliscript.binding.missing\");\nconst __eliscript_binding_get = (value, key, notFound) => { if (value == null) return notFound; const prototype = typeof value === \"object\" ? Object.getPrototypeOf(value) : undefined; if (prototype === Object.prototype || prototype === null) { const type = key && Object.getOwnPropertyDescriptor(key, Symbol.for(\"eliscript.value.type\")); if (type?.value === \"keyword\" || type?.value === \"symbol\") key = key.qualifiedName; } return __eliscript_get(value, key, notFound); };\n";
|
|
190
68
|
__eliscript_tdz_ready_5 = true;
|
|
191
69
|
const number_conversion_intrinsics = "const __eliscript_number_intrinsic = globalThis.Number;\nconst __eliscript_bigint_intrinsic = globalThis.BigInt;\nconst __eliscript_numeric_apply = globalThis.Reflect.apply;\nconst __eliscript_numeric_symbol = globalThis.Symbol.toPrimitive;\nconst __eliscript_numeric_error = globalThis.TypeError;\nconst __eliscript_numeric_trim = globalThis.String.prototype.trim;\nconst __eliscript_numeric_slice = globalThis.String.prototype.slice;\nconst __eliscript_numeric_exec = globalThis.RegExp.prototype.exec;\n";
|
|
192
|
-
__eliscript_tdz_ready_6 = true;
|
|
193
|
-
const number_conversion_capsule = "import { __eliscript_number_intrinsic, __eliscript_bigint_intrinsic, __eliscript_numeric_apply, __eliscript_numeric_symbol, __eliscript_numeric_error, __eliscript_numeric_trim, __eliscript_numeric_slice, __eliscript_numeric_exec } from \"data:text/javascript;base64,ZXhwb3J0IGNvbnN0IF9fZWxpc2NyaXB0X251bWJlcl9pbnRyaW5zaWMgPSBnbG9iYWxUaGlzLk51bWJlcjsKZXhwb3J0IGNvbnN0IF9fZWxpc2NyaXB0X2JpZ2ludF9pbnRyaW5zaWMgPSBnbG9iYWxUaGlzLkJpZ0ludDsKZXhwb3J0IGNvbnN0IF9fZWxpc2NyaXB0X251bWVyaWNfYXBwbHkgPSBnbG9iYWxUaGlzLlJlZmxlY3QuYXBwbHk7CmV4cG9ydCBjb25zdCBfX2VsaXNjcmlwdF9udW1lcmljX3N5bWJvbCA9IGdsb2JhbFRoaXMuU3ltYm9sLnRvUHJpbWl0aXZlOwpleHBvcnQgY29uc3QgX19lbGlzY3JpcHRfbnVtZXJpY19lcnJvciA9IGdsb2JhbFRoaXMuVHlwZUVycm9yOwpleHBvcnQgY29uc3QgX19lbGlzY3JpcHRfbnVtZXJpY190cmltID0gZ2xvYmFsVGhpcy5TdHJpbmcucHJvdG90eXBlLnRyaW07CmV4cG9ydCBjb25zdCBfX2VsaXNjcmlwdF9udW1lcmljX3NsaWNlID0gZ2xvYmFsVGhpcy5TdHJpbmcucHJvdG90eXBlLnNsaWNlOwpleHBvcnQgY29uc3QgX19lbGlzY3JpcHRfbnVtZXJpY19leGVjID0gZ2xvYmFsVGhpcy5SZWdFeHAucHJvdG90eXBlLmV4ZWM7Cg==\";\n";
|
|
194
|
-
__eliscript_tdz_ready_7 = true;
|
|
195
70
|
const number_conversion_body = "const __eliscript_numeric_radix = /^(?:0[xX][0-9a-fA-F]+|0[oO][0-7]+|0[bB][01]+)$/;\nconst __eliscript_numeric_object = (value) => value !== null && (typeof value === \"object\" || typeof value === \"function\" || (typeof value === \"undefined\" && value !== void 0));\nconst __eliscript_numeric_primitive = (value) => {\n if (!__eliscript_numeric_object(value)) return value;\n const exotic = value[__eliscript_numeric_symbol];\n if (exotic !== void 0 && exotic !== null) {\n const result = __eliscript_numeric_apply(exotic, value, [\"number\"]);\n if (!__eliscript_numeric_object(result)) return result;\n throw new __eliscript_numeric_error(\"Cannot convert object to primitive value\");\n }\n for (let index = 0; index < 2; index++) {\n const method = value[index === 0 ? \"valueOf\" : \"toString\"];\n if (typeof method === \"function\" || (typeof method === \"undefined\" && method !== void 0)) {\n const result = __eliscript_numeric_apply(method, value, []);\n if (!__eliscript_numeric_object(result)) return result;\n }\n }\n throw new __eliscript_numeric_error(\"Cannot convert object to primitive value\");\n};\nconst __eliscript_to_number = (value) => {\n const primitive = __eliscript_numeric_primitive(value);\n if (typeof primitive === \"string\") {\n const text = __eliscript_numeric_apply(__eliscript_numeric_trim, primitive, []);\n if (__eliscript_numeric_apply(__eliscript_numeric_exec, __eliscript_numeric_radix, [text]) !== null) {\n let first = 2;\n while (first < text.length && text[first] === \"0\") first++;\n if (first === text.length) return 0;\n const prefix = text[1];\n const limit = prefix === \"x\" || prefix === \"X\" ? 256 : prefix === \"b\" || prefix === \"B\" ? 1024 : 342;\n if (text.length - first > limit) return 1 / 0;\n const token = __eliscript_numeric_apply(__eliscript_numeric_slice, text, [0, 2]) + __eliscript_numeric_apply(__eliscript_numeric_slice, text, [first]);\n return __eliscript_number_intrinsic(__eliscript_bigint_intrinsic(token));\n }\n }\n return __eliscript_number_intrinsic(primitive);\n};\n";
|
|
196
|
-
|
|
197
|
-
const number_conversion_helper = (String((__eliscript_tdz_read_6())) + String((__eliscript_tdz_read_8())));
|
|
198
|
-
__eliscript_tdz_ready_9 = true;
|
|
71
|
+
const number_conversion_helper = (String(number_conversion_intrinsics) + String(number_conversion_body));
|
|
199
72
|
const numeric_operator_helper = "const __eliscript_numeric = (value) => {\n if (typeof value === \"number\" || typeof value === \"bigint\") return value;\n const primitive = __eliscript_numeric_primitive(value);\n if (typeof primitive === \"number\" || typeof primitive === \"bigint\") return primitive;\n return typeof primitive === \"string\" ? __eliscript_to_number(primitive) : +primitive;\n};\nconst __eliscript_implicit_number = (value) => {\n if (typeof value === \"number\") return value;\n const primitive = __eliscript_numeric_primitive(value);\n if (typeof primitive === \"bigint\") throw new __eliscript_numeric_error(\"Cannot convert a BigInt value to a number\");\n return typeof primitive === \"string\" ? __eliscript_to_number(primitive) : +primitive;\n};\nconst __eliscript_numeric_decrement = (value) => __eliscript_implicit_number(value) - 1;\nconst __eliscript_numeric_sub = (a, b) => { if (typeof a === \"number\" && typeof b === \"number\") return a - b; return __eliscript_numeric(a) - __eliscript_numeric(b); };\nconst __eliscript_numeric_mul = (a, b) => { if (typeof a === \"number\" && typeof b === \"number\") return a * b; return __eliscript_numeric(a) * __eliscript_numeric(b); };\nconst __eliscript_numeric_div = (a, b) => { if (typeof a === \"number\" && typeof b === \"number\") return a / b; return __eliscript_numeric(a) / __eliscript_numeric(b); };\nconst __eliscript_numeric_rem = (a, b) => { if (typeof a === \"number\" && typeof b === \"number\") return a % b; return __eliscript_numeric(a) % __eliscript_numeric(b); };\nconst __eliscript_numeric_and = (a, b) => { if (typeof a === \"number\" && typeof b === \"number\") return a & b; return __eliscript_numeric(a) & __eliscript_numeric(b); };\nconst __eliscript_numeric_or = (a, b) => { if (typeof a === \"number\" && typeof b === \"number\") return a | b; return __eliscript_numeric(a) | __eliscript_numeric(b); };\nconst __eliscript_numeric_xor = (a, b) => { if (typeof a === \"number\" && typeof b === \"number\") return a ^ b; return __eliscript_numeric(a) ^ __eliscript_numeric(b); };\nconst __eliscript_numeric_shl = (a, b) => { if (typeof a === \"number\" && typeof b === \"number\") return a << b; return __eliscript_numeric(a) << __eliscript_numeric(b); };\nconst __eliscript_numeric_shr = (a, b) => { if (typeof a === \"number\" && typeof b === \"number\") return a >> b; return __eliscript_numeric(a) >> __eliscript_numeric(b); };\nconst __eliscript_numeric_ushr = (a, b) => { if (typeof a === \"number\" && typeof b === \"number\") return a >>> b; return __eliscript_numeric(a) >>> __eliscript_numeric(b); };\nconst __eliscript_numeric_neg = (a) => typeof a === \"number\" ? -a : -__eliscript_numeric(a);\nconst __eliscript_numeric_int32 = (a) => typeof a === \"number\" ? a | 0 : __eliscript_numeric(a) | 0;\nconst __eliscript_numeric_uint32 = (a) => typeof a === \"number\" ? a >>> 0 : __eliscript_numeric(a) >>> 0;\nconst __eliscript_numeric_not = (a) => typeof a === \"number\" ? ~a : ~__eliscript_numeric(a);\nconst __eliscript_numeric_relation = (operator, left, right) => {\n if (typeof left === \"number\" && typeof right === \"number\") {\n if (operator === \"<\") return left < right;\n if (operator === \"<=\") return left <= right;\n if (operator === \">\") return left > right;\n return left >= right;\n }\n let a = __eliscript_numeric_primitive(left);\n let b = __eliscript_numeric_primitive(right);\n const x = typeof a, y = typeof b;\n if (!((x === \"string\" && y === \"string\") || (x === \"bigint\" && y === \"string\") || (x === \"string\" && y === \"bigint\"))) {\n a = __eliscript_numeric(a);\n b = __eliscript_numeric(b);\n }\n if (operator === \"<\") return a < b;\n if (operator === \"<=\") return a <= b;\n if (operator === \">\") return a > b;\n return a >= b;\n};\n";
|
|
200
|
-
__eliscript_tdz_ready_10 = true;
|
|
201
73
|
const imul_intrinsic = "const __eliscript_numeric_imul_intrinsic = globalThis.Math.imul;\n";
|
|
202
|
-
__eliscript_tdz_ready_11 = true;
|
|
203
|
-
const imul_capsule = "import { __eliscript_numeric_imul_intrinsic } from \"data:text/javascript;base64,ZXhwb3J0IGNvbnN0IF9fZWxpc2NyaXB0X251bWVyaWNfaW11bF9pbnRyaW5zaWMgPSBnbG9iYWxUaGlzLk1hdGguaW11bDsK\";\n";
|
|
204
|
-
__eliscript_tdz_ready_12 = true;
|
|
205
74
|
const imul_operator_helper = "const __eliscript_numeric_imul = (a, b) => __eliscript_numeric_imul_intrinsic(__eliscript_implicit_number(a), __eliscript_implicit_number(b));\n";
|
|
75
|
+
const prelude_array_text_names = ["__eliscript_at", "__eliscript_at_direct"];
|
|
76
|
+
__eliscript_tdz_ready_12 = true;
|
|
77
|
+
const prelude_number_conversion_names = ["__eliscript_to_number"];
|
|
206
78
|
__eliscript_tdz_ready_13 = true;
|
|
207
|
-
|
|
79
|
+
const prelude_numeric_coercion_names = ["__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"];
|
|
208
80
|
__eliscript_tdz_ready_14 = true;
|
|
209
|
-
const
|
|
81
|
+
const prelude_imul_names = ["__eliscript_numeric_imul"];
|
|
210
82
|
__eliscript_tdz_ready_15 = true;
|
|
83
|
+
const prelude_module = (String("// Generated by Eliscript. Do not edit.\n") + String("export") + String((array_text_import)["slice"](6)) + String(number_conversion_helper) + String(numeric_operator_helper) + String(imul_intrinsic) + String(imul_operator_helper) + String("export { ") + String(__eliscript_at_direct((prelude_number_conversion_names)["concat"](prelude_numeric_coercion_names, prelude_imul_names), "join", ", ")) + String(" };\n"));
|
|
84
|
+
__eliscript_tdz_ready_16 = true;
|
|
85
|
+
function prelude_import(array_text, number_conversion, numeric_coercion, imul) {
|
|
86
|
+
{
|
|
87
|
+
const __eliscript_value_1 = ([])["concat"]((__eliscript_truthy(array_text) ? (__eliscript_tdz_read_12()) : []), (__eliscript_truthy(number_conversion) ? (__eliscript_tdz_read_13()) : []), (__eliscript_truthy(numeric_coercion) ? (__eliscript_tdz_read_14()) : []), (__eliscript_truthy(imul) ? (__eliscript_tdz_read_15()) : []));
|
|
88
|
+
{
|
|
89
|
+
let names = __eliscript_value_1;
|
|
90
|
+
if ((((names) ?? []).length === 0)) {
|
|
91
|
+
return "";
|
|
92
|
+
} else {
|
|
93
|
+
return (String("import { ") + String(__eliscript_at_direct(names, "join", ", ")) + String(" } from \"eliscript/runtime/prelude.mjs\";\n"));
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
let numeric_emission_profile = false;
|
|
99
|
+
__eliscript_tdz_ready_17 = true;
|
|
100
|
+
const host_identity_token_helper = "const __eliscript_host_identity_token = (() => { const objects = new WeakMap(); const symbols = new Map(); let next = 1; return (value) => { const type = typeof value; if ((type !== \"object\" || value === null) && type !== \"function\" && type !== \"symbol\") throw new TypeError(\"host-identity-token expects an object, function, or symbol\"); const identities = type === \"symbol\" ? symbols : objects; const cached = identities.get(value); if (cached !== undefined) return cached; if (next > Number.MAX_SAFE_INTEGER) throw new RangeError(\"host identity token space exhausted\"); const token = next; next += 1; identities.set(value, token); return token; }; })();\n";
|
|
101
|
+
__eliscript_tdz_ready_18 = true;
|
|
211
102
|
const fail = ((message) => {
|
|
212
|
-
return ((
|
|
103
|
+
return ((__eliscript_value_2) => { throw __eliscript_value_2; })(new (Error)(message));
|
|
213
104
|
});
|
|
214
|
-
|
|
105
|
+
__eliscript_tdz_ready_19 = true;
|
|
215
106
|
const prefix_locate_mark = (head, tail) => [head, ...tail];
|
|
216
|
-
__eliscript_tdz_ready_17 = true;
|
|
217
107
|
let function_source_profile = false;
|
|
218
|
-
|
|
108
|
+
__eliscript_tdz_ready_21 = true;
|
|
219
109
|
const native_locate = ((span, output) => {
|
|
220
110
|
{
|
|
221
111
|
let fragment = ((((__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; } })(output) === "string") ? ({"text": output, "marks": []}) : output);
|
|
222
112
|
let marks = (fragment)["marks"];
|
|
223
|
-
if (__eliscript_truthy(((
|
|
113
|
+
if (__eliscript_truthy(((__eliscript_value_3) => (__eliscript_truthy(__eliscript_value_3) ? __eliscript_value_3 : ((((fragment)["text"])["length"] === 0) || (span == null) || (span === false) || (__eliscript_numeric_relation(">", (marks)["length"], 0) && (((marks)[0])["offset"] === 0)))))(function_source_profile))) {
|
|
224
114
|
return fragment;
|
|
225
115
|
} else {
|
|
226
116
|
{
|
|
227
|
-
const
|
|
117
|
+
const __eliscript_value_4 = ({"text": (fragment)["text"], "marks": prefix_locate_mark(({"offset": 0, "span": span}), marks)});
|
|
228
118
|
{
|
|
229
|
-
let result =
|
|
230
|
-
if (__eliscript_truthy(
|
|
119
|
+
let result = __eliscript_value_4;
|
|
120
|
+
if (__eliscript_truthy(function_source_profile)) {
|
|
231
121
|
((result)["functions"] = ((fragment)["functions"] ?? []));
|
|
232
122
|
}
|
|
233
123
|
return result;
|
|
@@ -236,29 +126,29 @@ const native_locate = ((span, output) => {
|
|
|
236
126
|
}
|
|
237
127
|
}
|
|
238
128
|
});
|
|
239
|
-
|
|
129
|
+
__eliscript_tdz_ready_22 = true;
|
|
240
130
|
let temporary_counter = 0;
|
|
241
|
-
|
|
131
|
+
__eliscript_tdz_ready_23 = true;
|
|
242
132
|
let binding_temporaries = new (globalThis.Map)();
|
|
243
|
-
|
|
133
|
+
__eliscript_tdz_ready_24 = true;
|
|
244
134
|
const tdz_import = "import { tdz as __eliscript_tdz_error, immutable as __eliscript_const_error } from \"data:text/javascript;base64,Y29uc3QgRSA9IFJlZmVyZW5jZUVycm9yOyBjb25zdCBUID0gVHlwZUVycm9yOyBleHBvcnQgZnVuY3Rpb24gdGR6KG5hbWUpIHsgdGhyb3cgbmV3IEUoIkNhbm5vdCBhY2Nlc3MgJyIgKyBuYW1lICsgIicgYmVmb3JlIGluaXRpYWxpemF0aW9uIik7IH0gZXhwb3J0IGZ1bmN0aW9uIGltbXV0YWJsZSgpIHsgdGhyb3cgbmV3IFQoIkFzc2lnbm1lbnQgdG8gY29uc3RhbnQgdmFyaWFibGUuIik7IH0K\";\n";
|
|
245
|
-
|
|
135
|
+
__eliscript_tdz_ready_25 = true;
|
|
246
136
|
let tdz_state = null;
|
|
247
|
-
|
|
137
|
+
__eliscript_tdz_ready_26 = true;
|
|
248
138
|
function tdz_ready_name(record) {
|
|
249
139
|
return (String("__eliscript_tdz_ready_") + String((record)["index"]));
|
|
250
140
|
}
|
|
251
141
|
function tdz_root_name(name) {
|
|
252
142
|
{
|
|
253
|
-
const
|
|
254
|
-
const
|
|
143
|
+
const __eliscript_value_5 = (name)["indexOf"](".");
|
|
144
|
+
const __eliscript_value_6 = (name)["indexOf"]("/");
|
|
255
145
|
{
|
|
256
|
-
let dot =
|
|
257
|
-
let slash =
|
|
146
|
+
let dot = __eliscript_value_5;
|
|
147
|
+
let slash = __eliscript_value_6;
|
|
258
148
|
{
|
|
259
|
-
const
|
|
149
|
+
const __eliscript_value_7 = (__eliscript_numeric_relation("<", dot, 0) ? slash : (__eliscript_numeric_relation("<", slash, 0) ? dot : (__eliscript_numeric_relation("<", dot, slash) ? dot : slash)));
|
|
260
150
|
{
|
|
261
|
-
let end =
|
|
151
|
+
let end = __eliscript_value_7;
|
|
262
152
|
if (__eliscript_numeric_relation("<", end, 0)) {
|
|
263
153
|
return name;
|
|
264
154
|
} else {
|
|
@@ -274,20 +164,20 @@ function tdz_scope(parent) {
|
|
|
274
164
|
}
|
|
275
165
|
function tdz_find(scope, name) {
|
|
276
166
|
{
|
|
277
|
-
const
|
|
278
|
-
const
|
|
279
|
-
const
|
|
280
|
-
const
|
|
167
|
+
const __eliscript_value_8 = scope;
|
|
168
|
+
const __eliscript_value_9 = false;
|
|
169
|
+
const __eliscript_value_10 = null;
|
|
170
|
+
const __eliscript_value_11 = binding_name(name);
|
|
281
171
|
{
|
|
282
|
-
let current =
|
|
283
|
-
let found =
|
|
284
|
-
let record =
|
|
285
|
-
let key =
|
|
286
|
-
while (__eliscript_truthy(((
|
|
172
|
+
let current = __eliscript_value_8;
|
|
173
|
+
let found = __eliscript_value_9;
|
|
174
|
+
let record = __eliscript_value_10;
|
|
175
|
+
let key = __eliscript_value_11;
|
|
176
|
+
while (__eliscript_truthy(((__eliscript_value_12) => (__eliscript_truthy(__eliscript_value_12) ? (!__eliscript_truthy(found)) : __eliscript_value_12))(current))) {
|
|
287
177
|
{
|
|
288
|
-
const
|
|
178
|
+
const __eliscript_value_13 = (current)["names"];
|
|
289
179
|
{
|
|
290
|
-
let names =
|
|
180
|
+
let names = __eliscript_value_13;
|
|
291
181
|
if (__eliscript_truthy((names)["has"](key))) {
|
|
292
182
|
((record = (names)["get"](key)));
|
|
293
183
|
((found = true));
|
|
@@ -303,11 +193,11 @@ function tdz_find(scope, name) {
|
|
|
303
193
|
}
|
|
304
194
|
function tdz_pattern_names(node, scope) {
|
|
305
195
|
{
|
|
306
|
-
const
|
|
307
|
-
const
|
|
196
|
+
const __eliscript_value_14 = ir_kind(node);
|
|
197
|
+
const __eliscript_value_15 = children(node);
|
|
308
198
|
{
|
|
309
|
-
let kind =
|
|
310
|
-
let nodes =
|
|
199
|
+
let kind = __eliscript_value_14;
|
|
200
|
+
let nodes = __eliscript_value_15;
|
|
311
201
|
if ((kind === "binding-name")) {
|
|
312
202
|
return ((scope)["names"])["set"](binding_name(ir_value(node)), null);
|
|
313
203
|
} else {
|
|
@@ -335,11 +225,11 @@ function tdz_bind(node, scope) {
|
|
|
335
225
|
}
|
|
336
226
|
function tdz_pattern_defaults(node, scope, state) {
|
|
337
227
|
{
|
|
338
|
-
const
|
|
339
|
-
const
|
|
228
|
+
const __eliscript_value_16 = ir_kind(node);
|
|
229
|
+
const __eliscript_value_17 = children(node);
|
|
340
230
|
{
|
|
341
|
-
let kind =
|
|
342
|
-
let nodes =
|
|
231
|
+
let kind = __eliscript_value_16;
|
|
232
|
+
let nodes = __eliscript_value_17;
|
|
343
233
|
if ((kind === "map-binding-entry")) {
|
|
344
234
|
if (__eliscript_numeric_relation(">", ((nodes) ?? []).length, 2)) {
|
|
345
235
|
tdz_walk(((((nodes) ?? [])[2]) ?? null), scope, state);
|
|
@@ -364,57 +254,200 @@ function tdz_defaults(node, scope, state) {
|
|
|
364
254
|
return null;
|
|
365
255
|
}
|
|
366
256
|
}
|
|
367
|
-
function
|
|
368
|
-
|
|
257
|
+
function tdz_statements(nodes, statements) {
|
|
258
|
+
(nodes)["forEach"](((node) => {
|
|
259
|
+
if ((ir_kind(node) === "module-declaration")) {
|
|
260
|
+
return tdz_statements(children(node), statements);
|
|
261
|
+
} else {
|
|
262
|
+
return (statements)["push"](node);
|
|
263
|
+
}
|
|
264
|
+
}));
|
|
265
|
+
return statements;
|
|
266
|
+
}
|
|
267
|
+
function tdz_predeclare(statements, scope, state) {
|
|
268
|
+
return (statements)["forEach"](((node) => {
|
|
369
269
|
{
|
|
370
|
-
const
|
|
270
|
+
const __eliscript_value_18 = ir_kind(node);
|
|
271
|
+
const __eliscript_value_19 = ir_value(node);
|
|
371
272
|
{
|
|
372
|
-
let kind =
|
|
373
|
-
|
|
374
|
-
|
|
273
|
+
let kind = __eliscript_value_18;
|
|
274
|
+
let name = __eliscript_value_19;
|
|
275
|
+
if ((kind === "variable-declaration")) {
|
|
276
|
+
{
|
|
277
|
+
const __eliscript_value_20 = ({"name": name, "index": (((state)["variables"]) ?? []).length, "mutable": ir_property(node, "mutable"), "statement": (state)["position"], "read": false, "write": false});
|
|
278
|
+
{
|
|
279
|
+
let record = __eliscript_value_20;
|
|
280
|
+
((state)["variables"])["push"](record);
|
|
281
|
+
((state)["declarations"])["set"](node, record);
|
|
282
|
+
((scope)["names"])["set"](binding_name(name), record);
|
|
283
|
+
}
|
|
284
|
+
}
|
|
375
285
|
} else {
|
|
376
|
-
if ((kind === "
|
|
286
|
+
if ((kind === "function-declaration")) {
|
|
377
287
|
{
|
|
378
|
-
const
|
|
288
|
+
const __eliscript_value_21 = binding_name(name);
|
|
379
289
|
{
|
|
380
|
-
let
|
|
381
|
-
((state)["
|
|
382
|
-
((
|
|
383
|
-
|
|
290
|
+
let key = __eliscript_value_21;
|
|
291
|
+
((state)["functions"])["add"](key);
|
|
292
|
+
((scope)["names"])["set"](key, ({"function": key}));
|
|
293
|
+
if (__eliscript_truthy(ir_property(node, "portable"))) {
|
|
294
|
+
((state)["exported"])["push"](key);
|
|
295
|
+
}
|
|
384
296
|
}
|
|
385
297
|
}
|
|
386
298
|
} else {
|
|
387
|
-
if ((kind === "
|
|
388
|
-
|
|
299
|
+
if ((kind === "export-declaration")) {
|
|
300
|
+
(children(node))["forEach"](((reference) => {
|
|
301
|
+
return ((state)["exported"])["push"](binding_name(ir_value(reference)));
|
|
302
|
+
}));
|
|
389
303
|
} else {
|
|
390
304
|
if ((kind === "import-declaration")) {
|
|
391
|
-
|
|
305
|
+
((state)["imports"] = true);
|
|
306
|
+
(children(node))["forEach"](((child) => {
|
|
392
307
|
return ((scope)["names"])["set"](binding_name(ir_value(child)), null);
|
|
393
308
|
}));
|
|
394
309
|
} else {
|
|
395
|
-
|
|
310
|
+
|
|
396
311
|
}
|
|
397
312
|
}
|
|
398
313
|
}
|
|
399
314
|
}
|
|
400
315
|
}
|
|
401
316
|
}
|
|
317
|
+
return ((state)["position"] = ((state)["position"] + 1));
|
|
402
318
|
}));
|
|
403
319
|
}
|
|
320
|
+
function tdz_variable_p(record) {
|
|
321
|
+
return ((__eliscript_value_22) => (__eliscript_truthy(__eliscript_value_22) ? (((__eliscript_value) => { if (__eliscript_value === null) return "null"; const __eliscript_host_type = typeof __eliscript_value; if (__eliscript_host_type !== "object" && __eliscript_host_type !== "function") return __eliscript_host_type; try { const __eliscript_type = Object.getOwnPropertyDescriptor(__eliscript_value, Symbol.for("eliscript.value.type")); if (__eliscript_type && Object.prototype.hasOwnProperty.call(__eliscript_type, "value") && (__eliscript_type.value === "keyword" || __eliscript_type.value === "symbol")) return __eliscript_type.value; const __eliscript_kind = Object.getOwnPropertyDescriptor(__eliscript_value, "kind"); if (__eliscript_kind && Object.prototype.hasOwnProperty.call(__eliscript_kind, "value")) { if (__eliscript_kind.value === "eliscript/keyword") return "keyword"; if (__eliscript_kind.value === "eliscript/symbol") return "symbol"; } return __eliscript_host_type; } catch { return __eliscript_host_type; } })((record)["index"]) === "number") : __eliscript_value_22))(record);
|
|
322
|
+
}
|
|
323
|
+
function tdz_guarded_p(record) {
|
|
324
|
+
return ((__eliscript_value_23) => (__eliscript_truthy(__eliscript_value_23) ? ((__eliscript_value_24) => (__eliscript_truthy(__eliscript_value_24) ? __eliscript_value_24 : (record)["write"]))((record)["read"]) : __eliscript_value_23))(record);
|
|
325
|
+
}
|
|
326
|
+
function tdz_reference(state, record) {
|
|
327
|
+
{
|
|
328
|
+
const __eliscript_value_25 = (state)["owner"];
|
|
329
|
+
const __eliscript_value_26 = (state)["references"];
|
|
330
|
+
{
|
|
331
|
+
let owner = __eliscript_value_25;
|
|
332
|
+
let references = __eliscript_value_26;
|
|
333
|
+
if ((!__eliscript_truthy((references)["has"](owner)))) {
|
|
334
|
+
(references)["set"](owner, []);
|
|
335
|
+
}
|
|
336
|
+
return ((references)["get"](owner))["push"]((record)["function"]);
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
function tdz_site(state, kind, record, node) {
|
|
341
|
+
return ((state)["sites"])["push"](({"kind": kind, "record": record, "owner": (state)["owner"], "node": node}));
|
|
342
|
+
}
|
|
343
|
+
function tdz_finalize(state) {
|
|
344
|
+
{
|
|
345
|
+
const __eliscript_value_27 = (state)["functions"];
|
|
346
|
+
const __eliscript_value_28 = (state)["references"];
|
|
347
|
+
const __eliscript_value_29 = (state)["raw"];
|
|
348
|
+
const __eliscript_value_30 = new (globalThis.Map)();
|
|
349
|
+
const __eliscript_value_31 = [];
|
|
350
|
+
const __eliscript_value_32 = (state)["position"];
|
|
351
|
+
const __eliscript_value_33 = (state)["position"];
|
|
352
|
+
{
|
|
353
|
+
let functions = __eliscript_value_27;
|
|
354
|
+
let references = __eliscript_value_28;
|
|
355
|
+
let raw = __eliscript_value_29;
|
|
356
|
+
let early = __eliscript_value_30;
|
|
357
|
+
let pending = __eliscript_value_31;
|
|
358
|
+
let never = __eliscript_value_32;
|
|
359
|
+
let all = __eliscript_value_33;
|
|
360
|
+
{
|
|
361
|
+
const __eliscript_value_34 = ((key, index) => {
|
|
362
|
+
if (__eliscript_truthy(((__eliscript_value_35) => (__eliscript_truthy(__eliscript_value_35) ? __eliscript_numeric_relation("<", index, (__eliscript_truthy((early)["has"](key)) ? (early)["get"](key) : never)) : __eliscript_value_35))((functions)["has"](key)))) {
|
|
363
|
+
(early)["set"](key, index);
|
|
364
|
+
return (pending)["push"](key);
|
|
365
|
+
} else {
|
|
366
|
+
return null;
|
|
367
|
+
}
|
|
368
|
+
});
|
|
369
|
+
{
|
|
370
|
+
let lower = __eliscript_value_34;
|
|
371
|
+
if (__eliscript_truthy((state)["imports"])) {
|
|
372
|
+
((state)["exported"])["forEach"](((key) => {
|
|
373
|
+
return lower(key, -1);
|
|
374
|
+
}));
|
|
375
|
+
}
|
|
376
|
+
(references)["forEach"](((keys, owner) => {
|
|
377
|
+
if ((((__eliscript_value) => { if (__eliscript_value === null) return "null"; const __eliscript_host_type = typeof __eliscript_value; if (__eliscript_host_type !== "object" && __eliscript_host_type !== "function") return __eliscript_host_type; try { const __eliscript_type = Object.getOwnPropertyDescriptor(__eliscript_value, Symbol.for("eliscript.value.type")); if (__eliscript_type && Object.prototype.hasOwnProperty.call(__eliscript_type, "value") && (__eliscript_type.value === "keyword" || __eliscript_type.value === "symbol")) return __eliscript_type.value; const __eliscript_kind = Object.getOwnPropertyDescriptor(__eliscript_value, "kind"); if (__eliscript_kind && Object.prototype.hasOwnProperty.call(__eliscript_kind, "value")) { if (__eliscript_kind.value === "eliscript/keyword") return "keyword"; if (__eliscript_kind.value === "eliscript/symbol") return "symbol"; } return __eliscript_host_type; } catch { return __eliscript_host_type; } })(owner) === "number")) {
|
|
378
|
+
return (keys)["forEach"](((key) => {
|
|
379
|
+
return lower(key, owner);
|
|
380
|
+
}));
|
|
381
|
+
} else {
|
|
382
|
+
return null;
|
|
383
|
+
}
|
|
384
|
+
}));
|
|
385
|
+
(raw)["forEach"](((owner) => {
|
|
386
|
+
if (((((__eliscript_value) => { if (__eliscript_value === null) return "null"; const __eliscript_host_type = typeof __eliscript_value; if (__eliscript_host_type !== "object" && __eliscript_host_type !== "function") return __eliscript_host_type; try { const __eliscript_type = Object.getOwnPropertyDescriptor(__eliscript_value, Symbol.for("eliscript.value.type")); if (__eliscript_type && Object.prototype.hasOwnProperty.call(__eliscript_type, "value") && (__eliscript_type.value === "keyword" || __eliscript_type.value === "symbol")) return __eliscript_type.value; const __eliscript_kind = Object.getOwnPropertyDescriptor(__eliscript_value, "kind"); if (__eliscript_kind && Object.prototype.hasOwnProperty.call(__eliscript_kind, "value")) { if (__eliscript_kind.value === "eliscript/keyword") return "keyword"; if (__eliscript_kind.value === "eliscript/symbol") return "symbol"; } return __eliscript_host_type; } catch { return __eliscript_host_type; } })(owner) === "number") && __eliscript_numeric_relation("<", owner, all))) {
|
|
387
|
+
return ((all = owner));
|
|
388
|
+
} else {
|
|
389
|
+
return null;
|
|
390
|
+
}
|
|
391
|
+
}));
|
|
392
|
+
while (__eliscript_numeric_relation(">", ((pending) ?? []).length, 0)) {
|
|
393
|
+
{
|
|
394
|
+
let key = (pending)["pop"]();
|
|
395
|
+
let index = (early)["get"](key);
|
|
396
|
+
if (__eliscript_truthy(((__eliscript_value_36) => (__eliscript_truthy(__eliscript_value_36) ? __eliscript_numeric_relation("<", index, all) : __eliscript_value_36))((raw)["has"](key)))) {
|
|
397
|
+
((all = index));
|
|
398
|
+
}
|
|
399
|
+
if (__eliscript_truthy((references)["has"](key))) {
|
|
400
|
+
((references)["get"](key))["forEach"](((callee) => {
|
|
401
|
+
return lower(callee, index);
|
|
402
|
+
}));
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
return ((state)["sites"])["forEach"](((site) => {
|
|
409
|
+
{
|
|
410
|
+
let record = (site)["record"];
|
|
411
|
+
let owner = (site)["owner"];
|
|
412
|
+
let read = ((site)["kind"] === "read");
|
|
413
|
+
let start = (__eliscript_truthy((early)["has"](owner)) ? (early)["get"](owner) : never);
|
|
414
|
+
let time = ((((__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; } })(owner) === "number") ? owner : (__eliscript_numeric_relation("<", all, start) ? all : start));
|
|
415
|
+
if ((((!__eliscript_truthy(read)) && (!__eliscript_truthy((record)["mutable"]))) || __eliscript_numeric_relation("<=", time, (record)["statement"]))) {
|
|
416
|
+
if (__eliscript_truthy(read)) {
|
|
417
|
+
((record)["read"] = true);
|
|
418
|
+
return ((state)["reads"])["set"]((site)["node"], record);
|
|
419
|
+
} else {
|
|
420
|
+
((record)["write"] = true);
|
|
421
|
+
return ((state)["writes"])["set"]((site)["node"], record);
|
|
422
|
+
}
|
|
423
|
+
} else {
|
|
424
|
+
return null;
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
}));
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
}
|
|
404
431
|
function tdz_walk(node, scope, state) {
|
|
405
432
|
{
|
|
406
|
-
const
|
|
407
|
-
const
|
|
433
|
+
const __eliscript_value_37 = ir_kind(node);
|
|
434
|
+
const __eliscript_value_38 = children(node);
|
|
408
435
|
{
|
|
409
|
-
let kind =
|
|
410
|
-
let nodes =
|
|
436
|
+
let kind = __eliscript_value_37;
|
|
437
|
+
let nodes = __eliscript_value_38;
|
|
411
438
|
if (((kind === "reference") || (kind === "assignment-pair"))) {
|
|
412
439
|
{
|
|
413
|
-
const
|
|
440
|
+
const __eliscript_value_39 = tdz_find(scope, tdz_root_name(ir_value(node)));
|
|
414
441
|
{
|
|
415
|
-
let record =
|
|
416
|
-
if (__eliscript_truthy(record)) {
|
|
417
|
-
(
|
|
442
|
+
let record = __eliscript_value_39;
|
|
443
|
+
if (__eliscript_truthy(tdz_variable_p(record))) {
|
|
444
|
+
tdz_site(state, ((kind === "reference") ? "read" : "write"), record, node);
|
|
445
|
+
} else {
|
|
446
|
+
if (__eliscript_truthy(((__eliscript_value_40) => (__eliscript_truthy(__eliscript_value_40) ? (kind === "reference") : __eliscript_value_40))(record))) {
|
|
447
|
+
tdz_reference(state, record);
|
|
448
|
+
} else {
|
|
449
|
+
|
|
450
|
+
}
|
|
418
451
|
}
|
|
419
452
|
}
|
|
420
453
|
}
|
|
@@ -422,66 +455,26 @@ function tdz_walk(node, scope, state) {
|
|
|
422
455
|
return tdz_walk(child, scope, state);
|
|
423
456
|
}));
|
|
424
457
|
} else {
|
|
425
|
-
if ((
|
|
426
|
-
|
|
427
|
-
const __eliscript_value_22 = tdz_scope(scope);
|
|
428
|
-
const __eliscript_value_23 = ir_property(node, "parameterCount");
|
|
429
|
-
const __eliscript_value_24 = 0;
|
|
430
|
-
{
|
|
431
|
-
let child = __eliscript_value_22;
|
|
432
|
-
let count = __eliscript_value_23;
|
|
433
|
-
let index = __eliscript_value_24;
|
|
434
|
-
while (__eliscript_numeric_relation("<", index, count)) {
|
|
435
|
-
tdz_defaults(((((nodes) ?? [])[index]) ?? null), scope, state);
|
|
436
|
-
((index = (index + 1)));
|
|
437
|
-
}
|
|
438
|
-
((index = 0));
|
|
439
|
-
while (__eliscript_numeric_relation("<", index, count)) {
|
|
440
|
-
tdz_bind(((((nodes) ?? [])[index]) ?? null), child);
|
|
441
|
-
((index = (index + 1)));
|
|
442
|
-
}
|
|
443
|
-
while (__eliscript_numeric_relation("<", index, ((nodes) ?? []).length)) {
|
|
444
|
-
tdz_walk(((((nodes) ?? [])[index]) ?? null), child, state);
|
|
445
|
-
((index = (index + 1)));
|
|
446
|
-
}
|
|
447
|
-
return null;
|
|
448
|
-
}
|
|
449
|
-
}
|
|
458
|
+
if ((kind === "raw-javascript")) {
|
|
459
|
+
return ((state)["raw"])["add"]((state)["owner"]);
|
|
450
460
|
} else {
|
|
451
|
-
if (((kind === "
|
|
461
|
+
if (((kind === "function-declaration") || (kind === "function-expression"))) {
|
|
452
462
|
{
|
|
453
|
-
const
|
|
454
|
-
const
|
|
455
|
-
const
|
|
456
|
-
const __eliscript_value_28 = 0;
|
|
463
|
+
const __eliscript_value_41 = tdz_scope(scope);
|
|
464
|
+
const __eliscript_value_42 = ir_property(node, "parameterCount");
|
|
465
|
+
const __eliscript_value_43 = 0;
|
|
457
466
|
{
|
|
458
|
-
let child =
|
|
459
|
-
let count =
|
|
460
|
-
let
|
|
461
|
-
let index = __eliscript_value_28;
|
|
467
|
+
let child = __eliscript_value_41;
|
|
468
|
+
let count = __eliscript_value_42;
|
|
469
|
+
let index = __eliscript_value_43;
|
|
462
470
|
while (__eliscript_numeric_relation("<", index, count)) {
|
|
463
|
-
|
|
464
|
-
let binding = ((((nodes) ?? [])[index]) ?? null);
|
|
465
|
-
let values = children(binding);
|
|
466
|
-
let outer = (__eliscript_truthy(sequential) ? child : scope);
|
|
467
|
-
let start = (__eliscript_truthy(ir_property(binding, "pattern")) ? 1 : 0);
|
|
468
|
-
while (__eliscript_numeric_relation("<", start, ((values) ?? []).length)) {
|
|
469
|
-
tdz_walk(((((values) ?? [])[start]) ?? null), outer, state);
|
|
470
|
-
((start = (start + 1)));
|
|
471
|
-
}
|
|
472
|
-
tdz_defaults(binding, outer, state);
|
|
473
|
-
if (__eliscript_truthy(sequential)) {
|
|
474
|
-
tdz_bind(binding, child);
|
|
475
|
-
}
|
|
476
|
-
}
|
|
471
|
+
tdz_defaults(((((nodes) ?? [])[index]) ?? null), scope, state);
|
|
477
472
|
((index = (index + 1)));
|
|
478
473
|
}
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
((index = (index + 1)));
|
|
484
|
-
}
|
|
474
|
+
((index = 0));
|
|
475
|
+
while (__eliscript_numeric_relation("<", index, count)) {
|
|
476
|
+
tdz_bind(((((nodes) ?? [])[index]) ?? null), child);
|
|
477
|
+
((index = (index + 1)));
|
|
485
478
|
}
|
|
486
479
|
while (__eliscript_numeric_relation("<", index, ((nodes) ?? []).length)) {
|
|
487
480
|
tdz_walk(((((nodes) ?? [])[index]) ?? null), child, state);
|
|
@@ -491,17 +484,41 @@ function tdz_walk(node, scope, state) {
|
|
|
491
484
|
}
|
|
492
485
|
}
|
|
493
486
|
} else {
|
|
494
|
-
if ((kind === "
|
|
487
|
+
if (((kind === "lexical-bindings") || (kind === "binding-loop"))) {
|
|
495
488
|
{
|
|
496
|
-
const
|
|
497
|
-
const
|
|
498
|
-
const
|
|
489
|
+
const __eliscript_value_44 = tdz_scope(scope);
|
|
490
|
+
const __eliscript_value_45 = ir_property(node, "bindingCount");
|
|
491
|
+
const __eliscript_value_46 = ir_property(node, "sequential");
|
|
492
|
+
const __eliscript_value_47 = 0;
|
|
499
493
|
{
|
|
500
|
-
let child =
|
|
501
|
-
let
|
|
502
|
-
let
|
|
503
|
-
|
|
504
|
-
|
|
494
|
+
let child = __eliscript_value_44;
|
|
495
|
+
let count = __eliscript_value_45;
|
|
496
|
+
let sequential = __eliscript_value_46;
|
|
497
|
+
let index = __eliscript_value_47;
|
|
498
|
+
while (__eliscript_numeric_relation("<", index, count)) {
|
|
499
|
+
{
|
|
500
|
+
let binding = ((((nodes) ?? [])[index]) ?? null);
|
|
501
|
+
let values = children(binding);
|
|
502
|
+
let outer = (__eliscript_truthy(sequential) ? child : scope);
|
|
503
|
+
let start = (__eliscript_truthy(ir_property(binding, "pattern")) ? 1 : 0);
|
|
504
|
+
while (__eliscript_numeric_relation("<", start, ((values) ?? []).length)) {
|
|
505
|
+
tdz_walk(((((values) ?? [])[start]) ?? null), outer, state);
|
|
506
|
+
((start = (start + 1)));
|
|
507
|
+
}
|
|
508
|
+
tdz_defaults(binding, outer, state);
|
|
509
|
+
if (__eliscript_truthy(sequential)) {
|
|
510
|
+
tdz_bind(binding, child);
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
((index = (index + 1)));
|
|
514
|
+
}
|
|
515
|
+
if ((!__eliscript_truthy(sequential))) {
|
|
516
|
+
((index = 0));
|
|
517
|
+
while (__eliscript_numeric_relation("<", index, count)) {
|
|
518
|
+
tdz_bind(((((nodes) ?? [])[index]) ?? null), child);
|
|
519
|
+
((index = (index + 1)));
|
|
520
|
+
}
|
|
521
|
+
}
|
|
505
522
|
while (__eliscript_numeric_relation("<", index, ((nodes) ?? []).length)) {
|
|
506
523
|
tdz_walk(((((nodes) ?? [])[index]) ?? null), child, state);
|
|
507
524
|
((index = (index + 1)));
|
|
@@ -510,12 +527,32 @@ function tdz_walk(node, scope, state) {
|
|
|
510
527
|
}
|
|
511
528
|
}
|
|
512
529
|
} else {
|
|
513
|
-
if ((
|
|
514
|
-
|
|
530
|
+
if ((kind === "catch-clause")) {
|
|
531
|
+
{
|
|
532
|
+
const __eliscript_value_48 = tdz_scope(scope);
|
|
533
|
+
const __eliscript_value_49 = ((((nodes) ?? [])[0]) ?? null);
|
|
534
|
+
const __eliscript_value_50 = 1;
|
|
535
|
+
{
|
|
536
|
+
let child = __eliscript_value_48;
|
|
537
|
+
let binding = __eliscript_value_49;
|
|
538
|
+
let index = __eliscript_value_50;
|
|
539
|
+
tdz_defaults(binding, scope, state);
|
|
540
|
+
tdz_bind(binding, child);
|
|
541
|
+
while (__eliscript_numeric_relation("<", index, ((nodes) ?? []).length)) {
|
|
542
|
+
tdz_walk(((((nodes) ?? [])[index]) ?? null), child, state);
|
|
543
|
+
((index = (index + 1)));
|
|
544
|
+
}
|
|
545
|
+
return null;
|
|
546
|
+
}
|
|
547
|
+
}
|
|
515
548
|
} else {
|
|
516
|
-
|
|
517
|
-
return
|
|
518
|
-
}
|
|
549
|
+
if (((kind === "quoted-literal") || (kind === "import-declaration") || (kind === "export-declaration"))) {
|
|
550
|
+
return null;
|
|
551
|
+
} else {
|
|
552
|
+
return (nodes)["forEach"](((child) => {
|
|
553
|
+
return tdz_walk(child, scope, state);
|
|
554
|
+
}));
|
|
555
|
+
}
|
|
519
556
|
}
|
|
520
557
|
}
|
|
521
558
|
}
|
|
@@ -526,19 +563,18 @@ function tdz_walk(node, scope, state) {
|
|
|
526
563
|
}
|
|
527
564
|
function tdz_prepare(program) {
|
|
528
565
|
{
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
(
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
}
|
|
540
|
-
return state;
|
|
566
|
+
let state = ({"variables": [], "declarations": new (globalThis.Map)(), "reads": new (globalThis.Map)(), "writes": new (globalThis.Map)(), "functions": new (globalThis.Set)(), "references": new (globalThis.Map)(), "raw": new (globalThis.Set)(), "exported": [], "imports": false, "sites": [], "position": 0, "owner": null});
|
|
567
|
+
let scope = tdz_scope(null);
|
|
568
|
+
let statements = tdz_statements(program_body(program), []);
|
|
569
|
+
tdz_predeclare(statements, scope, state);
|
|
570
|
+
if (__eliscript_numeric_relation(">", (((state)["variables"]) ?? []).length, 0)) {
|
|
571
|
+
(statements)["forEach"](((node, position) => {
|
|
572
|
+
((state)["owner"] = ((ir_kind(node) === "function-declaration") ? binding_name(ir_value(node)) : position));
|
|
573
|
+
return tdz_walk(node, scope, state);
|
|
574
|
+
}));
|
|
575
|
+
tdz_finalize(state);
|
|
541
576
|
}
|
|
577
|
+
return state;
|
|
542
578
|
}
|
|
543
579
|
}
|
|
544
580
|
function tdz_reader_name(record) {
|
|
@@ -548,29 +584,35 @@ function tdz_writer_name(record) {
|
|
|
548
584
|
return (String("__eliscript_tdz_write_") + String((record)["index"]));
|
|
549
585
|
}
|
|
550
586
|
function tdz_prologue() {
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
{
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
587
|
+
{
|
|
588
|
+
const __eliscript_value_51 = (((__eliscript_tdz_read_26()) === null) ? [] : (((__eliscript_tdz_read_26()))["variables"])["filter"](tdz_guarded_p));
|
|
589
|
+
{
|
|
590
|
+
let records = __eliscript_value_51;
|
|
591
|
+
if ((((records) ?? []).length === 0)) {
|
|
592
|
+
return "";
|
|
593
|
+
} else {
|
|
594
|
+
return (String((__eliscript_tdz_read_25())) + String(__eliscript_at_direct((records)["map"](((record) => {
|
|
595
|
+
{
|
|
596
|
+
const __eliscript_value_52 = tdz_ready_name(record);
|
|
597
|
+
const __eliscript_value_53 = binding_name((record)["name"]);
|
|
598
|
+
const __eliscript_value_54 = (String("__eliscript_tdz_value_") + String((record)["index"]));
|
|
599
|
+
{
|
|
600
|
+
let ready = __eliscript_value_52;
|
|
601
|
+
let name = __eliscript_value_53;
|
|
602
|
+
let argument = __eliscript_value_54;
|
|
603
|
+
return (String("var ") + String(ready) + String(";\n") + String((__eliscript_truthy((record)["read"]) ? (String("function ") + String(tdz_reader_name(record)) + String("() { if (") + String(ready) + String(" !== true) __eliscript_tdz_error(") + String(json_string(name)) + String("); return ") + String(name) + String("; }\n")) : "")) + String((__eliscript_truthy((record)["write"]) ? (String("function ") + String(tdz_writer_name(record)) + String("(") + String(argument) + String(") { if (") + String(ready) + String(" !== true) __eliscript_tdz_error(") + String(json_string(name)) + String("); ") + String((__eliscript_truthy((record)["mutable"]) ? (String("return (") + String(name) + String(" = ") + String(argument) + String(");")) : "return __eliscript_const_error();")) + String(" }\n")) : "")));
|
|
604
|
+
}
|
|
605
|
+
}
|
|
606
|
+
})), "join", "")));
|
|
565
607
|
}
|
|
566
|
-
}
|
|
608
|
+
}
|
|
567
609
|
}
|
|
568
610
|
}
|
|
569
611
|
function tdz_read(node) {
|
|
570
612
|
{
|
|
571
|
-
const
|
|
613
|
+
const __eliscript_value_55 = ((__eliscript_value_56) => (__eliscript_truthy(__eliscript_value_56) ? (((__eliscript_tdz_read_26()))["reads"])["get"](node) : __eliscript_value_56))((__eliscript_tdz_read_26()));
|
|
572
614
|
{
|
|
573
|
-
let record =
|
|
615
|
+
let record = __eliscript_value_55;
|
|
574
616
|
if ((!__eliscript_truthy(record))) {
|
|
575
617
|
return text_fragment(reference_name(ir_value(node)));
|
|
576
618
|
} else {
|
|
@@ -585,7 +627,7 @@ function tdz_read(node) {
|
|
|
585
627
|
}
|
|
586
628
|
function tdz_assignment(pair) {
|
|
587
629
|
{
|
|
588
|
-
let record = ((
|
|
630
|
+
let record = ((__eliscript_value_57) => (__eliscript_truthy(__eliscript_value_57) ? (((__eliscript_tdz_read_26()))["writes"])["get"](pair) : __eliscript_value_57))((__eliscript_tdz_read_26()));
|
|
589
631
|
let value = emit_expression(((((children(pair)) ?? [])[0]) ?? null));
|
|
590
632
|
if ((!__eliscript_truthy(record))) {
|
|
591
633
|
return combine(["(", emit_binding_name(pair), " = ", value, ")"]);
|
|
@@ -596,11 +638,11 @@ function tdz_assignment(pair) {
|
|
|
596
638
|
}
|
|
597
639
|
function make_fragment(text, marks, functions = null) {
|
|
598
640
|
{
|
|
599
|
-
const
|
|
641
|
+
const __eliscript_value_58 = ({"text": text, "marks": marks});
|
|
600
642
|
{
|
|
601
|
-
let fragment =
|
|
602
|
-
if (__eliscript_truthy((
|
|
603
|
-
((fragment)["functions"] = ((
|
|
643
|
+
let fragment = __eliscript_value_58;
|
|
644
|
+
if (__eliscript_truthy((__eliscript_tdz_read_21()))) {
|
|
645
|
+
((fragment)["functions"] = ((__eliscript_value_59) => (__eliscript_truthy(__eliscript_value_59) ? __eliscript_value_59 : []))(functions));
|
|
604
646
|
}
|
|
605
647
|
return fragment;
|
|
606
648
|
}
|
|
@@ -608,14 +650,14 @@ function make_fragment(text, marks, functions = null) {
|
|
|
608
650
|
}
|
|
609
651
|
function function_source_fragment(node, output, start, end) {
|
|
610
652
|
{
|
|
611
|
-
const
|
|
653
|
+
const __eliscript_value_60 = as_fragment(output);
|
|
612
654
|
{
|
|
613
|
-
let fragment =
|
|
614
|
-
if (__eliscript_truthy((
|
|
655
|
+
let fragment = __eliscript_value_60;
|
|
656
|
+
if (__eliscript_truthy((__eliscript_tdz_read_21()))) {
|
|
615
657
|
{
|
|
616
|
-
const
|
|
658
|
+
const __eliscript_value_61 = (((fragment)["functions"] ?? []))["slice"]();
|
|
617
659
|
{
|
|
618
|
-
let functions =
|
|
660
|
+
let functions = __eliscript_value_61;
|
|
619
661
|
(functions)["push"](({"node": node, "start": start, "end": end}));
|
|
620
662
|
((fragment)["functions"] = functions);
|
|
621
663
|
}
|
|
@@ -627,16 +669,16 @@ function function_source_fragment(node, output, start, end) {
|
|
|
627
669
|
}
|
|
628
670
|
function function_indented_offset(starts, offset) {
|
|
629
671
|
{
|
|
630
|
-
const
|
|
631
|
-
const
|
|
672
|
+
const __eliscript_value_62 = 0;
|
|
673
|
+
const __eliscript_value_63 = ((starts) ?? []).length;
|
|
632
674
|
{
|
|
633
|
-
let low =
|
|
634
|
-
let high =
|
|
675
|
+
let low = __eliscript_value_62;
|
|
676
|
+
let high = __eliscript_value_63;
|
|
635
677
|
while (__eliscript_numeric_relation("<", low, high)) {
|
|
636
678
|
{
|
|
637
|
-
const
|
|
679
|
+
const __eliscript_value_64 = (low + Math.floor(__eliscript_numeric_div(__eliscript_numeric_sub(high, low), 2)));
|
|
638
680
|
{
|
|
639
|
-
let middle =
|
|
681
|
+
let middle = __eliscript_value_64;
|
|
640
682
|
if (__eliscript_numeric_relation("<=", ((((starts) ?? [])[middle]) ?? null), offset)) {
|
|
641
683
|
((low = (middle + 1)));
|
|
642
684
|
} else {
|
|
@@ -651,20 +693,20 @@ function function_indented_offset(starts, offset) {
|
|
|
651
693
|
}
|
|
652
694
|
function indent_function_sources(source, functions) {
|
|
653
695
|
{
|
|
654
|
-
const
|
|
655
|
-
const
|
|
656
|
-
const
|
|
657
|
-
const
|
|
696
|
+
const __eliscript_value_65 = [];
|
|
697
|
+
const __eliscript_value_66 = (source)["split"]("\n");
|
|
698
|
+
const __eliscript_value_67 = 0;
|
|
699
|
+
const __eliscript_value_68 = 0;
|
|
658
700
|
{
|
|
659
|
-
let starts =
|
|
660
|
-
let parts =
|
|
661
|
-
let offset =
|
|
662
|
-
let index =
|
|
701
|
+
let starts = __eliscript_value_65;
|
|
702
|
+
let parts = __eliscript_value_66;
|
|
703
|
+
let offset = __eliscript_value_67;
|
|
704
|
+
let index = __eliscript_value_68;
|
|
663
705
|
while (__eliscript_numeric_relation("<", index, ((parts) ?? []).length)) {
|
|
664
706
|
{
|
|
665
|
-
const
|
|
707
|
+
const __eliscript_value_69 = ((((parts) ?? [])[index]) ?? null);
|
|
666
708
|
{
|
|
667
|
-
let line =
|
|
709
|
+
let line = __eliscript_value_69;
|
|
668
710
|
if (__eliscript_numeric_relation(">", ((line) ?? []).length, 0)) {
|
|
669
711
|
(starts)["push"](offset);
|
|
670
712
|
}
|
|
@@ -691,25 +733,25 @@ function as_fragment(part) {
|
|
|
691
733
|
}
|
|
692
734
|
function combine(parts) {
|
|
693
735
|
{
|
|
694
|
-
const
|
|
695
|
-
const
|
|
696
|
-
const
|
|
697
|
-
const
|
|
698
|
-
const
|
|
699
|
-
const
|
|
700
|
-
const
|
|
701
|
-
const
|
|
702
|
-
const
|
|
703
|
-
{
|
|
704
|
-
let text =
|
|
705
|
-
let marks =
|
|
706
|
-
let functions =
|
|
707
|
-
let part_index =
|
|
708
|
-
let fragment =
|
|
709
|
-
let offset =
|
|
710
|
-
let fragment_marks =
|
|
711
|
-
let mark_index =
|
|
712
|
-
let mark =
|
|
736
|
+
const __eliscript_value_70 = "";
|
|
737
|
+
const __eliscript_value_71 = [];
|
|
738
|
+
const __eliscript_value_72 = [];
|
|
739
|
+
const __eliscript_value_73 = 0;
|
|
740
|
+
const __eliscript_value_74 = null;
|
|
741
|
+
const __eliscript_value_75 = 0;
|
|
742
|
+
const __eliscript_value_76 = null;
|
|
743
|
+
const __eliscript_value_77 = 0;
|
|
744
|
+
const __eliscript_value_78 = null;
|
|
745
|
+
{
|
|
746
|
+
let text = __eliscript_value_70;
|
|
747
|
+
let marks = __eliscript_value_71;
|
|
748
|
+
let functions = __eliscript_value_72;
|
|
749
|
+
let part_index = __eliscript_value_73;
|
|
750
|
+
let fragment = __eliscript_value_74;
|
|
751
|
+
let offset = __eliscript_value_75;
|
|
752
|
+
let fragment_marks = __eliscript_value_76;
|
|
753
|
+
let mark_index = __eliscript_value_77;
|
|
754
|
+
let mark = __eliscript_value_78;
|
|
713
755
|
while (__eliscript_numeric_relation("<", part_index, (parts)["length"])) {
|
|
714
756
|
((fragment = as_fragment(((((parts) ?? [])[part_index]) ?? null))));
|
|
715
757
|
((offset = (text)["length"]));
|
|
@@ -721,7 +763,7 @@ function combine(parts) {
|
|
|
721
763
|
((mark_index = (mark_index + 1)));
|
|
722
764
|
}
|
|
723
765
|
((text = (String(text) + String((fragment)["text"]))));
|
|
724
|
-
if (__eliscript_truthy((
|
|
766
|
+
if (__eliscript_truthy((__eliscript_tdz_read_21()))) {
|
|
725
767
|
(((fragment)["functions"] ?? []))["forEach"](((record) => {
|
|
726
768
|
return (functions)["push"](({"node": (record)["node"], "start": (offset + (record)["start"]), "end": (offset + (record)["end"])}));
|
|
727
769
|
}));
|
|
@@ -734,11 +776,11 @@ function combine(parts) {
|
|
|
734
776
|
}
|
|
735
777
|
function join_fragments(parts, separator) {
|
|
736
778
|
{
|
|
737
|
-
const
|
|
738
|
-
const
|
|
779
|
+
const __eliscript_value_79 = [];
|
|
780
|
+
const __eliscript_value_80 = 0;
|
|
739
781
|
{
|
|
740
|
-
let joined =
|
|
741
|
-
let index =
|
|
782
|
+
let joined = __eliscript_value_79;
|
|
783
|
+
let index = __eliscript_value_80;
|
|
742
784
|
while (__eliscript_numeric_relation("<", index, (parts)["length"])) {
|
|
743
785
|
if (__eliscript_numeric_relation(">", index, 0)) {
|
|
744
786
|
(joined)["push"](separator);
|
|
@@ -762,10 +804,10 @@ function reference_indent(fragment) {
|
|
|
762
804
|
let line_start = true;
|
|
763
805
|
while (__eliscript_numeric_relation("<", index, (source)["length"])) {
|
|
764
806
|
{
|
|
765
|
-
const
|
|
807
|
+
const __eliscript_value_81 = (source)["charCodeAt"](index);
|
|
766
808
|
{
|
|
767
|
-
let code =
|
|
768
|
-
if (__eliscript_truthy(((
|
|
809
|
+
let code = __eliscript_value_81;
|
|
810
|
+
if (__eliscript_truthy(((__eliscript_value_82) => (__eliscript_truthy(__eliscript_value_82) ? (!(code === 10)) : __eliscript_value_82))(line_start))) {
|
|
769
811
|
((text = (String(text) + String(" "))));
|
|
770
812
|
}
|
|
771
813
|
while ((__eliscript_numeric_relation("<", mark_index, (source_marks)["length"]) && ((((((source_marks) ?? [])[mark_index]) ?? null))["offset"] === index))) {
|
|
@@ -778,7 +820,7 @@ function reference_indent(fragment) {
|
|
|
778
820
|
}
|
|
779
821
|
}
|
|
780
822
|
}
|
|
781
|
-
return make_fragment(text, marks, (__eliscript_truthy((
|
|
823
|
+
return make_fragment(text, marks, (__eliscript_truthy((__eliscript_tdz_read_21())) ? indent_function_sources(source, ((input)["functions"] ?? [])) : null));
|
|
782
824
|
}
|
|
783
825
|
}
|
|
784
826
|
const native_indent = ((input) => {
|
|
@@ -812,12 +854,12 @@ const native_indent = ((input) => {
|
|
|
812
854
|
return ({"text": __eliscript_at_direct(parts, "join", "\n"), "marks": marks});
|
|
813
855
|
}
|
|
814
856
|
});
|
|
815
|
-
|
|
857
|
+
__eliscript_tdz_ready_27 = true;
|
|
816
858
|
function indent(fragment) {
|
|
817
859
|
{
|
|
818
860
|
let input = as_fragment(fragment);
|
|
819
|
-
let output = (
|
|
820
|
-
if (__eliscript_truthy((
|
|
861
|
+
let output = (__eliscript_tdz_read_27())(input);
|
|
862
|
+
if (__eliscript_truthy((__eliscript_tdz_read_21()))) {
|
|
821
863
|
((output)["functions"] = indent_function_sources((input)["text"], ((input)["functions"] ?? [])));
|
|
822
864
|
}
|
|
823
865
|
return output;
|
|
@@ -830,13 +872,13 @@ function reference_locate(node, output) {
|
|
|
830
872
|
let has_start = (marks)["some"](((mark) => {
|
|
831
873
|
return ((mark)["offset"] === 0);
|
|
832
874
|
}));
|
|
833
|
-
if (__eliscript_truthy(((
|
|
875
|
+
if (__eliscript_truthy(((__eliscript_value_83) => (__eliscript_truthy(__eliscript_value_83) ? __eliscript_value_83 : ((__eliscript_value_84) => (__eliscript_truthy(__eliscript_value_84) ? __eliscript_value_84 : has_start))((!__eliscript_truthy(ir_span(node))))))((((fragment)["text"])["length"] === 0)))) {
|
|
834
876
|
return fragment;
|
|
835
877
|
} else {
|
|
836
878
|
{
|
|
837
|
-
const
|
|
879
|
+
const __eliscript_value_85 = [({"offset": 0, "span": ir_span(node)})];
|
|
838
880
|
{
|
|
839
|
-
let located =
|
|
881
|
+
let located = __eliscript_value_85;
|
|
840
882
|
(marks)["forEach"](((mark) => {
|
|
841
883
|
return (located)["push"](mark);
|
|
842
884
|
}));
|
|
@@ -847,31 +889,31 @@ function reference_locate(node, output) {
|
|
|
847
889
|
}
|
|
848
890
|
}
|
|
849
891
|
function locate(node, output) {
|
|
850
|
-
return (
|
|
892
|
+
return (__eliscript_tdz_read_22())(ir_span(node), output);
|
|
851
893
|
}
|
|
852
894
|
function fresh_name() {
|
|
853
|
-
(
|
|
854
|
-
return (String("__eliscript_value_") + String((
|
|
895
|
+
(__eliscript_tdz_write_23(((__eliscript_tdz_read_23()) + 1)));
|
|
896
|
+
return (String("__eliscript_value_") + String((__eliscript_tdz_read_23())));
|
|
855
897
|
}
|
|
856
898
|
function json_string(value) {
|
|
857
899
|
return JSON.stringify(value);
|
|
858
900
|
}
|
|
859
901
|
function children(node) {
|
|
860
|
-
return ((
|
|
902
|
+
return ((__eliscript_value_86) => (__eliscript_truthy(__eliscript_value_86) ? __eliscript_value_86 : []))(ir_children(node));
|
|
861
903
|
}
|
|
862
904
|
function require_arity(name, nodes, minimum, maximum) {
|
|
863
905
|
{
|
|
864
|
-
const
|
|
906
|
+
const __eliscript_value_87 = (nodes)["length"];
|
|
865
907
|
{
|
|
866
|
-
let count =
|
|
867
|
-
if (__eliscript_truthy(((
|
|
908
|
+
let count = __eliscript_value_87;
|
|
909
|
+
if (__eliscript_truthy(((__eliscript_value_88) => (__eliscript_truthy(__eliscript_value_88) ? __eliscript_value_88 : ((__eliscript_value_89) => (__eliscript_truthy(__eliscript_value_89) ? __eliscript_numeric_relation(">", count, maximum) : __eliscript_value_89))(maximum)))(__eliscript_numeric_relation("<", count, minimum)))) {
|
|
868
910
|
{
|
|
869
|
-
const
|
|
870
|
-
const
|
|
911
|
+
const __eliscript_value_90 = (__eliscript_truthy(((__eliscript_value_92) => (__eliscript_truthy(__eliscript_value_92) ? (minimum === maximum) : __eliscript_value_92))(maximum)) ? (String(minimum)) : (String(minimum) + String((__eliscript_truthy(maximum) ? (String("..") + String(maximum)) : "+"))));
|
|
912
|
+
const __eliscript_value_91 = (__eliscript_truthy(((__eliscript_value_93) => (__eliscript_truthy(__eliscript_value_93) ? ((minimum === maximum) && (minimum === 1)) : __eliscript_value_93))(maximum)) ? "" : "s");
|
|
871
913
|
{
|
|
872
|
-
let expected =
|
|
873
|
-
let plural =
|
|
874
|
-
return (
|
|
914
|
+
let expected = __eliscript_value_90;
|
|
915
|
+
let plural = __eliscript_value_91;
|
|
916
|
+
return (__eliscript_tdz_read_19())((String(name) + String(" expects ") + String(expected) + String(" argument") + String(plural) + String(", got ") + String(count)));
|
|
875
917
|
}
|
|
876
918
|
}
|
|
877
919
|
} else {
|
|
@@ -883,7 +925,7 @@ function require_arity(name, nodes, minimum, maximum) {
|
|
|
883
925
|
function require_node_arity(node, minimum, maximum) {
|
|
884
926
|
return (() => {
|
|
885
927
|
try {
|
|
886
|
-
return require_arity(((
|
|
928
|
+
return require_arity(((__eliscript_value_94) => (__eliscript_truthy(__eliscript_value_94) ? __eliscript_value_94 : ir_kind(node)))(ir_value(node)), children(node), minimum, maximum);
|
|
887
929
|
} catch (error) {
|
|
888
930
|
return (() => {
|
|
889
931
|
try {
|
|
@@ -893,14 +935,14 @@ function require_node_arity(node, minimum, maximum) {
|
|
|
893
935
|
return null;
|
|
894
936
|
}
|
|
895
937
|
} finally {
|
|
896
|
-
((
|
|
938
|
+
((__eliscript_value_95) => { throw __eliscript_value_95; })(error);
|
|
897
939
|
}
|
|
898
940
|
})();
|
|
899
941
|
}
|
|
900
942
|
})();
|
|
901
943
|
}
|
|
902
944
|
function emit_binding_name(node) {
|
|
903
|
-
return (
|
|
945
|
+
return (__eliscript_tdz_read_22())(ir_span(node), binding_name(ir_value(node)));
|
|
904
946
|
}
|
|
905
947
|
function emit_array_binding_pattern(node) {
|
|
906
948
|
{
|
|
@@ -912,24 +954,24 @@ function emit_array_binding_pattern(node) {
|
|
|
912
954
|
let last_hole = false;
|
|
913
955
|
(nodes)["forEach"](((child) => {
|
|
914
956
|
((last_hole = (ir_kind(child) === "binding-hole")));
|
|
915
|
-
(parts)["push"]((__eliscript_truthy(((
|
|
957
|
+
(parts)["push"]((__eliscript_truthy(((__eliscript_value_96) => (__eliscript_truthy(__eliscript_value_96) ? (index === last_index) : __eliscript_value_96))(rest)) ? combine(["...", emit_binding_pattern_node(child)]) : (__eliscript_truthy(last_hole) ? "" : emit_binding_pattern_node(child))));
|
|
916
958
|
return ((index = (index + 1)));
|
|
917
959
|
}));
|
|
918
|
-
return (
|
|
960
|
+
return (__eliscript_tdz_read_22())(ir_span(node), combine(["[", join_fragments(parts, ", "), (__eliscript_truthy(((__eliscript_value_97) => (__eliscript_truthy(__eliscript_value_97) ? (!__eliscript_truthy(rest)) : __eliscript_value_97))(last_hole)) ? "," : ""), "]"]));
|
|
919
961
|
}
|
|
920
962
|
}
|
|
921
963
|
function map_binding_pattern_p(node) {
|
|
922
|
-
return ((
|
|
964
|
+
return ((__eliscript_value_98) => (__eliscript_truthy(__eliscript_value_98) ? (ir_kind(((((children(node)) ?? [])[0]) ?? null)) === "map-binding-pattern") : __eliscript_value_98))(ir_property(node, "pattern"));
|
|
923
965
|
}
|
|
924
966
|
function binding_temporary(node) {
|
|
925
|
-
if (__eliscript_truthy(((
|
|
926
|
-
return ((
|
|
967
|
+
if (__eliscript_truthy(((__eliscript_tdz_read_24()))["has"](node))) {
|
|
968
|
+
return ((__eliscript_tdz_read_24()))["get"](node);
|
|
927
969
|
} else {
|
|
928
970
|
{
|
|
929
|
-
const
|
|
971
|
+
const __eliscript_value_99 = fresh_name();
|
|
930
972
|
{
|
|
931
|
-
let name =
|
|
932
|
-
((
|
|
973
|
+
let name = __eliscript_value_99;
|
|
974
|
+
((__eliscript_tdz_read_24()))["set"](node, name);
|
|
933
975
|
return name;
|
|
934
976
|
}
|
|
935
977
|
}
|
|
@@ -940,7 +982,7 @@ function emit_map_binding_pattern(node, source) {
|
|
|
940
982
|
let nodes = children(node);
|
|
941
983
|
let entry_count = ir_property(node, "entryCount");
|
|
942
984
|
let entries = (nodes)["slice"](0, entry_count);
|
|
943
|
-
let as = ((
|
|
985
|
+
let as = ((__eliscript_value_100) => (__eliscript_truthy(__eliscript_value_100) ? ((((nodes) ?? [])[entry_count]) ?? null) : __eliscript_value_100))(ir_property(node, "as"));
|
|
944
986
|
let parts = [];
|
|
945
987
|
if (__eliscript_truthy(as)) {
|
|
946
988
|
(parts)["push"](combine(["let ", emit_binding_name(as), " = ", source, ";"]));
|
|
@@ -950,7 +992,7 @@ function emit_map_binding_pattern(node, source) {
|
|
|
950
992
|
let entry_nodes = children(entry);
|
|
951
993
|
let target = ((((entry_nodes) ?? [])[0]) ?? null);
|
|
952
994
|
let key = ((((entry_nodes) ?? [])[1]) ?? null);
|
|
953
|
-
let default$ = ((
|
|
995
|
+
let default$ = ((__eliscript_value_101) => (__eliscript_truthy(__eliscript_value_101) ? ((((entry_nodes) ?? [])[2]) ?? null) : __eliscript_value_101))(ir_property(entry, "default"));
|
|
954
996
|
let temporary = fresh_name();
|
|
955
997
|
let resolved = combine(["(", temporary, " === __eliscript_binding_missing ? ", (__eliscript_truthy(default$) ? emit_expression(default$) : "null"), " : ", temporary, ")"]);
|
|
956
998
|
(parts)["push"](combine(["const ", temporary, " = __eliscript_binding_get(", source, ", ", emit_expression(key), ", __eliscript_binding_missing);"]));
|
|
@@ -962,9 +1004,9 @@ function emit_map_binding_pattern(node, source) {
|
|
|
962
1004
|
}
|
|
963
1005
|
function emit_pattern_setup(pattern, source) {
|
|
964
1006
|
{
|
|
965
|
-
const
|
|
1007
|
+
const __eliscript_value_102 = ir_kind(pattern);
|
|
966
1008
|
{
|
|
967
|
-
let kind =
|
|
1009
|
+
let kind = __eliscript_value_102;
|
|
968
1010
|
if ((kind === "binding-name")) {
|
|
969
1011
|
return combine(["let ", emit_binding_name(pattern), " = ", source, ";"]);
|
|
970
1012
|
} else {
|
|
@@ -974,7 +1016,7 @@ function emit_pattern_setup(pattern, source) {
|
|
|
974
1016
|
if ((kind === "map-binding-pattern")) {
|
|
975
1017
|
return emit_map_binding_pattern(pattern, source);
|
|
976
1018
|
} else {
|
|
977
|
-
return (
|
|
1019
|
+
return (__eliscript_tdz_read_19())((String("invalid IR binding setup node: ") + String(kind)));
|
|
978
1020
|
}
|
|
979
1021
|
}
|
|
980
1022
|
}
|
|
@@ -990,9 +1032,9 @@ function emit_binding_setup(binding) {
|
|
|
990
1032
|
}
|
|
991
1033
|
function emit_binding_setups(bindings) {
|
|
992
1034
|
{
|
|
993
|
-
const
|
|
1035
|
+
const __eliscript_value_103 = [];
|
|
994
1036
|
{
|
|
995
|
-
let parts =
|
|
1037
|
+
let parts = __eliscript_value_103;
|
|
996
1038
|
(bindings)["forEach"](((binding) => {
|
|
997
1039
|
if (__eliscript_truthy(map_binding_pattern_p(binding))) {
|
|
998
1040
|
return (parts)["push"](emit_binding_setup(binding));
|
|
@@ -1005,7 +1047,7 @@ function emit_binding_setups(bindings) {
|
|
|
1005
1047
|
}
|
|
1006
1048
|
}
|
|
1007
1049
|
function binding_default_value(binding) {
|
|
1008
|
-
if (__eliscript_truthy(((
|
|
1050
|
+
if (__eliscript_truthy(((__eliscript_value_104) => (__eliscript_truthy(__eliscript_value_104) ? (!__eliscript_truthy(map_binding_pattern_p(binding))) : __eliscript_value_104))(ir_property(binding, "pattern")))) {
|
|
1009
1051
|
return "[]";
|
|
1010
1052
|
} else {
|
|
1011
1053
|
return "null";
|
|
@@ -1013,9 +1055,9 @@ function binding_default_value(binding) {
|
|
|
1013
1055
|
}
|
|
1014
1056
|
function emit_binding_pattern_node(node) {
|
|
1015
1057
|
{
|
|
1016
|
-
const
|
|
1058
|
+
const __eliscript_value_105 = ir_kind(node);
|
|
1017
1059
|
{
|
|
1018
|
-
let kind =
|
|
1060
|
+
let kind = __eliscript_value_105;
|
|
1019
1061
|
if ((kind === "binding-name")) {
|
|
1020
1062
|
return emit_binding_name(node);
|
|
1021
1063
|
} else {
|
|
@@ -1026,9 +1068,9 @@ function emit_binding_pattern_node(node) {
|
|
|
1026
1068
|
return emit_array_binding_pattern(node);
|
|
1027
1069
|
} else {
|
|
1028
1070
|
if ((kind === "map-binding-pattern")) {
|
|
1029
|
-
return (
|
|
1071
|
+
return (__eliscript_tdz_read_19())("map binding patterns require a generated source binding");
|
|
1030
1072
|
} else {
|
|
1031
|
-
return (
|
|
1073
|
+
return (__eliscript_tdz_read_19())((String("invalid IR binding pattern node: ") + String(kind)));
|
|
1032
1074
|
}
|
|
1033
1075
|
}
|
|
1034
1076
|
}
|
|
@@ -1049,22 +1091,22 @@ function emit_binding_target(node) {
|
|
|
1049
1091
|
}
|
|
1050
1092
|
function binding_initializer(node) {
|
|
1051
1093
|
{
|
|
1052
|
-
const
|
|
1094
|
+
const __eliscript_value_106 = children(node);
|
|
1053
1095
|
{
|
|
1054
|
-
let nodes =
|
|
1096
|
+
let nodes = __eliscript_value_106;
|
|
1055
1097
|
return (((((__eliscript_truthy(ir_property(node, "pattern")) ? (nodes)["slice"](1) : nodes)) ?? [])[0]) ?? null);
|
|
1056
1098
|
}
|
|
1057
1099
|
}
|
|
1058
1100
|
}
|
|
1059
1101
|
function emit_parameter(node) {
|
|
1060
1102
|
{
|
|
1061
|
-
const
|
|
1062
|
-
const
|
|
1063
|
-
const
|
|
1103
|
+
const __eliscript_value_107 = emit_binding_target(node);
|
|
1104
|
+
const __eliscript_value_108 = ir_property(node, "parameterKind");
|
|
1105
|
+
const __eliscript_value_109 = ir_property(node, "pattern");
|
|
1064
1106
|
{
|
|
1065
|
-
let name =
|
|
1066
|
-
let kind =
|
|
1067
|
-
let pattern =
|
|
1107
|
+
let name = __eliscript_value_107;
|
|
1108
|
+
let kind = __eliscript_value_108;
|
|
1109
|
+
let pattern = __eliscript_value_109;
|
|
1068
1110
|
if ((kind === "optional")) {
|
|
1069
1111
|
return combine([name, " = ", (__eliscript_truthy(pattern) ? binding_default_value(node) : "null")]);
|
|
1070
1112
|
} else {
|
|
@@ -1083,20 +1125,20 @@ function emit_arguments(nodes) {
|
|
|
1083
1125
|
})), ", ");
|
|
1084
1126
|
}
|
|
1085
1127
|
function qualified_apply_reference_p(node) {
|
|
1086
|
-
return ((
|
|
1128
|
+
return ((__eliscript_value_110) => (__eliscript_truthy(__eliscript_value_110) ? ((__eliscript_value_111) => (__eliscript_truthy(__eliscript_value_111) ? ((__eliscript_value_112) => (__eliscript_truthy(__eliscript_value_112) ? ((name) => {
|
|
1087
1129
|
while (__eliscript_truthy((name)["endsWith"]("."))) {
|
|
1088
1130
|
((name = (name)["slice"](0, -1)));
|
|
1089
1131
|
}
|
|
1090
1132
|
return (name)["endsWith"](".apply");
|
|
1091
|
-
})((ir_value(node))["replaceAll"]("/", ".")) :
|
|
1133
|
+
})((ir_value(node))["replaceAll"]("/", ".")) : __eliscript_value_112))((((__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; } })(ir_value(node)) === "string")) : __eliscript_value_111))((ir_kind(node) === "reference")) : __eliscript_value_110))(node_p(node));
|
|
1092
1134
|
}
|
|
1093
1135
|
function emit_callee(node) {
|
|
1094
1136
|
{
|
|
1095
|
-
const
|
|
1137
|
+
const __eliscript_value_113 = emit_expression(node);
|
|
1096
1138
|
{
|
|
1097
|
-
let output =
|
|
1139
|
+
let output = __eliscript_value_113;
|
|
1098
1140
|
if (__eliscript_truthy(qualified_apply_reference_p(node))) {
|
|
1099
|
-
return combine(["__eliscript_at(", (
|
|
1141
|
+
return combine(["__eliscript_at(", (__eliscript_tdz_read_22())(ir_span(node), text_fragment(((output)["text"])["slice"](0, -6))), ", \"apply\")"]);
|
|
1100
1142
|
} else {
|
|
1101
1143
|
if ((ir_kind(node) === "reference")) {
|
|
1102
1144
|
return output;
|
|
@@ -1109,21 +1151,21 @@ function emit_callee(node) {
|
|
|
1109
1151
|
}
|
|
1110
1152
|
function boolean_reference_text_p(text) {
|
|
1111
1153
|
{
|
|
1112
|
-
const
|
|
1113
|
-
const
|
|
1114
|
-
const
|
|
1154
|
+
const __eliscript_value_114 = ((text) ?? []).length;
|
|
1155
|
+
const __eliscript_value_115 = 2;
|
|
1156
|
+
const __eliscript_value_116 = true;
|
|
1115
1157
|
{
|
|
1116
|
-
let length =
|
|
1117
|
-
let index =
|
|
1118
|
-
let valid =
|
|
1119
|
-
if ((__eliscript_numeric_relation("<", length, 3) || ((
|
|
1158
|
+
let length = __eliscript_value_114;
|
|
1159
|
+
let index = __eliscript_value_115;
|
|
1160
|
+
let valid = __eliscript_value_116;
|
|
1161
|
+
if ((__eliscript_numeric_relation("<", length, 3) || ((__eliscript_value_117, __eliscript_value_118) => (__eliscript_value_117 !== __eliscript_value_118))((text)["charCodeAt"](0), 33) || ((__eliscript_value_119, __eliscript_value_120) => (__eliscript_value_119 !== __eliscript_value_120))((text)["charCodeAt"](1), 33))) {
|
|
1120
1162
|
((valid = false));
|
|
1121
1163
|
}
|
|
1122
|
-
while (__eliscript_truthy(((
|
|
1164
|
+
while (__eliscript_truthy(((__eliscript_value_121) => (__eliscript_truthy(__eliscript_value_121) ? __eliscript_numeric_relation("<", index, length) : __eliscript_value_121))(valid))) {
|
|
1123
1165
|
{
|
|
1124
|
-
const
|
|
1166
|
+
const __eliscript_value_122 = (text)["charCodeAt"](index);
|
|
1125
1167
|
{
|
|
1126
|
-
let code =
|
|
1168
|
+
let code = __eliscript_value_122;
|
|
1127
1169
|
if ((!((__eliscript_numeric_relation(">=", code, 65) && __eliscript_numeric_relation("<=", code, 90)) || (__eliscript_numeric_relation(">=", code, 97) && __eliscript_numeric_relation("<=", code, 122)) || (code === 95) || (code === 36) || (__eliscript_numeric_relation(">", index, 2) && __eliscript_numeric_relation(">=", code, 48) && __eliscript_numeric_relation("<=", code, 57))))) {
|
|
1128
1170
|
((valid = false));
|
|
1129
1171
|
}
|
|
@@ -1137,20 +1179,20 @@ function boolean_reference_text_p(text) {
|
|
|
1137
1179
|
}
|
|
1138
1180
|
function boolean_p(node) {
|
|
1139
1181
|
{
|
|
1140
|
-
const
|
|
1141
|
-
const
|
|
1182
|
+
const __eliscript_value_123 = ir_kind(node);
|
|
1183
|
+
const __eliscript_value_124 = ir_value(node);
|
|
1142
1184
|
{
|
|
1143
|
-
let kind =
|
|
1144
|
-
let value =
|
|
1185
|
+
let kind = __eliscript_value_123;
|
|
1186
|
+
let value = __eliscript_value_124;
|
|
1145
1187
|
if ((kind === "literal")) {
|
|
1146
1188
|
return ((value === true) || (value === false));
|
|
1147
1189
|
} else {
|
|
1148
1190
|
if ((kind === "raw-javascript")) {
|
|
1149
1191
|
{
|
|
1150
|
-
const
|
|
1192
|
+
const __eliscript_value_125 = children(node);
|
|
1151
1193
|
{
|
|
1152
|
-
let nodes =
|
|
1153
|
-
return ((
|
|
1194
|
+
let nodes = __eliscript_value_125;
|
|
1195
|
+
return ((__eliscript_value_126) => (__eliscript_truthy(__eliscript_value_126) ? ((__eliscript_value_127) => (__eliscript_truthy(__eliscript_value_127) ? ((__eliscript_value_128) => (__eliscript_truthy(__eliscript_value_128) ? boolean_reference_text_p((ir_value(((((nodes) ?? [])[0]) ?? null)))["trim"]()) : __eliscript_value_128))((((__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; } })(ir_value(((((nodes) ?? [])[0]) ?? null))) === "string")) : __eliscript_value_127))((ir_kind(((((nodes) ?? [])[0]) ?? null)) === "literal")) : __eliscript_value_126))((((nodes) ?? []).length === 1));
|
|
1154
1196
|
}
|
|
1155
1197
|
}
|
|
1156
1198
|
} else {
|
|
@@ -1159,10 +1201,10 @@ function boolean_p(node) {
|
|
|
1159
1201
|
} else {
|
|
1160
1202
|
if ((kind === "short-circuit")) {
|
|
1161
1203
|
{
|
|
1162
|
-
const
|
|
1204
|
+
const __eliscript_value_129 = children(node);
|
|
1163
1205
|
{
|
|
1164
|
-
let nodes =
|
|
1165
|
-
return ((
|
|
1206
|
+
let nodes = __eliscript_value_129;
|
|
1207
|
+
return ((__eliscript_value_130) => (__eliscript_truthy(__eliscript_value_130) ? (nodes)["every"](boolean_p) : __eliscript_value_130))(__eliscript_numeric_relation(">", (nodes)["length"], 0));
|
|
1166
1208
|
}
|
|
1167
1209
|
}
|
|
1168
1210
|
} else {
|
|
@@ -1176,9 +1218,9 @@ function boolean_p(node) {
|
|
|
1176
1218
|
}
|
|
1177
1219
|
function emit_test(node) {
|
|
1178
1220
|
{
|
|
1179
|
-
const
|
|
1221
|
+
const __eliscript_value_131 = emit_expression(node);
|
|
1180
1222
|
{
|
|
1181
|
-
let output =
|
|
1223
|
+
let output = __eliscript_value_131;
|
|
1182
1224
|
if (__eliscript_truthy(boolean_p(node))) {
|
|
1183
1225
|
return output;
|
|
1184
1226
|
} else {
|
|
@@ -1192,18 +1234,18 @@ function context_sequential_safe_p(bindings) {
|
|
|
1192
1234
|
return false;
|
|
1193
1235
|
} else {
|
|
1194
1236
|
{
|
|
1195
|
-
const
|
|
1196
|
-
const
|
|
1197
|
-
const
|
|
1237
|
+
const __eliscript_value_132 = new (globalThis.Map)();
|
|
1238
|
+
const __eliscript_value_133 = 0;
|
|
1239
|
+
const __eliscript_value_134 = true;
|
|
1198
1240
|
{
|
|
1199
|
-
let names =
|
|
1200
|
-
let index =
|
|
1201
|
-
let safe =
|
|
1202
|
-
while (__eliscript_truthy(((
|
|
1241
|
+
let names = __eliscript_value_132;
|
|
1242
|
+
let index = __eliscript_value_133;
|
|
1243
|
+
let safe = __eliscript_value_134;
|
|
1244
|
+
while (__eliscript_truthy(((__eliscript_value_135) => (__eliscript_truthy(__eliscript_value_135) ? __eliscript_numeric_relation("<", index, ((bindings) ?? []).length) : __eliscript_value_135))(safe))) {
|
|
1203
1245
|
{
|
|
1204
|
-
const
|
|
1246
|
+
const __eliscript_value_136 = binding_name(ir_value(((((bindings) ?? [])[index]) ?? null)));
|
|
1205
1247
|
{
|
|
1206
|
-
let name =
|
|
1248
|
+
let name = __eliscript_value_136;
|
|
1207
1249
|
if (__eliscript_truthy((names)["has"](name))) {
|
|
1208
1250
|
((safe = false));
|
|
1209
1251
|
} else {
|
|
@@ -1214,11 +1256,11 @@ function context_sequential_safe_p(bindings) {
|
|
|
1214
1256
|
((index = (index + 1)));
|
|
1215
1257
|
}
|
|
1216
1258
|
((index = 0));
|
|
1217
|
-
while (__eliscript_truthy(((
|
|
1259
|
+
while (__eliscript_truthy(((__eliscript_value_137) => (__eliscript_truthy(__eliscript_value_137) ? __eliscript_numeric_relation("<", index, ((bindings) ?? []).length) : __eliscript_value_137))(safe))) {
|
|
1218
1260
|
{
|
|
1219
1261
|
let initializer = binding_initializer(((((bindings) ?? [])[index]) ?? null));
|
|
1220
1262
|
let pending = (__eliscript_truthy(initializer) ? [initializer] : []);
|
|
1221
|
-
while (__eliscript_truthy(((
|
|
1263
|
+
while (__eliscript_truthy(((__eliscript_value_138) => (__eliscript_truthy(__eliscript_value_138) ? __eliscript_numeric_relation(">", ((pending) ?? []).length, 0) : __eliscript_value_138))(safe))) {
|
|
1222
1264
|
{
|
|
1223
1265
|
let node = (pending)["pop"]();
|
|
1224
1266
|
let kind = ir_kind(node);
|
|
@@ -1229,7 +1271,7 @@ function context_sequential_safe_p(bindings) {
|
|
|
1229
1271
|
{
|
|
1230
1272
|
let name = reference_name(ir_value(node));
|
|
1231
1273
|
let root = (((((name)["split"](".")) ?? [])[0]) ?? null);
|
|
1232
|
-
if (__eliscript_truthy(((
|
|
1274
|
+
if (__eliscript_truthy(((__eliscript_value_139) => (__eliscript_truthy(__eliscript_value_139) ? __eliscript_numeric_relation(">=", (names)["get"](root), index) : __eliscript_value_139))((names)["has"](root)))) {
|
|
1233
1275
|
((safe = false));
|
|
1234
1276
|
}
|
|
1235
1277
|
}
|
|
@@ -1256,16 +1298,16 @@ function emit_context_let(bindings, body, sequential, returning) {
|
|
|
1256
1298
|
return emit_statement_body(body);
|
|
1257
1299
|
}
|
|
1258
1300
|
} else {
|
|
1259
|
-
if (__eliscript_truthy(((
|
|
1301
|
+
if (__eliscript_truthy(((__eliscript_value_140) => (__eliscript_truthy(__eliscript_value_140) ? context_sequential_safe_p(bindings) : __eliscript_value_140))(sequential))) {
|
|
1260
1302
|
{
|
|
1261
|
-
const
|
|
1303
|
+
const __eliscript_value_141 = [];
|
|
1262
1304
|
{
|
|
1263
|
-
let declarations =
|
|
1305
|
+
let declarations = __eliscript_value_141;
|
|
1264
1306
|
(bindings)["forEach"](((binding) => {
|
|
1265
1307
|
{
|
|
1266
|
-
const
|
|
1308
|
+
const __eliscript_value_142 = binding_initializer(binding);
|
|
1267
1309
|
{
|
|
1268
|
-
let initializer =
|
|
1310
|
+
let initializer = __eliscript_value_142;
|
|
1269
1311
|
return (declarations)["push"](combine(["let ", emit_binding_target(binding), " = ", (__eliscript_truthy(initializer) ? emit_expression(initializer) : "null"), ";"]));
|
|
1270
1312
|
}
|
|
1271
1313
|
}
|
|
@@ -1310,20 +1352,20 @@ function emit_context_cond(clauses, returning) {
|
|
|
1310
1352
|
let nodes = children(clause);
|
|
1311
1353
|
let test = ((((nodes) ?? [])[0]) ?? null);
|
|
1312
1354
|
let body = (nodes)["slice"](1);
|
|
1313
|
-
return (
|
|
1355
|
+
return (__eliscript_tdz_read_22())(ir_span(clause), (((ir_kind(test) === "literal") && (ir_value(test) === true)) ? (__eliscript_truthy(returning) ? emit_returning_body(body) : emit_statement_body(body)) : combine(["if (", emit_test(test), ") {\n", indent((__eliscript_truthy(returning) ? emit_returning_body(body) : emit_statement_body(body))), "\n} else {\n", indent(emit_context_cond((clauses)["slice"](1), returning)), "\n}"])));
|
|
1314
1356
|
}
|
|
1315
1357
|
}
|
|
1316
1358
|
}
|
|
1317
1359
|
function emit_context(node, returning) {
|
|
1318
1360
|
{
|
|
1319
|
-
const
|
|
1320
|
-
const
|
|
1361
|
+
const __eliscript_value_143 = ir_kind(node);
|
|
1362
|
+
const __eliscript_value_144 = children(node);
|
|
1321
1363
|
{
|
|
1322
|
-
let kind =
|
|
1323
|
-
let nodes =
|
|
1324
|
-
return locate(node, (__eliscript_truthy(contains_await_p(node)) ? combine([(__eliscript_truthy(returning) ? "return " : ""), emit_expression(node), ";"]) : ((kind === "sequence") ? (__eliscript_truthy(returning) ? emit_returning_body(nodes) : emit_statement_body(nodes)) : ((kind === "conditional") ? combine(["if (", emit_test(((((nodes) ?? [])[0]) ?? null)), ") {\n", indent(emit_context(((((nodes) ?? [])[1]) ?? null), returning)), "\n}", (__eliscript_truthy(((
|
|
1364
|
+
let kind = __eliscript_value_143;
|
|
1365
|
+
let nodes = __eliscript_value_144;
|
|
1366
|
+
return locate(node, (__eliscript_truthy(contains_await_p(node)) ? combine([(__eliscript_truthy(returning) ? "return " : ""), emit_expression(node), ";"]) : ((kind === "sequence") ? (__eliscript_truthy(returning) ? emit_returning_body(nodes) : emit_statement_body(nodes)) : ((kind === "conditional") ? combine(["if (", emit_test(((((nodes) ?? [])[0]) ?? null)), ") {\n", indent(emit_context(((((nodes) ?? [])[1]) ?? null), returning)), "\n}", (__eliscript_truthy(((__eliscript_value_145) => (__eliscript_truthy(__eliscript_value_145) ? __eliscript_value_145 : __eliscript_numeric_relation(">", (nodes)["length"], 2)))(returning)) ? combine([" else {\n", indent((__eliscript_numeric_relation(">", (nodes)["length"], 2) ? emit_context(((((nodes) ?? [])[2]) ?? null), returning) : text_fragment("return null;"))), "\n}"]) : "")]) : ((kind === "conditional-sugar") ? combine(["if (", ((ir_value(node) === "when") ? emit_test(((((nodes) ?? [])[0]) ?? null)) : combine(["(!", emit_test(((((nodes) ?? [])[0]) ?? null)), ")"])), ") {\n", indent((__eliscript_truthy(returning) ? emit_returning_body((nodes)["slice"](1)) : emit_statement_body((nodes)["slice"](1)))), "\n}", (__eliscript_truthy(returning) ? " else {\n return null;\n}" : "")]) : ((kind === "conditional-chain") ? emit_context_cond(nodes, returning) : ((kind === "loop") ? combine(["while (", emit_test(((((nodes) ?? [])[0]) ?? null)), ") {\n", indent(emit_statement_body((nodes)["slice"](1))), "\n}", (__eliscript_truthy(returning) ? "\nreturn null;" : "")]) : (__eliscript_truthy(((__eliscript_value_146) => (__eliscript_truthy(__eliscript_value_146) ? ((nodes)["slice"](0, ir_property(node, "bindingCount")))["every"](((binding) => {
|
|
1325
1367
|
return (!__eliscript_truthy(ir_property(binding, "pattern")));
|
|
1326
|
-
})) :
|
|
1368
|
+
})) : __eliscript_value_146))((kind === "lexical-bindings"))) ? ((parts) => {
|
|
1327
1369
|
return emit_context_let(((((parts) ?? [])[0]) ?? null), ((((parts) ?? [])[1]) ?? null), ir_property(node, "sequential"), returning);
|
|
1328
1370
|
})(split_counted_children(node, "bindingCount")) : combine([(__eliscript_truthy(returning) ? "return " : ""), emit_expression(node), ";"])))))))));
|
|
1329
1371
|
}
|
|
@@ -1334,13 +1376,13 @@ function emit_returning_body(nodes) {
|
|
|
1334
1376
|
return text_fragment("return null;");
|
|
1335
1377
|
} else {
|
|
1336
1378
|
{
|
|
1337
|
-
const
|
|
1338
|
-
const
|
|
1339
|
-
const
|
|
1379
|
+
const __eliscript_value_147 = [];
|
|
1380
|
+
const __eliscript_value_148 = 0;
|
|
1381
|
+
const __eliscript_value_149 = __eliscript_numeric_decrement((nodes)["length"]);
|
|
1340
1382
|
{
|
|
1341
|
-
let parts =
|
|
1342
|
-
let index =
|
|
1343
|
-
let last_index =
|
|
1383
|
+
let parts = __eliscript_value_147;
|
|
1384
|
+
let index = __eliscript_value_148;
|
|
1385
|
+
let last_index = __eliscript_value_149;
|
|
1344
1386
|
while (__eliscript_numeric_relation("<", index, last_index)) {
|
|
1345
1387
|
(parts)["push"](emit_context(((((nodes) ?? [])[index]) ?? null), false));
|
|
1346
1388
|
((index = (index + 1)));
|
|
@@ -1358,19 +1400,19 @@ function emit_statement_body(nodes) {
|
|
|
1358
1400
|
}
|
|
1359
1401
|
function contains_await_p(value) {
|
|
1360
1402
|
{
|
|
1361
|
-
const
|
|
1362
|
-
const
|
|
1363
|
-
const
|
|
1364
|
-
const
|
|
1365
|
-
const
|
|
1366
|
-
const
|
|
1367
|
-
{
|
|
1368
|
-
let pending =
|
|
1369
|
-
let current =
|
|
1370
|
-
let kind =
|
|
1371
|
-
let nodes =
|
|
1372
|
-
let index =
|
|
1373
|
-
let found =
|
|
1403
|
+
const __eliscript_value_150 = [value];
|
|
1404
|
+
const __eliscript_value_151 = null;
|
|
1405
|
+
const __eliscript_value_152 = null;
|
|
1406
|
+
const __eliscript_value_153 = null;
|
|
1407
|
+
const __eliscript_value_154 = 0;
|
|
1408
|
+
const __eliscript_value_155 = false;
|
|
1409
|
+
{
|
|
1410
|
+
let pending = __eliscript_value_150;
|
|
1411
|
+
let current = __eliscript_value_151;
|
|
1412
|
+
let kind = __eliscript_value_152;
|
|
1413
|
+
let nodes = __eliscript_value_153;
|
|
1414
|
+
let index = __eliscript_value_154;
|
|
1415
|
+
let found = __eliscript_value_155;
|
|
1374
1416
|
while (((!__eliscript_truthy(found)) && __eliscript_numeric_relation(">", (pending)["length"], 0))) {
|
|
1375
1417
|
((current = (pending)["pop"]()));
|
|
1376
1418
|
if (__eliscript_truthy(node_p(current))) {
|
|
@@ -1425,11 +1467,11 @@ function emit_do(nodes) {
|
|
|
1425
1467
|
}
|
|
1426
1468
|
function split_counted_children(node, property) {
|
|
1427
1469
|
{
|
|
1428
|
-
const
|
|
1429
|
-
const
|
|
1470
|
+
const __eliscript_value_156 = children(node);
|
|
1471
|
+
const __eliscript_value_157 = ir_property(node, property);
|
|
1430
1472
|
{
|
|
1431
|
-
let all =
|
|
1432
|
-
let count =
|
|
1473
|
+
let all = __eliscript_value_156;
|
|
1474
|
+
let count = __eliscript_value_157;
|
|
1433
1475
|
return [(all)["slice"](0, count), (all)["slice"](count)];
|
|
1434
1476
|
}
|
|
1435
1477
|
}
|
|
@@ -1440,11 +1482,11 @@ function emit_function(node) {
|
|
|
1440
1482
|
let parameters = ((((parts) ?? [])[0]) ?? null);
|
|
1441
1483
|
let body = ((((parts) ?? [])[1]) ?? null);
|
|
1442
1484
|
{
|
|
1443
|
-
const
|
|
1485
|
+
const __eliscript_value_158 = combine(["(", (__eliscript_truthy(ir_property(node, "async")) ? "async " : ""), "(", join_fragments((parameters)["map"](((parameter) => {
|
|
1444
1486
|
return emit_parameter(parameter);
|
|
1445
1487
|
})), ", "), ") => {\n", indent(emit_function_body(parameters, body)), "\n})"]);
|
|
1446
1488
|
{
|
|
1447
|
-
let fragment =
|
|
1489
|
+
let fragment = __eliscript_value_158;
|
|
1448
1490
|
return function_source_fragment(node, fragment, 1, __eliscript_numeric_decrement((((fragment)["text"]) ?? []).length));
|
|
1449
1491
|
}
|
|
1450
1492
|
}
|
|
@@ -1452,19 +1494,19 @@ function emit_function(node) {
|
|
|
1452
1494
|
}
|
|
1453
1495
|
function contains_recur_target_p(value, target_kind) {
|
|
1454
1496
|
{
|
|
1455
|
-
const
|
|
1456
|
-
const
|
|
1457
|
-
const
|
|
1458
|
-
const
|
|
1459
|
-
const
|
|
1460
|
-
const
|
|
1461
|
-
{
|
|
1462
|
-
let pending =
|
|
1463
|
-
let current =
|
|
1464
|
-
let kind =
|
|
1465
|
-
let nodes =
|
|
1466
|
-
let index =
|
|
1467
|
-
let found =
|
|
1497
|
+
const __eliscript_value_159 = [value];
|
|
1498
|
+
const __eliscript_value_160 = null;
|
|
1499
|
+
const __eliscript_value_161 = null;
|
|
1500
|
+
const __eliscript_value_162 = null;
|
|
1501
|
+
const __eliscript_value_163 = 0;
|
|
1502
|
+
const __eliscript_value_164 = false;
|
|
1503
|
+
{
|
|
1504
|
+
let pending = __eliscript_value_159;
|
|
1505
|
+
let current = __eliscript_value_160;
|
|
1506
|
+
let kind = __eliscript_value_161;
|
|
1507
|
+
let nodes = __eliscript_value_162;
|
|
1508
|
+
let index = __eliscript_value_163;
|
|
1509
|
+
let found = __eliscript_value_164;
|
|
1468
1510
|
while (((!__eliscript_truthy(found)) && __eliscript_numeric_relation(">", (pending)["length"], 0))) {
|
|
1469
1511
|
((current = (pending)["pop"]()));
|
|
1470
1512
|
if (__eliscript_truthy(node_p(current))) {
|
|
@@ -1503,9 +1545,9 @@ function contains_recur_target_p(value, target_kind) {
|
|
|
1503
1545
|
}
|
|
1504
1546
|
function emit_rebinding_target(binding, temporary) {
|
|
1505
1547
|
{
|
|
1506
|
-
const
|
|
1548
|
+
const __eliscript_value_165 = emit_binding_target(binding);
|
|
1507
1549
|
{
|
|
1508
|
-
let target =
|
|
1550
|
+
let target = __eliscript_value_165;
|
|
1509
1551
|
if (__eliscript_truthy(ir_property(binding, "pattern"))) {
|
|
1510
1552
|
return combine(["(", target, " = ", temporary, ");"]);
|
|
1511
1553
|
} else {
|
|
@@ -1516,25 +1558,25 @@ function emit_rebinding_target(binding, temporary) {
|
|
|
1516
1558
|
}
|
|
1517
1559
|
function emit_recur_tail(node, target) {
|
|
1518
1560
|
if ((!(ir_property(node, "targetKind") === (target)["kind"]))) {
|
|
1519
|
-
(
|
|
1561
|
+
(__eliscript_tdz_read_19())("recur target does not match its enclosing loop");
|
|
1520
1562
|
}
|
|
1521
1563
|
{
|
|
1522
|
-
const
|
|
1523
|
-
const
|
|
1524
|
-
const
|
|
1525
|
-
const
|
|
1526
|
-
const
|
|
1564
|
+
const __eliscript_value_166 = children(node);
|
|
1565
|
+
const __eliscript_value_167 = (target)["bindings"];
|
|
1566
|
+
const __eliscript_value_168 = [];
|
|
1567
|
+
const __eliscript_value_169 = [];
|
|
1568
|
+
const __eliscript_value_170 = 0;
|
|
1527
1569
|
{
|
|
1528
|
-
let args =
|
|
1529
|
-
let bindings =
|
|
1530
|
-
let temporaries =
|
|
1531
|
-
let parts =
|
|
1532
|
-
let index =
|
|
1570
|
+
let args = __eliscript_value_166;
|
|
1571
|
+
let bindings = __eliscript_value_167;
|
|
1572
|
+
let temporaries = __eliscript_value_168;
|
|
1573
|
+
let parts = __eliscript_value_169;
|
|
1574
|
+
let index = __eliscript_value_170;
|
|
1533
1575
|
while (__eliscript_numeric_relation("<", index, (args)["length"])) {
|
|
1534
1576
|
{
|
|
1535
|
-
const
|
|
1577
|
+
const __eliscript_value_171 = fresh_name();
|
|
1536
1578
|
{
|
|
1537
|
-
let temporary =
|
|
1579
|
+
let temporary = __eliscript_value_171;
|
|
1538
1580
|
(temporaries)["push"](temporary);
|
|
1539
1581
|
(parts)["push"](combine(["const ", temporary, " = ", emit_expression(((((args) ?? [])[index]) ?? null)), ";"]));
|
|
1540
1582
|
}
|
|
@@ -1547,7 +1589,7 @@ function emit_recur_tail(node, target) {
|
|
|
1547
1589
|
((index = (index + 1)));
|
|
1548
1590
|
}
|
|
1549
1591
|
(parts)["push"](combine(["continue ", (target)["label"], ";"]));
|
|
1550
|
-
return (
|
|
1592
|
+
return (__eliscript_tdz_read_22())(ir_span(node), join_fragments(parts, "\n"));
|
|
1551
1593
|
}
|
|
1552
1594
|
}
|
|
1553
1595
|
}
|
|
@@ -1556,13 +1598,13 @@ function emit_tail_body(nodes, target) {
|
|
|
1556
1598
|
return text_fragment("return null;");
|
|
1557
1599
|
} else {
|
|
1558
1600
|
{
|
|
1559
|
-
const
|
|
1560
|
-
const
|
|
1561
|
-
const
|
|
1601
|
+
const __eliscript_value_172 = [];
|
|
1602
|
+
const __eliscript_value_173 = 0;
|
|
1603
|
+
const __eliscript_value_174 = __eliscript_numeric_decrement((nodes)["length"]);
|
|
1562
1604
|
{
|
|
1563
|
-
let parts =
|
|
1564
|
-
let index =
|
|
1565
|
-
let last_index =
|
|
1605
|
+
let parts = __eliscript_value_172;
|
|
1606
|
+
let index = __eliscript_value_173;
|
|
1607
|
+
let last_index = __eliscript_value_174;
|
|
1566
1608
|
while (__eliscript_numeric_relation("<", index, last_index)) {
|
|
1567
1609
|
(parts)["push"](combine([emit_expression(((((nodes) ?? [])[index]) ?? null)), ";"]));
|
|
1568
1610
|
((index = (index + 1)));
|
|
@@ -1582,7 +1624,7 @@ function emit_tail_cond(clauses, target) {
|
|
|
1582
1624
|
let nodes = children(clause);
|
|
1583
1625
|
let test = ((((nodes) ?? [])[0]) ?? null);
|
|
1584
1626
|
let body = (nodes)["slice"](1);
|
|
1585
|
-
return (
|
|
1627
|
+
return (__eliscript_tdz_read_22())(ir_span(clause), (((ir_kind(test) === "literal") && (ir_value(test) === true)) ? emit_tail_body(body, target) : combine(["if (__eliscript_truthy(", emit_expression(test), ")) {\n", indent(emit_tail_body(body, target)), "\n} else {\n", indent(emit_tail_cond((clauses)["slice"](1), target)), "\n}"])));
|
|
1586
1628
|
}
|
|
1587
1629
|
}
|
|
1588
1630
|
}
|
|
@@ -1628,7 +1670,7 @@ function emit_tail_let(node, target) {
|
|
|
1628
1670
|
}
|
|
1629
1671
|
}
|
|
1630
1672
|
(statements)["push"](emit_tail_body(body, target));
|
|
1631
|
-
return (
|
|
1673
|
+
return (__eliscript_tdz_read_22())(ir_span(node), combine(["{\n", indent(join_fragments(statements, "\n")), "\n}"]));
|
|
1632
1674
|
}
|
|
1633
1675
|
}
|
|
1634
1676
|
function emit_tail_short_circuit(nodes, kind, target) {
|
|
@@ -1651,11 +1693,11 @@ function emit_tail_short_circuit(nodes, kind, target) {
|
|
|
1651
1693
|
}
|
|
1652
1694
|
function emit_tail_node(node, target) {
|
|
1653
1695
|
{
|
|
1654
|
-
const
|
|
1655
|
-
const
|
|
1696
|
+
const __eliscript_value_175 = ir_kind(node);
|
|
1697
|
+
const __eliscript_value_176 = children(node);
|
|
1656
1698
|
{
|
|
1657
|
-
let kind =
|
|
1658
|
-
let nodes =
|
|
1699
|
+
let kind = __eliscript_value_175;
|
|
1700
|
+
let nodes = __eliscript_value_176;
|
|
1659
1701
|
if ((kind === "recur")) {
|
|
1660
1702
|
return emit_recur_tail(node, target);
|
|
1661
1703
|
} else {
|
|
@@ -1689,17 +1731,17 @@ function emit_tail_node(node, target) {
|
|
|
1689
1731
|
}
|
|
1690
1732
|
}
|
|
1691
1733
|
const closed_scalar_operators = ["+", "-", "*", "/", "%", "mod", "1+", "1-", "=", "eq", "<", "<=", ">", ">=", "/=", "not=", "not"];
|
|
1692
|
-
|
|
1734
|
+
__eliscript_tdz_ready_28 = true;
|
|
1693
1735
|
function closed_scalar_node_p(node, scope, state) {
|
|
1694
1736
|
if ((node == null)) {
|
|
1695
1737
|
return true;
|
|
1696
1738
|
} else {
|
|
1697
1739
|
{
|
|
1698
|
-
const
|
|
1699
|
-
const
|
|
1740
|
+
const __eliscript_value_177 = ir_kind(node);
|
|
1741
|
+
const __eliscript_value_178 = children(node);
|
|
1700
1742
|
{
|
|
1701
|
-
let kind =
|
|
1702
|
-
let nodes =
|
|
1743
|
+
let kind = __eliscript_value_177;
|
|
1744
|
+
let nodes = __eliscript_value_178;
|
|
1703
1745
|
if ((kind === "literal")) {
|
|
1704
1746
|
return ((ir_value(node) === null) || (((__eliscript_value) => { if (__eliscript_value === null) return "null"; const __eliscript_host_type = typeof __eliscript_value; if (__eliscript_host_type !== "object" && __eliscript_host_type !== "function") return __eliscript_host_type; try { const __eliscript_type = Object.getOwnPropertyDescriptor(__eliscript_value, Symbol.for("eliscript.value.type")); if (__eliscript_type && Object.prototype.hasOwnProperty.call(__eliscript_type, "value") && (__eliscript_type.value === "keyword" || __eliscript_type.value === "symbol")) return __eliscript_type.value; const __eliscript_kind = Object.getOwnPropertyDescriptor(__eliscript_value, "kind"); if (__eliscript_kind && Object.prototype.hasOwnProperty.call(__eliscript_kind, "value")) { if (__eliscript_kind.value === "eliscript/keyword") return "keyword"; if (__eliscript_kind.value === "eliscript/symbol") return "symbol"; } return __eliscript_host_type; } catch { return __eliscript_host_type; } })((node)["value"]) === "number") || (((__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; } })((node)["value"]) === "boolean") || (((__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; } })((node)["value"]) === "undefined"));
|
|
1705
1747
|
} else {
|
|
@@ -1713,28 +1755,28 @@ function closed_scalar_node_p(node, scope, state) {
|
|
|
1713
1755
|
let inner = (scope)["slice"]();
|
|
1714
1756
|
let valid = true;
|
|
1715
1757
|
(bindings)["forEach"](((binding) => {
|
|
1716
|
-
if (__eliscript_truthy(((
|
|
1758
|
+
if (__eliscript_truthy(((__eliscript_value_179) => (__eliscript_truthy(__eliscript_value_179) ? __eliscript_value_179 : ((__eliscript_value_180) => (__eliscript_truthy(__eliscript_value_180) ? __eliscript_value_180 : (!__eliscript_truthy(closed_scalar_node_p(binding_initializer(binding), (__eliscript_truthy(ir_property(node, "sequential")) ? inner : scope), state)))))(ir_property(binding, "pattern"))))((!(ir_kind(binding) === "lexical-binding"))))) {
|
|
1717
1759
|
((valid = false));
|
|
1718
1760
|
}
|
|
1719
1761
|
return (inner)["push"](ir_value(binding));
|
|
1720
1762
|
}));
|
|
1721
|
-
return ((
|
|
1763
|
+
return ((__eliscript_value_181) => (__eliscript_truthy(__eliscript_value_181) ? (((((parts) ?? [])[1]) ?? null))["every"](((child) => {
|
|
1722
1764
|
return closed_scalar_node_p(child, inner, state);
|
|
1723
|
-
})) :
|
|
1765
|
+
})) : __eliscript_value_181))(valid);
|
|
1724
1766
|
}
|
|
1725
1767
|
} else {
|
|
1726
1768
|
if ((kind === "assignment")) {
|
|
1727
1769
|
return (nodes)["every"](((pair) => {
|
|
1728
|
-
return ((
|
|
1770
|
+
return ((__eliscript_value_182) => (__eliscript_truthy(__eliscript_value_182) ? ((__eliscript_value_183) => (__eliscript_truthy(__eliscript_value_183) ? closed_scalar_node_p(((((children(pair)) ?? [])[0]) ?? null), scope, state) : __eliscript_value_183))(__eliscript_numeric_relation(">=", (scope)["indexOf"](ir_value(pair)), 0)) : __eliscript_value_182))((ir_kind(pair) === "assignment-pair"));
|
|
1729
1771
|
}));
|
|
1730
1772
|
} else {
|
|
1731
|
-
if ((((kind === "intrinsic") && __eliscript_numeric_relation(">=", ((
|
|
1773
|
+
if ((((kind === "intrinsic") && __eliscript_numeric_relation(">=", ((__eliscript_tdz_read_28()))["indexOf"](ir_value(node)), 0)) || (kind === "conditional") || (kind === "conditional-sugar") || (kind === "short-circuit") || (kind === "sequence") || (kind === "loop"))) {
|
|
1732
1774
|
if ((kind === "loop")) {
|
|
1733
1775
|
((state)["loop"] = true);
|
|
1734
1776
|
}
|
|
1735
|
-
return ((
|
|
1777
|
+
return ((__eliscript_value_184) => (__eliscript_truthy(__eliscript_value_184) ? (nodes)["every"](((child) => {
|
|
1736
1778
|
return closed_scalar_node_p(child, scope, state);
|
|
1737
|
-
})) :
|
|
1779
|
+
})) : __eliscript_value_184))(((!(kind === "intrinsic")) || (!__eliscript_truthy(relational_operator_p(ir_value(node)))) || (((nodes) ?? []).length === 2)));
|
|
1738
1780
|
} else {
|
|
1739
1781
|
return false;
|
|
1740
1782
|
}
|
|
@@ -1748,37 +1790,37 @@ function closed_scalar_node_p(node, scope, state) {
|
|
|
1748
1790
|
}
|
|
1749
1791
|
function closed_scalar_loop_p(parameters, body) {
|
|
1750
1792
|
{
|
|
1751
|
-
const
|
|
1752
|
-
const
|
|
1793
|
+
const __eliscript_value_185 = ({"loop": false});
|
|
1794
|
+
const __eliscript_value_186 = (parameters)["map"](((parameter) => {
|
|
1753
1795
|
return ir_value(parameter);
|
|
1754
1796
|
}));
|
|
1755
1797
|
{
|
|
1756
|
-
let state =
|
|
1757
|
-
let scope =
|
|
1758
|
-
return ((
|
|
1798
|
+
let state = __eliscript_value_185;
|
|
1799
|
+
let scope = __eliscript_value_186;
|
|
1800
|
+
return ((__eliscript_value_187) => (__eliscript_truthy(__eliscript_value_187) ? ((__eliscript_value_188) => (__eliscript_truthy(__eliscript_value_188) ? ((__eliscript_value_189) => (__eliscript_truthy(__eliscript_value_189) ? (state)["loop"] : __eliscript_value_189))((body)["every"](((node) => {
|
|
1759
1801
|
return closed_scalar_node_p(node, scope, state);
|
|
1760
|
-
}))) :
|
|
1802
|
+
}))) : __eliscript_value_188))((parameters)["every"](((parameter) => {
|
|
1761
1803
|
return ((ir_property(parameter, "parameterKind") === "required") && (!__eliscript_truthy(ir_property(parameter, "pattern"))));
|
|
1762
|
-
}))) :
|
|
1804
|
+
}))) : __eliscript_value_187))(__eliscript_numeric_relation(">", ((parameters) ?? []).length, 0));
|
|
1763
1805
|
}
|
|
1764
1806
|
}
|
|
1765
1807
|
}
|
|
1766
1808
|
function emit_function_body(parameters, body) {
|
|
1767
|
-
if (__eliscript_truthy(((
|
|
1809
|
+
if (__eliscript_truthy(((__eliscript_value_190) => (__eliscript_truthy(__eliscript_value_190) ? closed_scalar_loop_p(parameters, body) : __eliscript_value_190))((!__eliscript_truthy((__eliscript_tdz_read_17())))))) {
|
|
1768
1810
|
{
|
|
1769
|
-
const
|
|
1770
|
-
const
|
|
1771
|
-
const
|
|
1811
|
+
const __eliscript_value_191 = null;
|
|
1812
|
+
const __eliscript_value_192 = null;
|
|
1813
|
+
const __eliscript_value_193 = (__eliscript_tdz_read_17());
|
|
1772
1814
|
{
|
|
1773
|
-
let fast =
|
|
1774
|
-
let slow =
|
|
1775
|
-
let previous =
|
|
1776
|
-
(
|
|
1815
|
+
let fast = __eliscript_value_191;
|
|
1816
|
+
let slow = __eliscript_value_192;
|
|
1817
|
+
let previous = __eliscript_value_193;
|
|
1818
|
+
(__eliscript_tdz_write_17(true));
|
|
1777
1819
|
(() => {
|
|
1778
1820
|
try {
|
|
1779
1821
|
return ((fast = emit_function_body_unversioned(parameters, body)));
|
|
1780
1822
|
} finally {
|
|
1781
|
-
(
|
|
1823
|
+
(__eliscript_tdz_write_17(previous));
|
|
1782
1824
|
}
|
|
1783
1825
|
})();
|
|
1784
1826
|
((slow = emit_function_body_unversioned(parameters, body)));
|
|
@@ -1793,9 +1835,9 @@ function emit_function_body(parameters, body) {
|
|
|
1793
1835
|
}
|
|
1794
1836
|
function emit_function_body_unversioned(parameters, body) {
|
|
1795
1837
|
{
|
|
1796
|
-
const
|
|
1838
|
+
const __eliscript_value_194 = emit_binding_setups(parameters);
|
|
1797
1839
|
{
|
|
1798
|
-
let setups =
|
|
1840
|
+
let setups = __eliscript_value_194;
|
|
1799
1841
|
if ((!__eliscript_truthy(contains_recur_target_p(body, "function")))) {
|
|
1800
1842
|
if ((((setups)["text"])["length"] === 0)) {
|
|
1801
1843
|
return emit_returning_body(body);
|
|
@@ -1832,15 +1874,15 @@ function emit_cond(clauses) {
|
|
|
1832
1874
|
let nodes = children(clause);
|
|
1833
1875
|
let test = ((((nodes) ?? [])[0]) ?? null);
|
|
1834
1876
|
let body = (nodes)["slice"](1);
|
|
1835
|
-
return (
|
|
1877
|
+
return (__eliscript_tdz_read_22())(ir_span(clause), (((ir_kind(test) === "literal") && (ir_value(test) === true)) ? emit_do(body) : combine(["(", emit_test(test), " ? ", emit_do(body), " : ", emit_cond((clauses)["slice"](1)), ")"])));
|
|
1836
1878
|
}
|
|
1837
1879
|
}
|
|
1838
1880
|
}
|
|
1839
1881
|
function emit_throw(node) {
|
|
1840
1882
|
{
|
|
1841
|
-
const
|
|
1883
|
+
const __eliscript_value_195 = fresh_name();
|
|
1842
1884
|
{
|
|
1843
|
-
let temporary =
|
|
1885
|
+
let temporary = __eliscript_value_195;
|
|
1844
1886
|
return combine(["((", temporary, ") => { throw ", temporary, "; })(", emit_expression(((((children(node)) ?? [])[0]) ?? null)), ")"]);
|
|
1845
1887
|
}
|
|
1846
1888
|
}
|
|
@@ -1850,11 +1892,11 @@ function emit_catch(node) {
|
|
|
1850
1892
|
let nodes = children(node);
|
|
1851
1893
|
let binding = ((((nodes) ?? [])[0]) ?? null);
|
|
1852
1894
|
let body = (nodes)["slice"](1);
|
|
1853
|
-
return (
|
|
1895
|
+
return (__eliscript_tdz_read_22())(ir_span(node), combine([" catch (", emit_binding_target(binding), ") {\n", indent((__eliscript_truthy(map_binding_pattern_p(binding)) ? combine([emit_binding_setup(binding), "\n", emit_returning_body(body)]) : emit_returning_body(body))), "\n}"]));
|
|
1854
1896
|
}
|
|
1855
1897
|
}
|
|
1856
1898
|
function emit_finally(node) {
|
|
1857
|
-
return (
|
|
1899
|
+
return (__eliscript_tdz_read_22())(ir_span(node), combine([" finally {\n", indent(emit_statement_body(children(node))), "\n}"]));
|
|
1858
1900
|
}
|
|
1859
1901
|
function emit_try(node) {
|
|
1860
1902
|
{
|
|
@@ -1873,14 +1915,14 @@ function emit_try(node) {
|
|
|
1873
1915
|
}
|
|
1874
1916
|
function emit_binding_values(bindings) {
|
|
1875
1917
|
{
|
|
1876
|
-
const
|
|
1918
|
+
const __eliscript_value_196 = [];
|
|
1877
1919
|
{
|
|
1878
|
-
let result =
|
|
1920
|
+
let result = __eliscript_value_196;
|
|
1879
1921
|
(bindings)["forEach"](((binding) => {
|
|
1880
1922
|
{
|
|
1881
|
-
const
|
|
1923
|
+
const __eliscript_value_197 = binding_initializer(binding);
|
|
1882
1924
|
{
|
|
1883
|
-
let initializer =
|
|
1925
|
+
let initializer = __eliscript_value_197;
|
|
1884
1926
|
return (result)["push"]((__eliscript_truthy(initializer) ? emit_expression(initializer) : binding_default_value(binding)));
|
|
1885
1927
|
}
|
|
1886
1928
|
}
|
|
@@ -1905,14 +1947,14 @@ function emit_sequential_let(bindings, body) {
|
|
|
1905
1947
|
return emit_do(body);
|
|
1906
1948
|
} else {
|
|
1907
1949
|
{
|
|
1908
|
-
const
|
|
1950
|
+
const __eliscript_value_198 = ((((bindings) ?? [])[0]) ?? null);
|
|
1909
1951
|
{
|
|
1910
|
-
let binding =
|
|
1952
|
+
let binding = __eliscript_value_198;
|
|
1911
1953
|
{
|
|
1912
1954
|
let name = emit_binding_target(binding);
|
|
1913
1955
|
let initializer = ((((emit_binding_values([binding])) ?? [])[0]) ?? null);
|
|
1914
1956
|
let tail = emit_sequential_let((bindings)["slice"](1), body);
|
|
1915
|
-
return emit_iife(name, indent(combine([(__eliscript_truthy(map_binding_pattern_p(binding)) ? combine([emit_binding_setup(binding), "\n"]) : ""), "return ", tail, ";"])), initializer, ((
|
|
1957
|
+
return emit_iife(name, indent(combine([(__eliscript_truthy(map_binding_pattern_p(binding)) ? combine([emit_binding_setup(binding), "\n"]) : ""), "return ", tail, ";"])), initializer, ((__eliscript_value_199) => (__eliscript_truthy(__eliscript_value_199) ? __eliscript_value_199 : contains_await_p(body)))(contains_await_p((bindings)["slice"](1))));
|
|
1916
1958
|
}
|
|
1917
1959
|
}
|
|
1918
1960
|
}
|
|
@@ -1932,11 +1974,11 @@ function emit_let(node) {
|
|
|
1932
1974
|
}
|
|
1933
1975
|
function emit_assignment(node) {
|
|
1934
1976
|
{
|
|
1935
|
-
const
|
|
1977
|
+
const __eliscript_value_200 = [];
|
|
1936
1978
|
{
|
|
1937
|
-
let assignments =
|
|
1979
|
+
let assignments = __eliscript_value_200;
|
|
1938
1980
|
(children(node))["forEach"](((pair) => {
|
|
1939
|
-
return (assignments)["push"]((
|
|
1981
|
+
return (assignments)["push"]((__eliscript_tdz_read_22())(ir_span(pair), tdz_assignment(pair)));
|
|
1940
1982
|
}));
|
|
1941
1983
|
if ((ir_value(node) === "set!")) {
|
|
1942
1984
|
return ((((assignments) ?? [])[0]) ?? null);
|
|
@@ -1978,23 +2020,23 @@ function emit_short_circuit(nodes, kind) {
|
|
|
1978
2020
|
if (((nodes)["length"] === 1)) {
|
|
1979
2021
|
return emit_expression(((((nodes) ?? [])[0]) ?? null));
|
|
1980
2022
|
} else {
|
|
1981
|
-
if (__eliscript_truthy(((
|
|
2023
|
+
if (__eliscript_truthy(((__eliscript_value_201) => (__eliscript_truthy(__eliscript_value_201) ? (!__eliscript_truthy(contains_await_p(nodes))) : __eliscript_value_201))((nodes)["every"](boolean_p)))) {
|
|
1982
2024
|
return combine(["(", join_fragments((nodes)["map"](((node) => {
|
|
1983
2025
|
return emit_expression(node);
|
|
1984
2026
|
})), ((kind === "and") ? " && " : " || ")), ")"]);
|
|
1985
2027
|
} else {
|
|
1986
2028
|
{
|
|
1987
|
-
const
|
|
1988
|
-
const
|
|
1989
|
-
const
|
|
2029
|
+
const __eliscript_value_202 = fresh_name();
|
|
2030
|
+
const __eliscript_value_203 = emit_expression(((((nodes) ?? [])[0]) ?? null));
|
|
2031
|
+
const __eliscript_value_204 = emit_short_circuit((nodes)["slice"](1), kind);
|
|
1990
2032
|
{
|
|
1991
|
-
let temporary =
|
|
1992
|
-
let first =
|
|
1993
|
-
let rest =
|
|
2033
|
+
let temporary = __eliscript_value_202;
|
|
2034
|
+
let first = __eliscript_value_203;
|
|
2035
|
+
let rest = __eliscript_value_204;
|
|
1994
2036
|
{
|
|
1995
|
-
const
|
|
2037
|
+
const __eliscript_value_205 = combine(["(__eliscript_truthy(", temporary, ") ? ", ((kind === "and") ? rest : temporary), " : ", ((kind === "and") ? temporary : rest), ")"]);
|
|
1996
2038
|
{
|
|
1997
|
-
let body =
|
|
2039
|
+
let body = __eliscript_value_205;
|
|
1998
2040
|
if (__eliscript_truthy(contains_await_p((nodes)["slice"](1)))) {
|
|
1999
2041
|
return combine(["(await (async (", temporary, ") => ", body, ")(", first, "))"]);
|
|
2000
2042
|
} else {
|
|
@@ -2059,7 +2101,7 @@ function relational_operator_p(operator) {
|
|
|
2059
2101
|
return ((operator === "<") || (operator === "<=") || (operator === ">") || (operator === ">="));
|
|
2060
2102
|
}
|
|
2061
2103
|
function emit_numeric_binary(operator, left, right) {
|
|
2062
|
-
if (__eliscript_truthy((
|
|
2104
|
+
if (__eliscript_truthy((__eliscript_tdz_read_17()))) {
|
|
2063
2105
|
return combine(["(", left, " ", operator, " ", right, ")"]);
|
|
2064
2106
|
} else {
|
|
2065
2107
|
if (((operator === "-") && ((as_fragment(right))["text"] === "1"))) {
|
|
@@ -2069,9 +2111,9 @@ function emit_numeric_binary(operator, left, right) {
|
|
|
2069
2111
|
return combine(["__eliscript_numeric_relation(", json_string(operator), ", ", left, ", ", right, ")"]);
|
|
2070
2112
|
} else {
|
|
2071
2113
|
{
|
|
2072
|
-
const
|
|
2114
|
+
const __eliscript_value_206 = numeric_operator_tag(operator);
|
|
2073
2115
|
{
|
|
2074
|
-
let tag =
|
|
2116
|
+
let tag = __eliscript_value_206;
|
|
2075
2117
|
if (__eliscript_truthy(tag)) {
|
|
2076
2118
|
return combine(["__eliscript_numeric_", tag, "(", left, ", ", right, ")"]);
|
|
2077
2119
|
} else {
|
|
@@ -2087,17 +2129,17 @@ function emit_numeric_unary(tag, operand) {
|
|
|
2087
2129
|
return combine(["__eliscript_numeric_", tag, "(", emit_expression(operand), ")"]);
|
|
2088
2130
|
}
|
|
2089
2131
|
function numeric_coercion_intrinsic_p(name) {
|
|
2090
|
-
return ((
|
|
2132
|
+
return ((__eliscript_value_207) => (__eliscript_truthy(__eliscript_value_207) ? __eliscript_value_207 : ((__eliscript_value_208) => (__eliscript_truthy(__eliscript_value_208) ? __eliscript_value_208 : ((name === "mod") || (name === "1-") || (name === "int32") || (name === "uint32") || (name === "imul32") || (name === "bit-not") || (name === "bit-and") || (name === "bit-or") || (name === "bit-xor") || (name === "bit-shift-left") || (name === "bit-shift-right") || (name === "unsigned-bit-shift-right"))))(relational_operator_p(name))))(numeric_operator_tag(name));
|
|
2091
2133
|
}
|
|
2092
2134
|
function emit_infix(name, nodes, operator, minimum) {
|
|
2093
2135
|
require_arity(name, nodes, minimum, null);
|
|
2094
|
-
if (__eliscript_truthy(((
|
|
2136
|
+
if (__eliscript_truthy(((__eliscript_value_209) => (__eliscript_truthy(__eliscript_value_209) ? ((__eliscript_value_210) => (__eliscript_truthy(__eliscript_value_210) ? __eliscript_numeric_relation(">", ((nodes) ?? []).length, 1) : __eliscript_value_210))(numeric_operator_tag(operator)) : __eliscript_value_209))((!__eliscript_truthy((__eliscript_tdz_read_17())))))) {
|
|
2095
2137
|
{
|
|
2096
|
-
const
|
|
2097
|
-
const
|
|
2138
|
+
const __eliscript_value_211 = emit_expression(((((nodes) ?? [])[0]) ?? null));
|
|
2139
|
+
const __eliscript_value_212 = 1;
|
|
2098
2140
|
{
|
|
2099
|
-
let result =
|
|
2100
|
-
let index =
|
|
2141
|
+
let result = __eliscript_value_211;
|
|
2142
|
+
let index = __eliscript_value_212;
|
|
2101
2143
|
while (__eliscript_numeric_relation("<", index, ((nodes) ?? []).length)) {
|
|
2102
2144
|
((result = emit_numeric_binary(operator, result, emit_expression(((((nodes) ?? [])[index]) ?? null)))));
|
|
2103
2145
|
((index = (index + 1)));
|
|
@@ -2114,18 +2156,18 @@ function emit_infix(name, nodes, operator, minimum) {
|
|
|
2114
2156
|
function emit_binary_infix(node, operator) {
|
|
2115
2157
|
require_node_arity(node, 2, 2);
|
|
2116
2158
|
{
|
|
2117
|
-
const
|
|
2159
|
+
const __eliscript_value_213 = children(node);
|
|
2118
2160
|
{
|
|
2119
|
-
let nodes =
|
|
2161
|
+
let nodes = __eliscript_value_213;
|
|
2120
2162
|
return emit_numeric_binary(operator, emit_expression(((((nodes) ?? [])[0]) ?? null)), emit_expression(((((nodes) ?? [])[1]) ?? null)));
|
|
2121
2163
|
}
|
|
2122
2164
|
}
|
|
2123
2165
|
}
|
|
2124
2166
|
function temporary_names(nodes) {
|
|
2125
2167
|
{
|
|
2126
|
-
const
|
|
2168
|
+
const __eliscript_value_214 = [];
|
|
2127
2169
|
{
|
|
2128
|
-
let result =
|
|
2170
|
+
let result = __eliscript_value_214;
|
|
2129
2171
|
(nodes)["forEach"](((_node) => {
|
|
2130
2172
|
return (result)["push"](fresh_name());
|
|
2131
2173
|
}));
|
|
@@ -2139,15 +2181,15 @@ function emit_comparison(name, nodes, operator) {
|
|
|
2139
2181
|
return emit_numeric_binary(operator, emit_expression(((((nodes) ?? [])[0]) ?? null)), emit_expression(((((nodes) ?? [])[1]) ?? null)));
|
|
2140
2182
|
} else {
|
|
2141
2183
|
{
|
|
2142
|
-
const
|
|
2143
|
-
const
|
|
2144
|
-
const
|
|
2184
|
+
const __eliscript_value_215 = temporary_names(nodes);
|
|
2185
|
+
const __eliscript_value_216 = [];
|
|
2186
|
+
const __eliscript_value_217 = 0;
|
|
2145
2187
|
{
|
|
2146
|
-
let parameters =
|
|
2147
|
-
let comparisons =
|
|
2148
|
-
let index =
|
|
2188
|
+
let parameters = __eliscript_value_215;
|
|
2189
|
+
let comparisons = __eliscript_value_216;
|
|
2190
|
+
let index = __eliscript_value_217;
|
|
2149
2191
|
while (__eliscript_numeric_relation("<", index, __eliscript_numeric_decrement((parameters)["length"]))) {
|
|
2150
|
-
(comparisons)["push"]((__eliscript_truthy(((
|
|
2192
|
+
(comparisons)["push"]((__eliscript_truthy(((__eliscript_value_218) => (__eliscript_truthy(__eliscript_value_218) ? relational_operator_p(operator) : __eliscript_value_218))((!__eliscript_truthy((__eliscript_tdz_read_17()))))) ? (String("__eliscript_numeric_relation(") + String(json_string(operator)) + String(", ") + String(((((parameters) ?? [])[index]) ?? null)) + String(", ") + String(((((parameters) ?? [])[(index + 1)]) ?? null)) + String(")")) : (String(((((parameters) ?? [])[index]) ?? null)) + String(" ") + String(operator) + String(" ") + String(((((parameters) ?? [])[(index + 1)]) ?? null)))));
|
|
2151
2193
|
((index = (index + 1)));
|
|
2152
2194
|
}
|
|
2153
2195
|
return combine(["((", __eliscript_at_direct(parameters, "join", ", "), ") => (", __eliscript_at_direct(comparisons, "join", " && "), "))(", emit_arguments(nodes), ")"]);
|
|
@@ -2158,18 +2200,18 @@ function emit_comparison(name, nodes, operator) {
|
|
|
2158
2200
|
function emit_distinct(name, nodes) {
|
|
2159
2201
|
require_arity(name, nodes, 2, null);
|
|
2160
2202
|
{
|
|
2161
|
-
const
|
|
2162
|
-
const
|
|
2163
|
-
const
|
|
2203
|
+
const __eliscript_value_219 = temporary_names(nodes);
|
|
2204
|
+
const __eliscript_value_220 = [];
|
|
2205
|
+
const __eliscript_value_221 = 0;
|
|
2164
2206
|
{
|
|
2165
|
-
let parameters =
|
|
2166
|
-
let comparisons =
|
|
2167
|
-
let left =
|
|
2207
|
+
let parameters = __eliscript_value_219;
|
|
2208
|
+
let comparisons = __eliscript_value_220;
|
|
2209
|
+
let left = __eliscript_value_221;
|
|
2168
2210
|
while (__eliscript_numeric_relation("<", left, (parameters)["length"])) {
|
|
2169
2211
|
{
|
|
2170
|
-
const
|
|
2212
|
+
const __eliscript_value_222 = (left + 1);
|
|
2171
2213
|
{
|
|
2172
|
-
let right =
|
|
2214
|
+
let right = __eliscript_value_222;
|
|
2173
2215
|
while (__eliscript_numeric_relation("<", right, (parameters)["length"])) {
|
|
2174
2216
|
(comparisons)["push"]((String(((((parameters) ?? [])[left]) ?? null)) + String(" !== ") + String(((((parameters) ?? [])[right]) ?? null))));
|
|
2175
2217
|
((right = (right + 1)));
|
|
@@ -2184,11 +2226,11 @@ function emit_distinct(name, nodes) {
|
|
|
2184
2226
|
}
|
|
2185
2227
|
function emit_intrinsic(node) {
|
|
2186
2228
|
{
|
|
2187
|
-
const
|
|
2188
|
-
const
|
|
2229
|
+
const __eliscript_value_223 = ir_value(node);
|
|
2230
|
+
const __eliscript_value_224 = children(node);
|
|
2189
2231
|
{
|
|
2190
|
-
let name =
|
|
2191
|
-
let nodes =
|
|
2232
|
+
let name = __eliscript_value_223;
|
|
2233
|
+
let nodes = __eliscript_value_224;
|
|
2192
2234
|
if ((name === "not")) {
|
|
2193
2235
|
require_node_arity(node, 1, 1);
|
|
2194
2236
|
return combine(["(!", emit_test(((((nodes) ?? [])[0]) ?? null)), ")"]);
|
|
@@ -2212,7 +2254,7 @@ function emit_intrinsic(node) {
|
|
|
2212
2254
|
if ((name === "-")) {
|
|
2213
2255
|
require_node_arity(node, 1, null);
|
|
2214
2256
|
if (((nodes)["length"] === 1)) {
|
|
2215
|
-
if (__eliscript_truthy((
|
|
2257
|
+
if (__eliscript_truthy((__eliscript_tdz_read_17()))) {
|
|
2216
2258
|
return combine(["(-", emit_expression(((((nodes) ?? [])[0]) ?? null)), ")"]);
|
|
2217
2259
|
} else {
|
|
2218
2260
|
return emit_numeric_unary("neg", ((((nodes) ?? [])[0]) ?? null));
|
|
@@ -2234,7 +2276,7 @@ function emit_intrinsic(node) {
|
|
|
2234
2276
|
} else {
|
|
2235
2277
|
if ((name === "int32")) {
|
|
2236
2278
|
require_node_arity(node, 1, 1);
|
|
2237
|
-
if (__eliscript_truthy((
|
|
2279
|
+
if (__eliscript_truthy((__eliscript_tdz_read_17()))) {
|
|
2238
2280
|
return combine(["(", emit_expression(((((nodes) ?? [])[0]) ?? null)), " | 0)"]);
|
|
2239
2281
|
} else {
|
|
2240
2282
|
return emit_numeric_unary("int32", ((((nodes) ?? [])[0]) ?? null));
|
|
@@ -2242,7 +2284,7 @@ function emit_intrinsic(node) {
|
|
|
2242
2284
|
} else {
|
|
2243
2285
|
if ((name === "uint32")) {
|
|
2244
2286
|
require_node_arity(node, 1, 1);
|
|
2245
|
-
if (__eliscript_truthy((
|
|
2287
|
+
if (__eliscript_truthy((__eliscript_tdz_read_17()))) {
|
|
2246
2288
|
return combine(["(", emit_expression(((((nodes) ?? [])[0]) ?? null)), " >>> 0)"]);
|
|
2247
2289
|
} else {
|
|
2248
2290
|
return emit_numeric_unary("uint32", ((((nodes) ?? [])[0]) ?? null));
|
|
@@ -2250,7 +2292,7 @@ function emit_intrinsic(node) {
|
|
|
2250
2292
|
} else {
|
|
2251
2293
|
if ((name === "imul32")) {
|
|
2252
2294
|
require_node_arity(node, 2, 2);
|
|
2253
|
-
if (__eliscript_truthy((
|
|
2295
|
+
if (__eliscript_truthy((__eliscript_tdz_read_17()))) {
|
|
2254
2296
|
return combine(["Math.imul(", emit_expression(((((nodes) ?? [])[0]) ?? null)), ", ", emit_expression(((((nodes) ?? [])[1]) ?? null)), ")"]);
|
|
2255
2297
|
} else {
|
|
2256
2298
|
return emit_numeric_binary("imul", emit_expression(((((nodes) ?? [])[0]) ?? null)), emit_expression(((((nodes) ?? [])[1]) ?? null)));
|
|
@@ -2267,7 +2309,7 @@ function emit_intrinsic(node) {
|
|
|
2267
2309
|
} else {
|
|
2268
2310
|
if ((name === "bit-not")) {
|
|
2269
2311
|
require_node_arity(node, 1, 1);
|
|
2270
|
-
if (__eliscript_truthy((
|
|
2312
|
+
if (__eliscript_truthy((__eliscript_tdz_read_17()))) {
|
|
2271
2313
|
return combine(["(~", emit_expression(((((nodes) ?? [])[0]) ?? null)), ")"]);
|
|
2272
2314
|
} else {
|
|
2273
2315
|
return emit_numeric_unary("not", ((((nodes) ?? [])[0]) ?? null));
|
|
@@ -2411,7 +2453,7 @@ function emit_intrinsic(node) {
|
|
|
2411
2453
|
require_node_arity(node, 3, 3);
|
|
2412
2454
|
return combine(["({...((", emit_expression(((((nodes) ?? [])[0]) ?? null)), ") ?? {}), [", emit_property_key(((((nodes) ?? [])[1]) ?? null)), "]: ", emit_expression(((((nodes) ?? [])[2]) ?? null)), "})"]);
|
|
2413
2455
|
} else {
|
|
2414
|
-
return (
|
|
2456
|
+
return (__eliscript_tdz_read_19())((String("unknown IR intrinsic: ") + String(name)));
|
|
2415
2457
|
}
|
|
2416
2458
|
}
|
|
2417
2459
|
}
|
|
@@ -2467,15 +2509,15 @@ function emit_intrinsic(node) {
|
|
|
2467
2509
|
}
|
|
2468
2510
|
function emit_object_properties(properties) {
|
|
2469
2511
|
{
|
|
2470
|
-
const
|
|
2512
|
+
const __eliscript_value_225 = [];
|
|
2471
2513
|
{
|
|
2472
|
-
let result =
|
|
2514
|
+
let result = __eliscript_value_225;
|
|
2473
2515
|
(properties)["forEach"](((property) => {
|
|
2474
2516
|
{
|
|
2475
|
-
const
|
|
2517
|
+
const __eliscript_value_226 = children(property);
|
|
2476
2518
|
{
|
|
2477
|
-
let nodes =
|
|
2478
|
-
return (result)["push"]((
|
|
2519
|
+
let nodes = __eliscript_value_226;
|
|
2520
|
+
return (result)["push"]((__eliscript_tdz_read_22())(ir_span(property), (__eliscript_truthy(ir_property(property, "computed")) ? combine(["[", emit_expression(((((nodes) ?? [])[0]) ?? null)), "]: ", emit_expression(((((nodes) ?? [])[1]) ?? null))]) : combine([json_string(ir_value(property)), ": ", emit_expression(((((nodes) ?? [])[0]) ?? null))]))));
|
|
2479
2521
|
}
|
|
2480
2522
|
}
|
|
2481
2523
|
}));
|
|
@@ -2491,11 +2533,11 @@ function literal_kind(node) {
|
|
|
2491
2533
|
}
|
|
2492
2534
|
function emit_literal(node) {
|
|
2493
2535
|
{
|
|
2494
|
-
const
|
|
2495
|
-
const
|
|
2536
|
+
const __eliscript_value_227 = ir_value(node);
|
|
2537
|
+
const __eliscript_value_228 = literal_kind(node);
|
|
2496
2538
|
{
|
|
2497
|
-
let value =
|
|
2498
|
-
let kind =
|
|
2539
|
+
let value = __eliscript_value_227;
|
|
2540
|
+
let kind = __eliscript_value_228;
|
|
2499
2541
|
if ((kind === "undefined")) {
|
|
2500
2542
|
return text_fragment("undefined");
|
|
2501
2543
|
} else {
|
|
@@ -2513,14 +2555,14 @@ function emit_literal(node) {
|
|
|
2513
2555
|
} else {
|
|
2514
2556
|
if ((((__eliscript_value) => { if (__eliscript_value === null) return "null"; const __eliscript_host_type = typeof __eliscript_value; if (__eliscript_host_type !== "object" && __eliscript_host_type !== "function") return __eliscript_host_type; try { const __eliscript_type = Object.getOwnPropertyDescriptor(__eliscript_value, Symbol.for("eliscript.value.type")); if (__eliscript_type && Object.prototype.hasOwnProperty.call(__eliscript_type, "value") && (__eliscript_type.value === "keyword" || __eliscript_type.value === "symbol")) return __eliscript_type.value; const __eliscript_kind = Object.getOwnPropertyDescriptor(__eliscript_value, "kind"); if (__eliscript_kind && Object.prototype.hasOwnProperty.call(__eliscript_kind, "value")) { if (__eliscript_kind.value === "eliscript/keyword") return "keyword"; if (__eliscript_kind.value === "eliscript/symbol") return "symbol"; } return __eliscript_host_type; } catch { return __eliscript_host_type; } })(value) === "number")) {
|
|
2515
2557
|
if ((!__eliscript_truthy(Number.isFinite(value)))) {
|
|
2516
|
-
(
|
|
2558
|
+
(__eliscript_tdz_read_19())((String("non-finite numbers are not supported: ") + String(value)));
|
|
2517
2559
|
}
|
|
2518
2560
|
return text_fragment((((value === 0) && __eliscript_numeric_relation("<", __eliscript_numeric_div(1, value), 0)) ? "-0.0" : (String(value))));
|
|
2519
2561
|
} else {
|
|
2520
2562
|
if ((((__eliscript_value) => { if (__eliscript_value === null) return "null"; const __eliscript_host_type = typeof __eliscript_value; if (__eliscript_host_type !== "object" && __eliscript_host_type !== "function") return __eliscript_host_type; try { const __eliscript_type = Object.getOwnPropertyDescriptor(__eliscript_value, Symbol.for("eliscript.value.type")); if (__eliscript_type && Object.prototype.hasOwnProperty.call(__eliscript_type, "value") && (__eliscript_type.value === "keyword" || __eliscript_type.value === "symbol")) return __eliscript_type.value; const __eliscript_kind = Object.getOwnPropertyDescriptor(__eliscript_value, "kind"); if (__eliscript_kind && Object.prototype.hasOwnProperty.call(__eliscript_kind, "value")) { if (__eliscript_kind.value === "eliscript/keyword") return "keyword"; if (__eliscript_kind.value === "eliscript/symbol") return "symbol"; } return __eliscript_host_type; } catch { return __eliscript_host_type; } })(value) === "string")) {
|
|
2521
2563
|
return text_fragment(json_string(value));
|
|
2522
2564
|
} else {
|
|
2523
|
-
return (
|
|
2565
|
+
return (__eliscript_tdz_read_19())((String("unsupported IR literal: ") + String(value)));
|
|
2524
2566
|
}
|
|
2525
2567
|
}
|
|
2526
2568
|
}
|
|
@@ -2532,13 +2574,13 @@ function emit_literal(node) {
|
|
|
2532
2574
|
}
|
|
2533
2575
|
}
|
|
2534
2576
|
function datum_kind(value) {
|
|
2535
|
-
return ((
|
|
2577
|
+
return ((__eliscript_value_229) => (__eliscript_truthy(__eliscript_value_229) ? ((__eliscript_value_230) => (__eliscript_truthy(__eliscript_value_230) ? (value)["kind"] : __eliscript_value_230))((((__eliscript_value) => { if (__eliscript_value === null) return "null"; const __eliscript_host_type = typeof __eliscript_value; if (__eliscript_host_type !== "object" && __eliscript_host_type !== "function") return __eliscript_host_type; try { const __eliscript_type = Object.getOwnPropertyDescriptor(__eliscript_value, Symbol.for("eliscript.value.type")); if (__eliscript_type && Object.prototype.hasOwnProperty.call(__eliscript_type, "value") && (__eliscript_type.value === "keyword" || __eliscript_type.value === "symbol")) return __eliscript_type.value; const __eliscript_kind = Object.getOwnPropertyDescriptor(__eliscript_value, "kind"); if (__eliscript_kind && Object.prototype.hasOwnProperty.call(__eliscript_kind, "value")) { if (__eliscript_kind.value === "eliscript/keyword") return "keyword"; if (__eliscript_kind.value === "eliscript/symbol") return "symbol"; } return __eliscript_host_type; } catch { return __eliscript_host_type; } })(value) === "object")) : __eliscript_value_229))(value);
|
|
2536
2578
|
}
|
|
2537
2579
|
function emit_quoted(value) {
|
|
2538
2580
|
{
|
|
2539
|
-
const
|
|
2581
|
+
const __eliscript_value_231 = datum_kind(value);
|
|
2540
2582
|
{
|
|
2541
|
-
let kind =
|
|
2583
|
+
let kind = __eliscript_value_231;
|
|
2542
2584
|
if ((value == null)) {
|
|
2543
2585
|
return text_fragment("__eliscript_list()");
|
|
2544
2586
|
} else {
|
|
@@ -2573,7 +2615,7 @@ function emit_quoted(value) {
|
|
|
2573
2615
|
return emit_quoted(item);
|
|
2574
2616
|
})), ", "), ")"]);
|
|
2575
2617
|
} else {
|
|
2576
|
-
return (
|
|
2618
|
+
return (__eliscript_tdz_read_19())("cannot emit quoted IR datum");
|
|
2577
2619
|
}
|
|
2578
2620
|
}
|
|
2579
2621
|
}
|
|
@@ -2589,15 +2631,15 @@ function emit_quoted(value) {
|
|
|
2589
2631
|
}
|
|
2590
2632
|
function quoted_uses_literal_runtime_p(value) {
|
|
2591
2633
|
{
|
|
2592
|
-
const
|
|
2634
|
+
const __eliscript_value_232 = datum_kind(value);
|
|
2593
2635
|
{
|
|
2594
|
-
let kind =
|
|
2636
|
+
let kind = __eliscript_value_232;
|
|
2595
2637
|
return ((value == null) || (value === false) || (kind === "symbol") || (kind === "keyword") || (kind === "list") || (kind === "vector"));
|
|
2596
2638
|
}
|
|
2597
2639
|
}
|
|
2598
2640
|
}
|
|
2599
2641
|
function emit_property_key(node) {
|
|
2600
|
-
return (
|
|
2642
|
+
return (__eliscript_tdz_read_22())(ir_span(node), (((ir_kind(node) === "literal") && ((literal_kind(node) === "keyword") || (((__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; } })((node)["value"]) === "string"))) ? text_fragment(json_string(ir_value(node))) : emit_expression(node)));
|
|
2601
2643
|
}
|
|
2602
2644
|
function array_text_key_p(node) {
|
|
2603
2645
|
return ((!(ir_kind(node) === "literal")) || (ir_value(node) === "join") || (ir_value(node) === "toString") || (ir_value(node) === "call") || (ir_value(node) === "apply") || (ir_value(node) === "bind"));
|
|
@@ -2609,15 +2651,15 @@ function primitive_literal_arguments_p(nodes) {
|
|
|
2609
2651
|
}
|
|
2610
2652
|
function emit_expression(node) {
|
|
2611
2653
|
if ((!__eliscript_truthy(node_p(node)))) {
|
|
2612
|
-
(
|
|
2654
|
+
(__eliscript_tdz_read_19())("expected an IR expression node");
|
|
2613
2655
|
}
|
|
2614
2656
|
{
|
|
2615
|
-
const
|
|
2616
|
-
const
|
|
2657
|
+
const __eliscript_value_233 = ir_kind(node);
|
|
2658
|
+
const __eliscript_value_234 = children(node);
|
|
2617
2659
|
{
|
|
2618
|
-
let kind =
|
|
2619
|
-
let nodes =
|
|
2620
|
-
return (
|
|
2660
|
+
let kind = __eliscript_value_233;
|
|
2661
|
+
let nodes = __eliscript_value_234;
|
|
2662
|
+
return (__eliscript_tdz_read_22())(ir_span(node), ((kind === "literal") ? emit_literal(node) : ((kind === "reference") ? tdz_read(node) : ((kind === "array-literal") ? combine(["[", emit_arguments(nodes), "]"]) : ((kind === "persistent-list-literal") ? combine(["__eliscript_list(", emit_arguments(nodes), ")"]) : ((kind === "persistent-vector-literal") ? combine(["__eliscript_vector(", emit_arguments(nodes), ")"]) : ((kind === "persistent-map-literal") ? combine(["__eliscript_hash_map(", emit_arguments(nodes), ")"]) : ((kind === "persistent-set-literal") ? combine(["__eliscript_hash_set(", emit_arguments(nodes), ")"]) : ((kind === "persistent-queue-literal") ? combine(["__eliscript_queue(", emit_arguments(nodes), ")"]) : ((kind === "quoted-literal") ? emit_quoted(ir_value(node)) : ((kind === "function-expression") ? emit_function(node) : ((kind === "await-expression") ? combine(["await (", emit_expression(((((nodes) ?? [])[0]) ?? null)), ")"]) : ((kind === "throw-expression") ? emit_throw(node) : ((kind === "try-expression") ? emit_try(node) : ((kind === "conditional") ? emit_if(nodes) : ((kind === "conditional-sugar") ? emit_conditional_sugar(node) : ((kind === "conditional-chain") ? emit_cond(nodes) : ((kind === "sequence") ? emit_do(nodes) : ((kind === "lexical-bindings") ? emit_let(node) : ((kind === "assignment") ? emit_assignment(node) : ((kind === "loop") ? emit_loop(node) : ((kind === "binding-loop") ? emit_binding_loop(node) : ((kind === "recur") ? (__eliscript_tdz_read_19())("recur is only valid in an analyzed tail position") : ((kind === "short-circuit") ? emit_short_circuit(nodes, ir_value(node)) : ((kind === "intrinsic") ? emit_intrinsic(node) : ((kind === "object-literal") ? emit_object(node) : ((kind === "property-read") ? ((access) => {
|
|
2621
2663
|
if (((nodes)["length"] === 3)) {
|
|
2622
2664
|
return combine(["(", access, " ?? ", emit_expression(((((nodes) ?? [])[2]) ?? null)), ")"]);
|
|
2623
2665
|
} else {
|
|
@@ -2627,12 +2669,12 @@ function emit_expression(node) {
|
|
|
2627
2669
|
return ((array_text) => {
|
|
2628
2670
|
return ((direct) => {
|
|
2629
2671
|
return combine([(__eliscript_truthy(direct) ? "__eliscript_at_direct(" : (__eliscript_truthy(array_text) ? "__eliscript_at(" : "(")), emit_expression(((((nodes) ?? [])[0]) ?? null)), (__eliscript_truthy(array_text) ? ", " : ")["), emit_property_key(((((nodes) ?? [])[1]) ?? null)), (__eliscript_truthy(direct) ? (__eliscript_numeric_relation(">", (arguments$)["length"], 0) ? ", " : "") : (__eliscript_truthy(array_text) ? ")(" : "](")), emit_arguments(arguments$), ")"]);
|
|
2630
|
-
})(((
|
|
2672
|
+
})(((__eliscript_value_235) => (__eliscript_truthy(__eliscript_value_235) ? primitive_literal_arguments_p(arguments$) : __eliscript_value_235))(array_text));
|
|
2631
2673
|
})(array_text_key_p(((((nodes) ?? [])[1]) ?? null)));
|
|
2632
2674
|
})((nodes)["slice"](2)) : ((kind === "constructor-call") ? combine(["new (", emit_expression(((((nodes) ?? [])[0]) ?? null)), ")(", emit_arguments((nodes)["slice"](1)), ")"]) : ((kind === "raw-javascript") ? (() => {
|
|
2633
2675
|
require_arity("js*", nodes, 1, 1);
|
|
2634
2676
|
if ((!(ir_kind(((((nodes) ?? [])[0]) ?? null)) === "literal"))) {
|
|
2635
|
-
(
|
|
2677
|
+
(__eliscript_tdz_read_19())("js* expects a string literal");
|
|
2636
2678
|
}
|
|
2637
2679
|
return text_fragment(ir_value(((((nodes) ?? [])[0]) ?? null)));
|
|
2638
2680
|
})() : ((kind === "print") ? combine(["console.log(", emit_arguments(nodes), ")"]) : ((kind === "string-concat") ? (((nodes)["length"] === 0) ? text_fragment("\"\"") : ((parts) => {
|
|
@@ -2640,26 +2682,26 @@ function emit_expression(node) {
|
|
|
2640
2682
|
return (parts)["push"](combine(["String(", emit_expression(child), ")"]));
|
|
2641
2683
|
}));
|
|
2642
2684
|
return combine(["(", join_fragments(parts, " + "), ")"]);
|
|
2643
|
-
})([])) : ((kind === "invoke") ? combine([emit_callee(((((nodes) ?? [])[0]) ?? null)), "(", emit_arguments((nodes)["slice"](1)), ")"]) : ((kind === "apply-call") ? combine([emit_callee(((((nodes) ?? [])[0]) ?? null)), "(...", emit_expression(((((nodes) ?? [])[1]) ?? null)), ")"]) : ((kind === "call") ? combine([emit_callee(((((nodes) ?? [])[0]) ?? null)), "(", emit_arguments((nodes)["slice"](1)), ")"]) : (
|
|
2685
|
+
})([])) : ((kind === "invoke") ? combine([emit_callee(((((nodes) ?? [])[0]) ?? null)), "(", emit_arguments((nodes)["slice"](1)), ")"]) : ((kind === "apply-call") ? combine([emit_callee(((((nodes) ?? [])[0]) ?? null)), "(...", emit_expression(((((nodes) ?? [])[1]) ?? null)), ")"]) : ((kind === "call") ? combine([emit_callee(((((nodes) ?? [])[0]) ?? null)), "(", emit_arguments((nodes)["slice"](1)), ")"]) : (__eliscript_tdz_read_19())((String("IR node is not valid in expression position: ") + String(kind)))))))))))))))))))))))))))))))))))))));
|
|
2644
2686
|
}
|
|
2645
2687
|
}
|
|
2646
2688
|
}
|
|
2647
2689
|
function emit_import(node) {
|
|
2648
2690
|
{
|
|
2649
|
-
const
|
|
2650
|
-
const
|
|
2651
|
-
const
|
|
2691
|
+
const __eliscript_value_236 = null;
|
|
2692
|
+
const __eliscript_value_237 = null;
|
|
2693
|
+
const __eliscript_value_238 = [];
|
|
2652
2694
|
{
|
|
2653
|
-
let default_binding =
|
|
2654
|
-
let namespace_binding =
|
|
2655
|
-
let named_bindings =
|
|
2695
|
+
let default_binding = __eliscript_value_236;
|
|
2696
|
+
let namespace_binding = __eliscript_value_237;
|
|
2697
|
+
let named_bindings = __eliscript_value_238;
|
|
2656
2698
|
(children(node))["forEach"](((specifier) => {
|
|
2657
2699
|
{
|
|
2658
|
-
const
|
|
2659
|
-
const
|
|
2700
|
+
const __eliscript_value_239 = emit_binding_name(specifier);
|
|
2701
|
+
const __eliscript_value_240 = ir_kind(specifier);
|
|
2660
2702
|
{
|
|
2661
|
-
let name =
|
|
2662
|
-
let kind =
|
|
2703
|
+
let name = __eliscript_value_239;
|
|
2704
|
+
let kind = __eliscript_value_240;
|
|
2663
2705
|
if ((kind === "import-default")) {
|
|
2664
2706
|
return ((default_binding = name));
|
|
2665
2707
|
} else {
|
|
@@ -2669,20 +2711,20 @@ function emit_import(node) {
|
|
|
2669
2711
|
if ((kind === "import-named")) {
|
|
2670
2712
|
return (named_bindings)["push"](name);
|
|
2671
2713
|
} else {
|
|
2672
|
-
return (
|
|
2714
|
+
return (__eliscript_tdz_read_19())((String("invalid IR import specifier: ") + String(kind)));
|
|
2673
2715
|
}
|
|
2674
2716
|
}
|
|
2675
2717
|
}
|
|
2676
2718
|
}
|
|
2677
2719
|
}
|
|
2678
2720
|
}));
|
|
2679
|
-
if (__eliscript_truthy(((
|
|
2680
|
-
(
|
|
2721
|
+
if (__eliscript_truthy(((__eliscript_value_241) => (__eliscript_truthy(__eliscript_value_241) ? __eliscript_numeric_relation(">", (named_bindings)["length"], 0) : __eliscript_value_241))(namespace_binding))) {
|
|
2722
|
+
(__eliscript_tdz_read_19())("namespace and named imports cannot be combined");
|
|
2681
2723
|
}
|
|
2682
2724
|
{
|
|
2683
|
-
const
|
|
2725
|
+
const __eliscript_value_242 = [];
|
|
2684
2726
|
{
|
|
2685
|
-
let clauses =
|
|
2727
|
+
let clauses = __eliscript_value_242;
|
|
2686
2728
|
if (__eliscript_truthy(default_binding)) {
|
|
2687
2729
|
(clauses)["push"](default_binding);
|
|
2688
2730
|
}
|
|
@@ -2704,23 +2746,23 @@ function emit_import(node) {
|
|
|
2704
2746
|
}
|
|
2705
2747
|
function emit_top_level(node) {
|
|
2706
2748
|
if ((!__eliscript_truthy(node_p(node)))) {
|
|
2707
|
-
(
|
|
2749
|
+
(__eliscript_tdz_read_19())("expected a top-level IR node");
|
|
2708
2750
|
}
|
|
2709
2751
|
{
|
|
2710
|
-
const
|
|
2711
|
-
const
|
|
2752
|
+
const __eliscript_value_243 = ir_kind(node);
|
|
2753
|
+
const __eliscript_value_244 = children(node);
|
|
2712
2754
|
{
|
|
2713
|
-
let kind =
|
|
2714
|
-
let nodes =
|
|
2715
|
-
return (
|
|
2755
|
+
let kind = __eliscript_value_243;
|
|
2756
|
+
let nodes = __eliscript_value_244;
|
|
2757
|
+
return (__eliscript_tdz_read_22())(ir_span(node), ((kind === "module-declaration") ? join_fragments((nodes)["map"](((child) => {
|
|
2716
2758
|
return emit_top_level(child);
|
|
2717
2759
|
})), "\n") : ((kind === "import-declaration") ? emit_import(node) : ((kind === "variable-declaration") ? combine([(__eliscript_truthy(ir_property(node, "mutable")) ? "let " : "const "), binding_name(ir_value(node)), " = ", (__eliscript_numeric_relation(">", (nodes)["length"], 0) ? emit_expression(((((nodes) ?? [])[0]) ?? null)) : "null"), ";", ((record) => {
|
|
2718
|
-
if (__eliscript_truthy(record)) {
|
|
2760
|
+
if (__eliscript_truthy(tdz_guarded_p(record))) {
|
|
2719
2761
|
return (String("\n") + String(tdz_ready_name(record)) + String(" = true;"));
|
|
2720
2762
|
} else {
|
|
2721
2763
|
return "";
|
|
2722
2764
|
}
|
|
2723
|
-
})(((
|
|
2765
|
+
})(((__eliscript_value_245) => (__eliscript_truthy(__eliscript_value_245) ? (((__eliscript_tdz_read_26()))["declarations"])["get"](node) : __eliscript_value_245))((__eliscript_tdz_read_26())))]) : ((kind === "function-declaration") ? ((parts) => {
|
|
2724
2766
|
return ((parameters) => {
|
|
2725
2767
|
return ((body) => {
|
|
2726
2768
|
return ((fragment) => {
|
|
@@ -2732,7 +2774,7 @@ function emit_top_level(node) {
|
|
|
2732
2774
|
})(((((parts) ?? [])[0]) ?? null));
|
|
2733
2775
|
})(split_counted_children(node, "parameterCount")) : ((kind === "export-declaration") ? combine(["export {", join_fragments((nodes)["map"](((reference) => {
|
|
2734
2776
|
return emit_binding_name(reference);
|
|
2735
|
-
})), ", "), "};"]) : ((kind === "export-default") ? combine(["export default ", emit_expression(((((nodes) ?? [])[0]) ?? null)), ";"]) : ((kind === "expression-statement") ? combine([emit_expression(((((nodes) ?? [])[0]) ?? null)), ";"]) : (
|
|
2777
|
+
})), ", "), "};"]) : ((kind === "export-default") ? combine(["export default ", emit_expression(((((nodes) ?? [])[0]) ?? null)), ";"]) : ((kind === "expression-statement") ? combine([emit_expression(((((nodes) ?? [])[0]) ?? null)), ";"]) : (__eliscript_tdz_read_19())((String("IR node is not valid at module top level: ") + String(kind)))))))))));
|
|
2736
2778
|
}
|
|
2737
2779
|
}
|
|
2738
2780
|
}
|
|
@@ -2741,9 +2783,9 @@ function node_uses_number_conversion_p(node) {
|
|
|
2741
2783
|
return true;
|
|
2742
2784
|
} else {
|
|
2743
2785
|
{
|
|
2744
|
-
const
|
|
2786
|
+
const __eliscript_value_246 = false;
|
|
2745
2787
|
{
|
|
2746
|
-
let found =
|
|
2788
|
+
let found = __eliscript_value_246;
|
|
2747
2789
|
(children(node))["forEach"](((child) => {
|
|
2748
2790
|
if (__eliscript_truthy(node_uses_number_conversion_p(child))) {
|
|
2749
2791
|
return ((found = true));
|
|
@@ -2761,9 +2803,9 @@ function node_uses_host_identity_token_p(node) {
|
|
|
2761
2803
|
return true;
|
|
2762
2804
|
} else {
|
|
2763
2805
|
{
|
|
2764
|
-
const
|
|
2806
|
+
const __eliscript_value_247 = false;
|
|
2765
2807
|
{
|
|
2766
|
-
let found =
|
|
2808
|
+
let found = __eliscript_value_247;
|
|
2767
2809
|
(children(node))["forEach"](((child) => {
|
|
2768
2810
|
if (__eliscript_truthy(node_uses_host_identity_token_p(child))) {
|
|
2769
2811
|
return ((found = true));
|
|
@@ -2778,18 +2820,18 @@ function node_uses_host_identity_token_p(node) {
|
|
|
2778
2820
|
}
|
|
2779
2821
|
function node_directly_uses_literal_runtime_p(node) {
|
|
2780
2822
|
{
|
|
2781
|
-
const
|
|
2823
|
+
const __eliscript_value_248 = ir_kind(node);
|
|
2782
2824
|
{
|
|
2783
|
-
let kind =
|
|
2784
|
-
return ((
|
|
2825
|
+
let kind = __eliscript_value_248;
|
|
2826
|
+
return ((__eliscript_value_249) => (__eliscript_truthy(__eliscript_value_249) ? __eliscript_value_249 : ((__eliscript_value_250) => (__eliscript_truthy(__eliscript_value_250) ? __eliscript_value_250 : ((__eliscript_value_251) => (__eliscript_truthy(__eliscript_value_251) ? __eliscript_value_251 : ((__eliscript_value_252) => (__eliscript_truthy(__eliscript_value_252) ? __eliscript_value_252 : ((__eliscript_value_253) => (__eliscript_truthy(__eliscript_value_253) ? __eliscript_value_253 : ((__eliscript_value_254) => (__eliscript_truthy(__eliscript_value_254) ? __eliscript_value_254 : ((kind === "literal") && (literal_kind(node) === "keyword"))))(((__eliscript_value_255) => (__eliscript_truthy(__eliscript_value_255) ? quoted_uses_literal_runtime_p(ir_value(node)) : __eliscript_value_255))((kind === "quoted-literal")))))((kind === "persistent-queue-literal"))))((kind === "persistent-set-literal"))))((kind === "persistent-map-literal"))))((kind === "persistent-vector-literal"))))((kind === "persistent-list-literal"));
|
|
2785
2827
|
}
|
|
2786
2828
|
}
|
|
2787
2829
|
}
|
|
2788
2830
|
function literal_runtime_static_key_index(node) {
|
|
2789
2831
|
{
|
|
2790
|
-
const
|
|
2832
|
+
const __eliscript_value_256 = ir_kind(node);
|
|
2791
2833
|
{
|
|
2792
|
-
let kind =
|
|
2834
|
+
let kind = __eliscript_value_256;
|
|
2793
2835
|
if (((kind === "property-read") || (kind === "property-write") || (kind === "method-call"))) {
|
|
2794
2836
|
return 1;
|
|
2795
2837
|
} else {
|
|
@@ -2804,9 +2846,9 @@ function literal_runtime_static_key_index(node) {
|
|
|
2804
2846
|
}
|
|
2805
2847
|
function node_uses_literal_runtime_p(node) {
|
|
2806
2848
|
{
|
|
2807
|
-
const
|
|
2849
|
+
const __eliscript_value_257 = children(node);
|
|
2808
2850
|
{
|
|
2809
|
-
let nodes =
|
|
2851
|
+
let nodes = __eliscript_value_257;
|
|
2810
2852
|
if (__eliscript_truthy(node_directly_uses_literal_runtime_p(node))) {
|
|
2811
2853
|
return true;
|
|
2812
2854
|
} else {
|
|
@@ -2817,17 +2859,17 @@ function node_uses_literal_runtime_p(node) {
|
|
|
2817
2859
|
}
|
|
2818
2860
|
function children_use_literal_runtime_p(nodes, static_key_index) {
|
|
2819
2861
|
{
|
|
2820
|
-
const
|
|
2821
|
-
const
|
|
2862
|
+
const __eliscript_value_258 = false;
|
|
2863
|
+
const __eliscript_value_259 = 0;
|
|
2822
2864
|
{
|
|
2823
|
-
let found =
|
|
2824
|
-
let index =
|
|
2865
|
+
let found = __eliscript_value_258;
|
|
2866
|
+
let index = __eliscript_value_259;
|
|
2825
2867
|
while (__eliscript_numeric_relation("<", index, (nodes)["length"])) {
|
|
2826
2868
|
{
|
|
2827
|
-
const
|
|
2869
|
+
const __eliscript_value_260 = ((((nodes) ?? [])[index]) ?? null);
|
|
2828
2870
|
{
|
|
2829
|
-
let child =
|
|
2830
|
-
if ((!__eliscript_truthy(((
|
|
2871
|
+
let child = __eliscript_value_260;
|
|
2872
|
+
if ((!__eliscript_truthy(((__eliscript_value_261) => (__eliscript_truthy(__eliscript_value_261) ? ((index === static_key_index) && (ir_kind(child) === "literal") && (literal_kind(child) === "keyword")) : __eliscript_value_261))(static_key_index)))) {
|
|
2831
2873
|
if (__eliscript_truthy(node_uses_literal_runtime_p(child))) {
|
|
2832
2874
|
((found = true));
|
|
2833
2875
|
}
|
|
@@ -2845,9 +2887,9 @@ function node_uses_collection_runtime_p(node) {
|
|
|
2845
2887
|
return true;
|
|
2846
2888
|
} else {
|
|
2847
2889
|
{
|
|
2848
|
-
const
|
|
2890
|
+
const __eliscript_value_262 = false;
|
|
2849
2891
|
{
|
|
2850
|
-
let found =
|
|
2892
|
+
let found = __eliscript_value_262;
|
|
2851
2893
|
(children(node))["forEach"](((child) => {
|
|
2852
2894
|
if (__eliscript_truthy(node_uses_collection_runtime_p(child))) {
|
|
2853
2895
|
return ((found = true));
|
|
@@ -2865,9 +2907,9 @@ function node_uses_binding_runtime_p(node) {
|
|
|
2865
2907
|
return true;
|
|
2866
2908
|
} else {
|
|
2867
2909
|
{
|
|
2868
|
-
const
|
|
2910
|
+
const __eliscript_value_263 = false;
|
|
2869
2911
|
{
|
|
2870
|
-
let found =
|
|
2912
|
+
let found = __eliscript_value_263;
|
|
2871
2913
|
(children(node))["forEach"](((child) => {
|
|
2872
2914
|
if (__eliscript_truthy(node_uses_binding_runtime_p(child))) {
|
|
2873
2915
|
return ((found = true));
|
|
@@ -2885,9 +2927,9 @@ function node_uses_list_runtime_p(node) {
|
|
|
2885
2927
|
return true;
|
|
2886
2928
|
} else {
|
|
2887
2929
|
{
|
|
2888
|
-
const
|
|
2930
|
+
const __eliscript_value_264 = false;
|
|
2889
2931
|
{
|
|
2890
|
-
let found =
|
|
2932
|
+
let found = __eliscript_value_264;
|
|
2891
2933
|
(children(node))["forEach"](((child) => {
|
|
2892
2934
|
if (__eliscript_truthy(node_uses_list_runtime_p(child))) {
|
|
2893
2935
|
return ((found = true));
|
|
@@ -2905,9 +2947,9 @@ function node_uses_value_runtime_p(node) {
|
|
|
2905
2947
|
return true;
|
|
2906
2948
|
} else {
|
|
2907
2949
|
{
|
|
2908
|
-
const
|
|
2950
|
+
const __eliscript_value_265 = false;
|
|
2909
2951
|
{
|
|
2910
|
-
let found =
|
|
2952
|
+
let found = __eliscript_value_265;
|
|
2911
2953
|
(children(node))["forEach"](((child) => {
|
|
2912
2954
|
if (__eliscript_truthy(node_uses_value_runtime_p(child))) {
|
|
2913
2955
|
return ((found = true));
|
|
@@ -2922,9 +2964,9 @@ function node_uses_value_runtime_p(node) {
|
|
|
2922
2964
|
}
|
|
2923
2965
|
function program_uses_number_conversion_p(program) {
|
|
2924
2966
|
{
|
|
2925
|
-
const
|
|
2967
|
+
const __eliscript_value_266 = false;
|
|
2926
2968
|
{
|
|
2927
|
-
let found =
|
|
2969
|
+
let found = __eliscript_value_266;
|
|
2928
2970
|
(program_body(program))["forEach"](((node) => {
|
|
2929
2971
|
if (__eliscript_truthy(node_uses_number_conversion_p(node))) {
|
|
2930
2972
|
return ((found = true));
|
|
@@ -2938,9 +2980,9 @@ function program_uses_number_conversion_p(program) {
|
|
|
2938
2980
|
}
|
|
2939
2981
|
function program_uses_host_identity_token_p(program) {
|
|
2940
2982
|
{
|
|
2941
|
-
const
|
|
2983
|
+
const __eliscript_value_267 = false;
|
|
2942
2984
|
{
|
|
2943
|
-
let found =
|
|
2985
|
+
let found = __eliscript_value_267;
|
|
2944
2986
|
(program_body(program))["forEach"](((node) => {
|
|
2945
2987
|
if (__eliscript_truthy(node_uses_host_identity_token_p(node))) {
|
|
2946
2988
|
return ((found = true));
|
|
@@ -2954,9 +2996,9 @@ function program_uses_host_identity_token_p(program) {
|
|
|
2954
2996
|
}
|
|
2955
2997
|
function program_uses_literal_runtime_p(program) {
|
|
2956
2998
|
{
|
|
2957
|
-
const
|
|
2999
|
+
const __eliscript_value_268 = false;
|
|
2958
3000
|
{
|
|
2959
|
-
let found =
|
|
3001
|
+
let found = __eliscript_value_268;
|
|
2960
3002
|
(program_body(program))["forEach"](((node) => {
|
|
2961
3003
|
if (__eliscript_truthy(node_uses_literal_runtime_p(node))) {
|
|
2962
3004
|
return ((found = true));
|
|
@@ -2970,9 +3012,9 @@ function program_uses_literal_runtime_p(program) {
|
|
|
2970
3012
|
}
|
|
2971
3013
|
function program_uses_collection_runtime_p(program) {
|
|
2972
3014
|
{
|
|
2973
|
-
const
|
|
3015
|
+
const __eliscript_value_269 = false;
|
|
2974
3016
|
{
|
|
2975
|
-
let found =
|
|
3017
|
+
let found = __eliscript_value_269;
|
|
2976
3018
|
(program_body(program))["forEach"](((node) => {
|
|
2977
3019
|
if (__eliscript_truthy(node_uses_collection_runtime_p(node))) {
|
|
2978
3020
|
return ((found = true));
|
|
@@ -2986,9 +3028,9 @@ function program_uses_collection_runtime_p(program) {
|
|
|
2986
3028
|
}
|
|
2987
3029
|
function program_uses_binding_runtime_p(program) {
|
|
2988
3030
|
{
|
|
2989
|
-
const
|
|
3031
|
+
const __eliscript_value_270 = false;
|
|
2990
3032
|
{
|
|
2991
|
-
let found =
|
|
3033
|
+
let found = __eliscript_value_270;
|
|
2992
3034
|
(program_body(program))["forEach"](((node) => {
|
|
2993
3035
|
if (__eliscript_truthy(node_uses_binding_runtime_p(node))) {
|
|
2994
3036
|
return ((found = true));
|
|
@@ -3002,9 +3044,9 @@ function program_uses_binding_runtime_p(program) {
|
|
|
3002
3044
|
}
|
|
3003
3045
|
function program_uses_list_runtime_p(program) {
|
|
3004
3046
|
{
|
|
3005
|
-
const
|
|
3047
|
+
const __eliscript_value_271 = false;
|
|
3006
3048
|
{
|
|
3007
|
-
let found =
|
|
3049
|
+
let found = __eliscript_value_271;
|
|
3008
3050
|
(program_body(program))["forEach"](((node) => {
|
|
3009
3051
|
if (__eliscript_truthy(node_uses_list_runtime_p(node))) {
|
|
3010
3052
|
return ((found = true));
|
|
@@ -3018,9 +3060,9 @@ function program_uses_list_runtime_p(program) {
|
|
|
3018
3060
|
}
|
|
3019
3061
|
function program_uses_value_runtime_p(program) {
|
|
3020
3062
|
{
|
|
3021
|
-
const
|
|
3063
|
+
const __eliscript_value_272 = false;
|
|
3022
3064
|
{
|
|
3023
|
-
let found =
|
|
3065
|
+
let found = __eliscript_value_272;
|
|
3024
3066
|
(program_body(program))["forEach"](((node) => {
|
|
3025
3067
|
if (__eliscript_truthy(node_uses_value_runtime_p(node))) {
|
|
3026
3068
|
return ((found = true));
|
|
@@ -3034,9 +3076,9 @@ function program_uses_value_runtime_p(program) {
|
|
|
3034
3076
|
}
|
|
3035
3077
|
function node_uses_array_text_p(node) {
|
|
3036
3078
|
{
|
|
3037
|
-
const
|
|
3079
|
+
const __eliscript_value_273 = ((__eliscript_value_274) => (__eliscript_truthy(__eliscript_value_274) ? __eliscript_value_274 : ((__eliscript_value_276) => (__eliscript_truthy(__eliscript_value_276) ? qualified_apply_reference_p(((((children(node)) ?? [])[0]) ?? null)) : __eliscript_value_276))((["call", "invoke", "apply-call"])["includes"](ir_kind(node)))))(((__eliscript_value_275) => (__eliscript_truthy(__eliscript_value_275) ? array_text_key_p(((((children(node)) ?? [])[1]) ?? null)) : __eliscript_value_275))((ir_kind(node) === "method-call")));
|
|
3038
3080
|
{
|
|
3039
|
-
let found =
|
|
3081
|
+
let found = __eliscript_value_273;
|
|
3040
3082
|
(children(node))["forEach"](((child) => {
|
|
3041
3083
|
if (__eliscript_truthy(node_uses_array_text_p(child))) {
|
|
3042
3084
|
return ((found = true));
|
|
@@ -3052,18 +3094,18 @@ function reference_runtime_requirements(program) {
|
|
|
3052
3094
|
return ({"math": (program_body(program))["some"](node_uses_math_runtime_p), "numericCoercion": program_uses_numeric_coercion_p(program), "imul": (program_body(program))["some"](node_uses_imul_p), "arrayText": (program_body(program))["some"](node_uses_array_text_p), "numberConversion": program_uses_number_conversion_p(program), "hostIdentityToken": program_uses_host_identity_token_p(program), "literal": program_uses_literal_runtime_p(program), "collection": program_uses_collection_runtime_p(program), "binding": program_uses_binding_runtime_p(program), "list": program_uses_list_runtime_p(program), "value": program_uses_value_runtime_p(program)});
|
|
3053
3095
|
}
|
|
3054
3096
|
function math_runtime_reference_p(value) {
|
|
3055
|
-
return ((
|
|
3097
|
+
return ((__eliscript_value_277) => (__eliscript_truthy(__eliscript_value_277) ? ((__eliscript_value_278) => (__eliscript_truthy(__eliscript_value_278) ? __eliscript_value_278 : (["Math/", "Math.", "globalThis/Math/", "globalThis/Math.", "globalThis.Math/", "globalThis.Math."])["some"](((prefix) => {
|
|
3056
3098
|
return (value)["startsWith"](prefix);
|
|
3057
|
-
}))))((["Math", "globalThis/Math", "globalThis.Math"])["includes"](value)) :
|
|
3099
|
+
}))))((["Math", "globalThis/Math", "globalThis.Math"])["includes"](value)) : __eliscript_value_277))((((__eliscript_value) => { if (__eliscript_value === null) return "null"; const __eliscript_host_type = typeof __eliscript_value; if (__eliscript_host_type !== "object" && __eliscript_host_type !== "function") return __eliscript_host_type; try { const __eliscript_type = Object.getOwnPropertyDescriptor(__eliscript_value, Symbol.for("eliscript.value.type")); if (__eliscript_type && Object.prototype.hasOwnProperty.call(__eliscript_type, "value") && (__eliscript_type.value === "keyword" || __eliscript_type.value === "symbol")) return __eliscript_type.value; const __eliscript_kind = Object.getOwnPropertyDescriptor(__eliscript_value, "kind"); if (__eliscript_kind && Object.prototype.hasOwnProperty.call(__eliscript_kind, "value")) { if (__eliscript_kind.value === "eliscript/keyword") return "keyword"; if (__eliscript_kind.value === "eliscript/symbol") return "symbol"; } return __eliscript_host_type; } catch { return __eliscript_host_type; } })(value) === "string"));
|
|
3058
3100
|
}
|
|
3059
3101
|
function node_uses_math_runtime_p(node) {
|
|
3060
|
-
return ((
|
|
3102
|
+
return ((__eliscript_value_279) => (__eliscript_truthy(__eliscript_value_279) ? __eliscript_value_279 : (children(node))["some"](node_uses_math_runtime_p)))(((__eliscript_value_280) => (__eliscript_truthy(__eliscript_value_280) ? math_runtime_reference_p(ir_value(node)) : __eliscript_value_280))((["reference", "raw-javascript"])["includes"](ir_kind(node))));
|
|
3061
3103
|
}
|
|
3062
3104
|
function node_uses_imul_p(node) {
|
|
3063
|
-
return ((
|
|
3105
|
+
return ((__eliscript_value_281) => (__eliscript_truthy(__eliscript_value_281) ? __eliscript_value_281 : (children(node))["some"](node_uses_imul_p)))(((ir_kind(node) === "intrinsic") && (ir_value(node) === "imul32")));
|
|
3064
3106
|
}
|
|
3065
3107
|
function node_uses_numeric_coercion_p(node) {
|
|
3066
|
-
return ((
|
|
3108
|
+
return ((__eliscript_value_282) => (__eliscript_truthy(__eliscript_value_282) ? __eliscript_value_282 : ((found) => {
|
|
3067
3109
|
(children(node))["forEach"](((child) => {
|
|
3068
3110
|
if (__eliscript_truthy(node_uses_numeric_coercion_p(child))) {
|
|
3069
3111
|
return ((found = true));
|
|
@@ -3072,13 +3114,13 @@ function node_uses_numeric_coercion_p(node) {
|
|
|
3072
3114
|
}
|
|
3073
3115
|
}));
|
|
3074
3116
|
return found;
|
|
3075
|
-
})(false)))(((
|
|
3117
|
+
})(false)))(((__eliscript_value_283) => (__eliscript_truthy(__eliscript_value_283) ? ((__eliscript_value_284) => (__eliscript_truthy(__eliscript_value_284) ? (((__eliscript_value_285, __eliscript_value_286) => (__eliscript_value_285 !== __eliscript_value_286))(ir_value(node), "*") || __eliscript_numeric_relation(">", ((children(node)) ?? []).length, 1)) : __eliscript_value_284))(numeric_coercion_intrinsic_p(ir_value(node))) : __eliscript_value_283))((ir_kind(node) === "intrinsic")));
|
|
3076
3118
|
}
|
|
3077
3119
|
function program_uses_numeric_coercion_p(program) {
|
|
3078
3120
|
{
|
|
3079
|
-
const
|
|
3121
|
+
const __eliscript_value_287 = false;
|
|
3080
3122
|
{
|
|
3081
|
-
let found =
|
|
3123
|
+
let found = __eliscript_value_287;
|
|
3082
3124
|
(program_body(program))["forEach"](((node) => {
|
|
3083
3125
|
if (__eliscript_truthy(node_uses_numeric_coercion_p(node))) {
|
|
3084
3126
|
return ((found = true));
|
|
@@ -3091,27 +3133,27 @@ function program_uses_numeric_coercion_p(program) {
|
|
|
3091
3133
|
}
|
|
3092
3134
|
}
|
|
3093
3135
|
function static_literal_key_p(node, index, static_key_index) {
|
|
3094
|
-
return ((
|
|
3136
|
+
return ((__eliscript_value_288) => (__eliscript_truthy(__eliscript_value_288) ? ((index === static_key_index) && (ir_kind(node) === "literal") && (literal_kind(node) === "keyword")) : __eliscript_value_288))(static_key_index);
|
|
3095
3137
|
}
|
|
3096
3138
|
function collect_runtime_requirements(node, requirements, suppress_literal) {
|
|
3097
3139
|
{
|
|
3098
|
-
const
|
|
3099
|
-
const
|
|
3100
|
-
const
|
|
3101
|
-
const
|
|
3102
|
-
const
|
|
3103
|
-
const
|
|
3104
|
-
{
|
|
3105
|
-
let kind =
|
|
3106
|
-
let value =
|
|
3107
|
-
let nodes =
|
|
3108
|
-
let static_key_index =
|
|
3109
|
-
let index =
|
|
3110
|
-
let child =
|
|
3111
|
-
if (__eliscript_truthy(((
|
|
3140
|
+
const __eliscript_value_289 = ir_kind(node);
|
|
3141
|
+
const __eliscript_value_290 = ir_value(node);
|
|
3142
|
+
const __eliscript_value_291 = children(node);
|
|
3143
|
+
const __eliscript_value_292 = literal_runtime_static_key_index(node);
|
|
3144
|
+
const __eliscript_value_293 = 0;
|
|
3145
|
+
const __eliscript_value_294 = null;
|
|
3146
|
+
{
|
|
3147
|
+
let kind = __eliscript_value_289;
|
|
3148
|
+
let value = __eliscript_value_290;
|
|
3149
|
+
let nodes = __eliscript_value_291;
|
|
3150
|
+
let static_key_index = __eliscript_value_292;
|
|
3151
|
+
let index = __eliscript_value_293;
|
|
3152
|
+
let child = __eliscript_value_294;
|
|
3153
|
+
if (__eliscript_truthy(((__eliscript_value_295) => (__eliscript_truthy(__eliscript_value_295) ? __eliscript_value_295 : ((__eliscript_value_297) => (__eliscript_truthy(__eliscript_value_297) ? qualified_apply_reference_p(((((nodes) ?? [])[0]) ?? null)) : __eliscript_value_297))((["call", "invoke", "apply-call"])["includes"](kind))))(((__eliscript_value_296) => (__eliscript_truthy(__eliscript_value_296) ? array_text_key_p(((((nodes) ?? [])[1]) ?? null)) : __eliscript_value_296))((kind === "method-call"))))) {
|
|
3112
3154
|
((requirements)["arrayText"] = true);
|
|
3113
3155
|
}
|
|
3114
|
-
if (__eliscript_truthy(((
|
|
3156
|
+
if (__eliscript_truthy(((__eliscript_value_298) => (__eliscript_truthy(__eliscript_value_298) ? math_runtime_reference_p(value) : __eliscript_value_298))((["reference", "raw-javascript"])["includes"](kind)))) {
|
|
3115
3157
|
((requirements)["math"] = true);
|
|
3116
3158
|
}
|
|
3117
3159
|
if ((kind === "map-binding-pattern")) {
|
|
@@ -3120,7 +3162,7 @@ function collect_runtime_requirements(node, requirements, suppress_literal) {
|
|
|
3120
3162
|
if (((!__eliscript_truthy(suppress_literal)) && ((kind === "persistent-list-literal") || (kind === "persistent-vector-literal") || (kind === "persistent-map-literal") || (kind === "persistent-set-literal") || (kind === "persistent-queue-literal")))) {
|
|
3121
3163
|
((requirements)["literal"] = true);
|
|
3122
3164
|
} else {
|
|
3123
|
-
if (__eliscript_truthy(((
|
|
3165
|
+
if (__eliscript_truthy(((__eliscript_value_299) => (__eliscript_truthy(__eliscript_value_299) ? ((__eliscript_value_300) => (__eliscript_truthy(__eliscript_value_300) ? quoted_uses_literal_runtime_p(value) : __eliscript_value_300))((kind === "quoted-literal")) : __eliscript_value_299))((!__eliscript_truthy(suppress_literal))))) {
|
|
3124
3166
|
((requirements)["literal"] = true);
|
|
3125
3167
|
} else {
|
|
3126
3168
|
if (((!__eliscript_truthy(suppress_literal)) && (kind === "literal") && (literal_kind(node) === "keyword"))) {
|
|
@@ -3130,7 +3172,7 @@ function collect_runtime_requirements(node, requirements, suppress_literal) {
|
|
|
3130
3172
|
if ((value === "imul32")) {
|
|
3131
3173
|
((requirements)["imul"] = true);
|
|
3132
3174
|
}
|
|
3133
|
-
if (__eliscript_truthy(((
|
|
3175
|
+
if (__eliscript_truthy(((__eliscript_value_301) => (__eliscript_truthy(__eliscript_value_301) ? (((__eliscript_value_302, __eliscript_value_303) => (__eliscript_value_302 !== __eliscript_value_303))(value, "*") || __eliscript_numeric_relation(">", ((nodes) ?? []).length, 1)) : __eliscript_value_301))(numeric_coercion_intrinsic_p(value)))) {
|
|
3134
3176
|
((requirements)["numericCoercion"] = true);
|
|
3135
3177
|
}
|
|
3136
3178
|
if ((value === "string-to-number")) {
|
|
@@ -3163,7 +3205,7 @@ function collect_runtime_requirements(node, requirements, suppress_literal) {
|
|
|
3163
3205
|
}
|
|
3164
3206
|
while (__eliscript_numeric_relation("<", index, (nodes)["length"])) {
|
|
3165
3207
|
((child = ((((nodes) ?? [])[index]) ?? null)));
|
|
3166
|
-
collect_runtime_requirements(child, requirements, ((
|
|
3208
|
+
collect_runtime_requirements(child, requirements, ((__eliscript_value_304) => (__eliscript_truthy(__eliscript_value_304) ? __eliscript_value_304 : static_literal_key_p(child, index, static_key_index)))(suppress_literal));
|
|
3167
3209
|
((index = (index + 1)));
|
|
3168
3210
|
}
|
|
3169
3211
|
}
|
|
@@ -3172,9 +3214,9 @@ function collect_runtime_requirements(node, requirements, suppress_literal) {
|
|
|
3172
3214
|
}
|
|
3173
3215
|
function runtime_requirements(program) {
|
|
3174
3216
|
{
|
|
3175
|
-
const
|
|
3217
|
+
const __eliscript_value_305 = ({"math": false, "numericCoercion": false, "imul": false, "arrayText": false, "numberConversion": false, "hostIdentityToken": false, "literal": false, "collection": false, "binding": false, "list": false, "value": false});
|
|
3176
3218
|
{
|
|
3177
|
-
let requirements =
|
|
3219
|
+
let requirements = __eliscript_value_305;
|
|
3178
3220
|
(program_body(program))["forEach"](((node) => {
|
|
3179
3221
|
return collect_runtime_requirements(node, requirements, false);
|
|
3180
3222
|
}));
|
|
@@ -3183,7 +3225,7 @@ function runtime_requirements(program) {
|
|
|
3183
3225
|
}
|
|
3184
3226
|
}
|
|
3185
3227
|
function collect_portable_metadata(node, portable, exported) {
|
|
3186
|
-
if (__eliscript_truthy(((
|
|
3228
|
+
if (__eliscript_truthy(((__eliscript_value_306) => (__eliscript_truthy(__eliscript_value_306) ? ir_property(node, "portable") : __eliscript_value_306))((ir_kind(node) === "function-declaration")))) {
|
|
3187
3229
|
(portable)["push"](node);
|
|
3188
3230
|
}
|
|
3189
3231
|
if ((ir_kind(node) === "export-declaration")) {
|
|
@@ -3197,11 +3239,11 @@ function collect_portable_metadata(node, portable, exported) {
|
|
|
3197
3239
|
}
|
|
3198
3240
|
function emit_portable_manifest(program) {
|
|
3199
3241
|
{
|
|
3200
|
-
const
|
|
3201
|
-
const
|
|
3242
|
+
const __eliscript_value_307 = [];
|
|
3243
|
+
const __eliscript_value_308 = [];
|
|
3202
3244
|
{
|
|
3203
|
-
let portable =
|
|
3204
|
-
let exported =
|
|
3245
|
+
let portable = __eliscript_value_307;
|
|
3246
|
+
let exported = __eliscript_value_308;
|
|
3205
3247
|
(program_body(program))["forEach"](((node) => {
|
|
3206
3248
|
return collect_portable_metadata(node, portable, exported);
|
|
3207
3249
|
}));
|
|
@@ -3209,11 +3251,11 @@ function emit_portable_manifest(program) {
|
|
|
3209
3251
|
return text_fragment("");
|
|
3210
3252
|
} else {
|
|
3211
3253
|
{
|
|
3212
|
-
const
|
|
3254
|
+
const __eliscript_value_309 = (portable)["filter"](((node) => {
|
|
3213
3255
|
return (!__eliscript_truthy((exported)["includes"](ir_value(node))));
|
|
3214
3256
|
}));
|
|
3215
3257
|
{
|
|
3216
|
-
let implicit =
|
|
3258
|
+
let implicit = __eliscript_value_309;
|
|
3217
3259
|
return combine([(__eliscript_numeric_relation(">", (implicit)["length"], 0) ? combine(["\n\nexport {", join_fragments((implicit)["map"](((node) => {
|
|
3218
3260
|
return binding_name(ir_value(node));
|
|
3219
3261
|
})), ", "), "};"]) : ""), "\nexport const __eliscript_portable__ = Object.freeze(Object.fromEntries([", join_fragments((portable)["map"](((node) => {
|
|
@@ -3225,71 +3267,70 @@ function emit_portable_manifest(program) {
|
|
|
3225
3267
|
}
|
|
3226
3268
|
}
|
|
3227
3269
|
}
|
|
3228
|
-
function node_names_global_root_p(node) {
|
|
3229
|
-
return ((__eliscript_value_292) => (__eliscript_truthy(__eliscript_value_292) ? __eliscript_value_292 : (children(node))["some"](node_names_global_root_p)))(((ir_value(node) === "globalThis") && (!(ir_kind(node) === "literal")) && (!(ir_kind(node) === "raw-javascript"))));
|
|
3230
|
-
}
|
|
3231
|
-
function number_conversion_prologue(program) {
|
|
3232
|
-
if (__eliscript_truthy((program_body(program))["some"](node_names_global_root_p))) {
|
|
3233
|
-
return (String((__eliscript_tdz_read_7())) + String((__eliscript_tdz_read_8())));
|
|
3234
|
-
} else {
|
|
3235
|
-
return (__eliscript_tdz_read_9());
|
|
3236
|
-
}
|
|
3237
|
-
}
|
|
3238
|
-
function imul_prologue(program) {
|
|
3239
|
-
return (String((__eliscript_truthy((program_body(program))["some"](node_names_global_root_p)) ? (__eliscript_tdz_read_12()) : (__eliscript_tdz_read_11()))) + String((__eliscript_tdz_read_13())));
|
|
3240
|
-
}
|
|
3241
3270
|
function emit_module_artifact_in_profile(program) {
|
|
3242
|
-
{
|
|
3243
|
-
|
|
3271
|
+
if (__eliscript_truthy(prelude_capsule_p(program))) {
|
|
3272
|
+
return text_fragment((__eliscript_tdz_read_16()));
|
|
3273
|
+
} else {
|
|
3244
3274
|
{
|
|
3245
|
-
|
|
3246
|
-
|
|
3247
|
-
|
|
3248
|
-
|
|
3249
|
-
|
|
3250
|
-
|
|
3251
|
-
|
|
3252
|
-
|
|
3253
|
-
|
|
3275
|
+
const __eliscript_value_310 = (__eliscript_tdz_read_26());
|
|
3276
|
+
{
|
|
3277
|
+
let previous = __eliscript_value_310;
|
|
3278
|
+
(__eliscript_tdz_write_26(tdz_prepare(program)));
|
|
3279
|
+
return (() => {
|
|
3280
|
+
try {
|
|
3281
|
+
return emit_module_artifact_in_profile_ready(program);
|
|
3282
|
+
} finally {
|
|
3283
|
+
(__eliscript_tdz_write_26(previous));
|
|
3284
|
+
}
|
|
3285
|
+
})();
|
|
3286
|
+
}
|
|
3254
3287
|
}
|
|
3255
3288
|
}
|
|
3256
3289
|
}
|
|
3257
|
-
function
|
|
3290
|
+
function runtime_capsule_p(program, entries) {
|
|
3258
3291
|
{
|
|
3259
3292
|
let filename = program_filename(program);
|
|
3260
3293
|
let body = program_body(program);
|
|
3261
3294
|
let module = ((((body) ?? []).length === 1) ? (body)[0] : null);
|
|
3262
|
-
return ((
|
|
3263
|
-
return ((
|
|
3264
|
-
})) :
|
|
3295
|
+
return ((__eliscript_value_311) => (__eliscript_truthy(__eliscript_value_311) ? ((__eliscript_value_312) => (__eliscript_truthy(__eliscript_value_312) ? ((__eliscript_value_313) => (__eliscript_truthy(__eliscript_value_313) ? (entries)["some"](((entry) => {
|
|
3296
|
+
return ((__eliscript_value_314) => (__eliscript_truthy(__eliscript_value_314) ? ((__eliscript_value_315) => (__eliscript_truthy(__eliscript_value_315) ? __eliscript_value_315 : ((__eliscript_value_316) => (__eliscript_truthy(__eliscript_value_316) ? (filename)["endsWith"](("/" + (entry)[0])) : __eliscript_value_316))((filename)["startsWith"]("/"))))((filename === (entry)[0])) : __eliscript_value_314))((ir_value(module) === (entry)[1]));
|
|
3297
|
+
})) : __eliscript_value_313))((((__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; } })(filename) === "string")) : __eliscript_value_312))((ir_kind(module) === "module-declaration")) : __eliscript_value_311))(module);
|
|
3265
3298
|
}
|
|
3266
3299
|
}
|
|
3300
|
+
function unicode_bootstrap_capsule_p(program) {
|
|
3301
|
+
return runtime_capsule_p(program, [["runtime/unicode-case.eli", "eliscript.runtime.unicode-case"], ["runtime/unicode-case-data.eli", "eliscript.runtime.unicode-case-data"]]);
|
|
3302
|
+
}
|
|
3303
|
+
function prelude_capsule_p(program) {
|
|
3304
|
+
return ((__eliscript_value_317) => (__eliscript_truthy(__eliscript_value_317) ? (((children((program_body(program))[0])) ?? []).length === 0) : __eliscript_value_317))(runtime_capsule_p(program, [["runtime/prelude.eli", "eliscript.runtime.prelude"]]));
|
|
3305
|
+
}
|
|
3267
3306
|
function emit_module_artifact_in_profile_ready(program) {
|
|
3268
|
-
(
|
|
3269
|
-
(
|
|
3307
|
+
(__eliscript_tdz_write_23(0));
|
|
3308
|
+
(__eliscript_tdz_write_24(new (globalThis.Map)()));
|
|
3270
3309
|
{
|
|
3271
|
-
const
|
|
3272
|
-
const
|
|
3310
|
+
const __eliscript_value_318 = runtime_requirements(program);
|
|
3311
|
+
const __eliscript_value_319 = join_fragments((program_body(program))["map"](((node) => {
|
|
3273
3312
|
return emit_top_level(node);
|
|
3274
3313
|
})), "\n\n");
|
|
3275
3314
|
{
|
|
3276
|
-
let requirements =
|
|
3277
|
-
let body =
|
|
3278
|
-
return combine(["// Generated by Eliscript. Do not edit.\n", tdz_prologue(), (__eliscript_truthy(unicode_bootstrap_capsule_p(program)) ? "" : "import \"eliscript/runtime/unicode-case.mjs\";\n"), (__eliscript_truthy((requirements)["math"]) ? "import \"eliscript/runtime/math.mjs\";\n" : ""), (
|
|
3315
|
+
let requirements = __eliscript_value_318;
|
|
3316
|
+
let body = __eliscript_value_319;
|
|
3317
|
+
return combine(["// Generated by Eliscript. Do not edit.\n", tdz_prologue(), (__eliscript_truthy(unicode_bootstrap_capsule_p(program)) ? "" : "import \"eliscript/runtime/unicode-case.mjs\";\n"), (__eliscript_truthy((requirements)["math"]) ? "import \"eliscript/runtime/math.mjs\";\n" : ""), ((numeric_coercion) => {
|
|
3318
|
+
return prelude_import((requirements)["arrayText"], ((__eliscript_value_321) => (__eliscript_truthy(__eliscript_value_321) ? __eliscript_value_321 : numeric_coercion))((requirements)["numberConversion"]), numeric_coercion, ((__eliscript_value_322) => (__eliscript_truthy(__eliscript_value_322) ? (requirements)["imul"] : __eliscript_value_322))((!__eliscript_truthy((__eliscript_tdz_read_17())))));
|
|
3319
|
+
})(((__eliscript_value_320) => (__eliscript_truthy(__eliscript_value_320) ? (requirements)["numericCoercion"] : __eliscript_value_320))((!__eliscript_truthy((__eliscript_tdz_read_17()))))), (__eliscript_truthy((requirements)["literal"]) ? (__eliscript_tdz_read_1()) : ""), (__eliscript_truthy((requirements)["collection"]) ? (__eliscript_tdz_read_2()) : ""), (__eliscript_truthy((requirements)["binding"]) ? (__eliscript_tdz_read_5()) : ""), (__eliscript_truthy((requirements)["list"]) ? (__eliscript_tdz_read_3()) : ""), (__eliscript_truthy((requirements)["value"]) ? (__eliscript_tdz_read_4()) : ""), "const __eliscript_truthy = (value) => value !== false && value != null;\n", (__eliscript_truthy((requirements)["hostIdentityToken"]) ? (__eliscript_tdz_read_18()) : ""), "\n", body, emit_portable_manifest(program), "\n"]);
|
|
3279
3320
|
}
|
|
3280
3321
|
}
|
|
3281
3322
|
}
|
|
3282
3323
|
function emit_module_artifact(program) {
|
|
3283
3324
|
{
|
|
3284
|
-
const
|
|
3325
|
+
const __eliscript_value_323 = (__eliscript_tdz_read_17());
|
|
3285
3326
|
{
|
|
3286
|
-
let previous =
|
|
3287
|
-
(
|
|
3327
|
+
let previous = __eliscript_value_323;
|
|
3328
|
+
(__eliscript_tdz_write_17(false));
|
|
3288
3329
|
return (() => {
|
|
3289
3330
|
try {
|
|
3290
3331
|
return emit_module_artifact_in_profile(program);
|
|
3291
3332
|
} finally {
|
|
3292
|
-
(
|
|
3333
|
+
(__eliscript_tdz_write_17(previous));
|
|
3293
3334
|
}
|
|
3294
3335
|
})();
|
|
3295
3336
|
}
|
|
@@ -3297,10 +3338,10 @@ function emit_module_artifact(program) {
|
|
|
3297
3338
|
}
|
|
3298
3339
|
function emit_module_function_sources(program) {
|
|
3299
3340
|
{
|
|
3300
|
-
const
|
|
3341
|
+
const __eliscript_value_324 = (__eliscript_tdz_read_21());
|
|
3301
3342
|
{
|
|
3302
|
-
let previous =
|
|
3303
|
-
(
|
|
3343
|
+
let previous = __eliscript_value_324;
|
|
3344
|
+
(__eliscript_tdz_write_21(true));
|
|
3304
3345
|
return (() => {
|
|
3305
3346
|
try {
|
|
3306
3347
|
{
|
|
@@ -3311,7 +3352,7 @@ function emit_module_function_sources(program) {
|
|
|
3311
3352
|
}))});
|
|
3312
3353
|
}
|
|
3313
3354
|
} finally {
|
|
3314
|
-
(
|
|
3355
|
+
(__eliscript_tdz_write_21(previous));
|
|
3315
3356
|
}
|
|
3316
3357
|
})();
|
|
3317
3358
|
}
|
|
@@ -3319,15 +3360,15 @@ function emit_module_function_sources(program) {
|
|
|
3319
3360
|
}
|
|
3320
3361
|
function emit_module_numeric(program) {
|
|
3321
3362
|
{
|
|
3322
|
-
const
|
|
3363
|
+
const __eliscript_value_325 = (__eliscript_tdz_read_17());
|
|
3323
3364
|
{
|
|
3324
|
-
let previous =
|
|
3325
|
-
(
|
|
3365
|
+
let previous = __eliscript_value_325;
|
|
3366
|
+
(__eliscript_tdz_write_17(true));
|
|
3326
3367
|
return (() => {
|
|
3327
3368
|
try {
|
|
3328
3369
|
return (emit_module_artifact_in_profile(program))["text"];
|
|
3329
3370
|
} finally {
|
|
3330
|
-
(
|
|
3371
|
+
(__eliscript_tdz_write_17(previous));
|
|
3331
3372
|
}
|
|
3332
3373
|
})();
|
|
3333
3374
|
}
|
|
@@ -3340,7 +3381,7 @@ function emit_module_with_source_map(program, source, generated_name, source_nam
|
|
|
3340
3381
|
{
|
|
3341
3382
|
let artifact = emit_module_artifact(program);
|
|
3342
3383
|
let javascript = (artifact)["text"];
|
|
3343
|
-
let resolved_source_name = ((
|
|
3384
|
+
let resolved_source_name = ((__eliscript_value_326) => (__eliscript_truthy(__eliscript_value_326) ? __eliscript_value_326 : ((__eliscript_value_327) => (__eliscript_truthy(__eliscript_value_327) ? __eliscript_value_327 : "<string>"))(program_filename(program))))(source_name);
|
|
3344
3385
|
return ({"javascript": javascript, "sourceMap": create_source_map(javascript, (artifact)["marks"], source, resolved_source_name, generated_name)});
|
|
3345
3386
|
}
|
|
3346
3387
|
}
|