Phase 73-B: Unified legacy Stage-3 environment variables in 27 shell scripts: - Replaced NYASH_PARSER_STAGE3=1 → NYASH_FEATURES=stage3 - Replaced HAKO_PARSER_STAGE3=1 → NYASH_FEATURES=stage3 - Updated all variant patterns (with/without assignments) Files modified (27 total): - tools/dev/*.sh (9 files) - tools/dev_stageb.sh, dump_stageb_min_mir.sh, hakorune_emit_mir.sh - tools/joinir_ab_test.sh, ny_selfhost_inline.sh - tools/perf/*.sh, tools/selfhost/*.sh (9 files) - tools/hako_check/dot_edges_smoke.sh, tools/selfhost_smoke.sh Complete Phase 73 consolidation count: - Phase 73-A: 20 test files + 2 special files (stage3 compat) - Phase 73-B: 27 shell script files - Total: 49 files with legacy Stage-3 ENV consolidated Next: Phase 72 (JoinIR EXPERIMENT SSOT consolidation) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
35 lines
1014 B
Bash
35 lines
1014 B
Bash
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
ROOT="$(cd "$(dirname "$0")/../.." && pwd)"
|
|
BIN="${NYASH_BIN:-$ROOT/target/release/hakorune}"
|
|
if [ ! -x "$BIN" ]; then
|
|
echo "[DOT] hakorune not built: $BIN" >&2
|
|
exit 2
|
|
fi
|
|
|
|
TMP_HAKO="/tmp/dot_edges_$$.hako"
|
|
cat >"$TMP_HAKO" <<'HK'
|
|
// Minimal two boxes with a call to form one edge
|
|
static box Helper {
|
|
method echo(msg) { return 0 }
|
|
}
|
|
static box Main {
|
|
method main() {
|
|
Helper.echo("hi")
|
|
return 0
|
|
}
|
|
}
|
|
HK
|
|
|
|
export LD_LIBRARY_PATH="${ROOT}/target/release:${LD_LIBRARY_PATH:-}"
|
|
OUT=$(
|
|
NYASH_DISABLE_NY_COMPILER=1 HAKO_DISABLE_NY_COMPILER=1 \
|
|
NYASH_FEATURES=stage3 NYASH_FEATURES=stage3 \
|
|
NYASH_DISABLE_PLUGINS=1 NYASH_BOX_FACTORY_POLICY=builtin_first \
|
|
"$BIN" --backend vm "$ROOT/tools/hako_check/cli.hako" -- --format dot --source-file "$TMP_HAKO" "$(sed 's/\r$//' "$TMP_HAKO")"
|
|
)
|
|
echo "$OUT" | sed -n '1,80p'
|
|
echo "$OUT" | grep -q '"Main.main/0" -> "Helper.echo/1";' && echo "[DOT] edge OK" || { echo "[DOT] edge MISSING" >&2; exit 1; }
|
|
rm -f "$TMP_HAKO"
|