docs: add MIR13 mode doc and set PHI-off as default; bridge lowering split (if/loop/try); llvmlite resolver stabilization; curated runner default PHI-off; refresh CURRENT_TASK.md
This commit is contained in:
16
docs/development/current/main/00-Overview.md
Normal file
16
docs/development/current/main/00-Overview.md
Normal file
@ -0,0 +1,16 @@
|
||||
# Self Current Task — Overview (main)
|
||||
|
||||
目的
|
||||
- main ブランチで Core‑13(MIR13)前提の制御フローを整備し、LLVM/Cranelift(EXE)/VM に綺麗に降ろす土台を完成させる。
|
||||
- 箱言語の既存命令セット(Branch/Jump/Phi 他)を活かし、continue/break を新命令なしで表現する。
|
||||
|
||||
前提と指針
|
||||
- MIR13 前提(純化モードを含む)。
|
||||
- ループは canonical 形(preheader → header → body → latch → header、exit は単一)。
|
||||
- continue/break は分岐のみで表現(continue→ヘッダ/ラッチ、break→単一 exit)。
|
||||
- Verifier(支配関係/SSA)緑を最優先。post‑terminated 後の emit 禁止、合流点を明確化。
|
||||
|
||||
スコープ外
|
||||
- 新規 MIR 命令の追加。
|
||||
- try/finally と continue/break の相互作用(次段)。
|
||||
|
||||
25
docs/development/current/main/10-Now.md
Normal file
25
docs/development/current/main/10-Now.md
Normal file
@ -0,0 +1,25 @@
|
||||
# Self Current Task — Now (main)
|
||||
|
||||
2025‑09‑08:現状と直近タスク
|
||||
- LLVM 側 P0 完了(BitOps/Array/Echo/Map 緑)。VInvoke(by‑name/by‑id vector) は戻り値マッピングの暫定課題を確認中(Decisions 参照)。
|
||||
- selfhosting-dev の作業を main に順次取り込み。VM/MIR 基盤は main で先に整える方針。
|
||||
|
||||
直近タスク(優先)
|
||||
1) continue/break の lowering(Builder 修正のみで表現)
|
||||
- ループ文脈スタック {head, exit} を導入。
|
||||
- continue に遭遇 → head(または latch)へ br を emit し終端。
|
||||
- break に遭遇 → exit へ br を emit し終端。
|
||||
- post‑terminated 後に emit しない制御を徹底。
|
||||
2) ループ CFG の厳密化
|
||||
- 単一 exit ブロックの徹底。
|
||||
- Phi はヘッダでキャリー変数を合流(SSA/支配関係が崩れない形)。
|
||||
3) 検証とスモーク
|
||||
- Verifier 緑(dominance/SSA)。
|
||||
- VM のループ代表(単純/ネスト/早期継続・脱出)。
|
||||
- LLVM/Cranelift EXE に綺麗に降りる(br/phi ベースで問題なし)。
|
||||
|
||||
代表コマンド(例)
|
||||
- ビルド: `cargo build --release`
|
||||
- LLVM smoke: `LLVM_SYS_180_PREFIX=$(llvm-config-18 --prefix) NYASH_LLVM_BITOPS_SMOKE=1 ./tools/llvm_smoke.sh release`
|
||||
- VInvoke 調査: `NYASH_LLVM_VINVOKE_TRACE=1 NYASH_LLVM_VINVOKE_SMOKE=1 ./tools/llvm_smoke.sh release`
|
||||
|
||||
9
docs/development/current/main/20-Decisions.md
Normal file
9
docs/development/current/main/20-Decisions.md
Normal file
@ -0,0 +1,9 @@
|
||||
# Self Current Task — Decisions (main)
|
||||
|
||||
2025‑09‑08
|
||||
- ループ制御は既存命令(Branch/Jump/Phi)で表現し、新命令は導入しない。
|
||||
- Builder に loop_ctx({head, exit})を導入し、continue/break を分岐で降ろす。
|
||||
- Verifier の支配関係/SSA を崩さないよう、単一 exit と post‑terminated 後の emit 禁止を徹底。
|
||||
- VInvoke(vector 経路)の戻り値は、短期は「既知メソッドの整数返り」を特例扱いで保持し、
|
||||
中期は nyash.toml の戻り型ヒント or NyRT シムの期待フラグで正道化。
|
||||
|
||||
15
docs/development/current/main/30-Backlog.md
Normal file
15
docs/development/current/main/30-Backlog.md
Normal file
@ -0,0 +1,15 @@
|
||||
# Self Current Task — Backlog (main)
|
||||
|
||||
短期
|
||||
- continue/break 降ろしの実装と単体/統合テストの追加。
|
||||
- Verifier の支配関係/SSA の確認強化(ループ exit 合流の一意性チェック)。
|
||||
- LLVM/Cranelift EXE スモーク(単純/ネスト/継続/脱出)。
|
||||
|
||||
中期
|
||||
- VInvoke(vector)戻り型の正道化(toml 記述 or NyRT 期待フラグ)。
|
||||
- ループ式として値を返す仕様が必要になった場合の設計(現状不要)。
|
||||
|
||||
周辺
|
||||
- selfhosting-dev への取り込みと Ny ツールでの continue/break 使用解禁。
|
||||
- docs 更新(言語ガイドに continue/break の記法・制約を明記)。
|
||||
|
||||
Reference in New Issue
Block a user