Skip to content

Harden Intrinsic Reflection API Matching #1623

@eerhardt

Description

@eerhardt

When dotnet/runtime adds new Reflection APIs (or adds overloads to existing APIs), it is possible that the new API / overload may break the ILLinker. An example of this is #1621.

Today, we the ILLinker does a basic test for intrinsic Reflection APIs:

https://github.com/mono/linker/blob/d8cbe373195ed3fc727d12d12eb5923b188a7990/src/linker/Linker.Dataflow/ReflectionMethodBodyScanner.cs#L326-L346

As long as the method is on System.Type and named GetConstructor (or named GetMethod and has a string as a first parameter), the ILLinker will treat the method as "intrinsic".

We should make sure this intrinsic handling works as dotnet/runtime adds new APIs and overloads to System.Type.

cc @vitek-karas

Metadata

Metadata

Assignees

Type

No type

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions