## 主な変更点 ### 🎯 戦略の転換と明確化 - PyVMを開発ツールとして位置づけ(本番経路ではない) - EXE-first戦略を明確に優先(build_compiler_exe.sh実装済み) - Phase順序の整理: 15.2(LLVM)→15.3(コンパイラ)→15.4(VM) ### 🚀 セルフホスティング基盤の実装 - apps/selfhost-compiler/にNyashコンパイラMVP実装 - compiler.nyash: メインエントリー(位置引数対応) - boxes/: parser_box, emitter_box, debug_box分離 - tools/build_compiler_exe.sh: ネイティブEXEビルド+dist配布 - Python MVPパーサーStage-2完成(local/if/loop/call/method/new) ### 📝 ドキュメント整備 - Phase 15 README/ROADMAP更新(Self-Hosting優先明記) - docs/guides/exe-first-wsl.md: WSLクイックスタート追加 - docs/private/papers/: 論文G~L、爆速事件簿41事例収録 ### 🔧 技術的改善 - JSON v0 Bridge: If/Loop PHI生成実装(ChatGPT協力) - PyVM/llvmliteパリティ検証スイート追加 - using/namespace機能(gated実装、Phase 15では非解決) ## 次のステップ 1. パーサー無限ループ修正(未実装関数の実装) 2. EXEビルドとセルフホスティング実証 3. c0→c1→c1'ブートストラップループ確立 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1.9 KiB
1.9 KiB
Phase 15.3 — Imports/Namespace/nyash.toml Plan
Status: 15.3 planning; focus remains on Stage‑1/2 compiler MVP. This document scopes when and how to bring nyash.toml/include/import/namespace into the selfhost path without destabilizing parity.
Goals
- Keep runner‑level
nyash.tomlparsing/resolution as the source of truth during 15.3. - Accept
using/importsyntax in the Ny compiler as a no‑op (record only) until resolution is delegated. - Avoid VM changes; resolution happens before codegen.
Scope & Sequence (Phase 15.3)
- Stage‑1/2 compiler stability (primary)
- Ny→JSON v0 → Bridge → PyVM/llvmlite parity maintained
- PHI merge remains on Bridge (If/Loop)
- Imports/Namespace minimal acceptance (15.3‑late)
- Parse
using ns/using "path" [as alias]as statements in the Ny compiler - Do not resolve; emit no JSON entries (or emit metadata) — runner continues to strip/handle
- Gate via
NYASH_ENABLE_USING=1
- Parse
- Runner remains in charge
- Keep existing Rust runner’s
usingstripping + modules registry population nyash.tomlparsing stays in Rust (Phase 15)
- Keep existing Rust runner’s
Out of scope (Phase 15)
- Porting
nyash.tomlparsing to Ny - Cross‑module codegen/linking in Ny compiler
- Advanced include resolution / package graph
Acceptance (15.3)
- Ny compiler can lex/parse
usingforms without breaking Stage‑1/2 programs - Runner path (Rust) continues to resolve
usingandnyash.tomlas before (parity unchanged)
Looking ahead (MIR18 / Phase 16)
- Evaluate moving
nyash.tomlparsing to Ny as a library box (ConfigBox) - Unify include/import/namespace into a single resolver pass in Ny with a small JSON side channel back to the runner
- Keep VM unchanged; all resolution before MIR build
Switches
NYASH_ENABLE_USING=1— enableusingacceptance in Ny compiler (no resolution)NYASH_SKIP_TOML_ENV=1— skip applying [env] in nyash.toml (existing)