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

@@ -4,7 +4,7 @@
> fixpoint runs at the END of `Lowering.scanDecls`, but the same scan loop
> resolved top-level `var_decl` global annotations (and typed module-constant
> annotations) via `self.resolveType(ta)` BEFORE that fixpoint ran — so a forward
> alias (`A :: B; B :: s32; g : A = 7;`) was still absent from
> alias (`A :: B; B :: i32; g : A = 7;`) was still absent from
> `type_alias_map`, `resolveType` fabricated an empty-struct stub, and the global
> got a type mismatching its initializer at LLVM verification (the typed-const
> path silently mistyped the constant instead).
@@ -30,18 +30,18 @@ LLVM verification failed: Global variable initializer type does not match global
ptr @g
```
Expected: `A :: B; B :: s32; g : A = 7;` should type `g` as `s32` and compile/run
Expected: `A :: B; B :: i32; g : A = 7;` should type `g` as `i32` and compile/run
the same way as the ordered alias form.
## Reproduction
```sx
A :: B;
B :: s32;
B :: i32;
g : A = 7;
main :: () -> s32 {
main :: () -> i32 {
return g;
}
```
@@ -63,7 +63,7 @@ annotation must resolve before that global's type is registered.
Context:
- Issue 0069 (`49a383d`) added `Lowering.resolveForwardIdentifierAliases`, a
fixpoint post-pass at the end of `scanDecls`, to resolve top-level
identifier-RHS aliases like `A :: B; B :: s32;`.
identifier-RHS aliases like `A :: B; B :: i32;`.
- That works for aliases used later in function bodies because the A2.4
unknown-type pass and body lowering run after `scanDecls`.
- But top-level `var_decl` annotations are resolved inside the same `scanDecls`
@@ -92,9 +92,9 @@ Verification:
```sx
A :: B;
B :: s32;
B :: i32;
g : A = 7;
main :: () -> s32 { return g; }
main :: () -> i32 { return g; }
```
- Keep `examples/0132-types-forward-type-alias.sx`,