67 lines
2.2 KiB
Markdown
67 lines
2.2 KiB
Markdown
|
|
# Phase 133: Promoted Carrier Join ID (Loop Condition Promotion)
|
|||
|
|
|
|||
|
|
**Date**: 2025-12-15
|
|||
|
|
**Status**: ⏳ Planning (P0 fixture/smoke ready, awaiting fix)
|
|||
|
|
**Scope**: Loop内のcondition promotionにおいて、promoted carrierにjoin_idが割り当てられていない問題を解決
|
|||
|
|
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
## 背景
|
|||
|
|
|
|||
|
|
実アプリ由来のループパターン(JsonParserBox._skip_whitespace)から発見:
|
|||
|
|
|
|||
|
|
```nyash
|
|||
|
|
loop(index < s.length()) {
|
|||
|
|
local char = s.substring(index, index + 1)
|
|||
|
|
if char == " " { // ← promoted carrier が生成される
|
|||
|
|
count = count + 1
|
|||
|
|
index = index + 1
|
|||
|
|
} else {
|
|||
|
|
break // ← break時の join_id が未割り当て
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
**エラー**: `[phase229] promoted carrier 'is_char_match' has no join_id`
|
|||
|
|
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
## 根本原因
|
|||
|
|
|
|||
|
|
- [cond_promoter] がループ内の条件式 `char == " "` を `promoted carrier` に昇格
|
|||
|
|
- break時のexitブロックでこのcarrierの値をどうするか(join_id)が未定義
|
|||
|
|
- Phase 229(Promoted Carrier Join ID割り当て)で panic
|
|||
|
|
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
## 修正対象
|
|||
|
|
|
|||
|
|
**Phase 229**: Promoted Carrier Join ID割り当ての拡張
|
|||
|
|
- Loop exit時に promoted carrier が安全に処理される
|
|||
|
|
- Exit PHI と promoted carrier の生命周期統合
|
|||
|
|
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
## 検証
|
|||
|
|
|
|||
|
|
### P0: Fixture & Smoke Test 実装
|
|||
|
|
- ✅ Fixture: `apps/tests/phase133_json_skip_whitespace_min.hako`
|
|||
|
|
- ✅ Smoke: `tools/smokes/v2/profiles/integration/apps/phase133_json_skip_whitespace_llvm_exe.sh`
|
|||
|
|
- VM: promoted carrier join_id エラーを検出(Phase 133 修正前の状態)
|
|||
|
|
- LLVM EXE: build時に同じエラーを検出
|
|||
|
|
|
|||
|
|
**Acceptance Criteria (P0)**:
|
|||
|
|
- bash tools/smokes/v2/profiles/integration/apps/phase133_json_skip_whitespace_llvm_exe.sh が 2/2 PASS
|
|||
|
|
- Phase 132 smoke test(退行チェック)も PASS
|
|||
|
|
|
|||
|
|
### P1: _unescape_string 追加
|
|||
|
|
同じJsonParser由来の別ループ(continue + 可変ステップ)で、promoted carrierパターンを追加検証
|
|||
|
|
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
## 参考
|
|||
|
|
|
|||
|
|
- **Fixture**: `apps/tests/phase133_json_skip_whitespace_min.hako`
|
|||
|
|
- **Smoke Test**: `tools/smokes/v2/profiles/integration/apps/phase133_json_skip_whitespace_llvm_exe.sh`
|
|||
|
|
- **Phase 132**: Exit PHI value parity (Phase 133は promoted carrierの寿命管理を扱う)
|