This refactoring improves maintainability and testability of the complex
AsmParser by extracting key responsibilities into focused, testable modules:
## New Components
- **SourceLineHandler**: Unifies source line parsing (.loc, .d2line, .cv_loc,
.dbg, .stabn) that was previously scattered across 3 methods
- **LabelProcessor**: Extracts label detection, filtering, and cleanup logic
from the massive findUsedLabels method
- **ParsingState**: Encapsulates parsing state management (ready for future use)
## Benefits
- **Better testability**: Previously untestable logic now has comprehensive unit tests
- **DRY principle**: Eliminates duplicate source handling code
- **Single responsibility**: Each class has a clear, focused purpose
- **Maintainability**: Complex logic is broken into manageable pieces
## Testing
- Added 20 new unit tests covering the extracted functionality
- All 1,699 existing tests pass (including 670 comprehensive filter tests)
- Zero regressions detected
The refactoring maintains complete backward compatibility while significantly
improving code structure and testability.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>