refactor(mir): Phase 25.1o - do_break/continue 共通化(LoopExitKind型統一)
【変更内容】 1. LoopExitKind enum定義 - Break / Continue の型安全な区別 2. do_loop_exit() 共通メソッド作成(47行) - スナップショット取得(共通処理) - kind別のスナップショット保存 - kind別のジャンプターゲット - unreachable ブロック切り替え(共通処理) 3. do_break/continue をthin wrapperに変換 - do_break: 13行 → 4行 - do_continue: 12行 → 4行 - 合計21行削減 【効果】 - 構造改善: break/continue の共通ロジック一箇所に集約 - 保守性向上: デバッグログなどの共通処理が統一管理 - 拡張性向上: labeled break/continue等の将来拡張が容易 【検証結果】 - ビルド成功(警告なし) - mir_stageb_loop_break_continue_verifies: PASS - /tmp/loop_continue_fixed.hako: RC=3(期待通り) 関連: Phase 25.1m (continue PHI修正), Phase 25.1n (レガシー削除)
This commit is contained in:
@ -4,8 +4,8 @@
|
||||
* Solves the ValueId circular dependency problem by treating loop structure
|
||||
* as a "Meta-Box" with explicit separation of carriers vs. pinned variables.
|
||||
*
|
||||
* Phase: 25.1b prototype implementation
|
||||
* Status: Feature-flagged (NYASH_LOOPFORM_PHI_V2=1)
|
||||
* Phase: 25.1b prototype implementation → 25.1m で安定化
|
||||
* Status: Always-on(LoopForm PHI v2 は既定実装。NYASH_LOOPFORM_PHI_V2 は互換目的のみで、挙動切り替えには使われない)
|
||||
*/
|
||||
|
||||
use crate::mir::{BasicBlockId, ValueId};
|
||||
|
||||
Reference in New Issue
Block a user