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

Abstract out LocalBuilder, emit Locals with new ILGenerator #93809

Merged
merged 16 commits into from
Oct 27, 2023

Conversation

buyaa-n
Copy link
Contributor

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

  • Abstract out LocalBuilder
  • Added implementation for DeclareLocal(Type localType, bool pinned), (OpCode opcode, LocalBuilder local), and corresponding tests

Contributes to #92975
Fixes #93497

@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.

@ghost
Copy link

ghost commented Oct 21, 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
  • Abstract out LocalBuilder (blocked until the API proposal approved)
  • Added implementation for DeclareLocal(Type localType, bool pinned), (OpCode opcode, LocalBuilder local), and corresponding tests

The PR has commits from #93244, will be cleaned up after #93244 merged.

Contributes to #92975

Author: buyaa-n
Assignees: buyaa-n
Labels:

area-System.Reflection.Emit, new-api-needs-documentation

Milestone: -

Copy link
Member

@jkotas jkotas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thank you!

@buyaa-n
Copy link
Contributor Author

buyaa-n commented Oct 27, 2023

Thank you for the review! All failures are known.

@buyaa-n buyaa-n merged commit ce1264c into dotnet:main Oct 27, 2023
172 of 176 checks passed
@buyaa-n buyaa-n deleted the local branch October 27, 2023 15:38
liveans pushed a commit to liveans/dotnet-runtime that referenced this pull request Nov 9, 2023
…3809)

* Abstract LocalBuilder, emit LocalBuilder in ILGenerator

* Apply suggestions from code review

Co-authored-by: Aaron Robinson <[email protected]>

* Remove public LocalBuilder.Method, and apply other feedback

* Avoid invalid cast exception.

Co-authored-by: Jan Kotas <[email protected]>

---------

Co-authored-by: Aaron Robinson <[email protected]>
Co-authored-by: Jan Kotas <[email protected]>
@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.

[API Proposal]: Add protected factory method for creating Label in ILGenerator, abstract out LocalBuilder
4 participants