refactor(extractors): Phase 282 P9a - CommonExtractionHelpers SSOT統合(スコープ限定版)

# Phase 282 P9a 完了 (Scope-Limited Integration)

## 実装内容
- **common_helpers.rs 作成**: 4グループの共通ヘルパー統合 (316行)
  - Group 1: Control Flow Counting (count_control_flow - 汎用カウンター)
  - Group 2: Control Flow Detection (has_break/continue/return_statement)
  - Group 3: Condition Validation (extract_loop_variable, is_true_literal)
  - Group 4: Pattern5専用ヘルパー (validate_continue_at_end, validate_break_in_simple_if)

- **Pattern統合完了**: Pattern5 → Pattern4 → Pattern2 → Pattern1
  - Pattern5: ~90行削減 (5 tests PASS)
  - Pattern4: ~66行削減 (5 tests PASS)
  - Pattern2: ~67行削減 (4 tests PASS)
  - Pattern1: ~28行削減 (3 tests PASS)
  - Pattern3: 別フェーズに延期(pattern固有ロジック除外)

## 成果
- **コード削減**: ~251行(Pattern3除く、total ~400行見込み)
- **テスト**: 40 unit tests PASS (23 common_helpers + 17 extractors)
- **スモークテスト**: 45 PASS, 1 pre-existing FAIL(退行ゼロ)
- **ビルド警告**: 130 → 120 (-10)

## USER CORRECTIONS適用済み
1.  スコープ限定(共通ロジックのみ、pattern固有除外)
2.  Placeholder禁止(SSOT違反排除)
3.  統合順序変更(Pattern3を最後/別フェーズへ)

## 追加ドキュメント
- Phase 284 計画追加(Return as ExitKind SSOT)
- 10-Now.md, 30-Backlog.md 更新

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
2025-12-23 11:14:28 +09:00
parent bf6f4faa1f
commit 41d92bedb9
15 changed files with 1600 additions and 259 deletions

View File

@ -2,13 +2,15 @@
## Current Focus (next)
- Phase 283bugfix: JoinIR if-condition remap fix: `docs/development/current/main/phases/phase-283/README.md`
- 目的: Pattern3if-sum`i % 2 == 1` が undefined `ValueId` を生成する不具合を根治する
- SSOT: `src/mir/join_ir/lowering/loop_with_if_phi_if_sum.rs`ConditionEnv の正しい使用位置)
- Phase 284design-first: Return as ExitKind SSOTpatternに散らさない
- 目的: `return``ExitKind` + `compose::*` / `emit_frag()` に収束させ、pattern側の個別実装を増やさない
- 入口: `docs/development/current/main/phases/phase-284/README.md`
- 手順: `docs/development/current/main/phases/phase-284/P0-INSTRUCTIONS.md`
## Recently Completed (2025-12-23)
- Phase 282Router shrinkage + extraction-based migration P0P5: `docs/development/current/main/phases/phase-282/README.md`
- Phase 283bugfix: JoinIR if-condition remap fix: `docs/development/current/main/phases/phase-283/README.md`
- Phase 282Router shrinkage + extraction-based migration + extractor refactor P0P9a: `docs/development/current/main/phases/phase-282/README.md`
- Phase 280Frag composition SSOT positioning: `docs/development/current/main/phases/phase-280/README.md`
- Phase 281Pattern6/7 compose adoption, P0P3: `docs/development/current/main/phases/phase-281/README.md`
- Phase 273Plan line SSOT: `docs/development/current/main/phases/phase-273/README.md`