lib: banner purge + WHY-only comment sweep (rule 8)

Every // ---- section banner dies (132 -> 0): names carry the WHAT.
Narration deleted (filename restatements, run-with lines, what-the-
next-line-does); every ref/hare cite, task cite, divergence, ABI/
layout contract, and ownership qualifier kept (borrowed-view lines
restored where the sweep over-cut). Comment-only proven: all 442
walk-workdir .s and 32 import-probe .s byte-identical before/after;
libbyteid 56-roster all-ID.
This commit is contained in:
2026-08-08 21:10:18 +09:00
parent 659e859f34
commit aadc6618f0
90 changed files with 259 additions and 919 deletions

View File

@@ -1,9 +1,6 @@
// scannertest — exercises the lib/bufio scanner surface. The @tests
// enumerate parallel `[N]T` arrays of inputs and expectations, then
// iterate one body across them. #94 fold-eFinal: the unified
// value-return surface — `let st = memio.fixed(buf); &st.vt` into the
// scanner init, io.read/write/close return size/io.error. Row
// ownership mirrors ref/hare/bufio/scanner_test+test.ha.
// Row ownership mirrors ref/hare/bufio/scanner_test+test.ha.
// Streams are built as `let st = memio.fixed(buf); &st.vt` — the #94
// unified value-return io surface (read/write/close return size/io.error).
package bufio_test;
@@ -12,8 +9,6 @@ import encoding.utf8;
import io;
import memio;
// putstr — copy the bytes of `s` into `into` starting at `off`,
// returning the new offset.
fn putstr(s: str, into: []u8, off: i32) i32 = {
let i: i32 = 0;
for (i < s.len) {
@@ -23,8 +18,6 @@ fn putstr(s: str, into: []u8, off: i32) i32 = {
return off + s.len;
};
// Replaces the OLD io.closed source. errvt is module-static; its
// reader/writer return a nomem-widened io.error.
let errvt: io.vtable;
fn errread(s: io.stream, buf: []u8) (size | io.eof | io.error) = {
@@ -244,7 +237,6 @@ fn errsource() io.stream = {
};
@test fn boundarycases() void = {
// ---- empty line via scanline -----------------------------------
let s1: [16]u8;
let n1: i32 = putstr("\nfoo\n", s1[0:16], 0);
let m1mem: memio.stream = memio.fixed(s1[0:n1]);
@@ -271,7 +263,6 @@ fn errsource() io.stream = {
};
bufio.finish(&sc1);
// ---- scanbytes idempotent EOF ---------------------------------
let s2: [8]u8;
let n2: i32 = putstr("ab", s2[0:8], 0);
let m2mem: memio.stream = memio.fixed(s2[0:n2]);

View File

@@ -2,24 +2,6 @@
// Hare's bufio:: surface (ref/hare/bufio/{scanner,stream}.ha). Project
// #94 fold-eFinal.
//
// Surface:
//
// bufio.newscanner (src: io.stream, maxread: i32) scanner
// bufio.newscannerbuf(src: io.stream, buf: []u8) scanner
// bufio.finish (s: *scanner) void
// bufio.scanbyte (s: *scanner) (u8 | io.eof | io.error | overflow)
// bufio.scanbytes (s: *scanner, delim: u8)
// ([]u8 | io.eof | io.error | overflow)
// bufio.scanrune (s: *scanner)
// (rune | io.eof | io.error | utf8.invalid | overflow)
// bufio.scanline (s: *scanner) (str | io.eof | io.error | overflow)
//
// bufio.init (src: io.stream, rbuf: []u8, wbuf: []u8) stream
// bufio.flush (b: *stream) (void | io.error)
// bufio.setflush (b: *stream, bs: []u8) void
// bufio.unread (b: *stream, buf: []u8) void
// bufio.isbuffered (s: io.stream) bool
//
// VALUE-RETURN (Hare ref/hare/bufio/stream.ha:69 init, scanner.ha:92
// newscanner_buf): each constructor builds in a local `let r: T;`,
// field-assigns every slot, and `return r;`. The caller owns the

View File

@@ -1,8 +1,6 @@
// streamtest — exercises the lib/bufio buffered stream surface. The
// stream @tests are one scenario per fn. #94 fold-eFinal: the unified
// value-return surface — `let st = memio.fixed(buf); &st.vt` into the
// stream init, io.read/write/close return size/io.error. Row
// ownership mirrors ref/hare/bufio/stream_test+test.ha.
// Row ownership mirrors ref/hare/bufio/stream_test+test.ha.
// Streams are built as `let st = memio.fixed(buf); &st.vt` — the #94
// unified value-return io surface (read/write/close return size/io.error).
package bufio_test;
@@ -10,8 +8,6 @@ import bufio;
import io;
import memio;
// sputstr — copy the bytes of `s` into `into` starting at `off`,
// returning the new offset.
fn sputstr(s: str, into: []u8, off: i32) i32 = {
let i: i32 = 0;
for (i < s.len) {