lib/fmt+lib/log+lib/memio: drop rt_syscall stubs in tests; use os

After 12436dd, lib/fmt and lib/log production code routed through
os.write / os.exit. The test files (fmttest, logtest, memiotest)
still carried the same @symbol("rt_syscall") syscall1ww / doexit
stub block with the (now stale) os↔io collision rationale. Same
mechanical drop as 12436dd: add use os;, route fail() through
os.exit, remove the stubs.

Also reword the stale workaround comment in lib/memio/memio.ww
covering rt_alloc/rt_free. The decls themselves stay until lib/os
exports alloc/free as a follow-up.

No combined.ww regen (these files aren't bootstrap-folded).
This commit is contained in:
2026-05-16 00:03:19 +09:00
parent 12436ddaca
commit c3f994822d
4 changed files with 9 additions and 31 deletions

View File

@@ -8,20 +8,13 @@
use bytes;
use io;
use memio;
// Direct exit(2) binding rather than `use os;` — os exports
// read/write/close, which collide with io.read/write/close under
// the driver's flat-scope concat (task #7).
@symbol("rt_syscall") fn syscall1ww(num: i64, a: i64) i64;
fn doexit(code: i32) void = {
syscall1ww(60i64, code: i64);
};
use os;
// signalled — bumped by main before each test so a failing exit code
// pinpoints the offending case.
let signalled: i32 = 0;
fn fail() void = { doexit(signalled + 10); };
fn fail() void = { os.exit(signalled + 10); };
fn putstr(s: str, into: []u8, off: i32) i32 = {
let i: i32 = 0;