Skip to content
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

Add Label support in new ILGenerator #93565

Merged
merged 13 commits into from Oct 26, 2023
Merged

Add Label support in new ILGenerator #93565

merged 13 commits into from Oct 26, 2023

Conversation

buyaa-n
Copy link
Member

@buyaa-n buyaa-n commented Oct 16, 2023

Add implementation for DefineLabel(), (OpCode opcode, Label label), Emit(OpCode opcode, Label[] labels), MarkLabel(Label loc) and corresponding tests

Contributes to #92975 and #93497

@ghost
Copy link

ghost commented Oct 16, 2023

Tagging subscribers to this area: @dotnet/area-system-reflection-emit
See info in area-owners.md if you want to be subscribed.

Issue Details

Add implementation for DefineLabel(), (OpCode opcode, Label label), Emit(OpCode opcode, Label[] labels), MarkLabel(Label loc) and corresponding tests

The PR depend on #93244, will be cleaned up after #93244 merged. Also blocked by #93497.

Contributes to #92975

Author: buyaa-n
Assignees: -
Labels:

area-System.Reflection.Emit

Milestone: -

@dotnet-issue-labeler
Copy link

Note regarding the new-api-needs-documentation label:

This serves as a reminder for when your PR is modifying a ref *.cs file and adding/modifying public APIs, please make sure the API implementation in the src *.cs file is documented with triple slash comments, so the PR reviewers can sign off that change.

@buyaa-n buyaa-n marked this pull request as ready for review October 26, 2023 16:18
@buyaa-n
Copy link
Member Author

buyaa-n commented Oct 26, 2023

The failure is known

@buyaa-n buyaa-n merged commit a9c1b8e into dotnet:main Oct 26, 2023
173 of 175 checks passed
@buyaa-n buyaa-n deleted the label branch October 26, 2023 20:15
liveans pushed a commit to liveans/dotnet-runtime that referenced this pull request Nov 9, 2023
* Emit Label/Branching IL

* Throw when OpCode is not Switch

Co-authored-by: Jan Kotas <jkotas@microsoft.com>

* Add protected factory to ILGenerator instead of making the Label constructor public

* Update test to assert label.Id instead of label.GetHashCode

---------

Co-authored-by: Jan Kotas <jkotas@microsoft.com>
@ghost ghost locked as resolved and limited conversation to collaborators Nov 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants