Skip to content
This repository was archived by the owner on Nov 13, 2026. It is now read-only.

Implement non-varg new multi-dimensional array helper - #1366

Merged
jkotas merged 2 commits into
dotnet:masterfrom
jkotas:newmdarray
Jun 6, 2016
Merged

jkotas merged 2 commits into
dotnet:masterfrom
jkotas:newmdarray

Conversation

@jkotas

@jkotas jkotas commented Jun 4, 2016

Copy link
Copy Markdown
Member

No description provided.

@jkotas

jkotas commented Jun 4, 2016

Copy link
Copy Markdown
Member Author

@MichalStrehovsky PTLA

Debug.Assert(eeType.IsArray);
Debug.Assert(nDimensions > 0);

if (eeType.IsSzArray)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does this need to handle SzArrays? The logic to allocate jagged arrays is a bit weird. Who relies on that?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Jagged SzArrays have synthetic constructors as well - they are synthetized (here)[ https://github.com/dotnet/corert/blob/master/src/Common/src/TypeSystem/Common/ArrayType.cs#L80].

E.g. Run the following on full framework or CoreCLR:

foreach (var c in typeof(int[][][]).GetConstructors()) Console.WriteLine(c);

Result:

Void .ctor(Int32)
Void .ctor(Int32, Int32)
Void .ctor(Int32, Int32, Int32)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will add some comments about this.

@jkotas

jkotas commented Jun 4, 2016

Copy link
Copy Markdown
Member Author

@dotnet-bot test Windows_NT Debug please

@MichalStrehovsky

Copy link
Copy Markdown
Member

LGTM

@jkotas
jkotas merged commit f8479a9 into dotnet:master Jun 6, 2016
@jkotas
jkotas deleted the newmdarray branch June 6, 2016 07:38
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants