45 lines
1.7 KiB
Markdown
45 lines
1.7 KiB
Markdown
|
|
# Phase 21.0 — Full Self‑Hosting (Release Notes)
|
|||
|
|
|
|||
|
|
Date: 2025‑11‑06
|
|||
|
|
Status: COMPLETE
|
|||
|
|
|
|||
|
|
## Summary
|
|||
|
|
Hakorune can now build Hakorune end‑to‑end under the defined DoD:
|
|||
|
|
- S1/S2 (deterministic v1 emit): const/compare/threeblock‑collect repeat 3× with identical normalized hash.
|
|||
|
|
- PRIMARY (no‑fallback): hv1 inline minimal reps (Option‑A/B) are green.
|
|||
|
|
- S3 (llvmlite + Nyash Kernel): link + run representatives pass with expected return codes.
|
|||
|
|
|
|||
|
|
## What changed
|
|||
|
|
- v1 → llvmlite harness direct path
|
|||
|
|
- tools/ny_mir_builder.sh now feeds v1 JSON straight to the Python harness and links against libnyash_kernel.a.
|
|||
|
|
- Python LLVM builder fixes
|
|||
|
|
- compare: supports `cmp` (Lt/Le/Gt/Ge/Eq/Ne) and normalizes to `<, <=, >, >=, ==, !=`.
|
|||
|
|
- ret: synthesizes a small PHI at block head to avoid ret=0 on multi‑pred blocks.
|
|||
|
|
- mir_call: accepts both nested and flat shapes.
|
|||
|
|
- Using/alias (prod)
|
|||
|
|
- modules mapping is considered first; missing aliases added for `selfhost.vm.hakorune-vm.str_cast` and `selfhost.vm.helpers.method_alias_policy`.
|
|||
|
|
- Duplicate `using` lines cleaned in extern_provider.
|
|||
|
|
|
|||
|
|
## How to verify (quick)
|
|||
|
|
- One‑shot (S1/S2 + PRIMARY + S3 auto):
|
|||
|
|
```bash
|
|||
|
|
bash tools/smokes/v2/profiles/quick/core/phase2100/run_all.sh
|
|||
|
|
```
|
|||
|
|
- S3 only (auto when LLVM18/llvmlite present):
|
|||
|
|
```bash
|
|||
|
|
NYASH_LLVM_S3=1 bash tools/smokes/v2/profiles/quick/core/phase2100/run_all.sh
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Environment
|
|||
|
|
- LLVM 18 (llvm-config-18) + llvmlite (Python 3)
|
|||
|
|
- For faster runs: prebuild
|
|||
|
|
```bash
|
|||
|
|
cargo build --release --features llvm
|
|||
|
|
cargo build --release -p nyash-llvm-compiler
|
|||
|
|
cargo build --release -p nyash_kernel
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## Next
|
|||
|
|
- Optional: broaden reps and harden typeops/extern coverage in follow‑on phases.
|
|||
|
|
|