test: regression lock for inferred-struct-arg push (#16 lock)
Project #16 (inferred-let struct-typed local pushed as call-arg: cstage 2-word vs wwstage 1-word) does not reproduce on master. A 16-shape impl sweep confirmed byte-identity for every reasonable trigger; the mechanism that closed it is incidental, distributed across four commits:ea1579aexprtype resolves SK_USE module-qual N_DOT call results7198937asserttyped bail armed (any nil-typed VALUE node fatal)39f9267DOT-recv, structlit-fill, bare-let zero-init via structabisize66a91c8let-IDENT memcpy, IDENT-assign recv, nested struct call-recv via structabisize Together they guarantee `checkletassign` writes a resolvable type-AST to `n.lhs` for every inferred let, `cglet` carries it onto the local's `lc.tnode`, and `pushargsrev`'s N_IDENT struct arm (cgenutil.ww:459) reaches `structparamsize > 0` so the 2-word push fires — byte-id with cstage's `args[i]->type` -> struct_arg_size path (cgen.c:427, :5452). This commit adds 761_inferred_struct_arg_push.c (6 table rows) to lock that symmetric behavior in. Rows cover: i64_i64_infer_direct canonical 16B u32_i64_decf_infer decf32-shape (ken-flagged ftos.ww:411) i64_i32_narrow_tail_infer #169 maxalign-8 tail-padded ABI i32_x3_maxalign4_infer maxalign 4, ABI 12B ident_rhs_chain_infer `let p = q;` two-step inference chain big_sret_infer_then_ptr_arg >24B sret receive via callsretsize Each row drives both stages, asserts cs==ww asm byte-id, and runs the binary asserting the exact exit code. A future regression of any one closing commit reds this gate at the matching shape; the citation map in the comment header points the bisector at the four commits to walk. Separate divergences surfaced during the sweep (filed independently, not bundled here): #173 tagged-return-try, #174 cast-inferred call, #175 arr[0] inferred, #176 nested-field let inferred, #177 aliased- struct-return cstage 1-word. make test: all 194 tests passed (exit 0).
This commit is contained in:
7
Makefile
7
Makefile
@@ -311,6 +311,7 @@ TESTS = $(BIN)/test_smoke $(BIN)/test_lex $(BIN)/test_parse $(BIN)/test_check \
|
||||
$(BIN)/test_cast_enum_movl \
|
||||
$(BIN)/test_check_enum_fold \
|
||||
$(BIN)/test_def_widen_const \
|
||||
$(BIN)/test_inferred_struct_arg_push \
|
||||
$(BIN)/test_use_promote_alias \
|
||||
$(BIN)/test_field_signed $(BIN)/test_frame_argcount \
|
||||
$(BIN)/test_selfhost $(BIN)/test_w6a_ww $(BIN)/test_w6l_ww \
|
||||
@@ -584,6 +585,12 @@ $(BIN)/test_def_widen_const: test/wcc/760_def_widen_const.c \
|
||||
$(LIB)/libwwrt.a | $(BIN)
|
||||
$(CC) $(CFLAGS) -o $@ $<
|
||||
|
||||
$(BIN)/test_inferred_struct_arg_push: test/wcc/761_inferred_struct_arg_push.c \
|
||||
$(BIN)/ww $(BIN)/w6c $(BIN)/w6a $(BIN)/w6l \
|
||||
$(BIN)/ww_ww $(BIN)/w6c_ww $(BIN)/w6a_ww $(BIN)/w6l_ww \
|
||||
$(LIB)/libwwrt.a | $(BIN)
|
||||
$(CC) $(CFLAGS) -o $@ $<
|
||||
|
||||
$(BIN)/test_arrlit_str_full: test/wcc/711_arrlit_str_full.c \
|
||||
$(BIN)/ww $(BIN)/w6c $(BIN)/w6a $(BIN)/w6l \
|
||||
$(BIN)/ww_ww $(BIN)/w6c_ww $(BIN)/w6a_ww $(BIN)/w6l_ww \
|
||||
|
||||
Reference in New Issue
Block a user