ca91be349d
Refactor JoinIR lowerers and boundary
2025-12-28 03:52:52 +09:00
3e2086cc78
refactor(expr_lowerer): split types and tests
2025-12-28 03:21:43 +09:00
a0da22628e
refactor(json_v1_bridge): split parsing helpers
2025-12-28 03:13:01 +09:00
6f485beb1e
refactor(join_ir_runner): split runner and analyzer tests
2025-12-28 02:56:57 +09:00
79c2953a1f
refactor(modules): split kernel exports and join_ir lowerers
2025-12-28 02:38:51 +09:00
bf7b203586
phase29aa(p4): propagate rc state along jump chain to return
2025-12-28 01:56:36 +09:00
d70d9e3b89
docs(phase29aa): mark P3 complete and queue P4
2025-12-28 01:43:03 +09:00
0269fc2ed4
Reduce build warnings
2025-12-28 01:34:46 +09:00
b104d6af5f
Fix snake case in scan_with_init_minimal
2025-12-28 01:18:58 +09:00
94ad562aa5
Phase 29aa P3: Jump→Return single-pred rc propagation
2025-12-28 01:16:52 +09:00
ed68e48ed1
docs: update references after module splits
2025-12-27 21:43:47 +09:00
7ab042ca91
refactor: split large modules into submodules
2025-12-27 21:43:37 +09:00
f654dd316d
Reduce unused warnings in tests and helpers
2025-12-27 17:49:42 +09:00
0d6229d5a2
Stabilize joinir tests and env guards
2025-12-27 17:41:30 +09:00
88ead0df9f
builder: split MirBuilder core methods
2025-12-27 16:45:13 +09:00
ad469ec2ff
ownership: split ast_analyzer into modules
2025-12-27 16:24:51 +09:00
e6aeccb793
loop_canonicalizer: split canonicalizer tests
2025-12-27 16:20:11 +09:00
7be0b0c28e
phase29aa: RcPlan + guard no cleanup on jump/branch
2025-12-27 16:09:26 +09:00
b6e80943a3
phase29aa(p1): rc insertion plan/apply refactor
2025-12-27 16:02:32 +09:00
d32b72653c
docs(phase29aa): mark P1 pending until code lands
2025-12-27 15:49:42 +09:00
91adbd0547
docs(now): mark phase29z P2 closeout
2025-12-27 15:41:46 +09:00
b895f67e07
docs(phase29aa): add P0 CFG-aware design and link from 29z
2025-12-27 15:38:18 +09:00
a916066631
phase29z(p2): return cleanup and null propagation doc alignment
2025-12-27 15:26:42 +09:00
084277ee18
docs(phase29z): P2 closeout markers and next steps
2025-12-27 15:21:40 +09:00
5a3d45ce53
phase29z(p1): handle explicit drop in rc insertion
2025-12-27 15:16:46 +09:00
977f105e4e
phase29z(p0): minimal RC insertion overwrite release
2025-12-27 15:03:05 +09:00
2223c1309b
docs(phase29z): Add RC insertion minimal instructions
2025-12-27 14:18:33 +09:00
292fb83dcb
docs(phase29y): Finalize P0 SSOT
2025-12-27 14:17:18 +09:00
9c6b725e3e
docs(phase29y): Add P0 docs-finalize instructions
2025-12-27 14:04:56 +09:00
60e3510b26
docs(phase287): Complete P9 closeout
2025-12-27 14:02:53 +09:00
25bd15a64c
docs(phase287): Add P9 closeout instructions
2025-12-27 13:57:33 +09:00
d9a1513991
docs(joinir): Phase 287 P8 - Add rewriter README/guard
2025-12-27 13:56:44 +09:00
74c6df1acb
docs(phase287): Mark P7 complete, add P8 instructions
2025-12-27 13:39:04 +09:00
5e7434c6d4
refactor(joinir): Phase 287 P7 - Remove unused rewriter box scaffolding
2025-12-27 13:37:57 +09:00
df4d0b1776
docs(phase287): Mark P6 complete, add P7 instructions
2025-12-27 13:26:33 +09:00
f225e27007
refactor(joinir): Phase 287 P6 - Remove scan stage (2-stage pipeline)
2025-12-27 13:25:15 +09:00
8d4472ddd3
docs(phase287): Mark P5 complete, add P6 instructions
2025-12-27 13:20:16 +09:00
ce2b4b97e5
refactor(joinir): Tighten plan stage helper visibility
2025-12-27 13:18:54 +09:00
8774bf2fde
refactor(joinir): Phase 287 P5 - Stages facade re-export
2025-12-27 13:14:45 +09:00
ad5b6085c1
docs(phase287): Mark P4 complete, add P5 instructions
2025-12-27 12:50:17 +09:00
3c52ba954e
refactor(joinir): Phase 287 P4 - Modularize plan stage (facade)
2025-12-27 12:48:33 +09:00
2f7061e2e5
docs(phase287): Mark P3 complete, add P4 instructions
2025-12-27 12:17:47 +09:00
3224d83a7b
refactor(joinir): Phase 287 P3 - Split instruction_rewriter into stages
2025-12-27 12:17:34 +09:00
fe895e8838
refactor(joinir): Phase 287 P2 - Modularize contract_checks (facade pattern)
...
- contract_checks.rs (846行) を facade 化
- 6モジュールへ分割(1 module = 1 contract):
- terminator_targets.rs (208行) - Branch/Jump検証
- exit_bindings.rs (35行) - exit_bindings ↔ exit_phis
- carrier_inputs.rs (145行) - carrier_inputs完全性
- boundary_creation.rs (160行) - B1/C2不変条件
- entry_params.rs (317行) - Entry param一貫性
- mod.rs (30行) - Facade
- Total: 846 → 895行(+49行モジュール境界オーバーヘッド)
- 意味論不変: エラータグ/ヒント文すべて保存
- Fail-Fast遵守: silent fallback追加なし
- 検証: Build 0 errors / Pattern6 RC=9 / quick 154/154 PASS
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com >
2025-12-27 11:05:40 +09:00
de1cd1fea0
refactor(joinir): Phase 287 P1 - Modularize ast_feature_extractor (facade pattern)
...
Extracted pattern recognizers from ast_feature_extractor.rs (1,148 lines) into
specialized modules under pattern_recognizers/ directory.
**Structure**:
- ast_feature_extractor.rs: Facade (135 lines, re-exports)
- pattern_recognizers/: 8 modules (1,126 lines total)
- continue_break.rs: continue/break/return detection
- infinite_loop.rs: loop(true) detection
- if_else_phi.rs: if-else PHI pattern detection
- carrier_count.rs: carrier variable counting
- parse_number.rs: parse_number pattern (+ read_digits)
- parse_string.rs: parse_string pattern (+ continue pattern)
- skip_whitespace.rs: skip_whitespace pattern
**Contract**:
- Semantic invariance: All existing APIs preserved via re-exports
- No routing changes, no detection spec changes
- Public API unchanged (facade pattern)
**Verification**:
- Build: 0 errors, 0 warnings
- Pattern6: RC:9 (maintained)
- Smoke tests: 154/154 PASS
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com >
2025-12-27 10:42:17 +09:00
e51777b448
refactor(joinir): Phase 287 P0.6 - Final mod.rs cleanup
...
Add comprehensive modularization summary comment documenting the
complete Phase 287 P0 refactoring journey.
Changes:
- MOD: merge/mod.rs: Add modularization summary (19 lines)
- Final size: 1,053 lines (was 1,555 in Phase 286)
- Total reduction: -502 lines (-32%)
Modularization Summary:
- P0.1: debug_assertions.rs (verification functions)
- P0.2: value_remapper.rs (ValueId remapping helper)
- P0.3: entry_selector.rs (SSOT entry function selection)
- P0.4: header_phi_prebuild.rs (PHI pre-build orchestration)
- P0.5: boundary_logging.rs (consolidated logging)
Remaining in mod.rs (orchestrator only):
- Public API: merge_joinir_mir_blocks()
- Phase 1-6 pipeline coordination
- Phase 3.5: Parameter → PHI dst remapping (complex, kept inline)
- Phase 6: Boundary reconnection and expr_result resolution
SSOT Principles Enforced:
✅ Entry selection: boundary.loop_header_func_name > continuation_func_ids
✅ No string-based heuristics ("k_exit" prefix matching eliminated)
✅ Logging: debug/verbose only (no constant logs in quick profile)
✅ Reserved ValueIds: PHI dsts protected from conflicts
Verification:
- Build: 0 errors
- Pattern6: RC:9 ✅
- Smoke: 154/154 PASS (verified via quick profile)
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com >
2025-12-27 10:27:44 +09:00
91daec104f
refactor(joinir): Phase 287 P0.5 - Extract boundary_logging
...
Extract boundary logging functions to boundary_logging.rs (112 lines).
Consolidates scattered trace.stderr_if() calls into focused functions.
SSOT Principle:
- Only use trace.stderr_if(..., debug/verbose) - NO constant logs
- Prevents noise in quick smoke tests
- Consistent logging format across boundary operations
Changes:
- NEW: merge/boundary_logging.rs (112 lines)
- MOD: merge/mod.rs: 1,027 → ~973 lines (-54 lines)
- Functions:
- log_boundary_info() - Comprehensive boundary logging (verbose mode)
- log_merge_complete() - Merge completion summary (debug mode)
Logging Consolidated:
- Boundary join_inputs / host_inputs
- Exit bindings (carrier mappings)
- Condition bindings (if any)
- Carrier info (if present)
- Merge completion summary
Verification:
- Build: 0 errors
- Pattern6: RC:9 ✅
- Smoke: 154/154 PASS (verified via quick profile)
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com >
2025-12-27 10:25:21 +09:00
5ee3b62042
refactor(joinir): Phase 287 P0.4 - Extract header_phi_prebuild
...
Extract header PHI pre-build orchestration to header_phi_prebuild.rs
(~220 lines). This is orchestration logic that coordinates entry
selection, block remapping, carrier extraction, and PHI building.
Changes:
- NEW: merge/header_phi_prebuild.rs (220 lines)
- MOD: merge/mod.rs: 1,233 → ~1,027 lines (-206 lines)
- Function: prebuild_header_phis() - orchestrates PHI pre-build
- Helper: get_default_entry_block() - fallback for no boundary
Orchestration Responsibilities:
- Entry function selection (via entry_selector SSOT)
- Block remapping (loop_header vs merge_entry)
- Carrier extraction from boundary (with exit_bindings filtering)
- LoopHeaderPhiBuilder invocation
- Reserved ValueId collection (PHI dsts + function params)
Verification:
- Build: 0 errors
- Pattern6: RC:9 ✅
- Smoke: 154/154 PASS (verified via quick profile)
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com >
2025-12-27 10:21:28 +09:00
fb2ac627da
refactor(joinir): Phase 287 P0.3 - Extract entry_selector (SSOT)
...
Extract entry function selection logic to entry_selector.rs (93 lines).
This enforces SSOT principles for loop header and merge entry selection.
SSOT Strategy:
1. Prefer boundary.loop_header_func_name (explicit specification)
2. Fallback: Exclude MAIN and continuation_func_ids (SSOT, not string matching)
3. Never use "k_exit" prefix heuristics
Changes:
- NEW: merge/entry_selector.rs (43 lines net after extraction)
- MOD: merge/mod.rs: 1,269 → ~1,233 lines (-36 lines)
- Functions:
- select_loop_step_func_name() (loop header SSOT)
- select_merge_entry_func() (Pattern 3 if-sum support)
- get_function() (helper with error handling)
Verification:
- Build: 0 errors
- Pattern6: RC:9 ✅
- Smoke: 154/154 PASS (verified via quick profile)
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com >
2025-12-27 10:17:49 +09:00
95fef8696d
refactor(joinir): Phase 287 P0.2 - Extract value_remapper
...
Extract remap_values() to value_remapper.rs (46 lines). This is a pure
helper function that allocates new ValueIds while avoiding conflicts
with reserved PHI dst ValueIds.
Changes:
- NEW: merge/value_remapper.rs (Phase 3 helper)
- MOD: merge/mod.rs: 1,315 → ~1,269 lines (-46 lines)
- Delegation: value_remapper::remap_values() called from orchestrator
Verification:
- Build: 0 errors
- Pattern6: RC:9 ✅
- Smoke: 154/154 PASS (verified via quick profile)
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com >
2025-12-27 10:14:27 +09:00