更新内容: - Phase 286 README に P2.2 ✅ COMPLETE セクション追加 - extractor helper化(extract_loop_increment_plan 統一)の内容 - router helper化(lower_via_plan() 追加)の内容 - 削減行数(~65行)と検証結果(quick 154 PASS, PoC 両方 PASS) - 10-Now.md の Current Focus を Phase 286 P2.3 に更新 - P2/P2.1/P2.2 の完了を時系列記載 - Pattern9 (AccumConstLoop) を次の PoC 対象に決定 - CURRENT_TASK.md の Handoff(現状)を更新 - P2.2 COMPLETE の記載(hygiene 内容 + 成果) - P2.3 準備中(Pattern9 PoC 準備)の1段落を追加 - pattern2-deferred.md 新規作成 - Pattern2 の複雑性(break値再接続)を説明 - 再開条件(after_bb PHI + compose::loop_ + Break wiring)を明文化 - Phase 286 P2.2 として後続タスク化 関連 issues: Phase 286 JoinIR Line Absorption 🤖 Generated with Claude Code Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
73 lines
4.2 KiB
Markdown
73 lines
4.2 KiB
Markdown
# CURRENT_TASK (moved)
|
||
|
||
Status: SSOT
|
||
Scope: Repo root の旧リンク互換。現行の入口は `docs/development/current/main/10-Now.md`。
|
||
|
||
- Now: `docs/development/current/main/10-Now.md`
|
||
- Backlog: `docs/development/current/main/30-Backlog.md`
|
||
|
||
---
|
||
|
||
## Handoff (current)
|
||
|
||
### 状況(SSOT)
|
||
|
||
**2025-12-26: Phase 286 P2.2 COMPLETE (Hygiene: extractor重複排除 + router小整理)**
|
||
Pattern1/Pattern4 の Plan/Frag PoC 完了後、extractor の `extract_loop_increment_plan` を `common_helpers.rs` に統一、router の 3行パターン(normalize→verify→lower)を `lower_via_plan()` ヘルパーで共通化。~65行削減、quick 154 PASS 維持。
|
||
|
||
**2025-12-26: Phase 286 P2.3 準備中 (Pattern9 Plan化 PoC 準備)**
|
||
次のPoC対象は Pattern9 (AccumConstLoop) に決定。橋渡しパターンで粒度が小さく、Plan化の流れが確立しているため早期完了が期待できる。P2/P2.1 と同じ戦略:extract PoC サブセット → normalize CorePlan → router 統合。
|
||
|
||
- 現行の入口: `docs/development/current/main/10-Now.md`
|
||
- Phase 286 詳細: `docs/development/current/main/phases/phase-286/README.md`
|
||
- 次の候補: `docs/development/current/main/30-Backlog.md`
|
||
- Design goal: `docs/development/current/main/design/join-explicit-cfg-construction.md`
|
||
|
||
### 直近の道筋(JoinIR / Normalized)
|
||
|
||
### 設計方針メモ(SSOT候補)
|
||
|
||
- ExprLowererBox(式SSOT)
|
||
- 役割: `AST(expr)` → `(prelude: Vec<Inst>, value: ValueId)`(ANF含む)
|
||
- pure/impure/whitelist/strict の契約を集約(入口SSOT)
|
||
- ConditionLowererBox(条件→分岐SSOT)
|
||
- 役割: `AST(cond)` → `BranchPlan`(短絡なら分岐語彙で組む)
|
||
- 評価順は ExprLowererBox に委譲(ANFで順序固定)
|
||
- `&&/||` は制御として扱い、式で無理しない
|
||
- ControlLowererBox(制御SSOT)
|
||
- 役割: `StepNode/ControlTree` → JoinIR(継続 + env)
|
||
- `if/loop` はここ、条件の中身は ConditionLowererBox に委譲
|
||
|
||
- Phase 139: if-only `post_k` の return lowering を `ReturnValueLowererBox` に統一(DONE)
|
||
- `docs/development/current/main/phases/phase-139/README.md`
|
||
- Phase 140: `NormalizedExprLowererBox` 初版(pure expression のみ)(DONE)
|
||
- SSOT: `docs/development/current/main/design/normalized-expr-lowering.md`
|
||
- `docs/development/current/main/phases/phase-140/README.md`
|
||
- Phase 141 P0: impure 拡張点(contract)を SSOT 化(Call/MethodCall はまだ out-of-scope)(DONE)
|
||
- `docs/development/current/main/phases/phase-141/README.md`
|
||
- Phase 141 P1: “既知 intrinsic だけ” を許可して段階投入(DONE)
|
||
- `docs/development/current/main/phases/phase-141/README.md`
|
||
- Phase 141 P1.5: known intrinsic registry + available_inputs 3-source merge + diagnostics(DONE)
|
||
- `docs/development/current/main/phases/phase-141/README.md`
|
||
- Phase 142-loopstmt P0: 正規化単位を statement(loop 1個)へ寄せる(DONE)
|
||
- `docs/development/current/main/phases/phase-142-loopstmt/README.md`
|
||
- Phase 142-loopstmt P1: LLVM EXE smoke(同 fixture)を追加(DONE)
|
||
- `docs/development/current/main/phases/phase-142-loopstmt/README.md`
|
||
- Phase 141 P2+: Call/MethodCall(effects + typing)を分離して段階投入
|
||
- Historical context: `docs/development/current/main/investigations/joinir-generalization-study.md`
|
||
- Phase 143-loopvocab P0/P1: loop 内 if/break/continue の語彙追加(DONE)
|
||
- `docs/development/current/main/phases/phase-143-loopvocab/README.md`
|
||
- Phase 143-loopvocab P2: else 対称化(B-C / C-B)(DONE)
|
||
- `docs/development/current/main/phases/phase-143-loopvocab/README.md`
|
||
- Phase 145-anf P0/P1/P2: ANF(impure hoist + 再帰的線形化)(DONE)
|
||
- `docs/development/current/main/phases/phase-145-anf/README.md`
|
||
- Phase 146(in progress): Loop/If 条件式へ ANF を横展開(順序固定と診断)
|
||
- `docs/development/current/main/phases/phase-146/README.md`
|
||
|
||
## Resolved (historical)
|
||
|
||
### WSL EXDEV / cargo build failure (resolved)
|
||
|
||
- 2025-12-18: `Invalid cross-device link (os error 18)` により `cargo build` が失敗する事象があったが、`wsl --shutdown` 再起動後に復旧。
|
||
- 再発時のワークアラウンド: `tools/build_llvm.sh` は EXDEV を避けるため `TMPDIR` を `target/...` 配下へ寄せる。
|