wcc: add the size primitive type (TY_SIZE), classify as unsigned int (#85)

fold-1: type exists + classifies; mirrors TY_UINTPTR at every site, both stages. size(T)/len() return types UNCHANGED (fold-2). Regenerates the 5 combined.ww (lib/ww embedded).
This commit is contained in:
2026-05-26 01:26:03 +09:00
parent 68dbb77d6c
commit bd7181ae1f
7 changed files with 38 additions and 15 deletions

View File

@@ -1210,7 +1210,7 @@ fn tupleelemslot(pt: *tinfo) u64 = {
pk == tykind.TY_CHAN || pk == tykind.TY_I64 ||
pk == tykind.TY_U64 || pk == tykind.TY_INT ||
pk == tykind.TY_UINT || pk == tykind.TY_UINTPTR ||
pk == tykind.TY_F64) { return 8u64; };
pk == tykind.TY_SIZE || pk == tykind.TY_F64) { return 8u64; };
if (pk == tykind.TY_BOOL || pk == tykind.TY_RUNE ||
pk == tykind.TY_I8 || pk == tykind.TY_I16 ||
pk == tykind.TY_I32 || pk == tykind.TY_U8 ||
@@ -1255,8 +1255,9 @@ fn fieldslotsize(ft: *tinfo) u64 = {
fk == tykind.TY_U8 || fk == tykind.TY_U16 ||
fk == tykind.TY_U32 || fk == tykind.TY_U64 ||
fk == tykind.TY_INT || fk == tykind.TY_UINT ||
fk == tykind.TY_UINTPTR || fk == tykind.TY_F32 ||
fk == tykind.TY_F64 || fk == tykind.TY_ENUM) { return t.size; };
fk == tykind.TY_UINTPTR || fk == tykind.TY_SIZE ||
fk == tykind.TY_F32 || fk == tykind.TY_F64 ||
fk == tykind.TY_ENUM) { return t.size; };
return 8u64;
};