Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Make array types always represented as method tables. #25778
Currently array types can be represented by either a method table or by a TypeDesc.
It could be confusing since otherwise TypeDescs are only used for types that do not have method tables (method pointers, byref types, etc). Having arrays in that mix adds special cases.
Scenarios where we start from an instance, get a method table and then need to transition to TypeDesc seem unnatural as well.
The reason for all this is mostly historical - from times when array method tables could be shared between arrays of different element types while storing element type info in instances.
It feels like making array types always represented as unique method tables would be more consistent.