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

@ -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で往復できる