Skip to content

Mark Regex source generator Go override as SkipLocalsInit if possible - #63277

Merged
stephentoub merged 1 commit into
dotnet:mainfrom
stephentoub:markgoasskiplocalsinit
Jan 3, 2022
Merged

Mark Regex source generator Go override as SkipLocalsInit if possible#63277
stephentoub merged 1 commit into
dotnet:mainfrom
stephentoub:markgoasskiplocalsinit

Conversation

@stephentoub

Copy link
Copy Markdown
Member

It can have so many locals that zero-initing is measurable.

It can have so many locals that zero-initing is measurable.
@ghost

ghost commented Jan 3, 2022

Copy link
Copy Markdown

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

Issue Details

It can have so many locals that zero-initing is measurable.

Author:stephentoub
Assignees:-
Labels:

area-System.Text.RegularExpressions, tenet-performance

Milestone:7.0.0

return ImmutableArray.Create(Diagnostic.Create(DiagnosticDescriptors.LimitedSourceGeneration, rm.MethodSyntax.GetLocation()));
}

bool allowUnsafe = compilation.Options is CSharpCompilationOptions { AllowUnsafe: true };

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

if all we use from compilation is this check, is it better to just pass the bool from the generator or do you expect us to use the Compilation object for something else?

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

As long as we're passing something, seemed like we might as well pass around the Compilation in case we need anything more from it later.

@joperezrjoperezr left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM. Isn't this something that the Compiled engine can benefit from?

@stephentoub

Copy link
Copy Markdown
MemberAuthor

Isn't this something that the Compiled engine can benefit from?

I don't believe it's relevant to dynamic methods.

@stephentoub
stephentoub merged commit 6c50d9f into dotnet:mainJan 3, 2022
@stephentoub
stephentoub deleted the markgoasskiplocalsinit branch January 3, 2022 18:32
@ghostghost locked as resolved and limited conversation to collaborators Feb 2, 2022
Sign up for freeto 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.

2 participants

@stephentoub@joperezr