Move the pure Obj-C decision helpers out of lower.zig into src/ir/ffi_objc.zig
behind an ObjcLowering *Lowering facade (Principle 5, like the A4/A5 resolvers).
Behavior-preserving relocation — the only non-self.l rewrites are facade
plumbing.
Moved verbatim (self. -> self.l. for Lowering members):
- deriveObjcSelector (selector derivation)
- objcTypeEncodingFromSignature + appendObjcEncoding + bailObjcEncoding +
the ObjcEncodingStack type
- objcPropertyKind + the ObjcPropertyKind enum
- isObjcClassPointer
- objcDefinedStateStructType + objcStateAllocatorType
Emission-heavy code stays in lower.zig per PLAN A6.1 step 6: emitObjc* IMP
builders, lowerObjc*Call, registerObjc*, declareObjc*, the lookupObjc* property/
state lookups, and the Self-substitution resolvers.
- Call sites rerouted through a new objc() accessor: 15 in lower.zig, 1 in
expr_typer.zig, 39 in lower.test.zig (the A6.1 scaffolding tests now drive the
facade). No Lowering wrappers kept. Barrel-wired ffi_objc + ObjcLowering.
- No new visibility widening beyond sub-step 1's two pubs — the facade reads
self.l.{alloc,module,program_index,diagnostics} (fields) + the already-pub
resolveType. lower.zig -478 (->16615); ffi_objc.zig 428.
- Doc-only re-home: the property-IMP getter/setter comment was attached (a
pre-existing artifact) to the moving ObjcPropertyKind enum, two decls away from
its real subject emitObjcDefinedClassPropertyImps (which had no doc). Re-homed
it there so the move neither orphans a `///` block (Zig errors on a dangling doc
comment) nor misattributes it to ensureArcRuntimeDecls.
Gate: zig build, zig build test, bash tests/run_examples.sh -> 361/0
(48 13xx Obj-C examples + 4 Obj-C .ir snapshots green, no churn).
95 lines
3.9 KiB
Zig
95 lines
3.9 KiB
Zig
pub const types = @import("types.zig");
|
|
pub const inst = @import("inst.zig");
|
|
pub const module = @import("module.zig");
|
|
pub const print = @import("print.zig");
|
|
pub const interp = @import("interp.zig");
|
|
pub const lower = @import("lower.zig");
|
|
pub const program_index = @import("program_index.zig");
|
|
pub const type_resolver = @import("type_resolver.zig");
|
|
pub const packs = @import("packs.zig");
|
|
pub const expr_typer = @import("expr_typer.zig");
|
|
pub const calls = @import("calls.zig");
|
|
pub const generics = @import("generics.zig");
|
|
pub const protocols = @import("protocols.zig");
|
|
pub const conversions = @import("conversions.zig");
|
|
pub const error_analysis = @import("error_analysis.zig");
|
|
pub const error_flow = @import("error_flow.zig");
|
|
pub const ffi_objc = @import("ffi_objc.zig");
|
|
pub const semantic_diagnostics = @import("semantic_diagnostics.zig");
|
|
|
|
pub const TypeId = types.TypeId;
|
|
pub const TypeInfo = types.TypeInfo;
|
|
pub const TypeTable = types.TypeTable;
|
|
pub const StringId = types.StringId;
|
|
pub const StringPool = types.StringPool;
|
|
|
|
pub const Ref = inst.Ref;
|
|
pub const BlockId = inst.BlockId;
|
|
pub const FuncId = inst.FuncId;
|
|
pub const GlobalId = inst.GlobalId;
|
|
pub const Inst = inst.Inst;
|
|
pub const Op = inst.Op;
|
|
pub const Block = inst.Block;
|
|
pub const Function = inst.Function;
|
|
pub const Global = inst.Global;
|
|
pub const ConstantValue = inst.ConstantValue;
|
|
|
|
pub const Module = module.Module;
|
|
pub const Builder = module.Builder;
|
|
pub const ImplTable = module.ImplTable;
|
|
|
|
pub const printModule = print.printModule;
|
|
pub const Interpreter = interp.Interpreter;
|
|
pub const Value = interp.Value;
|
|
pub const Lowering = lower.Lowering;
|
|
pub const ProgramIndex = program_index.ProgramIndex;
|
|
pub const TypeResolver = type_resolver.TypeResolver;
|
|
pub const ResolveEnv = type_resolver.ResolveEnv;
|
|
pub const PackResolver = packs.PackResolver;
|
|
pub const ExprTyper = expr_typer.ExprTyper;
|
|
pub const CallResolver = calls.CallResolver;
|
|
pub const CallPlan = calls.CallPlan;
|
|
pub const GenericResolver = generics.GenericResolver;
|
|
pub const ProtocolResolver = protocols.ProtocolResolver;
|
|
pub const CoercionResolver = conversions.CoercionResolver;
|
|
pub const CoercionPlan = conversions.CoercionResolver.CoercionPlan;
|
|
pub const ErrorAnalysis = error_analysis.ErrorAnalysis;
|
|
pub const ErrorFlow = error_flow.ErrorFlow;
|
|
pub const ObjcLowering = ffi_objc.ObjcLowering;
|
|
pub const ErrorFacts = error_analysis.ErrorFacts;
|
|
|
|
pub const compiler_hooks = @import("compiler_hooks.zig");
|
|
pub const emit_llvm = @import("emit_llvm.zig");
|
|
pub const LLVMEmitter = emit_llvm.LLVMEmitter;
|
|
|
|
pub const type_bridge = @import("type_bridge.zig");
|
|
pub const resolveAstType = type_bridge.resolveAstType;
|
|
pub const bridgeType = type_bridge.bridgeType;
|
|
|
|
pub const jni_descriptor = @import("jni_descriptor.zig");
|
|
pub const jni_java_emit = @import("jni_java_emit.zig");
|
|
|
|
pub const types_tests = @import("types.test.zig");
|
|
pub const inst_tests = @import("inst.test.zig");
|
|
pub const module_tests = @import("module.test.zig");
|
|
pub const print_tests = @import("print.test.zig");
|
|
pub const interp_tests = @import("interp.test.zig");
|
|
pub const lower_tests = @import("lower.test.zig");
|
|
pub const program_index_tests = @import("program_index.test.zig");
|
|
pub const type_resolver_tests = @import("type_resolver.test.zig");
|
|
pub const packs_tests = @import("packs.test.zig");
|
|
pub const expr_typer_tests = @import("expr_typer.test.zig");
|
|
pub const calls_tests = @import("calls.test.zig");
|
|
pub const generics_tests = @import("generics.test.zig");
|
|
pub const protocols_tests = @import("protocols.test.zig");
|
|
pub const conversions_tests = @import("conversions.test.zig");
|
|
pub const error_analysis_tests = @import("error_analysis.test.zig");
|
|
pub const type_bridge_tests = @import("type_bridge.test.zig");
|
|
pub const emit_llvm_tests = @import("emit_llvm.test.zig");
|
|
pub const jni_descriptor_tests = @import("jni_descriptor.test.zig");
|
|
pub const jni_java_emit_tests = @import("jni_java_emit.test.zig");
|
|
|
|
test {
|
|
@import("std").testing.refAllDecls(@This());
|
|
}
|