Repository navigation
Add support for array interfaces - #927
Conversation
|
@jkotas @davidwrighton @nattress PTAL I was basically just hacking on it until it worked. Hence the [WIP] tag on the pull request. |
| pResult.lookup.constLookup.handle = (CORINFO_GENERIC_STRUCT_*)ObjectToHandle(_compilation.NodeFactory.NecessaryTypeSymbol(td)); | ||
| if (td.IsArray && !td.IsSzArray) | ||
| { | ||
| // TODO: figure out how JIT can tell us that this call to embedGenericHandle |
There was a problem hiding this comment.
This should be a new CORINFO_TOKENKIND_XXX flag
There was a problem hiding this comment.
Should I file a RyuJIT issue after this is merged?
There was a problem hiding this comment.
Having a tracking issue to clean things up never hurts.
I have created dotnet/coreclr#3341 with the required change.
0533ee4 to
d290ca3
Compare
| return type.BaseType; | ||
| // The implementation for this should mirror GetClosestMetadataType | ||
| throw new NotImplementedException(); | ||
| } |
There was a problem hiding this comment.
If we're going to just throw NotImplementedException here, perhaps this function shouldn't exist. Are there users of this api?
db7c60b to
60c6e0e
Compare
|
I addressed the original concern of common type system knowing about ArrayOfT by moving GetClosestMetadataType to the compiler. |
* `GetClosestMetadataType` type was one of the methods we ported from NUTC. In NUTC, it takes advantage of arrays having `System.Array<T>` as their base type. The CoreRT type system derives arrays off `System.Array`. The implementation of `GetClosestMetadataType` needed tweaking. * `Use GetClosestMedatadataType` where appropriate * Be more rigorous at tracking constructed arrays. * Runtime workaround to make EEType::GetArrayBaseType work.
60c6e0e to
988b170
Compare
|
LGTM |
Add support for array interfaces
GetClosestMetadataTypetype was one of the methods we ported fromNUTC. In NUTC, it takes advantage of arrays having
System.Array<T>as their base type. The CoreRT type systemderives arrays off
System.Array. The implementation ofGetClosestMetadataTypeneeded tweaking.GetClosestMedatadataTypewhere appropriateFixes #915.