phase: 20.49 COMPLETE; 20.50 Flow+String minimal reps; 20.51 selfhost v0/v1 minimal (Option A/B); hv1-inline binop/unop/copy; docs + run_all + CURRENT_TASK -> 21.0

This commit is contained in:
nyash-codex
2025-11-06 15:41:52 +09:00
parent 2dc370223d
commit 77d4fd72b3
1658 changed files with 6288 additions and 2612 deletions

View File

@ -19,7 +19,7 @@
#### **Phase A: AOT WASM** (最優先 - 2-3週間)
```bash
nyash --compile-native program.nyash -o program.exe
nyash --compile-native program.hako -o program.exe
```
- **技術**: wasmtime compile でネイティブ化
- **効果**: 13.5倍 → 100倍 (7倍追加向上)

View File

@ -123,12 +123,12 @@ Scope:
Tasks:
- Cargo.toml: examples/GUI を feature でガードdefault は CLI 最小)。
- ビルド検証: `cargo build --bin nyash`Linux/Windows
- 実行検証: `cargo run -- ./local_tests/sample.nyash`
- 実行検証: `cargo run -- ./local_tests/sample.hako`
- ドキュメント: 上記手順を how-to-build-native に追記/点検。
Acceptance Criteria:
- Linux/Windows で `cargo build --bin nyash` が成功する。
- `local_tests/` 配下の簡単な .nyash が実行できる。
- `local_tests/` 配下の簡単な .hako が実行できる。
- 他 bin/examples が壊れていても `--bin nyash` だけで通る。
Out of Scope:
@ -255,7 +255,7 @@ Summary:
Scope/Tasks:
- AST: BoxDeclaration(is_static=true, name=Main) を検出 → main() を抽出
- Lowering: body を Program に変換して既存経路に渡す
- Tests: local_tests/mir_loop_no_local.nyash で dump/VM が通る
- Tests: local_tests/mir_loop_no_local.hako で dump/VM が通る
Acceptance Criteria:
- `--dump-mir` が static Main サンプルで成功
@ -350,7 +350,7 @@ Expected Duration: 1週間
### 成功基準
- Phase 8.3のBox操作WASMが実際に動作
- test_wasm_box_ops.nyash が正常実行
- test_wasm_box_ops.hako が正常実行
- ユーザー定義Boxの完全サポート
------------------------------------------------------------
@ -555,7 +555,7 @@ Scope/Tasks:
- 起動時間・配布サイズ最適化
Acceptance Criteria:
- `nyash --compile-native app.nyash -o app.exe` 動作
- `nyash --compile-native app.hako -o app.exe` 動作
- 起動時間大幅短縮JIT起動コスト除去
- 配布可能実行ファイル生成

View File

@ -124,12 +124,12 @@ Scope:
Tasks:
- Cargo.toml: examples/GUI を feature でガードdefault は CLI 最小)。
- ビルド検証: `cargo build --bin nyash`Linux/Windows
- 実行検証: `cargo run -- ./local_tests/sample.nyash`。
- 実行検証: `cargo run -- ./local_tests/sample.hako`。
- ドキュメント: 上記手順を how-to-build-native に追記/点検。
Acceptance Criteria:
- Linux/Windows で `cargo build --bin nyash` が成功する。
- `local_tests/` 配下の簡単な .nyash が実行できる。
- `local_tests/` 配下の簡単な .hako が実行できる。
- 他 bin/examples が壊れていても `--bin nyash` だけで通る。
Out of Scope:
@ -256,7 +256,7 @@ Summary:
Scope/Tasks:
- AST: BoxDeclaration(is_static=true, name=Main) を検出 → main() を抽出
- Lowering: body を Program に変換して既存経路に渡す
- Tests: local_tests/mir_loop_no_local.nyash で dump/VM が通る
- Tests: local_tests/mir_loop_no_local.hako で dump/VM が通る
Acceptance Criteria:
- `--dump-mir` が static Main サンプルで成功
@ -350,7 +350,7 @@ Expected Duration: 1週間
### 成功基準
- Phase 8.3のBox操作WASMが実際に動作
- test_wasm_box_ops.nyash が正常実行
- test_wasm_box_ops.hako が正常実行
- ユーザー定義Boxの完全サポート
------------------------------------------------------------
@ -555,7 +555,7 @@ Scope/Tasks:
- 起動時間・配布サイズ最適化
Acceptance Criteria:
- `nyash --compile-native app.nyash -o app.exe` 動作
- `nyash --compile-native app.hako -o app.exe` 動作
- 起動時間大幅短縮JIT起動コスト除去
- 配布可能実行ファイル生成
@ -592,7 +592,7 @@ Summary:
1. **WASM/AOT コンパイルエラー(最重要)**
```bash
$ ./target/release/nyash --compile-wasm test_simple_loop.nyash
$ ./target/release/nyash --compile-wasm test_simple_loop.hako
❌ Unsupported instruction: Jump { target: BasicBlockId(1) }
```
**影響**: ループ・条件分岐を含む全プログラムがWASM/AOT化不可
@ -623,7 +623,7 @@ Summary:
- グレースフルシャットダウン
Acceptance Criteria:
- ✅ `nyash --compile-wasm test_loop.nyash` 成功
- ✅ `nyash --compile-wasm test_loop.hako` 成功
- ✅ HTTPサーバー実動作curl http://localhost:8080/
- ✅ unwrap()使用箇所: 26 → 5以下
- ✅ WASM性能: 11.5倍 → 13.5倍達成

