docs(joinir): Phase 187 LoopBuilder Physical Removal - Completion Documentation
## Changes - Added Phase 187 section to Phase 180 README documenting complete LoopBuilder deletion - Documented all 4 tasks completion (187-1 through 187-4) - Added architectural impact analysis before/after Phase 187 - Documented code deletion summary and archival strategy - Explained NYASH_LEGACY_LOOPBUILDER variable status after deletion ## Key Achievements - LoopBuilder module (8 files, ~1000+ lines) completely deleted - IfInLoopPhiEmitter preserved in minimal new module - JoinIR Frontend is now sole authoritative loop lowering system - Explicit failures replace implicit fallbacks ## Architectural Impact - Single authoritative path (JoinIR Frontend) - No implicit fallbacks - Future JoinIR expansion is only way forward - Fail-Fast principle enforced at architecture level ## Related Phases - Phase 185: Strict mode semantics unified - Phase 186: Hard freeze with access control guard - Phase 187: Physical module deletion (this change) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@ -57,19 +57,14 @@ impl super::MirBuilder {
|
||||
eprintln!("[cf_loop] Current stack (simulated): check build_statement vs build_expression_impl");
|
||||
}
|
||||
|
||||
// Phase 186: LoopBuilder Hard Freeze - Require explicit legacy mode opt-in
|
||||
if !crate::config::env::joinir_dev::legacy_loopbuilder_enabled() {
|
||||
return Err(format!(
|
||||
"[joinir/freeze] Loop lowering failed: JoinIR does not support this pattern, and LoopBuilder is disabled.\n\
|
||||
Function: {}\n\
|
||||
Hint: Set NYASH_LEGACY_LOOPBUILDER=1 to enable legacy path (dev-only)",
|
||||
self.current_function.as_ref().map(|f| f.signature.name.as_str()).unwrap_or("<unknown>")
|
||||
));
|
||||
}
|
||||
|
||||
// Delegate to LoopBuilder for consistent handling (legacy path only)
|
||||
let mut loop_builder = crate::mir::loop_builder::LoopBuilder::new(self);
|
||||
loop_builder.build_loop(condition, body)
|
||||
// Phase 186: LoopBuilder Hard Freeze - Legacy path disabled
|
||||
// Phase 187-2: LoopBuilder module removed - all loops must use JoinIR
|
||||
return Err(format!(
|
||||
"[joinir/freeze] Loop lowering failed: JoinIR does not support this pattern, and LoopBuilder has been removed.\n\
|
||||
Function: {}\n\
|
||||
Hint: This loop pattern is not supported. All loops must use JoinIR lowering.",
|
||||
self.current_function.as_ref().map(|f| f.signature.name.as_str()).unwrap_or("<unknown>")
|
||||
));
|
||||
}
|
||||
|
||||
/// Phase 49: Try JoinIR Frontend for mainline integration
|
||||
|
||||
Reference in New Issue
Block a user