This commit is contained in:
2026-07-17 18:53:34 +02:00
parent 97f1c06057
commit 866e28adb8
13 changed files with 468 additions and 215 deletions
+5 -3
View File
@@ -627,7 +627,7 @@
parameters
25. dynamic heap allocation (implemented; v1)
- `std/mem` exposes a plain-data `Allocator` contract with `?*mut anyopaque` context and `alloc`, `realloc`, and `free` `@func` pointers
- `std/mem` exposes a plain-data `Allocator` contract with `?@mut anyopaque` context and `alloc`, `realloc`, and `free` `@func` pointers
- `mem.c_allocator` is the libc-backed allocator; `mem.alloc(mem.c_allocator, size, alignment)` returns nullable mutable byte memory
- `mem.free(mem.c_allocator, ptr, size, alignment)` frees with the same allocator; `malloc` handles default-aligned requests and `posix_memalign` handles larger power-of-two alignments
- `mem.realloc` preserves alignment and the original allocation on failure; zero size frees, and over-aligned blocks use allocate/copy/free
@@ -811,9 +811,11 @@
33. explicit I/O provider (implemented)
- `main` may take one canonical `@std/process Init`; parameterless entry points remain valid
- the compiler supplies a `hide system` macOS provider and constructs `Init` in the external C wrapper
- readers and writers pair an explicit provider with `stdin`, `stdout`, or `stderr`
- readers and writers bind provider context, a generalized handle, and a direct callback
- standard-stream helpers and existing-file operations use the injected provider; files retain it
- `read` and `write` validate provider counts; `write_all` handles partial writes and no progress
- the system provider uses unbuffered libc `read`/`write`, retries interruption, and allocates nothing
- the system provider uses unbuffered POSIX file descriptors, retries interrupted open/read/write,
and allocates nothing
34. package declaration aliases and root `std.ArrayList` (implemented)
- bare qualified aliases use `Name :: alias package.Member` without adding a keyword