Closed Rohansi closed 6 years ago
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?
Oh right, I forgot they would be optimized out.
I don't have the exact error message but I believe it was number 0002 and it suggested to use DeclareLocals. That hint could be expanded to include Push and Pop in case a user is trying to access a C# local.
On Jul 22, 2018 8:08 AM, Lucas Trzesniewski notifications@github.com wrote:
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?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/ltrzesniewski/InlineIL.Fody/issues/3#issuecomment-406861861, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ABQjzPs3sNCN1hGRmREpAGiFLDcRebTYks5uJGtMgaJpZM4VZ-FK.
DeclareLocals
is really useful to have but it'd also be nice to reference normal C# locals too. I just noticed there's alsoPush
andPop
so maybe the error could point to those, but maybe the names can be changed toLoad
andStore
to match IL opcode names more?