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:
@@ -8,27 +8,27 @@ out :: (str: string) -> void #builtin;
|
||||
// sqrt :: (x: $T) -> T #builtin;
|
||||
// sin :: (x: $T) -> T #builtin;
|
||||
// cos :: (x: $T) -> T #builtin;
|
||||
size_of :: ($T: Type) -> s64 #builtin;
|
||||
align_of :: ($T: Type) -> s64 #builtin;
|
||||
size_of :: ($T: Type) -> i64 #builtin;
|
||||
align_of :: ($T: Type) -> i64 #builtin;
|
||||
// Low-level libc bindings, used by allocator implementations to avoid
|
||||
// recursing through `context.allocator`. The bare `malloc`/`free`
|
||||
// spellings are NOT declared: the Allocator protocol + the std/mem.sx
|
||||
// helpers are the allocation surface (`free` is the typed slice helper
|
||||
// there). Raw libc escape hatch: `libc_malloc` / `libc_free`.
|
||||
libc_malloc :: (size: s64) -> *void #foreign libc "malloc";
|
||||
libc_malloc :: (size: i64) -> *void #foreign libc "malloc";
|
||||
libc_free :: (ptr: *void) -> void #foreign libc "free";
|
||||
|
||||
memcpy :: (dst: *void, src: *void, size: s64) -> *void #foreign libc "memcpy";
|
||||
memset :: (dst: *void, val: s64, size: s64) -> void #foreign libc "memset";
|
||||
memcpy :: (dst: *void, src: *void, size: i64) -> *void #foreign libc "memcpy";
|
||||
memset :: (dst: *void, val: i64, size: i64) -> void #foreign libc "memset";
|
||||
type_of :: (val: $T) -> Type #builtin;
|
||||
type_name :: ($T: Type) -> string #builtin;
|
||||
field_count :: ($T: Type) -> s64 #builtin;
|
||||
field_name :: ($T: Type, idx: s64) -> string #builtin;
|
||||
field_value :: (s: $T, idx: s64) -> Any #builtin;
|
||||
field_count :: ($T: Type) -> i64 #builtin;
|
||||
field_name :: ($T: Type, idx: i64) -> string #builtin;
|
||||
field_value :: (s: $T, idx: i64) -> Any #builtin;
|
||||
is_flags :: ($T: Type) -> bool #builtin;
|
||||
type_is_unsigned :: ($T: Type) -> bool #builtin;
|
||||
field_value_int :: ($T: Type, idx: s64) -> s64 #builtin;
|
||||
field_index :: ($T: Type, val: T) -> s64 #builtin;
|
||||
field_value_int :: ($T: Type, idx: i64) -> i64 #builtin;
|
||||
field_index :: ($T: Type, val: T) -> i64 #builtin;
|
||||
error_tag_name :: (e: $T) -> string #builtin;
|
||||
|
||||
// Call-site location, synthesized by the `#caller_location` directive when it
|
||||
@@ -36,8 +36,8 @@ error_tag_name :: (e: $T) -> string #builtin;
|
||||
// to report where they were invoked.
|
||||
Source_Location :: struct {
|
||||
file: string;
|
||||
line: s32;
|
||||
col: s32;
|
||||
line: i32;
|
||||
col: i32;
|
||||
func: string;
|
||||
}
|
||||
string :: []u8 #builtin;
|
||||
@@ -47,7 +47,7 @@ string :: []u8 #builtin;
|
||||
// Bytes-level primitives carry the `_bytes` suffix so the typed
|
||||
// helpers in std/mem.sx own the bare names (`alloc(T, n)`, `free(s)`).
|
||||
Allocator :: protocol #inline {
|
||||
alloc_bytes :: (size: s64) -> *void;
|
||||
alloc_bytes :: (size: i64) -> *void;
|
||||
dealloc_bytes :: (ptr: *void);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user