Skip to content

Fix wording of ldloca description #11313

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions xml/System.Reflection.Emit/OpCodes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10359,7 +10359,7 @@ The following <xref:System.Reflection.Emit.ILGenerator.Emit%2A> method overloads

The stack transitional behavior, in sequential order, is:

1. The address stored in the local variable at the specified index is pushed onto the stack.
1. The address of the local variable at the specified index is pushed onto the stack.

The `ldloca` 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.

Expand Down Expand Up @@ -10421,7 +10421,7 @@ The following <xref:System.Reflection.Emit.ILGenerator.Emit%2A> method overloads

The stack transitional behavior, in sequential order, is:

1. The address stored in the local variable at the specified index is pushed onto the stack.
1. The address of the local variable at the specified index is pushed onto the stack.

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 `*`).

Expand Down