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:
@@ -22,8 +22,8 @@
|
||||
// (io fold-2, #5), so the dispatchers ARE the public
|
||||
// surface and grow the `handle` match when #5 lands.
|
||||
// empty the discard+EOF stream (ref/hare/io/empty.ha:13). Lives
|
||||
// here rather than io.ww so that 900_stdlib can compile
|
||||
// io.ww standalone (io.ww has no cross-file type refs).
|
||||
// here rather than io.ww so io.ww remains a standalone
|
||||
// frontend input with no cross-file type references.
|
||||
//
|
||||
// Deferrals (drew-signed): `seeker` lands with io fold-2 (#5) once `off`
|
||||
// + `whence` plug into the signature. Hare's `?`-propagating `close`
|
||||
@@ -196,8 +196,8 @@ export fn tell(h: handle) (off | error) = {
|
||||
// vtable is a module-level `let` and [[empty]] is a function that wires
|
||||
// the fn-ptr slots on every call and returns the stream pointer.
|
||||
// Single-assignment on the same words: idempotent under re-entry.
|
||||
// Lives in stream.ww (not io.ww) so that 900_stdlib can compile io.ww
|
||||
// standalone without referencing the cross-file vtable/reader/writer types.
|
||||
// Lives in stream.ww (not io.ww) so io.ww stays standalone without
|
||||
// referencing the cross-file vtable/reader/writer types.
|
||||
|
||||
fn _empty_read(s: stream, buf: []u8) (size | eof | error) = {
|
||||
let e: eof;
|
||||
|
||||
@@ -10,12 +10,13 @@
|
||||
// the non-T @test drop, #6). Load-bearing ww-compiler coverage (drove
|
||||
// #34/#38/#44/#45/#48), not black-box-reachable.
|
||||
//
|
||||
// `_whitebox.ww` (NOT *_test.ww) keeps this file in the production
|
||||
// enumerator's root-package assembly until package-aware testing can classify
|
||||
// same-package `*_test.ww` files (T1). The T0 gate resolves `regex` as the root
|
||||
// directory so -T sees these tests directly; importing regex as a dependency
|
||||
// would strip them. Public-API tests remain a separate `package regex_test`
|
||||
// binary in lib/regex/regex_test.ww (CLAUDE.md rule 9).
|
||||
// This noncanonical `_whitebox.ww` name is retained during migration. The
|
||||
// package planner's explicit compatibility rule recognizes its line-leading
|
||||
// @test declarations and assembles it with the production `regex` sources;
|
||||
// ordinary production files merely ending in `test.ww` stay production.
|
||||
// Importing regex as a dependency still strips these tests. Public-API tests
|
||||
// remain a separate `package regex_test` binary in lib/regex/regex_test.ww
|
||||
// (CLAUDE.md rule 9).
|
||||
package regex;
|
||||
|
||||
import io;
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
//
|
||||
// Hare splits this across types.ha/search.ha/bisect.ha; ww merges a
|
||||
// module into one file (same convention as lib/types/types.ww merging
|
||||
// Hare's limits.ha + arch+x86_64.ha), and 900_stdlib smoke-compiles
|
||||
// lib/sort/sort.ww standalone, which a split would break.
|
||||
// Hare's limits.ha + arch+x86_64.ha). test/wcc/963_sort_run.c compiles
|
||||
// and executes this sole-source package directly.
|
||||
//
|
||||
// Divergences from the Hare source, all forced by ww's surface (not
|
||||
// behavioural — rule-10 align-down):
|
||||
|
||||
@@ -280,9 +280,10 @@ export fn typeptr(sub: *tinfo) *tinfo = {
|
||||
export fn typeslice(sub: *tinfo) *tinfo = {
|
||||
let t: *tinfo = newtype(tykind.TY_SLICE);
|
||||
t.sub = sub;
|
||||
t.size = 24u64; // sizelint-ok: SSoT for slice header (#64)
|
||||
// Slice headers carry pointer, length, and capacity (#64).
|
||||
t.size = 24u64;
|
||||
t.align = 8u64;
|
||||
t.slotsize = 24u64; // sizelint-ok: SSoT for slice slotsize (#64)
|
||||
t.slotsize = 24u64;
|
||||
return t;
|
||||
};
|
||||
|
||||
@@ -316,7 +317,7 @@ export fn typechan(sub: *tinfo) *tinfo = {
|
||||
export fn typenamed(name: str, under: *tinfo) *tinfo = {
|
||||
let t: *tinfo = newtype(tykind.TY_NAMED);
|
||||
t.name = name;
|
||||
t.under = under; // peel-ok: construction
|
||||
t.under = under;
|
||||
if (under != nil) {
|
||||
t.size = under.size;
|
||||
t.align = under.align;
|
||||
@@ -373,7 +374,6 @@ export fn typeisint(t: *tinfo) bool = {
|
||||
if (k == tykind.TY_UNTYPED_INT) { return true; };
|
||||
if (k == tykind.TY_UNTYPED_RUNE) { return true; };
|
||||
if (k == tykind.TY_ENUM) { return typeisint(t.sub); };
|
||||
// peel-ok: recursive chase
|
||||
if (k == tykind.TY_NAMED) { return typeisint(t.under); };
|
||||
return false;
|
||||
};
|
||||
@@ -384,7 +384,6 @@ export fn typeisfloat(t: *tinfo) bool = {
|
||||
if (k == tykind.TY_F32) { return true; };
|
||||
if (k == tykind.TY_F64) { return true; };
|
||||
if (k == tykind.TY_UNTYPED_FLOAT) { return true; };
|
||||
// peel-ok: recursive chase
|
||||
if (k == tykind.TY_NAMED) { return typeisfloat(t.under); };
|
||||
return false;
|
||||
};
|
||||
@@ -409,7 +408,6 @@ export fn typeisunsigned(t: *tinfo) bool = {
|
||||
if (k == tykind.TY_UINTPTR) { return true; };
|
||||
if (k == tykind.TY_SIZE) { return true; };
|
||||
if (k == tykind.TY_RUNE){ return true; };
|
||||
// peel-ok: recursive chase
|
||||
if (k == tykind.TY_NAMED) { return typeisunsigned(t.under); };
|
||||
if (k == tykind.TY_ENUM) { return typeisunsigned(t.sub); };
|
||||
return false;
|
||||
@@ -436,7 +434,6 @@ export fn typeisstr(t: *tinfo) bool = {
|
||||
let k: tykind = t.kind;
|
||||
if (k == tykind.TY_STR) { return true; };
|
||||
if (k == tykind.TY_UNTYPED_STR) { return true; };
|
||||
// peel-ok: recursive chase
|
||||
if (k == tykind.TY_NAMED) { return typeisstr(t.under); };
|
||||
return false;
|
||||
};
|
||||
@@ -446,7 +443,6 @@ export fn typeisslice(t: *tinfo) bool = {
|
||||
if (t == nil) { return false; };
|
||||
let k: tykind = t.kind;
|
||||
if (k == tykind.TY_SLICE) { return true; };
|
||||
// peel-ok: recursive chase
|
||||
if (k == tykind.TY_NAMED) { return typeisslice(t.under); };
|
||||
return false;
|
||||
};
|
||||
@@ -462,7 +458,6 @@ export fn typeistagged(t: *tinfo) bool = {
|
||||
if (t == nil) { return false; };
|
||||
let k: tykind = t.kind;
|
||||
if (k == tykind.TY_TAGGED) { return true; };
|
||||
// peel-ok: recursive chase
|
||||
if (k == tykind.TY_NAMED) { return typeistagged(t.under); };
|
||||
return false;
|
||||
};
|
||||
@@ -474,7 +469,6 @@ export fn typeisf32(t: *tinfo) bool = {
|
||||
if (t == nil) { return false; };
|
||||
let k: tykind = t.kind;
|
||||
if (k == tykind.TY_F32) { return true; };
|
||||
// peel-ok: recursive chase
|
||||
if (k == tykind.TY_NAMED) { return typeisf32(t.under); };
|
||||
return false;
|
||||
};
|
||||
@@ -487,7 +481,6 @@ export fn typeisnullable(t: *tinfo) bool = {
|
||||
if (t == nil) { return false; };
|
||||
let k: tykind = t.kind;
|
||||
if (k == tykind.TY_TAGGED) { return t.nullable != 0; };
|
||||
// peel-ok: recursive chase
|
||||
if (k == tykind.TY_NAMED) { return typeisnullable(t.under); };
|
||||
return false;
|
||||
};
|
||||
@@ -513,7 +506,6 @@ export fn typeis8byteprim(t: *tinfo) bool = {
|
||||
if (k == tykind.TY_STR) { return false; };
|
||||
if (k == tykind.TY_STRUCT) { return false; };
|
||||
if (k == tykind.TY_ARRAY) { return t.size == 8u64; };
|
||||
// peel-ok: recursive chase
|
||||
if (k == tykind.TY_NAMED) { return typeis8byteprim(t.under); };
|
||||
// Remaining: primitives (i8/u8/.../i64/u64/bool/rune/f32/f64/
|
||||
// int/uint/uintptr) and TY_VOID. All slot-pad to 8 and zero-init
|
||||
|
||||
Reference in New Issue
Block a user