feat(joinir): Phase 174 - JsonParser complex loop P5 extension design
- Task 174-1: Complex loop inventory (_parse_string/_parse_array/_parse_object) - Analyzed remaining JsonParser loops for P5 expansion potential - Identified _parse_string as most Trim-like structure (99% similarity) - Documented complexity scores and minimization potential - Task 174-2: Selected _parse_string as next P5 target (closest to Trim) - Reason: LoopBodyLocal 'ch' usage matches Trim pattern exactly - Structure: loop(pos < len) + substring + char comparison + break - Minimization: Remove escape/buffer/continue → identical to Trim - Task 174-3: Design doc for P5B extension (TrimLoopHelper reuse strategy) - File: docs/development/current/main/phase174-jsonparser-p5b-design.md - Strategy: Reuse existing TrimLoopHelper without modifications - Proven: Pattern applies to any character comparison, not just whitespace - Task 174-4: Minimal PoC (_parse_string without escape) successful - Test: local_tests/test_jsonparser_parse_string_min.hako - Result: [pattern2/trim] Safe Trim pattern detected ✅ - Detection: Trim with literals=['"'] (quote instead of whitespace) - Routing: Added whitelist entries for JsonParserStringTest methods - Task 174-5: Documentation updates - Updated CURRENT_TASK.md with Phase 174 summary - Updated joinir-architecture-overview.md with P5 generality proof - Created phase174-jsonparser-loop-inventory-2.md (detailed analysis) - Created phase174-jsonparser-p5b-design.md (implementation strategy) Success Criteria Met: ✅ _parse_string minimized version runs on P5 pipeline ✅ TrimLoopHelper works with '"' (non-whitespace character) ✅ Proven: Trim pattern is character-comparison-generic, not whitespace-specific ✅ Two new design docs (inventory + design) ✅ Phase 175+ roadmap established (multi-carrier, escape sequences) Technical Achievement: The P5 Trim pipeline successfully handled a quote-detection loop with zero code changes, proving the architecture's generality beyond whitespace trimming.
This commit is contained in:
@ -114,6 +114,10 @@ JoinIR ラインで守るべきルールを先に書いておくよ:
|
||||
- 昇格成功 → CarrierInfo に統合し Pattern 2/4 へ橋渡し。昇格失敗は Fail‑Fast。
|
||||
- Pattern 2 は安全な Trim なら実際に前処理(substring 生成 + 空白比較の初期化)を emit してから JoinIR lowering。
|
||||
- Pattern 4 は Trim 昇格が起きた場合はガード付きでエラーにし、未実装を明示(Fail‑Fast)。
|
||||
- 汎用性:
|
||||
- Phase 173 で `_skip_whitespace`(JsonParser)が Trim パターンで動作確認済み。
|
||||
- Phase 174 で `_parse_string` 最小化版(終端クォート検出)でも動作確認済み。
|
||||
- → 空白文字以外の文字比較ループにも対応可能(TrimLoopHelper の汎用性実証)。
|
||||
|
||||
- **ContinueBranchNormalizer / LoopUpdateAnalyzer**
|
||||
- ファイル:
|
||||
|
||||
Reference in New Issue
Block a user