aboutsummaryrefslogtreecommitdiff
path: root/src/compiler/base.zc
diff options
context:
space:
mode:
authorGravatar zinc <zinc@downsta.ir> 2026-10-14 18:22:04 +0330
committerGravatar zinc <zinc@downsta.ir> 2026-10-14 20:03:38 +0330
commit459b7661aaa0d65d01be064bd4b9976c4f045a5c (patch)
treeeccb0738631fc52e5116fb238c2f7f961784ff36 /src/compiler/base.zc
parentzy: nonzero exit on compile errors (diff)
bounds: body scan, loop-entry hoisting, pointer proofs from requested size, --explain-checks v1 (non-o3 code)
Diffstat (limited to 'src/compiler/base.zc')
-rw-r--r--src/compiler/base.zc9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/compiler/base.zc b/src/compiler/base.zc
index c6abad7..f2bfeca 100644
--- a/src/compiler/base.zc
+++ b/src/compiler/base.zc
@@ -325,6 +325,15 @@ word[8] o3free; int no3free, o3nreg; word[NL] o3cache_initial; word o3cache = o3
// operator names used by numeric type checks.
word[12] numops; int nnumops, s_fixed, s_dlen, s_dcap, s_dnew, s_dat, s_dpush, s_dpop, s_dresize, xconst, xcval;
int xlenloc, arrloc, fortest, forstep, ft_iv, ft_bd, ft_ir, ft_ck, ft_nops, fs_ok, xstamp;
+// what each live loop's body may change, and its hoisted checks (one 56-word
+// record per loop depth, the first 64 depths; see body_scan and hoist_guard)
+const int LPI_N = 64, LPI_W = 60;
+word lpinfo; // allocated at the first loop
+// --explain-checks: on, the unit's source (to turn offsets into columns), its
+// file name and the function being compiled
+int xc_on; word xc_src; char* xc_fn = "<eval>"; char* xc_file = "<eval>";
+// names body_scan looks for
+int sx_push, sx_pop, sx_resize, sx_defer, sx_asm, sx_quote, sx_new, sx_int, sx_char, sx_bool, sx_float, sx_if, sx_else, sx_while, sx_for, sx_switch, sx_do;
// local lower bound / len(array); one proof record per live loop
int nfact, factcap = RANGE_FACTS; word[RANGE_FACTS] floc_initial, flo_initial, flen_initial; word floc = floc_initial, flo = flo_initial, flen = flen_initial;
int s_len_s, s_at_s, s_slice_s, s_cat_s, s_eq_s, s_lt_s, s_le_s, s_put_bs, s_put_s, s_n_to_s, s_new_s;