Files
hakorune/CURRENT_TASK.md
tomoaki 55d30c9845 docs(repl): record Phase 288.1 contract and results
更新内容:
- docs/reference/language/repl.md
  - Phase 288.1 完了ステータスに更新
  - Implementation Architecture セクション追加(AST rewrite 方式説明)
  - AST Rewriter の動作フロー追加(Variable/Assignment 変換ロジック)
  - ExternCall Bridge の仕組み追加(__repl.get/set → VMValue)
  - Expression Detection ロジック追加(wrapper AST 判定)
  - 動作例を完全に更新(全機能が動作済み)

- docs/development/current/main/phases/phase-288/README.md
  - Phase 288.1 完了セクション追加
  - 変更ファイル一覧(8ファイル, +592行)記録
  - 確認コマンド 4種 記録(変数永続化/式表示/_変数/リセット)
  - 回帰テスト結果記録(154/154 PASS)

- docs/development/current/main/10-Now.md
  - "Phase 288.1 完了" に更新
  - 次の候補(REPL UX 改善 / JoinIR 設計作業)を追記

- CURRENT_TASK.md
  - 1段落サマリー更新(288.1 完了、次の方向性)

Phase 288.1 成果(SSOT記録):
 変数永続化(session → eval bridge)
 式自動表示(pure expression auto-output)
 _ 変数(last displayed value)
 Fail-Fast 未定義エラー + ヒント
 セッションリセット(.reset)
 154/154 smoke tests PASS(file mode 不変)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-25 23:05:20 +09:00

70 lines
3.9 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 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-25: Phase 288.1 完了**
REPL session persistence + auto-display 実装完了。AST rewrite 方式__repl.get/set ExternCallにより、変数永続化・式自動表示・`_` 変数をすべて実現。154/154 smoke tests PASSfile mode 不変)。次の候補は REPL UX 改善multi-line input等または JoinIR/return 系の設計作業。
- 現行の入口: `docs/development/current/main/10-Now.md`
- Phase 288.1 詳細: `docs/development/current/main/phases/phase-288/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-scopeDONE
- `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 + diagnosticsDONE
- `docs/development/current/main/phases/phase-141/README.md`
- Phase 142-loopstmt P0: 正規化単位を statementloop 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/MethodCalleffects + 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-BDONE
- `docs/development/current/main/phases/phase-143-loopvocab/README.md`
- Phase 145-anf P0/P1/P2: ANFimpure hoist + 再帰的線形化DONE
- `docs/development/current/main/phases/phase-145-anf/README.md`
- Phase 146in 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/...` 配下へ寄せる。