aboutsummaryrefslogtreecommitdiff
path: root/src/compiler/base.zc
diff options
context:
space:
mode:
authorGravatar zinc <zinc@downsta.ir> 2026-10-15 14:32:10 +0330
committerGravatar zinc <zinc@downsta.ir> 2026-10-15 14:32:10 +0330
commit253ac862c696d73fb17c14a847270b6e08aa8769 (patch)
tree0206220c056ad9559d6924dbd2c8428b54b326cf /src/compiler/base.zc
parentactors: micro workers map a copy-on-write snapshot too; inherited input is on... (diff)
hold blocks: top-level hold { shared let ...; fn ... } monitors; shared values kept by the host and copied in/out at the outermost call, reentrant per-block locks in declaration order (core, micro)
Diffstat (limited to 'src/compiler/base.zc')
-rw-r--r--src/compiler/base.zc6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/compiler/base.zc b/src/compiler/base.zc
index 7e4b5bc..bd27e28 100644
--- a/src/compiler/base.zc
+++ b/src/compiler/base.zc
@@ -323,6 +323,12 @@ int s_ld8, s_st8, s_ld16, s_st16, s_ld32, s_st32;
// ---- o3 region state ----
// each promoted slot maps to a register; pending regions use 67-word records and a descriptor buffer.
+// hold blocks: hold_cur is the rank of the block being compiled (0 outside one), fhold the
+// rank of the function being compiled, hold_desc the word that will point at the block's
+// table of shared variables, hold_count the blocks so far. a shared variable's symbol has
+// F_SHARED and its block's rank above it in sflag.
+const int F_SHARED = 131072, F_SHARED_RANK = 262144;
+int hold_cur, fhold, hold_count, hold_desc, hold_nshared; word[128] hold_tab;
int o3on, o3nxt, o3one; word[32] o3sl; word[32] o3rg; int no3sl; word[O3_REGIONS * 67] o3pend_initial; word o3pend = o3pend_initial; int o3pendcap = O3_REGIONS, no3pend; word[80] o3dsc; int o3fs, o3na, o3fn0;
// o3free holds registers released by closed scopes; o3cache holds the items pointer and length slots for fixed arrays.
word[8] o3free; int no3free, o3nreg; word[NL] o3cache_initial; word o3cache = o3cache_initial; int argloc, s_hitems, s_hlen, s_fatten;