lib/fmt+lib/log+lib/memio: drop rt_syscall stubs in tests; use os
After12436dd, 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 as12436dd: 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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user