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

@ -29,8 +29,8 @@ API Semantics
Implementation Plan (staged, nonbreaking)
1) Provide MVP cursor boxes (done)
- apps/libs/utf8_cursor.nyash
- apps/libs/byte_cursor.nyash
- apps/libs/utf8_cursor.hako
- apps/libs/byte_cursor.hako
2) Delegate StringBox public methods to Utf8CursorBox (internal only; behavior unchanged)
- Start with length → indexOf → substring
- Add targeted smokes for edge cases (multibyte CP, boundaries)

View File

@ -36,7 +36,7 @@ CLI/ツール統合(案)
- バックエンドキー: `--backend cranelift-aot`
- PoC フラグ: `--poc-const N``ny_main``N` を返す単機能)
- 補助スクリプト(設計のみ、本ブランチでは作成しない):
- `tools/aot_smoke_cranelift.sh apps/APP/main.nyash -o app`
- `tools/aot_smoke_cranelift.sh apps/APP/main.hako -o app`
- 流れ: Nyash → MIR → CraneliftAotBox → `.o` → LinkerBox/cc → `app`
ロードマップ

View File

@ -43,7 +43,7 @@ src/backend/llvm/
```bash
# Run with mock LLVM backend
cargo run -- --backend llvm test_program.nyash
cargo run -- --backend llvm test_program.hako
# This will:
# 1. Parse Nyash source to AST
@ -63,7 +63,7 @@ sudo apt install llvm-17-dev clang-17
cargo build --features llvm --release
# Run with real LLVM backend
cargo run --features llvm -- --backend llvm test_program.nyash
cargo run --features llvm -- --backend llvm test_program.hako
# This will:
# 1. Parse Nyash source to AST
@ -78,7 +78,7 @@ cargo run --features llvm -- --backend llvm test_program.nyash
### Basic Return Test
**File**: `local_tests/test_return_42.nyash`
**File**: `local_tests/test_return_42.hako`
```nyash
static box Main {
main() {
@ -95,7 +95,7 @@ static box Main {
```bash
# Test mock implementation
cargo run -- --backend llvm local_tests/test_return_42.nyash
cargo run -- --backend llvm local_tests/test_return_42.hako
echo "Exit code: $?"
# Should show mock execution and exit code 0 (42 when real implementation is complete)

View File

@ -35,7 +35,7 @@ CraneliftAotBox インタフェース草案Phase 15 準備)
使用例PoC フロー)
1) NyRT ビルド: `cargo build -p nyrt --release`
2) オブジェクト出力CLIイメージ:
- `nyash --backend cranelift-aot --poc-const 42 apps/hello/main.nyash -o ny_main.o`
- `nyash --backend cranelift-aot --poc-const 42 apps/hello/main.hako -o ny_main.o`
3) リンク:
- Linux: `cc -o app ny_main.o target/release/libnyrt.a -ldl -lpthread`
- Windows: `link ny_main.obj nyrt.lib /OUT:app.exe`
@ -48,7 +48,7 @@ CraneliftAotBox インタフェース草案Phase 15 準備)
補助スクリプトの仕様(設計のみ)
- ファイル: `tools/aot_smoke_cranelift.sh`
- 目的: `.o/.obj` を生成→リンク→実行して PoC を自動検証。
- 主要引数: `apps/APP/main.nyash -o app`、必要に応じ `--const` を透過的に渡す。
- 主要引数: `apps/APP/main.hako -o app`、必要に応じ `--const` を透過的に渡す。
今後の拡張(非ブロッキング)
- NyRT の外部関数呼び出しcheckpoint など)の導入。