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:
@@ -100,8 +100,6 @@ static Node *parsetype(Parser *p);
|
||||
static Node *parseblock(Parser *p);
|
||||
static Node *parsestmt(Parser *p);
|
||||
|
||||
/* ------- type expressions ------------------------------------------ */
|
||||
|
||||
static Node *
|
||||
parseparams(Parser *p)
|
||||
{
|
||||
@@ -376,8 +374,6 @@ parsetype(Parser *p)
|
||||
}
|
||||
}
|
||||
|
||||
/* ------- expressions (Pratt) ---------------------------------------- */
|
||||
|
||||
/* binary precedence; 0 = not a binary op */
|
||||
static int
|
||||
bprec(Tkind k)
|
||||
@@ -663,10 +659,9 @@ parseprimary(Parser *p)
|
||||
n->str = t.text;
|
||||
n->strlen = t.tlen;
|
||||
advance(p);
|
||||
/* dotted ident chain folded into one IDENT for type-ish refs */
|
||||
while (p->cur.kind == TK_DOT && peek(p).kind == TK_IDENT) {
|
||||
advance(p);
|
||||
n = (Node*)n; /* keep stable */
|
||||
n = (Node*)n;
|
||||
Node *mr = newnode(p->a, N_DOT, pp);
|
||||
mr->lhs = n;
|
||||
mr->str = p->cur.text;
|
||||
@@ -674,7 +669,6 @@ parseprimary(Parser *p)
|
||||
advance(p);
|
||||
n = mr;
|
||||
}
|
||||
/* struct literal: ident '{' ... '}' (only if ident-shaped) */
|
||||
if (p->cur.kind == TK_LBRACE) {
|
||||
/* #76: bare `Foo{}` keeps the N_IDENT fast-path; a
|
||||
* qualified `pkg.Type{}` (N_DOT chain) flattens first. */
|
||||
@@ -902,8 +896,6 @@ parseexpr_top(Parser *p)
|
||||
return parseexpr(p);
|
||||
}
|
||||
|
||||
/* ------- statements ------------------------------------------------- */
|
||||
|
||||
static Node *
|
||||
parselet(Parser *p, int top)
|
||||
{
|
||||
@@ -944,7 +936,6 @@ parselet(Parser *p, int top)
|
||||
return m;
|
||||
}
|
||||
|
||||
/* parse first binding */
|
||||
Pos lp = p->cur.pos;
|
||||
Node *first = newnode(p->a, N_LET, lp);
|
||||
first->str = expectbindname(p);
|
||||
@@ -952,7 +943,6 @@ parselet(Parser *p, int top)
|
||||
first->lhs = parsetype(p);
|
||||
|
||||
if (p->cur.kind == TK_COMMA) {
|
||||
/* multi-let: collect (name, type) pairs, then '=' rhs */
|
||||
Node *m = newnode(p->a, N_MLET, pp);
|
||||
Node *head = first, *tail = first;
|
||||
while (accept(p, TK_COMMA)) {
|
||||
@@ -1038,7 +1028,7 @@ parsefor(Parser *p)
|
||||
* Tuple destructure: `let (a, b) .. expr`. */
|
||||
Tok save_cur = p->cur;
|
||||
(void)save_cur;
|
||||
advance(p); /* consume LET */
|
||||
advance(p);
|
||||
if (p->cur.kind == TK_LPAREN) {
|
||||
advance(p);
|
||||
Node *names = NULL, *tail = NULL;
|
||||
@@ -1067,8 +1057,8 @@ parsefor(Parser *p)
|
||||
int isunder = p->cur.kind == TK_UNDER;
|
||||
Tok la = peek(p);
|
||||
if (la.kind == TK_DOTDOT) {
|
||||
advance(p); /* consume IDENT/UNDER */
|
||||
advance(p); /* consume DOTDOT */
|
||||
advance(p);
|
||||
advance(p);
|
||||
Node *rng = newnode(p->a, N_FORRANGE, pp);
|
||||
rng->str = isunder ? "" : nm;
|
||||
rng->lhs = parseexpr(p);
|
||||
@@ -1283,8 +1273,6 @@ parseblock(Parser *p)
|
||||
return n;
|
||||
}
|
||||
|
||||
/* ------- top-level decls ------------------------------------------- */
|
||||
|
||||
/* `import encoding.utf8;` — the driver resolves the dotted path to a
|
||||
* directory; the checker only needs the leaf (`utf8`) as the module
|
||||
* bareword for n_use→decl disambiguation, mirroring Hare's
|
||||
|
||||
Reference in New Issue
Block a user