View File

@ -123,12 +123,12 @@ Scope:
Tasks:
- Cargo.toml: examples/GUI を feature でガードdefault は CLI 最小)。
- ビルド検証: `cargo build --bin nyash`Linux/Windows
- 実行検証: `cargo run -- ./local_tests/sample.nyash`。
- 実行検証: `cargo run -- ./local_tests/sample.hako`。
- ドキュメント: 上記手順を how-to-build-native に追記/点検。
Acceptance Criteria:
- Linux/Windows で `cargo build --bin nyash` が成功する。
- `local_tests/` 配下の簡単な .nyash が実行できる。
- `local_tests/` 配下の簡単な .hako が実行できる。
- 他 bin/examples が壊れていても `--bin nyash` だけで通る。
Out of Scope:
@ -255,7 +255,7 @@ Summary:
Scope/Tasks:
- AST: BoxDeclaration(is_static=true, name=Main) を検出 → main() を抽出
- Lowering: body を Program に変換して既存経路に渡す
- Tests: local_tests/mir_loop_no_local.nyash で dump/VM が通る
- Tests: local_tests/mir_loop_no_local.hako で dump/VM が通る
Acceptance Criteria:
- `--dump-mir` が static Main サンプルで成功
@ -349,7 +349,7 @@ Expected Duration: 1週間
### 成功基準
- Phase 8.3のBox操作WASMが実際に動作
- test_wasm_box_ops.nyash が正常実行
- test_wasm_box_ops.hako が正常実行
- ユーザー定義Boxの完全サポート
------------------------------------------------------------
@ -553,7 +553,7 @@ Scope/Tasks:
- 起動時間・配布サイズ最適化
Acceptance Criteria:
- `nyash --compile-native app.nyash -o app.exe` 動作
- `nyash --compile-native app.hako -o app.exe` 動作
- 起動時間大幅短縮JIT起動コスト除去
- 配布可能実行ファイル生成

View File

