Skip to content

CoreCLR Interpreter - Shared generics support #116395

Closed

Description

@davidwrighton

Basic shared generics support will be in once PR #116357 is merged, but there remain a number of additional issues

  • Support for box with a generic type which varies by type parameter
  • Support for unbox.any with a generic type which varies by type parameter
  • Support for isinst with a generic type which varies by type parameter
  • Support for castclass with a generic type which varies by type parameter
  • Support for static fields on a type which varies by type parameter
  • Support for callvirt fallback to ldvirtftn behavior, will probably require adding support for the ldvirtftn opcode + calli opcode
  • Support for constrained calls to classes
  • Support for constrained calls to static virtual methods defined on classes. will probably require adding support for the calli opcode
  • Support for IL stub implementations of unboxing/unboxing and instantiating helpers
  • Support for constrained dispatch to structs from generic code, particularly with shared generics involved. Will involve respecting the CORINFO_THIS_TRANSFORM returned from getCallInfo
  • Handling of catch of a generic where which generic is dependent on the context argument to the method

Activity

  1. added
    needs-area-labelAn area label is needed to ensure this gets routed to the appropriate area owners
    on Jun 6, 2025
  2. dotnet-policy-service commented on Jun 6, 2025

    @dotnet-policy-service
    Contributor

    Tagging subscribers to this area: @BrzVlad, @janvorli, @kg
    See info in area-owners.md if you want to be subscribed.

  3. EgorBo commented on Jun 6, 2025

    @EgorBo
    Member

    Does the Catch clause (EH) with Exception requiring runtime lookup need to be in the list too? (catch (MyException<T> exc))

  4. removed
    needs-area-labelAn area label is needed to ensure this gets routed to the appropriate area owners
    on Jun 7, 2025
  5. added this to the 11.0.0 milestone on Jun 30, 2025
  6. removed
    untriagedNew issue has not been triaged by the area owner
    on Jul 8, 2025
  7. davidwrighton commented on Aug 13, 2025

    @davidwrighton
    MemberAuthor

    @EgorBo yes, we need to handle that, I'm surprised it hasn't come up in testing, but ... we'll get to it.

  8. locked and limited conversation to collaborators on Oct 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions