Skip to content

Method group conversion caching redo#57882

Closed
pawchen wants to merge 47 commits intodotnet:mainfrom
pawchen:mgcMerge
Closed

Method group conversion caching redo#57882
pawchen wants to merge 47 commits intodotnet:mainfrom
pawchen:mgcMerge

Conversation

@pawchen
Copy link
Copy Markdown
Contributor

@pawchen pawchen commented Nov 19, 2021

This is to help picking up #6642

@ghost ghost added Community The pull request was submitted by a contributor who is not a Microsoft employee. Area-Compilers labels Nov 19, 2021
@AlekseyTs
Copy link
Copy Markdown
Contributor

@pawchen Ping me once this PR is ready for a look.

@pawchen
Copy link
Copy Markdown
Contributor Author

pawchen commented Dec 8, 2021

@AlekseyTs Thanks, it's near. This time I dropped module scoped caching, reducing the complexities by not dealing with the module builders. I run into a few issues here though:

  1. ExpressionCompiler tests are not run in CI (ExpressionEvaluator.*.UnitTests are not run in CI #58030) and they are already failing without my changes, what's worse, the failing tests involve delegates
  2. Have some trouble specifying the C# version in ExpressionCompiler tests, despite I created the Compilation with preview version of C#, the C# version was set back to 10.

TODOs

  • Recently anonymous delegate was introduced, not sure how to dig out the type parameters in it, need to experiment a little
  • Local functions?

I'll close this PR and create another one with cleaner commit history once those issues are clear.

@pawchen
Copy link
Copy Markdown
Contributor Author

pawchen commented Dec 8, 2021

OK, because synthesized anonymous delegates are synthesized according to the target method, despite we cannot dig the type parameters out of the delegate symbol, if the target method contains type parameters, we can still detect them there.

@pawchen pawchen closed this Dec 12, 2021
@pawchen pawchen deleted the mgcMerge branch January 13, 2022 01:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area-Compilers Community The pull request was submitted by a contributor who is not a Microsoft employee.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants