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

More Reflection Restoration Debt Cleanup - #1561

Merged
1 commit merged into
nmirrorfrom
unknown repository
Jul 21, 2016
Merged

1 commit merged into
nmirrorfrom
unknown repository

Conversation

@ghost

@ghost ghost commented Jul 21, 2016

Copy link
Copy Markdown
  • We don't need ReflectionTrace support in CoreLib anymore
    since we've moved the Reflection implementation out of
    CoreLib.

  • Move the partial class declarations for RuntimeXTypeInfo
    out of Dispensers.cs and into TypeUnifier.cs. These dispensers
    are now governed under a stricter set of rules (reference
    equality == semantic equality) than the others so it's
    misleading to group them with the others.

  • Cleaned out some dead code and removed some now unnecessary
    Type/TypeInfo conversions.

  • Renamed GetRuntimeTypeInfo to the more apt
    CastToRuntimeTypeInfo() and removed the generic
    parameter as I don't want to encourage using
    specific RuntimeTypeInfo types as exchange
    types.

    We are still left with CastToRuntimeNamedTypeInfo() as
    RuntimeNamedTypeInfo is a widely used exchange type.
    I'd like to get away from this too as RuntimeNamedTypeInfo
    conflates two ideas:

    • Has a .Net Native metadata TypeHandle available
      (i.e. no MissingMetadataException)
    • Is not IsArray/IsByRef/IsPointer/IsConstructedGenericType/
      IsGenericParameter.

    Unfortunately, these two sets are not identical and
    haven't been for some time, and it may cause problems
    for us later if we have to restore the ugly desktop behavior
    of representing generic typedefs as if they were
    generic instantations closed over the open generic parameters.

    This is, however, a bigger chunk than I want to bite off
    in this commit.

- We don't need ReflectionTrace support in CoreLib anymore
  since we've moved the Reflection implementation out of
  CoreLib.

- Move the partial class declarations for RuntimeXTypeInfo
  out of Dispensers.cs and into TypeUnifier.cs. These dispensers
  are now governed under a stricter set of rules (reference
  equality == semantic equality) than the others so it's
  misleading to group them with the others.

- Cleaned out some dead code and removed some now unnecessary
  Type/TypeInfo conversions.

- Renamed GetRuntimeTypeInfo<R> to the more apt
  CastToRuntimeTypeInfo() and removed the generic
  parameter as I don't want to encourage using
  specific RuntimeTypeInfo types as exchange
  types.

  We are still left with CastToRuntimeNamedTypeInfo() as
  RuntimeNamedTypeInfo is a widely used exchange type.
  I'd like to get away from this too as RuntimeNamedTypeInfo
  conflates two ideas:

    - Has a .Net Native metadata TypeHandle available
      (i.e. no MissingMetadataException)

    - Is not IsArray/IsByRef/IsPointer/IsConstructedGenericType/
        IsGenericParameter.

  Unfortunately, these two sets are not identical and
  haven't been for some time, and it may cause problems
  for us later if we have to restore the ugly desktop behavior
  of representing generic typedefs as if they were
  generic instantations closed over the open generic parameters.

  This is, however, a bigger chunk than I want to bite off
  in this commit.
@ghost
ghost merged commit 5edacec into dotnet:nmirror Jul 21, 2016
@ghost
ghost deleted the moredebt branch July 27, 2016 21:01
This pull request was closed.
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.

1 participant