Skip to content
This repository has been archived by the owner on Nov 1, 2020. It is now read-only.

Implement TypedReference #367

Closed
MichalStrehovsky opened this issue Nov 21, 2015 · 7 comments
Closed

Implement TypedReference #367

MichalStrehovsky opened this issue Nov 21, 2015 · 7 comments
Assignees
Milestone

Comments

@MichalStrehovsky
Copy link
Member

Very low priority. Required for ECMA-335 completeness, but not in the .NET Core profile (for now or forever).

@AlexBHarley
Copy link

@MichalStrehovsky I'd like to look into this. Is there any chance you can give me a starting point for this?

@MichalStrehovsky
Copy link
Member Author

Thanks for volunteering!

I would defer to @jkotas whether it's worth investing into this right now though.

@jkotas
Copy link
Member

jkotas commented Feb 21, 2016

This is not needed for .NET Core. It would be only needed if we ever wanted to target full .NET Framework surface using the CoreRT compiler.

@jkotas
Copy link
Member

jkotas commented Feb 21, 2016

@AlexBHarley I have fixed up the UpForGrabs to make sure they are appropriate. Could you please take a look whether there is anything interesting? I would recommend starting with some items related to CppCodeGen because of it is easier to ramp up on it (e.g. #874 or #910 are good CppCodeGen workitems).

@MichalStrehovsky
Copy link
Member Author

As per dotnet/standard#20 this will be part of the .NET Standard. Exact prioritization TBD, but reopening.

@MichalStrehovsky
Copy link
Member Author

MichalStrehovsky commented Mar 15, 2017

The type was recently added to CoreLib. What we'll need to do:

  • Move the type to the proper namespace under #if CORERT ifdef.
  • Update the compiler to parse ELEMENT_TYPE_TYPEDBYREF
  • Add a new rare flag to EEType (IsByRefLike) and set it for TypedReference
  • Block TypedReference from entering places where CoreCLR blocks byref-like types (e.g. Activator.CreateInstance, GetUninitializedObject, Array.CreateInstance etc.)
  • Unblock the TypedReference tests in CoreCLR.issues.targets

@MichalStrehovsky MichalStrehovsky self-assigned this Mar 15, 2017
@MichalStrehovsky
Copy link
Member Author

Eh, I'll just do it now.

MichalStrehovsky added a commit that referenced this issue Mar 23, 2017
This is basically three things:

1. `ByReference<T>` support
2. General support infra in the type system for Byref-like types (to be
reused for e.g. `Span<T>`).
3. TypedReference

Fixes #367.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants