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

Merge Master to NMirror - #1514

Merged
MichalStrehovsky merged 36 commits into
nmirrorfrom
master
Jul 13, 2016
Merged

MichalStrehovsky merged 36 commits into
nmirrorfrom
master

Conversation

@MichalStrehovsky

Copy link
Copy Markdown
Member

Testing: x86ret build+precheckin, amd64chk build only

A-And and others added 30 commits July 5, 2016 20:05
Fixes issue where building would fail in directory with space in its path.
This is the initial stab at documenting the contract that the framework class library code need to adhere to for the diagnostics tools to work properly.
* `CORINFO_FLG_SHAREDINST` will come later this week/next week.
* `CORINFO_FLG_HAS_FINALIZER` is nowhere to be seen so I assume it was
removed at some point
* Implement HAS_VARIANCE.
* Remove CORINFO_FLG_GENERIC_TYPE_VARIABLE and put a TODO about verifier
The direct call into the algorithm from `RuntimeDeterminedTypeUtilities`
was making it difficult to turn shared generics on/off from a central
location.

Also moving an assert that was checking things too early.
Move things around so that we have the same structure/ordering as
CoreCLR for easier diffing.
A set of uncontroversial changes towards shared generics
Exception is likely to contain more useful data.
Restricting this to generic definitions is incorrect. We need this for
typeof() to work.
The current implementation calls `string.Concat(object, object)`, which
results in an `int` box allocation.

Avoid the box allocation by calling `int.ToString()`, allowing
`string.Concat(string, string)` to be used.
These intrinsics support functionality in:

* Delegate.DynamicInvoke
* MethodInfo.Invoke
* Calling convention converter

I had to make the DynamicInvokeParamHelper intrinsic a StubMethod
because the declaration of the intrinsic can't be expressed in C#
(needs ByRef returns). This can be converted to a real intrinsic
when we switch to C# 7.

.NET Native for UWP does IL rewriting to make the return type match.
This is implemented with a new thunk that calls into InvokeUtils
intrinsics to set up the callsite, unbox arguments, and replace default
values in the signature.

I'm not implementing the LoadDefaultValueString() override, so default
value in the delegate signature are not supported yet. This code is
undergoing changes on the TFS side right now.
This has three logical parts (separated in three commits):

* Implement `InvokeUtils` intrinsics. This is a general purpose dynamic invoke support class used by `Delegate.DynamicInvoke`, `MethodInfo.Invoke`, and the calling convention converter (not in the repo yet)
* Implement the dynamic invocation delegate thunk
* Add tests
The current implementation calls `string.Concat(object[])`, which
results in an unnecessary `uint` box allocation along with an
`object[]` array allocation.

These allocations can be avoided by calling `uint.ToString()`, allowing
`string.Concat(string, string, string, string)` to be used.
Also:
* Add the helpers used with generic handle lookup cases to the enum
* Add `ReadyToRunFixupKind`
Pass `StringComparison.Ordinal` to `StartsWith`, otherwise the
comparison will be done using the current culture.
* Port the code from `eetype.inl`
* Make `GenericVariance` a shared enum and use it within the compiler
where we mean it.
Match up what we emit with what EEType.cs expects.
Existing logic would say `true` for generic definition EETypes with
arity 2.

Not that anyone would care, since this is not used anywhere.
Expose generic composition details on EETypePtr
Fixes around generic defintion EETypes
- Type hashcodes shouldn't be dependent on current culture
- ToString behavior in type system shouldn't be dependent on current culture
SignatureVariables
- Specific canonicalization will pass the type through
- Universal canonicalization will convert to UniversalCanon
And avoid null ref if GetCommandLineArgs is called without SetCommandLineArgs having been called.
MichalStrehovsky and others added 6 commits July 11, 2016 09:40
* Improve flexibility of gc static base computation
- Move extension point for computing HasGCStaticBase from an override of the method on FieldDesc, to a function on the TypeSystemContext
- Will allow runtime specific determination of rules for where static variables are stored
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.

9 participants