diff options
| author | 2026-10-15 22:28:06 +0330 | |
|---|---|---|
| committer | 2026-10-15 22:28:06 +0330 | |
| commit | 5a4dc62a79af6135c7050e81a82dbfdfb0a7d4e0 (patch) | |
| tree | 805283b2d30b2cf0f53af42e5a3fc119af5e839f /src/compiler/base.zc | |
| parent | definite assignment: reading a local before it is initialized is a compile er... (diff) | |
uninit: track aggregate fills per part, sticky computed-index fills, &a[k] and method calls set the aggregate; fix test/example hits; docs
Diffstat (limited to 'src/compiler/base.zc')
| -rw-r--r-- | src/compiler/base.zc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/compiler/base.zc b/src/compiler/base.zc index 03a575c..8eb107e 100644 --- a/src/compiler/base.zc +++ b/src/compiler/base.zc @@ -254,7 +254,7 @@ int fn_return_type; // a consistent return type inferred from the function body // effects come from the real compiler's uses, stores, returns and call edges; unknown bodies stay conservative. const int EF_READ = 1, EF_WRITE = 2, EF_RETAIN = 4, EF_CONSUME = 8, EF_UNKNOWN = 16, EF_ALIAS = 32, EF_IDENTITY = 64; word effect_symbols, effect_edges, effect_requirements, effect_current; int effect_floor, effect_argument_base; -word local_origin, local_origin_mask, local_cell, local_captured, local_ended, local_end_info, local_shadow, xshadow, effect_shadows, linited; int argowner_mask; word effect_value, argorigin_mask; int capture_enabled; word[1] capture_dummy = {}; +word local_origin, local_origin_mask, local_cell, local_captured, local_ended, local_end_info, local_shadow, xshadow, effect_shadows, linited, lfill; int argowner_mask; word effect_value, argorigin_mask; int capture_enabled; word[1] capture_dummy = {}; // drops (docs/design/destructors.md): the code position just past a drop form (a fresh // value with a drop still on the stack there), the type `this` gets in the next closure, // a local whose drop is set, a mailbox send whose arguments are checked, and o3 block depth. @@ -264,6 +264,7 @@ int argorigin = -1, argtemporary, argowner = -1; word argowner_fact; int stubgen; // 1 while an extern's generated stub is compiled: the stub gets no hints word xprojection; int af_mutation_tick; int xbor = -1; // local a pointer value is borrowed from, or -1 +int xpart = -1, xparts = 0; // an lvalue inside an aggregate local: which top-level part (-1 unknown) of how many int mdbg, mdbg_flags; // memdebug: compile checks in, and the flags start() turns on int lsp, loopbase, ctxsp, snaptop; // defer: the statements registered and not yet run, DFR_W words each (the block @@ -786,6 +787,7 @@ int reserve_locals(int need) { if (local_end_info) local_end_info = chk_resize(local_end_info, nloc, cap); if (local_shadow) local_shadow = chk_resize(local_shadow, nloc, cap); if (linited) linited = chk_resize(linited, nloc, cap); + if (lfill) lfill = chk_resize(lfill, nloc, cap); lafact = chk_resize(lafact, nloc, cap); laaddr = chk_resize(laaddr, nloc, cap); lprev = chk_resize(lprev, nloc, cap); if (lvkind) { lvkind = chk_resize(lvkind, nloc, cap); lvvalue = chk_resize(lvvalue, nloc, cap); lvescaped = chk_resize(lvescaped, nloc, cap); } o3cache = chk_resize(o3cache, nloc, cap); |
