mirror of
https://github.com/ziglang/zig.git
synced 2025-12-28 09:03:21 +00:00
This makes sense from an organizational point of view, as explained by this new doc comment at the top of the new file: //! Semantic analysis of ZIR instructions. //! This file operates on a `Module` instance, transforming untyped ZIR //! instructions into semantically-analyzed IR instructions. It does type //! checking, comptime control flow, and safety-check generation. This is the //! the heart of the Zig compiler. //! When deciding if something goes into this file or into Module, here is a //! guiding principle: if it has to do with (untyped) ZIR instructions, it goes //! here. If the analysis operates on typed IR instructions, it goes in Module. Before: 4009 src-self-hosted/Module.zig After: 2776 src-self-hosted/Module.zig 1128 src-self-hosted/zir_sema.zig This should be sufficient to avoid the situation we have in stage1 where ir.cpp is 32,516 lines.