summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2019-01-11Enable returning more complex structures via PInvoke returns. (#21470)Jeremy Koritzinsky3-45/+30
* Add test verifying behavior in dotnet/coreclr#19676. * Clean up test code. * Test what happens if we enable returning structures by value. * Use braced initializer. * Update Decimal tests to expect that returning a decimal by LPStruct or Currency works. * Change handle-in-struct marshalling to expect a NotSupportedException thrown at marshal time instead of expecting a MarshalDirectiveException at signature time. * Update Decimal Reverse-PInvoke tests. * Disable some previously disabled return marshalling types and add a nice comment block explaining why they're disabled. * Enable marshalling DateTime return values and add a test. * Rename IsUnuspportedValueTypeReturn * Add return test for ArrayWithOffset * Remove extraneous P/Invoke. * Fix spelling. * Add test for successfully returning a struct that has one field of a type that is return-type blocked. * Add explicit struct return test. * Clean up tests. * Fix grammer. * Add test for struct whose managed layout doesn't require a stdcall return buffer but whose native layout does. * Add test verifying HandleRef behavior. * Clean up IsUnsupportedTypedefReturn per PR feedback.
2019-01-11Flowing the nativeCodeVersion to DebuggerJitInfo (#21925)Andrew Au14-82/+98
2019-01-11Add cleanup of the TypeIDMap at unload time (#21943)Jan Vorlicek5-0/+60
The TypeIDMap is stored in the AppDomain and contains two hash maps - id to MethodTable and MethodTable to id. We were missing removing entries for MethodTables that belong to a LoaderAllocator that's being destroyed. Thus we were leaking some memory, but also causing potential issue. When at some point after the LoaderAllocator destruction a MethodTable gets the same address as one of the MethodTables that was destroyed in the past and was also recorded in the TypeIDMap, we would incorrectly reuse the id. That is problematic in case the old MethodTable didn't require fat id and the new does or vice versa. I've hit assert due to that while running System.Numerics.Vectors.Tests inside an unloadable AssemblyLoadContext. The implementation of the fix is very primitive. It is expected that we will be able to get rid of the TypeIDMap in a near future and so it is not worth optimizing.
2019-01-10Merge pull request #21804 from briansull/fix-unbox-optBrian Sullivan4-8/+34
Fix issue with devirtualization and tailcalls
2019-01-10Add WithCancellation for async enumerables (#21939)Stephen Toub4-51/+90
2019-01-10Merge pull request #21928 from fiigii/fixMulxCarol Eidt1-0/+8
Don't optimize MultiplyNoFlags away
2019-01-10JIT: fix byte range used by RangeCheck (#21915)Andy Ayers1-1/+1
Range is -128 to 127, not -127 to 128.
2019-01-10Normalize a few more spin-wait loops (#21586)Koundinya Veluri21-194/+275
Normalize a few more spin-wait loops - Fixed a few more spin-waits to normalize the spin-wait duration between processors - These spin-waits have so far not needed to be retuned to avoid unreasonably long spin-wait durations. They can be retuned as necessary in the future. - Added a version of YieldProcessorNormalized() that normalizes based on spin-wait counts tuned for pre-Skylake processors for spin-wait loops that have not been retuned. - Moved some files around to make YieldProcessorNormalized() and the like available in more places. Initialization is still only done in the VM. Uses outside the VM will use the defaults, where there would be no significant change from before. - Made YieldProcessor() private outside of the GC and added System_YieldProcessor() for when the system-defined implementation is intended to be used
2019-01-10Merge pull request #17733 from mikedn/cc-cond2Brian Sullivan16-935/+562
Expand GT_JCC/SETCC condition support
2019-01-10Code Review feedbackBrian Sullivan2-6/+6
Change test priority to 0
2019-01-10Don't optimize BMI2 MultiplyNoFlags awayFei Peng1-0/+8
2019-01-10Move public interface ISymDocumentWriter to shared location (#21931)Marek Safar4-32/+13
2019-01-10Move COMException to shared partition (dotnet/corert#6803)Marek Safar3-17/+17
* Move COMException to shared partition * Review feedback Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
2019-01-10Merge pull request #21864 from fiigii/fixscalarmemCarol Eidt3-23/+42
Fix CRC32 instruction encoding on containment form
2019-01-10Merge pull request #21815 from CarolEidt/Fix752890Carol Eidt2-4/+10
[x86] Make copies of odd-size struct arguments
2019-01-10Merge pull request #21888 from fiigii/fixVzeropperCarol Eidt2-8/+14
Fix VZEROUPPER for HW intrinsic
2019-01-10Moves EnvironmentVariableTarget enum to shared partition (#21930)Marek Safar3-7/+14
2019-01-10Re-enable publishing of transport packages (#21922)Sven Boemer1-10/+3
2019-01-10Move restoring ExecutionContext out of generic methods (#21909)Ben Adams2-62/+25
* Move restoring ExecutionContext out of generic methods * Move one back
2019-01-09Prevent AsyncIteratororMethodBuilder.ObjectIdForDebugger from gettingg ↵Chuck Ries1-0/+3
trimmed (#21920)
2019-01-09PR FeedbackCarol Eidt1-3/+1
2019-01-09Merge pull request #21893 from ↵Andy Ayers5-18/+85
AndyAyersMS/ReconcileInlineBudgetUsingSizeOfImportedIL JIT: modify inline budget update to use estimated imported IL size
2019-01-09Added ifdef for FEATURE_TAILCALL_OPTBrian Sullivan1-0/+2
2019-01-09jit formatBrian Sullivan3-6/+7
2019-01-09Implement AssemblyDependencyResolver (#21896)Jeremy Koritzinsky3-0/+319
* Implementation of ComponentDependencyResolver PInvokes into hostpolicy.dll (which should live next to the runtime and thus always be reachable). If the PInvoke fails (missing hostpolicy.dll) we will fail for now. Adds tests for the API into CoreCLR repo. The main reason is that with corerun we can easily mock the hostpolicy.dll since there's none to start with. Writing the same tests in CoreFX or any other place which starts the runtime through hostpolicy would require test-only functionality to exist in either the class itself or in the hostpolicy. * Fix test project file to work outside of VS * Better test cleanup to not leave artifacts on disk. * CDR native resolution tests Add native resolution tests * Implements detailed error reporting for ComponentDependencyResolver. Registers error writer with the hostpolicy to receive detailed errors. Uses that in the exception. Modifications to the mock and the tests to be able to verify the functionality. * Revert overly eager cleanup * Change public API surface naming to match the approved API surface. * Fix nits. * Fix renames.
2019-01-09When performing devirtualization we can not do both an unboxing optimization ↵Brian Sullivan4-7/+30
and a tail call optimization Explicit tail calls are now checked for and blocked from performing an unboxing operation in impDevirtualizeCall If late devirtualization calls impDevirtualizeCall with an IMPLICIT_TAILCALL we will clear this flag if we decide to perform the unboxing operation.
2019-01-09Fix CRC32 instruction encoding on containment formFei Peng3-23/+42
2019-01-09Move OperationStatus into shared source (#21912)Levi Broderick2-0/+35
This is the first step to moving OperationStatus from corefx into coreclr. It'll be used by the transcoding APIs which live in System.Private.CoreLib.
2019-01-09Addressing https://github.com/dotnet/coreclr/issues/21461 (#21771)José Rivero1-4/+10
- Increase the polling interval to 20 seconds. - Provide an opt-out option to the EventPipe file polling.
2019-01-09Fix DynamicMethodDesc memory leak (#21891)Jan Vorlicek4-63/+47
The DynamicMethodTable::AddMethodsToList was incorrectly allocating the MethodDescChunk from the domain's LoaderAllocator instead of the context specific one. Thus the allocated memory was leaking after a collectible AssemblyLoadContext was collected. There was also a problem with the DynamicMethodDesc::Destroy being called twice for collectible classes - once by RuntimeMethodHandle::Destroy() and once when the DomainFile destructor was called. Due to the primary issue, this problem was not visible, since the domain's LoaderAllocator is never unmapped. But it started to cause AV after the primary issue was fixed.
2019-01-09Change CoreLib native image to be R2R by default on all platforms (#21497)Fadi Hanna1-16/+5
2019-01-09Merge pull request #20772 from mikedn/ir-cleanupBruce Forstall19-300/+77
Some IR cleanup
2019-01-09Remove extraneous eightbytes check for native structures and add tests. (#21590)Jeremy Koritzinsky2-12/+33
* Remove extraneous eightbytes check and add tests. * Interger -> Integer * Missed Helper.cs * Handle field sizes larger than 8 bytes in AssignClassifiedEightByteTypes * Move CoreFX test case into CoreCLR. Fix the SystemV eightbyte classifier to correctly classify the second eightbyte when a single field crosses the eightbyte boundary (such as an in-place array of three 4-byte enums). * Enable passing user defined structs in in-place arrays in a structure if SystemV ABI expects it. * Correctly handle a field spanning two full eightbytes. * Just directly assign 0 to accumulatedSizeForEightByte * Change multi-eightbyte field handling to be a loop as per PR feedback. * Remove extraneous whitespace.
2019-01-09More DispatchWrapper tweaksJan Kotas1-18/+1
2019-01-09Removes PNSE version of DispatchWrapper and keep only single version with ifdefMarek Safar2-11/+1
2019-01-09Delete files moved to shared partitionJan Kotas15-322/+4
2019-01-09Moves common COM type to shared corelib partition (dotnet/corert#6782)Marek Safar26-1/+589
* Moves common COM type to shared corelib partition * Moves GetHRForException to PInvokeMarshal * Add temporary CORECLR ifdef to ArrayWithOffset * Apply cleanup from CoreCLR Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
2019-01-09fix DateTime overflow on ARM32 (#21902)Tomas Weinfurt1-4/+6
2019-01-09Update gtLclILoffs related commentsMike Danes2-8/+1
2019-01-08Merge pull request #21867 from adityamandaleeka/fix_writebarrier_bounds_checkAditya Mandaleeka1-3/+15
Fix write barrier bounds checks for ARM64 Unix.
2019-01-08Merge pull request #21857 from AndyAyersMS/RangeCheckSmallTypesAndy Ayers1-0/+31
JIT: infer ranges from small int type operations
2019-01-09Enable FinalizeQueue SOS command for Unix (#21876)Jan Vorlicek4-8/+26
The command is very useful and there seems to be no reason for it to not to be enabled on Unix.
2019-01-08Copy address-taken SIMD intrinsic (#21884)Carol Eidt6-36/+15
* Copy address-taken SIMD intrinsic This occurs, for example, when boxing the result of a SIMD intrinsic. This was being handled for the HW intrinsic case, but not the SIMD Vector intrinsics. Also, eliminate `OperIsSimdHWIntrisic` since it redundantly checks for the case of a SIMD result, even though it was always called in a context where the result is known to be a struct type. Fix #21854
2019-01-08Expose string.Concat(ReadOnlySpan, ...) (#21882)Stephen Toub1-9/+24
* Expose string.Concat(ReadOnlySpan, ...) * Add String.Empty fast path to string.Concat(ReadOnlySpan, ...)
2019-01-08Use `saveNext` unwind opcode on arm64. (#21683)Sergey Andreenko4-108/+116
* Use `saveNext` opcode on arm64. * Support using of `save_next` on int/float border. * Delete the extra requirement that an epilog sequences can't start from `save_next`. * response feedback
2019-01-08Fix VZERoUPPER for HW intrinsicFei Peng2-8/+14
2019-01-08check for valid IL offsets before computing block ILsizeAndy Ayers1-2/+8
2019-01-08Extract cleanup changes from #21793. (#21852)Jeremy Koritzinsky6-45/+85
* Cleanup changes from #21793. * Emit the data pointer offset directly into the IL stream (and calculate it as needed instead of passing it through) * Fix broken assumption that OverrideProcArgs::na::m_pMT is the array type instead of the element type (which it was).
2019-01-08JIT: modify inline budget update to use estimated imported IL sizeAndy Ayers5-18/+79
The inliner keeps a time budget to try and avoid pathological runaway inline behavior (see #4375). The jit estimates the time impact of an inline using a simple projection based on IL size. If an prospective inline would put the jit over the time budget, the inline is blocked -- and note even aggressive inlines can be blocked this way. We now have a fair number of aggressive inline methods like `Vector256<T>.IsSupported` where the IL is optimized early on by the jit and the actual impact on the calling method is much less than the initial IL size would suggest. For instance `IsSupported` is 286 bytes of IL, but the net contribution of this method at jit time is either a constant 0 or 1, and so the effective size is more like 2 bytes of IL. This set of changes updates the jit to estimate the imported IL size of a method when updating the budget. Closes #21794.
2019-01-08Fix write barrier bounds checks for ARM64 UnixAditya Mandaleeka1-3/+15