refactor: modularize shape_guard.rs and separate canonicalizer tests
shape_guard.rs (1401 lines → 6 files): - pattern2.rs: Break-loop patterns (132 lines) - pattern3.rs: If-sum patterns (67 lines) - pattern4.rs: Continue patterns (152 lines) - selfhost.rs: Selfhost-specific detectors (245 lines) - utils.rs: Shared helpers (33 lines) - mod.rs: API coordination & tests (776 lines) canonicalizer.rs (1863 lines → 433 lines): - Separated 1430 lines of tests to canonicalizer_tests.rs Benefits: - Improved maintainability (smaller, focused files) - Clear separation of concerns (pattern families) - Preserved API compatibility (re-exports) - No new warnings 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
File diff suppressed because it is too large
Load Diff
1431
src/mir/loop_canonicalizer/canonicalizer_tests.rs
Normal file
1431
src/mir/loop_canonicalizer/canonicalizer_tests.rs
Normal file
File diff suppressed because it is too large
Load Diff
@ -39,6 +39,9 @@ mod capability_guard;
|
||||
mod pattern_recognizer;
|
||||
mod skeleton_types;
|
||||
|
||||
#[cfg(test)]
|
||||
mod canonicalizer_tests;
|
||||
|
||||
// ============================================================================
|
||||
// Public Re-exports
|
||||
// ============================================================================
|
||||
|
||||
Reference in New Issue
Block a user