30a0856fe5bf6681aff1a15b31f71ed0d654e428
Cstage's cmd/w6c/cgen.c:6363-6411 special-cases `let s: []T = alloc([], n)!;` to inline rt_alloc + null-check + exit(1) + slice header build, avoiding a generic call-then-store path. Wwstage's cglet had no mirror — pre-#31 the path was rejected at check, but once #31 made the check side accept it, the cgen side would have silently miscompiled. Mirror added at cgenstmt.ww cglet rhs head, emitting byte-identical asm. Element size goes through elemsizeofc so str (16), structs, and tagged aliases all match cstage's lu->sub->size uniformly — the defensive path matters because check today only allows []u8, but relaxing that is its own task. Test exercises the path: writes to s[0] and s[15], reads back. Would SIGSEGV on a junk header. 994 + 995 byte-identity green.
Description
No description provided
Languages
C
89.4%
Python
7.2%
Makefile
2.3%
Shell
0.8%
Assembly
0.3%