Juan Hoyos [Thu, 3 Jan 2019 21:14:23 +0000 (13:14 -0800)]
Merge pull request dotnet/coreclr#21774 from hoyosjs/juhoyosa/event_size
Add payload size case for GC events
Commit migrated from https://github.com/dotnet/coreclr/commit/
48b94195efc8bc607660ec957c481bc7e13ccf62
Jan Vorlicek [Thu, 3 Jan 2019 20:20:59 +0000 (21:20 +0100)]
Fix GC for collectible array of pure value types (dotnet/coreclr#21782)
For collectible arrays, we enter the mark_object_simple1 method even if
the array contains no pointers so that the reference to LoaderAllocator
can be walked. But we were missing skipping the call to go_through_object
which is both not necessary and it also doesn't work correctly for
objects without pointers (the loop over the fields reports the first 8
bytes of each array element as if it was a pointer).
The fix is to skip the call to go_through_object for objects without
pointers in the mark_object_simple1 and background_mark_simple1.
Commit migrated from https://github.com/dotnet/coreclr/commit/
03ab0ca0f81313319f30cfd75ee56dc59d71390c
Stephen Toub [Thu, 3 Jan 2019 20:07:57 +0000 (15:07 -0500)]
Reduce allocation in Index/Range.ToString (dotnet/coreclr#21755)
* Reduce allocation in Index/Range.ToString
* Address PR feedback
Commit migrated from https://github.com/dotnet/coreclr/commit/
88eb93abba27e97d5997ad2d6c04b54aeaff5e8f
Egor Chesakov [Thu, 3 Jan 2019 18:06:22 +0000 (10:06 -0800)]
Remove vc-runtime package dependency (dotnet/coreclr#21643)
Commit migrated from https://github.com/dotnet/coreclr/commit/
b20917f552cfc6f502648f9342dbdfd7ac0ad91e
Egor Chesakov [Thu, 3 Jan 2019 17:28:33 +0000 (09:28 -0800)]
Bring Debug CRT DLLs when build IJW tests (dotnet/coreclr#21699)
Commit migrated from https://github.com/dotnet/coreclr/commit/
8cf62cb77230389c4744b91f1c6ddd60331674ad
Marek Safar [Thu, 3 Jan 2019 10:51:17 +0000 (11:51 +0100)]
Removes the code moved to shared partition
Commit migrated from https://github.com/dotnet/coreclr/commit/
6eecaafdeb8d5870f06f99905b57f260b3c09131
Marek Safar [Wed, 2 Jan 2019 15:25:34 +0000 (16:25 +0100)]
Moves Attribute instance bits to shared location (dotnet/corertdotnet/coreclr#6747)
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Commit migrated from https://github.com/dotnet/coreclr/commit/
8e36b4aba1d63fda1597c365adf9b7b440cf1370
Jan Kotas [Thu, 3 Jan 2019 13:52:30 +0000 (03:52 -1000)]
Cleanup current culture handling in the unmanaged runtime (dotnet/coreclr#21706)
Large portion of the current culture handling in the unmanaged runtime inherited from desktop has been no-op. The nativeInitCultureAccessors QCall that it used to depend on desktop got (almost) never called in CoreCLR.
- Delete resetting of current culture on threadpool threads. It was needed in desktop because of a very tricky flow of current culture between appdomains. It is superseded by the flowing the current culture via AsyncLocal in CoreCLR.
- Comment out fetch of managed current culture for unmanaged resource lookup. It has number of problems that are not easy to fix. We are not localizing the unmanaged runtime currently anyway, so it is ok to just comment it out.
- Fix the rest to call CultureInfo directly without going through Thread.CurrentThread
Commit migrated from https://github.com/dotnet/coreclr/commit/
eff427c02a89e135c38a96032feb3c9a6a13cf5b
Stephen Toub [Thu, 3 Jan 2019 13:50:00 +0000 (08:50 -0500)]
Remove substring allocation in MethodBase.AppendParameters (dotnet/coreclr#21770)
Commit migrated from https://github.com/dotnet/coreclr/commit/
faf2acefa7d88a446f561b38740a72d8838440a5
Filip Navara [Thu, 3 Jan 2019 13:46:57 +0000 (14:46 +0100)]
Remove unnecessary propagation of stack crawl marks. (dotnet/coreclr#21781)
Commit migrated from https://github.com/dotnet/coreclr/commit/
6f9121bf9e51472780e25d7f50b8c9e46898ad50
Bruce Forstall [Thu, 3 Jan 2019 02:30:00 +0000 (18:30 -0800)]
Merge pull request dotnet/coreclr#21669 from kvochko/arm_cfi_code_offsets
[Linux/ARM] Fix CFI code offsets in funclet prolog
Commit migrated from https://github.com/dotnet/coreclr/commit/
acbfc3d9b0729cc5c2957d5536a894c07b1c4af8
Egor Chesakov [Thu, 3 Jan 2019 01:16:44 +0000 (17:16 -0800)]
Refactor Send to Helix step in Azure DevOps (dotnet/coreclr#21700)
* Move all the test job submission logic into separate file eng/send-to-helix-step.yml.
* Pass IsExternal=true and Creator for public submissions.
* Pass IsExternal=false and HelixAccessToken for internal submissions.
* Pass the parameters to MSBuild via environment.
* Make all the properties names passed to MSBuild "from outside" starting with underscore.
* Specify HelixArchitecture and HelixConfiguration properties.
Commit migrated from https://github.com/dotnet/coreclr/commit/
0d128bc36e4de05da32aacca017574be812066df
Stephen Toub [Thu, 3 Jan 2019 00:57:49 +0000 (19:57 -0500)]
Avoid some unnecessary allocation in MethodBuilder.ToString (dotnet/coreclr#21758)
This method already allocates a ton, and it's not going to be hot-path, but it's annoying me showing up in queries for string.Concat usage, so I'm fixing it :)
Commit migrated from https://github.com/dotnet/coreclr/commit/
472181f672b21774109f8d3cdcd077556d7393b2
Stephen Toub [Thu, 3 Jan 2019 00:57:17 +0000 (19:57 -0500)]
Replace string.Format(SR. with SR.Format(SR. (dotnet/coreclr#21763)
We use SR.Format in almost all places where we format resource strings (without a format provider), but there were a few stragglers.
Commit migrated from https://github.com/dotnet/coreclr/commit/
369f53ea121798a65b81e6878c739c6bdcaae895
Stephen Toub [Thu, 3 Jan 2019 00:56:46 +0000 (19:56 -0500)]
Change a couple string.Replace("a", "b") to string.Replace('a', 'b') (dotnet/coreclr#21768)
The latter is functionally the same but less overhead.
Commit migrated from https://github.com/dotnet/coreclr/commit/
922971c5e2a0e74841218dbd8e00f6354ab2b98f
Egor Chesakov [Wed, 2 Jan 2019 23:36:05 +0000 (15:36 -0800)]
Use Alpine container with Node.js in Azure DevOps (dotnet/coreclr#21568)
* Use Alpine container with Node.js in azure-pipelines.yml
* Enable the dependsOn build_Linux_musl_x64_release in azure-pipelines.yml
Commit migrated from https://github.com/dotnet/coreclr/commit/
9f108aad51eb94c3a0c3118481e687543989fa59
Stephen Toub [Wed, 2 Jan 2019 23:16:56 +0000 (18:16 -0500)]
Use StringBuilderCache in PathInternal.NormalizeDirectorySeparators (dotnet/coreclr#21760)
When we do need to normalize, we're currently allocating the StringBuilder/char[] for the full path length. As long as the path length is less than the max cacheable size (360), we'll now use a cached builder.
Commit migrated from https://github.com/dotnet/coreclr/commit/
9d159eceee051b9536a26467adb489a6a5c0fa7a
Marek Safar [Wed, 2 Jan 2019 19:44:49 +0000 (20:44 +0100)]
Additional ifdef changes which are ES_BUILD_STANDALONE specific for System.Diagnostics.Tracing (dotnet/coreclr#21748)
Commit migrated from https://github.com/dotnet/coreclr/commit/
e2a576a7130978dfeca4c100868789eee4adc403
Stephen Toub [Wed, 2 Jan 2019 19:44:24 +0000 (14:44 -0500)]
Replace Array.Copy(src, dst, int) calls with Array.Copy(src, 0, dst, 0, int) (dotnet/coreclr#21756)
The former calls GetLowerBound(0) on both src and dst, which is unnecessary when the arrays are T[] and thus always have a lower bound of 0.
Commit migrated from https://github.com/dotnet/coreclr/commit/
6911791e4614e900fa756ce6fd5348071278229f
Filip Navara [Wed, 2 Jan 2019 15:00:14 +0000 (16:00 +0100)]
Remove dummy globalization implementation. (dotnet/corertdotnet/coreclr#6756)
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Commit migrated from https://github.com/dotnet/coreclr/commit/
e7ef2ecadc31b1da4196fdb66a5f0485d1bfdf2c
Stephen Toub [Wed, 2 Jan 2019 18:41:48 +0000 (13:41 -0500)]
Avoid boxing allocation and object[] allocation in BuildTraceFileName (dotnet/coreclr#21752)
Commit migrated from https://github.com/dotnet/coreclr/commit/
0c5ab47942683e87ddc0997636f427d8bd9eb3ef
Egor Chesakov [Wed, 2 Jan 2019 17:10:05 +0000 (09:10 -0800)]
Temporary remove OSX.1012.Amd64.Open and OSX.1012.Amd64 Helix queues in eng/platform-matrix.yml (dotnet/coreclr#21642)
Related issue: https://github.com/dotnet/core-eng/issues/4856
Commit migrated from https://github.com/dotnet/coreclr/commit/
3b6d990eef152bac4134318940b08b050982c0f0
Jan Kotas [Wed, 2 Jan 2019 14:46:32 +0000 (04:46 -1000)]
Delete lstrlen from Unix PAL (dotnet/coreclr#21745)
strlen/wcslen works just fine.
Commit migrated from https://github.com/dotnet/coreclr/commit/
a082f4702540309e832c2ebdf86b15dc798b136b
Marlon Regenhardt [Wed, 2 Jan 2019 14:02:20 +0000 (15:02 +0100)]
Remove second 'license' word for readability (dotnet/coreclr#21747)
The license name already has 'license' in the end, the second one is unnecessary.
Commit migrated from https://github.com/dotnet/coreclr/commit/
d26e31a51d3a97ac925240c134d08418911c457d
Jan Kotas [Wed, 2 Jan 2019 13:12:27 +0000 (03:12 -1000)]
Simplify and improve integer overflow checks in Interop (dotnet/coreclr#21732)
- Delete unnecessary CheckStringLength calls for result of string.Length. Managed strings are guaranteed to be under 2GB bytes, so these checks were unnecessary.
- Add `checked(...)` around buffer size computations that may hit potential integer overflow. It does not look like any of these would cause a bug that would lead to buffer overrun, but it is better to catch these early.
Commit migrated from https://github.com/dotnet/coreclr/commit/
a5b1c68d4bb8a14042e93acb8f1032db4703b943
dotnet-maestro-bot [Wed, 2 Jan 2019 07:42:13 +0000 (23:42 -0800)]
Update CoreClr, CoreFx to preview-27302-01, preview.19051.1, respectively (dotnet/coreclr#21674)
Commit migrated from https://github.com/dotnet/coreclr/commit/
ccaba224b69cc3c334e73226e592dde5864afc14
Jan Kotas [Tue, 1 Jan 2019 20:31:41 +0000 (12:31 -0800)]
AppContext moved to shared partition - CoreRT specific changes
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Commit migrated from https://github.com/dotnet/coreclr/commit/
0de73d34e08f767b118e95fe88e8e98b1fa31379
Ben Adams [Wed, 2 Jan 2019 02:21:11 +0000 (03:21 +0100)]
strlen to managed code and vectorize (dotnet/coreclr#21729)
Commit migrated from https://github.com/dotnet/coreclr/commit/
4a7a2049a1a985b02fe5983e7e2a8d480270a72b
Jan Kotas [Tue, 1 Jan 2019 22:15:49 +0000 (12:15 -1000)]
Cleanup ArgumentNull_Obj references in unmanaged runtime (dotnet/coreclr#21738)
Commit migrated from https://github.com/dotnet/coreclr/commit/
6a3f7e1903c503165b1fbf2e82d2e777453ca8e5
Marek Safar [Tue, 1 Jan 2019 22:15:36 +0000 (23:15 +0100)]
Tweaks permissions ifdefs in System.Diagnostics.Tracing (dotnet/coreclr#21733)
Commit migrated from https://github.com/dotnet/coreclr/commit/
c6c48260173ab7d22d599e60f7ca98e0cfc06ec4
Marek Safar [Tue, 1 Jan 2019 20:13:31 +0000 (21:13 +0100)]
Moves AppContext to shared location (dotnet/coreclr#21734)
Commit migrated from https://github.com/dotnet/coreclr/commit/
0a03aa9b81eeac93a6c6fa238d4123a60009d0f6
Jan Kotas [Tue, 1 Jan 2019 05:37:11 +0000 (19:37 -1000)]
Delete useless ArgumentNullException message (dotnet/coreclr#21728)
"Object cannot be null" does not add anything over the default "Value cannot be null"
Commit migrated from https://github.com/dotnet/coreclr/commit/
a1b757c70f47dbac8a4ca04d2d7861a8a0442e56
Ben Adams [Mon, 31 Dec 2018 17:57:19 +0000 (18:57 +0100)]
Remove EventPipeController static constructor (dotnet/coreclr#21718)
* Remove EventPipeController static constructor
* Don't cache DefaultProviderConfiguration
Commit migrated from https://github.com/dotnet/coreclr/commit/
73d7d224ae6fb9b13bb641440c06606f426215cb
Marek Safar [Mon, 31 Dec 2018 17:56:57 +0000 (18:56 +0100)]
Moves ExceptionDispatchInfo to shared location (dotnet/coreclr#21725)
* Moves ExceptionDispatchInfo to shared location
* Use struct for Exception.DispatchState, avoid TLAs in names, misc cleanup
Commit migrated from https://github.com/dotnet/coreclr/commit/
eab5fafd4369623932badcc5c3635a5d28998e6a
Ben Adams [Mon, 31 Dec 2018 15:16:54 +0000 (16:16 +0100)]
Improve MdUtf8String (dotnet/coreclr#21720)
* Move MdUtf8String::EqualsCaseSensitive to managed code
* Move MdUtf8String.ToString to safe code
* Use Encoding.UTF8.GetString
Commit migrated from https://github.com/dotnet/coreclr/commit/
e52aaee4fd770bfe728d35e10e51cafb257dec92
Jan Kotas [Mon, 31 Dec 2018 07:18:23 +0000 (23:18 -0800)]
Add license, keep more of the CriticalHandle logic in the shared file
Commit migrated from https://github.com/dotnet/coreclr/commit/
18d3d48f1148ff1e4742518916226767e6520cf1
Marek Safar [Sun, 30 Dec 2018 22:29:35 +0000 (23:29 +0100)]
Moves CriticalHandle to shared location
Commit migrated from https://github.com/dotnet/coreclr/commit/
e4959bbc9127d4635a7f38e9aa9dd4a74d0e2703
Jan Kotas [Sun, 30 Dec 2018 09:30:48 +0000 (01:30 -0800)]
Fix CoreRT build breaks
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Commit migrated from https://github.com/dotnet/coreclr/commit/
9b2db85a3d6671fd033dc2c690698f6bc6ee1241
Marek Safar [Mon, 31 Dec 2018 05:58:29 +0000 (06:58 +0100)]
Readability improvement in MemoryStream (dotnet/coreclr#21710)
Commit migrated from https://github.com/dotnet/coreclr/commit/
89b9cc3792a20c4657521b337a1bc7c4271e1a88
Koundinya Veluri [Mon, 31 Dec 2018 05:56:54 +0000 (21:56 -0800)]
Don't Sleep(1) in some spin-wait loops (dotnet/coreclr#21722)
- In spin-wait loops that are not expected to last too long, Sleep(1) significantly delays threads from completing the operation
- From eliminating Sleep(1) in such spin-wait loops, there can be a tradeoff, better fairness vs worse throughput, because Sleep(1) removes threads from contention and in some cases fewer threads can make faster progress at the cost of delaying the Sleep(1) threads relatively significantly. Eliminating the Sleep(1) in such spin-wait loops seems to be a good tradeoff.
Commit migrated from https://github.com/dotnet/coreclr/commit/
7bd31ac770062fdcf75ad19dabcd7c8ba60bc29c
Pent Ploompuu [Mon, 31 Dec 2018 05:43:09 +0000 (07:43 +0200)]
Remove parsing from GUID constants (dotnet/coreclr#21717)
Commit migrated from https://github.com/dotnet/coreclr/commit/
bac3ac897c0bfe943ca27fd8ca9188d1c74d1643
Ben Adams [Mon, 31 Dec 2018 05:22:08 +0000 (06:22 +0100)]
Remove Environment static constructor (dotnet/coreclr#21715)
Commit migrated from https://github.com/dotnet/coreclr/commit/
6a989431e5a8c5d9113b6d03a4aa9a15b6653655
Jan Kotas [Sun, 30 Dec 2018 09:08:19 +0000 (01:08 -0800)]
Fix CoreCLR build breaks
Commit migrated from https://github.com/dotnet/coreclr/commit/
5f241249a54f7824812ccf5b87a60c9c1a65d3ec
Jan Kotas [Sat, 29 Dec 2018 23:26:54 +0000 (15:26 -0800)]
Delete file moved to shared partition
Commit migrated from https://github.com/dotnet/coreclr/commit/
e3c61e5447da96828de0e91649918455ab104fbf
Marek Safar [Sat, 29 Dec 2018 23:16:18 +0000 (00:16 +0100)]
Moves ThrowHelper to shared location (dotnet/corertdotnet/coreclr#6741)
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Commit migrated from https://github.com/dotnet/coreclr/commit/
3c1e4038c283903c6183df07ce9a68216f901646
Ben Adams [Sun, 30 Dec 2018 16:54:44 +0000 (17:54 +0100)]
Shorter ExecutionContext.Capture (dotnet/coreclr#21707)
Commit migrated from https://github.com/dotnet/coreclr/commit/
c83821535b0bbc2f7e19e2e712c1d56aef4b9360
Ben Adams [Sun, 30 Dec 2018 15:35:42 +0000 (16:35 +0100)]
Use EventSource guid ctor for RuntimeEventSource (dotnet/coreclr#21714)
Commit migrated from https://github.com/dotnet/coreclr/commit/
77b8960b562959998827a988a5e4ea1460ef3c82
Marek Safar [Sun, 30 Dec 2018 07:38:06 +0000 (08:38 +0100)]
Moves generic comparers to shared CoreLib (dotnet/coreclr#21649)
* Moves generic comparer to shared CoreLib
* Keep Index/LastIndexOf optimizations in CoreCLR only
* Moved runtime-specific enum helper to runtime-specific partial type
Commit migrated from https://github.com/dotnet/coreclr/commit/
3b5782fa0aa4086ee72904b6052f21cba693bcf7
Ben Adams [Sun, 30 Dec 2018 03:06:16 +0000 (04:06 +0100)]
Separate ThreadPool...ThreadLocals get from initalization (dotnet/coreclr#21704)
* Seperate ThreadPool...ThreadLocals get from initalization
* Assert null
Commit migrated from https://github.com/dotnet/coreclr/commit/
ae04b48450680cc6988fc0ba4678b4c973180cd2
Filip Navara [Sat, 29 Dec 2018 14:00:31 +0000 (14:00 +0000)]
Move CultureInfo to shared CoreLib (dotnet/coreclr#21672)
* Move thread CurrentCulture and CurrentUICulture variables to CultureInfo.
* Move CultureInfo to shared CoreLib
* Code style fixes for consistency.
* Fold down APPX code into CultureInfo.CurrentCulture/CurrentUICulture.
* Remove unnecessary parentheses around return statements.
* Remove GetCurrentUICultureNoAppX.
Commit migrated from https://github.com/dotnet/coreclr/commit/
705430bff281bd8fa1215967c80968127ea32019
Ben Adams [Sat, 29 Dec 2018 07:08:53 +0000 (08:08 +0100)]
Fix warning causing error in warning as error (Windows) (dotnet/coreclr#21697)
Commit migrated from https://github.com/dotnet/coreclr/commit/
285495cad655b0fee7de83420deefab041aa38d8
Filip Navara [Sat, 29 Dec 2018 04:59:13 +0000 (04:59 +0000)]
Remove usages of GetCurrentUICultureNoAppX from ResourceManager (dotnet/coreclr#21691)
* Remove usages of GetCurrentUICultureNoAppX from ResourceManager to make GetString and GetObject internally consistent. This matches the current behaviour of CoreRT.
Commit migrated from https://github.com/dotnet/coreclr/commit/
4656337843ee4a493e4b080d502b23b6866aa0ab
Egor Bogatov [Fri, 28 Dec 2018 18:58:42 +0000 (21:58 +0300)]
Replace Interop.ReadDir.cs with Interop.ReadDir.cs from System.IO.FileSystem (dotnet/coreclr#21622)
* Use Interop.ReadDir.cs from FileSystem (corefx)
* Use ArrayPool
* Remove ReadBufferSize (and static cctor)
* use NameBufferSize for 256 const
* Delete ReadDir and SafeDirectoryHandle.Unix.cs
* Introduce GetDirectoryEntryFullPath, remove uint casts
* Refactor EnumerateFilesRecursively
Commit migrated from https://github.com/dotnet/coreclr/commit/
d70425ced81589ec5fe243da4425d7fc3426314c
Hugh Bellamy [Fri, 28 Dec 2018 17:52:41 +0000 (17:52 +0000)]
Remove dead Guid parsing code (dotnet/coreclr#21123)
* Remove dead checks in Guid parsing
* Minor cleanups in Guid
* Delete unused failureMessageFormatArgument
Commit migrated from https://github.com/dotnet/coreclr/commit/
f6ccb568b9e240b3b9cb2bc114b93ae17cacf1df
Jan Kotas [Thu, 27 Dec 2018 07:36:20 +0000 (23:36 -0800)]
Use common copy of System.Numerics.Hashing.HashHelpers
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Commit migrated from https://github.com/dotnet/coreclr/commit/
b3cdf9479c46bc3fb73ce2548ba6714c40802ed2
Jan Kotas [Thu, 27 Dec 2018 14:48:36 +0000 (06:48 -0800)]
Delete file moved to shared partition
Commit migrated from https://github.com/dotnet/coreclr/commit/
67fbdd21f28d04cbaac4266ac6fc397ea0467082
Filip Navara [Thu, 27 Dec 2018 14:12:19 +0000 (15:12 +0100)]
Move Contracts.cs (CoreCLR version) to shared CoreLib and update code to compile. (dotnet/coreclr#6734)
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Commit migrated from https://github.com/dotnet/coreclr/commit/
2c1bf2d68a87f5534e8214a890b3ed5a582f40a9
Filip Navara [Wed, 26 Dec 2018 21:04:17 +0000 (22:04 +0100)]
Delete file moved to shared CoreLib.
Commit migrated from https://github.com/dotnet/coreclr/commit/
03f0b6d5f97a5d65387cad5fd0f60342d3118047
Filip Navara [Wed, 26 Dec 2018 19:04:52 +0000 (20:04 +0100)]
Move System/Numerics/Hashing to shared CoreLib. (dotnet/corertdotnet/coreclr#6732)
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Commit migrated from https://github.com/dotnet/coreclr/commit/
bceb1cb23d14a00b696a81a93ac09db9f758c0fb
Maoni Stephens [Wed, 26 Dec 2018 21:13:21 +0000 (13:13 -0800)]
desktop port (dotnet/coreclr#21523)
+alloc lock split into SOH and LOH
+provisional mode to fix too many gen2 GCs triggered in low mem situation when the heap has heavy pinning fragmentation
+better free list usage
+premature OOM fixes
+3 new configs: GCHeapAffinitizeMask, GCHighMemPercent, GCLOHThreshold (will be documented)
YieldProcessor scaling factor is different on core due to the different implementation on core.
Commit migrated from https://github.com/dotnet/coreclr/commit/
aa13ca95d633e9251fa040533d3d5650808455c0
Andrey Kvochko [Tue, 25 Dec 2018 10:32:59 +0000 (13:32 +0300)]
Fix windows build
Commit migrated from https://github.com/dotnet/coreclr/commit/
44148502127d299c6a14def752b05012e8470d6f
Andrey Kvochko [Mon, 24 Dec 2018 16:23:55 +0000 (19:23 +0300)]
Fix CFI code offsets in prolog on ARM
Commit migrated from https://github.com/dotnet/coreclr/commit/
a5118b561433f03a819087de40aaa815b7acef26
dotnet-maestro-bot [Tue, 25 Dec 2018 05:55:04 +0000 (21:55 -0800)]
Update CoreClr, CoreFx to preview-27225-01, preview.18624.2, respectively (dotnet/coreclr#21663)
Commit migrated from https://github.com/dotnet/coreclr/commit/
56e725e892cb67a373ac3e2121b9d667b6a40c03
Filip Navara [Tue, 25 Dec 2018 04:55:30 +0000 (05:55 +0100)]
Makes CultureInfo.get_Parent thread safe. (dotnet/coreclr#21671)
Commit migrated from https://github.com/dotnet/coreclr/commit/
6d94edc9a794569cd8cf8b300c017b5451f36fd7
Filip Navara [Mon, 24 Dec 2018 02:16:32 +0000 (03:16 +0100)]
Move DebugProvider.Windows to shared CoreLib. (dotnet/coreclr#21657)
Commit migrated from https://github.com/dotnet/coreclr/commit/
a548a0e6d1aa8ee795f024f129d5393c02328370
Ben Adams [Mon, 24 Dec 2018 02:09:46 +0000 (02:09 +0000)]
Fix warning causing error in warning as error (Windows) (dotnet/coreclr#21656)
Commit migrated from https://github.com/dotnet/coreclr/commit/
5b0f1a1d183f83a077771feca7cea90b8159863a
Ben Adams [Mon, 24 Dec 2018 00:26:58 +0000 (00:26 +0000)]
Use TZCNT and LZCNT for Locate{First|Last}Found{Byte|Char} (dotnet/coreclr#21073)
Commit migrated from https://github.com/dotnet/coreclr/commit/
074276531b1f38be114663b0b84f196c7fee9d27
Andon Andonov [Sun, 23 Dec 2018 23:51:05 +0000 (15:51 -0800)]
Add Module Override Recognition to R2RDump (dotnet/coreclr#21617)
This was added to help debug work with large version bubbles. The changes should allow R2RDump to have some rudimentary understanding of ENCODE_METHOD_OVERRIDE.
The big TODO here is allow loading of external dependency assemblies to be able to resolve the tokens coming after the override.
Commit migrated from https://github.com/dotnet/coreclr/commit/
d624a6e4c082a0ab4ec89d38773bdd64dfc99159
Michal Strehovský [Sun, 23 Dec 2018 16:09:39 +0000 (17:09 +0100)]
Fix ProjectN regression in `ByReference<T>` (dotnet/corertdotnet/coreclr#6713)
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Commit migrated from https://github.com/dotnet/coreclr/commit/
14d6b0258852dd7354bc349d7566dc5337905ac9
dotnet-maestro-bot [Sun, 23 Dec 2018 20:47:37 +0000 (12:47 -0800)]
Update CoreClr, CoreFx to preview-27223-02, preview.18623.1, respectively (dotnet/coreclr#21658)
Commit migrated from https://github.com/dotnet/coreclr/commit/
228654b769dcd195fcb70161f1cb109ffa935fdd
ichensky [Sun, 23 Dec 2018 12:47:25 +0000 (14:47 +0200)]
Add optimization in GetHashCode for Int16 and SByte (dotnet/coreclr#21652)
Commit migrated from https://github.com/dotnet/coreclr/commit/
d4cab6e31898098d17e3e9b2e44a0f88b6db43ec
Jan Kotas [Sun, 23 Dec 2018 12:47:11 +0000 (04:47 -0800)]
Delete CoreLib.FixupCoreLibName (dotnet/coreclr#21655)
This method doing blind find&replace of "mscorlib" with "System.Private.CoreLib". It is both incorrect (e.g. if the typename happened to contain "mscorlib" string) and inefficient (unnecessary allocations and use of reflection).
Commit migrated from https://github.com/dotnet/coreclr/commit/
0d746bf368afb21e778f550c3fbb0dbb01eb260a
Sergey Andreenko [Sun, 23 Dec 2018 06:42:44 +0000 (22:42 -0800)]
Fix ArrayStack's call to default constructor for <T>. (dotnet/coreclr#21624)
* Add ArrayStack::Empty
* Add ArrayStack::BottomRef
* Delete unused `ReverseTop`.
* do not use default constructor.
Commit migrated from https://github.com/dotnet/coreclr/commit/
47c5949c83d05080bcd360c274855017bb3f9576
dotnet-maestro-bot [Sun, 23 Dec 2018 05:51:18 +0000 (21:51 -0800)]
Update CoreClr, CoreFx to preview-27223-01, preview.18622.2, respectively (master) (dotnet/coreclr#21620)
* Update CoreClr, CoreFx to preview-27223-01, preview.18622.2, respectively
* Update issues json
Commit migrated from https://github.com/dotnet/coreclr/commit/
a43ac609fc1706b8174c3568f797dce8a81a192f
Marek Safar [Sun, 23 Dec 2018 03:20:39 +0000 (04:20 +0100)]
Extracts public IThreadPoolWorkItem interface to shared CoreLib (dotnet/coreclr#21653)
Commit migrated from https://github.com/dotnet/coreclr/commit/
18c33d2896ca55ca661c6ed864c0d1f2eedab170
Marek Safar [Sun, 23 Dec 2018 02:36:33 +0000 (03:36 +0100)]
Moves CoreLib to shared location (dotnet/coreclr#21654)
Commit migrated from https://github.com/dotnet/coreclr/commit/
622455699eab8fc6959fb9f85469f14fb621b4df
Ben Adams [Sat, 22 Dec 2018 20:08:22 +0000 (20:08 +0000)]
SpanHelpers deal with nullable reference types (dotnet/coreclr#21232)
Commit migrated from https://github.com/dotnet/coreclr/commit/
3b388c0d3c32b090be9b2de4576fed563b680376
Jan Kotas [Sat, 22 Dec 2018 18:01:00 +0000 (10:01 -0800)]
Move some Task related files to shared CoreLib partition (dotnet/coreclr#21650)
Commit migrated from https://github.com/dotnet/coreclr/commit/
dc3f080b89b7d3c85afdb8b6d2b9086363c48c14
Jan Kotas [Sat, 22 Dec 2018 06:49:21 +0000 (22:49 -0800)]
Synchronize Task, Awaiter and ThreadPool implementation with CoreCLR (dotnet/coreclr#6706)
Synchronized the code as much as possible with CoreCLR. The one major piece that I have excluded is tracing. I will look into doing that separately.
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Commit migrated from https://github.com/dotnet/coreclr/commit/
0f8e9ee7a47423852b6112006e90504bc60e28e5
Jan Kotas [Sat, 22 Dec 2018 03:59:46 +0000 (19:59 -0800)]
CoreRT-specific Object.cs changes - Fix build breaks - Apply same cleanup to all related files
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Commit migrated from https://github.com/dotnet/coreclr/commit/
2bd72b12c92bc9020d93e4bcbabc2fe2eb114b77
Eugene Rozenfeld [Sun, 16 Dec 2018 20:07:42 +0000 (12:07 -0800)]
Improve removal of dead calls to allocator helpers.
This change improves detection of allocators with side effects.
Allocators can cause side effects if the allocated object may have a finalizer.
This change adds a pHasSideEffects parameter to getNewHelper JitEE interface
method. It's used by the jit to check for allocator side effects instead of
guessing from helper ids.
Fixes dotnet/coreclr#21530.
Commit migrated from https://github.com/dotnet/coreclr/commit/
eea057675de7914af12c6168db0f3bebea35be5b
Steve MacLean [Sat, 22 Dec 2018 06:28:33 +0000 (01:28 -0500)]
Remove dead ICLRPrivBinder methods (dotnet/coreclr#21637)
* Remove dead FindAssemblyBySpec
All paths returned E_FAIL
* Remove dead BinderFlags
* Remove dead VerifyBind
Commit migrated from https://github.com/dotnet/coreclr/commit/
0a1374f4f7c2141bf6d8ad74a68dd329afdbee78
Dan Moseley [Sat, 22 Dec 2018 04:24:07 +0000 (20:24 -0800)]
Correctly disable tests (dotnet/coreclr#21645)
Commit migrated from https://github.com/dotnet/coreclr/commit/
a6bd70554605b86f87a3a27ee95ef234ae5b919d
Jan Kotas [Sat, 22 Dec 2018 00:07:22 +0000 (16:07 -0800)]
Cleanup to match conventions
Commit migrated from https://github.com/dotnet/coreclr/commit/
302dda27ee4ea80cc879c62cb40ce23fcc0de39f
Marek Safar [Fri, 21 Dec 2018 21:29:59 +0000 (22:29 +0100)]
Moves common part of Object to CoreLib shared
Commit migrated from https://github.com/dotnet/coreclr/commit/
fd2adccf3e921979d6716462f64d3b423d9cbf46
Eugene Rozenfeld [Thu, 20 Dec 2018 06:11:27 +0000 (22:11 -0800)]
Don't mark calls to allocation helpers as CSE candidates.
Marking them as CSE candidates usually blocks CSEs rather than enables them.
A typical case is:
[1] GT_IND(x) = GT_CALL ALLOC_HELPER
...
[2] y = GT_IND(x)
...
[3] z = GT_IND(x)
If we mark CALL ALLOC_HELPER as a CSE candidate, we later discover
that it can't be a CSE def because GT_INDs in [2] and [3] can cause
more exceptions (NullRef) so we abandon this CSE.
If we don't mark CALL ALLOC_HELPER as a CSE candidate, we are able
to use GT_IND(x) in [2] as a CSE def and do a CSE on [2] and [3].
Commit migrated from https://github.com/dotnet/coreclr/commit/
6baf0f9d160ad1802f5d8c98d55c44a4550f6119
Dan Moseley [Fri, 21 Dec 2018 22:24:29 +0000 (14:24 -0800)]
Remove _syncRoot field from collections (dotnet/coreclr#21628)
* SyncRoot
* Temp disable tests
* Disable outdated CoreFX test
* Tidier
Commit migrated from https://github.com/dotnet/coreclr/commit/
b93891a6e1705f7d8c671cd673abaaf03b0a09cb
Jan Kotas [Fri, 21 Dec 2018 21:21:35 +0000 (13:21 -0800)]
Disable outdated CoreFX test (dotnet/coreclr#21636)
Commit migrated from https://github.com/dotnet/coreclr/commit/
388010b99efe0e058dcebf6b7e429c7e1d9c942b
Tanner Gooding [Fri, 21 Dec 2018 21:13:21 +0000 (13:13 -0800)]
Ensure that the S.N.Vector methods are marked as [Intrinsic] and that the attribute is respected by the runtime (dotnet/coreclr#21601)
* Updating the SIMD intrinsics to check for the `[Intrinsic]` attribute
* Ensure that the existing Vector/Vector<T> intrinsic methods are marked as such.
* Fixing Vector<T>.DotProduct and Vector.AndNot to be treated as intrinsic
* Fixing `SIMDIntrinsicBitwiseAndNot` to swap the operands for XARCH
Commit migrated from https://github.com/dotnet/coreclr/commit/
61c8abe982bc1936112ea843524b0921e373f40f
Sergey Andreenko [Fri, 21 Dec 2018 20:24:52 +0000 (12:24 -0800)]
Fix arm64 prolog generation for register masks with holes. (dotnet/coreclr#21395)
* Check that `genSaveCalleeSavedRegistersHelp` doesn't accept `REG_LR`.
There are two callers and both save `LR` with `FP` before calling this helper.
In case if somebody calls this function wth`REG_LR` it won't work because unwinding info doesn't expect holes in the reg pairs.
* Extract `genPushOrPopCalleeSavedRegisters`.
It will be used for both float and int types.
* Extend `genSaveCaleeSavedRegisterGroup` to support float.
The previous version was a copy-paste with an additional case for `REG_LR` that was unreachable. Fix that.
* Use `genSaveCaleeSavedRegisterGroup` for floats.
* Extract `genRestoreCaleeSavedRegisterGroup`.
It will be used for both int and float groups.
* Prepare `genPopCalleeSavedRegisters` to work with float.
* Use `genRestoreCaleeSavedRegisterGroup` for float.
* Check that `genRestoreCalleeSavedRegistersHelp` doesn't restore `REG_LR`.
Both callers do it later.
* Extract `CheckSPOffset`.
and move it out of loops because it works only before the first save intruction.
* Format `genRestoreCaleeSavedRegisterGroup` as `genSaveCalleeSavedRegistersHelp`.
* Extract `buildRegPairsStack` from `genSaveCaleeSavedRegisterGroup` and `genRestoreCaleeSavedRegisterGroup`.
Build a stack of registers that we want to save/restore and then iterate over it doing the actual saving/restoring.
* Extract `GetSlotSizeForRegsInMask`.
* Tolerate holes in arm64 prolog/epilog register masks.
Fixes dotnet/coreclr#21363
* Reenable the test.
* Add new methods headers.
* Fix typos.
* Do not use non-const references.
* Describe `buildRegPairsStack` better.
* Change signature of `buildRegPairsStack` to avoid copyings of big structs.
* Return the logic for `RBM_LR`.
For future use.
* Clean-up some unused variables.
* Fix comments.
* Get rid of file-level functions.
* Make new methods static.
Commit migrated from https://github.com/dotnet/coreclr/commit/
a9ceb1534e5a205bc1b56d0c097595ef8c2ff7f6
Koundinya Veluri [Fri, 21 Dec 2018 19:59:06 +0000 (11:59 -0800)]
Update tiering guide to reference the new TieredCompilation label (dotnet/coreclr#21618)
Commit migrated from https://github.com/dotnet/coreclr/commit/
a8ed07a5ee70f0864290f3e9870d53665c2aef4a
Marek Safar [Fri, 21 Dec 2018 19:15:08 +0000 (20:15 +0100)]
Moves ByReference to shared CoreLib (dotnet/coreclr#21633)
Commit migrated from https://github.com/dotnet/coreclr/commit/
cc68e4af8388c7b85984d1fc769e90ddba14f3e5
Jan Kotas [Fri, 21 Dec 2018 17:25:24 +0000 (09:25 -0800)]
Streamline default EqualityComparer and Comparer for Enums (dotnet/coreclr#21604)
This borrows the implementation strategy for these from CoreRT. It makes it both simpler (fewer types and lines of code) and faster in some cases since we always use the exact right underlying type.
E.g. The following micro-benchmark is 25% faster with this change:
```
enum MyEnum : byte { x, y };
var comparer = Comparer<MyEnum>.Default;
for (int i = 0; i <
100000000; i++)
{
comparer.Compare(MyEnum.x, MyEnum.y);
comparer.Compare(MyEnum.y, MyEnum.x);
}
```
Commit migrated from https://github.com/dotnet/coreclr/commit/
82e02f37564f83c3a7c90e5e28a652a39017701a
Tanner Gooding [Fri, 21 Dec 2018 15:45:24 +0000 (07:45 -0800)]
Updating gtGetSIMDZero to only return the NI_Base_VectorXXX_Zero node if they are supported by the compiler (dotnet/coreclr#21605)
Commit migrated from https://github.com/dotnet/coreclr/commit/
63ab188ccae6cc1b0c65103db7f453833e2c19a8
Tanner Gooding [Fri, 21 Dec 2018 15:44:50 +0000 (07:44 -0800)]
Updating `FusedMultiplyAdd` for `System.Math` and `System.MathF` to use intrinsics when available. (dotnet/coreclr#21602)
* Removing the explicit value assignment to NamedIntrinsic enum values
* Renaming NI_Math_Round/NI_MathF_Round to NI_System_Math_Round/NI_System_MathF_Round
* Updating `FusedMultiplyAdd` for `System.Math` and `System.MathF` to use intrinsics when available
Commit migrated from https://github.com/dotnet/coreclr/commit/
3621170acc989339c4ea2ba78babb9576913837e
Fei Peng [Fri, 21 Dec 2018 15:14:08 +0000 (07:14 -0800)]
Implement the remaining BMI1/2 intrinsic (dotnet/coreclr#21480)
* Add tests for BMI1/2 intrinsic
* Implement the remaining BMI1/2 intrinsic
* Fix emitDispIns for BMI instruction
Commit migrated from https://github.com/dotnet/coreclr/commit/
7ac4a46d1528484e38e4c808d8a0bbe1b715e0d2
Fei Peng [Fri, 21 Dec 2018 13:39:06 +0000 (05:39 -0800)]
Add AggressiveInlining for Vector<T>.op_Multiply (dotnet/coreclr#21587)
Commit migrated from https://github.com/dotnet/coreclr/commit/
0702d6aea34edfe2b86f6a04816bfc147d398c77
Tomáš Rylek [Fri, 21 Dec 2018 04:40:38 +0000 (05:40 +0100)]
Fix "harmless" bug in ZapImport - use AppendByte to emit fixup type (dotnet/coreclr#21621)
During my work on the CPAOT compiler I found out that in the past
I had believed we should use the compressed uint signature encoding
for emitting fixup types. This place may have contributed to my
mistake. I have audited all places in CoreCLR where signatures are
decoded and in all cases the fixup type is assumed to be a byte,
not a signature-compressed uint.
As I said, the bug is harmless (after all, Crossgen works) because
the enum code of READYTORUN_FIXUP_Helper is less than 128 and for
values 0-127 the compressed uint encoding is identical with the
byte value; I however believe it's useful to make this change
nonetheless for the sake of code clarity and to help avoid future
confusions similar to mine.
Commit migrated from https://github.com/dotnet/coreclr/commit/
b1e2c668693b7905709db90ff829584826134ce0
Eugene Rozenfeld [Thu, 20 Dec 2018 23:58:29 +0000 (15:58 -0800)]
Fix jit warning in crossgen desktop build.
Commit migrated from https://github.com/dotnet/coreclr/commit/
75c8c54950c78f1192e481a5bbd6eeff1b3bd1cd
mikedn [Fri, 21 Dec 2018 00:10:27 +0000 (02:10 +0200)]
Don't morph volatile IND(ADDR(LCL_VAR)) (dotnet/coreclr#20843)
Besides the fact that volatile indirections aren't supposed to be removed doing so in this case results in incorrect code being generated.
The GT_IND node has GTF_DONT_CSE set and this gets copied to the GT_LCL_VAR node. Later this prevents the insertion of a normalization cast because GTF_DONT_CSE on a GT_LCL_VAR node is assumed to mean that the variable address is being taken.
Commit migrated from https://github.com/dotnet/coreclr/commit/
3e216841102ab82a6f4b276aadd8558d78819c12