w6c+w6c_ww: struct-lit store into indexed/deref/field place fills via resolver (#20)
A struct-LITERAL rhs aimed at an N_INDEX element (a[i] = pt{...},
(*ts)[i].caps[k] = capture{...}), an N_UN deref place (*p = pt{...}),
or an indexed-base FIELD place (a[i].f = pt{...}, reviewer-20 sibling)
fell to a scalar store tail in BOTH stages: cgexpr on a struct
literal emits nothing (AX=0) and one MOVQ zeroed the place's first
word — every field silently dropped, a str-leading element's
content.ptr nulled (downstream SEGFAULT). Byte-identically wrong, so
every byte-id gate was blind; runtime pins added.
Fix: divert struct-lit-rhs INDEX/UN-STAR/DOT-over-INDEX places past
the legacy arms and widen the F6 assign-resolver gate
(N_DOT -> N_DOT|N_INDEX|N_UN); the existing C1.25 aggregate arm
materialises the literal into a fresh per-use @placescr slot and
word-copies to the cgplaceaddr-resolved address. No new path;
@placescr alloc site stays single per stage. Rider (task #32): an
array-LITERAL rhs at assignment — unwired for EVERY place kind, same
silent zero-word tail — now dies loud at one choke-point until the
fill lands; build-fail rows pin it.
Gates regex fold-5a (run_thread groupstart capture store,
regex.ha:643-651). Residual adjacent gaps (deref ident-rhs truncation,
>24B ident reassign cs!=ww, struct compound acceptance, value-global
DATAW, tuple-lit deref truncation, CALL-rhs RAX-only store) probed
pre-existing and filed as tasks #31 A-G / #32.
This commit is contained in:
12
Makefile
12
Makefile
@@ -396,6 +396,7 @@ TESTS = $(BIN)/test_smoke $(BIN)/test_lex $(BIN)/test_parse $(BIN)/test_check \
|
||||
$(BIN)/test_delete_range \
|
||||
$(BIN)/test_insert_elem \
|
||||
$(BIN)/test_arrlit_overlong \
|
||||
$(BIN)/test_idx_structlit_store \
|
||||
$(BIN)/test_placeaddr_store \
|
||||
$(BIN)/test_tryprop_multisuccess \
|
||||
$(BIN)/test_append_place \
|
||||
@@ -1073,6 +1074,17 @@ $(BIN)/test_placeaddr_store: test/wcc/805_placeaddr_store.c \
|
||||
$(LIB)/libwwrt.a | $(BIN)
|
||||
$(CC) $(CFLAGS) -o $@ $<
|
||||
|
||||
# Task #20: struct-LITERAL store into an INDEXED element (`a[i] =
|
||||
# pt{...}`, `(*ts)[i].caps[k] = capture{...}`) and a DEREF place
|
||||
# (`*p = pt{...}`) — pre-fix a byte-identical SILENT no-op in both
|
||||
# stages (gate-blind; the regex fold-5a groupstart capture store).
|
||||
# Runtime readback rows + asm byte-id per row on both drivers.
|
||||
$(BIN)/test_idx_structlit_store: test/wcc/809_idx_structlit_store.c \
|
||||
$(BIN)/ww $(BIN)/w6c $(BIN)/w6c_ww $(BIN)/w6a $(BIN)/w6l \
|
||||
$(BIN)/ww_ww \
|
||||
$(LIB)/libwwrt.a | $(BIN)
|
||||
$(CC) $(CFLAGS) -o $@ $<
|
||||
|
||||
# F8+F9 (tasks #5/#12, regex fold-2b): `?` interim single-success gate
|
||||
# (|success| > 1 loud-rejected on BOTH stages until task #14's
|
||||
# subset-union typing) + direct `f()? is T` / `match (f()?)` reject
|
||||
|
||||
Reference in New Issue
Block a user