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

Add Function Pointer support to Native AOT Reflection #71883

Closed
steveharter opened this issue Jul 9, 2022 · 0 comments · Fixed by #85504
Closed

Add Function Pointer support to Native AOT Reflection #71883

steveharter opened this issue Jul 9, 2022 · 0 comments · Fixed by #85504

Comments

@steveharter
Copy link
Member

Once #69273 is in for CoreClr, Native AOT should uptake that. It is expected that the CoreClr implementation will be for V7.

See also #71095 for Mono.

@ghost ghost added the untriaged New issue has not been triaged by the area owner label Jul 9, 2022
@MichalStrehovsky MichalStrehovsky removed the untriaged New issue has not been triaged by the area owner label Jul 13, 2022
@MichalStrehovsky MichalStrehovsky added this to the 8.0.0 milestone Jul 13, 2022
@agocke agocke added this to AppModel Jul 20, 2022
MichalStrehovsky added a commit to MichalStrehovsky/runtime that referenced this issue Jan 25, 2023
We don't have a `MethodTable` shape for function pointer types because how they should look like hasn't been defined until .NET 8.

Beef up the CoreCLR compat shim. We'll not be 100% compatible with this because `typeof(Tuple<delegate*<void>[]>)` doesn't actually load as `typeof(Tuple<IntPtr[]>)`, but this'll do until dotnet#71883.
MichalStrehovsky added a commit that referenced this issue Jan 25, 2023
We don't have a `MethodTable` shape for function pointer types because how they should look like hasn't been defined until .NET 8.

Beef up the CoreCLR compat shim. We'll not be 100% compatible with this because `typeof(Tuple<delegate*<void>[]>)` doesn't actually load as `typeof(Tuple<IntPtr[]>)`, but this'll do until #71883.
MichalStrehovsky added a commit to MichalStrehovsky/runtime that referenced this issue Apr 19, 2023
Implements function pointer type support in the compiler, runtime, and reflection stack.

Contributes to dotnet#71883.

* Introduce a new kind of `MethodTable` for function pointers in the compiler.
* Remove function pointer type blocking from various places in the compiler.
* Generate a new summary table so we can construct/deconstruct function pointer types at runtime.
* Update metadata format so that we can capture calling conventions and distinguish managed/unmanaged function pointers in metadata.
* Update `MethodTable` reader.
* Update casting logic in the runtime.
* Update BCL (arrays, TypedReference, etc.)
* Update reflection stack: representation of the type, parsing metadata, invoke, field get/set
* Enable applicable tests.

Not implemented yet: the modified type stuff, runtime type loader support.
MichalStrehovsky added a commit that referenced this issue Apr 20, 2023
Implements function pointer type support in the compiler, runtime, and reflection stack.

Contributes to #71883.

* Introduce a new kind of `MethodTable` for function pointers in the compiler.
* Remove function pointer type blocking from various places in the compiler.
* Generate a new summary table so we can construct/deconstruct function pointer types at runtime.
* Update metadata format so that we can capture calling conventions and distinguish managed/unmanaged function pointers in metadata.
* Update `MethodTable` reader.
* Update casting logic in the runtime.
* Update BCL (arrays, TypedReference, etc.)
* Update reflection stack: representation of the type, parsing metadata, invoke, field get/set
* Enable applicable tests.

Not implemented yet: the modified type stuff, runtime type loader support.
MichalStrehovsky added a commit to MichalStrehovsky/runtime that referenced this issue Apr 28, 2023
Fixes dotnet#71883.

* Emit custom modifiers to the native metadata format
* Read custom modifiers at runtime
* Bugfix in the type loader
@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Apr 28, 2023
MichalStrehovsky added a commit that referenced this issue May 1, 2023
Fixes #71883.

* Emit custom modifiers to the native metadata format
* Read custom modifiers at runtime
* Bugfix in the type loader
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label May 1, 2023
@ghost ghost locked as resolved and limited conversation to collaborators May 31, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants