-
-
Notifications
You must be signed in to change notification settings - Fork 65
Decompose monolithic Processor class into pluggable processors #265
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Decompose monolithic Processor class into pluggable processors #265
Conversation
Co-authored-by: hazzik <[email protected]>
Co-authored-by: hazzik <[email protected]>
Co-authored-by: hazzik <[email protected]>
|
@copilot please continue. Also, to be able to successfully build repo - need to do full git clone, not in a shallow clone. |
…code from main Processor Co-authored-by: hazzik <[email protected]>
Continued with processor decomposition. Added ComparisonProcessor and LoadStoreProcessor, bringing the total line reduction to 291 lines (1363→1072). The remaining complex operations (branch, method calls, object creation) are left in main class as they require intricate state management. The branch operations would need significant refactoring to work with the processor pattern due to their use of ConditionalBranch and state manipulation. Commit: de888fe |
hazzik
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
…processors and split Load/Store Co-authored-by: hazzik <[email protected]>
…ession consistently Co-authored-by: hazzik <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR decomposes the monolithic Processor class (1363 lines) into 16 smaller, focused processors using the IProcessor interface pattern. The main class is reduced to 851 lines by extracting simple, repetitive OpCode handling operations into dedicated processors.
- Implemented IProcessor interface with chain-of-responsibility pattern for pluggable processors
- Created 16 specialized processors handling distinct OpCode families (conversion, arithmetic, stack operations, etc.)
- Integrated processor chain into main Processor class with fallback to original logic
Reviewed Changes
Copilot reviewed 19 out of 19 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/DelegateDecompiler/IProcessor.cs | Defines the pluggable processor interface |
| src/DelegateDecompiler/Processor.cs | Main processor class with integrated processor chain and reduced complexity |
| src/DelegateDecompiler/Processors/*.cs | 16 specialized processors handling specific OpCode families |
| src/DelegateDecompiler.Tests/ProcessorIntegrationTests.cs | Integration tests for processor chain functionality |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
@copilot please review PR and update description. |
This PR implements the decomposition of the monolithic Processor class into smaller, pluggable components using the IProcessor interface pattern. The goal is to break down the 1363-line Processor class into manageable, focused processors.
Fixes #264