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

nop after any Il #17

Closed
LadislavSopko opened this issue May 22, 2020 · 2 comments
Closed

nop after any Il #17

LadislavSopko opened this issue May 22, 2020 · 2 comments
Labels
enhancement New feature or request
Milestone

Comments

@LadislavSopko
Copy link

Hello
nice extension!
I just saw it add nop after any instruction, is it wanted?

thx

@ltrzesniewski
Copy link
Owner

Hello,

These nops are added by Roslyn between statements when you compile in Debug mode. They are not there when you compile in Release mode.

InlineIL removes nops which cause generated code to be incorrect, like the ones between a prefix instruction and its target, but will leave the others as they cause no trouble, and may even be useful for debugging.

Anyway I thought about removing the nops between emitted instructions as they can be confusing and harm readability in Debug mode, but I'm still not sure if I should do it or not. 😉

@ltrzesniewski ltrzesniewski added this to the v1.4.1 milestone Jun 3, 2020
@ltrzesniewski ltrzesniewski added the enhancement New feature or request label Jun 3, 2020
@ltrzesniewski
Copy link
Owner

I removed the additional nop instructions that were left after each emitted instruction in Debug builds in v1.4.1.

You will still see some other nop instructions, like the one emitted for the { opening brace of the method which lets you put a breakpoint there. I left these to keep the expected debugger features working.

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

No branches or pull requests

2 participants