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:
@ -5,12 +5,12 @@
|
||||
⚠️ **ルートディレクトリの汚染防止ルール** ⚠️
|
||||
```bash
|
||||
# ❌ 絶対ダメ:ルートで実行
|
||||
./target/release/nyash test.nyash # ログがルートに散乱!
|
||||
./target/release/nyash test.hako # ログがルートに散乱!
|
||||
cargo test > test_output.txt # 出力ファイルがルートに!
|
||||
|
||||
# ✅ 正しい方法:必ずディレクトリを使う
|
||||
cd local_tests && ../target/release/nyash test.nyash
|
||||
./target/release/nyash local_tests/test.nyash
|
||||
cd local_tests && ../target/release/nyash test.hako
|
||||
./target/release/nyash local_tests/test.hako
|
||||
```
|
||||
|
||||
**必須ルール:**
|
||||
@ -32,30 +32,30 @@ cargo test
|
||||
|
||||
# テストファイル作成・実行例
|
||||
mkdir -p local_tests
|
||||
echo 'print("Hello Nyash!")' > local_tests/test_hello.nyash
|
||||
./target/debug/nyash local_tests/test_hello.nyash
|
||||
echo 'print("Hello Nyash!")' > local_tests/test_hello.hako
|
||||
./target/debug/nyash local_tests/test_hello.hako
|
||||
|
||||
# 演算子統合テスト(local_testsから実行)
|
||||
./target/debug/nyash local_tests/test_comprehensive_operators.nyash
|
||||
./target/debug/nyash local_tests/test_comprehensive_operators.hako
|
||||
|
||||
# 実用アプリテスト
|
||||
./target/debug/nyash app_dice_rpg.nyash
|
||||
./target/debug/nyash app_dice_rpg.hako
|
||||
|
||||
# JIT 実行フラグ(CLI)
|
||||
./target/release/nyash --backend vm \
|
||||
--jit-exec --jit-stats --jit-dump --jit-threshold 1 \
|
||||
--jit-phi-min --jit-hostcall --jit-handle-debug \
|
||||
examples/jit_branch_demo.nyash
|
||||
examples/jit_branch_demo.hako
|
||||
# 既存の環境変数でも可:
|
||||
# NYASH_JIT_EXEC/NYASH_JIT_STATS(/_JSON)/NYASH_JIT_DUMP/NYASH_JIT_THRESHOLD
|
||||
# NYASH_JIT_PHI_MIN/NYASH_JIT_HOSTCALL/NYASH_JIT_HANDLE_DEBUG
|
||||
|
||||
# HostCallハンドルPoCの例
|
||||
./target/release/nyash --backend vm --jit-exec --jit-hostcall examples/jit_array_param_call.nyash
|
||||
./target/release/nyash --backend vm --jit-exec --jit-hostcall examples/jit_map_param_call.nyash
|
||||
./target/release/nyash --backend vm --jit-exec --jit-hostcall examples/jit_map_int_keys_param_call.nyash
|
||||
./target/release/nyash --backend vm --jit-exec --jit-hostcall examples/jit_string_param_length.nyash
|
||||
./target/release/nyash --backend vm --jit-exec --jit-hostcall examples/jit_string_is_empty.nyash
|
||||
./target/release/nyash --backend vm --jit-exec --jit-hostcall examples/jit_array_param_call.hako
|
||||
./target/release/nyash --backend vm --jit-exec --jit-hostcall examples/jit_map_param_call.hako
|
||||
./target/release/nyash --backend vm --jit-exec --jit-hostcall examples/jit_map_int_keys_param_call.hako
|
||||
./target/release/nyash --backend vm --jit-exec --jit-hostcall examples/jit_string_param_length.hako
|
||||
./target/release/nyash --backend vm --jit-exec --jit-hostcall examples/jit_string_is_empty.hako
|
||||
```
|
||||
|
||||
## PHI ポリシー(Phase‑15)と検証トグル
|
||||
@ -128,9 +128,9 @@ cargo build --release
|
||||
### パーサー無限ループ対策(2025-08-09実装)
|
||||
```bash
|
||||
# 🔥 デバッグ燃料でパーサー制御
|
||||
./target/release/nyash --debug-fuel 1000 program.nyash # 1000回制限
|
||||
./target/release/nyash --debug-fuel unlimited program.nyash # 無制限
|
||||
./target/release/nyash program.nyash # デフォルト10万回
|
||||
./target/release/nyash --debug-fuel 1000 program.hako # 1000回制限
|
||||
./target/release/nyash --debug-fuel unlimited program.hako # 無制限
|
||||
./target/release/nyash program.hako # デフォルト10万回
|
||||
|
||||
# パーサー無限ループが検出されると自動停止+詳細情報表示
|
||||
🚨 PARSER INFINITE LOOP DETECTED at method call argument parsing
|
||||
@ -154,7 +154,7 @@ print(DEBUG.memoryReport())
|
||||
Nyash provides a macro-powered lightweight test runner in Phase 16 (MVP).
|
||||
|
||||
- Enable and run tests in a script file:
|
||||
- `nyash --run-tests apps/tests/my_tests.nyash`
|
||||
- `nyash --run-tests apps/tests/my_tests.hako`
|
||||
- Discovers top-level `test_*` functions and Box `test_*` methods (static/instance).
|
||||
- Filtering: `--test-filter NAME` (substring match) or env `NYASH_TEST_FILTER`.
|
||||
- Entry policy when a main exists:
|
||||
|
||||
Reference in New Issue
Block a user