cleanup: drop resolved-issue citations from src comments
Sweep all src/**.zig comments that cite resolved issues (issue NNNN / fix-NNNN / KB-N): the invariant or mechanism each comment states is kept; the historical citation is dropped, per the no-conclusion-comments rule. Pure-history parentheticals are removed outright. References to the 16 still-open issues (0030, 0041-0056) are untouched, as are test NAMES carrying regression provenance (matching the sanctioned "Regression (issue NNNN)" example-header convention). Also removes the issues/0019-import-non-transitive-c-scope/ fixture dir — the issue is superseded and its behavior is covered by examples/0706-modules-import-non-transitive.sx (the .md writeup stays). issues/0030's repro .sx stays: that issue is an open feature request. Gate: zig build OK; zig build test 426/426; run_examples 541/0; zero expected/ snapshot churn.
This commit is contained in:
@@ -214,13 +214,13 @@ pub const Lowering = struct {
|
||||
/// Identity map: authoring `*const ast.FnDecl` → the FuncId `declareFunction`
|
||||
/// created for it. The name-keyed function table (`resolveFuncByName`) returns
|
||||
/// the FIRST author of a name, so two same-name authors collide there; this
|
||||
/// map addresses each author's OWN slot by decl identity (fix-0102b), letting
|
||||
/// map addresses each author's OWN slot by decl identity, letting
|
||||
/// a SHADOWED author lower its body into a distinct FuncId.
|
||||
fn_decl_fids: std.AutoHashMap(*const ast.FnDecl, FuncId),
|
||||
/// FuncId-keyed lowered tracking — the identity twin of `lowered_functions`
|
||||
/// (which keys by name). A shadowed same-name author shares the winner's name
|
||||
/// but not its FuncId, so name-keyed tracking can't tell them apart; this
|
||||
/// records which specific FuncIds have had a real body lowered (fix-0102b).
|
||||
/// records which specific FuncIds have had a real body lowered.
|
||||
lowered_fids: std.AutoHashMap(FuncId, void),
|
||||
local_fn_counter: u32 = 0, // unique counter for mangling local function names
|
||||
/// Per-declaration nominal identity bookkeeping (E2). The FIRST source to
|
||||
@@ -228,7 +228,7 @@ pub const Lowering = struct {
|
||||
/// byte-identical to pre-E2 single-author registration); a later registration
|
||||
/// of the same name from a DIFFERENT source is a same-name SHADOW and gets a
|
||||
/// fresh id from `next_nominal_id`, so the two authors intern to DISTINCT
|
||||
/// TypeIds (closing issue 0105's last-wins collapse). `nominal_name_authors`
|
||||
/// TypeIds (closing the last-wins collapse). `nominal_name_authors`
|
||||
/// records each name's first author source to make that decision.
|
||||
nominal_name_authors: std.AutoHashMap(types.StringId, []const u8),
|
||||
next_nominal_id: u32 = 0,
|
||||
@@ -419,7 +419,7 @@ pub const Lowering = struct {
|
||||
/// `restore` puts the caller's state back. Lowering a callee must be
|
||||
/// transparent to the caller's own lowering — notably `block_terminated`,
|
||||
/// which leaking back would mark the caller's trailing statements
|
||||
/// dead-after-terminator (issue 0100 F2).
|
||||
/// dead-after-terminator.
|
||||
pub const FnBodyReentry = struct {
|
||||
l: *Lowering,
|
||||
func: ?FuncId,
|
||||
@@ -543,7 +543,7 @@ pub const Lowering = struct {
|
||||
// params aren't pushed into `self.scope` until body lowering, so bind
|
||||
// them into a temporary scope here; otherwise `inferExprType` can't
|
||||
// resolve `x`, the inference yields `.unresolved`, and that reaches LLVM
|
||||
// emission as `func.ret` (issue 0059). Whether it slipped through used to
|
||||
// emission as `func.ret`. Whether it slipped through used to
|
||||
// depend on a same-named binding lingering from earlier lowering.
|
||||
var tmp_scope = Scope.init(self.alloc, self.scope);
|
||||
defer tmp_scope.deinit();
|
||||
@@ -647,7 +647,7 @@ pub const Lowering = struct {
|
||||
/// bare-visible only inside the callee's own module — namespaced-only from the
|
||||
/// call site's view. Post-E1 the bare leaf is source-aware, so resolving that
|
||||
/// return type in the CALL SITE's context would wrongly reject it (the type
|
||||
/// analog of the issue-0100-F1 source pin that lowers a namespaced fn body in
|
||||
/// analog of the namespaced-fn-body source pin that lowers a namespaced fn body in
|
||||
/// its own module's context). `src == null` falls back to the call site's
|
||||
/// context unchanged.
|
||||
pub fn resolveTypeInSource(self: *Lowering, src: ?[]const u8, type_ann: *const Node) TypeId {
|
||||
@@ -706,13 +706,13 @@ pub const Lowering = struct {
|
||||
/// value / module-const tables the stateful lowering owns) and is narrowed to
|
||||
/// `u32` through the single range-checked `program_index.foldDimU32` — never a
|
||||
/// bare `@intCast`, so an oversized-but-valid `i64` dim (`[5_000_000_000]`)
|
||||
/// diagnoses instead of panicking the compiler (issue 0087). A dimension that
|
||||
/// diagnoses instead of panicking the compiler. A dimension that
|
||||
/// isn't a compile-time integer (or doesn't fit a `u32`) is a hard error:
|
||||
/// emit a diagnostic so the driver aborts (`hasErrors()`), then return a
|
||||
/// harmless `0` so body lowering finishes without touching the `.unresolved`
|
||||
/// sentinel (which would `@panic` in `sizeOf` mid-lowering, before the
|
||||
/// diagnostic surfaces). The diagnostic — not the returned length — is what
|
||||
/// guarantees no garbage ships (issue 0083).
|
||||
/// guarantees no garbage ships.
|
||||
pub fn resolveArrayLen(self: *Lowering, len_node: *const Node) ?u32 {
|
||||
const result = program_index_mod.foldDimU32(len_node, self, 0);
|
||||
if (result == .ok) return result.ok;
|
||||
@@ -720,7 +720,7 @@ pub const Lowering = struct {
|
||||
// shared diagnostic (single wording source — `program_index.reportDimError`,
|
||||
// also used by the stateless alias path so the two cannot diverge) and
|
||||
// return null so `resolveCompound` yields the `.unresolved` sentinel — NO
|
||||
// fabricated length (issue 0083: a `0` here gives a 0-byte alloca and OOB
|
||||
// fabricated length (a `0` here gives a 0-byte alloca and OOB
|
||||
// element access). Lowering the binding never computes the failed type's
|
||||
// size: `alloca` records the type but defers `sizeOf` to LLVM emission,
|
||||
// which the emitted diagnostic pre-empts via `hasErrors()`, and a
|
||||
@@ -764,7 +764,7 @@ pub const Lowering = struct {
|
||||
/// True iff `name` is a FLOAT-valued module const (`F : f64 : 2.5`,
|
||||
/// `K : f64 : 4.0`, untyped `M :: 4.0`, untyped-EXPR `ME :: 4.0 + 1.0`). The
|
||||
/// int folder's division arm consults this so a `/` with a float-const operand
|
||||
/// is recognised as float division (issue 0095 / F0.11-6). Comptime / generic
|
||||
/// is recognised as float division. Comptime / generic
|
||||
/// value bindings are always integer-valued, so only the module-const table
|
||||
/// can name a float.
|
||||
pub fn nameIsFloatTyped(self: *Lowering, name: []const u8) bool {
|
||||
@@ -894,7 +894,7 @@ pub const Lowering = struct {
|
||||
.identifier => |id| return self.resolveNominalLeaf(id.name, id.is_raw, node.span),
|
||||
// A non-spread tuple literal in a type position is a tuple-type
|
||||
// literal (`(s32, s32)`); validate its elements are types and reject
|
||||
// non-type elements loudly (issue 0067).
|
||||
// non-type elements loudly.
|
||||
.tuple_literal => return self.resolveTupleLiteralTypeArg(node),
|
||||
else => return type_bridge.resolveAstType(node, &self.module.types, &self.program_index.type_alias_map, &self.program_index.module_const_map),
|
||||
}
|
||||
@@ -912,7 +912,7 @@ pub const Lowering = struct {
|
||||
/// (`Vector(4, f32)`), a module/generic const (`Vector(N, f32)`), and a const
|
||||
/// expression (`Vector(M + 1, f32)`) all resolve identically, and the i64→u32
|
||||
/// narrowing is range-checked (an oversized lane diagnoses instead of
|
||||
/// panicking — issue 0087). A non-const lane (`Vector(get(), f32)`) or a
|
||||
/// panicking). A non-const lane (`Vector(get(), f32)`) or a
|
||||
/// non-positive one emits a clean diagnostic and returns null; the caller
|
||||
/// yields `.unresolved` rather than fabricating a `<0 x float>` lane count
|
||||
/// that crashes LLVM verification.
|
||||
@@ -1045,7 +1045,7 @@ pub const Lowering = struct {
|
||||
pub fn emitFieldError(self: *Lowering, obj_ty: TypeId, field: []const u8, span: ast.Span) Ref {
|
||||
// A field access on an already-`.unresolved` object is a cascade from an
|
||||
// upstream type-resolution failure that was ALREADY diagnosed (e.g. an
|
||||
// unresolvable / oversized array dimension — issue 0083). The
|
||||
// unresolvable / oversized array dimension). The
|
||||
// `.unresolved` sentinel never exists without an accompanying error, so
|
||||
// piling a second "field not found on unresolved" onto the real one is
|
||||
// pure noise; stay silent and return a placeholder so lowering finishes
|
||||
@@ -1173,7 +1173,7 @@ pub const Lowering = struct {
|
||||
}
|
||||
|
||||
/// Human-readable description of a typed module-const initializer, used in
|
||||
/// the issue-0088 type-mismatch diagnostic. A literal names its kind; a
|
||||
/// the typed-const type-mismatch diagnostic. A literal names its kind; a
|
||||
/// const-expression is described by its inferred type category, so the
|
||||
/// message is accurate for `N : string : M + 2` ("an integer expression")
|
||||
/// as well as for `N : string : 4` ("an integer literal").
|
||||
|
||||
Reference in New Issue
Block a user