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

@@ -48,13 +48,13 @@ Gles3TextureSlot :: struct {
Gles3ShaderSlot :: struct {
program: u32 = 0;
proj_loc: s32 = 0 - 1;
tex_loc: s32 = 0 - 1;
proj_loc: i32 = 0 - 1;
tex_loc: i32 = 0 - 1;
}
Gles3Gpu :: struct {
pixel_w: s32 = 0;
pixel_h: s32 = 0;
pixel_w: i32 = 0;
pixel_h: i32 = 0;
// The renderer's vertex layout is fixed (see file header). One VAO,
// reused across every set_vertex_buffer.
@@ -82,7 +82,7 @@ impl GPU for Gles3Gpu {
// single shared VAO. Must be called once the EGL context is
// current (AndroidPlatform.run_frame_loop ensures this before
// invoking the user's per-frame closure). `target` is unused.
init :: (self: *Gles3Gpu, target: *void, pixel_w: s32, pixel_h: s32) -> bool {
init :: (self: *Gles3Gpu, target: *void, pixel_w: i32, pixel_h: i32) -> bool {
inline if OS != .android { return false; }
self.pixel_w = pixel_w;
self.pixel_h = pixel_h;
@@ -110,7 +110,7 @@ impl GPU for Gles3Gpu {
// happens when the NativeActivity tears down).
}
resize :: (self: *Gles3Gpu, pixel_w: s32, pixel_h: s32) {
resize :: (self: *Gles3Gpu, pixel_w: i32, pixel_h: i32) {
self.pixel_w = pixel_w;
self.pixel_h = pixel_h;
}
@@ -145,7 +145,7 @@ impl GPU for Gles3Gpu {
xx self.shaders.len
}
create_buffer :: (self: *Gles3Gpu, size_bytes: s64) -> BufferHandle {
create_buffer :: (self: *Gles3Gpu, size_bytes: i64) -> BufferHandle {
inline if OS != .android { return 0; }
if size_bytes <= 0 { return 0; }
b : u32 = 0;
@@ -156,7 +156,7 @@ impl GPU for Gles3Gpu {
xx self.buffers.len
}
update_buffer :: (self: *Gles3Gpu, handle: BufferHandle, data: *void, size_bytes: s64) {
update_buffer :: (self: *Gles3Gpu, handle: BufferHandle, data: *void, size_bytes: i64) {
inline if OS != .android { return; }
buf := gles3_lookup_buffer(self, handle);
if buf == 0 { return; }
@@ -166,7 +166,7 @@ impl GPU for Gles3Gpu {
glBufferSubData(GL_ARRAY_BUFFER, 0, xx size_bytes, data);
}
update_buffer_at :: (self: *Gles3Gpu, handle: BufferHandle, data: *void, size_bytes: s64, byte_offset: s64) {
update_buffer_at :: (self: *Gles3Gpu, handle: BufferHandle, data: *void, size_bytes: i64, byte_offset: i64) {
inline if OS != .android { return; }
buf := gles3_lookup_buffer(self, handle);
if buf == 0 { return; }
@@ -177,12 +177,12 @@ impl GPU for Gles3Gpu {
glBufferSubData(GL_ARRAY_BUFFER, xx byte_offset, xx size_bytes, data);
}
create_texture :: (self: *Gles3Gpu, w: s32, h: s32, format: TextureFormat, pixels: *void) -> TextureHandle {
create_texture :: (self: *Gles3Gpu, w: i32, h: i32, format: TextureFormat, pixels: *void) -> TextureHandle {
inline if OS != .android { return 0; }
if w <= 0 { return 0; }
if h <= 0 { return 0; }
internal_fmt : s32 = 0;
internal_fmt : i32 = 0;
ext_fmt : u32 = 0;
bpp : u32 = 0;
if format == .rgba8 {
@@ -210,10 +210,10 @@ impl GPU for Gles3Gpu {
xx self.textures.len
}
update_texture_region :: (self: *Gles3Gpu, handle: TextureHandle, x: s32, y: s32, w: s32, h: s32, pixels: *void) {
update_texture_region :: (self: *Gles3Gpu, handle: TextureHandle, x: i32, y: i32, w: i32, h: i32, pixels: *void) {
inline if OS != .android { return; }
if handle == 0 { return; }
h64 : s64 = xx handle;
h64 : i64 = xx handle;
if h64 > self.textures.len { return; }
slot := self.textures.items[handle - 1];
if slot.tex == 0 { return; }
@@ -235,7 +235,7 @@ impl GPU for Gles3Gpu {
destroy_texture :: (self: *Gles3Gpu, tex: TextureHandle) {
inline if OS != .android { return; }
if tex == 0 { return; }
h64 : s64 = xx tex;
h64 : i64 = xx tex;
if h64 > self.textures.len { return; }
t := self.textures.items[tex - 1].tex;
if t == 0 { return; }
@@ -248,7 +248,7 @@ impl GPU for Gles3Gpu {
set_shader :: (self: *Gles3Gpu, handle: ShaderHandle) {
inline if OS != .android { return; }
if handle == 0 { return; }
h64 : s64 = xx handle;
h64 : i64 = xx handle;
if h64 > self.shaders.len { return; }
prog := self.shaders.items[handle - 1].program;
if prog == 0 { return; }
@@ -280,14 +280,14 @@ impl GPU for Gles3Gpu {
inline if OS != .android { return; }
if slot != 0 { return; } // renderer only uses unit 0
if handle == 0 { return; }
h64 : s64 = xx handle;
h64 : i64 = xx handle;
if h64 > self.textures.len { return; }
t := self.textures.items[handle - 1].tex;
if t == 0 { return; }
glActiveTexture(GL_TEXTURE0);
glBindTexture(GL_TEXTURE_2D, t);
if self.current_shader != 0 {
cs64 : s64 = xx self.current_shader;
cs64 : i64 = xx self.current_shader;
if cs64 <= self.shaders.len {
loc := self.shaders.items[self.current_shader - 1].tex_loc;
if loc >= 0 { glUniform1i(loc, 0); }
@@ -298,19 +298,19 @@ impl GPU for Gles3Gpu {
// For slot 1 + 64 bytes the renderer is uploading the 4x4 projection
// matrix into `uniform mat4 uProj`. Look up via the current shader's
// cached uniform location.
set_vertex_constants :: (self: *Gles3Gpu, slot: u32, data: *void, size_bytes: s64) {
set_vertex_constants :: (self: *Gles3Gpu, slot: u32, data: *void, size_bytes: i64) {
inline if OS != .android { return; }
if slot != 1 { return; }
if size_bytes != 64 { return; }
if self.current_shader == 0 { return; }
cs64 : s64 = xx self.current_shader;
cs64 : i64 = xx self.current_shader;
if cs64 > self.shaders.len { return; }
loc := self.shaders.items[self.current_shader - 1].proj_loc;
if loc < 0 { return; }
glUniformMatrix4fv(loc, 1, 0, xx data);
}
set_scissor :: (self: *Gles3Gpu, x: s32, y: s32, w: s32, h: s32) {
set_scissor :: (self: *Gles3Gpu, x: i32, y: i32, w: i32, h: i32) {
inline if OS != .android { return; }
glEnable(GL_SCISSOR_TEST);
glScissor(x, self.pixel_h - (y + h), w, h);
@@ -321,7 +321,7 @@ impl GPU for Gles3Gpu {
glDisable(GL_SCISSOR_TEST);
}
draw_triangles :: (self: *Gles3Gpu, vertex_offset: s32, vertex_count: s32) {
draw_triangles :: (self: *Gles3Gpu, vertex_offset: i32, vertex_count: i32) {
inline if OS != .android { return; }
if vertex_count <= 0 { return; }
glDrawArrays(GL_TRIANGLES, vertex_offset, vertex_count);
@@ -331,7 +331,7 @@ impl GPU for Gles3Gpu {
gles3_lookup_buffer :: (self: *Gles3Gpu, handle: u32) -> u32 {
inline if OS != .android { return 0; }
if handle == 0 { return 0; }
h64 : s64 = xx handle;
h64 : i64 = xx handle;
if h64 > self.buffers.len { return 0; }
self.buffers.items[handle - 1]
}