Reputation: 10431
When does the compiler choose ldloc or ldloca? My guess is that it chooses ldloca for interfaces and valuetypes. But is that it? Does it choose it for other things too?
Upvotes: 5
Views: 1486
Reputation: 887547
ldloca loads the address of a variable onto the stack.
ldloca
It's used to pass variables as ref and out parameters.
ref
out
Upvotes: 9