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

@ -16,11 +16,11 @@ static function Factory.create() {
```
### ✅ **outbox活用プログラム完成**
1. **simple_factory.nyash** - ケーキ工場
2. **pet_shop.nyash** - ペットショップ
3. **omikuji.nyash** - おみくじ
4. **maze_generator.nyash** - 迷路生成
5. **calculator_demo.nyash** - 数式評価器
1. **simple_factory.hako** - ケーキ工場
2. **pet_shop.hako** - ペットショップ
3. **omikuji.hako** - おみくじ
4. **maze_generator.hako** - 迷路生成
5. **calculator_demo.hako** - 数式評価器
## 🎊 **MethodBox完全実装大成功**

View File

@ -19,11 +19,11 @@ cd nyash/nyash-rust
cargo build
# 実行
./target/debug/nyash your_program.nyash
./target/debug/nyash your_program.hako
```
### **2. はじめてのNyashプログラム**
`hello.nyash`を作成:
`hello.hako`を作成:
```nyash
print("Hello, Nyash World!")
print("Everything is Box! 🎉")
@ -31,7 +31,7 @@ print("Everything is Box! 🎉")
実行:
```bash
./target/debug/nyash hello.nyash
./target/debug/nyash hello.hako
```
出力:
@ -408,24 +408,24 @@ debuggingDemo()
### **プロジェクト構造**
```
my_nyash_project/
├── main.nyash # メインプログラム
├── main.hako # メインプログラム
├── utils/
│ ├── math.nyash # 数学ユーティリティ
│ ├── string.nyash # 文字列ユーティリティ
│ └── debug.nyash # デバッグ関数
│ ├── math.hako # 数学ユーティリティ
│ ├── string.hako # 文字列ユーティリティ
│ └── debug.hako # デバッグ関数
└── models/
├── person.nyash # Personクラス
└── calculator.nyash # Calculatorクラス
├── person.hako # Personクラス
└── calculator.hako # Calculatorクラス
```
### **main.nyash**
### **main.hako**
```nyash
# 📦 Module System Example
include "utils/math.nyash"
include "utils/string.nyash"
include "models/person.nyash"
include "models/calculator.nyash"
include "utils/math.hako"
include "utils/string.hako"
include "models/person.hako"
include "models/calculator.hako"
function main() {
print("🚀 Multi-module Nyash Application")
@ -509,7 +509,7 @@ loop(i < 1000) {
### **学習順序**
1.**基本構文** - このガイドで完了
2. **並行処理** - `test_async_*.nyash`を参考に
2. **並行処理** - `test_async_*.hako`を参考に
3. **Static Box応用** - ユーティリティクラス作成
4. **デバッグ技法** - DebugBox完全活用
5. **アプリケーション開発** - 実践的なプロジェクト
@ -517,10 +517,10 @@ loop(i < 1000) {
### **サンプルプログラム**
```bash
# 実装済みサンプル
./target/debug/nyash test_local_init.nyash # 初期化付き変数
./target/debug/nyash app_dice_rpg.nyash # RPGバトルゲーム
./target/debug/nyash app_statistics.nyash # 統計計算
./target/debug/nyash test_async_parallel.nyash # 並行処理
./target/debug/nyash test_local_init.hako # 初期化付き変数
./target/debug/nyash app_dice_rpg.hako # RPGバトルゲーム
./target/debug/nyash app_statistics.hako # 統計計算
./target/debug/nyash test_async_parallel.hako # 並行処理
```
### **リファレンス**

View File

@ -103,8 +103,8 @@ DEBUG.saveToFile("debug.txt")
### 📦 **モジュールシステム**
```nyash
include "math_utils.nyash" # ファイルインクルード
include "graphics.nyash" # 機能の組み込み
include "math_utils.hako" # ファイルインクルード
include "graphics.hako" # 機能の組み込み
```
## 🎮 実装済みアプリケーション

View File

@ -56,7 +56,7 @@ pub type IntentBox = Arc<Mutex<IntentBoxData>>;
**テストコード**:
```nyash
// tests/phase2/intent_box_test.nyash
// tests/phase2/intent_box_test.hako
local msg = new IntentBox("chat.message", { text: "Hello P2P!" })
local console = new ConsoleBox()
console.log("Name: " + msg.name) // "chat.message"
@ -131,7 +131,7 @@ impl P2PBoxData {
## 🧪 包括的テスト要件
### **基本動作テスト**
**ファイル**: `test_p2p_basic_new.nyash`
**ファイル**: `test_p2p_basic_new.hako`
```nyash
// 2つのード作成

View File

@ -72,12 +72,12 @@ This document summarizes the implementation of Phase 6: Box operations minimal i
### VM Backend Execution
```bash
./nyash --backend vm program.nyash
./nyash --backend vm program.hako
```
### MIR Generation and Inspection
```bash
./nyash --dump-mir program.nyash
./nyash --dump-mir program.hako
```
### Running Tests

View File

@ -232,11 +232,11 @@ cd projects/nyash-wasm
cargo build --release
# プログラムをローカルで実行
./target/release/nyash program.nyash
./target/release/nyash program.hako
# 例を試す
./target/release/nyash test_async_demo.nyash
./target/release/nyash app_dice_rpg.nyash
./target/release/nyash test_async_demo.hako
./target/release/nyash app_dice_rpg.hako
```
#### 🪟 Windows版 (クロスコンパイル)

View File

@ -69,10 +69,10 @@ me.server.isServer() // ✅ SocketBox clone B, is_server=true (sa
## Testing
### Test Files Created:
- `test_final_validation.nyash` - Replicates the exact issue scenario
- `test_complete_socketbox_fix.nyash` - Comprehensive SocketBox testing
- `test_multiple_stateful_boxes.nyash` - Tests multiple stateful box types
- `test_arc_fix.nyash` - Original issue test case
- `test_final_validation.hako` - Replicates the exact issue scenario
- `test_complete_socketbox_fix.hako` - Comprehensive SocketBox testing
- `test_multiple_stateful_boxes.hako` - Tests multiple stateful box types
- `test_arc_fix.hako` - Original issue test case
### Expected Results:
All tests should show that `isServer()` returns `true` after `bind()` is called, confirming that state is preserved across field accesses.

View File

@ -5,7 +5,7 @@
### **1. 最小デッドロック再現**
```bash
# 実行コマンド (10秒でタイムアウト)
timeout 10s ./target/release/nyash test_socket_deadlock_minimal.nyash
timeout 10s ./target/release/nyash test_socket_deadlock_minimal.hako
# 期待結果: タイムアウトでデッドロック確認
# 出力例:
@ -17,7 +17,7 @@ timeout 10s ./target/release/nyash test_socket_deadlock_minimal.nyash
### **2. 他のBox正常動作確認**
```bash
# 実行コマンド
./target/release/nyash test_other_boxes_working.nyash
./target/release/nyash test_other_boxes_working.hako
# 期待結果: 正常完了
# 出力例:
@ -29,7 +29,7 @@ timeout 10s ./target/release/nyash test_socket_deadlock_minimal.nyash
### **3. SocketBox全メソッドテスト**
```bash
# 実行コマンド (30秒でタイムアウト)
timeout 30s ./target/release/nyash test_socket_methods_comprehensive.nyash
timeout 30s ./target/release/nyash test_socket_methods_comprehensive.hako
# 期待結果: 最初のtoString()でデッドロック
# 出力例:

View File

@ -141,8 +141,8 @@ Module::deserialize_file("output.cwasm")
**実装目標**:
```bash
nyash --compile-native program.nyash -o program.exe
nyash --aot program.nyash # 短縮形
nyash --compile-native program.hako -o program.exe
nyash --aot program.hako # 短縮形
```
**期待効果**: 280倍 → 500倍 (1.8倍追加向上)

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

@ -30,7 +30,7 @@ nyashstd.string.upper("hello")
### 2. 既存include実装
単純なファイル読み込み+実行システム:
```nyash
include "myfile.nyash" # ファイル内容をパース・実行
include "myfile.hako" # ファイル内容をパース・実行
```
- 重複読み込み防止機能あり
@ -46,9 +46,9 @@ includeとnamespace/usingの統合が必要
### A. 依存関係解決の複雑性
```nyash
# main.nyash
using nyashstd # ← nyashstd.nyashの読み込みが必要
using mylib # ← mylib.nyashの読み込みが必要
# main.hako
using nyashstd # ← nyashstd.hakoの読み込みが必要
using mylib # ← mylib.hakoの読み込みが必要
string.upper("hello") # nyashstdから
mylib.custom() # mylibから
```
@ -71,8 +71,8 @@ Cargo.toml/package.json類似の依存関係管理ファイル
```toml
# nyash.link (プロジェクトルート)
[dependencies]
nyashstd = "./stdlib/nyashstd.nyash"
mylib = "./libs/mylib.nyash"
nyashstd = "./stdlib/nyashstd.hako"
mylib = "./libs/mylib.hako"
[search_paths]
stdlib = "./stdlib/"
@ -82,7 +82,7 @@ libs = "./libs/"
### 動作イメージ
1. `using nyashstd` 実行時
2. nyash.linkを読み取り
3. `"./stdlib/nyashstd.nyash"` を特定
3. `"./stdlib/nyashstd.hako"` を特定
4. ファイル読み込み・名前空間登録
5. `string.upper()` が使用可能に
@ -96,7 +96,7 @@ libs = "./libs/"
### 2. 既存includeとの共存戦略
**選択肢A**: includeを低レベルAPIとして残す
```nyash
include "config.nyash" # 即座実行(設定ファイル等)
include "config.hako" # 即座実行(設定ファイル等)
using mylib # 名前空間インポート(ライブラリ)
```

View File

@ -13,7 +13,7 @@ Phase 9で実装されたWASM/AOTとHTTPサーバー機能に重大な制約が
### 1. **WASM/AOT コンパイルエラー(最重要)**
```bash
# 現象
$ ./target/release/nyash --compile-wasm test_simple_loop.nyash
$ ./target/release/nyash --compile-wasm test_simple_loop.hako
❌ WASM compilation error: Unsupported instruction: Jump { target: BasicBlockId(1) }
```
@ -121,13 +121,13 @@ let listener = match self.listener.lock() {
1. **WASM/AOT成功**
```bash
$ ./target/release/nyash --compile-wasm test_wasm_loop.nyash
$ ./target/release/nyash --compile-wasm test_wasm_loop.hako
✅ WASM compilation completed successfully!
```
2. **HTTPサーバー実動作**
```bash
$ ./target/release/nyash test_http_server_real.nyash &
$ ./target/release/nyash test_http_server_real.hako &
$ curl http://localhost:8080/
<h1>Nyash Server Running!</h1>
```

View File

@ -65,7 +65,7 @@ Rust製インタープリターによる高性能実行と、直感的な構文
|-------|------|---|
| `function` | 関数定義 | `function add(a,b) { }` |
| `print` | 出力 | `print("Hello")` |
| `include` | ファイル取り込み | `include "math.nyash"` |
| `include` | ファイル取り込み | `include "math.hako"` |
---

View File

@ -65,7 +65,7 @@ Rust製インタープリターによる高性能実行と、直感的な構文
|-------|------|---|
| `function` | 関数定義 | `function add(a,b) { }` |
| `print` | 出力 | `print("Hello")` |
| `include` | ファイル取り込み | `include "math.nyash"` |
| `include` | ファイル取り込み | `include "math.hako"` |
---

View File

@ -203,9 +203,9 @@ Call @debug, %value, "message"
### **Golden MIR テスト**
```bash
# 全バックエンドでMIR出力一致確認
./target/release/nyash --dump-mir-26 program.nyash > golden.mir
./target/release/nyash --backend vm --dump-mir-26 program.nyash > vm.mir
./target/release/nyash --backend wasm --dump-mir-26 program.nyash > wasm.mir
./target/release/nyash --dump-mir-26 program.hako > golden.mir
./target/release/nyash --backend vm --dump-mir-26 program.hako > vm.mir
./target/release/nyash --backend wasm --dump-mir-26 program.hako > wasm.mir
diff golden.mir vm.mir && diff vm.mir wasm.mir
```

View File

@ -14,11 +14,11 @@
### 🚀 **差別化ポイント**
```bash
# 全バックエンド統一実行
nyash --target interp program.nyash # デバッグ
nyash --target vm program.nyash # 高速実行
nyash --target wasm program.nyash # Web配布
nyash --target aot-rust program.nyash # ネイティブ
nyash --target jit-cranelift program.nyash # JIT
nyash --target interp program.hako # デバッグ
nyash --target vm program.hako # 高速実行
nyash --target wasm program.hako # Web配布
nyash --target aot-rust program.hako # ネイティブ
nyash --target jit-cranelift program.hako # JIT
```
それぞれに**ベンチ + 互換テスト**が通る統一設計
@ -112,22 +112,22 @@ br %alive -> %use_bb, %null_bb
#### **Golden Dump検証**
```bash
# MIR出力の一致検証
nyash --dump-mir program.nyash > expected.mir
nyash --dump-mir program.nyash > actual.mir
nyash --dump-mir program.hako > expected.mir
nyash --dump-mir program.hako > actual.mir
diff expected.mir actual.mir # 0でなければ回帰
# 全バックエンド同一出力
nyash --target interp program.nyash > interp.out
nyash --target vm program.nyash > vm.out
nyash --target wasm program.nyash > wasm.out
nyash --target interp program.hako > interp.out
nyash --target vm program.hako > vm.out
nyash --target wasm program.hako > wasm.out
diff interp.out vm.out && diff vm.out wasm.out
```
#### **Bus-elision検証**
```bash
# Bus最適化のon/off切り替え
nyash --elide-bus program.nyash > optimized.out
nyash --no-elide-bus program.nyash > reference.out
nyash --elide-bus program.hako > optimized.out
nyash --no-elide-bus program.hako > reference.out
diff optimized.out reference.out # 結果は同一であるべき
```
@ -162,11 +162,11 @@ Bus-elision OFF: 分散通信フルサポート
### **統一コマンド体系**
```bash
nyash --target interp program.nyash # インタープリター
nyash --target vm program.nyash # 仮想マシン
nyash --target wasm program.nyash # WebAssembly
nyash --target aot-rust program.nyash # AOTネイティブ
nyash --target jit-cranelift program.nyash # JITコンパイル
nyash --target interp program.hako # インタープリター
nyash --target vm program.hako # 仮想マシン
nyash --target wasm program.hako # WebAssembly
nyash --target aot-rust program.hako # AOTネイティブ
nyash --target jit-cranelift program.hako # JITコンパイル
```
### **品質保証体系**

View File

@ -49,8 +49,8 @@ Priority: High (Phase 8.3完了後に即座開始)
### 実装目標
新CLI機能:
nyash --compile-native program.nyash -o program.exe
nyash --aot program.nyash
nyash --compile-native program.hako -o program.exe
nyash --aot program.hako
### 技術アプローチ
Pipeline: Nyash → AST → MIR → WASM → wasmtime compile → Native Binary

View File

@ -184,8 +184,8 @@ cargo check --all-targets
cargo build --release
# Functionality verification
./target/release/nyash test_comprehensive_operators.nyash
./target/release/nyash app_dice_rpg.nyash
./target/release/nyash test_comprehensive_operators.hako
./target/release/nyash app_dice_rpg.hako
./target/release/nyash --benchmark --iterations 10
# Regression testing

View File

@ -247,29 +247,29 @@ impl JITCompiler {
### 1. Golden MIR テスト
```bash
# 各サンプルのMIRダンプが全バックエンドで一致
./target/release/nyash --dump-mir test_golden_mir.nyash > golden.mir
./target/release/nyash --backend vm --dump-mir test_golden_mir.nyash > vm.mir
./target/release/nyash --backend wasm --dump-mir test_golden_mir.nyash > wasm.mir
./target/release/nyash --dump-mir test_golden_mir.hako > golden.mir
./target/release/nyash --backend vm --dump-mir test_golden_mir.hako > vm.mir
./target/release/nyash --backend wasm --dump-mir test_golden_mir.hako > wasm.mir
diff golden.mir vm.mir && diff vm.mir wasm.mir
```
### 2. 行動一致テスト
```bash
# 同入力→同出力weak失効時のnull/false含む
./target/release/nyash --backend interpreter test_behavior.nyash > interp.out
./target/release/nyash --backend vm test_behavior.nyash > vm.out
./target/release/nyash --backend wasm test_behavior.nyash > wasm.out
./target/release/nyash --backend interpreter test_behavior.hako > interp.out
./target/release/nyash --backend vm test_behavior.hako > vm.out
./target/release/nyash --backend wasm test_behavior.hako > wasm.out
diff interp.out vm.out && diff vm.out wasm.out
```
### 3. 性能スモークテスト
```bash
# 5種の代表ケースで性能継続検証
./target/release/nyash --benchmark add_loop.nyash
./target/release/nyash --benchmark map_getset.nyash
./target/release/nyash --benchmark alloc_free.nyash
./target/release/nyash --benchmark bus_local.nyash
./target/release/nyash --benchmark bus_actor.nyash
./target/release/nyash --benchmark add_loop.hako
./target/release/nyash --benchmark map_getset.hako
./target/release/nyash --benchmark alloc_free.hako
./target/release/nyash --benchmark bus_local.hako
./target/release/nyash --benchmark bus_actor.hako
# 期待値: VMがinterp以上、WASMがVM以上
```
@ -309,13 +309,13 @@ diff interp.out vm.out && diff vm.out wasm.out
### デバッグ支援
```bash
# MIR命令別実行トレース
./target/release/nyash --trace-mir-execution test.nyash
./target/release/nyash --trace-mir-execution test.hako
# 所有森検証
./target/release/nyash --verify-ownership-forest test.nyash
./target/release/nyash --verify-ownership-forest test.hako
# 効果システム確認
./target/release/nyash --dump-mir-effects test.nyash
./target/release/nyash --dump-mir-effects test.hako
```
## 📊 期待される効果

View File

@ -70,7 +70,7 @@ fn load_builtin_plugins(&mut self) {
#### 2.2 テストプログラム
```nyash
// test_array_plugin.nyash
// test_array_plugin.hako
local arr
arr = new ArrayBox() // プラグイン版を呼ぶ
print(arr.length()) // 0が出力されれば成功
@ -78,7 +78,7 @@ print(arr.length()) // 0が出力されれば成功
#### 2.3 VM実行
```bash
./target/release/nyash --backend vm test_array_plugin.nyash
./target/release/nyash --backend vm test_array_plugin.hako
```
### Step 3: JIT動作確認
@ -97,7 +97,7 @@ match box_type {
#### 3.2 JIT実行テスト
```bash
NYASH_JIT_EXEC=1 NYASH_JIT_THRESHOLD=1 ./target/release/nyash --backend vm test_array_plugin.nyash
NYASH_JIT_EXEC=1 NYASH_JIT_THRESHOLD=1 ./target/release/nyash --backend vm test_array_plugin.hako
```
### Step 4: 段階的移行
@ -123,7 +123,7 @@ if env::var("NYASH_USE_PLUGIN_BUILTINS").is_ok() {
#### 5.1 ベンチマーク作成
```nyash
// bench_array_ops.nyash
// bench_array_ops.hako
local arr = new ArrayBox()
local start = Timer.now()
loop(i in 0..1000000) {
@ -136,10 +136,10 @@ print("Time: " + elapsed)
#### 5.2 比較測定
```bash
# 従来版
./target/release/nyash --benchmark bench_array_ops.nyash
./target/release/nyash --benchmark bench_array_ops.hako
# プラグイン版
NYASH_USE_PLUGIN_BUILTINS=1 ./target/release/nyash --benchmark bench_array_ops.nyash
NYASH_USE_PLUGIN_BUILTINS=1 ./target/release/nyash --benchmark bench_array_ops.hako
```
## 🎯 成功基準
@ -169,10 +169,10 @@ NYASH_USE_PLUGIN_BUILTINS=1 ./target/release/nyash --benchmark bench_array_ops.n
```bash
# プラグインロード確認
NYASH_DEBUG_PLUGIN=1 ./target/release/nyash test.nyash
NYASH_DEBUG_PLUGIN=1 ./target/release/nyash test.hako
# JIT呼び出し確認
NYASH_JIT_EVENTS=1 ./target/release/nyash --backend vm test.nyash
NYASH_JIT_EVENTS=1 ./target/release/nyash --backend vm test.hako
```
---

View File

@ -58,7 +58,7 @@ This plan refines how we leverage the existing plugin system (BID-FFI) to unify
- Link scripts and `nyc build-aot` proof-of-concept.
- Hello World-level standalone EXE on Linux/macOS.
- DoD:
- `nyc build-aot <file.nyash> -o app` runs without JIT/VM.
- `nyc build-aot <file.hako> -o app` runs without JIT/VM.
- Basic debug info and minimal unwind.
### 10.5: Python Integration (moved; separate phase)

View File

@ -46,7 +46,7 @@ export NYASH_PLUGIN_OVERRIDE_TYPES="ArrayBox,MapBox,ConsoleBox,StringBox,Integer
export NYASH_DISABLE_BUILTINS=1
cargo build --release --features cranelift-jit
./target/release/nyash --backend vm examples/console_demo.nyash
./target/release/nyash --backend vm examples/console_demo.hako
```
## Notes

View File

@ -440,7 +440,7 @@ pub fn register_builtin_boxes(env: &mut Environment) {
### 6. 使用例とテストケース
```nyash
// test_python_parser_phase1.nyash
// test_python_parser_phase1.hako
local py = new PythonParserBox()
// Phase 1: 基本的な関数定義と演算
@ -513,7 +513,7 @@ export NYASH_PYTHONPARSER_TELEMETRY=2 # 詳細ログ
export NYASH_PYTHONPARSER_STRICT=1 # フォールバック時にパニック
# 実行例
./target/release/nyash test_python_parser.nyash
./target/release/nyash test_python_parser.hako
# 出力
[PythonParser] Module: test.py (Python 3.11)

View File

@ -46,7 +46,7 @@ result = add(10, 5)
## 🛠️ コマンドラインツール
```bash
# 基本変換
nyash-transpile input.py -o output.nyash
nyash-transpile input.py -o output.hako
# 変換統計付き
nyash-transpile --stats complex.py

View File

@ -21,7 +21,7 @@ for i in range(10):
↓ 変換
```nyash
# output.nyash
# output.hako
function calculate(x, y) {
local result
result = x * 2 + y
@ -74,7 +74,7 @@ impl PythonParserBox {
### コマンドライン版
```bash
# PythonファイルをNyashに変換
nyash-transpile input.py -o output.nyash
nyash-transpile input.py -o output.hako
# 標準出力に出力
nyash-transpile script.py
@ -94,7 +94,7 @@ local python_code = FileBox.read("algorithm.py")
local nyash_code = transpiler.to_nyash_source(python_code)
// ファイルに保存
FileBox.write("algorithm.nyash", nyash_code)
FileBox.write("algorithm.hako", nyash_code)
// または直接実行
eval(nyash_code)

View File

@ -17,8 +17,8 @@ Python統合を本格化する前に、配布可能なネイティブ実行フ
## ✅ 成果DoD
- `cargo build --release --features cranelift-jit` の後、
- Linux: `./tools/build_aot.sh examples/aot_min_string_len.nyash -o app && ./app`
- Windows: `powershell -ExecutionPolicy Bypass -File tools\build_aot.ps1 -Input examples\aot_min_string_len.nyash -Out app.exe && .\app.exe`
- Linux: `./tools/build_aot.sh examples/aot_min_string_len.hako -o app && ./app`
- Windows: `powershell -ExecutionPolicy Bypass -File tools\build_aot.ps1 -Input examples\aot_min_string_len.hako -Out app.exe && .\app.exe`
- プラグインは `.so` 記述でも各OSで自動解決.dll/.dylib へ変換、lib剥がし
- `tools/smoke_aot_vs_vm.sh` で VM/EXE の `Result:` 行比較が可能(差異は警告表示)

View File

@ -69,7 +69,7 @@
### 10.5d JIT/AOT 統合35日
- AOTパイプライン固定: Lower→CLIF→OBJ出力→`ny_main`+`libnyrt.a`リンク→EXE
- CLI: `nyash --compile-native file.nyash -o app` を追加(失敗は非ゼロ終了)
- CLI: `nyash --compile-native file.hako -o app` を追加(失敗は非ゼロ終了)
- libnyrt: `nyash.python.*` 等のシムを提供し、未解決シンボル解決
- ディスパッチ: type_id→`nyplug_*_invoke` の静的/動的ルート(第一段は動的優先)
@ -79,8 +79,8 @@
- ドキュメント: 使用例、制約GIL/スレッド、AOT時のリンク・ランタイム要件
追加済みサンプル(最小チェーン)
- VM: `examples/py_min_chain_vm.nyash`import→getattr→call→println
- AOT: `examples/aot_py_min_chain.nyash`import→getattr→call→return
- VM: `examples/py_min_chain_vm.hako`import→getattr→call→println
- AOT: `examples/aot_py_min_chain.hako`import→getattr→call→return
## 🎯 DoD定義
- NyashからPythonコードを評価し、PyObjectをHandleで往復できる

View File

@ -6,8 +6,8 @@
1) 到達イメージDoD
====================
- Linux/Windows で以下が安定動作:
- AOT: `examples/aot_py_min_chain.nyash` → `Result: 4`math.sqrt(16)
- VM: `examples/py_min_chain_vm.nyash` → 4.0 表示NYASH_PY_AUTODECODE=1
- AOT: `examples/aot_py_min_chain.hako` → `Result: 4`math.sqrt(16)
- VM: `examples/py_min_chain_vm.hako` → 4.0 表示NYASH_PY_AUTODECODE=1
- returns_result 系サンプルimportR/getattrR/callRで Ok/Err が期待通りに表示
- AOTビルドの配布体験が明確:
- `tools/build_aot.{sh,ps1}` で .o → EXE、`nyash.toml`/plugins 解決、Windowsでは PATH/PYTHONHOME 調整
@ -66,7 +66,7 @@ M5: 観測/CI軽量
====================
6) 成果物Artifacts
====================
- 例: `examples/aot_py_min_chain.nyash`, `examples/py_min_chain_vm.nyash`(既存)
- 例: `examples/aot_py_min_chain.hako`, `examples/py_min_chain_vm.hako`(既存)
- ツール: `tools/build_aot.{sh,ps1}`Python節、`tools/smoke_aot_vs_vm.sh`Python最小
- Docs: `docs/guides/build/aot_quickstart.md`Python節、`docs/reference/abi/ffi_calling_convention_min.md`bytes/N引数注記

View File

@ -123,7 +123,7 @@ nyash-plugin-sdk = { path = "../../crates/plugin-sdk" }
# テスト実行
cargo build --release
../../target/release/nyash test_parser.nyash
../../target/release/nyash test_parser.hako
```
## 💡 創造的可能性

View File

@ -5,7 +5,7 @@
### 使用例1: 基本的な関数のネイティブ化
```nyash
// example1_basic.nyash
// example1_basic.hako
// Pythonコードをネイティブコンパイル
// Step 1: Pythonコードを用意
@ -51,7 +51,7 @@ if mir_module.isOk() {
### 使用例2: コンパイル可否の明確な判定
```nyash
// example2_clear_separation.nyash
// example2_clear_separation.hako
// コンパイルできるかどうか事前に判定
// Phase 1対応のコード
@ -107,7 +107,7 @@ if result2.isOk() {
### 使用例3: プログレッシブ最適化
```nyash
// example3_progressive.nyash
// example3_progressive.hako
// 実行しながら徐々に最適化
// 型推論付きコンパイラー
@ -153,7 +153,7 @@ for i in range(5) {
### 使用例4: 言語間相互運用
```nyash
// example4_interop.nyash
// example4_interop.hako
// PythonコードとNyashコードのシームレスな連携
// Pythonで数値計算関数を定義
@ -198,7 +198,7 @@ box GameObject {
### 使用例5: デバッグとプロファイリング
```nyash
// example5_debug.nyash
// example5_debug.hako
// 開発時のデバッグ支援
// デバッグモード有効

View File

@ -59,7 +59,7 @@ fn test_compile_arithmetic() {
### 2. Differential Testing Framework
```nyash
// tests/differential/framework.nyash
// tests/differential/framework.hako
box DifferentialTester {
init { oracle, implementation, results }
@ -145,7 +145,7 @@ def test_arithmetic_properties(x, y):
### 4. ベンチマークスイート
```nyash
// benchmarks/numeric_suite.nyash
// benchmarks/numeric_suite.hako
box NumericBenchmark {
run() {
local suite = new BenchmarkSuite()

View File

@ -52,7 +52,7 @@
5) ベンチと回帰(最小)
- 目標: ラインの性能/退行の早期検知
- タスク:
- ny_bench.nyash のケース整理(関数呼出/Map set-get/branch
- ny_bench.hako のケース整理(関数呼出/Map set-get/branch
- compare: VM vs JITウォームアップ付き
- 受入: ベンチ出力に JIT/VM の比較が出る(改善/退行が見える)
@ -71,15 +71,15 @@
```bash
# math.min関数スタイル
NYASH_JIT_EXEC=1 NYASH_JIT_THRESHOLD=1 NYASH_JIT_NATIVE_F64=1 NYASH_JIT_EVENTS=1 \
./target/release/nyash --backend vm examples/jit_math_function_style_min_float.nyash
./target/release/nyash --backend vm examples/jit_math_function_style_min_float.hako
# Map.get HH直実行
NYASH_JIT_EXEC=1 NYASH_JIT_THRESHOLD=1 NYASH_JIT_HOSTCALL=1 NYASH_JIT_EVENTS=1 \
./target/release/nyash --backend vm examples/jit_map_get_param_hh.nyash
./target/release/nyash --backend vm examples/jit_map_get_param_hh.hako
# Mutating opt-inArray.push
NYASH_JIT_EXEC=1 NYASH_JIT_THRESHOLD=1 NYASH_JIT_HOSTCALL=1 NYASH_JIT_EVENTS=1 \
./target/release/nyash --backend vm examples/jit_policy_optin_mutating.nyash
./target/release/nyash --backend vm examples/jit_policy_optin_mutating.hako
## 例とスモーク(開発者向けクイック)
- 例一覧: `examples/README.md`HH直実行・mutating opt-in・GCデモ

View File

@ -11,7 +11,7 @@ How-To (Local)
(env)
set NYASH_GC_BARRIER_STRICT=1
set NYASH_GC_TRACE=1
nyash <program.nyash>
nyash <program.hako>
Expected
- Barrier sites log to stderr.

View File

@ -25,7 +25,7 @@ Deliverables
- Lowering updates: Branch/Jump hook uses real block IDs; Compare emits b1-friendly shape.
- Env flags: Reuse `NYASH_JIT_EXEC/THRESHOLD/STATS/DUMP`; guard hostcalls by `NYASH_JIT_HOSTCALL`.
- Docs: Update execution-backends.md with “JIT control-flow coverage (10.7)”.
- Examples: `examples/jit_branch_demo.nyash` (if/loop minimal).
- Examples: `examples/jit_branch_demo.hako` (if/loop minimal).
Design Sketch
1) Block Mapping
@ -59,13 +59,13 @@ Implementation Plan (Tasks)
- For Branch/Jump, call builder with mapped blocks and condition value hint.
- Compare: emit b1 icmp; when Compare is used as value elsewhere, allow i64 extend as needed.
- T4: Minimal PHI support for a single merge (optional; guarded by env `NYASH_JIT_PHI_MIN=1`).
- T5: Add `examples/jit_branch_demo.nyash` with: `if (a < b) { return 1 } else { return 2 }` and a small loop with early `return`.
- T5: Add `examples/jit_branch_demo.hako` with: `if (a < b) { return 1 } else { return 2 }` and a small loop with early `return`.
- T6: Docs update: execution-backends.md “JIT coverage 10.7” + env flags.
- T7: Bench (optional): integrate into `--benchmark` with JIT warmup when `NYASH_JIT_EXEC=1`.
Validation
- Build matrix: with/without `cranelift-jit` feature.
- Smoke tests: run `jit_branch_demo.nyash` with `NYASH_JIT_EXEC=1 NYASH_JIT_THRESHOLD=1`.
- Smoke tests: run `jit_branch_demo.hako` with `NYASH_JIT_EXEC=1 NYASH_JIT_THRESHOLD=1`.
- Fallback verification: force a path with unsupported op to confirm VM fallback.
- GC/scheduler: ensure safepoint path still works (unchanged).

View File

@ -14,10 +14,10 @@ Flags and CLI (common across 10.7)
- CLI: --jit-exec --jit-stats --jit-stats-json --jit-dump --jit-threshold N --jit-phi-min --jit-hostcall
Examples to validate
- examples/jit_branch_demo.nyash
- examples/jit_loop_early_return.nyash
- examples/jit_phi_demo.nyash
- examples/jit_array_param_call.nyash, jit_map_param_call.nyash (when hostcall is enabled)
- examples/jit_branch_demo.hako
- examples/jit_loop_early_return.hako
- examples/jit_phi_demo.hako
- examples/jit_array_param_call.hako, jit_map_param_call.hako (when hostcall is enabled)
Sub-phases (10.7a → 10.7h)

View File

@ -42,9 +42,9 @@ Non-Goals (later 10.7b+)
Deliverables
- Working minimal PHI + branch JIT execution on curated examples:
- examples/jit_branch_demo.nyash
- examples/jit_loop_early_return.nyash
- examples/jit_phi_demo.nyash (single-PHI diamond)
- examples/jit_branch_demo.hako
- examples/jit_loop_early_return.hako
- examples/jit_phi_demo.hako (single-PHI diamond)
- Fallback correctness: traps/panic → VM path; results match VM
- Configurable via CLI flags; metrics visible via JIT summary/JSON

View File

@ -67,11 +67,11 @@
- `NYASH_JIT_EVENTS=1`標準出力へJSON
- 任意: `NYASH_JIT_EVENTS_PATH=target/nyash/jit-events.jsonl`
- 代表サンプルVM経由でJITパス通過
- 成功: `./target/release/nyash --backend vm examples/jit_hostcall_len_string.nyash`
- 失敗: `NYASH_JIT_EVENTS=1 ./target/release/nyash --backend vm examples/jit_hostcall_array_append.nyash`
- 境界: `NYASH_JIT_EVENTS=1 ./target/release/nyash --backend vm examples/jit_hostcall_math_sin_mismatch.nyash`
- 署名一致(allow観測): `NYASH_JIT_EVENTS=1 ./target/release/nyash --backend vm examples/jit_hostcall_math_sin_allow_float.nyash`
- 関数スタイル(math.*): `NYASH_JIT_NATIVE_F64=1 NYASH_JIT_EVENTS=1 ./target/release/nyash --backend vm examples/jit_math_function_style_sin_float.nyash`
- 成功: `./target/release/nyash --backend vm examples/jit_hostcall_len_string.hako`
- 失敗: `NYASH_JIT_EVENTS=1 ./target/release/nyash --backend vm examples/jit_hostcall_array_append.hako`
- 境界: `NYASH_JIT_EVENTS=1 ./target/release/nyash --backend vm examples/jit_hostcall_math_sin_mismatch.hako`
- 署名一致(allow観測): `NYASH_JIT_EVENTS=1 ./target/release/nyash --backend vm examples/jit_hostcall_math_sin_allow_float.hako`
- 関数スタイル(math.*): `NYASH_JIT_NATIVE_F64=1 NYASH_JIT_EVENTS=1 ./target/release/nyash --backend vm examples/jit_math_function_style_sin_float.hako`
- `cos/abs/min/max` も同様のサンプルあり
- 詰まったら
- `--features cranelift-jit` が付いているか
@ -98,15 +98,15 @@
```bash
# math.*(関数スタイル): 署名一致でallow、戻りFloat表示
NYASH_JIT_EXEC=1 NYASH_JIT_THRESHOLD=1 NYASH_JIT_NATIVE_F64=1 NYASH_JIT_EVENTS=1 \
./target/release/nyash --backend vm examples/jit_math_function_style_min_float.nyash
./target/release/nyash --backend vm examples/jit_math_function_style_min_float.hako
# Map.getパラメータ受けHandleキー → HH直実行
NYASH_JIT_EXEC=1 NYASH_JIT_THRESHOLD=1 NYASH_JIT_HOSTCALL=1 NYASH_JIT_EVENTS=1 \
./target/release/nyash --backend vm examples/jit_map_get_param_hh.nyash
./target/release/nyash --backend vm examples/jit_map_get_param_hh.hako
# Map.get非パラメータ受け → fallback記録
NYASH_JIT_EXEC=1 NYASH_JIT_THRESHOLD=1 NYASH_JIT_HOSTCALL=1 NYASH_JIT_EVENTS=1 \
./target/release/nyash --backend vm examples/jit_hostcall_map_get_handle.nyash
./target/release/nyash --backend vm examples/jit_hostcall_map_get_handle.hako
```
### ⚙️ Quick flagsイベント観測を確実に

View File

@ -104,9 +104,9 @@ Status2025-08-27
```bash
cargo build --features cranelift-jit --release
NYASH_JIT_THRESHOLD=1 NYASH_JIT_HOSTCALL=1 NYASH_JIT_EXEC=1 \
./target/release/nyash --backend vm examples/jit_array_param_call.nyash
./target/release/nyash --backend vm examples/jit_array_param_call.hako
NYASH_JIT_THRESHOLD=1 NYASH_JIT_HOSTCALL=1 NYASH_JIT_EXEC=1 \
./target/release/nyash --backend vm examples/jit_map_param_call.nyash
./target/release/nyash --backend vm examples/jit_map_param_call.hako
```
Notes
- 関数パラメータに渡した配列/MapのみHostCall経由でアクセスthread-local引数参照
@ -238,12 +238,12 @@ JIT実装10_a10_hで構築したMIR→CLIF変換基盤をそのまま
### 使用イメージ
```bash
# ネイティブ実行ファイル生成
./target/release/nyash --compile-native program.nyash -o program
./target/release/nyash --compile-native program.hako -o program
./program # スタンドアロン実行!
# クロスコンパイル
./target/release/nyash --compile-native --target x86_64-pc-windows-msvc program.nyash -o program.exe
./target/release/nyash --compile-native --target aarch64-apple-darwin program.nyash -o program.mac
./target/release/nyash --compile-native --target x86_64-pc-windows-msvc program.hako -o program.exe
./target/release/nyash --compile-native --target aarch64-apple-darwin program.hako -o program.mac
```
### 技術的詳細

View File

@ -210,10 +210,10 @@ function sumStringLengths(strings) {
### 2. プロファイリング
```bash
# Mutexプロファイル
NYASH_PROFILE_LOCKS=1 ./target/release/nyash bench.nyash
NYASH_PROFILE_LOCKS=1 ./target/release/nyash bench.hako
# Atomic最適化後
NYASH_ATOMIC_OPT=1 ./target/release/nyash bench.nyash
NYASH_ATOMIC_OPT=1 ./target/release/nyash bench.hako
```
## 🚧 実装上の注意点

View File

@ -265,10 +265,10 @@ async function fetchAll(urls) {
### 2. ベンチマーク
```bash
# 10000並行リクエスト
./target/release/nyash bench/async_stress.nyash
./target/release/nyash bench/async_stress.hako
# メモリプロファイル
NYASH_COROUTINE_STATS=1 ./target/release/nyash bench/async_memory.nyash
NYASH_COROUTINE_STATS=1 ./target/release/nyash bench/async_memory.hako
```
## 🚧 実装上の注意点

View File

@ -10,7 +10,7 @@ Phase 11.5完了を待たずに、**今すぐ作れる**実用アプリ5本で
**目的**: I/O・StringBoxの道通し確認
```nyash
// apps/ny-echo/main.nyash
// apps/ny-echo/main.hako
static box Main {
main(args) {
local console = new ConsoleBox()
@ -42,7 +42,7 @@ static box Main {
**目的**: PyRuntimeBox/PyObjectBox経由のPluginInvoke検証
```nyash
// apps/ny-jsonlint/main.nyash
// apps/ny-jsonlint/main.hako
static box Main {
init { py, console }
@ -85,7 +85,7 @@ except Exception as e:
**目的**: ArrayBox map/reduce、StatsBox導入、性能可視化
```nyash
// apps/ny-array-bench/main.nyash
// apps/ny-array-bench/main.hako
static box Main {
init { stats }
@ -139,7 +139,7 @@ static box Main {
**目的**: BytesBox/FileBoxプラグインI/O、実用的なツール
```nyash
// apps/ny-filegrep/main.nyash
// apps/ny-filegrep/main.hako
static box Main {
init { pattern, recursive, results }
@ -202,7 +202,7 @@ static box Main {
**目的**: NetBoxプラグインとイベントループ、FutureBox活用
```nyash
// apps/ny-http-hello/main.nyash
// apps/ny-http-hello/main.hako
static box Main {
init { server, running }
@ -292,7 +292,7 @@ nyash-apps-v1.0/
│ ├── ny-filegrep[.exe]
│ └── ny-http-hello[.exe]
├── examples/
│ └── *.nyash (ソースコード)
│ └── *.hako (ソースコード)
├── benchmarks/
│ └── results.json
└── README.md

View File

@ -152,7 +152,7 @@ mod migration_tests {
#[test]
fn test_unified_vs_legacy_semantics() {
let test_cases = load_test_cases("tests/semantics/*.nyash");
let test_cases = load_test_cases("tests/semantics/*.hako");
for case in test_cases {
let legacy_result = legacy_interpreter.execute(&case);

View File

@ -9,8 +9,8 @@ MIR→LLVM IR直接変換による最高性能AOT実現。Cranelift JITをスキ
## 🎯 実装目標
```bash
# Phase 9基盤の拡張
nyash --compile-llvm app.nyash -o app # LLVM AOT実行ファイル生成
nyash --optimize app.nyash -o app # 最適化AOTLTO・PGO
nyash --compile-llvm app.hako -o app # LLVM AOT実行ファイル生成
nyash --optimize app.hako -o app # 最適化AOTLTO・PGO
./app # 最高性能実行
# 内部実装パイプライン

View File

@ -12,7 +12,7 @@ Last Updated: 2025-08-25
- ExternCall命令Phase 9.7導入予定。ABIは`docs/予定/native-plan/box_ffi_abi.md`に準拠。
アウトカム(受け入れ基準)
- CLI: `nyash --backend llvm --emit obj app.nyash -o app.o` が成功し、`clang app.o -o app` で実行可能。
- CLI: `nyash --backend llvm --emit obj app.hako -o app.o` が成功し、`clang app.o -o app` で実行可能。
- 代表サンプルで `main``i32` を返却0=成功)。
- `ExternCall(env.console.log)``printf` 等へ写像し、標準出力へ表示できる(文字列は (i8*, i32))。
- 単純な四則演算・比較・分岐・ループが LLVM AOT で動作。

View File

@ -146,7 +146,7 @@ impl OptPass for DeadCodeElimPass {
```bash
# MIRからCへ変換
nyash --emit-c program.nyash -o program.c
nyash --emit-c program.hako -o program.c
# 最適化コンパイル
zig cc -O3 -flto -march=native \
@ -178,7 +178,7 @@ zig cc -O3 -fprofile-use program.c -o program_opt
## 5. 性能測定の例
```nyash
// benchmark.nyash
// benchmark.hako
static box Benchmark {
main() {
local start, end, result

View File

@ -89,27 +89,27 @@ Branch(cond, then, else) → {likely: Some(true)} // thenが高確率
Level 0: 開発モード
- MIR最適化なし
- デバッグ情報完全保持
- nyash program.nyash
- nyash program.hako
Level 1: 基本最適化(デフォルト)
- MIRカニカル化のみ
- Cエミッタ → gcc -O2
- nyash --release program.nyash
- nyash --release program.hako
Level 2: 高速化
- MIR全最適化パス
- Cエミッタ → zig cc -O3 -flto
- nyash --release --opt program.nyash
- nyash --release --opt program.hako
Level 3: プロファイルガイドPGO
- 実行プロファイル収集
- ホットパス特定
- nyash --release --pgo program.nyash
- nyash --release --pgo program.hako
Level 4: 特殊用途
- SIMD必要 → LLVM使用ただし依存が重い
- 起動速度重視 → Cranelift JIT推奨
- nyash --backend cranelift program.nyash
- nyash --backend cranelift program.hako
================================================================================
5. 実装計画

View File

@ -231,9 +231,9 @@ override → O # オーバーライド
**すべての糖衣構文は双方向変換可能:**
```bash
# フォーマッターによる自由な変換
nyash format --style=explicit code.nyash # 明示的記法へ
nyash format --style=sugar code.nyash # 糖衣構文へ
nyash format --style=ancp code.nyash # 極限圧縮へ
nyash format --style=explicit code.hako # 明示的記法へ
nyash format --style=sugar code.hako # 糖衣構文へ
nyash format --style=ancp code.hako # 極限圧縮へ
```
**同じコードの3つの表現**

View File

@ -54,9 +54,9 @@ onHover(position) {
### Phase 2: 実用化2週間目
1. **CLI実装**Codex提案
```bash
ancp encode --layer F input.nyash -o output.f
ancp encode --layer F input.hako -o output.f
ancp decode output.f --map output.map
ancp verify input.nyash output.f # MIR等価性チェック
ancp verify input.hako output.f # MIR等価性チェック
```
2. **プロジェクト辞書**Gemini提案

View File

@ -102,7 +102,7 @@ esac
### Test 1: 最小Box
```nyash
# input.nyash
# input.hako
box Test {
init { value }
}
@ -113,7 +113,7 @@ $Test{#{value}}
### Test 2: 簡単な関数
```nyash
# input.nyash
# input.hako
box Calculator {
add(a, b) {
return a + b

View File

@ -252,22 +252,22 @@ peek ast {
### ステップ1: 標準コードを書く
```bash
# 通常のNyashで開発
vim src/feature.nyash
vim src/feature.hako
```
### ステップ2: 段階的圧縮
```bash
# L1: 糖衣構文適用
nyashfmt --sugar src/feature.nyash > feature.sugar.nyash
nyashfmt --sugar src/feature.hako > feature.sugar.hako
# L2: ANCP変換
nyash2ancp feature.sugar.nyash > feature.ancp
nyash2ancp feature.sugar.hako > feature.ancp
# L3: 極限糖衣
nyashfmt --ultra feature.ancp > feature.ultra.nyash
nyashfmt --ultra feature.ancp > feature.ultra.hako
# L4: 最大圧縮
nyash2fusion feature.ultra.nyash > feature.fusion
nyash2fusion feature.ultra.hako > feature.fusion
```
### ステップ3: AIとの対話
@ -284,10 +284,10 @@ cat *.fusion | clip
### ステップ4: 可逆展開
```bash
# AIの応答を展開
fusion2nyash --level=0 ai_response.fusion > fixed.nyash
fusion2nyash --level=0 ai_response.fusion > fixed.hako
# 差分確認
diff src/feature.nyash fixed.nyash
diff src/feature.hako fixed.hako
```
## 🛠️ ツールチェーン

View File

@ -251,9 +251,9 @@ r=d\:_.isValid()/:_|>n|>t
### 可逆変換の保証
```bash
# どの形式からでも相互変換可能
nyash format --from=explicit --to=sugar code.nyash
nyash format --from=sugar --to=ancp code.nyash
nyash format --from=ancp --to=explicit code.nyash
nyash format --from=explicit --to=sugar code.hako
nyash format --from=sugar --to=ancp code.hako
nyash format --from=ancp --to=explicit code.hako
```
## 🚀 Phase 15との相乗効果

View File

@ -178,7 +178,7 @@ result"
5. 使用例:コマンドラインツール
================================================================================
// nyashfmt.nyash - フォーマッターCLI
// nyashfmt.hako - フォーマッターCLI
static box Main {
main(args) {
local formatter = new NyashFormatter()
@ -285,7 +285,7 @@ box LearningMode {
8. 設定ファイル
================================================================================
// .nyashfmt.json - プロジェクト別設定
// .hakofmt.json - プロジェクト別設定
{
"mode": "standard",
"rules": {

View File

@ -156,7 +156,7 @@ impl SourceMap {
// ANCP位置 → Nyash位置への変換
self.mappings
.binary_search_by_key(&ancp_pos, |m| m.ancp_pos)
.map(|i| self.mappings[i].nyash_pos)
.map(|i| self.mappings[i].hako_pos)
.unwrap_or(ancp_pos)
}
}
@ -214,7 +214,7 @@ expected_pattern=$2
normal_output=$(./target/release/nyash "$test_file" 2>&1)
# 2. ANCP変換
ancp_file="${test_file%.nyash}.ancp"
ancp_file="${test_file%.hako}.ancp"
./target/release/nyash2ancp -i "$test_file" -o "$ancp_file"
# 3. ANCP実行
@ -289,8 +289,8 @@ def measure_file(nyash_path, ancp_path):
# 全サンプルファイルで測定
results = []
for nyash_file in glob.glob("examples/*.nyash"):
ancp_file = nyash_file.replace(".nyash", ".ancp")
for nyash_file in glob.glob("examples/*.hako"):
ancp_file = nyash_file.replace(".hako", ".ancp")
results.append(measure_file(nyash_file, ancp_file))
# 統計出力
@ -316,7 +316,7 @@ jobs:
- name: Run roundtrip tests
run: |
for f in examples/*.nyash; do
for f in examples/*.hako; do
echo "Testing: $f"
./tools/test_ancp_roundtrip.sh "$f"
done

View File

@ -161,14 +161,14 @@ impl Lexer {
### 5.2 CLI統合
```bash
# 変換コマンド
nyash --to-ancp input.nyash > output.ancp
nyash --from-ancp input.ancp > output.nyash
nyash --to-ancp input.hako > output.ancp
nyash --from-ancp input.ancp > output.hako
# 直接実行
nyash --dialect=ancp script.ancp
# フォーマット表示
nyash --view=ancp script.nyash # Nyashファイルをancp形式で表示
nyash --view=ancp script.hako # Nyashファイルをancp形式で表示
nyash --view=hybrid script.ancp # 並列表示
```
@ -209,7 +209,7 @@ fn roundtrip_all_constructs() {
"loop(i < 10) { i = i + 1 }",
// 複雑な例
include_str!("../examples/complex.nyash"),
include_str!("../examples/complex.hako"),
];
for case in test_cases {

View File

@ -198,7 +198,7 @@ Expected 'token' but found 'actual'
【エラーメッセージ例】
```
Error: Missing 'else' in peek expression
--> program.nyash:10:5
--> program.hako:10:5
|
10 | peek value {
| ^^^^ peek expression requires 'else' branch

View File

@ -167,7 +167,7 @@ if animal == "dog" {
================================================================================
```nyash
// test_peek_basic.nyash
// test_peek_basic.hako
local animal = "cat"
local sound = peek animal {
"dog" => "woof"
@ -176,7 +176,7 @@ local sound = peek animal {
}
print(sound) // "meow"
// test_peek_block.nyash
// test_peek_block.hako
local result = peek x {
1 => {
local temp = "one"
@ -185,7 +185,7 @@ local result = peek x {
else => "other"
}
// test_continue.nyash
// test_continue.hako
local i = 0
local sum = 0
loop(i < 5) {
@ -197,7 +197,7 @@ loop(i < 5) {
}
print(sum) // 12 (1+2+4+5, 3はスキップ)
// test_field_declaration.nyash
// test_field_declaration.hako
box Point {
public x: IntegerBox
public y: IntegerBox

View File

@ -132,7 +132,7 @@ processor.process(3.14) # すべてプラグインで動作!
```
Nyashエコシステム統一TypeBox ABI採用後
├── Nyashスクリプトプラグイン ← .nyashファイル純粋なNyashコード
├── Nyashスクリプトプラグイン ← .hakoファイル純粋なNyashコード
└── 統一TypeBoxプラグイン ← .so/.dllネイティブ実装
├── 基本機能旧C ABI互換
├── 高速ディスパッチJIT最適化

View File

@ -195,7 +195,7 @@ tests/abi/
### nyash.toml設定
```toml
[plugins.nyash_abi_provider]
[plugins.hako_abi_provider]
path = "plugins/nyash_abi_provider.so"
abi = "c"
types = ["NyashABIProvider"]

View File

@ -54,10 +54,10 @@ AIの頭の中
```bash
# スクリプトファイルをAOTコンパイル可能
./nyash --aot script.nyash -o script.exe
./nyash --aot script.hako -o script.exe
# JITで実行ホットコードを自動最適化
./nyash --backend vm --jit script.nyash
./nyash --backend vm --jit script.hako
```
つまり:

View File

@ -29,7 +29,7 @@ Nyashスクリプトプラグインは、**最もNyashらしいプラグイン
### 1. シンプルなユーティリティBox
```nyash
# math_utils.nyash - 数学ユーティリティプラグイン
# math_utils.hako - 数学ユーティリティプラグイン
box MathUtils {
init { }
@ -66,7 +66,7 @@ box MathUtils {
### 2. 他のプラグインと組み合わせる例
```nyash
# data_processor.nyash - データ処理プラグイン
# data_processor.hako - データ処理プラグイン
box DataProcessor {
init { file, math, cache }
@ -109,7 +109,7 @@ box DataProcessor {
### 3. 高度なプラグイン - P2Pード拡張
```nyash
# mesh_node.nyash - P2Pメッシュネットワークード
# mesh_node.hako - P2Pメッシュネットワークード
box MeshNode from P2PBox {
init { routing, peers, messageHandlers }
@ -181,8 +181,8 @@ box MeshNode from P2PBox {
### 1. ローカルファイルとして
```nyash
# main.nyash
include "plugins/math_utils.nyash"
# main.hako
include "plugins/math_utils.hako"
local utils = new MathUtils()
print(utils.factorial(5)) # 120
@ -209,7 +209,7 @@ local utils = new MathUtils()
```nyash
# 実行時にプラグインをロード
local pluginCode = new FileBox().read("plugin.nyash")
local pluginCode = new FileBox().read("plugin.hako")
eval(pluginCode) # プラグインが利用可能に
local processor = new DataProcessor()
@ -270,7 +270,7 @@ box SafeCalculator {
| パフォーマンス | 中速 | 最速 | 高速 |
| 開発効率 | 最高 | 中 | 中 |
| デバッグ | 簡単 | 難しい | 中程度 |
| 配布 | .nyashファイル | .so/.dll | 任意 |
| 配布 | .hakoファイル | .so/.dll | 任意 |
## 📚 まとめ

View File

@ -84,7 +84,7 @@ my-awesome-package/
│ └── README.md
├── examples/
│ └── basic_usage.ny
└── .nyashignore # 公開時の除外ファイル
└── .hakoignore # 公開時の除外ファイル
```
### nyash.toml仕様
@ -200,7 +200,7 @@ GET /search?q={query} # パッケージ検索
"dependencies": {
"basic-utils": "^2.0.0"
},
"tarball": "https://registry.nyash.dev/awesome-math-1.0.0.tgz"
"tarball": "https://registry.hako.dev/awesome-math-1.0.0.tgz"
}
```
@ -221,7 +221,7 @@ public_key = "..."
nyash_modules/
└── awesome-math/
├── nyash.toml
└── .nyash-integrity # SHA256ハッシュ
└── .hako-integrity # SHA256ハッシュ
```
### 権限システム
@ -247,9 +247,9 @@ members = [
### プライベートレジストリ
```toml
# .nyashrc
# .hakorc
[registries]
default = "https://registry.nyash.dev"
default = "https://registry.hako.dev"
company = "https://npm.company.com"
[scopes]
@ -276,7 +276,7 @@ nyash cache add awesome-math@1.0.0
### インテリジェントキャッシュ
```
~/.nyash/cache/
~/.hako/cache/
├── packages/
│ └── awesome-math-1.0.0.tgz
├── metadata/

View File

@ -56,7 +56,7 @@ impl eframe::App for NyashBrowser {
ui.text_edit_singleline(&mut self.url);
if ui.button("Go").clicked() {
// Nyashファイル実行
if self.url.ends_with(".nyash") {
if self.url.ends_with(".hako") {
self.content = execute_nyash(&self.url);
}
}
@ -78,7 +78,7 @@ impl eframe::App for NyashBrowser {
// Tauriコマンドでブラウザ機能実装
#[tauri::command]
async fn browse_nyash(url: String) -> Result<BrowseResult, String> {
if url.ends_with(".nyash") {
if url.ends_with(".hako") {
// Nyash VMで直接実行
let vm = NyashVM::new();
let result = vm.execute_file(&url)?;
@ -158,7 +158,7 @@ box SharedMemoryRenderer {
```nyash
box DevServer from FileWatcherBox {
watchAndReload(directory) {
me.watch(directory, "*.nyash", (file) => {
me.watch(directory, "*.hako", (file) => {
// 変更を検出したら即座にリコンパイル
local compiled = me.compiler.compileWithSourceMap(file)
@ -231,7 +231,7 @@ box CollaborativeEditor from P2PBox {
- [ ] Nyash VM統合
### Week 2: コア機能
- [ ] .nyashファイル実行
- [ ] .hakoファイル実行
- [ ] JIT/AOTコンパイル統合
- [ ] 基本的なセキュリティ

View File

@ -14,15 +14,15 @@ Nyashでブラウザーを作り、ネイティブ実行する構想について
{
"name": "Nyash Browser Extension",
"permissions": ["webRequest", "webRequestBlocking", "nativeMessaging"],
"host_permissions": ["*://*/*.nyash"]
"host_permissions": ["*://*/*.hako"]
}
// background.js
chrome.webRequest.onBeforeRequest.addListener(
(details) => {
if (details.url.endsWith('.nyash')) {
if (details.url.endsWith('.hako')) {
// Native hostと通信してNyash VMで実行
chrome.runtime.sendNativeMessage('com.nyash.runtime',
chrome.runtime.sendNativeMessage('com.hako.runtime',
{ command: 'execute', url: details.url },
(response) => {
// 結果を新しいタブで表示
@ -99,8 +99,8 @@ async fn execute_nyash(window: Window, code: String) -> Result<Value, String> {
fn nyash_protocol_handler(app: &AppHandle, request: &Request) -> Response {
let path = request.uri().path();
// .nyashファイルを実行
if path.ends_with(".nyash") {
// .hakoファイルを実行
if path.ends_with(".hako") {
let code = std::fs::read_to_string(path).unwrap();
let vm = VM::new();
let result = vm.execute(&code).unwrap();
@ -124,7 +124,7 @@ fn nyash_protocol_handler(app: &AppHandle, request: &Request) -> Response {
#### 1. カスタムHTMLエレメント
```html
<!-- Nyashコードを直接HTMLに埋め込み -->
<nyash-app src="todo-app.nyash">
<nyash-app src="todo-app.hako">
<template>
<div class="todo-list">
<nyash-for items="todos" as="todo">
@ -423,7 +423,7 @@ impl eframe::App for NyashBrowser {
2. **Week 2**: カスタムプロトコル
- nyash://プロトコルハンドラー
- .nyashファイル実行
- .hakoファイル実行
- 結果表示
3. **Week 3**: 高速化

View File

@ -18,9 +18,9 @@
```javascript
// Chrome拡張機能側
chrome.webNavigation.onBeforeNavigate.addListener((details) => {
if (details.url.endsWith('.nyash')) {
if (details.url.endsWith('.hako')) {
// Native Messagingでローカルプロセスと通信
chrome.runtime.sendNativeMessage('com.nyash.executor',
chrome.runtime.sendNativeMessage('com.hako.executor',
{ action: 'execute', url: details.url },
(response) => {
// 実行結果をタブに表示
@ -109,7 +109,7 @@ box NyashBrowser from TauriBox {
init { apps, vm, cache }
navigateTo(url) {
if url.endsWith(".nyash") {
if url.endsWith(".hako") {
// ローカルキャッシュチェック
local app = me.cache.get(url)
if !app {
@ -216,7 +216,7 @@ let wasi_env = WasiEnv::builder("nyash-app")
```nyash
box DevServer {
watch(directory) {
me.fs.watchFiles(directory, "*.nyash", (file) => {
me.fs.watchFiles(directory, "*.hako", (file) => {
me.recompile(file)
me.browser.reload()
me.notify("Reloaded: " + file)

View File

@ -58,10 +58,10 @@ MIR 13命令の美しさを最大限に活かし、外部コンパイラ依存
#### Phase 15.3 — Detailed PlanNy compiler MVP
- Directory layoutselfhost compiler
- `apps/selfhost-compiler/compiler.nyash`CompilerBox entry; Ny→JSON v0 emit
- `apps/selfhost-compiler/parser/{lexer.nyash,parser.nyash,ast.nyash}`Stage2 へ段階拡張)
- `apps/selfhost-compiler/emitter/json_v0.nyash`(将来: emit 分離。MVPは inline でも可)
- `apps/selfhost-compiler/mir/{builder.nyash,optimizer.nyash}`(将来)
- `apps/selfhost-compiler/compiler.hako`CompilerBox entry; Ny→JSON v0 emit
- `apps/selfhost-compiler/parser/{lexer.hako,parser.hako,ast.hako}`Stage2 へ段階拡張)
- `apps/selfhost-compiler/emitter/json_v0.hako`(将来: emit 分離。MVPは inline でも可)
- `apps/selfhost-compiler/mir/{builder.hako,optimizer.hako}`(将来)
- `apps/selfhost-compiler/tests/{stage1,stage2}`サンプルと期待JSON
- Runner integration安全ゲート
@ -89,7 +89,7 @@ MIR 13命令の美しさを最大限に活かし、外部コンパイラ依存
- `tools/build_compiler_exe.sh`Selfhost Parser のEXE化
- `tools/ny_stage2_bridge_smoke.sh`(算術/比較/短絡/ネストif
- `tools/ny_parser_stage2_phi_smoke.sh`If/Loop の PHI 合流)
- `tools/parity.sh --lhs pyvm --rhs llvmlite <test.nyash>`(常時)
- `tools/parity.sh --lhs pyvm --rhs llvmlite <test.hako>`(常時)
Imports/Namespace plan15.3late
- See: imports-namespace-plan.md — keep `nyash.toml` resolution in runner; accept `using` in Ny compiler as noop (no resolution) gated by `NYASH_ENABLE_USING=1`.
@ -107,7 +107,7 @@ Imports/Namespace plan15.3late
【受入MVP
- `tools/ny_roundtrip_smoke.sh`Case A/B
- `apps/tests/esc_dirname_smoke.nyash` / `apps/selfhost/tools/dep_tree_min_string.nyash` を Ny パーサ経路で実行し、PyVM/llvmlite とパリティ一致stdout/exit
- `apps/tests/esc_dirname_smoke.hako` / `apps/selfhost/tools/dep_tree_min_string.hako` を Ny パーサ経路で実行し、PyVM/llvmlite とパリティ一致stdout/exit
#### 予告: LoopFormMIR18での PHI 自動化Phase15 後)
- LoopForm を強化し、`loop.begin(loop_carried_values) / loop.iter / loop.branch / loop.end` の構造的情報から逆Loweringで PHI を合成。
@ -320,9 +320,9 @@ ny_free_buf(buffer)
- [ROADMAP.md](ROADMAP.md) - 進捗管理用チェックリスト
### ✅ クイックスモーク(現状)
- PyVM↔llvmlite パリティ: `tools/parity.sh --lhs pyvm --rhs llvmlite apps/tests/esc_dirname_smoke.nyash`
- dep_treeハーネスON: `NYASH_LLVM_FEATURE=llvm ./tools/build_llvm.sh apps/selfhost/tools/dep_tree_min_string.nyash -o app_dep && ./app_dep`
- Selfhost Parser EXE: `tools/build_compiler_exe.sh && (cd dist/nyash_compiler && ./nyash_compiler tmp/sample.nyash > sample.json)`
- PyVM↔llvmlite パリティ: `tools/parity.sh --lhs pyvm --rhs llvmlite apps/tests/esc_dirname_smoke.hako`
- dep_treeハーネスON: `NYASH_LLVM_FEATURE=llvm ./tools/build_llvm.sh apps/selfhost/tools/dep_tree_min_string.hako -o app_dep && ./app_dep`
- Selfhost Parser EXE: `tools/build_compiler_exe.sh && (cd dist/nyash_compiler && ./nyash_compiler tmp/sample.hako > sample.json)`
- JSON v0 bridge spec: `docs/reference/ir/json_v0.md`
- Stage2 smokes: `tools/ny_stage2_bridge_smoke.sh`, `tools/ny_parser_stage2_phi_smoke.sh`, `tools/ny_me_dummy_smoke.sh`

View File

@ -23,7 +23,7 @@ This roadmap is a living checklist to advance Phase 15 with small, safe boxes. U
- tools/build_compiler_exe.sh で EXE をビルド同梱distパッケージ作成
- dist/nyash_compiler/{nyash_compiler,nyash.toml,plugins/...} で独立実行
- 入力: Nyソース → 出力: JSON v0stdout
- Smokes: sample.nyash→JSON 行生成JSONのみ出力
- Smokes: sample.hako→JSON 行生成JSONのみ出力
- リスク: プラグイン解決FileBoxをnyash.tomlで固定
2) LLVM Native EXE GenerationAOTパイプライン継続
- Python/llvmlite implementation as primary path (2400 lines, 10x faster development)
@ -32,7 +32,7 @@ This roadmap is a living checklist to advance Phase 15 with small, safe boxes. U
- Input: MIR (JSON/binary) → Output: native executable
- Link with nyrt runtime (static/dynamic options)
- Plugin all-direction build strategy (.so/.o/.a simultaneous generation)
- Integration: `nyash --backend llvm --emit exe program.nyash -o program.exe`
- Integration: `nyash --backend llvm --emit exe program.hako -o program.exe`
3) Standard Ny std impl (P0→実体化)
- Implement P0 methods for string/array/map in Nyash (keep NyRT primitives minimal)
- Enable via `nyash.toml` `[ny_plugins]` (optin); extend `tools/jit_smoke.sh`
@ -91,7 +91,7 @@ This roadmap is a living checklist to advance Phase 15 with small, safe boxes. U
- JSON v0 bridge: `tools/ny_parser_bridge_smoke.sh` / `tools/ny_parser_bridge_smoke.ps1`
- E2E roundtrip: `tools/ny_roundtrip_smoke.sh` / `tools/ny_roundtrip_smoke.ps1`
- EXE-first smoke: `tools/build_compiler_exe.sh && (cd dist/nyash_compiler && ./nyash_compiler tmp/sample.nyash > sample.json)`
- EXE-first smoke: `tools/build_compiler_exe.sh && (cd dist/nyash_compiler && ./nyash_compiler tmp/sample.hako > sample.json)`
## Implementation Dependencies

View File

@ -362,11 +362,11 @@ box BootstrapVerifier {
verify() {
// Stage 0でStage 1をビルド
local stage0 = new CompilerBox() // Rust版
local stage1_code = stage0.compile(readFile("compiler.nyash"))
local stage1_code = stage0.compile(readFile("compiler.hako"))
// Stage 1でStage 2をビルド
local stage1 = stage1_code.instantiate()
local stage2_code = stage1.compile(readFile("compiler.nyash"))
local stage2_code = stage1.compile(readFile("compiler.hako"))
// バイナリ比較
if stage1_code.equals(stage2_code) {

View File

@ -158,20 +158,20 @@ fn main() -> Result<()> {
### 統合実行(将来)
```bash
# ワンステップビルド
nyash build --backend llvm --emit exe program.nyash -o program.exe
nyash build --backend llvm --emit exe program.hako -o program.exe
# デバッグ用分離実行
nyash --dump-mir program.nyash > program.mir.json
nyash --dump-mir program.hako > program.mir.json
nyash-llvm-compiler program.mir.json -o program.exe
```
### パイプライン実行
```bash
# Unix pipe
nyash --dump-mir program.nyash | nyash-llvm-compiler - -o program.exe
nyash --dump-mir program.hako | nyash-llvm-compiler - -o program.exe
# Windows
nyash --dump-mir program.nyash > temp.mir
nyash --dump-mir program.hako > temp.mir
nyash-llvm-compiler temp.mir -o program.exe
```

View File

@ -68,7 +68,7 @@ Internal Architecture
Integration Points
- Parser EXE → MIR Builder EXE
- `./nyash_compiler <in.nyash> | ny_mir_builder --stdin --emit obj -o a.o`
- `./nyash_compiler <in.hako> | ny_mir_builder --stdin --emit obj -o a.o`
- Compose with link step for quick endtoend: `... --emit exe -o a.out`
- Runner (future option)
- `NYASH_USE_NY_COMPILER_EXE=1`: Runner spawns parser EXE; optionally chain into MIR Builder EXE for AOT.

View File

@ -15,7 +15,7 @@
**要点:**
- NyModules 共有レジストリ導入: env.modules.set/getまたは ModulesBox
- ny_plugins のパス→名前空間導出: ルート相対、"/"→".", 拡張子 .nyash 省略、[^a-zA-Z0-9_.]→"_"
- ny_plugins のパス→名前空間導出: ルート相対、"/"→".", 拡張子 .hako 省略、[^a-zA-Z0-9_.]→"_"
- Windowsパス: "\\"→"/" 正規化後に上記規則を適用
- 予約衝突: nyashstd.* の登録を明示拒否しログ出力
@ -64,7 +64,7 @@
**スモーク/CI:**
- `tools/ny_roundtrip_smoke.sh` / `tools/ny_parser_bridge_smoke.sh`
- `tools/parity.sh --lhs pyvm --rhs llvmlite <smoke.nyash>`Nyパーサ経路ON
- `tools/parity.sh --lhs pyvm --rhs llvmlite <smoke.hako>`Nyパーサ経路ON
**完了基準:**
- esc_dirname_smoke / dep_tree_min_string が Ny パーサ経路でも PyVM/llvmlite と一致stdout/exit
@ -140,7 +140,7 @@
cargo build --release --features cranelift-jit
# 実行
./target/release/nyash --backend vm apps/selfhost-minimal/main.nyash
./target/release/nyash --backend vm apps/selfhost-minimal/main.hako
# スモーク
./tools/jit_smoke.sh
@ -158,7 +158,7 @@ cargo build --release --features cranelift-jit
- 2並走・重複回避: `CODEX_MAX_CONCURRENT=2 CODEX_DEDUP=1 CODEX_ASYNC_DETACH=1`
- 監視: `pgrep -af 'codex .* exec'` / `tail -f ~/.codex-async-work/logs/codex-*.log`
- Windowsパス/名前空間: "\\"→"/" 正規化 → ルール適用(/→., .nyash除去, sanitize
- Windowsパス/名前空間: "\\"→"/" 正規化 → ルール適用(/→., .hako除去, sanitize
## 備考

View File

@ -39,9 +39,9 @@ Purpose: ship a tiny, beautiful vertical slice that runs Core13 IR endto
- Events (lines): `{"event":"EnterFunc","func":"main"}` / `{"event":"ExitFunc","func":"main"}`.
5) CLI UX
- `nyash run --engine=vm apps/hello.nyash`
- `nyash run --engine=remote --exe ./nyash-engine-core13 apps/hello.nyash`
- `nyash ir-emit --ir=core13 --format=json apps/hello.nyash > out.json`
- `nyash run --engine=vm apps/hello.hako`
- `nyash run --engine=remote --exe ./nyash-engine-core13 apps/hello.hako`
- `nyash ir-emit --ir=core13 --format=json apps/hello.hako > out.json`
- `nyash ir-run --engine=vm < out.json`
6) Milestones

View File

@ -8,7 +8,7 @@
## 🎯 核心的なアイデア
```
ソースコード(.nyash ⇔ データベースSQLite
ソースコード(.hako ⇔ データベースSQLite
↓ ↓
Git管理 高速リファクタリング
エディタ編集 構造化分析
@ -185,7 +185,7 @@ box FileSyncDaemon {
local watcher = new FileWatcher(directory)
watcher.on("change") { event ->
if event.file.endsWith(".nyash") {
if event.file.endsWith(".hako") {
me.syncFileToDb(event.file)
}
}

View File

@ -173,7 +173,7 @@ box FileDBBridge {
for box in boxes {
local path = outputDir + "/" +
box.namespace.replace(".", "/") + "/" +
box.name + ".nyash"
box.name + ".hako"
local file = new FileBox(path)
file.write(me.generateFileContent(box))
@ -182,7 +182,7 @@ box FileDBBridge {
// ファイル→DB インポート
importFromFiles(sourceDir) {
local files = FileBox.glob(sourceDir + "/**/*.nyash")
local files = FileBox.glob(sourceDir + "/**/*.hako")
me.db.beginTransaction()
try {

View File

@ -26,8 +26,8 @@
- 最小限main関数、return文のみ
- [ ] エンドツーエンドテスト
```bash
echo 'print(42)' > test.nyash
./nyash phase22-compiler.nyash test.nyash
echo 'print(42)' > test.hako
./nyash phase22-compiler.hako test.hako
```
- [ ] Rust版との出力比較
@ -62,7 +62,7 @@
## 成功指標
### 必須要件
- [ ] `dep_tree_min_string.nyash` のコンパイル成功
- [ ] `dep_tree_min_string.hako` のコンパイル成功
- [ ] 基本的なプラグインテスト通過
- [ ] Rust版と同一のオブジェクトファイル生成
@ -97,7 +97,7 @@
```nyash
// NyashコンパイラでNyashコンパイラをコンパイル
local compiler = new NyashCompiler()
compiler.compile("phase22-compiler.nyash", "nyash-compiler.exe")
compiler.compile("phase22-compiler.hako", "nyash-compiler.exe")
```
### Phase 23: 完全セルフホスティング

View File

@ -100,7 +100,7 @@ i64 llvm_build_batch(i64 module, const char* encoded_ops, i32 len);
cargo build --release --features llvm # 5-7分待つ...
# 提案(即座に実行)
./target/release/nyash nyash-llvm-compiler.nyash test.nyash
./target/release/nyash nyash-llvm-compiler.hako test.hako
```
### 2. 理解可能性の革命

View File

@ -7,7 +7,7 @@ Summary:
Scope:
- AST: BoxDeclaration(is_static=true, name=Main) を検出 → 同名 main() を探して Program 化
- Lowering: 発見した body を既存の Program lowering に渡す関数単位でOK
- Tests: local_tests/mir_loop_no_local.nyashstatic Mainで dump/VM が通る
- Tests: local_tests/mir_loop_no_local.hakostatic Mainで dump/VM が通る
Tasks:
- [ ] MirBuilder: static Main → Program lowering 経路
@ -15,8 +15,8 @@ Tasks:
- [ ] サンプル/スナップショットの点検
Acceptance Criteria:
- `nyash --dump-mir ./local_tests/mir_loop_no_local.nyash` が成功
- `nyash --backend vm ./local_tests/mir_loop_no_local.nyash` が成功
- `nyash --dump-mir ./local_tests/mir_loop_no_local.hako` が成功
- `nyash --backend vm ./local_tests/mir_loop_no_local.hako` が成功
References:
- #33, #35

View File

@ -104,7 +104,7 @@ MirInstruction::NewBox { dst, box_type, args } // Box生成
## Technical Notes
### 現在の実装基盤2025-08-14時点
- ✅ **WASM CLI**: `./target/release/nyash --compile-wasm program.nyash` で動作
- ✅ **WASM CLI**: `./target/release/nyash --compile-wasm program.hako` で動作
- ✅ **ブラウザテスト**: `wasm_demo/` ディレクトリに実行環境完備
- ✅ **Safepoint対応**: `src/backend/wasm/codegen.rs:line XX` で実装済み
- ✅ **実行ドキュメント**: `docs/reference/architecture/execution-backends.md` で使用方法詳細化

View File

@ -41,7 +41,7 @@
- **PoC3**: Weak/Barrier の下地WeakLoad は当面 Some 相当、Barrier は no-op
- **PoC4**: Future/Await の基本実装(スレッドなしの即座完了)
- **CLI 統合**
- `nyash --backend wasm program.nyash` で生成・実行wasmtime 呼び出し)
- `nyash --backend wasm program.hako` で生成・実行wasmtime 呼び出し)
- `--output program.wasm` でWASMファイル出力のみ
## Implementation Plan
@ -129,8 +129,8 @@
-**Future Operations**: FutureNew/Await が即座完了として動作
### CLI Integration
-**Command Line**: `nyash --backend wasm test.nyash` で実行可能
-**File Output**: `nyash --backend wasm --output test.wasm test.nyash` でファイル出力
-**Command Line**: `nyash --backend wasm test.hako` で実行可能
-**File Output**: `nyash --backend wasm --output test.wasm test.hako` でファイル出力
-**Error Messages**: 未対応機能の明確なエラーメッセージ
## Test Strategy
@ -156,9 +156,9 @@ fn test_ref_operations_codegen() {
```
### Integration Tests
- `tests/wasm_poc1_arithmetic.nyash` → MIR → WASM → wasmtime実行
- `tests/wasm_poc2_objects.nyash` → RefNew/RefGet/RefSet使用 → WASM実行
- `tests/wasm_poc3_features.nyash` → Weak/Future命令含む → WASM実行
- `tests/wasm_poc1_arithmetic.hako` → MIR → WASM → wasmtime実行
- `tests/wasm_poc2_objects.hako` → RefNew/RefGet/RefSet使用 → WASM実行
- `tests/wasm_poc3_features.hako` → Weak/Future命令含む → WASM実行
### Browser Testing
```html

View File

@ -138,7 +138,7 @@ impl MirBuilder {
## 🧪 テストケースCopilot実装必須
### Test 1: 基本Box定義・生成
**ファイル**: `test_user_defined_box.nyash`
**ファイル**: `test_user_defined_box.hako`
```nyash
box DataBox {
init { value }
@ -171,7 +171,7 @@ bb0:
**実行期待結果**: `42`
### Test 2: フィールドアクセス・代入
**ファイル**: `test_field_operations.nyash`
**ファイル**: `test_field_operations.hako`
```nyash
box Counter {
init { count }
@ -197,7 +197,7 @@ static box Main {
**期待結果**: `1`
### Test 3: デリゲーション基本
**ファイル**: `test_delegation_basic.nyash`
**ファイル**: `test_delegation_basic.hako`
```nyash
box Parent {
init { name }
@ -236,7 +236,7 @@ static box Main {
**期待結果**: `"Hello Alice (age 25)"`
### Test 4: WASM Box操作統合テスト
**ファイル**: `test_wasm_box_integration.nyash`
**ファイル**: `test_wasm_box_integration.hako`
```nyash
box SimpleData {
init { x, y }
@ -262,13 +262,13 @@ static box Main {
**テスト方法**:
```bash
# MIR生成テスト
./target/release/nyash --dump-mir test_wasm_box_integration.nyash
./target/release/nyash --dump-mir test_wasm_box_integration.hako
# WASM生成テスト
./target/release/nyash --compile-wasm test_wasm_box_integration.nyash
./target/release/nyash --compile-wasm test_wasm_box_integration.hako
# WASM実行テストwasmtime
./target/release/nyash --compile-wasm test_wasm_box_integration.nyash > test.wat
./target/release/nyash --compile-wasm test_wasm_box_integration.hako > test.wat
sed -n '4,$p' test.wat > clean_test.wat
$HOME/.wasmtime/bin/wasmtime run clean_test.wat --invoke main
```
@ -306,10 +306,10 @@ $HOME/.wasmtime/bin/wasmtime run clean_test.wat --invoke main
### デバッグ支援
```bash
# MIR生成確認
./target/release/nyash --dump-mir --mir-verbose test_file.nyash
./target/release/nyash --dump-mir --mir-verbose test_file.hako
# パーサー確認
./target/release/nyash --debug-fuel unlimited test_file.nyash
./target/release/nyash --debug-fuel unlimited test_file.hako
```
## 📊 期待される効果
@ -335,4 +335,4 @@ $HOME/.wasmtime/bin/wasmtime run clean_test.wat --invoke main
**優先度**: Critical
**担当**: Copilot + Claude協調実装
**最終目標**: test_wasm_box_integration.nyash が完全動作
**最終目標**: test_wasm_box_integration.hako が完全動作

View File

@ -132,13 +132,13 @@ Frontend → New MIR(25命令) →
### デバッグ支援
```bash
# セマンティクス確認
./target/release/nyash --dump-mir-semantic test.nyash
./target/release/nyash --dump-mir-semantic test.hako
# 降格パス確認
./target/release/nyash --dump-mir-lowered test.nyash
./target/release/nyash --dump-mir-lowered test.hako
# 性能比較
./target/release/nyash --benchmark-mir-passes test.nyash
./target/release/nyash --benchmark-mir-passes test.hako
```
## 📊 期待される効果

View File

@ -78,7 +78,7 @@ struct VMProfiler {
#### 📊 ベンチマーク計測拡張
```bash
# 詳細プロファイリングコマンド
./target/release/nyash --benchmark --profile-vm --iterations 1000 program.nyash
./target/release/nyash --benchmark --profile-vm --iterations 1000 program.hako
# 出力例
VM Performance Profile:
@ -189,7 +189,7 @@ struct ZeroCopyVM {
### VM性能測定テスト
各テストをInterpreter/VM/WASMで比較実行し性能プロファイル収集
#### test_vm_performance_basic.nyash
#### test_vm_performance_basic.hako
```nyash
// 基本演算性能テストCPU集約
static box VMPerfTest {
@ -234,7 +234,7 @@ box DataBox {
}
```
#### test_vm_boxcall_return.nyash
#### test_vm_boxcall_return.hako
```nyash
// BoxCall戻り値問題専用テスト
static box BoxCallTest {
@ -282,7 +282,7 @@ box ComplexBox {
}
```
#### test_vm_memory_usage.nyash
#### test_vm_memory_usage.hako
```nyash
// メモリ使用量測定テスト
static box MemoryTest {
@ -338,7 +338,7 @@ box LargeDataBox {
}
```
#### test_vm_instruction_dispatch.nyash
#### test_vm_instruction_dispatch.hako
```nyash
// 命令ディスパッチ性能特化テスト
static box DispatchTest {
@ -397,16 +397,16 @@ TESTS=(
)
for test in "${TESTS[@]}"; do
echo "📊 $test.nyash テスト実行中..."
echo "📊 $test.hako テスト実行中..."
echo " - Interpreter実行..."
time ./target/release/nyash --backend interpreter "tests/vm_performance/$test.nyash"
time ./target/release/nyash --backend interpreter "tests/vm_performance/$test.hako"
echo " - VM実行..."
time ./target/release/nyash --backend vm "tests/vm_performance/$test.nyash"
time ./target/release/nyash --backend vm "tests/vm_performance/$test.hako"
echo " - WASM実行..."
time ./target/release/nyash --backend wasm "tests/vm_performance/$test.nyash"
time ./target/release/nyash --backend wasm "tests/vm_performance/$test.hako"
echo ""
done

View File

@ -113,7 +113,7 @@ static box Main {
#### Test 1: 基本メモリ管理
```nyash
// test_kilo_basic_memory.nyash
// test_kilo_basic_memory.hako
box Editor {
init { rows }
pack() { me.rows = new ArrayBox() }
@ -141,7 +141,7 @@ static box Main {
#### Test 2: 複雑な相互参照
```nyash
// test_kilo_circular_refs.nyash
// test_kilo_circular_refs.hako
box Editor {
init { rows, state }
pack() {
@ -170,7 +170,7 @@ static box Main {
#### Test 3: 大量オブジェクト管理
```nyash
// test_kilo_mass_objects.nyash
// test_kilo_mass_objects.hako
static box Main {
main() {
local editor = new Editor()
@ -253,22 +253,22 @@ box Client {
### デバッグ支援(統合版)
```bash
# メモリ使用量監視
./target/release/nyash --debug-memory test_kilo_basic.nyash
./target/release/nyash --debug-memory test_kilo_basic.hako
# weak参照追跡
./target/release/nyash --trace-weak test_kilo_circular.nyash
./target/release/nyash --trace-weak test_kilo_circular.hako
# fini呼び出し追跡
./target/release/nyash --trace-fini test_kilo_mass.nyash
./target/release/nyash --trace-fini test_kilo_mass.hako
# BoxCall戻り値デバッグ新規
./target/release/nyash --debug-boxcall test_kilo_basic.nyash
./target/release/nyash --debug-boxcall test_kilo_basic.hako
# VM/Interpreter/WASM BoxCall比較新規
./target/release/nyash --compare-boxcall test_kilo_basic.nyash
./target/release/nyash --compare-boxcall test_kilo_basic.hako
# 統合デバッグ(メモリ + BoxCall
./target/release/nyash --debug-all test_kilo_basic.nyash
./target/release/nyash --debug-all test_kilo_basic.hako
```
## 📊 期待される効果(統合版)

View File

@ -56,7 +56,7 @@ fn resolve_builtin_delegation(builtin: &str, args: Vec<_>) -> Result<(), String>
#### **A. ユーザー定義Box基本動作**
```nyash
# test_user_box_basic.nyash
# test_user_box_basic.hako
box Life {
init { name, energy }
@ -73,7 +73,7 @@ assert(alice.energy == 100)
#### **B. ビルトインBox継承**
```nyash
# test_builtin_inheritance.nyash
# test_builtin_inheritance.hako
box EnhancedP2P from P2PBox {
init { features }
@ -89,7 +89,7 @@ assert(node.features != null)
#### **C. 透明化システム動作**
```nyash
# test_transparency.nyash
# test_transparency.hako
box SimpleString from StringBox {
init { prefix }
@ -109,7 +109,7 @@ assert(str.toString() == ">>> Hello")
#### **D. 混在テスト**
```nyash
# test_mixed_inheritance.nyash
# test_mixed_inheritance.hako
box AdvancedCalc from MathBox {
init { history }
@ -135,7 +135,7 @@ assert(calc2.result == 0)
#### **E. エラーケーステスト**
```nyash
# test_error_cases.nyash
# test_error_cases.hako
# 1. 存在しないmethodを呼び出し
box BadBox from StringBox {
@ -154,7 +154,7 @@ box ArgMismatch from P2PBox {
### **パフォーマンステスト**
```nyash
# test_performance.nyash
# test_performance.hako
local startTime = getCurrentTime()
loop(i < 1000) {
@ -187,7 +187,7 @@ assert(elapsed < 1000) # 1秒以内で完了
- [ ] エラーメッセージがユーザーフレンドリー
### **統合テスト**
- [ ] `test_birth_simple.nyash` 継続動作
- [ ] `test_birth_simple.hako` 継続動作
- [ ] Chip-8エミュレーター修正版動作
- [ ] 全ビルトインBox継承パターン動作
- [ ] デリゲーションチェーン正常動作
@ -201,10 +201,10 @@ assert(elapsed < 1000) # 1秒以内で完了
- `src/box_trait.rs` - BUILTIN_BOXES定数
### **テストファイル**
- `test_pack_transparency.nyash` - 統合テスト
- `test_builtin_inheritance.nyash` - ビルトイン継承
- `test_user_box_birth.nyash` - ユーザー定義Box
- `test_error_cases.nyash` - エラーケース
- `test_pack_transparency.hako` - 統合テスト
- `test_builtin_inheritance.hako` - ビルトイン継承
- `test_user_box_birth.hako` - ユーザー定義Box
- `test_error_cases.hako` - エラーケース
## 🎉 完了条件

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

View File

@ -13,7 +13,7 @@ Phase 9で実装されたWASM/AOTとHTTPサーバー機能に重大な制約が
### 1. **WASM/AOT コンパイルエラー(最重要)**
```bash
# 現象
$ ./target/release/nyash --compile-wasm test_simple_loop.nyash
$ ./target/release/nyash --compile-wasm test_simple_loop.hako
❌ WASM compilation error: Unsupported instruction: Jump { target: BasicBlockId(1) }
```
@ -146,7 +146,7 @@ pub fn stop(&self) -> Box<dyn NyashBox> {
**新規テストファイル**:
1. `test_wasm_loop.nyash`
1. `test_wasm_loop.hako`
```nyash
// WASMループテスト
local sum, i
@ -159,7 +159,7 @@ loop (i < 10) {
print("Sum: " + sum) // Expected: 45
```
2. `test_http_server_real.nyash`
2. `test_http_server_real.hako`
```nyash
// 実用HTTPサーバーテスト
static box Main {
@ -193,7 +193,7 @@ static box Main {
1. **WASM/AOT成功**
```bash
$ ./target/release/nyash --compile-wasm test_wasm_loop.nyash
$ ./target/release/nyash --compile-wasm test_wasm_loop.hako
✅ WASM compilation completed successfully!
$ ./target/release/nyash --benchmark --iterations 100
@ -202,7 +202,7 @@ static box Main {
2. **HTTPサーバー実動作**
```bash
$ ./target/release/nyash test_http_server_real.nyash &
$ ./target/release/nyash test_http_server_real.hako &
Server started on http://0.0.0.0:8080
$ curl http://localhost:8080/

View File

@ -6,7 +6,7 @@ AOT実装完了後の複雑アプリケーション検証。並行処理・メ
## 🎯 実装目標
```bash
# Phase 9完了後の目標
nyash --compile-native http_server.nyash -o http_server.exe # AOTサーバー生成
nyash --compile-native http_server.hako -o http_server.exe # AOTサーバー生成
./http_server.exe --port 8080 # 高性能HTTPサーバー起動
curl http://localhost:8080/api/status # 実用API動作確認

View File

@ -149,7 +149,7 @@ impl Clone for SocketBox {
#### 4-1: 状態保持テスト
```nyash
// tests/socket_box_state_persistence.nyash
// tests/socket_box_state_persistence.hako
// 🎯 最重要テスト: 状態保持の確認
static box SocketBoxStateTest {
@ -213,7 +213,7 @@ static box SocketBoxStateTest {
#### 4-2: 機能テスト
```nyash
// tests/socket_box_functionality.nyash
// tests/socket_box_functionality.hako
// 機能テストbind, toString, 基本API
static box SocketBoxFunctionalityTest {
@ -258,7 +258,7 @@ static box SocketBoxFunctionalityTest {
#### 4-3: エッジケーステスト
```nyash
// tests/socket_box_edge_cases.nyash
// tests/socket_box_edge_cases.hako
static box SocketBoxEdgeCaseTest {
init { console }
@ -294,19 +294,19 @@ static box SocketBoxEdgeCaseTest {
cargo build --release
# 状態保持テスト(最重要)
./target/release/nyash tests/socket_box_state_persistence.nyash
./target/release/nyash tests/socket_box_state_persistence.hako
# 機能テスト
./target/release/nyash tests/socket_box_functionality.nyash
./target/release/nyash tests/socket_box_functionality.hako
# エッジケーステスト
./target/release/nyash tests/socket_box_edge_cases.nyash
./target/release/nyash tests/socket_box_edge_cases.hako
```
#### 5-2: HTTPServerBox互換性確認
```bash
# HTTPServerBoxも正常動作するかチェック
./target/release/nyash tests/test_http_server_simple.nyash
./target/release/nyash tests/test_http_server_simple.hako
```
## 📚 参照ドキュメント

View File

@ -262,10 +262,10 @@ loop(100) {
#### 4-2: 全体統合テスト
```bash
# 全Box型の基本動作確認
./target/release/nyash tests/all_boxes_basic_test.nyash
./target/release/nyash tests/all_boxes_basic_test.hako
# 回帰テストスイート
./target/release/nyash tests/regression_test_suite.nyash
./target/release/nyash tests/regression_test_suite.hako
```
## 🤖 Copilot協力期待
@ -351,7 +351,7 @@ impl Clone for AnyBox {
grep -r "Arc<Mutex<" src/boxes/ | wc -l # → 0
# 全Box型統合テスト
./target/release/nyash tests/phase_9_75_complete_validation.nyash
./target/release/nyash tests/phase_9_75_complete_validation.hako
# → 全テスト成功
```

View File

@ -184,7 +184,7 @@ Arc<Mutex<T>> → RwLock<T>
### Phase 9.75-C統合テスト
```nyash
// tests/phase975c_final_validation.nyash
// tests/phase975c_final_validation.hako
static box Main {
main() {
// HTTPServerBox状態保持テスト
@ -210,7 +210,7 @@ static box Main {
### 負荷テスト
```nyash
// tests/phase975c_stress_test.nyash
// tests/phase975c_stress_test.hako
// 大量のBox作成・状態変更・並行アクセステスト
```

View File

@ -6,8 +6,8 @@ wasmtime compileによるAOT実行ファイル生成で確実なユーザー価
## 🎯 実装目標
```bash
# 目標実装
nyash --compile-native app.nyash -o app.exe # AOT実行ファイル生成
nyash --aot app.nyash # 短縮形
nyash --compile-native app.hako -o app.exe # AOT実行ファイル生成
nyash --aot app.hako # 短縮形
./app.exe # 起動高速化JIT起動コスト除去
# 内部実装
@ -125,7 +125,7 @@ fn main() {
## ✅ Acceptance Criteria
### 機能要件
- [ ] `nyash --compile-native app.nyash -o app.exe` 動作
- [ ] `nyash --compile-native app.hako -o app.exe` 動作
- [ ] 生成実行ファイルが単独で動作依存関係なし
- [ ] 既存Nyashプログラムが100%互換で高速実行

View File

@ -169,11 +169,11 @@ Finished `release` profile [optimized] target(s) in X.XXs
### ✅ 検証: DebugBox機能確認
```bash
# DebugBox基本機能テスト
$ ./target/release/nyash test_debug_basic.nyash
$ ./target/release/nyash test_debug_basic.hako
✅ DebugBoxがRwLockで動作
# 追跡機能テスト
$ ./target/release/nyash test_debug_tracking.nyash
$ ./target/release/nyash test_debug_tracking.hako
✅ メモリ追跡・ブレークポイント機能正常
```

View File

@ -92,15 +92,15 @@ Finished `release` profile [optimized] target(s) in X.XXs
### ✅ Verification: All Box Types Functional
```bash
# Basic functionality test
$ ./target/release/nyash local_tests/test_basic_box_operations.nyash
$ ./target/release/nyash local_tests/test_basic_box_operations.hako
✅ All Box operations successful
# HTTP Server test (critical for Phase 9.5)
$ ./target/release/nyash local_tests/test_http_server_basic.nyash
$ ./target/release/nyash local_tests/test_http_server_basic.hako
✅ HTTPServerBox functioning with RwLock
# P2P test (critical for future phases)
$ ./target/release/nyash local_tests/test_p2p_basic.nyash
$ ./target/release/nyash local_tests/test_p2p_basic.hako
✅ P2PBox functioning with RwLock
```

View File

@ -122,15 +122,15 @@ Finished `release` profile [optimized] target(s) in X.XXs
### ✅ 検証: 全Box型の機能確認
```bash
# 基本機能テスト
$ ./target/release/nyash local_tests/test_basic_box_operations.nyash
$ ./target/release/nyash local_tests/test_basic_box_operations.hako
✅ 全Box操作成功
# HTTPサーバーテスト (Phase 9.5にとって重要)
$ ./target/release/nyash local_tests/test_http_server_basic.nyash
$ ./target/release/nyash local_tests/test_http_server_basic.hako
✅ HTTPServerBoxがRwLockで動作
# P2Pテスト (将来のPhaseにとって重要)
$ ./target/release/nyash local_tests/test_p2p_basic.nyash
$ ./target/release/nyash local_tests/test_p2p_basic.hako
✅ P2PBoxがRwLockで動作
```

View File

@ -229,7 +229,7 @@ fn test_share_box_vs_clone_box_semantics() {
#### **B7: テスト実行**
```bash
cargo test array_state_sharing_test
./target/debug/nyash tests/array_debug.nyash
./target/debug/nyash tests/array_debug.hako
```
**✅ Phase B 完了条件**: ArrayBox状態保持テストが通過
@ -299,13 +299,13 @@ WASMの独自メモリ管理での影響確認
#### **D3: バックエンド別テスト**
```bash
# インタープリター
./target/debug/nyash tests/array_debug.nyash
./target/debug/nyash tests/array_debug.hako
# VM
./target/release/nyash --backend vm tests/array_debug.nyash
./target/release/nyash --backend vm tests/array_debug.hako
# WASM
./target/release/nyash --backend wasm tests/array_debug.nyash
./target/release/nyash --backend wasm tests/array_debug.hako
```
**✅ Phase D 完了条件**: 3バックエンド全てで一貫した動作
@ -325,8 +325,8 @@ WASMの独自メモリ管理での影響確認
cargo test
# 実用アプリテスト
./target/release/nyash app_dice_rpg.nyash
./target/release/nyash app_statistics.nyash
./target/release/nyash app_dice_rpg.hako
./target/release/nyash app_statistics.hako
# 性能ベンチマーク
./target/release/nyash --benchmark --iterations 100

Some files were not shown because too many files have changed in this diff Show More