Phase 143 P0 Step 4: Build JoinModule with 6 functions and Jump/Call instructions
- Allocate 6 JoinFuncIds (main, loop_step, loop_cond_check, k_then, k_else, k_exit)
- Create JoinFunction skeletons with correct env parameter passing
- Lower condition in loop_cond_check using NormalizedExprLowererBox
- Emit Jump instruction with conditional (cond=Some(vid))
- Jump to k_exit if condition is true (break)
- Fall through to Call(loop_step) if condition is false (continue loop)
- Build complete JoinModule with 6 functions and mark as normalized
- Return Ok(None) skeleton (Step 6 will add Return statement to k_exit)
Key design decisions:
- Jump semantics: jump to cont if cond is true, else fall through
- Fallthrough behavior: implicit continue via Call(loop_step)
- k_then and k_else: unused in P0 scope (kept for structural clarity)
- cargo check passes with no errors
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>