feat(smoke): Phase 284 P2 - return-in-loop VM/LLVM parity smoke
- VM smoke: phase284_p2_return_in_loop_vm.sh (PASS) - LLVM smoke: phase284_p2_return_in_loop_llvm.sh (SKIP if no LLVM feature) - Reuse existing fixture: phase286_pattern5_return_min.hako (exit 7) - P2-INSTRUCTIONS.md: 手順書作成 - quick smoke 154/154 PASS 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@ -1,8 +1,13 @@
|
||||
# Self Current Task — Now (main)
|
||||
|
||||
## Current Focus: Phase 284 P0 (design-first) / Post Phase 286
|
||||
## Current Focus: Phase 285 P0 (docs-only)
|
||||
|
||||
Phase 286 で JoinIR line の主要 pattern(1–9)が Plan/Frag SSOT に吸収できた。次は “出口語彙” をさらに SSOT に寄せるため、Phase 284(Return as ExitKind SSOT)へ進む。
|
||||
Box lifecycle / weakref / finalization / GC の “実装が仕様” を止めるため、まず docs-only で SSOT と差分運用(VM/LLVM)を固定する。
|
||||
|
||||
**2025-12-26: Phase 284 P2 完了** ✅
|
||||
- return を含む loop(Pattern5)を VM で smoke 固定
|
||||
- LLVM harness は理由付き SKIP(ビルドに LLVM feature なし)
|
||||
- quick smoke 154/154 PASS 維持
|
||||
|
||||
設計相談(将来の正規化):
|
||||
- `docs/development/current/main/investigations/phase-286-plan-normalization-consult.md`
|
||||
@ -23,7 +28,8 @@ Phase 286 で JoinIR line の主要 pattern(1–9)が Plan/Frag SSOT に吸
|
||||
- quick smoke 154/154 PASS 維持、Pattern1/4 PoC 両方 PASS
|
||||
|
||||
**次のステップ**:
|
||||
1. **Phase 284(design-first)**: Return as ExitKind SSOT(pattern に散らさない)
|
||||
1. **Phase 285 P0(docs-only)**: lifecycle/weak/finalization/GC の SSOT 固定
|
||||
- 手順書: `docs/development/current/main/phases/phase-285/P0-INSTRUCTIONS.md`
|
||||
2. **future design(separate phase)**: Plan 生成の正規化をどう進めるか(相談パケット)
|
||||
- `docs/development/current/main/investigations/phase-286-plan-normalization-consult.md`
|
||||
3. (optional, post self-host)REPL = script engine 構想(docs-only)
|
||||
|
||||
@ -0,0 +1,59 @@
|
||||
# Phase 284 P2: "return in loop" smoke 固定(手順書)
|
||||
|
||||
## 目的
|
||||
|
||||
- return を含む loop を **VM と LLVM harness** の両方で同一結果にする
|
||||
- integration smoke で意味論を固定し、退行を防止
|
||||
- quick gate (154/154 PASS) は絶対に壊さない
|
||||
|
||||
## 対象 fixture(既存再利用優先)
|
||||
|
||||
| Fixture | Pattern | 期待値 | 備考 |
|
||||
|---------|---------|--------|------|
|
||||
| `apps/tests/phase286_pattern5_return_min.hako` | Pattern5 (infinite + early return) | exit 7 | 既存(Phase 286 P3.2 で作成)|
|
||||
|
||||
**新規 fixture は追加しない**(既存で十分)
|
||||
|
||||
## smoke スクリプト
|
||||
|
||||
### VM 版
|
||||
- ファイル: `tools/smokes/v2/profiles/integration/apps/phase284_p2_return_in_loop_vm.sh`
|
||||
- 実行: `./target/release/hakorune --backend vm <fixture>`
|
||||
- 判定: exit code または stdout で固定
|
||||
|
||||
### LLVM 版
|
||||
- ファイル: `tools/smokes/v2/profiles/integration/apps/phase284_p2_return_in_loop_llvm.sh`
|
||||
- 実行: `NYASH_LLVM_USE_HARNESS=1 ./target/release/hakorune --backend llvm <fixture>`
|
||||
- SKIP ポリシー: LLVM feature がビルドに含まれていない場合は `test_skip` で理由付き SKIP
|
||||
|
||||
```bash
|
||||
# SKIP 流儀(v2 smoke 既存パターン準拠)
|
||||
if ! "$NYASH_BIN" --version 2>/dev/null | grep -q "features.*llvm"; then
|
||||
test_skip "LLVM backend not available in this build"; exit 0
|
||||
fi
|
||||
```
|
||||
|
||||
## 受け入れ条件
|
||||
|
||||
- [ ] `tools/smokes/v2/run.sh --profile quick` → 154/154 PASS
|
||||
- [ ] `phase284_p2_return_in_loop_vm.sh` → PASS (exit 7)
|
||||
- [ ] `phase284_p2_return_in_loop_llvm.sh` → PASS (exit 7) または理由付き SKIP
|
||||
|
||||
## 検証コマンド
|
||||
|
||||
```bash
|
||||
# quick gate(必須)
|
||||
./tools/smokes/v2/run.sh --profile quick
|
||||
|
||||
# integration 単発
|
||||
bash tools/smokes/v2/profiles/integration/apps/phase284_p2_return_in_loop_vm.sh
|
||||
bash tools/smokes/v2/profiles/integration/apps/phase284_p2_return_in_loop_llvm.sh
|
||||
|
||||
# integration 全体(フィルタ付き)
|
||||
./tools/smokes/v2/run.sh --profile integration --filter "*phase284*"
|
||||
```
|
||||
|
||||
## 完了後
|
||||
|
||||
1. `docs/development/current/main/phases/phase-284/README.md` の P2 を `✅ COMPLETE` に更新
|
||||
2. `docs/development/current/main/10-Now.md` の Current Focus を次タスクに更新
|
||||
@ -94,10 +94,28 @@ Phase 284 の完了条件は「`return` を含むケースが close-but-unsuppor
|
||||
- Block remapping: Duplicate logic → SSOT function
|
||||
- Future reusability: Pattern5 can now reuse return_jump_emitter
|
||||
|
||||
### P2+(未実装)
|
||||
### P2(smoke 固定) ✅ COMPLETE (2025-12-26)
|
||||
|
||||
- `return` を含む loop body を、Plan line でも ExitKind::Return に落とす。
|
||||
- VM/LLVM の両方で、`return` を含む fixture を smoke 化して SSOT を固定する。
|
||||
**目的**: return を含む loop を VM/LLVM 両方で同一結果にし、integration smoke で固定。
|
||||
|
||||
**対象 fixture(既存再利用優先)**:
|
||||
- `apps/tests/phase286_pattern5_return_min.hako` (exit 7) - Return-in-infinite-loop
|
||||
|
||||
**smoke スクリプト**:
|
||||
- `tools/smokes/v2/profiles/integration/apps/phase284_p2_return_in_loop_vm.sh` (VM)
|
||||
- `tools/smokes/v2/profiles/integration/apps/phase284_p2_return_in_loop_llvm.sh` (LLVM harness)
|
||||
|
||||
**受け入れ条件**:
|
||||
- integration(VM)PASS
|
||||
- integration(LLVM harness)PASS(または理由付き段階完了)
|
||||
- quick 154/154 PASS 維持
|
||||
|
||||
**詳細手順**: `P2-INSTRUCTIONS.md`
|
||||
|
||||
### P3+(将来)
|
||||
|
||||
- 他の return パターン(Pattern8 等)の smoke 追加
|
||||
- LLVM AOT 経路での return 検証
|
||||
|
||||
## Acceptance
|
||||
|
||||
|
||||
Reference in New Issue
Block a user