Skip to content
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

Refactor analysis to be instruction independent in preparation for ARM #35

Merged
merged 17 commits into from
Sep 15, 2021

Conversation

SamboyCoding
Copy link
Owner

@SamboyCoding SamboyCoding commented Sep 7, 2021

This PR refactors out some base classes where possible so that IL generation code - which will be common regardless of instruction set - is defined in a top-level class.

The following classes are planned to be (or are) abstracted:

  • Analysis itself
  • Method calls
  • Field reads
  • Field Writes
  • New object allocation
  • Comparisons
  • Conditional jumps
  • Array allocations
  • Array offset reads
  • Array offset writes
  • static field reads
  • static field writes

The method analysis model is made to be instruction-independent via a generic parameter for the instruction type which is passed into actions, which share this parameter.

This work provides a foundation for other instruction sets - crucially, arm - to have analysis written.

@SamboyCoding SamboyCoding self-assigned this Sep 7, 2021
@SamboyCoding SamboyCoding added the enhancement New feature or request label Sep 7, 2021
@SamboyCoding SamboyCoding marked this pull request as ready for review September 15, 2021 16:16
@SamboyCoding SamboyCoding merged commit 103feee into new-analysis Sep 15, 2021
@SamboyCoding SamboyCoding deleted the the-big-abstraction-refactor branch September 21, 2021 21:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant