feat(joinir): add progress carrier verification for skip_ws (Phase 29 L-5.2)

Implement zero-progress backedge detection for JoinIR loops:
- Create verify.rs module with ProgressError enum
- verify_progress_for_skip_ws() checks BinOp::Add before recursive calls
- Hook into joinir_runner_standalone_skip_ws test (NYASH_JOINIR_EXPERIMENT=1)
- Currently warning-only, will upgrade to error in Phase 30

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

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
nyash-codex
2025-11-25 06:38:43 +09:00
parent 31e458e7fa
commit 96ce02eef4
3 changed files with 293 additions and 1 deletions

View File

@ -27,11 +27,17 @@ use crate::mir::ValueId;
// Phase 27.9: Lowering submodule
pub mod lowering;
// Phase 29 L-5.2: Progress verification
pub mod verify;
// Re-export lowering functions for backward compatibility
pub use lowering::{
lower_funcscanner_trim_to_joinir, lower_min_loop_to_joinir, lower_skip_ws_to_joinir,
};
// Re-export verification functions
pub use verify::verify_progress_for_skip_ws;
/// JoinIR 関数IDMIR 関数とは別 ID でもよい)
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct JoinFuncId(pub u32);