Files
hakorune/tools/test_loopssa_breakfinder_min.sh
nyash-codex 80f8a7bc8c 🔧 Hotfix 7 (Enhanced): ValueId receiver alias tracking for nested loops
- Problem: Pinned receiver variables in loops cause undefined ValueId errors
- Enhanced fix: Update all receiver aliases (me + all __pin$N$@recv levels)
- Handles nested loops by updating previous pin levels
- Test status: Partial improvement, ValueId(50) → ValueId(40)
- Further investigation needed for complete fix

Files modified:
- src/mir/phi_core/loopform_builder.rs (emit_header_phis)
2025-11-19 00:02:41 +09:00

31 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.

#!/bin/bash
# test_loopssa_breakfinder_min.sh — LoopSSA/BreakFinder 最小 JSON ハーネステスト
#
# 目的:
# - lang/src/compiler/tests/loopssa_breakfinder_min.hako を直接 VM で実行し、
# LoopSSA.stabilize_merges が単純な loop_header/loop_exit パターンで安全に動くことを確認する。
# - LoopSSA v2 / BreakFinderBox の変更時に、まずここで赤が出ないことをチェックするための軽量テストだよ。
#
# 将来:
# - StageB 最小サンプルから抽出した JSON をこのハーネスに貼り替えることで、
# ValueId(50) 系の問題を再現するための土台として使う予定。
#
set -e
NYASH_BIN="${NYASH_BIN:-./target/release/hakorune}"
TEST_FILE="lang/src/compiler/tests/loopssa_breakfinder_min.hako"
echo "=== LoopSSA BreakFinder Minimal JSON Test ==="
echo "Test file: $TEST_FILE"
echo "Binary: $NYASH_BIN"
echo ""
# LoopSSA v2 の EXIT PHI を有効化して実行BreakFinder/PhiInjector 経由)
HAKO_LOOPSSA_EXIT_PHI=1 \
NYASH_DISABLE_PLUGINS=1 NYASH_PARSER_STAGE3=1 \
"$NYASH_BIN" --backend vm "$TEST_FILE" 2>&1
echo ""
echo "=== Test complete ==="