Files
hakorune/tools/test/smoke/mir/hints_jsonl_basic_smoke.sh
Selfhosting Dev c8063c9e41 pyvm: split op handlers into ops_core/ops_box/ops_ctrl; add ops_flow + intrinsic; delegate vm.py without behavior change
net-plugin: modularize constants (consts.rs) and sockets (sockets.rs); remove legacy commented socket code; fix unused imports
mir: move instruction unit tests to tests/mir_instruction_unit.rs (file lean-up); no semantic changes
runner/pyvm: ensure using pre-strip; misc docs updates

Build: cargo build ok; legacy cfg warnings remain as before
2025-09-21 08:53:00 +09:00

32 lines
1.1 KiB
Bash
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/usr/bin/env bash
set -euo pipefail
root=$(cd "$(dirname "$0")"/../../../.. && pwd)
bin="$root/target/release/nyash"
if [ ! -x "$bin" ]; then
echo "nyash binary not found at $bin; build first (cargo build --release)" >&2
exit 1
fi
out_jsonl="$root/tmp/mir_hints_basic.jsonl"
rm -f "$out_jsonl"
# Emit scope + join hints into JSONL file (no stderr noise)
export NYASH_PARSER_STAGE3=1
export NYASH_MIR_HINTS="jsonl=$out_jsonl|scope|join"
# Run two small samples that exercise both kinds (errors are tolerated, we only need hints emission)
"$bin" --backend vm "$root/apps/tests/macro/exception/expr_postfix_direct.nyash" >/dev/null 2>&1 || true
"$bin" --backend vm "$root/apps/tests/macro/if/assign_both_branches.nyash" >/dev/null 2>&1 || true
test -s "$out_jsonl" || { echo "[FAIL] hints jsonl not created" >&2; exit 2; }
# Basic presence checks (dont overfit exact ids)
rg -q '"kind":"ScopeEnter"' "$out_jsonl" || { echo "[FAIL] ScopeEnter not found in jsonl" >&2; exit 2; }
rg -q '"kind":"JoinResult"' "$out_jsonl" || { echo "[FAIL] JoinResult not found in jsonl" >&2; exit 2; }
echo "[OK] MIR hints JSONL basic smoke passed ($out_jsonl)"
exit 0