summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2018-12-10Add support for RVA fields to crossgen/R2R (#21463)Jan Kotas2-4/+45
* Add support for RVA fields to crossgen/R2R RVA fields are became more common with pre-inititialized ReadOnlySpan<byte>. Fix crossgen to deal with them for R2R. * Fix tests, map new JIT helper for R2R
2018-12-10Fix for #21456 (Regressions in attribute allocations for non-generic ↵Nick Craver1-1/+9
attributes) (#21462) * Fix for #21456 - restrict increased generic attribute allocations to only generic attributes This is a trivial quick-fix for #21456 where regressions between 2.1 and 3.0 were discovered on most attibute pathways due to the allocation overhead in the generic-supporting pathways. The workaround is to simply not take that slow/expensive path for non-generics. While I'd like to optimize `RuntimeModule.ResolveMethod` further, there's a public surface area in play there that makes the changes non-trivial. There, we'll have to choose overhead on the public path (which may still be a net win), or duplication in code for another path. * Update comments
2018-12-10Delete vm/context.* (#21459)Jan Kotas30-1254/+63
* Delete vm/context.* Leftover from remoting
2018-12-10Added Close On Exec Attribute for Mutex files (#21455) (#21458)Oded Hanson1-0/+2
* Added Close On Exec Attribute for mutex files (#21455)
2018-12-10Fixed bug where "DCI_NUMA" was missing from debug channel names (#21454) ↵Oded Hanson2-0/+7
(#21457) In additional to adding "DCI_NUMA" to dbg_channel_names, a static assertion was added to verify that dbg_channel_names length is valid. Also added some comments to help developpers not to forget to add corresponding entries in dbg_channel_names. FIxes #21454
2018-12-08Fix regression in fat calls (#21446)Michal Strehovský1-1/+1
This seems to fix an AV in RyuJIT.
2018-12-08Leap Seconds Support (#21420)Tarek Mahmoud Sayed11-110/+531
* Leap Seconds Support * Address Feedback * More feedback addressing
2018-12-08Remove `TryGetGuid()` and `GetDefaultInterfaceForCoclass()` from the (#21447)Aaron Robinson2-111/+53
* Remove `TryGetGuid()` and `GetDefaultInterfaceForCoclass()` from the stdinterfaces API surface.
2018-12-07Use string.Create in ConvertFromUtf32 (#21409)Stephen Toub3-21/+21
* Use string.Create in ConvertFromUtf32 Removes the unsafe code from the method. Also happens to make it a bit faster. * Improve Rune.ToString performance
2018-12-07Remove some unnecessary spinning (#21437)Stephen Toub2-19/+18
Most of the use of SpinWait in CoreLib involves waiting for some short-lived operation to complete on another thread, in which case the spinning thread should backoff as it's unable to make forward progress until the other operation completes. In a few cases, however, SpinWait is being used just around CompareExchange operations, such that at least one thread running this code path is guaranteed to make forward progress, and the backoff in the spinning doesn't actually help (in theory it could help to reduce contention if lots of threads were all trying to CompareExchange concurrently, but in such cases you'd actually want more randomized backoff, as otherwise it's likely all the threads would re-attempt at around the same time and similarly re-encounter contention).
2018-12-07Moving various Vector128/256 helper method to be implemented using other ↵Tanner Gooding5-354/+1132
intrinsics (#21432) * Updating Vector128.CreateScalar and Vector256.CreateScalar to be implemented using other intrinsics * Updating Vector128.Equals and Vector256.Equals to be implemented using other intrinsics * Updating Vector256.WithLower, Vector256.GetUpper, and Vector256.WithUpper to be implemented using other intrinsics * Updating Vector128.Create(T) and Vector256.Create(T) to be implemented using other intrinsics * Fixing the `NI_Base_Vector256_As` intrinsics to only fold the cast if AVX is supported and add a clarifying comment to the Vector128/256.Equals code * Changing the various `*Software()` local functions in Vector128/256 to be `SoftwareFallback()`
2018-12-07Add support for loading registered TLBs (#21430)Aaron Robinson11-66/+170
* Add support for loading registered TLBs
2018-12-07Build Microsoft.NET.Sdk.IL in source-buildDavis Goodin1-0/+3
2018-12-07Adding a note to the genBaseIntrinsic function header about operand ↵Tanner Gooding1-0/+3
assumptions (#21439)
2018-12-07Fix some SOS commands after SharedDomain removal (#21401)Jan Vorlicek2-26/+58
The recent removal of SharedDomain has broken some SOS commands, like Name2EE or bpmd. There was a code that was enumerating domains and obtaining some information on them. And the shared domain pointer from DacpAppDomainStoreData was being included in the list of domains. As it is NULL now, we have failed to get the information and the domain iteration loop was exited prematurely. I have made SOS resilient to the possibility of missing shared domain. On older runtimes, the shared domain is still being reported.
2018-12-07Add CancellationToken parameter to GetAsyncEnumerator (#21397)Stephen Toub2-3/+7
2018-12-07Factor new AsyncIteratorStateMachineAttribute into ↵Stephen Toub1-1/+1
TryResolveStateMachineMethod (#21396)
2018-12-07Add PNSE implementations of unsupported built-in custom marshalers to enable ↵Jeremy Koritzinsky4-0/+102
good error messages on PIAs that could possibly directly use them. (#21429)
2018-12-07Fix Microsoft.IO.Redist compilation string.Create compilation failureStephen Toub1-2/+8
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
2018-12-07Merge pull request #21431 from fiigii/fixbmiCarol Eidt1-0/+6
Fix a bug that disabled Bmi1/2.X64
2018-12-07Work around an MCG bug (dotnet/corert#6658)Michal Strehovský1-0/+2
This is blocking TFS integrations. Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
2018-12-07Fix SOS thread statics display (#21426)Jan Vorlicek1-23/+0
I've noticed that when dumping an object with thread locals using SOS dumpobj command, I never get the thread locals. I've stepped through the code in SOS that displays thread statics and found that for some strange reason, it dismisses threads where DomainLocalModule doesn't have "initialized" flag set for the given class. However, when runtime accesses thread statics, it just checks "allocated" flag set for the given class in the ThreadLocalModule. Removing the extra check for DomainLocalModule fixed the problem and now thread statics are displayed properly.
2018-12-07JIT: block general cloning of candidate calls (#21418)Andy Ayers3-87/+159
Follow-up from #21270 and #21414. Block general cloning from inadvertently cloning a candidate call. Add a separate path for cloning calls that are inline and guarded devirtualization candidates for use by guarded devirtualization. Callers need to take extra steps after cloning one of these calls to properly fix everything up. Also fix up some issues in the large comment for the fat calli transformation.
2018-12-06Fix a bug that disabled Bmi1/2.X64Fei Peng1-0/+6
2018-12-06Moving CreateScalarUnsafe, ToScalar, Vector128.ToVector256Unsafe, and ↵Tanner Gooding9-25/+349
Vector256.GetLower to be intrinsics (#21351) * Moving CreateScalarUnsafe, ToScalar, Vector128.ToVector256Unsafe, and Vector256.GetLower to be intrinsics * Adding containment support to the helper intrinsics
2018-12-06Merge pull request #21314 from CarolEidt/DontPromoteHwVectorCarol Eidt2-1/+27
Don't struct-promote opaque vectors
2018-12-06Use Span instead of manual copy in MetadataImport.GetUserString (#21405)Stephen Toub1-14/+3
* Use Span instead of manual copy in MetadataImport.GetUserString * Address PR feedback
2018-12-06Remove char[] allocation from EventPipePayloadDecoder for strings (#21407)Stephen Toub1-8/+2
2018-12-06Use string.Create in Path.GetRandomFilePath (#21410)Stephen Toub1-28/+23
* Use string.Create in Path.GetRandomFilePath Removes a good chunk of the unsafe code. * Address PR feedback
2018-12-06JIT: move indirect call transformations to a new source file (#21414)Andy Ayers4-831/+841
Follow-up from a review comment in #21270.
2018-12-06Replace a few new string(char, 1) with char.ToString(char) (#21406)Stephen Toub3-4/+4
Slightly cleaner, slightly faster.
2018-12-06Fix CancellationTokenRegistration.Token after CTS.Dispose (#21394)Stephen Toub1-1/+10
CTR.Token should never throw, but it's currently throwing an ObjectDisposedException if the associated CancellationTokenSource has been disposed.
2018-12-06Port CustomMarshalers.dll to C# and .NET Core (#21343)Jeremy Koritzinsky19-32/+483
* Import CustomMarshalers from corefx PR. * Add tests for marshalling IEnumerator and IEnumerable using the System.Runtime.InteropServices.CustomMarshalers. * Verify that the marshaller is used in the managed -> native direction in the tests. * Remove #if's * PR Feedback. * Move ComHelpers.h into interop common headers. * Add some template machinery to ensure that we don't accidentally pass in an incorrect type into DoQueryInterface. * Add VariantClear * Make marshalers internal and root them in ILLinkTrim.xml * Revert enable-if machinery. * Add tests for the pass-through unwrapping done by the EnumeratorToEnumVariantMarshaler. * Remove some of my helper code. * Added todo about exposing EnumerableToDispatchMarshaler. * PR Feedback. * Removed the last placement new. * Use the runtime hooks to enable us to not have to publically expose the custom marshalers. * Remove out of date comments.
2018-12-06Guarded devirtualization foundations (#21270)Andy Ayers11-249/+1109
Lay the groundwork for guarded devirtualization of virtual and interface calls in the jit. Introduce the notion of a guarded devirtualization candidate and identify these if regular devirtualization fails. Use simple heuristics to produce a class to guess for. Require that the method that would be invoked if the class guess is correct be a plausible inline candidate. Generalize the calli transformer to become an indirect call transformer. This runs after importation because it needs to introduce control flow and runs before inlining so that the new direct calls it introduces can be inlined. Implement the transformation to duplicate the call site, devirtualize on the side where the class is now known exactly, and turn the resulting direct call into an inline candidate. Add a motivation and design document.
2018-12-05Delete FEATURE_TREAT_NI_AS_MSIL_DURING_DIAGNOSTICS (#21387)Jan Kotas5-47/+5
Always defined in .NET Core
2018-12-06Disable native image usage for collectible assemblies (#21378)Jan Vorlicek3-10/+15
* Disable native image usage for collectible assemblies There are couple of issues with using native images as collectible assemblies. The most important one is that statics handling is different for collectible and non-collectible classes. Collectible classes have statics stored in per class allocated blocks while the non-collectible ones are all stored per module. So the code that accesses them needs to use different offsets relative to a statics base address in each of these cases. The crossgen generates just a single form of code that corresponds to the non-collectible case and so such code cannot be used when a module is loaded as collectible. To mitigate that, we disable using the native code from crossgen-ed assemblies and JIT all the code instead. We may want to revisit this in the future and e.g. unify the statics handling for collectible and non-collectible classes.
2018-12-05Refactor genAllocLclFrame into two architecture-specific functions (#21074)Egor Chesakov3-285/+316
2018-12-05Merge pull request #21322 from mikedn/div-small-intBrian Sullivan2-31/+25
Fix lclvar "cloning" in const division lowering
2018-12-05Remove FromGAC & OnTPAList (#21371)Steve MacLean11-182/+40
* Remove FromGAC & OnTPAList * PR feedback
2018-12-05Revert Array enumerator behavior change (#21368)Jan Kotas1-7/+6
Fixes #21046
2018-12-04Fix XML comments on *nux (#21372)Steve MacLean2-2/+2
2018-12-04Merge pull request #21313 from stephentoub/asynciteratorattrStephen Toub2-0/+19
Add AsyncIteratorStateMachineAttribute
2018-12-04Improve BMI2 MultiplyNoFlags APIs (#21362)Fei Peng2-4/+38
2018-12-04Merge pull request #21356 from stephentoub/xmlcommentsStephen Toub48-522/+434
Fix lots of malformed XML comments
2018-12-04Delete dead code in Task<T>Stephen Toub1-70/+0
2018-12-04Enable building/validating XML comments in CoreLibStephen Toub1-1/+2
2018-12-04Fix lots of malformed XML commentsStephen Toub47-452/+433
These are causing errors in the source.dot.net build. Turning on DocumentationFile and suppressing 1591, 1573, and 0419, Corelib builds clean after these changes.
2018-12-04Fixing the Vector64/128/256<T>.ToString(string) methods to pass `null` for ↵Tanner Gooding3-3/+3
the formatProvider (#21350)
2018-12-03Remove *LoadContextHostBinder (#21342)Steve MacLean4-138/+1
2018-12-03Sort System.Private.CoreLib.csprojJan Kotas1-293/+233