Files
hakorune/tools/smokes/v2/README.md
nyash-codex dda65b94b7 Phase 21.7 normalization: optimization pre-work + bench harness expansion
- Add opt-in optimizations (defaults OFF)
  - Ret purity verifier: NYASH_VERIFY_RET_PURITY=1
  - strlen FAST enhancement for const handles
  - FAST_INT gate for same-BB SSA optimization
  - length cache for string literals in llvmlite
- Expand bench harness (tools/perf/microbench.sh)
  - Add branch/call/stringchain/arraymap/chip8/kilo cases
  - Auto-calculate ratio vs C reference
  - Document in benchmarks/README.md
- Compiler health improvements
  - Unify PHI insertion to insert_phi_at_head()
  - Add NYASH_LLVM_SKIP_BUILD=1 for build reuse
- Runtime & safety enhancements
  - Clarify Rust/Hako ownership boundaries
  - Strengthen receiver localization (LocalSSA/pin/after-PHIs)
  - Stop excessive PluginInvoke→BoxCall rewrites
- Update CURRENT_TASK.md, docs, and canaries

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-13 16:40:58 +09:00

1.4 KiB

Smokes v2 — Minimal Runner and Policy

Policy

  • Use [SKIP:] prefix for environment/host dependent skips.
    • Examples: [SKIP] hakorune not built, [SKIP:env] plugin path missing
    • Keep reasons short and stable to allow grep-based canaries.
  • Prefer JSON-only output in CI: set NYASH_JSON_ONLY=1 to avoid noisy logs.
  • Diagnostics lines like [provider/select:*] are filtered by default in lib/test_runner.sh.
    • Toggle: set HAKO_SILENT_TAGS=0 to disable filtering and show raw logs. HAKO_SHOW_CALL_LOGS=1 also bypasses filtering.

Helpers

  • tools/smokes/v2/lib/mir_canary.sh provides:
    • extract_mir_from_output — between [MIR_BEGIN]/[MIR_END]
    • assert_has_tokens, assert_skip_tag, assert_order, assert_token_count
  • tools/lib/canary.sh provides minimal, harness-agnostic aliases:
    • extract_mir_between_tags — same as extract_mir_from_output
    • require_tokens token... — fail if any token missing

Notes

  • Avoid running heavy integration smokes in CI by default. Use --profile quick.
  • When a test depends on external tools (e.g., LLVM), prefer [SKIP:<reason>] over failure.

Quick tips

  • EXE-heavy cases (e.g., phase2100/*) may take longer. When running quick with these tests, pass a larger timeout like --timeout 120.
  • Smokes v2 auto-cleans temporary crate EXE objects created under /tmp (pattern: ny_crate_backend_exe_*.o) after the run.