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>
This commit is contained in:
23
tools/smokes/v2/lib/crate_exec.sh
Normal file
23
tools/smokes/v2/lib/crate_exec.sh
Normal file
@ -0,0 +1,23 @@
|
||||
#!/usr/bin/env bash
|
||||
# crate_exec.sh — tiny helpers to build and run ny-llvmc EXE reps with bounded time
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
: "${HAKO_BUILD_TIMEOUT:=10}"
|
||||
: "${HAKO_EXE_TIMEOUT:=5}"
|
||||
|
||||
crate_build_exe() {
|
||||
# Args: in_json out_exe [nyrt_dir]
|
||||
local in_json="$1"; shift
|
||||
local out_exe="$1"; shift
|
||||
local nyrt_dir="${1:-$NYASH_ROOT/target/release}"
|
||||
local bin_nyllvmc="${NYASH_NY_LLVM_COMPILER:-$NYASH_ROOT/target/release/ny-llvmc}"
|
||||
timeout "$HAKO_BUILD_TIMEOUT" "$bin_nyllvmc" --in "$in_json" --emit exe --nyrt "$nyrt_dir" --out "$out_exe" >/dev/null 2>&1
|
||||
}
|
||||
|
||||
crate_run_exe() {
|
||||
# Args: exe_path
|
||||
local exe="$1"
|
||||
timeout "$HAKO_EXE_TIMEOUT" "$exe" >/dev/null 2>&1
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user