📚 Phase 12.5 最適化戦略 & Phase 15 セルフホスティング計画

Phase 12.5: MIR15最適化戦略 - コンパイラ丸投げ作戦
- optimization-strategy.txt: 詳細戦略(MIR側は軽量、コンパイラに丸投げ)
- implementation-examples.md: 具体的な実装例
- debug-safety-comparison.md: 現在のDebugBox vs ChatGPT5提案の比較分析

Phase 15: Nyashセルフホスティング - 究極の目標
- self-hosting-plan.txt: 内蔵Craneliftによる実現計画
- technical-details.md: CompilerBox設計とブートストラップ手順
- README.md: セルフホスティングのビジョン

重要な知見:
- LLVM統合完了済み(Phase 11)だが依存が重すぎる
- Craneliftが現実的な選択肢(3-5MB vs LLVM 50-100MB)
- 「コンパイラもBox、すべてがBox」の夢へ

MASTERロードマップ更新済み
This commit is contained in:
Moe Charm
2025-09-02 05:11:10 +09:00
parent c9366d5c54
commit da96bcb906
37 changed files with 2454 additions and 58 deletions

View File

@ -0,0 +1,11 @@
// @env NYASH_AWAIT_MAX_MS=100
// Force timeout by delaying beyond the await max
static box Main {
main() {
fut = future.delay(500)
res = await fut
// Expect Result.Err("Timeout")
print(res.toString())
return 0
}
}

View File

@ -0,0 +1,16 @@
// @env NYASH_AWAIT_MAX_MS=5000
// Simple nowait/await test under Interpreter
static box Main {
main() {
// spawn two async computations
nowait fa = 10 + 20
nowait fb = 1 + 2
// wait and combine
a = await fa
b = await fb
return a + b // 33
}
}

View File

@ -0,0 +1,21 @@
// VM-only demo: TaskGroup token + delayed future
static box Main {
main() {
// Obtain current task token
tok = task.currentToken()
print("token: " + tok.toString())
// Delay 200ms via scheduler-backed future
fut = future.delay(200)
_ = await fut
print("after delay")
// Cancel current token (for demo, no effect yet on delay)
task.cancelCurrent()
tok2 = task.currentToken()
print("token after cancel: " + tok2.toString())
return 0
}
}

View File

@ -0,0 +1,9 @@
// Safe minimal MIR test (no plugins)
static box Main {
main() {
x = 1
y = 2
z = x + y
return z
}
}