Skip to content

[NativeAOT] don't generate __GetFieldHelper if struct is never boxed? #111544

Closed
@NinoFloris

Description

@NinoFloris

I'm unsure how feasible this is but it would be helpful if the helper isn't emitted if the struct is never boxed (and never gets a constrained call on Equals/GetHashCode either).

I understand the difficulty of tracking whether a struct is 'boxed', as generics (and (T)(object)value casts etc) significantly complicate the analysis. Though with struct types forcing specialization it should not be impossible to get some certainty?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    No status

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions