Skip to content

Commit 03a95c5

Browse files
Smaug123jkotas
andauthored
Fix description of pointer in ldloca.s (#11314)
Apply #9574 to ldloca.s. --------- Co-authored-by: Jan Kotas <[email protected]>
1 parent 01c0e96 commit 03a95c5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

xml/System.Reflection.Emit/OpCodes.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10422,7 +10422,7 @@ The following <xref:System.Reflection.Emit.ILGenerator.Emit%2A> method overloads
1042210422

1042310423
1. The address of the local variable at the specified index is pushed onto the stack.
1042410424

10425-
The `ldloca.s` instruction pushes the address of the local variable number at the passed index onto the stack, where local variables are numbered 0 onwards. The value pushed on the stack is already aligned correctly for use with instructions like <xref:System.Reflection.Emit.OpCodes.Ldind_I> and <xref:System.Reflection.Emit.OpCodes.Stind_I>. The result is a transient pointer (type `*`).
10425+
The `ldloca.s` instruction pushes the address of the local variable number at the passed index onto the stack, where local variables are numbered 0 onwards. The value pushed on the stack is already aligned correctly for use with instructions like <xref:System.Reflection.Emit.OpCodes.Ldind_I> and <xref:System.Reflection.Emit.OpCodes.Stind_I>. The result is a managed pointer (type `&`). The local variable is stored in unmanaged memory, so the return value can be converted to an unmanaged pointer without pinning.
1042610426

1042710427
The `ldloca.s` instruction provides an efficient encoding for use with the local variables 0 through 255.
1042810428

0 commit comments

Comments
 (0)