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,10 +1,6 @@
|
||||
/*
|
||||
* type.c — Type values and structural equality.
|
||||
*
|
||||
* Built-in types are constructed once and exposed as globals so the
|
||||
* rest of the compiler can `==`-compare them. Compound types (ptr,
|
||||
* slice, array, fn, struct, chan) are constructed on demand and
|
||||
* de-duplicated when equality is cheap (only ptr/slice for now).
|
||||
* rest of the compiler can `==`-compare them.
|
||||
*/
|
||||
#include "ww.h"
|
||||
#include <string.h>
|
||||
@@ -147,8 +143,7 @@ type_named(Arena *a, const char *name, Type *under)
|
||||
return t;
|
||||
}
|
||||
|
||||
/* type_chase_named — walk the TY_NAMED.under chain to the deepest non-
|
||||
* named type. Chain-of-aliases (#22): `type b = a; type a = struct;`
|
||||
/* Chain-of-aliases (#22): `type b = a; type a = struct;`
|
||||
* stacks two TY_NAMED layers — a single peel leaves `t` pointing at
|
||||
* the inner alias (still TY_NAMED), so kind-gated arms (TY_STRUCT,
|
||||
* TY_SLICE, TY_TAGGED, TY_PTR) miss and the consumer silently falls
|
||||
@@ -372,7 +367,6 @@ type_assignable(Type *dst, Type *src)
|
||||
}
|
||||
}
|
||||
|
||||
/* Untyped → typed: only if the typed kind can hold the value. */
|
||||
if (type_isuntyped(src)) {
|
||||
Type *du = type_chase_named(dst);
|
||||
if (src->kind == TY_UNTYPED_INT && type_isnum(dst)) return 1;
|
||||
|
||||
Reference in New Issue
Block a user