Skip to content

UnmanagedCallersOnlyAttribute is unsupported#12350

Merged
vzarytovskii merged 3 commits intodotnet:mainfrom
Happypig375:patch-14
Nov 23, 2021
Merged

UnmanagedCallersOnlyAttribute is unsupported#12350
vzarytovskii merged 3 commits intodotnet:mainfrom
Happypig375:patch-14

Conversation

@Happypig375
Copy link
Member

No description provided.

member val attribs_Unsupported = [
tryFindSysAttrib "System.Runtime.CompilerServices.ModuleInitializerAttribute"
tryFindSysAttrib "System.Runtime.CompilerServices.CallerArgumentExpressionAttribute"
tryFindSysAttrib "System.Runtime.InteropServices.UnmanagedCallersOnlyAttribute"
Copy link
Contributor

Choose a reason for hiding this comment

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

This is a bit subtle with regard to performance. Could you factor out attribs_Unsupported to a let v_unsupportedAttributes = ... please to make it clearer?

Copy link
Member Author

Choose a reason for hiding this comment

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

Should all member vals be refactored to let because we have to avoid "subtle performance"? member val should be known as init-once-only.

Copy link
Contributor

Choose a reason for hiding this comment

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

Only if involving a complex mult-line expression, especially something that involved pipelining or is unusual. I just had to think twice about what we had here

@vzarytovskii vzarytovskii merged commit ee93e05 into dotnet:main Nov 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants