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.
This commit is contained in:
2026-08-07 23:50:02 +09:00
parent 58641e97a5
commit 4559b52950
3 changed files with 13 additions and 3 deletions

View File

@@ -145,8 +145,10 @@ static const struct ent ents[] = {
{ .fixture = "lib/ascii/asciitest.ww",
.mode = M_ID, .cite = "#59.1 graduated by #146 str==" },
/* #59.2 bufio graduated to M_ID above (#129 fix) */
/* #59.3 base64 graduated to M_ID (pushargsrev N_DOT array-field
* default-hi fix — clear()'s borrow no longer zero-length) */
{ .fixture = "lib/encoding/base64/base64_test.ww",
.mode = M_DIVERGE, .cite = "#59.3" },
.mode = M_ID },
/* #59.4 hextest graduated to M_ID above (#22a reviewer fixes) */
{ .fixture = "lib/errors/errnotest.ww",
.mode = M_DIVERGE, .cite = "#59.5" },