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

UnmanagedCallersOnlyAttribute is unsupported #12350

Merged
merged 3 commits into from
Nov 23, 2021

Conversation

Happypig375
Copy link
Member

No description provided.

@@ -1227,6 +1227,7 @@ type public TcGlobals(compilingFslib: bool, ilg:ILGlobals, fslibCcu: CcuThunk, d
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