feat(joinir): Phase 185-187 body-local infrastructure + string design

Phase 185: Body-local Pattern2/4 integration skeleton
- Added collect_body_local_variables() helper
- Integrated UpdateEnv usage in loop_with_break_minimal
- Test files created (blocked by init lowering)

Phase 186: Body-local init lowering infrastructure
- Created LoopBodyLocalInitLowerer box (378 lines)
- Supports BinOp (+/-/*//) + Const + Variable
- Fail-Fast for method calls/string operations
- 3 unit tests passing

Phase 187: String UpdateLowering design (doc-only)
- Defined UpdateKind whitelist (6 categories)
- StringAppendChar/Literal patterns identified
- 3-layer architecture documented
- No code changes

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
nyash-codex
2025-12-09 00:59:38 +09:00
parent b6e31cf8ca
commit d4231f5d3a
13 changed files with 2472 additions and 11 deletions

View File

@ -25,6 +25,7 @@ pub(crate) mod carrier_update_emitter; // Phase 179: Carrier update instruction
pub(crate) mod common; // Internal lowering utilities
pub mod condition_env; // Phase 171-fix: Condition expression environment
pub mod loop_body_local_env; // Phase 184: Body-local variable environment
pub mod loop_body_local_init; // Phase 186: Body-local init expression lowering
pub(crate) mod condition_lowerer; // Phase 171-fix: Core condition lowering logic
pub mod condition_to_joinir; // Phase 169: JoinIR condition lowering orchestrator (refactored)
pub(crate) mod condition_var_extractor; // Phase 171-fix: Variable extraction from condition AST