Implement actual MIR generation for Trim pattern loops, enabling LoopBodyLocal variables to work through bool carrier promotion. ## Implementation (pattern2_with_break.rs) - emit_whitespace_check(): Generate OR chain for whitespace comparison - extract_substring_args(): Extract s, start from substring call - Initial carrier generation: ch0 = s.substring(start, start+1) - Whitespace check: is_ch_match0 = (ch0 == " " || "\t" || "\n" || "\r") - ConditionEnv integration: Register carrier for JoinIR condition - Break condition replacement: !is_ch_match instead of original ch checks ## Architecture - Host MIR: substring calls, OR chain evaluation, BoxCall - JoinIR: Only sees bool carrier for break control - No new JoinIR instructions added ## Documentation - phase172-trim-lowering-impl.md: Design and implementation details - loop_pattern_space.md: Analysis of all loop pattern combinations Test: Trim loops compile and generate JoinIR successfully Build: 0 errors, clean compilation 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Nyash Development Documentation 🔧
開発者向けの進行中タスクと開発計画ドキュメントです。
📂 ディレクトリ構造
current/
CURRENT_TASK.md- 現在進行中のタスク- アクティブな開発作業の詳細
- 最新の実装状況
roadmap/
- phases/ - フェーズ別開発計画
- phase-8/ - AST→MIR変換
- phase-9/ - VM/JIT実装
- phase-10/ - AOT最適化
- native-plan/ - ネイティブビルド計画
- 実行バックエンド統合
- パフォーマンス目標
proposals/
- RFC(Request for Comments)
- 新機能提案
- 設計ディスカッション
🎯 重要な参照先
- 進行状況:
current/CURRENT_TASK.md - 開発計画:
roadmap/phases/ - 技術提案:
proposals/
📝 注意事項
このディレクトリの内容は開発中であり、頻繁に変更されます。
安定した仕様はreference/を参照してください。