BoundDecisionDag.Rewrite - Avoid capturing the replacement map#58137
Merged
AlekseyTs merged 1 commit intodotnet:mainfrom Dec 8, 2021
Merged
BoundDecisionDag.Rewrite - Avoid capturing the replacement map#58137AlekseyTs merged 1 commit intodotnet:mainfrom
AlekseyTs merged 1 commit intodotnet:mainfrom
Conversation
alrz
commented
Dec 6, 2021
| } | ||
|
|
||
| BoundDecisionDagNode makeReplacement(BoundDecisionDagNode node, Func<BoundDecisionDagNode, BoundDecisionDagNode> replacement) | ||
| static BoundDecisionDagNode makeReplacement(BoundDecisionDagNode node, IReadOnlyDictionary<BoundDecisionDagNode, BoundDecisionDagNode> replacement) |
Member
Author
There was a problem hiding this comment.
Could be inlined as lambda for caching (this is the tuple input optimization which is common compared to rewrite for constant input)
Member
There was a problem hiding this comment.
IMO when it comes to whether to use a lambda or to convert a local function to delegate, let's use whichever form we prefer to read, with the assumption that eventually the method group conversion to delegate caching will come about.
cston
approved these changes
Dec 6, 2021
This was referenced Dec 6, 2021
Closed
RikkiGibson
approved these changes
Dec 6, 2021
Contributor
|
@alrz Thank you for the contribution. |
333fred
added a commit
to 333fred/roslyn
that referenced
this pull request
Dec 10, 2021
…rations * upstream/main: (396 commits) Update several ExpressionCompiler unit tests for inferred delegate types (dotnet#58203) Avoid calculating inferred delegate type unnecessarily in conversions and type inference (dotnet#58115) OmniSharp options (dotnet#58208) Fix generator caching in compiler server (dotnet#57177) Clarify use of null as an initialized value BoundDecisionDag.Rewrite - Avoid capturing the replacement map (dotnet#58137) Address feedback Add regex parser tests Add additional test for another bug report Add additional test for another bug report Add additional test for another bug report Add additional test for another bug report Add additional test for another bug report Add missing delegate casts (dotnet#58170) Add additional test for another bug report Add additional test for another bug report Add additional test for another bug report Add additional test for another bug report Add additional test for another bug report Add additional test for another bug report ...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Extracted from #57909