Phase 32 L-2.1 complete implementation: 1. Stage-1 UsingResolver main line JoinIR connection - CFG-based LoopForm construction for resolve_for_source/5 - LoopToJoinLowerer integration with handwritten fallback - JSON snapshot tests 6/6 PASS 2. JoinIR/VM Bridge improvements - Simplified join_ir_vm_bridge.rs dispatch logic - Enhanced json.rs serialization - PHI core boxes cleanup (local_scope_inspector, loop_exit_liveness, loop_var_classifier) 3. Stage-1 CLI enhancements - Extended args.rs, groups.rs, mod.rs for new options - Improved stage1_bridge module (args, env, mod) - Updated stage1_cli.hako 4. MIR builder cleanup - Simplified if_form.rs control flow - Removed dead code from loop_builder.rs - Enhanced phi_merge.rs 5. Runner module updates - json_v0_bridge/lowering.rs improvements - dispatch.rs, selfhost.rs, modes/vm.rs cleanup 6. Documentation updates - CURRENT_TASK.md, AGENTS.md - Various docs/ updates 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
60 lines
2.0 KiB
Markdown
60 lines
2.0 KiB
Markdown
# Nyash CLI Options Quick Reference
|
||
|
||
最終更新: 2025-08-23
|
||
|
||
## 基本
|
||
- `file`: 実行するNyashファイル(位置引数)
|
||
- `--backend {interpreter|vm|llvm}`: 実行バックエンド選択(既定: interpreter)
|
||
- `--debug-fuel {N|unlimited}`: パーサーのデバッグ燃料(無限ループ対策)
|
||
|
||
## MIR関連
|
||
- `--dump-mir`: MIRを出力(実行はしない)
|
||
- `--verify`: MIR検証を実施
|
||
- `--mir-verbose`: 詳細MIR出力(統計など)
|
||
|
||
## VM関連
|
||
- `--vm-stats`: VM命令統計を有効化(`NYASH_VM_STATS=1`)
|
||
- `--vm-stats-json`: VM統計をJSONで出力(`NYASH_VM_STATS_JSON=1`)
|
||
|
||
## GC
|
||
- `--gc {auto|rc+cycle|minorgen|stw|rc|off}`: GCモード(既定: `auto` → rc+cycle)
|
||
- `rc+cycle`: 参照カウント + 循環回収(推奨・安定)
|
||
- `minorgen`: 高速向けの軽量世代別(Gen‑0移動、上位非移動)
|
||
- `stw`: 検証用の非移動Mark‑Sweep(開発者向け)
|
||
- `rc`: 循環回収なしのRC(比較用)
|
||
- `off`: 自己責任モード(循環はリーク)
|
||
- 関連ENV
|
||
- `NYASH_GC_MODE`(CLIが優先)
|
||
- `NYASH_GC_METRICS` / `NYASH_GC_METRICS_JSON`
|
||
- `NYASH_GC_ALLOC_THRESHOLD`
|
||
- 詳細: `docs/reference/runtime/gc.md`
|
||
|
||
## WASM/AOT
|
||
- `--compile-wasm`: WATを出力
|
||
- `--compile-native` / `--aot`: AOT実行ファイル出力(要wasm-backend)
|
||
- `--output, -o FILE`: 出力先を指定
|
||
|
||
## ベンチマーク
|
||
- `--benchmark`: バックエンド比較ベンチを実行
|
||
- `--iterations N`: ベンチ実行回数(既定: 10)
|
||
|
||
## 使用例
|
||
```bash
|
||
# インタープリターで実行
|
||
nyash program.hako
|
||
|
||
# VMで実行 + 統計をJSON出力
|
||
nyash --backend vm --vm-stats --vm-stats-json program.hako
|
||
|
||
# MIRを出力
|
||
nyash --dump-mir --mir-verbose program.hako
|
||
|
||
# ベンチマーク
|
||
nyash --benchmark --iterations 100
|
||
```
|
||
|
||
詳細は `docs/reference/architecture/execution-backends.md` も参照してください。
|
||
|
||
## 参考: `nyash --help` スナップショット
|
||
- docs/tools/nyash-help.md
|