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,13 +1,6 @@
|
||||
// selfhost/cmd/wwdump/main.ww — ww-side port of cmd/wwdump/main.c.
|
||||
//
|
||||
// Reads a .ww file, runs the ww-side lexer, prints tokens through
|
||||
// the ww-side tokprint. The 990_selfhost test diffs this output
|
||||
// byte-for-byte against the C-side wwdump on the same file. Any
|
||||
// Port of cmd/wwdump/main.c. The 990_selfhost test diffs token output
|
||||
// byte-for-byte against the C-side wwdump on the same file; any
|
||||
// divergence is a port bug in lex.ww or tok.ww.
|
||||
//
|
||||
// Modes:
|
||||
// wwdump -t file.ww tokens (default)
|
||||
// wwdump -a file.ww AST (not yet implemented; reserved)
|
||||
|
||||
package main;
|
||||
|
||||
@@ -17,10 +10,8 @@ import check;
|
||||
import cgen;
|
||||
import strconv;
|
||||
|
||||
// ---- argv helpers -----------------------------------------------------
|
||||
|
||||
// argstrlen — strlen on a NUL-terminated *u8. argv strings are always
|
||||
// NUL-terminated (kernel-supplied) so this is safe.
|
||||
// argv strings are always NUL-terminated (kernel-supplied), so the
|
||||
// unbounded scan is safe.
|
||||
fn argstrlen(s: *u8) i32 = {
|
||||
let n: i32 = 0;
|
||||
for (s[n] != 0u8) { n += 1; };
|
||||
@@ -34,7 +25,6 @@ fn argstr(p: *u8) str = {
|
||||
return s;
|
||||
};
|
||||
|
||||
// streqlit — compare a NUL-terminated argv entry to a string literal.
|
||||
fn streqlit(p: *u8, lit: str) bool = {
|
||||
let i: i32 = 0;
|
||||
for (i < lit.len) {
|
||||
@@ -44,8 +34,6 @@ fn streqlit(p: *u8, lit: str) bool = {
|
||||
return p[i] == 0u8;
|
||||
};
|
||||
|
||||
// ---- main -------------------------------------------------------------
|
||||
|
||||
export fn main(argc: i32, argv: **u8) i32 = {
|
||||
let mode: i32 = 116; // 't'
|
||||
let path: *u8 = nil;
|
||||
@@ -142,7 +130,6 @@ export fn main(argc: i32, argv: **u8) i32 = {
|
||||
// Quiet by default; flip to 1 when debugging missing names.
|
||||
ck.verbose = 0;
|
||||
checkfile(&ck, f);
|
||||
// (close out the if-else chain — we'll close all braces below)
|
||||
// "<file>: <resolved>/<resolved+unresolved> resolved"
|
||||
os.write(1, argstr(path).ptr, argstrlen(path): u64);
|
||||
os.write(1, ": ".ptr, 2u64);
|
||||
|
||||
Reference in New Issue
Block a user