Surface rename of the signed integer family: s1..s64 become i1..i64
(u1..u64, usize, isize unchanged). 'string' keeps the s-prefix arm in
name classification; width parsing moves to the i-prefix arm next to
isize.
Internal TypeId tags follow the surface (.s8/.s16/.s32/.s64 ->
.i8/.i16/.i32/.i64), as do mono-key mangle fragments (ptr_i64,
tu_i64_bool) and all display/diagnostic formatting (i{d}).
Migrated in the same sweep: stdlib + examples + issue repros + FFI C
companions (shared symbol names like ffi_id_i64), expected
stdout/stderr/ir snapshots, specs.md, readme.md, CLAUDE.md/AGENTS.md,
implementation_plan.md, docs/, issue writeups. Vendored stb_image and
historical flow state left untouched.
zig build test: 426/426; examples suite: 595/595.
60 lines
1.4 KiB
Plaintext
60 lines
1.4 KiB
Plaintext
=== 1. literal == ===
|
|
i64 == i64: true
|
|
i64 == string: false
|
|
*u8 == *u8: true
|
|
?i64 == ?i64: true
|
|
?i64 == ?i32: false
|
|
=== 2. type_of(value) == T ===
|
|
type_of(a) == i64: true
|
|
type_of(b) == f64: true
|
|
type_of(s) == string: true
|
|
type_of(a) == f64: false
|
|
=== 3. Type variable storage ===
|
|
t == f64: true
|
|
t == string: false
|
|
after reassign t == string: true
|
|
t == bool: true
|
|
=== 4. type_name ===
|
|
type_name(i64): i64
|
|
type_name(*u8): *u8
|
|
type_name(Point): Point
|
|
type_name(Color): Color
|
|
type_name(t): f64
|
|
=== 5. print Type values ===
|
|
literal: i64
|
|
var: string
|
|
type_of(b): f64
|
|
=== 6. generic dispatch ===
|
|
describe(i64): int64
|
|
describe(string): text
|
|
describe(bool): boolean
|
|
describe(f64): other
|
|
=== 7. identity($T, val) ===
|
|
identity(i64, 7): 7
|
|
identity(string, hi): hi
|
|
identity(bool, true): true
|
|
=== 8. Wrap($T) ===
|
|
Wrap(i64).v: 42
|
|
Wrap(string).v: wrapped
|
|
=== 9. reflection on Type ===
|
|
size_of(i64): 8
|
|
size_of(*u8): 8
|
|
align_of(f64): 8
|
|
field_count(Point): 2
|
|
type_eq(i64, i64): true
|
|
type_eq(i64, string): false
|
|
=== 10. ..$args walking ===
|
|
type_list(): []
|
|
type_list(1): [i64]
|
|
type_list(1, "x"): [i64, string]
|
|
type_list(true, 3.14): [bool, f64]
|
|
=== 11. Type in struct field ===
|
|
h.t == i64: true
|
|
h.t == string: false
|
|
type_name(h.t): i64
|
|
=== 12. compound literals ===
|
|
type_name(*Point): *Point
|
|
type_name([4]i32): [4]i32
|
|
type_name([]bool): []bool
|
|
type_name(?f64): ?f64
|