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

Scan method body for dependencies #16

Merged

Conversation

vitek-karas
Copy link
Collaborator

@vitek-karas vitek-karas commented Oct 11, 2021

Scan method body instructions for all opcodes which take a token operand.
Create static dependency nodes for all tokens found.
Rewrite the method body when writing output to update all tokens in it.

I improved the tests to validate member removal as well.

Implementation notes:

  • Brings in ILReader and ILOpcode form the type system
  • For now implemented ThrowHelper stub since the type system code uses this.

What's missing:
Scanning exception regions and reporting dependencies for tokens in them
Rewriting exception regions and updating tokens in them
I added #17 to track that work.

@vitek-karas vitek-karas self-assigned this Oct 11, 2021
@vitek-karas vitek-karas changed the title [Draft] Scan method body for dependencies Scan method body for dependencies Oct 11, 2021
Copy link
Owner

@MichalStrehovsky MichalStrehovsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good otherwise!

@vitek-karas vitek-karas merged commit 9185a6b into MichalStrehovsky:iltrim Oct 12, 2021
@vitek-karas vitek-karas deleted the MethodBodyDependencyScanning branch October 12, 2021 10:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants