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

Merge Lock object feature to main #72137

Merged
merged 7 commits into from
Feb 20, 2024
Merged

Conversation

jjonescz
Copy link
Member

Test plan: #71888
This contains a merge from main which had only trivial conflicts in C# ErrorCode (solved by renumbering the lock error codes).

* Add native lock feature

* Find Lock pattern manually

* Revert language feature status changes

* Improve error messages

* Check lang version

* Avoid unnecessary langversion check in lock lowering

* Check language version without branching

* Improve code style

* Check more of Lock types and members shape

* Rename feature to "Lock object"

* Extend tests

* Simplify code

* Fix a test

* Avoid double apostrophes in error messages

* Check more of Lock and Scope shapes

* Add more tests
* Warn when value of Lock type is locked in VB

* Warn when converting Lock value in VB

* Mark a sub shared

* Check arity

* Avoid warnings when converting Lock to Lock

* Add more tests

* Add more tests

* Simplify code
* Implement control flow graph for Lock object feature

* Avoid Monitor CFG if members are missing

* Move CFG/IOp tests to their project

* Add more tests

* Fixup VB tests

* Avoid storing data in LockOperation

* Avoid Lock object control flow graph in VB

* Change warning to error when using Lock type in VB

* Emit the same CFG in VB as in C#

* Fixup VB error codes

* Simplify CFG error recovery

* Visit resource inside using stack frame

* Improve code

* Remove unnecessary tests

* Add more tests

* Use Lock type name constant in VB

* Improve code

* Add more tests

* Reword VB error
* Add `Lock` type to the compiler test plan

* Move to statements cheatsheet
* Warn when converting to Lock subtype

* Verify execution of derived lock

* Use better helper to assert diagnostics
@dotnet-issue-labeler dotnet-issue-labeler bot added Area-Compilers untriaged Issues and PRs which have not yet been triaged by a lead labels Feb 16, 2024
@jjonescz jjonescz marked this pull request as ready for review February 16, 2024 10:45
@jjonescz jjonescz requested a review from a team as a code owner February 16, 2024 10:45
@jjonescz
Copy link
Member Author

@AlekseyTs @cston @dotnet/roslyn-compiler I think I need one sign off here

@jcouv jcouv self-assigned this Feb 20, 2024
Copy link
Member

@jcouv jcouv left a comment

Choose a reason for hiding this comment

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

Good to merge

@jjonescz jjonescz merged commit c771cba into dotnet:main Feb 20, 2024
24 checks passed
@jjonescz jjonescz deleted the NativeLock-MergeMain branch February 20, 2024 19:40
@ghost ghost added this to the Next milestone Feb 20, 2024
@jjonescz jjonescz modified the milestones: Next, 17.10 P2 Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Compilers New Feature - Lock Type untriaged Issues and PRs which have not yet been triaged by a lead
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants