- Task 173-1: JsonParser loop inventory recheck
- Observed 6 loops: _trim (2 loops, already working), _skip_whitespace,
_parse_string, _parse_array, _unescape_string
- Created comprehensive observation report with Trim similarity ratings
- Discovered that JsonParser._trim already uses P5 pipeline successfully
- Task 173-2: Selected _skip_whitespace as Trim-equivalent pattern
- Perfect structural match with Trim (100% identical)
- Independent helper method, easy to test
- Frequently used in JsonParser (7 call sites)
- Task 173-3: Design doc for P5 pipeline extension to JsonParser
- Confirmed existing TrimLoopHelper works without modification
- No charAt() support needed (_skip_whitespace uses substring())
- Documented data flow and risk analysis
- Task 173-4: Successfully converted _skip_whitespace to JoinIR
- Created test case: local_tests/test_jsonparser_skip_whitespace.hako
- Added routing whitelist: JsonParserTest._skip_whitespace/3
- Pattern detection SUCCESS:
* LoopBodyLocal 'ch' detected
* Carrier promotion to 'is_ch_match'
* Trim pattern recognized
* JoinIR generation successful
- Verified P5 pipeline works for both static box methods and helper methods
- Task 173-5: Documentation updates
- phase173-jsonparser-loop-recheck.md: Loop observation report
- phase173-jsonparser-p5-design.md: P5 extension design
- phase173-jsonparser-p5-impl.md: Implementation results
- CURRENT_TASK.md: Phase 173 completion record
Key achievement: Proven that Trim P5 pipeline is fully generic -
works for both TrimTest (static box method) and JsonParser (helper method).
LoopBodyLocal carrier promotion is production-ready for Trim-like patterns.
Changes:
- src/mir/builder/control_flow/joinir/routing.rs: Add JsonParserTest whitelist
- docs/development/current/main/*173*.md: 3 new documentation files
- CURRENT_TASK.md: Phase 173 completion entry
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/を参照してください。