Phase 171-C-4/5 + impl-Trim: Full Trim pattern validation infrastructure ## CarrierInfo 統合 (C-4) - CarrierInfo::merge_from(): Deduplicated carrier merging - TrimPatternInfo::to_carrier_info(): Conversion helper - Pattern2/4: Promoted carrier merge integration - 7 unit tests for merge logic ## TrimLoopHelper 設計 (C-5) - TrimLoopHelper struct: Trim-specific validation box - carrier_type(), initial_value(), whitespace helpers - CarrierInfo::trim_helper() accessor - 5 unit tests ## Validation-Only Integration (impl-Trim) - TrimLoopHelper::is_safe_trim(), is_trim_like(), has_valid_structure() - Pattern2/4: Trim exception route with safety validation - body_locals extraction from loop body AST - LoopBodyCarrierPromoter: ASTNode::Local handler extension - 4 unit tests for safety validation ## Architecture - Box Theory: TrimLoopHelper is "validation only" (no JoinIR generation) - Fail-Fast: Non-Trim LoopBodyLocal immediately rejected - Whitelist approach: Only Trim pattern bypasses LoopBodyLocal restriction Tests: 16 new unit tests, all passing E2E: test_trim_main_pattern.hako validation successful Next: Phase 172 - Actual JoinIR lowering for Trim pattern 🤖 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/を参照してください。