Commit graph

33949 commits

Author SHA1 Message Date
Andrew Kelley
5bc95a6fa2 wasi.c: fix pread/pwrite
When stream is NULL it means reads should read 0 bytes and writes should
fake success with no side effects.
2025-07-09 10:47:36 -07:00
Andrew Kelley
5c6679922d CBE: avoid depending on std.io.Writer.count 2025-07-09 09:32:07 -07:00
Andrew Kelley
bc2cf0c173 eliminate all uses of std.io.Writer.count except for CBE 2025-07-09 09:32:07 -07:00
Andrew Kelley
d345a10054 std.os.freebsd.copy_file_range: add missing error.Unexpected 2025-07-08 16:53:02 -07:00
Andrew Kelley
81b0c99915 std.zig.system.linux: update API usage 2025-07-08 15:15:21 -07:00
Andrew Kelley
c1c49a7d1c C backend: fix bitcasting regression 2025-07-08 15:15:08 -07:00
Andrew Kelley
1dcb20d27e std.fmt: refactor to remove cacheString
when this kind of trick is needed, do it inline
2025-07-08 11:07:23 -07:00
Andrew Kelley
fc335a3a48 update format strings in os/windows/test.zig 2025-07-08 08:46:31 -07:00
Andrew Kelley
83c4000319 std: revert big int test to master branch
oops, it depends on usize
2025-07-08 08:36:04 -07:00
Andrew Kelley
db021c4fd1 CI: disable self-hosted riscv64
it's missing some critical features like `@fieldParentPtr` and `@memmove`
2025-07-08 08:28:20 -07:00
Andrew Kelley
5955ba4f53 std.fs.File.Writer: implement positional writing for Windows 2025-07-07 23:09:14 -07:00
Jacob Young
720cd43fc1 cbe: fix code header being omitted from the output 2025-07-07 22:43:53 -07:00
Andrew Kelley
043079d765 std.io.Writer.VectorWrapper: fix vtable not being a unique addr 2025-07-07 22:43:53 -07:00
Andrew Kelley
a983f5b90f wasm backend: memcpy and memmove are the same
both lower to memory.fill operation, which are allowed to overlap
2025-07-07 22:43:53 -07:00
Andrew Kelley
c7b4b17ba2 fix test case expected float value
it's better now
2025-07-07 22:43:53 -07:00
Andrew Kelley
911cd2611f Sema: fix unintentional extra @compileLog newline 2025-07-07 22:43:53 -07:00
Andrew Kelley
26659c862f update compiler unit tests to new API 2025-07-07 22:43:53 -07:00
Andrew Kelley
b0395531d3 update autodocs and langref to new API 2025-07-07 22:43:53 -07:00
Andrew Kelley
d8e26275f2 update standalone and incremental tests to new API 2025-07-07 22:43:53 -07:00
Andrew Kelley
c873c2eed9 fix aro translate-c building from source 2025-07-07 22:43:53 -07:00
Andrew Kelley
e97a0ffb60 std.Build.Step.CheckObject: mostly revert to master branch
the updated code to use new std.io API is crashing
2025-07-07 22:43:53 -07:00
Andrew Kelley
f2ad3bcc1c fix 32-bit compilation 2025-07-07 22:43:53 -07:00
Andrew Kelley
b077e2979c std.io.Reader: fix peekByte 2025-07-07 22:43:53 -07:00
Andrew Kelley
a7387f0047 fix std.io.Writer.VectorWrapper mechanism
previous implementation erroneously attempted to detect whether vector
API was used via the buffer pointer. This implementation has an explicit
flag.
2025-07-07 22:43:53 -07:00
Andrew Kelley
9903587a63 std.Build.Step.Options: fix build failure 2025-07-07 22:43:53 -07:00
Andrew Kelley
fd7feed04b std.fs.File.Writer: implement positional writing 2025-07-07 22:43:53 -07:00
Andrew Kelley
7e2a26c0c4 std.io.Writer.printValue: rework logic
Alignment and fill options only apply to numbers.

Rework the implementation to mainly branch on the format string rather
than the type information. This is more straightforward to maintain and
more straightforward for comptime evaluation.

Enums support being printed as decimal, hexadecimal, octal, and binary.

`formatInteger` is another possible format method that is
unconditionally called when the value type is struct and one of the
integer-printing format specifiers are used.
2025-07-07 22:43:53 -07:00
Andrew Kelley
5378fdb153 std.fmt: fully remove format string from format methods
Introduces `std.fmt.alt` which is a helper for calling alternate format
methods besides one named "format".
2025-07-07 22:43:53 -07:00
Andrew Kelley
4ccc6f2b57 compiler: fix remaining build failures 2025-07-07 22:43:53 -07:00
Andrew Kelley
6489907662 std.zip: work around deprecated API 2025-07-07 22:43:53 -07:00
Andrew Kelley
f4720e1407 std.testing: update to new std.io API 2025-07-07 22:43:53 -07:00
Andrew Kelley
87a7568a44 build runner: restore missing newline 2025-07-07 22:43:52 -07:00
Andrew Kelley
9c8aef55b4 std.fmt.format: use {t} for tag name rather than {s}
prevents footgun when formatted type changes from string to enum
2025-07-07 22:43:52 -07:00
Andrew Kelley
30c2921eb8 compiler: update a bunch of format strings 2025-07-07 22:43:52 -07:00
Andrew Kelley
d09b99d043 C backend: fix compilation errors 2025-07-07 22:43:52 -07:00
Andrew Kelley
f409457925 compiler: fix a bunch of format strings 2025-07-07 22:43:52 -07:00
Andrew Kelley
494819be91 cbe: reapply writer changes 2025-07-07 22:43:52 -07:00
Andrew Kelley
6963a1c7b9 C backend: prepare for merge 2025-07-07 22:43:52 -07:00
Andrew Kelley
6314e6f238 compiler: fix a bunch of format strings 2025-07-07 22:43:52 -07:00
Andrew Kelley
d5c97fded5 compiler: fix a bunch of format strings 2025-07-07 22:43:52 -07:00
Andrew Kelley
3afc6fbac6 std.zig.llvm.Builder: update format API 2025-07-07 22:43:52 -07:00
Andrew Kelley
cce32bd1d5 fix build runner 2025-07-07 22:43:52 -07:00
Andrew Kelley
ec3b5f0c74 compiler: upgrade various std.io API usage 2025-07-07 22:43:52 -07:00
Andrew Kelley
756a2dbf1a compiler: upgrade various std.io API usage 2025-07-07 22:43:52 -07:00
Andrew Kelley
941bc37193 compiler: update all instances of std.fmt.Formatter 2025-07-07 22:43:52 -07:00
Andrew Kelley
49be02e6d7 MachO: revert unfinished changes 2025-07-07 22:43:52 -07:00
Andrew Kelley
c8fcd2ff2c MachO: update to new std.io APIs 2025-07-07 22:43:52 -07:00
Andrew Kelley
f71d97e4cb update compiler source to new APIs 2025-07-07 22:43:52 -07:00
Andrew Kelley
fac5fe57be std.io.Writer.Allocating: rename interface to writer 2025-07-07 22:43:52 -07:00
Andrew Kelley
fc310ee7bc std.io.Reader: fix appendRemaining 2025-07-07 22:43:52 -07:00