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

Support Generic Types #466

Open
drcjt opened this issue Feb 18, 2024 · 0 comments
Open

Support Generic Types #466

drcjt opened this issue Feb 18, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@drcjt
Copy link
Owner

drcjt commented Feb 18, 2024

There is already support for generic virtual methods but no proper support for generic types e.g. List
Main motivation here is to have sufficient support of generic types for Spans to work e.g. Span as these will be beneficial in the runtime code and may open up the possibility of utf-8 string support.

Out of scope:

  • Generic Interface Types
  • Recursive generic types
  • Anything that would require types to be determined at runtime - no intention of supporting reflection here.

Initial investigation has highlighted following issues:

  • Layout algorithm does not work for open types.
  • Importer is expecting IL that does not involve type parameters

Do we resolve these issues by turning open types into closed types e.g. if we have a GenericInstSig then build a fully instantiated TypeDef from the generic arguments and type def in the generic instance type, or alter the existing code to deal with GenericInstSigs?? Note the layout algorithm expects TypeDef currently.

These links might be useful

For the ILimporter do we instantiate the IL prior to the importing, effectively replacing type parameters by the known arguments for the instantiation?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant