Skip to content
This repository has been archived by the owner on Nov 1, 2020. It is now read-only.

Fix NYI's for Function Pointers #8200

Merged
merged 1 commit into from
Jun 10, 2020

Conversation

Suchiman
Copy link
Contributor

@Suchiman Suchiman commented Jun 9, 2020

The IsReflectionBlocked fix is rather theoretical as i didn't manage to hit it locally.
Fixes #8199

@Suchiman Suchiman force-pushed the FixFunctionPointers branch from faf2d43 to 63a3399 Compare June 9, 2020 22:39
Copy link
Member

@MichalStrehovsky MichalStrehovsky left a comment

Choose a reason for hiding this comment

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

Thanks for looking into this!

case Internal.TypeSystem.TypeFlags.FunctionPointer:
throw new NotImplementedException("FunctionPointer signature");
return new NativeLayoutEETypeSignatureVertexNode(factory, factory.TypeSystemContext.GetWellKnownType(WellKnownType.IntPtr));
Copy link
Member

Choose a reason for hiding this comment

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

These are interned, so it would be better to add handling for this case in NodeFactory.NativeLayout.cs (where NewTypeSignatureVertexNode is called).

return true;
}
}
return false;
Copy link
Member

Choose a reason for hiding this comment

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

Nit: instead of the if (IsReflectionBlocked(signature.ReturnType)) block above, this could just be return IsReflectionBlocked(signature.ReturnType), saving 5 lines of code.

@Suchiman Suchiman force-pushed the FixFunctionPointers branch from 63a3399 to 4a5f22e Compare June 10, 2020 08:38
Copy link
Member

@MichalStrehovsky MichalStrehovsky left a comment

Choose a reason for hiding this comment

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

Thanks for cleaning it up elsewhere!

@MichalStrehovsky MichalStrehovsky merged commit 45df30f into dotnet:master Jun 10, 2020
@Suchiman Suchiman deleted the FixFunctionPointers branch June 10, 2020 11:23
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NotImplementedException thrown when trying to compile with function pointers
2 participants