From 1193b8b66d2b726f002dee004b2d297f9c511b57 Mon Sep 17 00:00:00 2001 From: nyash-codex Date: Mon, 8 Dec 2025 19:15:22 +0900 Subject: [PATCH] refactor(joinir): Document condition lowerer architecture (Task 1) Task 1: Condition lowerer integration investigation - Analyzed 3 modules: condition_lowerer (522L), bool_expr_lowerer (371L), condition_env_builder (248L) - Key finding: Cannot merge safely due to different design patterns: - condition_lowerer: JoinIR-based (pure functional, no builder state) - bool_expr_lowerer: MIR-based (stateful MirBuilder) - Added clear TODO comment documenting the distinction - bool_expr_lowerer appears unused (all tests commented), candidate for future removal Decision: Keep separate, document architecture clearly for future maintainers --- src/mir/join_ir/lowering/bool_expr_lowerer.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/mir/join_ir/lowering/bool_expr_lowerer.rs b/src/mir/join_ir/lowering/bool_expr_lowerer.rs index a9d1199d..86a6953f 100644 --- a/src/mir/join_ir/lowering/bool_expr_lowerer.rs +++ b/src/mir/join_ir/lowering/bool_expr_lowerer.rs @@ -33,6 +33,15 @@ //! %or2 = BinOp Or %or1 %cmp3 //! %result = BinOp Or %or2 %cmp4 //! ``` +//! +//! ## Status (Phase 179) +//! +//! **TODO: Consider removal or unification** - This module appears unused (all tests commented). +//! Cannot easily merge with `condition_lowerer.rs` because: +//! - This module: MIR-based (uses MirBuilder, stateful) +//! - condition_lowerer: JoinIR-based (pure functional, no builder) +//! +//! Decision: Keep separate for now, document the distinction clearly. use crate::ast::{ASTNode, BinaryOperator, UnaryOperator}; use crate::mir::builder::MirBuilder;