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

Move MemberInfo to shared partition#2980

Merged
1 commit merged intonmirrorfrom
unknown repository
Mar 15, 2017
Merged

Move MemberInfo to shared partition#2980
1 commit merged intonmirrorfrom
unknown repository

Conversation

@ghost
Copy link
Copy Markdown

@ghost ghost commented Mar 15, 2017

There are really two easy changes here, just
to reduce CR overhead.

There are really two easy changes here, just
to reduce CR overhead.

- CoreRt side of dotnet/coreclr#10167

- Now that we have the shiny new IsConstructedGenericType
  api, let's use it...
@ghost ghost merged commit 9e71c55 into dotnet:nmirror Mar 15, 2017
@ghost
Copy link
Copy Markdown
Author

ghost commented Mar 15, 2017

Eh... pasted in the wrong commit text file. This was what it was supposed to be. I supposed I can fix in TFS before it gets merged to master. (Update: nope - don't seem to have permissions to alter changeset descriptions.)

Title:

 Implement TypedReference, FieldInfo.Get/SetValueDirect

Change Description:

 Notes:
  • This does not include .Net Native support for the mkrefany/reftype/refvalue
    CIL instructions. (due to costing at this time.) This work
    is being done to unblock BinaryFormatter and other Reflection-related
    scenarios.

  • At this time, the .Net Native toolchain cannot handle signatures with
    ELEMENT_TYPE_TYPEDBYREF. To work around this, TypedReference
    is intentionally placed in the wrong namespace
    (System.Reflection rather than System.)
    This allows us to do private testing (provided
    you build the test directly against CoreLib.dll)
    and not block this rather large commit on the toolchain work
    as that's not expected to happen imminently.

    • ByReference<> is broken right now and a fix isn't going to come around
      for a few weeks. So we added a private ByReferenceOfByte imposter
      that let's the rest of code think it's talking to a ByReference<>.
  • Cleaned up the FieldAccessor type hierarchy to better
    support this change:

    LiteralFieldAccessor now derives from StaticAccessor.

    All the types that used to derive from StaticAccessor
    now derive from WritableStaticAccessor (comprises
    all static fields that aren't literals - this
    captures the fact that LiteralFieldAccessor is
    the only static field that doesn't call
    CheckArgument()).

    Hoisted the CheckArgument() calls into one place
    rather than in six. Aside from DRY, SetFieldDirect()
    on static fields needs to call the underlying UncheckedSet helpers
    while calling a different CheckArgument(). (Yay, consistency.)

    Removed the "obj" argument from the StaticFieldAccessor
    descendent's helpers. The fields are static, after all -
    the "obj" argument is vacuous and unused.

@ghost ghost deleted the tr branch March 18, 2017 14:54
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