🚀 Start Phase 15.3: Nyash compiler MVP implementation
Major milestone: - Set up apps/selfhost-compiler/ directory structure - Implement basic Nyash compiler in Nyash (CompilerBox) - Stage-1: Basic arithmetic parser (int/string/+/-/*/括弧/return) - JSON v0 output compatible with --ny-parser-pipe - Runner integration with NYASH_USE_NY_COMPILER=1 flag - Comprehensive smoke tests for PHI/Bridge/Stage-2 Technical updates: - Updated CLAUDE.md with Phase 15.3 status and MIR14 details - Statement separation policy: newline-based with minimal ASI - Fixed runaway ny-parser-pipe processes (CPU 94.9%) - Clarified MIR14 as canonical instruction set (not 13/18) - LoopForm strategy: PHI auto-generation during reverse lowering Collaborative development: - ChatGPT5 implementing compiler skeleton - Codex provided LoopForm PHI generation guidance - Claude maintaining documentation and coordination 🎉 セルフホスティングの歴史的一歩!自分自身をコンパイルする日が近いにゃ! Co-Authored-By: ChatGPT <noreply@openai.com>
This commit is contained in:
@ -35,6 +35,17 @@ This roadmap is a living checklist to advance Phase 15 with small, safe boxes. U
|
||||
- No circular dependency: nyrt provides StringBox/ArrayBox via C ABI
|
||||
- Flag path: `NYASH_USE_NY_COMPILER=1` to switch rust→ny compiler; rust parser as fallback
|
||||
- Add apps/selfhost-compiler/ and minimal smokes
|
||||
- Stage‑1 checklist:
|
||||
- [ ] return/int/string/arithmetic/paren JSON v0 emit
|
||||
- [ ] Minimal ASI(newline separator + continuation tokens)
|
||||
- [ ] Smokes: `return 1+2*3` / grouping / string literal
|
||||
- Stage‑2 checklist:
|
||||
- [ ] local/if/loop/call/method/new/var/logical/compare
|
||||
- [ ] PHI 合流は Bridge に委譲(If/Loop)
|
||||
- [ ] Smokes: nested if / loop 累積 / and/or × if/loop
|
||||
4) PHI 自動化は Phase‑15 後(Core‑14 LoopForm)
|
||||
- Phase‑15: 現行の Bridge‑PHI を維持し、E2E 緑とパリティを最優先
|
||||
- Core‑14: LoopForm 強化+逆Loweringで PHI を自動生成(合流点の定型化)
|
||||
4) Bootstrap loop (c0→c1→c1')
|
||||
- Use existing trace/hash harness to compare parity; add optional CI gate
|
||||
- **This achieves self-hosting!** Nyash compiles Nyash
|
||||
@ -63,6 +74,8 @@ This roadmap is a living checklist to advance Phase 15 with small, safe boxes. U
|
||||
|
||||
- Parser path: `--parser {rust|ny}` or `NYASH_USE_NY_PARSER=1`
|
||||
- JSON dump: `NYASH_DUMP_JSON_IR=1`
|
||||
- (予告)LoopForm: Core‑14 で仕様化予定
|
||||
- Selfhost compiler: `NYASH_USE_NY_COMPILER=1`, child quiet: `NYASH_JSON_ONLY=1`
|
||||
- Load Ny plugins: `NYASH_LOAD_NY_PLUGINS=1` / `--load-ny-plugins`
|
||||
- AOT smoke: `CLIF_SMOKE_RUN=1`
|
||||
|
||||
@ -83,6 +96,8 @@ This roadmap is a living checklist to advance Phase 15 with small, safe boxes. U
|
||||
- v0 E2E green (parser pipe + direct bridge) including Ny compiler MVP switch
|
||||
- v1 minimal samples pass via JSON bridge
|
||||
- AOT P2: emit→link→run stable for constant/arith
|
||||
- Phase‑15 STOP には PHI 切替を含めない(PHI は LoopForm/Core‑14 で扱う)
|
||||
- 15.3: Stage‑1 代表サンプル緑 + Bootstrap smoke(フォールバック許容)+ 文分離ポリシー公開
|
||||
- Docs/recipes usable on Windows/Unix
|
||||
|
||||
## Notes
|
||||
|
||||
Reference in New Issue
Block a user