Skip to content

Remove P/invoke marshalling pregeneration from ReadyToRun. #69758

Description

@teo-tsirpanis

https://github.com/dotnet/runtime/blob/4cc3808d9e3ad6a23fc8b0f1b167f532e9e2b067/docs/design/features/readytorun-pinvoke.md describes a mechanism where P/Invoke marshalling code for some common cases is generated ahead of time during ReadyToRun compilation.

Judging from the document this mechanism seems fragile and hard to maintain. Now that we have the LibraryImport source generator which is easier for ordinary R2R to take advantage of, this optimization is getting less relevant and maybe you should consider removing it for simplicity and ease of maintenance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-ReadyToRunblockedIssue/PR is blocked on something - see comments

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    Status
    No status

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions