toolchain: banner purge + WHY-only comment sweep (rule 8)
selfhost/, cmd/, internal/ join the tree-wide sweep: every section banner dies (91 selfhost + the cmd C-style dividers -> 0); narration and stale contracts deleted (pre-#22 bundler notes, retired single-PT_LOAD and no-archive claims, superseded ABI tables); every ref/harec/qbe cite, task cite, encoding/ELF contract, and rule-10 twin pointer kept; lost lifetime/rationale lines restored where the sweep over-cut (elf_globals ownership, kwtab linear-scan). Comment- only proven: all five wwstage tool binaries byte-identical across the sweep; test-commit, test-byteid (161+1399, 0 pinned-divergent), and test-bootstrap (fixed point + 991-995 byte-id) all exit 0. The read-through banked 66 latent-bug leads (checkpoint).
This commit is contained in:
@@ -1,6 +1,4 @@
|
||||
// selfhost/cmd/w6a/main.ww — port of cmd/w6a/main.c.
|
||||
//
|
||||
// w6a = amd64 assembler. Read .s, parse, encode, emit ELF .o.
|
||||
// Port of cmd/w6a/main.c.
|
||||
//
|
||||
// w6a_ww -o file.o file.s
|
||||
|
||||
@@ -33,8 +31,7 @@ fn cstrlen(p: *u8) u64 = {
|
||||
return n;
|
||||
};
|
||||
|
||||
// pathstr — view a NUL-terminated *u8 as a str. Bridges argv-style
|
||||
// callers to lib/os entrypoints (str post-task-#23).
|
||||
// Bridges argv-style callers to lib/os entrypoints (str post-task-#23).
|
||||
fn pathstr(p: *u8) str = {
|
||||
let r: str;
|
||||
r.ptr = p;
|
||||
@@ -42,7 +39,6 @@ fn pathstr(p: *u8) str = {
|
||||
return r;
|
||||
};
|
||||
|
||||
// Slurp the whole file into a fresh buffer.
|
||||
fn slurp(path: *u8) (*u8, u64) = {
|
||||
let fd: i32 = os.open(pathstr(path), os.flag.RDONLY, 0i32);
|
||||
if (fd < 0) { return nil, 0u64; };
|
||||
@@ -122,7 +118,6 @@ export fn main(argc: i32, argv: **u8) i32 = {
|
||||
if (parse(&s) != 0) { return 1; };
|
||||
if (encode(&s) != 0) { return 1; };
|
||||
|
||||
// Open output for write.
|
||||
let fd: i32 = os.open(pathstr(out), os.flag.WRONLY | os.flag.CREATE | os.flag.TRUNC, 420i32); // 0o644
|
||||
if (fd < 0) {
|
||||
os.write(2, "w6a: cannot open output\n".ptr, 23u64);
|
||||
|
||||
Reference in New Issue
Block a user