comments: drop retired lint markers, re-cite migrated carriers
peel-ok/sizelint-ok/primsize-ok annotations lose their tools; sites keep the WHY in plain words. Citations of retired carriers move to their fixture or @test successors (949_errtype_compare -> r949_*, 900_stdlib -> library owners).
This commit is contained in:
@@ -770,10 +770,9 @@ nullable_ptr_tag(Type *t)
|
||||
if (t == NULL || t->kind != TY_TAGGED) return 0;
|
||||
int i = 0;
|
||||
for (Tparam *p = t->params; p; p = p->next, i++) {
|
||||
/* peel-ok: single peel PROBE-CLEARED (batch-2 c3-B2,
|
||||
* 018ef66) — constructible variant params never carry
|
||||
* 2+-level NAMED at this scan; ww twin cgenutil.ww:2758
|
||||
* carries the identical annotated peel. */
|
||||
/* A single-level inspection is sufficient here (batch-2 c3-B2,
|
||||
* 018ef66): constructible variant params never carry nested
|
||||
* NAMED layers at this scan; the ww twin uses the same invariant. */
|
||||
Type *pu = (p->type && p->type->kind == TY_NAMED)
|
||||
? p->type->under : p->type;
|
||||
if (pu && pu->kind == TY_PTR) return i;
|
||||
@@ -849,7 +848,7 @@ cg_variant_match(Type *vt, Type *src)
|
||||
* Sound only while the model is nominal-lossy; the collision
|
||||
* guard at the widen site (cg_widen_tagged_store) enforces the
|
||||
* invariant for when #199b/B-full lands true nominal layout.
|
||||
* peel-ok (#218, B5-c1): these single peels serve ONLY the
|
||||
* These single-level inspections serve ONLY the
|
||||
* both-TAGGED structural fallback — a NAMED struct source vs
|
||||
* a NAMED variant falls through every arm at ANY depth
|
||||
* (.ai/ken-b5-oracle.md §4: kb5_v2s1i both-wrong-identical
|
||||
@@ -875,7 +874,7 @@ cg_variant_match(Type *vt, Type *src)
|
||||
static int
|
||||
cg_variant_struct_match(Type *vt, Type *src)
|
||||
{
|
||||
/* peel-ok (#218, B5-c1): shape-only collision count for the
|
||||
/* Shape-only collision count for the
|
||||
* both-TAGGED fallback above — same probe record, task #95
|
||||
* (.ai/ken-b5-oracle.md §4). */
|
||||
Type *vu = (vt && vt->kind == TY_NAMED) ? vt->under : vt;
|
||||
|
||||
@@ -105,7 +105,7 @@ resolve_typename(Checker *c, Node *n)
|
||||
* handing its type out; no consumer may ever see the size-0
|
||||
* placeholder. Mirrors wwstage's demand-driven tinfofornode, the
|
||||
* measured order-independent side. */
|
||||
/* peel-ok: under==NULL probes resolve state, not a dealias */
|
||||
/* A missing underlying type is the unresolved-state marker. */
|
||||
if (s->type && s->type->kind == TY_NAMED && s->type->under == NULL
|
||||
&& s->decl && s->decl->kind == N_TYPEDECL)
|
||||
resolve_typedecl(c, s->decl);
|
||||
@@ -785,7 +785,7 @@ resolve_type(Checker *c, Node *n)
|
||||
|| eu->kind == TY_TAGGED))
|
||||
sz += (eu->size + 7) & ~(u64)7;
|
||||
else if (eu == NULL || eu->kind != TY_VOID)
|
||||
sz += 8; /* sizelint-ok: the slot IS the 8B eightbyte */
|
||||
sz += 8; /* Each scalar occupies one SysV eightbyte. */
|
||||
}
|
||||
if (head == NULL) head = tp;
|
||||
else tail->next = tp;
|
||||
@@ -1073,8 +1073,8 @@ unify_arith(Checker *c, Pos p, Type *a, Type *b)
|
||||
* a plain i32 — type_eq ignores iserror (primitives compare by
|
||||
* kind), but harec interns flags into DISTINCT types, so flagged-
|
||||
* vs-unflagged never reaches type_promote's dealias-equal arm. The
|
||||
* #246 loud (strconv.invalid != i32, pinned by 949_errtype_compare
|
||||
* on BOTH stages) rides this reject. */
|
||||
* #246 loud (strconv.invalid != i32, pinned by the r949_errtype_*
|
||||
* fixtures on BOTH stages) rides this reject. */
|
||||
{
|
||||
Type *da = type_chase_named(a);
|
||||
Type *db = type_chase_named(b);
|
||||
@@ -2371,7 +2371,7 @@ cexpr(Checker *c, Node *n)
|
||||
|| eu->kind == TY_TAGGED))
|
||||
sz += (eu->size + 7) & ~(u64)7;
|
||||
else if (eu == NULL || eu->kind != TY_VOID)
|
||||
sz += 8; /* sizelint-ok: the slot IS the 8B eightbyte */
|
||||
sz += 8; /* Each scalar occupies one SysV eightbyte. */
|
||||
if (head == NULL) head = tp;
|
||||
else tail->next = tp;
|
||||
tail = tp;
|
||||
@@ -2860,7 +2860,7 @@ static void
|
||||
resolve_typedecl(Checker *c, Node *d)
|
||||
{
|
||||
Type *t = d->type;
|
||||
/* peel-ok: under!=NULL probes resolve state, not a dealias */
|
||||
/* A present underlying type is the resolved-state marker. */
|
||||
if (t == NULL || t->under != NULL || t->resolving) return;
|
||||
t->resolving = 1;
|
||||
const char *save = c->cur_mod;
|
||||
@@ -2875,7 +2875,7 @@ resolve_typedecl(Checker *c, Node *d)
|
||||
if (circular_named(c, under, d->pos))
|
||||
under = ty_err;
|
||||
t->resolving = 0;
|
||||
t->under = under; /* peel-ok: construction */
|
||||
t->under = under;
|
||||
if (under) {
|
||||
t->size = under->size;
|
||||
t->align = under->align;
|
||||
|
||||
@@ -75,7 +75,7 @@ typesinit(Arena *a)
|
||||
* the same way a user-declared alias would. */
|
||||
ty_nomem = newtype(a, TY_NAMED);
|
||||
ty_nomem->name = "nomem";
|
||||
ty_nomem->under = ty_void; /* peel-ok: construction */
|
||||
ty_nomem->under = ty_void;
|
||||
ty_nomem->size = ty_void->size;
|
||||
ty_nomem->align = ty_void->align;
|
||||
ty_nomem->iserror = 1;
|
||||
@@ -107,7 +107,7 @@ type_slice(Arena *a, Type *sub)
|
||||
{
|
||||
Type *t = newtype(a, TY_SLICE);
|
||||
t->sub = sub;
|
||||
t->size = 24; /* { *T, len, cap } */ /* sizelint-ok: SSoT for ty_slice (#64) */
|
||||
t->size = 24; /* Slice headers carry pointer, length, and capacity. */
|
||||
t->align = 8;
|
||||
return t;
|
||||
}
|
||||
@@ -138,7 +138,7 @@ type_named(Arena *a, const char *name, Type *under)
|
||||
{
|
||||
Type *t = newtype(a, TY_NAMED);
|
||||
t->name = name;
|
||||
t->under = under; /* peel-ok: construction */
|
||||
t->under = under;
|
||||
if (under) {
|
||||
t->size = under->size;
|
||||
t->align = under->align;
|
||||
@@ -159,7 +159,7 @@ type_named(Arena *a, const char *name, Type *under)
|
||||
Type *
|
||||
type_chase_named(Type *t)
|
||||
{
|
||||
while (t && t->kind == TY_NAMED) t = t->under; /* peel-ok: chase body */
|
||||
while (t && t->kind == TY_NAMED) t = t->under;
|
||||
return t;
|
||||
}
|
||||
|
||||
@@ -176,7 +176,7 @@ type_isint(Type *t)
|
||||
case TY_UNTYPED_RUNE:
|
||||
return 1;
|
||||
case TY_ENUM: return type_isint(t->sub);
|
||||
case TY_NAMED: /* peel-ok: recursive chase */
|
||||
case TY_NAMED:
|
||||
return type_isint(t->under);
|
||||
default: return 0;
|
||||
}
|
||||
@@ -189,7 +189,7 @@ type_isfloat(Type *t)
|
||||
switch (t->kind) {
|
||||
case TY_F32: case TY_F64: case TY_UNTYPED_FLOAT:
|
||||
return 1;
|
||||
case TY_NAMED: /* peel-ok: recursive chase */
|
||||
case TY_NAMED:
|
||||
return type_isfloat(t->under);
|
||||
default: return 0;
|
||||
}
|
||||
@@ -210,7 +210,7 @@ type_isunsigned(Type *t)
|
||||
case TY_UINT: case TY_UINTPTR: case TY_SIZE:
|
||||
case TY_RUNE:
|
||||
return 1;
|
||||
case TY_NAMED: /* peel-ok: recursive chase */
|
||||
case TY_NAMED:
|
||||
return type_isunsigned(t->under);
|
||||
case TY_ENUM: return type_isunsigned(t->sub);
|
||||
default: return 0;
|
||||
|
||||
Reference in New Issue
Block a user