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

Implement type check for multidim Array:Set - #847

Merged
jkotas merged 1 commit into
dotnet:masterfrom
MichalStrehovsky:arrayTypeCheck
Feb 10, 2016
Merged

jkotas merged 1 commit into
dotnet:masterfrom
MichalStrehovsky:arrayTypeCheck

Conversation

@MichalStrehovsky

Copy link
Copy Markdown
Member

Puts us one step closer to finishing #89.

Puts us one step closer to finishing dotnet#89.
@MichalStrehovsky

Copy link
Copy Markdown
Member Author

Array::Address is still a TODO. I couldn't find a nice way to find out the type on which the method is getting called. CoreCLR pulls some shenanigans with some hidden param; I would implement it through an LDTOKEN, but the new definition of RuntimeTypeHandle on CoreRT makes that slow/annoying. Leaving it as a TODO for someone to figure out...

@jkotas PTAL

@jkotas

jkotas commented Feb 10, 2016

Copy link
Copy Markdown
Member

LGTM

jkotas added a commit that referenced this pull request Feb 10, 2016
Implement type check for multidim Array:Set
@jkotas
jkotas merged commit 08f216f into dotnet:master Feb 10, 2016
@jkotas

jkotas commented Feb 10, 2016

Copy link
Copy Markdown
Member

I would implement it through an LDTOKEN

This would be a good way to do it:

  • Make RuntimeTypeHandle.RawValue to be recognized as CORINFO_INTRINSIC_RTH_GetValueInternal intrinsic
  • The JIT will pattern match "ldtoken + RawValue" to just EEType* (when optimizations are on)

This will work for now, but it will need to be updated for shared generics. We may try to make the hidden param here to be treated just as an ordinary generics hidden param once we get there - it may be a net improvement in amount of special casing required.

@MichalStrehovsky
MichalStrehovsky deleted the arrayTypeCheck branch February 11, 2016 07:29
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