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:
@@ -6,42 +6,14 @@ 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");
|
||||
@@ -378,7 +350,8 @@ pub fn lowerForeignMethodCall(
|
||||
// Pure Obj-C decision helpers (selector derivation, type-encoding, ARC
|
||||
// property-kind, class-pointer recognition, state-struct planning) live in
|
||||
// `ffi_objc.zig` (`ObjcLowering`, a `*Lowering` facade). Reached via
|
||||
// `self.objc()`. Emission-heavy IMP builders + `lowerObjc*Call` stay here.
|
||||
// `self.objc()`. Emission-heavy IMP builders live in lower/objc_class.zig;
|
||||
// the `lowerObjc*Call` lowering paths are below.
|
||||
|
||||
/// Resolve a foreign-class member type, substituting `Self` (and `*Self`)
|
||||
/// with the foreign class's own struct type. Without this substitution
|
||||
@@ -805,7 +778,7 @@ pub fn lowerSuperCall(
|
||||
} }, ret_ty);
|
||||
}
|
||||
|
||||
// ── Calls ───────────────────────────────────────────────────────
|
||||
// ── Foreign-class registration ──────────────────────────────────
|
||||
|
||||
/// Register a foreign-class declaration. The alias goes into
|
||||
/// `foreign_class_map` for method-dispatch lookup. The underlying
|
||||
@@ -1054,7 +1027,7 @@ pub fn registerNamespacedForeignClasses(self: *Lowering, ns: ast.NamespaceDecl)
|
||||
}
|
||||
|
||||
|
||||
// ── Protocol dispatch ──────────────────────────────────────────
|
||||
// ── JNI main stubs ─────────────────────────────────────────────
|
||||
|
||||
pub fn synthesizeJniMainStubs(self: *Lowering) void {
|
||||
var seen = std.StringHashMap(void).init(self.alloc);
|
||||
|
||||
Reference in New Issue
Block a user