@ -124,12 +124,12 @@ Scope:
Tasks:
- Cargo.toml: examples/GUI を feature でガードdefault は CLI 最小)。
- ビルド検証: `cargo build --bin nyash`Linux/Windows
- 実行検証: `cargo run -- ./local_tests/sample.nyash`。
- 実行検証: `cargo run -- ./local_tests/sample.hako`。
- ドキュメント: 上記手順を how-to-build-native に追記/点検。
Acceptance Criteria:
- Linux/Windows で `cargo build --bin nyash` が成功する。
- `local_tests/` 配下の簡単な .nyash が実行できる。
- `local_tests/` 配下の簡単な .hako が実行できる。
- 他 bin/examples が壊れていても `--bin nyash` だけで通る。
Out of Scope:
@ -256,7 +256,7 @@ Summary:
Scope/Tasks:
- AST: BoxDeclaration(is_static=true, name=Main) を検出 → main() を抽出
- Lowering: body を Program に変換して既存経路に渡す
- Tests: local_tests/mir_loop_no_local.nyash で dump/VM が通る
- Tests: local_tests/mir_loop_no_local.hako で dump/VM が通る
Acceptance Criteria:
- `--dump-mir` が static Main サンプルで成功
@ -350,7 +350,7 @@ Expected Duration: 1週間
### 成功基準
- Phase 8.3のBox操作WASMが実際に動作
- test_wasm_box_ops.nyash が正常実行
- test_wasm_box_ops.hako が正常実行
- ユーザー定義Boxの完全サポート
------------------------------------------------------------
@ -555,7 +555,7 @@ Scope/Tasks:
- 起動時間・配布サイズ最適化
Acceptance Criteria:
- `nyash --compile-native app.nyash -o app.exe` 動作
- `nyash --compile-native app.hako -o app.exe` 動作
- 起動時間大幅短縮JIT起動コスト除去
- 配布可能実行ファイル生成
@ -592,7 +592,7 @@ Summary:
1. **WASM/AOT コンパイルエラー(最重要)**
```bash
$ ./target/release/nyash --compile-wasm test_simple_loop.nyash
$ ./target/release/nyash --compile-wasm test_simple_loop.hako
❌ Unsupported instruction: Jump { target: BasicBlockId(1) }
```
**影響**: ループ・条件分岐を含む全プログラムがWASM/AOT化不可
@ -623,7 +623,7 @@ Summary:
- グレースフルシャットダウン
Acceptance Criteria:
- ✅ `nyash --compile-wasm test_loop.nyash` 成功
- ✅ `nyash --compile-wasm test_loop.hako` 成功
- ✅ HTTPサーバー実動作curl http://localhost:8080/
- ✅ unwrap()使用箇所: 26 → 5以下
- ✅ WASM性能: 11.5倍 → 13.5倍達成

View File

@ -27,7 +27,7 @@ nyash-macos (1.8MB) - 署名付き
### **2. 開発者向け配布**
```bash
# LLVM IRの中立性を活用
nyashc --emit-bitcode program.nyash
nyashc --emit-bitcode program.hako
# → program.bc (プラットフォーム中立)
# 各自のマシンで最適化コンパイル

View File

@ -9,7 +9,7 @@ LLVM IRはプラットフォーム中立。だから**1回のIR生成から同
```rust
// 革命的ワンパス・マルチターゲット生成
nyashc --targets linux,windows,macos program.nyash
nyashc --targets linux,windows,macos program.hako
// 出力(同時生成!)
dist/x86_64-unknown-linux-musl/nyash # Linux版

View File

@ -23,7 +23,7 @@
#### **即効性のある解決策Week 1-3**
```bash
# Linux + Windows同時生成
nyashc --targets linux,windows-gnu program.nyash
nyashc --targets linux,windows-gnu program.hako
# 出力
dist/linux/nyash # Linux版musl静的

View File

@ -14,7 +14,7 @@ Phase 9.78 LLVM PoCの第一歩として、inkwellクレートを導入し、最
以下のNyashプログラムがLLVM経由で実行され、正しい終了コードを返すこと
```nyash
// test_return_42.nyash
// test_return_42.hako
static box Main {
main() {
return 42
@ -24,7 +24,7 @@ static box Main {
期待される動作:
```bash
$ cargo run --features llvm -- --backend llvm test_return_42.nyash
$ cargo run --features llvm -- --backend llvm test_return_42.hako
$ echo $?
42
```

View File

@ -29,7 +29,7 @@ Phase 9.78 LLVM PoCの開始です最初のステップとして、inkwellク
## 🎯 成功条件
```nyash
// test_return_42.nyash
// test_return_42.hako
static box Main {
main() {
return 42
@ -68,7 +68,7 @@ static box Main {
## ✅ 完了条件
- [ ] inkwellがビルドできる
- [ ] test_return_42.nyashがコンパイルできる
- [ ] test_return_42.hakoがコンパイルできる
- [ ] 実行ファイルが終了コード42を返す
- [ ] 基本的なテストがパスする

View File

@ -52,7 +52,7 @@ cargo build --features llvm
### 4. **テストプログラム作成**5分
```bash
# テスト用Nyashファイル
cat > test_return_42.nyash << 'EOF'
cat > test_return_42.hako << 'EOF'
static box Main {
main() {
return 42