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

Merge nmirror to master - #1572

Merged
MichalStrehovsky merged 15 commits into
masterfrom
nmirror
Jul 23, 2016
Merged

MichalStrehovsky merged 15 commits into
masterfrom
nmirror

Conversation

@jkotas

@jkotas jkotas commented Jul 23, 2016

Copy link
Copy Markdown
Member

No description provided.

Atsushi Kanamori and others added 15 commits July 20, 2016 08:58
- Remove a couple of trivial helpers that were inserted
  to make the job easier.

- Make CloneTypeArray() allocate an actual Type[] instead
  of returning EEType$$BLAH_BLAH_BLAH$$RuntimeTypeTemporary[].
  In theory, it shouldn't matter because of type invariance,
  but since we hand this out to api callers, there's
  no point in inviting trouble.

[tfs-changeset: 1618620]
- Remove a couple of trivial helpers that were inserted
  to make the job easier.

- Make CloneTypeArray() allocate an actual Type[] instead
  of returning EEType$$BLAH_BLAH_BLAH$$RuntimeTypeTemporary[].
  In theory, it shouldn't matter because of type invariance,
  but since we hand this out to api callers, there's
  no point in inviting trouble.

[tfs-changeset: 1618620]
- 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.
More Reflection Restoration Debt Cleanup
Call interceptors sit in between a caller and a callee adapting for different calling conventions or signatures. This will be used by interop in the future for adapting from a safe method signature to the unsafe(native) target and vice versa.

Support is currently limited to AMD64 since it only has the one calling convention.

[tfs-changeset: 1618845]
- Primary motivation was to get rid the
  "using S.R.R.Types" line. Why? Because I'm soon
  about to get rid of the last type in that
  namespace so I'd rather clean these up
  now so they don't obscure the real changes
  later.

- As long as I was here, I removed
  the Internal.Reflection.Core.NonPortable
  imports too since it's a 99% defunct
  namespace.
Remove unused namespace imports.
[tfs-changeset: 1618868]
We were no longer using it from Reflection.Core.
Make ReflectionCoreNonPortable.GetTypeForRuntimeTypeHandle nonpublic.
Background: Many moons ago, Reflection.Core was envisioned to
be an LMR-type library that that could instantiate multiple
"type universes" (aka ReflectionDomain) along with one special
domain known as the ExecutionDomain (the one that allows invocation.)

Reality: The support for domains other than the ExecutionDomain
was never demanded or finished so in reality, ReflectionDomain
is a singleton object but we're still passing it around all over
the place and storing it in objects "just in case" we finish the feature.
There still plenty of "todo's" in the code regarding this and it'll
be an ongoing tax and bit-rot as we add to the code. Since we don't
expect to need this feature, this commit cuts out all the plumbing
and overhead (both mental and runtime) associated with it.
Drop infrastructure for never-finished ReflectionDomain feature.
- g_mark_stack_busy should be declared as 'int*' instead of 'BOOL*'
- fix some unreferenced parameter errors when building server GC
- fix some code to use Interlocked / GCToEEInterface
- fix frozen_object_p for server GC
- add NumaNodeInfo / CPUGroupInfo shells with non-useful implementations

MRT changes for server GC

- Add RH_UseServerGC config setting
- Fix startup to init the GC to the right kind based on the config setting
- Fix GCToOSInterface::CreateThread to pass the right value to the stub thread

Build changes to stand up "mrt150.dll"

- Add a new DLL to the build, called mrt150.dll. This DLL is targeting win32 (not UWP-restricted) APIs, contains both WKS and SVR GCs, and statically links the CRT. This is just an initial prototype, so none of this is set in stone. This DLL can be tested by renaming it to mrt100_app.dll. :-)
- update the AddNutcExports.pl script to wrap any exports that get forwarded to the CRT in a macro. These macros change based on whether or not we're statically linking the CRT. If we are (i.e. mrt150.dll), they just export the API, if we aren't (i.e. mrt100_app.dll), then they forward to the correct CRT DLL.

I presume that Server GC isn't 100% configured correctly on PN, because this is the first time it has been run like this and there are still a bunch of #ifdef FEATURE_REDHAWK / CORECLR / etc. that haven't necessarily been rationalized against our desire to converge the configurations across runtimes.

[tfs-changeset: 1619005]
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.

6 participants