Commit Graph

1232 Commits

Author SHA1 Message Date
92d5f1cb56 test: port the ww-test sep observer to ww; retire 989_septest
septest_test.ww keeps all five rows (pass/fail run-exits, the
userman + badsig @test rejects, the collide_run user-fn-run coexist)
plus the full-sepwork .s/.wwi byte-id sweep and the -T synth
TEXT-main / CALL-test.run presence needles, both driver stages. The
pass/fail run-exit rows overlap package_test ownership but stay:
retiring them would drop audit-listed assertions from this gate. The
attest_* data fixtures remain in test/wcc/data (also consumed by the
911_attest_* carriers).
2026-08-08 14:13:50 +09:00
cd408195fa test: port the sep scratch-contract observer to ww; retire 989_sepscratch
sepscratch_test.ww pins the #59 build_one_sep scratch ownership on
both driver stages: build -o keeps <stem>.sepwork, `run` leaves no
/tmp/ww_run_<pid> root, and a foreign pre-existing .sepwork is
refused with exit exactly 1, sentinel intact. The C fork/execl pid
capture becomes `sh -c 'echo $$ ...; exec <drv> run ...'` -- exec
keeps the shell's pid and passes the full driver path as argv[0].
2026-08-08 14:13:50 +09:00
ad189c2ee2 test: port the sep archive/link observers to ww; retire 989_{separchive,sepcycle_dup}
seplink_test.ww carries the .a substrate legs (root-as-.o layout, .a
byte-id + 3x determinism, the #31 masked-dup PASS-3 reject with its
non-vacuity flip), the loud dependency-cycle reject with byte-equal
cs/ww stderr, and the w6l/w6l_ww bare-main duplicate-symbol reject
(achievable substring parity per the filed message divergence).
2026-08-08 14:13:50 +09:00
7c84c52db4 test: port the sep import/namespace observers to ww; retire 989_{coloimport,depmain,declns,slttypepref}
sepimport_test.ww re-hosts the #98 colo srcd-shadow `ww test` gate,
the #99 imported-dep bare-main mangle count, the #23/#30 modfn
coexist byte-id (incl. the cross-layout vbu order pin), and the
#58/#50 scopelookuptype mod-preference rows over the checked-in and
synthesized module trees. slttypepref's ww_ww-absent skip gate is
dropped: the Make target declares both drivers (mangle_test
precedent).
2026-08-08 14:13:50 +09:00
cd49966539 test: port the sep-layout observers to ww; retire 989_{sepbuild,seproot_export,sepstructdef,wwispread}
Birth test/sep/ (single-file ww observers on test/testenv, run by the
new SEP_WW_TARGETS pattern rule under test-compiler) with
sepbuild_test.ww: the build_one_sep real-chain gate incl. the
bodies==.wwi keystone recompile, the #69 root-without--I contract, the
#70 aggregate-def .wwi prototypes, and the #95 spread-marker
round-trip. Every carrier assertion has a successor row; the C
cleanup-accounting ledgers collapse into testenv.clean.
2026-08-08 14:13:50 +09:00
d127c95630 make: restore the dropped ffivariadic callee-archive rule 2026-08-08 14:12:58 +09:00
df453100d0 test: roster appends struct call rvalues; cursor idiom retired (#34) 2026-08-08 14:12:16 +09:00
50d70e74e4 w6c: append() accepts struct CALL rvalue elements (#34)
Evaluate the call pre-grow into a per-site scratch, receiving by the
N_LET matrix (sret / float / odd-tail / GP), then grow, slot, sized
ladder. Both stages, byte-identical. The two reject pins graduate to
16B GP accept rows; three new fixtures cover 24B GP, 3B/4B tails,
16B float, and 40B sret.
2026-08-08 14:10:55 +09:00
956246b3f0 test: migrate 700_e2e rows to corpus fixtures; retire the carrier
136 rows migrated, 0 already owned, 3 wwstage-failing rows held out.
2026-08-08 14:10:46 +09:00
ddb44405ea docs: coordinator concurrency + tree walk are landed driver work 2026-08-08 13:53:15 +09:00
7ad837ff9e lib: uncollide strconv test helper for package composition 2026-08-08 13:52:34 +09:00
d19845abd7 lib: canonicalize syntax tests to package syntax_test 2026-08-08 13:52:09 +09:00
dc93bcee76 test: retire owned observers 989_sepdotpath + 989_syntaxexport 2026-08-08 13:48:18 +09:00
51f8c615d8 lib: canonicalize regex whitebox test name 2026-08-08 13:48:18 +09:00
3ad10bcef1 test: enroll lib/regex in test-library; retire 989_regex_run 2026-08-08 13:47:55 +09:00
74c9243ca3 test: retire 911_attest_record; record-continue owned by test/package 2026-08-08 13:47:16 +09:00
15137054e2 wwtest: bounded package concurrency via exec start/poll 2026-08-08 13:43:55 +09:00
0f0fd36563 ww: recursive DIR/... package discovery for ww test 2026-08-08 13:35:34 +09:00
81e7f95548 test: port the asm-pattern observers to ww; byteid carrier partition empty
Four ww tests carry the last eight native byteid carriers' assertions:
asmwindow (753 convwrap beta/main/alpha order + window polarity, 754
slice stride + negative scale scan, 755 amp-dot-idx four rows, 758
first-CALL-line extraction + tab-framed disp literals, direct
w6c/w6c_ww never ww build), freenoop (930 byte-id strengthened to
per-stream compare + negative 'free' grep), structabi (946 param/ret
MOVSD windows with polarity tables and SEND/RECV agreement), mangle
(989_m1mangle needles + concat byte-id, glob order strengthened to
byte-lexicographic). Dead want/stage_mask row fields documented, not
invented into runtime legs; the w6c_ww-absent skip gates drop because
the Make target declares the tools.

BYTEID_WRAPPER_SOURCES, its bins, and test-native-byteid are deleted —
the native byte/artifact partition is EMPTY (11 -> 0 this session);
docs counts move to 123 carriers.
2026-08-08 04:41:42 +09:00
fa4b9a134b lib: migrate every test file to the canonical *_test.ww name
25 renames (git mv, content untouched). _test.ww is what the package
coordinator's test detection and the sep loader's canonical exclusion
key on; the old *test.ww spellings survived only through the
line-leading-@test compatibility scan. Consumers updated in place:
LIBRARY_TESTS, the libbyteid roster, the 901/974/975/976 carriers that
copy or invoke these files, and the check.c/check.ww + path/ftos
comments that cite them. Closes the open-driver-work migration bullet.
2026-08-08 04:29:31 +09:00
634f7a2b3f test: port the .wwi observers to ww; retire 989_m2wwi + 989_wwileaf
test/byteid/wwi_test.ww carries every assertion of both carriers: the
M2 producer gate (ascii/strings/getopt driver-combined positives with
byte-id + wwdump -a re-parse, the synth decl-kind/type-node sweep with
the #47 @symbol round-trip, the #48 types export-def gate, and the
negative private-nominal leak with both-stage identical reject
diagnostics), plus the #11 wwileaf decl-less-leaf rows (package-line
leaf, cross-stage .wwi byte-id, importer resolution + .s byte-id).
Byteid carriers 10 -> 8; docs counts move; the byteid ww target gains
the wwdump prereq its re-parse legs invoke.
2026-08-08 04:25:34 +09:00
cf80c603a8 test: port 989_lib_byteid to ww; birth test/testenv + test/byteid
test/testenv (package testenv) is the shared plumbing for ww-native
test drivers — subprocess launch with captured output, file IO, string
search, byte-sorted directory listing, scratch ownership — lifted from
the proven package_test.ww idiom; a utility, not a framework.

test/byteid/libbyteid_test.ww carries every assertion of the retired C
carrier: the 44-entry roster (fixtures + sentinel-guarded import probes
+ the zero-dep root-only build), both-stage sep builds with the
resolved-unit proof, per-package .s concat compare with the empty-concat
guard, the ID/DIVERGE/WWREJECT pin discipline, and the lib/ corpus
completeness scan (negative-verified against a planted un-enrolled
module). Concat order strengthened from shell-glob to explicit
byte-lexicographic. The roster fills by cursor-driven field writes
because append() rejects struct-call-result sources (#34).

Byteid carriers 11 -> 10; docs counts move; test-byteid runs the ww
test via the wwtest/ pattern with WW_TEST_REPO.
2026-08-08 04:22:04 +09:00
cccdd6e2c8 make: per-file lang/library test targets in -w workdirs
One phony target per test file so -jN parallelizes both suites, each
file building in its own persistent workdir so only changed packages
recompile. Tests always execute — the workdir caches builds, never
results. Lang tests keep their exact historical invocation (no -I);
library tests keep -I lib/ww. Warm -j4: test-library 19.0s -> 1.0s,
test-lang 19.8s -> 2.0s.
2026-08-08 04:10:52 +09:00
6148249927 make: test-incremental gate — -w reuse must equal a clean build
Cold populate, full-skip rerun, surgical staleness (one package's
artifacts deleted), and a 0-byte .o poison drill each build the w6a
graph through a persistent workdir and must be byte-identical to a
classic fresh-scratch build, on both driver stages, plus the
cross-stage clean compare. Wired into test-all; the inner-loop targets
stay untaxed.
2026-08-08 04:09:21 +09:00
9839778f3b make: derive precise tool prerequisites; scope tools to run targets
Per-binary source lists corrected against the real import closures
(strace of each cold sep build): every wwstage tool gains
lib/types/types.ww, wwdump_ww/w6c_ww gain lib/math/{floats,math}.ww and
drop the no-longer-imported lib/fmt/fmt.ww, ww_ww drops
lib/strconv/strconv.ww, and WWTEST_SRC gains the strconv split plus
math. Wrapper test binaries link only libwcc.a — the runtime tools they
exec move to the run targets that launch them, so a .ww edit no longer
relinks 111 carrier binaries. test-compiler-smoke declares the
w6a_ww/w6l_ww/ww_ww fleet its WW cell actually drives (latent
fresh-clone gap); test-package replaces the blanket all with its exact
tool set; test-lang/test-library name the cstage subset they invoke.
2026-08-08 04:08:13 +09:00
7bb31f8cb3 make: build driver-produced binaries in persistent -w workdirs
The five wwstage tools, wwtest, wwfixture, both exec-test binaries, and
the package-test binary move off the per-invocation mktemp workspace to
one persistent ww-build workdir per target under out/wwbuild/, publishing
into out/bin by one atomic mv. Package artifacts now survive across
rebuilds and reuse on exact content identity, so a toolchain-source
touch rebuilds in seconds instead of five from-scratch sep builds; the
per-target split keeps -jN recipe concurrency race-free. Rebuilt
binaries verified byte-identical to the mktemp-path builds for all ten
targets.
2026-08-08 03:54:29 +09:00
e06b871ab9 ww: add -w persistent workdir builds with content-identity reuse
A -w DIR workdir replaces the fresh .sepwork scratch with a caller-owned
persistent package-artifact tree. A package is reused only when its
freshly composed unit byte-equals the committed unit and byte copies of
the compiler/assembler recorded in the dir equal the live tools — pure
content identity, no mtimes, no hashes, every decision reproducible
with cmp against plain files. Recompiles stage at .new names and commit
by rename, unit strictly last, so an interrupted build forces a
recompile and can never leave a committed unit vouching for uncommitted
artifacts; .o/.a additionally reject zero size (ELF/ar are never
empty), while .s/.wwi accept legitimate empties (FFI-only rt). A mode
stamp pins the -T/-S shape and the artifact protocol revision. Classic
scratch keeps its exact acquire/refuse/cleanup contract; run rejects
-w; dir-mode test rejects -w; both driver stages implement identical
behavior and wording.
2026-08-08 03:51:45 +09:00
e1141330f2 test: retire 13 byteid carriers into the corpus blanket
Ten of the thirteen were already fully twinned — their runtime rows
migrated in earlier waves (r56_def_*, r79_*, r78_*, r926_*,
r989_m1union_*) and the carriers survived only for a cstage-vs-wwstage
byte-compare the blanket test-data-byteid comparator owns once the
source is a corpus fixture. The other three needed their remaining
inline sources added first: r756_* (4, alias-chain unwrap),
r844_bid_src (size(u64) untyped-int compare), r989_structframe_* (3,
struct-local frame layout). Every new fixture was verified both-stage:
compile exit 0 twice, .s byte-identical, runtime exit as pinned.

The five ww_ww-driver-leg carriers among them (785/786/789/790/
m1union) follow the 815/940/951 precedent: content identity owned by
their corpus twins, driver-leg identity owned by 989_lib_byteid's
sweep. Byte/artifact partition 24 -> 11; carriers 147 -> 134; corpus
pin 1495/2990; the stale 915 sweep figure in the docs corrected to
the true 1,157 non-error count.
2026-08-08 02:57:55 +09:00
67f39256f6 cgen: resolve chained-DOT fn-ptr field callees
fnptrcalleetfn's N_DOT arm required an N_IDENT base, so a.b.cb(...)
fell to the name registry with an empty module hint and emitted
CALL cb(SB) (undefined symbol; cstage calls the stamped ptr indirect).
dotbasestructinfo resolves the base chain through the struct registry
— each link a struct- or *struct-typed field — and the single-dot
path routes through the same resolver unchanged. Closes the last open
shape of the #59.8 name-keyed callee family. Fixture fnptrfield_chain;
corpus pin 1487/2974.
2026-08-08 02:48:05 +09:00
430c7e0546 check: compare variadic fn params at the declared element type
installparams normalizes a decl's `T...` param lhs to []T in place
(cstage instead sets the resolved tp->type and never mutates AST), so
typeeqast compared a decl-synthesized fn type's []i64 against a fn
TYPE expr's surface i64 and confidently rejected
`let f: fn(args: i64...) void = sum;` — cstage accepts and runs. The
normalization wrapper now carries an op marker and typeeqast peels
exactly it, so both sides compare at the declared element type without
admitting genuinely different element depths. Fixture fnptrlet_variadic;
corpus pin 1486/2972.
2026-08-08 02:47:08 +09:00
98a2e37ac0 docs: ratify the carrier endgame terminal classes 2026-08-08 02:38:57 +09:00
5abb1e6069 wwstage: port struct embedding; graduate #59.13
The last frontend-gap pin: wwstage had no Hare struct embedding
(struct { hash.hash, ... }), rejecting lib/crypto/sha256 at parse.

- parse.ww: the three member forms (named / anonymous struct / bare
  dotted-ident embed), consume-then-branch since this parser has no
  peek; embeds carry f.str == "" and the type in f.lhs.
- check.ww N_TSTRUCT flatten: promote the inner struct's flattened
  fields at base+src.offset (check.c:961-990); the embed is one
  nested-struct unit in the slot ladder; the resolved inner AST is
  planted on the TFIELD rhs for cgen.
- check.ww walkers: astoffset / exprtype N_DOT / #251 struct-lit
  field lookups descend embeds through shared helpers; the collision
  and non-struct-embed rejects live in validatestructfields (the
  once-per-decl diagnostic site).
- cgenutil.ww registerstruct: regfieldrun walks the AST against the
  flattened tfield cursor, descending embeds via the planted inner
  AST so promoted fieldinfo entries keep the inner field's own name
  and type node.
- wwi printers unchanged (both stages already emit nameless fields).

sha256_test compiles byte-identically end to end and its 6 tests
pass; 989_lib_byteid is now 44 id / 0 divergent / 0 wwreject.
Fixtures r5913_* (promoted rw, offset shift, anonymous embed,
two-level embed + promoted fn-ptr callee, three rejects); corpus pin
1485/2970.
2026-08-08 02:37:50 +09:00
6553d60e91 cgen: peel *fn field types for local struct-field callees
fnptrcalleetfn's N_DOT arm accepted only a bare N_TFN field tnode, so
a call through a field declared `cb: *fn(...)` missed, fell through to
the name registry, and emitted CALL cb(SB) — an undefined symbol
(loud at link; cstage calls the stamped ptr-to-fn indirectly). Same
TPTR peel the N_IDENT arm already had. Fixture fnptrfield_call covers
the by-value and via-pointer shapes; corpus pin 1478/2956.
2026-08-08 02:28:33 +09:00
939d0938e2 test: re-cite retired-mechanism comments in surviving carriers
The migrate-and-retire audit left the surviving carriers as the only
files still describing the retired combined.ww amalgamator as live:
m2wwi/m3sep headers claimed .wwi was dead code, four byteid carriers
carried dead cleanup of never-written .combined.ww intermediates, and
sepbuild's enumeration mirror plus lib_byteid's completeness scan
still skipped the retired artifact form (the same silent
accommodation just removed from both drivers — dropping it here
surfaced and flushed 39 stale untracked amalgamator outputs across
lib/, which the gates now reject loudly). Remaining mentions are
past-tense history or quoted diagnostics.
2026-08-08 01:34:05 +09:00
f6628b985e test: migrate 24 residual carriers into the fixture corpus
Audit-driven migrate-and-retire wave (one read-only auditor per
carrier batch, verdicts row-checked through the full corpus gate):
every retired carrier's assertions are now owned by declarative
fixtures or an existing owner. 238 new fixtures land (corpus 1,239 ->
1,477; cells 2,954), covering enum/str/slice/tagged array elements,
inferred-length arrays, global slice/str zero-init and literals,
global array/pointer field reads and stores, struct-literal slice
fields, struct returns, float arithmetic, size/int limits, sort and
log-vstream behavior, place-addressed stores, and append places.
Rejection rows STRENGTHEN the old nonzero-exit checks to required
diagnostic fragments; all byte-id claims fold into the blanket
test-data-byteid sweep (now 1,142 compared, 0 pinned-divergent).
Four carriers were fully redundant with existing fixtures/lang tests
(749, 722, 765, and 771's byteid rows) and retire without new rows.
Native carriers 171 -> 147 (residual 135 -> 111).
2026-08-08 01:29:15 +09:00
f11f1629d9 docs: dissolve PROJECT_PLAN.md; drop retired-mechanism citations
PROJECT_PLAN.md was a historical disclaimer wrapping five still-open
T1 driver items — those move to docs/test-system-v2.md (Open driver
work); the rest is dated 2026-08-05 design history, archived in git.
Also retired-mechanism cleanup: both drivers drop the *.combined.ww
enumeration skip (the amalgamator is gone; leftover debris now fails
loudly instead of being silently accommodated), the consumer-less
m4_combined_epoch.md5 pin is deleted, and the wwi.ww/ww.h/check.ww
comments that still described combined.ww as the live path are
re-cited to the sep reality.
2026-08-08 01:15:03 +09:00
3f7452814b cgen: resolve local fn-ptr callees for variadic arg prep
The wwstage variadic call classification was name-keyed: a fn-ptr
FIELD call whose local base shadowed the current module name
(lib/log's log.println(log, args...)) picked the module fn's
signature — nfixed off by one, the fixed arg boxed into the gather,
the spread emitted as zeros — and a no-collision fn-ptr callee missed
the registry entirely, leaking the raw N_SPREAD as a single $0 word
(SIGSEGV / exit 255 in 8 of 11 logtest tests on the wwstage leg).
fnptrcalleetfn resolves a local fn-ptr callee (bare local or struct
field) to its N_TFN once, shared by the CALL-target choice,
callee_variadic_param (with the []T wrap registry params get from
installparams), calleecvariadic, and the widening param lookup, so
target and arg prep can never disagree. Graduates the #59.8 logtest
pin — DATABYTEID_DIVERGED-era M_DIVERGE count is now zero.
2026-08-08 01:07:23 +09:00
c18005d833 check: stamp SK_TYPE value idents with the per-decl NAMED
A TYPE name used as a VALUE (an error-singleton `return too_long;`)
stamped the flattened BODY type, so structurally identical !void
singletons in one union were indistinguishable and flatvariantidxt
loud-rejected the ambiguity — the real cause of the lib/path wwstage
reject (the pinned #120/#29 global-slice-const blame was stale; that
family had drained). The N_IDENT arm resolves through a synthesized
TNAME (the #66 N_STRUCTLIT precedent); the module-qualified N_DOT twin
reads the sym's cached NAMED. Graduates the path M_WWREJECT pin (#142).
2026-08-08 01:00:03 +09:00
125f626697 check: type the N_BIN operand of as in the wwstage
An enum OR-fold under `as` ((m.A|m.B) as u32) was never typed:
scruttype resolves IDENT/DOT only, and the post-order restamp then
re-derived the folded member literals as untyped_int. The unstamped
operand missed cgtypeassert's #27b enum-reinterpret gate and lowered
as a phantom tagged assert — unconditional exit 1 at runtime on the
wwstage leg. checkisas now types an N_BIN lhs and the N_BIN restamp
preserves an existing enum stamp. Graduates the #59.9 stattest pin.
2026-08-08 00:59:02 +09:00
c421c2b20a cgen: key the str/slice arg recognizers off the checker stamp
The wwstage nodeisstr/nodeisslice recognizers were name-keyed for
every non-local shape: an indirect fn-pointer callee ((*f)() — the
errnotest #59.5 divergence, streq receiving a shifted register file)
and module-global let/const idents (path.sepstr — union-widen pushes
zero-filled len/cap) both fell to false while cstage keys off the
checker stamp unconditionally. Both recognizers now fall back to the
stamped n.type_; push and pop sites share them, so the drain stays
balanced by construction. Graduates the #59.5 errnotest pin.
2026-08-08 00:58:04 +09:00
90af21e132 test/package: wire the runtime fixture set into package_test
test/package/runtime/ was a manual README-driven corpus with no
target. Its unique surface — the driver's single-file ww test leg,
the unmet-expected-abort outcome, and the published -c binary's own
CLI (repeated globs, -list, -timeout-ms, direct-binary timeout and
descendant handling) — is now asserted by three new @test fns in
package_test.ww; the README drops its manual-run instructions.
2026-08-08 00:39:53 +09:00
0b23f9fb31 test: fold driver-parity byteid into 989_lib_byteid, retire 815/940/951
Wwstage-driver-leg byte identity gets one owner. The three carriers'
content identity is already blanket-owned by their r815_/r940_/r951_
corpus twins via test-data-byteid; their only non-redundant assertion
was the ww_ww driver leg, which 989_lib_byteid's 43-unit sweep covers
apart from the zero-dep root-only edge — folded in as a new probe row
(44 units). r940 fixture comments re-cited off the retired carrier.
2026-08-08 00:36:11 +09:00
66251cc52b cgen: default the hi bound of a slice/str-field slice, both stages
x.slicefield[:] / x.strfield[2:] emitted MOVQ $0 for the omitted hi
bound on BOTH stages (N_IDENT-gated dispatch; symmetric, so byte
identity never caught it) in all four sites: cgexpr N_SLICE + pushargs
(cstage), cgslice + pushargsrev (wwstage). The new arm re-evaluates
the pure field read for its {ptr,len,cap} header and takes .len,
covering local, viaptr, dot-chain, (*p), arr[i], and global inners.
Call inners still loud-reject upstream. Sibling of the #252/#257
array-field arms.
2026-08-08 00:29:51 +09:00
cc22abfc04 cgen: load the full header for a wwstage global-dot slice field
let x: []T = g.buf on a module-global struct dispatched only str
fields to the 3-word header load; a []T field fell to the scalar
tail (ptr word only), so len/cap read stale registers and the shape
was byteid-divergent against cstage's TY_STR||TY_SLICE arm (#263).
2026-08-08 00:23:55 +09:00
8a9be47f65 test/wcc/data: pin the drained divergences at runtime
The four graduated pin families byte-compared under test-data-byteid
but their original fixtures masked the miscompiles at runtime (lone
frame slot, dead code path, pointer accident). Add the discriminating
programs as run fixtures: adjacent-element clobber for the 2-byte
deref store, second-variant match dispatch for fn-type dedup, payload
integrity across the tagged widen of a padded struct, and base64
clear() actually zeroing its buffers. Corpus pins move to 1,229
fixtures / 137 run / 766 run-exit / 2,458 cells with the new identity
hash; the data-byteid floor moves to 915.
2026-08-07 23:55:01 +09:00
0b1cc5ef7c check: populate fn-type params in the wwstage tinfo layer
The N_TFN arm stamped only size and return, so every fn tinfo carried
a nil param chain and typeeq judged any two same-return fn types
equal: tagged-union dedup collapsed (*fn(A) T | *fn(B) T) to a bare
8-byte pointer and match read the pointer word as a tag, falling
through every arm for a real second-variant value. Build the tparam
chain like cstage's N_TFN resolve (bare ... sets the FFI variadic
flag; a Hare T... param wraps to []T with a per-param variadic bit
that typeeq now compares, mirroring cstage type_eq). Graduates the
four r76_typeeq_fn pins; the DATABYTEID_DIVERGED ledger is empty.
2026-08-07 23:54:10 +09:00
06c20dbec4 check: stamp a str for-range binding u8 in the wwstage
cstage types the binding ty_u8; the wwstage single-binder arm peeled
the element only for slice/array iterables, so a str scrutinee fell to
the N_FORRANGE fallback decl and exprtype stamped the binding str.
The stamp-keyed call-arg marshal then pushed the 3-word str ABI for a
1-word scalar, and an uncast compare on the binding was falsely
rejected. Route str through the same synthetic-N_LET binder with a u8
element. Graduates r940_str_forrange_arg.
2026-08-07 23:52:08 +09:00
c717facf78 cgen: key the tagged-widen struct copy on natural size, not slot size
cgwidentaggedstorebp's struct-ident arms (local and module-global)
counted copy bytes from structinfo.totsize, the round-8 slot width, so
a struct whose natural size is not a multiple of 8 took the MOVQ word
loop and copied the source slot's dirty pad bytes over the zero-fill
the arm itself just established; the width-true tail emitter beneath
was dead code. cstage keys the same copy on su->size. Route both arms
through copysrcnatsize (the stamped-tinfo natural size, #71).
Graduates r71_tagged_return_scratch_mixed.
2026-08-07 23:51:07 +09:00
4559b52950 cgen: default the hi bound of an N_DOT array-field slice arg
pushargsrev's N_SLICE arm resolved esz and the base address from the
stamped tinfo of an N_DOT [N]T-field base but let the omitted hi bound
fall to $0, so the #258 array-to-slice borrow desugar handed callees a
zero-length slice: base64 clear()'s bytes.zero(e.ibuf) was a runtime
no-op under the wwstage frontend. Take the element count from the
field's array tinfo like the cgslice #252 arm and cstage's bu->alen.
Graduates r989_libprecond_decodedsize_aligned and the 989_lib_byteid
#59.3 base64 pin.
2026-08-07 23:50:02 +09:00
58641e97a5 cgen: narrow 2-byte deref stores in the wwstage assign arm
The plain `*p = v` arm's storeop map handled 1- and 4-byte pointees
but let a 2-byte one fall to MOVQ, an 8-byte over-store that clobbers
six adjacent bytes (masked in the pinned fixture by the lone frame
slot; loud with `&a[0]` of a [4]i16). cstage fldstoreop maps 2 to
MOVW. Graduates r660_i16_out_param_negative.
2026-08-07 23:48:36 +09:00