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

Make array types always represented as method tables. #25778

Closed
VSadov opened this issue Jul 18, 2019 · 2 comments
Closed

Make array types always represented as method tables. #25778

VSadov opened this issue Jul 18, 2019 · 2 comments
Assignees
Milestone

Comments

@VSadov
Copy link
Member

@VSadov VSadov commented Jul 18, 2019

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.
Another problem is that dual representation enables cases where representations may not match (i.e. in terms of element type), which could be a source of bugs.

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.
That approach is no longer in use (although there are still comments referring to that).

It feels like making array types always represented as unique method tables would be more consistent.

@danmosemsft

This comment has been minimized.

Copy link
Member

@danmosemsft danmosemsft commented Jul 18, 2019

We're trying to use a single area label to avoid double counting

@MichalStrehovsky MichalStrehovsky added this to the Future milestone Aug 8, 2019
@VSadov

This comment has been minimized.

Copy link
Member Author

@VSadov VSadov commented Jan 13, 2020

@VSadov VSadov closed this Jan 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.