cleanup(B-review): fix stale section banners, merge alias block, prune imports
Review follow-up to the ARCH-B split (comment/import hygiene only, no code changes): - Section banners that travelled to the wrong file with the B1-B8 cuts are reworded to describe the section that actually follows (e.g. stmt.zig's trailing "Expression lowering", expr.zig's "Control flow" before lowerChainedComparison) or deleted where nothing follows (4 trailing-at-EOF banners). ffi.zig's facade note no longer claims the IMP builders "stay here" (they live in lower/objc_class.zig); protocol.zig's namespace-lookup banner now points at pack.zig:resolvePackProjection for the orchestrator. - lower.zig's two lower/expr.zig alias blocks (B8.1 + B8.2 appends) merged into one. - 448 unused header decls pruned from the 15 lower/*.zig files (each had inherited lower.zig's full import block; pruned to fixpoint so cascading type-extraction consts went too). Gate: zig build OK; zig build test 426/426; run_examples 541/0; zero expected/ snapshot churn.
This commit is contained in:
@@ -4,48 +4,18 @@ const ast = @import("../../ast.zig");
|
||||
const Node = ast.Node;
|
||||
const types = @import("../types.zig");
|
||||
const inst_mod = @import("../inst.zig");
|
||||
const mod_mod = @import("../module.zig");
|
||||
const type_bridge = @import("../type_bridge.zig");
|
||||
const unescape = @import("../../unescape.zig");
|
||||
const parser_mod = @import("../../parser.zig");
|
||||
const interp_mod = @import("../interp.zig");
|
||||
const errors = @import("../../errors.zig");
|
||||
const jni_descriptor = @import("../jni_descriptor.zig");
|
||||
const program_index_mod = @import("../program_index.zig");
|
||||
const resolver_mod = @import("../resolver.zig");
|
||||
const imports_mod = @import("../../imports.zig");
|
||||
const ProgramIndex = program_index_mod.ProgramIndex;
|
||||
const GlobalInfo = program_index_mod.GlobalInfo;
|
||||
const StructTemplate = program_index_mod.StructTemplate;
|
||||
const TemplateParam = program_index_mod.TemplateParam;
|
||||
const ProtocolDeclInfo = program_index_mod.ProtocolDeclInfo;
|
||||
const ProtocolMethodInfo = program_index_mod.ProtocolMethodInfo;
|
||||
const ModuleConstInfo = program_index_mod.ModuleConstInfo;
|
||||
const TypeResolver = @import("../type_resolver.zig").TypeResolver;
|
||||
const ResolveEnv = @import("../type_resolver.zig").ResolveEnv;
|
||||
const PackResolver = @import("../packs.zig").PackResolver;
|
||||
const ExprTyper = @import("../expr_typer.zig").ExprTyper;
|
||||
const CallResolver = @import("../calls.zig").CallResolver;
|
||||
const GenericResolver = @import("../generics.zig").GenericResolver;
|
||||
const ProtocolResolver = @import("../protocols.zig").ProtocolResolver;
|
||||
const CoercionResolver = @import("../conversions.zig").CoercionResolver;
|
||||
const ErrorAnalysis = @import("../error_analysis.zig").ErrorAnalysis;
|
||||
const ErrorFlow = @import("../error_flow.zig").ErrorFlow;
|
||||
const ObjcLowering = @import("../ffi_objc.zig").ObjcLowering;
|
||||
const semantic_diagnostics = @import("../semantic_diagnostics.zig");
|
||||
|
||||
const TypeId = types.TypeId;
|
||||
const StringId = types.StringId;
|
||||
const Ref = inst_mod.Ref;
|
||||
const BlockId = inst_mod.BlockId;
|
||||
const FuncId = inst_mod.FuncId;
|
||||
const Function = inst_mod.Function;
|
||||
const Module = mod_mod.Module;
|
||||
const Builder = mod_mod.Builder;
|
||||
|
||||
const lower = @import("../lower.zig");
|
||||
const Lowering = lower.Lowering;
|
||||
const Scope = lower.Scope;
|
||||
|
||||
/// Shared implementation for the `has_impl(P, T)` builtin and its
|
||||
/// `tryConstBoolCondition` arm. The protocol expression is either:
|
||||
@@ -193,7 +163,9 @@ pub fn instantiateParamProtocol(self: *Lowering, pd: *const ast.ProtocolDecl, ar
|
||||
return id;
|
||||
}
|
||||
|
||||
// ── Pack projection name resolution (Feature 1, Decision 4) ──────────
|
||||
// ── Protocol namespace lookups (pack projection, Feature 1, Decision 4) ──
|
||||
// (The position-driven orchestrator `resolvePackProjection` lives in
|
||||
// lower/pack.zig; these two lookups are its per-namespace halves.)
|
||||
//
|
||||
// A `..pack.<name>` projection can target two protocol namespaces:
|
||||
// - type-arg namespace: the `protocol($T, ...)` params.
|
||||
@@ -634,5 +606,3 @@ pub fn resolveConcreteTypeName(self: *Lowering, ty: TypeId) ?[]const u8 {
|
||||
if (info == .@"struct") return self.module.types.getString(info.@"struct".name);
|
||||
return null;
|
||||
}
|
||||
|
||||
// ── Helpers ─────────────────────────────────────────────────────
|
||||
|
||||
Reference in New Issue
Block a user