ltrzesniewski/InlineIL.Fody

Better discoverability of IL.Push/IL.Pop

Closed this issue · 2 comments

DeclareLocals is really useful to have but it'd also be nice to reference normal C# locals too. I just noticed there's also Push and Pop so maybe the error could point to those, but maybe the names can be changed to Load and Store to match IL opcode names more?

Yes, Push and Pop are there for this purpose. I guess they could have been named Load and Store but I'm reluctant to take a breaking change just for renaming them right now.

I see no other way to reference normal C# locals, because they can get optimized out in release builds, and there's no way to map C# local names to IL locals.

Can you tell me which error message you got, so I can improve it?