wcc/ww: paramfieldsize sizes a tagged-union destructure binding

A tagged for-range destructure binding took the 8-byte default
(paramfieldsize had no tagged arm), skipping the full-extent copy —
the wwstage twin of the just-closed cstage destructure family. Read
the stamped tinfo size through the type table (twin of the slice
arm; cstage reads tp->type->size). Task #53.
This commit is contained in:
2026-06-13 00:07:36 +09:00
parent 2a2ac49c64
commit 347f6c42c8
5 changed files with 244 additions and 0 deletions

View File

@@ -252,6 +252,7 @@ TESTS = $(BIN)/test_smoke $(BIN)/test_lex $(BIN)/test_parse $(BIN)/test_check \
$(BIN)/test_idxarg_run \
$(BIN)/test_chainidx_run \
$(BIN)/test_tupfieldsize_run \
$(BIN)/test_tagtupfieldsize_run \
$(BIN)/test_gunsigned_run \
$(BIN)/test_taggedidx_run \
$(BIN)/test_fnptrcollide_run \
@@ -699,6 +700,17 @@ $(BIN)/test_tupfieldsize_run: test/wcc/989_tupfieldsize_run.c \
$(LIB)/libwwrt.a | $(BIN)
$(CC) $(CFLAGS) -o $@ $<
# 989_tagtupfieldsize_run (#53, sibling of #43): a for-range destructure over
# an array of tuples whose field is a tagged union must stride by the tuple's
# true size and copy the field's full box. Builds+runs on BOTH driver twins
# (rule-10), the tagged-field row pinned cs==ww at the absolute value.
$(BIN)/test_tagtupfieldsize_run: test/wcc/989_tagtupfieldsize_run.c \
$(BIN)/ww $(BIN)/ww_ww \
$(BIN)/w6c $(BIN)/w6a $(BIN)/w6l \
$(BIN)/w6c_ww $(BIN)/w6a_ww $(BIN)/w6l_ww \
$(LIB)/libwwrt.a | $(BIN)
$(CC) $(CFLAGS) -o $@ $<
# 989_gunsigned_run (F7-c5, #25): a module-global unsigned ident on the
# divide/shift/relational path must pick the unsigned opcode. Builds+runs on
# BOTH driver twins (rule-10). CLASS-M — see the test header.