- Unify standard method calls to emit_unified_call; route via RouterPolicy and apply rewrite::{special,known} at a single entry.\n- Stabilize emit-time invariants: LocalSSA finalize + BlockSchedule PHI→Copy→Call ordering; metadata propagation on copies.\n- Known rewrite default ON (userbox only, strict guards) with opt-out flag NYASH_REWRITE_KNOWN_DEFAULT=0.\n- Expand TypeAnnotation whitelist (is_digit_char/is_hex_digit_char/is_alpha_char/Map.has).\n- Docs: unified-method-resolution design note; Quick Reference normalization note; selfhosting/quickstart.\n- Tools: add tools/selfhost_smoke.sh (dev-only).\n- Keep behavior unchanged for Unknown/core/user-instance via BoxCall fallback; all tests green (quick/integration).
Nyash Selfhost Compiler (MVP scaffold)
This is the Phase 15.3 work-in-progress Nyash compiler implemented in Ny.
Layout
compiler.nyash: entry (CompilerBox). Readstmp/ny_parser_input.ny, prints JSON v0.parser/: lexer/parser/ast (scaffolds; to be filled as we extend Stage‑2)mir/: builder/optimizer stubs (future; current target is JSON v0 emit)tests/: Stage‑1/2 samples (TBD)
Run (behind flag)
NYASH_USE_NY_COMPILER=1 target/release/nyash --backend vm <program.nyash>- The runner writes the input to
tmp/ny_parser_input.nyand invokes this program. - It captures a JSON v0 line from stdout and executes it via the JSON bridge.
- Stage‑3 syntax gate: set
NYASH_NY_COMPILER_STAGE3=1to pass--stage3to the parser (accepts Break/Continue/Throw/Try in JSON v0).
- The runner writes the input to
Notes
- Early MVP emits a minimal JSON v0 (currently a placeholder: return 0). We will gradually wire lexer/parser/emitter.
- Keep JSON v0 spec in
docs/reference/ir/json_v0.md.