feat(joinir): Task 200-3 - JoinIRVerifier for LoopHeader PHI and ExitLine contracts
Debug-only verification module to catch JoinIR contract violations early: - verify_loop_header_phis: Checks loop_var_name → PHI exists in header block - verify_exit_line: Checks exit_bindings → values exist, exit block in range - verify_joinir_contracts: Main entry point, runs all checks Implementation: - Added verification functions to merge/mod.rs (private module has type access) - Called from merge_joinir_mir_blocks after exit block setup - Only active in debug builds (#[cfg(debug_assertions)]) Benefits: - Catches "动くけど header PHI 無い" bugs immediately - Validates exit_bindings before variable_map reconnection - Prevents silent contract violations during development
This commit is contained in:
@ -46,6 +46,8 @@ pub use lowering::{
|
||||
// Re-export verification functions
|
||||
pub use verify::verify_progress_for_skip_ws;
|
||||
|
||||
// Phase 200-3: Contract verification functions are in merge/mod.rs (private module access)
|
||||
|
||||
/// JoinIR 関数ID(MIR 関数とは別 ID でもよい)
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
||||
pub struct JoinFuncId(pub u32);
|
||||
|
||||
Reference in New Issue
Block a user