lang: rename signed integer types sN -> iN

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.
This commit is contained in:
agra
2026-06-12 09:31:53 +03:00
parent 515ecebea7
commit d8076b9333
1054 changed files with 6836 additions and 6839 deletions

View File

@@ -32,7 +32,7 @@ report :: (label: string, ok: bool) {
}
// Half-open containment [lo, hi).
in_range :: (x: s64, lo: s64, hi: s64) -> bool {
in_range :: (x: i64, lo: i64, hi: i64) -> bool {
return x >= lo and x < hi;
}
@@ -86,10 +86,10 @@ main :: () -> ! {
report("nested-pair", sub.items[0].key == "k" and sub.items[0].val.str == "v");
// ── 2. Heap discipline: view vs decoded ──────────────────────────
base : s64 = xx src.ptr;
base : i64 = xx src.ptr;
stop := base + src.len;
p_plain : s64 = xx o.items[0].val.str.ptr; // "plain": no escape -> VIEW into src
p_esc : s64 = xx o.items[1].val.str.ptr; // "a\nb": escaped -> DECODED into arena
p_plain : i64 = xx o.items[0].val.str.ptr; // "plain": no escape -> VIEW into src
p_esc : i64 = xx o.items[1].val.str.ptr; // "a\nb": escaped -> DECODED into arena
report("plain-is-view", in_range(p_plain, base, stop));
report("escaped-allocated", !in_range(p_esc, base, stop));
@@ -120,10 +120,10 @@ main :: () -> ! {
report("uni-A", u[0] == 0x41); // U+0041 -> 1 byte
report("uni-e1", u[1] == 0xC3); // U+00E9 -> 2 bytes
report("uni-e2", u[2] == 0xA9);
report("uni-s0", u[3] == 0xF0); // U+1F600 (surrogate pair) -> 4 bytes
report("uni-s1", u[4] == 0x9F);
report("uni-s2", u[5] == 0x98);
report("uni-s3", u[6] == 0x80);
report("uni-i0", u[3] == 0xF0); // U+1F600 (surrogate pair) -> 4 bytes
report("uni-i1", u[4] == 0x9F);
report("uni-i2", u[5] == 0x98);
report("uni-i3", u[6] == 0x80);
// ── 6. Malformed inputs each surface the right error variant ─────
report("err-truncated", raises("{\"a\":", error.UnexpectedEnd, xx arena));