This repository was archived by the owner on Nov 1, 2020. It is now read-only.
Add support for arrays of pointer types#3192
Merged
MichalStrehovsky merged 1 commit intodotnet:masterfrom Apr 4, 2017
Merged
Conversation
Progress towards dotnet/corefx#17480. On the compiler side: * Unblock generation of arrays of pointer EETypes. We were already doing the right thing w.r.t. the interface lists (these *do not* implement the generic interface: `int*[]` does not implement `IEnumerable<int*>`). Nothing else was missing. On the classlib side: * I groveled through the places where we would box/unbox array element types, or assume that if the element type is not a value type, it's a reference type. Hopefully, I didn't miss anything. * I pre-emptively fixed dotnet/coreclr#10646 in my implementation of `Array.Copy`. On the runtime side: * I verified this doesn't affect casting (i.e. we don't allow casting `uint*[]` to `int*[]`), so no changes should be needed.
Member
Author
|
@davidwrighton PTAL. The code paths that reach the type loader still have a |
davidwrighton
approved these changes
Apr 4, 2017
Member
davidwrighton
left a comment
There was a problem hiding this comment.
This looks good. For the followon change to make the dynamic type loader work, you should look at how multidimensional arrays are generated, not normal arrays. (MDArrays and Pointer arrays both don't need code/interfaces, so the patterns of generation are similar.)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Progress towards dotnet/corefx#17480.
On the compiler side:
the right thing w.r.t. the interface lists (these do not implement the
generic interface:
int*[]does not implementIEnumerable<int*>).Nothing else was missing.
On the classlib side:
types, or assume that if the element type is not a value type, it's a
reference type. Hopefully, I didn't miss anything.
GCHandleValidatePinnedObject,but it seems like CoreCLR has this missing too and you can't get a pinned
handle to an array of pointers...
Array.Copy.On the runtime side:
uint*[]toint*[]), so no changes should be needed.