platform/upstream/dotnet/runtime.git
6 years agoAdd IAsyncDisposable
Stephen Toub [Tue, 16 Oct 2018 01:18:18 +0000 (21:18 -0400)]
Add IAsyncDisposable

Commit migrated from https://github.com/dotnet/coreclr/commit/42df95953b43bdb68caccb996409edfae70a3b94

6 years agoAdd DumpDelegate sos command (dotnet/coreclr#20591)
Stephen Toub [Thu, 25 Oct 2018 20:01:56 +0000 (13:01 -0700)]
Add DumpDelegate sos command (dotnet/coreclr#20591)

* Add DumpDelegate sos command

Finding out what method a delegate points to today with SOS is tedious.  This PR adds a DumpDelegate command that simplifies it: give it the delegate address, and it outputs a line for each delegate that makes up the input delegate, where each line includes the target object, the method descriptor, and a friendly name.

* Address PR feedback

And fix some warnings that were showing up in CI but not locally.

Commit migrated from https://github.com/dotnet/coreclr/commit/468eab186f15e6e42a0041042dc37d97330f6697

6 years agoRemove debug-only file writers. (dotnet/coreclr#20612)
Brian Robbins [Thu, 25 Oct 2018 19:58:56 +0000 (12:58 -0700)]
Remove debug-only file writers. (dotnet/coreclr#20612)

Commit migrated from https://github.com/dotnet/coreclr/commit/6dd4270daf3ee49a08adedaf71a087de32c810a2

6 years agoMerge pull request dotnet/coreclr#20614 from AaronRobinsonMSFT/coreclr/20601
Aaron Robinson [Thu, 25 Oct 2018 17:36:30 +0000 (10:36 -0700)]
Merge pull request dotnet/coreclr#20614 from AaronRobinsonMSFT/coreclr/20601

Disable `IDispatch` test on Windows.Nano

Skipping CI verification since this is a non-code change and only impacts nightly runs.

Commit migrated from https://github.com/dotnet/coreclr/commit/14b80285d3023af2c786f2956064c74ab4b1c4c5

6 years agoDisable IDispatch test on Windows.Nano
Aaron Robinson [Thu, 25 Oct 2018 17:34:26 +0000 (10:34 -0700)]
Disable IDispatch test on Windows.Nano

Commit migrated from https://github.com/dotnet/coreclr/commit/3d874e34552692e0a8b4fc139c1830dcda249ee7

6 years agoDisable ExecuteInDefaultAppDomain test on *nix
Steve MacLean [Tue, 23 Oct 2018 17:29:16 +0000 (13:29 -0400)]
Disable ExecuteInDefaultAppDomain test on *nix

Commit migrated from https://github.com/dotnet/coreclr/commit/f3772edae65f2d1c7ac2e32df700dce5bb5c5408

6 years agoExecInDefAppDom add InjectCode test
Steve MacLean [Tue, 23 Oct 2018 19:35:36 +0000 (15:35 -0400)]
ExecInDefAppDom add InjectCode test

Commit migrated from https://github.com/dotnet/coreclr/commit/ae97eec9ba8206e3895e76dba1616f742e0631b2

6 years agoAdd test for ICLRRuntimeHost::ExecuteInDefaultAppDomain
Steve MacLean [Fri, 12 Oct 2018 19:10:06 +0000 (15:10 -0400)]
Add test for ICLRRuntimeHost::ExecuteInDefaultAppDomain

Commit migrated from https://github.com/dotnet/coreclr/commit/172506218ef056caf787f0ef4846c93c7f6ff53e

6 years agoAdd IID_ICLRRuntimeHost QueryInterface support
Steve MacLean [Sat, 13 Oct 2018 02:30:55 +0000 (22:30 -0400)]
Add IID_ICLRRuntimeHost QueryInterface support

Commit migrated from https://github.com/dotnet/coreclr/commit/b8b61f54feffd4e445a14e3008b19b6890fc62be

6 years agoRestore ExecuteInDefaultAppDomain implementation
Steve MacLean [Wed, 10 Oct 2018 16:50:30 +0000 (12:50 -0400)]
Restore ExecuteInDefaultAppDomain implementation

Restore deleted ExecuteInDefaultAppDomain implentation
Enable for CoreCLR
Cleanup for CoreCLR

Commit migrated from https://github.com/dotnet/coreclr/commit/acf316089c3e600987ae94fa1750a7dc3029a284

6 years agoAdd EventPipe Config File Option MultiFileSec (dotnet/coreclr#20548)
Brian Robbins [Thu, 25 Oct 2018 16:47:48 +0000 (09:47 -0700)]
Add EventPipe Config File Option MultiFileSec (dotnet/coreclr#20548)

Commit migrated from https://github.com/dotnet/coreclr/commit/c99e2dd5ebe9068db16d5273d080601368503039

6 years agoAvoid comparing capacity in StringBuilder.Equals (dotnet/coreclr#20567)
Petr Onderka [Thu, 25 Oct 2018 16:21:41 +0000 (18:21 +0200)]
Avoid comparing capacity in StringBuilder.Equals (dotnet/coreclr#20567)

* Avoid comparing capacity in StringBuilder.Equals

* Disabled corefx StringBuilder test

Commit migrated from https://github.com/dotnet/coreclr/commit/2e84928f84debcca03226e613fc84668c18bd261

6 years agoFallback to old behavior when marshaling a non-blittable fixed buffer (dotnet/coreclr...
Jeremy Koritzinsky [Thu, 25 Oct 2018 15:40:15 +0000 (08:40 -0700)]
Fallback to old behavior when marshaling a non-blittable fixed buffer (dotnet/coreclr#20575)

* Throw an exception only when attempting to marshal nonblittable fixed buffers to/from native instead of on all marshalling operations.

* Assert in debug and checked builds when trying to marshal a fixed buffer of a non-blittable type.

Commit migrated from https://github.com/dotnet/coreclr/commit/f7863cf3877a1ce17bde80b8e78ed5b9ba2cf8f5

6 years agoJIT: ensure float folding is done using float precision (dotnet/coreclr#20578)
Andy Ayers [Thu, 25 Oct 2018 15:17:49 +0000 (08:17 -0700)]
JIT: ensure float folding is done using float precision (dotnet/coreclr#20578)

Cast float folded values back to float before assigning to the double
the jit uses for storing FP literal constants.

Fixes dotnet/coreclr#20561.

No diffs on Core; exposing the original bug requires building RyuJit with
an older x86 C++ compiler that uses x87 floating point.

Commit migrated from https://github.com/dotnet/coreclr/commit/1370fb92bc9c1ae9475e92f8638c827128c84527

6 years agoFix comment Style (dotnet/coreclr#20604)
Thomas Schreiner [Thu, 25 Oct 2018 15:14:18 +0000 (17:14 +0200)]
Fix comment Style (dotnet/coreclr#20604)

Commit migrated from https://github.com/dotnet/coreclr/commit/e210c1cef74a6c245f91b8215772895e57a4813e

6 years agoUse IThreadPoolWorkItem in ConcurrentExclusiveSchedulerPair (dotnet/coreclr#20513)
Stephen Toub [Thu, 25 Oct 2018 15:03:37 +0000 (08:03 -0700)]
Use IThreadPoolWorkItem in ConcurrentExclusiveSchedulerPair (dotnet/coreclr#20513)

ConcurrentExclusiveSchedulerPair exposes two TaskSchedulers, one for concurrent processing and one for exclusive processing, such that any tasks scheduled are executed in a corresponding fashion.  CESP does that by itself scheduling workers to an underlying scheduler, and those workers in turn process the queued tasks.  Today this always queues those workers as Tasks, but if the underlying scheduler is TaskScheduler.Default (aka the thread pool), we can avoid per-worker allocations by using the new UnsafeQueueUserWorkItem overload that takes an IThreadPoolWorkItem, and just queueing the same worker object over and over and over.

Commit migrated from https://github.com/dotnet/coreclr/commit/f894c98420bfd2bfe398f9fdab34df0b99d13446

6 years agoJIT: emit debug info for locals for minopts/tier0 (dotnet/coreclr#20466)
Andy Ayers [Thu, 25 Oct 2018 15:02:24 +0000 (08:02 -0700)]
JIT: emit debug info for locals for minopts/tier0 (dotnet/coreclr#20466)

The jit no longer tracks locals when running at minopts. But untracked
local debug emission was tied to `cmpDebugCode. Change untracked local
debug emission to instead check if there are no tracked locals.

Fixes dotnet/coreclr#20421.

Note we could improve things further in the case where there is a mixture
of tracked and untracked locals. I have opened dotnet/coreclr#20465 for that as my first
attempts here had that ambition but ran into problems.

Commit migrated from https://github.com/dotnet/coreclr/commit/55520b9d64b360ff52c75317faf27890c241f4ff

6 years agoAvoid implicit long casts in uint compares (dotnet/coreclr#20511)
Ben Adams [Thu, 25 Oct 2018 05:34:10 +0000 (06:34 +0100)]
Avoid implicit long casts in uint compares (dotnet/coreclr#20511)

Commit migrated from https://github.com/dotnet/coreclr/commit/4fbeb37c62427b51410217cd49cec84e03fdca34

6 years agoAvoid having DateTime.TryParse throwing (dotnet/coreclr#20587)
Tarek Mahmoud Sayed [Thu, 25 Oct 2018 05:19:17 +0000 (22:19 -0700)]
Avoid having DateTime.TryParse throwing (dotnet/coreclr#20587)

* Avoid having DateTime.TryParse throwing

There are some cases during the parsing which will require adding ticks to the DateTime object we are creating during the parsing.
DateTime.AddTicks can throw which will make DateTime.TryParse fail with throwing instead of just returning false.

The fix here is to avoid throwing in the first place and let DateTime.TryParse return false on such failures.

* Remove the invalid link

Commit migrated from https://github.com/dotnet/coreclr/commit/2439be06aae193e6cd04442d344c02ec9629d04d

6 years agoAdd IsCollectible property to Assembly and necessary backing functions (dotnet/corecl...
John Salem [Thu, 25 Oct 2018 03:29:40 +0000 (20:29 -0700)]
Add IsCollectible property to Assembly and necessary backing functions (dotnet/coreclr#20574)

Commit migrated from https://github.com/dotnet/coreclr/commit/5d1acb06a0d426928cb8c9881ccd2400fe57abce

6 years agoGet the real update for Unicode 11 data (dotnet/coreclr#20589)
Tarek Mahmoud Sayed [Thu, 25 Oct 2018 03:04:43 +0000 (20:04 -0700)]
Get the real update for Unicode 11 data (dotnet/coreclr#20589)

In the PR dotnet/coreclr#20529 we have used the old existing data when we moved the file CharunicodeInfoData.cs to shared folder.
This change is to restore the actual updated file.

Commit migrated from https://github.com/dotnet/coreclr/commit/bbf09029f78dc096f9eade80ed2c1926c900f83b

6 years agoExclude IDispatch test for Windows Arm64 (dotnet/coreclr#20584)
Andy Ayers [Thu, 25 Oct 2018 02:32:43 +0000 (19:32 -0700)]
Exclude IDispatch test for Windows Arm64 (dotnet/coreclr#20584)

Disable for now while failures are investigated. See dotnet/coreclr#20580.

Commit migrated from https://github.com/dotnet/coreclr/commit/ebfdb30f648e40cfddcf7067d3ae0db382e8d206

6 years agoRemove support for nonexistent UnmanagedFunctionPointerAttribute.PreserveSig. (dotnet...
Jeremy Koritzinsky [Wed, 24 Oct 2018 22:56:33 +0000 (15:56 -0700)]
Remove support for nonexistent UnmanagedFunctionPointerAttribute.PreserveSig. (dotnet/coreclr#20396)

UnmanagedFunctionPointer doesn't have a PreserveSig attribute on framework or core, so remove the unused, confusing, and inaccurate support from the runtime.

Commit migrated from https://github.com/dotnet/coreclr/commit/ba97e4e878d36b3d75d410016143a7fba4ad53a9

6 years agoRun IBCMerge step for Linux on Windows (dotnet/coreclr#20496)
Michelle McDaniel [Wed, 24 Oct 2018 20:53:42 +0000 (13:53 -0700)]
Run IBCMerge step for Linux on Windows (dotnet/coreclr#20496)

This change does the following:

* Move the IBCOptimize step out of the Crossgen section and into the CoreLib build section of build.cmd
* Adds -ibconly which will skip building System.Private.CoreLib and only run the ibcmerge step
* Adds crossgenonly and partialngen flags to build.sh

These three changes facilitate our ability to apply IBC data to Linux assemblies on Windows and the perform the crossgen step on Linux, which will be our flow for official builds when we want to apply IBC data since IBCMerge cannot run on non-Windows platforms

Commit migrated from https://github.com/dotnet/coreclr/commit/ebc4bde180020a252e681cec44956fda18afdb8c

6 years agoUpdate Unicode data to version 11 (dotnet/coreclr#20529)
Tarek Mahmoud Sayed [Wed, 24 Oct 2018 19:58:58 +0000 (12:58 -0700)]
Update Unicode data to version 11 (dotnet/coreclr#20529)

* Update Unicode data to version 11

* Move CharUnicodeInfoData.cs to the hsared folder

* Delete un-needed file

* Disable the failed test

Commit migrated from https://github.com/dotnet/coreclr/commit/11c5d6cea57bffd86778fec8da62d3e3f9b1afa2

6 years agoMove ILLink and SizeOnDisk testing to Helix Queue (dotnet/coreclr#20569)
Michelle McDaniel [Wed, 24 Oct 2018 17:51:34 +0000 (10:51 -0700)]
Move ILLink and SizeOnDisk testing to Helix Queue (dotnet/coreclr#20569)

Commit migrated from https://github.com/dotnet/coreclr/commit/8939f019c34febbf0bab9dcc0f13b9ddc58735d8

6 years agoExpose EnableISA knobs in release build (dotnet/coreclr#20501)
Fei Peng [Wed, 24 Oct 2018 15:06:41 +0000 (08:06 -0700)]
Expose EnableISA knobs in release build (dotnet/coreclr#20501)

Commit migrated from https://github.com/dotnet/coreclr/commit/58f6d24dc7a32ad758b8b3806747e7431243a458

6 years agoMerge pull request dotnet/coreclr#20497 from AaronRobinsonMSFT/additional_com_tests
Aaron Robinson [Wed, 24 Oct 2018 03:22:24 +0000 (20:22 -0700)]
Merge pull request dotnet/coreclr#20497 from AaronRobinsonMSFT/additional_com_tests

Support for IDispatch

Commit migrated from https://github.com/dotnet/coreclr/commit/28ef0a4f6eb50988b0c1b6392894a3f7de6db6ad

6 years agoDelete duplicate CoreFX tests (dotnet/coreclr#20532)
Jan Kotas [Wed, 24 Oct 2018 02:59:39 +0000 (19:59 -0700)]
Delete duplicate CoreFX tests (dotnet/coreclr#20532)

Contributes to https://github.com/dotnet/coreclr/issues/12782

Commit migrated from https://github.com/dotnet/coreclr/commit/377e744a976d09d1d392f43e7fa8a999401fe74f

6 years agoInitialize `StructReturnType` for `gtNewRefCOMfield`. (dotnet/coreclr#20056)
Sergey Andreenko [Wed, 24 Oct 2018 01:06:57 +0000 (18:06 -0700)]
Initialize `StructReturnType` for `gtNewRefCOMfield`. (dotnet/coreclr#20056)

The issue could be repro only on .Net Framework, because this helper is only needed for remoting, that .Net Core doesn't have.

Commit migrated from https://github.com/dotnet/coreclr/commit/f69b623c9f41c5d358d52f40e5cdad808b005bed

6 years agoJIT: recover types from helper calls and more (dotnet/coreclr#20447)
Andy Ayers [Wed, 24 Oct 2018 00:00:11 +0000 (17:00 -0700)]
JIT: recover types from helper calls and more (dotnet/coreclr#20447)

The jit needs to recover class handles in order to devirtualize and
do other type-based optimizations. This change allows the jit to find
the type for more trees: in particular, helper calls, intrinsics, and
expanded static field accesses.

Also, annotate a few methods to control jit optimization

We don't want to optimize special methods that are used to inform crossgen
about desirable generic instantiations. `CommonlyUsedGenericInstantiations`
was already annotated but `CommonlyUsedWinRTRedirectedInterfaceStubs` wasn't.

And because `RuntimeType` is sealed calls through types are now often
devirtualized. Name lookups on types are frequent, especially on error paths.
The method `GetCachedName` looks like an attractive inline but simply expands
into a larger sequence of two other calls. So block it from being inlined.

Commit migrated from https://github.com/dotnet/coreclr/commit/5af4d641711ba91d6bfa5bcdc510e35cec108754

6 years agoUse the same version of Xunit as in corefx (2.4.1 prerelease) (dotnet/coreclr#20506)
Egor Chesakov [Tue, 23 Oct 2018 23:27:24 +0000 (16:27 -0700)]
Use the same version of Xunit as in corefx (2.4.1 prerelease) (dotnet/coreclr#20506)

From https://xunit.github.io/releases/2.4.1-pre-4059

**xUnit.net 2.4.1 Pre-Release (build 4059)**

Core framework
* BUG: Fixed an issue with xunit.abstractions not correctly installing with older versions of Visual Studio (pre-2017).
* BUG: Fixed an issue with ByRef types with .NET Core 2.1.
* BUG: Removed an unnecessary first chance exception related to attempting to load configuration files.
* BUG: Fixed an issue where synchronous and asynchronous disposal of test classes were running in parallel. The documented behavior is that asynchronous disposal (via IAsyncLifetime) runs to completion before synchronous disposal (via IDisposable).

Console runner
* BUG: Fixed an issue with XML element order with the NUnit report.

MSBuild runner
* BUG: Fixed an issue with XML element order with the NUnit report.

Commit migrated from https://github.com/dotnet/coreclr/commit/f53df5b2ac4c3417e0777cb8fe2fca9cf011ede1

6 years agoMerge pull request dotnet/coreclr#20537 from BruceForstall/RemoveLocAllocSP
Bruce Forstall [Tue, 23 Oct 2018 22:54:14 +0000 (15:54 -0700)]
Merge pull request dotnet/coreclr#20537 from BruceForstall/RemoveLocAllocSP

Remove the LocAllocSP slot for non-x86 platforms

Commit migrated from https://github.com/dotnet/coreclr/commit/41f935f8948acd378986df6c9b6bf7a19bb429f9

6 years agoMerge pull request dotnet/coreclr#20552 from fiigii/retest
Carol Eidt [Tue, 23 Oct 2018 22:52:18 +0000 (22:52 +0000)]
Merge pull request dotnet/coreclr#20552 from fiigii/retest

Rewrite and re-enable some hardware intrinsic tests

Commit migrated from https://github.com/dotnet/coreclr/commit/7e7570d8f7cb4e81396b26ebc7c4efa88f6dcbb1

6 years agoAdd PInvoke/Delegate tests (dotnet/coreclr#19323)
Zeng Jiang [Tue, 23 Oct 2018 21:05:57 +0000 (05:05 +0800)]
Add PInvoke/Delegate tests (dotnet/coreclr#19323)

* Add PInvoke/Delegate tests

* Initial pass to get Delegate tests building xplat and running with current infrastructure.

* Fix BOOL and NULL comparisons.

* Fix copy-paste typo

* Disable explicit offset tests off-Windows.

Commit migrated from https://github.com/dotnet/coreclr/commit/77aa9586d5a5aff401f9461de7252c27648a2763

6 years agoRe-enable hardware intrinsic tests
Fei Peng [Tue, 23 Oct 2018 18:57:08 +0000 (11:57 -0700)]
Re-enable hardware intrinsic tests

Commit migrated from https://github.com/dotnet/coreclr/commit/61f784133cd51c7258fa0991734bd9899061d3df

6 years agoUpdate BuildTools, CoreClr, CoreSetup, IbcData, PgoData to preview1-03322-02, preview...
dotnet-maestro-bot [Tue, 23 Oct 2018 18:34:57 +0000 (11:34 -0700)]
Update BuildTools, CoreClr, CoreSetup, IbcData, PgoData to preview1-03322-02, preview1-27023-01, preview1-27023-01, master-20181023-0040, master-20181023-0039, respectively (master) (dotnet/coreclr#20502)

* Update BuildTools, CoreClr, CoreSetup, IbcData, PgoData to preview1-03322-02, preview1-27023-01, preview1-27023-01, master-20181023-0040, master-20181023-0039, respectively

* excluding DebugTests

Commit migrated from https://github.com/dotnet/coreclr/commit/cd89eaf4ecf86a877187ebe2b091d4ed17db7c0e

6 years agoAdd tests for IDispatch and Aggregation
Aaron Robinson [Mon, 1 Oct 2018 21:49:40 +0000 (14:49 -0700)]
Add tests for IDispatch and Aggregation

Commit migrated from https://github.com/dotnet/coreclr/commit/177a80924432bcfcb60cc6218126e0b45c7941d4

6 years agoAdd support for IDispatch in CoreCLR
Aaron Robinson [Fri, 19 Oct 2018 20:03:37 +0000 (13:03 -0700)]
Add support for IDispatch in CoreCLR

Reduce some TypeInfo API cruft

Throw exception on non-Windows ABIs for value types

Commit migrated from https://github.com/dotnet/coreclr/commit/b5dc2a822331595f79b6ada42c8feff63ae0cc96

6 years agoFix System.Diagnostics.Debug.Tests assembly name
Jan Kotas [Tue, 23 Oct 2018 15:37:57 +0000 (08:37 -0700)]
Fix System.Diagnostics.Debug.Tests assembly name

Commit migrated from https://github.com/dotnet/coreclr/commit/b39e93a2d202c833ea888e8162a120c545b3a5e4

6 years agoDisable System.Diagnostics.Tests CoreFX tests
Jan Kotas [Tue, 23 Oct 2018 12:21:04 +0000 (05:21 -0700)]
Disable System.Diagnostics.Tests CoreFX tests

Commit migrated from https://github.com/dotnet/coreclr/commit/6bf346bb7401b40eaa4a9d601033e54c003f6d24

6 years agoRemove the LocAllocSP slot for non-x86 platforms
Bruce Forstall [Tue, 23 Oct 2018 04:39:16 +0000 (21:39 -0700)]
Remove the LocAllocSP slot for non-x86 platforms

This special local variable is only needed on x86 when a function
contains localloc.

Commit migrated from https://github.com/dotnet/coreclr/commit/c8a63947382b0db428db602238199ca81badbe8e

6 years agoadd missing methods bit (dotnet/coreclr#20528)
Andy Ayers [Mon, 22 Oct 2018 23:39:23 +0000 (16:39 -0700)]
add missing methods bit (dotnet/coreclr#20528)

Commit migrated from https://github.com/dotnet/coreclr/commit/2aa1b3c4c02ccff960fef72fe96175d9f62bb6d9

6 years agoAes/Pclmulqdq IsSupported should depend on Ssse3 (dotnet/coreclr#20469)
Fei Peng [Mon, 22 Oct 2018 23:37:26 +0000 (16:37 -0700)]
Aes/Pclmulqdq IsSupported should depend on Ssse3 (dotnet/coreclr#20469)

Commit migrated from https://github.com/dotnet/coreclr/commit/a581e9b63f4fa42b1913640c24df2257cf54f2fb

6 years agoAdditionally Vectorize string.IndexOfAny for value lengths 2,3,4,5 (dotnet/coreclr...
Ben Adams [Mon, 22 Oct 2018 20:32:37 +0000 (21:32 +0100)]
Additionally Vectorize string.IndexOfAny for value lengths 2,3,4,5 (dotnet/coreclr#19790)

* Vectorize string.IndexOfAny

* Vectorize string.IndexOfAny [4,5]

* Feedback

* Call order preference

Commit migrated from https://github.com/dotnet/coreclr/commit/018df68ca8c15356a345adc81ef74d1f246df04c

6 years agoJIT: improve simplification of IND(ADDR(x)) (dotnet/coreclr#20508)
Andy Ayers [Mon, 22 Oct 2018 20:14:57 +0000 (13:14 -0700)]
JIT: improve simplification of IND(ADDR(x)) (dotnet/coreclr#20508)

Some `IND(ADDR(x))` trees were not being optimized to `x` by morph,
particularly when `x` was the promoted pointer field of a `Span`.
Instead they were creating local fields that blocked enregistration
and lead to store-load pairs like:

```asm
       mov      bword ptr [rsp+20H], rax
       mov      rax, bword ptr [rsp+20H]
```

Add logic to `fgMorphSmpOp`'s `GT_IND` clause to recognize and simplify
these cases.

Commit migrated from https://github.com/dotnet/coreclr/commit/c0aa74fe584a04f8c7c8e81882793a136ee074d9

6 years agoAdding DebugProvider to help override Write and ShowDialog behavior (dotnet/coreclr...
Maryam Ariyan [Mon, 22 Oct 2018 18:52:34 +0000 (11:52 -0700)]
Adding DebugProvider to help override Write and ShowDialog behavior (dotnet/coreclr#20419)

* Adding DebugProvider to help override Dialog Write and ShowDialog behavior.

- New SetProvider returns previous DebugProvider while exchanging to new one
- Will keep the s_WriteCore delegates for tests until the next PR to fix indentation is merged

Related to: dotnet/corefxdotnet/coreclr#3708, dotnet/corefxdotnet/coreclr#31003

* Move ShowDialog and Write logic from Debug to DebugProvider

* disabling DebugTests

Commit migrated from https://github.com/dotnet/coreclr/commit/961f131758e510927676e13bc2f4533b3e0cb42a

6 years agoRemove several Timer-related allocations from CancellationTokenSource (dotnet/coreclr...
Stephen Toub [Mon, 22 Oct 2018 18:27:05 +0000 (11:27 -0700)]
Remove several Timer-related allocations from CancellationTokenSource (dotnet/coreclr#20509)

When CancellationTokenSource creates a Timer, it passes itself as state, which then results in the Timer being rooted while it's scheduled.  As such, the Timer object itself and the TimerHolder object it creates are largely irrelevant, and since CancellationTokenSource has access, it can just create the underlying TimerQueueTimer object directly.  This means that every CTS that creates a Timer now creates two fewer objects, one of which was finalizable.

Commit migrated from https://github.com/dotnet/coreclr/commit/628df3872905496e12a8252da7eb7731c05be4b4

6 years agoDisable stale Unix_NonExistentPath_Nop corefx test (dotnet/coreclr#20512)
Stephen Toub [Mon, 22 Oct 2018 07:58:46 +0000 (00:58 -0700)]
Disable stale Unix_NonExistentPath_Nop corefx test (dotnet/coreclr#20512)

* Disable stale Unix_NonExistentPath_Nop corefx test

* Disable another test

Commit migrated from https://github.com/dotnet/coreclr/commit/a1e13b7a9367a6507db0395f27e659566bbea151

6 years agoAdd MethodImplAttributes.AggressiveOptimization (dotnet/coreclr#20274)
Koundinya Veluri [Sat, 20 Oct 2018 15:51:41 +0000 (08:51 -0700)]
Add MethodImplAttributes.AggressiveOptimization (dotnet/coreclr#20274)

API review: https://github.com/dotnet/corefx/issues/32628

Commit migrated from https://github.com/dotnet/coreclr/commit/292c215a4eb7182599634e128c9e2518f7def7db

6 years agoUpdate BuildTools, CoreClr, CoreFx, CoreSetup, IbcData, PgoData to preview1-03316...
dotnet-maestro-bot [Sat, 20 Oct 2018 04:11:22 +0000 (21:11 -0700)]
Update BuildTools, CoreClr, CoreFx, CoreSetup, IbcData, PgoData to preview1-03316-04, preview1-27020-01, preview1-27018-01, preview1-27019-05, master-20181019-1034, master-20181019-1032, respectively (dotnet/coreclr#20376)

Commit migrated from https://github.com/dotnet/coreclr/commit/137db83d114743afffa713d8c9f6500c272a6999

6 years agoLocal GC - Fix GCToOSInterface::GetPhysicalMemoryLimit (dotnet/coreclr#20495)
David Mason [Sat, 20 Oct 2018 00:41:25 +0000 (17:41 -0700)]
Local GC - Fix GCToOSInterface::GetPhysicalMemoryLimit (dotnet/coreclr#20495)

We weren't setting memStatus->dwLength so the call to GlobalMemoryStatusEx would fail and we would return 0. This caused the standalone GC to get in to a state where we wouldn't allocate more memory for the GC heap even if there was plenty available on the machine.

Commit migrated from https://github.com/dotnet/coreclr/commit/3ff82040ea7be4f8c260b237690f2f0553c7cac6

6 years agoAdd PInvoke/DateTime tests (dotnet/coreclr#19298)
Zeng Jiang [Fri, 19 Oct 2018 21:33:55 +0000 (05:33 +0800)]
Add PInvoke/DateTime tests (dotnet/coreclr#19298)

* Add PInvoke/DateTime tests

* Make DateTimeTest windows-only

* Update managed side to current infrastructure

* Link to OleAut32.

* Add missing target_link_libraries command.

Commit migrated from https://github.com/dotnet/coreclr/commit/15c684b458d3134c51dc5c509853ff21efcf38b5

6 years agoMerge pull request dotnet/coreclr#20472 from BruceForstall/ImproveLoopCloningArm64
Bruce Forstall [Fri, 19 Oct 2018 17:28:26 +0000 (10:28 -0700)]
Merge pull request dotnet/coreclr#20472 from BruceForstall/ImproveLoopCloningArm64

Fix loop cloning array index recognition for arm64

Commit migrated from https://github.com/dotnet/coreclr/commit/679a82368d9fbeaae343630d1e509e7d8acbf1c6

6 years agoAdd PInvoke/ExactSpelling tests (dotnet/coreclr#19303)
Zeng Jiang [Fri, 19 Oct 2018 17:07:59 +0000 (01:07 +0800)]
Add PInvoke/ExactSpelling tests (dotnet/coreclr#19303)

* Add PInvoke/ExactSpelling tests

Refactor tests to fit with the rest of the Interop tests.

Fix up test to cleanly run.

Change CMakeLists.txt to match the rest of the tests.

Include Interop.cmake in CMakeLists.txt

Remove Service.

* On x86 enable stdcall mangling irrespective of ExactSpelling and account for the charset suffix when ExactSpelling = false.

Change variable name.

Clean up the FindEntryPoint. The logic flow now matches CoreRT + CoreCLR specific features (ordinals and stdcall mangling).

PR Feedback.

Fix format specifier.

Add back probing null check.

Fix offset calculation for stdcall mangling.

Probe the stdcall-mangled versions of the original entry-point names when ExactSpelling isn't set.

Cleanup.

Commit migrated from https://github.com/dotnet/coreclr/commit/f56dc8e76dc4bdf66b1f4376a9b8d0fc107c5926

6 years agoDelete redundant framework API tests (dotnet/coreclr#20481)
Jan Kotas [Fri, 19 Oct 2018 03:38:25 +0000 (20:38 -0700)]
Delete redundant framework API tests (dotnet/coreclr#20481)

Contributes to https://github.com/dotnet/coreclr/issues/12782

Commit migrated from https://github.com/dotnet/coreclr/commit/6091ddbd6e531c82c7a5db015b587b57aa09fbf4

6 years agoAdd PInvoke/Primitives/Int tests (dotnet/coreclr#19304)
Zeng Jiang [Thu, 18 Oct 2018 17:19:12 +0000 (01:19 +0800)]
Add PInvoke/Primitives/Int tests (dotnet/coreclr#19304)

* Add PInvoke/Primitives/Int tests

* Clean up Int tests to pass xplat.

Commit migrated from https://github.com/dotnet/coreclr/commit/577aafcdc7122649cb4c74c617aef597d194ac05

6 years ago[RyuJIT] Delete dead code (dotnet/coreclr#20411)
mikedn [Thu, 18 Oct 2018 15:15:21 +0000 (18:15 +0300)]
[RyuJIT] Delete dead code (dotnet/coreclr#20411)

* Delete dead code

optFindLocalInit and related functions (optIsTrackedLocal, lvaLclVarRefs, lvaLclVarRefsAccumIntoRes, lvaLclVarRefsAccum) are not used anywhere.
Also delete a bunch of undefined function declarations.

* Cleanup DataFlow callback comment

Commit migrated from https://github.com/dotnet/coreclr/commit/a0c8ff74c46cb7792796171eea9122d10a9f9bcd

6 years agoAdd public IThreadPoolWorkItem (dotnet/coreclr#20387)
Stephen Toub [Thu, 18 Oct 2018 10:01:49 +0000 (06:01 -0400)]
Add public IThreadPoolWorkItem (dotnet/coreclr#20387)

- Changes the internal IThreadPoolWorkItem to be public, removing the legacy ThreadAbortException from it (which was specific to Task, anyway).
- Removes the IThreadPoolWorkItem implementation from Task, so that devs can't write code like `ThreadPool.UnsafeQueueUserWorkItem(task);` or `((IThreadPoolWorkItem)task).Execute();`, both of which could end up doing a variety of bad things that could show up in a variety of ways, some discoverable, some less so.
- Adds an internal UnsafeQueueUserWorkItemInternal that takes object so that it can be passed either an IThreadPoolUserWorkItem or a Task,
- Changes the ThreadPool's queues to be in terms of object instead of IThreadPoolWorkItem
- Changes the dispatch loop to type check for IThreadPoolWorkItem or Task so that both remain supported.

Commit migrated from https://github.com/dotnet/coreclr/commit/0c7781113cec74ed69aa6a38f9a3e845f40c3680

6 years agoRemove unnecessary interpreter fallback (dotnet/coreclr#20470)
Bruce Forstall [Thu, 18 Oct 2018 03:52:39 +0000 (20:52 -0700)]
Remove unnecessary interpreter fallback (dotnet/coreclr#20470)

This was added for arm64 bring-up. Remove it, and the associated TODO.

Fixes dotnet/coreclr#19696

Commit migrated from https://github.com/dotnet/coreclr/commit/c29b1261a367816a6802df4fc0e4939d047ee919

6 years agoRevert List.InsertRange changes from dotnet/coreclr#8306 (dotnet/coreclr#20471)
Stephen Toub [Thu, 18 Oct 2018 03:52:11 +0000 (23:52 -0400)]
Revert List.InsertRange changes from dotnet/coreclr#8306 (dotnet/coreclr#20471)

Commit migrated from https://github.com/dotnet/coreclr/commit/4b98caf278c8ac42f14ed90489d2566639018b04

6 years agoFix loop cloning array index recognition for arm64
Bruce Forstall [Thu, 18 Oct 2018 01:22:02 +0000 (18:22 -0700)]
Fix loop cloning array index recognition for arm64

arm64 Checked PMI altjit frameworks asm diffs:
```
Found 95 files with textual diffs.

Summary:
(Lower is better)

Total bytes of diff: 30144 (0.15% of base)
    diff is a regression.

Top file regressions by size (bytes):
       11772 : System.Private.CoreLib.dasm (2.06% of base)
        1768 : Microsoft.CodeAnalysis.dasm (0.26% of base)
        1764 : System.Private.DataContractSerialization.dasm (0.19% of base)
        1692 : Microsoft.CSharp.dasm (0.49% of base)
        1436 : System.Collections.Immutable.dasm (0.16% of base)

Top file improvements by size (bytes):
         -80 : NuGet.Packaging.dasm (-0.04% of base)
         -28 : xunit.execution.dotnet.dasm (-0.10% of base)
         -24 : Microsoft.Win32.Registry.dasm (-0.10% of base)
         -20 : Microsoft.DotNet.ProjectModel.dasm (-0.01% of base)
          -4 : System.IO.Compression.dasm (-0.01% of base)

39 total files with size differences (6 improved, 33 regressed), 90 unchanged.

Top method regressions by size (bytes):
        5908 (83.87% of base) : System.Private.CoreLib.dasm - System.DefaultBinder:BindToMethod(int,ref,byref,ref,ref,ref,byref):ref:this
         884 (62.96% of base) : Microsoft.CSharp.dasm - Microsoft.CSharp.RuntimeBinder.Errors.ErrorHandling:Error(int,ref):ref
         740 (38.14% of base) : Microsoft.VisualBasic.dasm - Microsoft.VisualBasic.CompilerServices.OverloadResolution:MoreSpecificProcedure(ref,ref,ref,ref,int,byref,bool):ref
         728 (48.02% of base) : System.Private.CoreLib.dasm - System.DefaultBinder:SelectMethod(int,ref,ref,ref):ref:this
         668 (38.84% of base) : System.Private.CoreLib.dasm - System.DefaultBinder:SelectProperty(int,ref,ref,ref,ref):ref:this

Top method improvements by size (bytes):
         -80 (-2.42% of base) : NuGet.Packaging.dasm - <<InstallFromSourceAsync>b__0>d:MoveNext():this
         -40 (-10.10% of base) : Microsoft.Diagnostics.Tracing.TraceEvent.dasm - Microsoft.Diagnostics.Utilities.DirectoryUtilities:Clean(ref):int
         -32 (-5.63% of base) : System.Private.DataContractSerialization.dasm - System.Xml.XmlDictionaryReader:ReadContentAs(ref,ref):ref:this
         -28 (-3.24% of base) : xunit.execution.dotnet.dasm - Xunit.Serialization.XunitSerializationInfo:CanSerializeObject(ref):bool
         -24 (-2.38% of base) : Microsoft.CSharp.dasm - Microsoft.CSharp.RuntimeBinder.SymbolTable:AddConversionsForOneType(ref)

Top method regressions by size (percentage):
         468 (110.38% of base) : System.Data.Common.dasm - System.Data.ConstraintCollection:BaseGroupSwitch(ref,int,ref,int):this
        5908 (83.87% of base) : System.Private.CoreLib.dasm - System.DefaultBinder:BindToMethod(int,ref,byref,ref,ref,ref,byref):ref:this
         480 (82.76% of base) : System.Web.HttpUtility.dasm - System.Web.Util.HttpEncoder:UrlEncodeUnicode(ref):ref
         624 (78.00% of base) : System.Private.CoreLib.dasm - System.DefaultBinder:FindMostSpecific(ref,ref,ref,ref,ref,ref,ref,ref):int
         148 (74.00% of base) : System.Private.Xml.dasm - System.Xml.ValidateNames:ParseNmtokenNoNamespaces(ref,int):int

Top method improvements by size (percentage):
          -4 (-14.29% of base) : System.Collections.Immutable.dasm - System.Collections.Immutable.ImmutableStack`1[Int32][System.Int32]:System.Collections.Immutable.IImmutableStack<T>.Pop():ref:this
         -40 (-10.10% of base) : Microsoft.Diagnostics.Tracing.TraceEvent.dasm - Microsoft.Diagnostics.Utilities.DirectoryUtilities:Clean(ref):int
          -4 (-6.67% of base) : System.Collections.Immutable.dasm - System.Collections.Immutable.ImmutableStack`1[Int32][System.Int32]:Pop(byref):ref:this
         -20 (-6.58% of base) : Microsoft.DotNet.ProjectModel.dasm - Microsoft.DotNet.ProjectModel.Resolution.FrameworkReferenceResolver:GetFrameworkInformation(ref):ref:this
         -32 (-5.63% of base) : System.Private.DataContractSerialization.dasm - System.Xml.XmlDictionaryReader:ReadContentAs(ref,ref):ref:this

180 total methods with size differences (36 improved, 144 regressed), 100761 unchanged.

18 files had text diffs but not size diffs.
System.Resources.Writer.dasm had 171 diffs
System.Security.Permissions.dasm had 76 diffs
System.IO.FileSystem.dasm had 40 diffs
System.IO.IsolatedStorage.dasm had 34 diffs
NuGet.Frameworks.dasm had 26 diffs
```

Commit migrated from https://github.com/dotnet/coreclr/commit/5707d88a4ce1f31ff92d3663161b8c494d3e26e4

6 years agoEnable code to prevent bad byrefs on all platforms (dotnet/coreclr#20446)
Bruce Forstall [Thu, 18 Oct 2018 01:20:07 +0000 (18:20 -0700)]
Enable code to prevent bad byrefs on all platforms (dotnet/coreclr#20446)

Loop cloning is doing pattern recognition on the morphed form of a GT_INDEX
node. That form has now changed, so update to match the new form.

Fixes dotnet/coreclr#17571

Commit migrated from https://github.com/dotnet/coreclr/commit/692925708ac2f600d41c07eeaf729d219264d0d5

6 years agoPrint Tier-0 or Tier-1 to JIT dump output (dotnet/coreclr#20453)
Bruce Forstall [Wed, 17 Oct 2018 23:28:29 +0000 (16:28 -0700)]
Print Tier-0 or Tier-1 to JIT dump output (dotnet/coreclr#20453)

* Print Tier-0 or Tier-1 to JIT dump output

Make it very obvious we've been asked to generate Tier-0 code.

* Print Tier-0 or Tier-1 in assembly output, as appropriate

Commit migrated from https://github.com/dotnet/coreclr/commit/ff467045bc24fcf890ca6f1b58c647cc44b013bd

6 years agoFix collectible NativeCallable UMThunkEntry lifetime (dotnet/coreclr#20438)
Jan Vorlicek [Wed, 17 Oct 2018 23:20:36 +0000 (16:20 -0700)]
Fix collectible NativeCallable UMThunkEntry lifetime (dotnet/coreclr#20438)

* Fix collectible NativeCallable UMThunkEntry lifetime

The UMEntryThunk cache entries created for NativeCallable target methods
for collectible classes were not properly cleaned up at the unload time.
This change fixes that by adding UMEntryThunkCache on LoaderAllocator
and using it for entries belonging to NativeCallable targets on
collectible classes. The cache is created lazily.

* Reflect PR feedback

Remove the UMEntryThunk cache from the AppDomain and leave it just on
the LoaderAllocator.

Commit migrated from https://github.com/dotnet/coreclr/commit/2ac658f8df5ba07b68e1d06482089ca49ac83fc3

6 years agoMerge pull request dotnet/coreclr#20464 from brianrob/eventpipe_configpath
Vance Morrison [Wed, 17 Oct 2018 20:57:17 +0000 (13:57 -0700)]
Merge pull request dotnet/coreclr#20464 from brianrob/eventpipe_configpath

Use AppContext.BaseDirectory to Search for EventPipeConfig File

Commit migrated from https://github.com/dotnet/coreclr/commit/143d5a2ebb0c49e33ed60b9fb69cedd0aeffe3d1

6 years agoUse AppContext.BaseDirectory instead of AppDomain.CurrentDomain.BaseDirectory when...
Brian Robbins [Wed, 17 Oct 2018 20:30:58 +0000 (13:30 -0700)]
Use AppContext.BaseDirectory instead of AppDomain.CurrentDomain.BaseDirectory when initializing EventPipeController.

Commit migrated from https://github.com/dotnet/coreclr/commit/e7c522f83adb42551e828d67e133362d5a1cebdd

6 years agoDelete `FixupIfSIMDLocal`. (dotnet/coreclr#20360)
Sergey Andreenko [Wed, 17 Oct 2018 18:37:20 +0000 (11:37 -0700)]
Delete `FixupIfSIMDLocal`. (dotnet/coreclr#20360)

* Fix the strange `ifdef ` placement.

* Fix comments/refactoring of `LinearScan::BuildReturn`.

* Delete `FixupIfSIMDLocal`.

Do not change `LCL_FLD(long)` back to `LCL_VAR(simd8)`,

Commit migrated from https://github.com/dotnet/coreclr/commit/f825219b77bc6545cd2c29216934ad7621f00ab1

6 years agoReplace 'VSCode' by 'Visual Studio Code' in doc (dotnet/coreclr#20441)
Antoine Blanchet [Wed, 17 Oct 2018 17:24:55 +0000 (13:24 -0400)]
Replace 'VSCode' by 'Visual Studio Code' in doc (dotnet/coreclr#20441)

Visual Studio Code is also broadly known as VSCode. But since this document already contained a typo
and Visual Studio Code is not referred as VSCode elsewhere in the CoreCLR documentation I figured it could
be nice to _clean_ this documentation page.

Commit migrated from https://github.com/dotnet/coreclr/commit/b52ab56aa5035c389c1bf1816d4855212fffed3f

6 years agoMerge pull request dotnet/coreclr#20455 from BruceForstall/DisableFinalize
Bruce Forstall [Wed, 17 Oct 2018 16:21:13 +0000 (09:21 -0700)]
Merge pull request dotnet/coreclr#20455 from BruceForstall/DisableFinalize

Disable GC finalizearraysleep, finalizearray tests for arm32

Commit migrated from https://github.com/dotnet/coreclr/commit/782d1b60f9f40bf6d2a1ae8bae8e3650826f381c

6 years agoFix duplicate cast in RuntimeMethodInfo.GetCustomAttributes() (dotnet/coreclr#20463)
Nick Craver [Wed, 17 Oct 2018 16:02:34 +0000 (12:02 -0400)]
Fix duplicate cast in RuntimeMethodInfo.GetCustomAttributes() (dotnet/coreclr#20463)

The "as RuntimeType as RuntimeType" cast was redundant here - noticed this when digging into other issues. I couldn't trace how far back this goes due to file moves, but full framework has the same code issue.

Commit migrated from https://github.com/dotnet/coreclr/commit/1f4f005ff53b0d8321c5fb0223d4db8c01e6f212

6 years agomake coreclr buildable on FreeBSD again (dotnet/coreclr#20459)
Tomas Weinfurt [Wed, 17 Oct 2018 14:30:46 +0000 (07:30 -0700)]
make coreclr buildable on FreeBSD again (dotnet/coreclr#20459)

Commit migrated from https://github.com/dotnet/coreclr/commit/8b0019c927b6cfb1d35e91ab7a902c54c233eac8

6 years agoOptimizes StackTrace string generation (dotnet/coreclr#20448)
Nick Craver [Wed, 17 Oct 2018 03:40:03 +0000 (23:40 -0400)]
Optimizes StackTrace string generation (dotnet/coreclr#20448)

When looking for compiler generated async state machine types and methods, we need not look at parents in the reflection path. This introduces additional overhead in both .IsDefined() and .GetCustomAttributes<T>() in every path.

See the short circuit path in: https://github.com/dotnet/coreclr/blob/dotnet/coreclr@57f8358221a3c4ad7f1608f625bc3c5936618505/src/System.Private.CoreLib/src/System/Reflection/CustomAttribute.cs#L1315-L1320

We can avoid the list allocation, the array from it, and the resulting combined array by not looking for inherited attributed members that cannot exist for our purposes of creating a stack trace.

Commit migrated from https://github.com/dotnet/coreclr/commit/34327d31eb4f0e57e2a886ac31ca5eadfaa2985b

6 years agoFix resetting of m_hasArgLocDescForStructInRegs (dotnet/coreclr#20450)
David Wrighton [Wed, 17 Oct 2018 03:39:34 +0000 (20:39 -0700)]
Fix resetting of m_hasArgLocDescForStructInRegs (dotnet/coreclr#20450)

- Also add testcase

Fixes dotnet/coreclr#20449

Commit migrated from https://github.com/dotnet/coreclr/commit/cf1b104f428bcb0cd1667ecdc1a613b7ddf1d1cd

6 years agoStructured dump of instance entrypoints and decoding generic lookups (dotnet/coreclr...
Tomáš Rylek [Wed, 17 Oct 2018 03:08:11 +0000 (20:08 -0700)]
Structured dump of instance entrypoints and decoding generic lookups (dotnet/coreclr#20433)

1) Dump method signatures in the INSTANCE_METHOD_ENTRYPOINTS section;

2) Add logic for decoding generic lookups;

3) Add previously missing support for dumping MVAR index.

Thanks

Tomas

Commit migrated from https://github.com/dotnet/coreclr/commit/57d101bf25c31973ec01872506f9c7e12933f2b3

6 years agoAdd hack for arm64/x86 to skip build tools restore (dotnet/coreclr#20390)
Jarret Shook [Wed, 17 Oct 2018 01:26:56 +0000 (18:26 -0700)]
Add hack for arm64/x86 to skip build tools restore (dotnet/coreclr#20390)

* Add hack for arm64/x86 to skip build tools restore

* Address pr feedback

* Correct PROCESSOR_ARCHITEW6432 comparison

Commit migrated from https://github.com/dotnet/coreclr/commit/683aa87d4649e62a1429aafb6441fce3c3ff1420

6 years agoHigh entropy ASLR for native images
Simon Nattress [Tue, 16 Oct 2018 18:07:25 +0000 (11:07 -0700)]
High entropy ASLR for native images

Enable high entropy for 64bit native images, which expands the set of virtual address bases a native image can be loaded at.

Commit migrated from https://github.com/dotnet/coreclr/commit/75a5f7042e7ce91ba97ae00ccbe53a3c57880fa9

6 years agoMerge pull request dotnet/coreclr#20431 from BruceForstall/IlasmArm64
Bruce Forstall [Wed, 17 Oct 2018 00:19:30 +0000 (17:19 -0700)]
Merge pull request dotnet/coreclr#20431 from BruceForstall/IlasmArm64

Add ARM64 support to ilasm/ildasm

Commit migrated from https://github.com/dotnet/coreclr/commit/2ad81aeb22b2dda33c2911bb88038403b5ff6d40

6 years agoDisable GC finalizearraysleep, finalizearray tests for arm32
Bruce Forstall [Wed, 17 Oct 2018 00:14:25 +0000 (17:14 -0700)]
Disable GC finalizearraysleep, finalizearray tests for arm32

Tracked by dotnet/coreclr#19218

Commit migrated from https://github.com/dotnet/coreclr/commit/90ad42bfa0a178b4182a67878f73c6c20b073141

6 years agoFix behavior of TextWriter.Write with null StringBuilder (dotnet/coreclr#20451)
Stephen Toub [Wed, 17 Oct 2018 00:09:11 +0000 (20:09 -0400)]
Fix behavior of TextWriter.Write with null StringBuilder (dotnet/coreclr#20451)

With other overloads (including Write(object)) if you passed null it just wouldn't write anything out, so we shouldn't throw for the StringBuilder overload either.

Commit migrated from https://github.com/dotnet/coreclr/commit/fae09cbe1c1d66beccf6cc4917732e2d0a6dc84c

6 years agoRemove per-AppDomain TLB (dotnet/coreclr#20423)
Jan Vorlicek [Tue, 16 Oct 2018 23:42:33 +0000 (16:42 -0700)]
Remove per-AppDomain TLB (dotnet/coreclr#20423)

Since there is only one AppDomain, there is no need for a per-AppDomain
TLB table for each Thread. This change removes that table and thus gets
rid of the extra indirection needed to access the TLB.

Commit migrated from https://github.com/dotnet/coreclr/commit/afb6185394511fb30c9278d40d6e6e2ca59cb6f8

6 years agoEnable building with Clang 7 (dotnet/coreclr#20417)
Jan Vorlicek [Tue, 16 Oct 2018 23:42:07 +0000 (16:42 -0700)]
Enable building with Clang 7 (dotnet/coreclr#20417)

The Clang 7 is the first version in which only the major version is used in
file names and paths. So the change needed to massage the build files a bit
more than what was needed for the previous versions.

Commit migrated from https://github.com/dotnet/coreclr/commit/5c2c5961a6142fc0bf0c9f992ff76b4a32ad65e4

6 years agoUpdate command lines for building corefx repo (dotnet/coreclr#20415)
Wes Haggard [Tue, 16 Oct 2018 23:41:42 +0000 (16:41 -0700)]
Update command lines for building corefx repo (dotnet/coreclr#20415)

* Update command lines for building corefx repo

* Combine build-managed and build-native to avoid some init issues

cross and portable parameters correctly default for native builds

Commit migrated from https://github.com/dotnet/coreclr/commit/116461030e106f14d7fc53a2143930db21d6eaa6

6 years agoUse build-test.sh script on Linux (dotnet/coreclr#20430)
Egor Chesakov [Tue, 16 Oct 2018 23:12:07 +0000 (16:12 -0700)]
Use build-test.sh script on Linux (dotnet/coreclr#20430)

* Use build-test.sh script on Linux (dotnet/coreclr#20333)
* Use *.tgz archive format and tar tool on Unix (dotnet/coreclr#20381)
* Fix paths to "..\Common\common.csproj" in ilproj (dotnet/coreclr#20407)

Commit migrated from https://github.com/dotnet/coreclr/commit/3e7950e9425106ccfaadbaa96710ccc6dea7d886

6 years agoRemove ExportStubARM64Template support
Bruce Forstall [Tue, 16 Oct 2018 18:39:46 +0000 (11:39 -0700)]
Remove ExportStubARM64Template support

Commit migrated from https://github.com/dotnet/coreclr/commit/5c08f2985d08dae56ab65a3941cd2596fe1a33a8

6 years agoClarify /ARM64 argument usage
Bruce Forstall [Tue, 16 Oct 2018 18:39:27 +0000 (11:39 -0700)]
Clarify /ARM64 argument usage

Commit migrated from https://github.com/dotnet/coreclr/commit/7fcbe4dc9ed5f72c70a741ed695923e9293d7486

6 years agoFix compilation error when `FEATURE_HFA` is disabled. (dotnet/coreclr#20432)
Sergey Andreenko [Tue, 16 Oct 2018 18:03:45 +0000 (11:03 -0700)]
Fix compilation error when `FEATURE_HFA` is disabled. (dotnet/coreclr#20432)

Commit migrated from https://github.com/dotnet/coreclr/commit/57f8358221a3c4ad7f1608f625bc3c5936618505

6 years agoJIT: refactor logic to find compile time handle from a helper call (dotnet/coreclr...
Andy Ayers [Tue, 16 Oct 2018 15:34:45 +0000 (08:34 -0700)]
JIT: refactor logic to find compile time handle from a helper call (dotnet/coreclr#20380)

There were 3 copies of this logic inlined into `gtFoldTypeCompare`.

Also having this functionality split out will be useful in a subsequent
change that extends `gtGetClassHandle` for some helper call cases.

So pull out the logic as a utility and refactor the 3 uses.

Commit migrated from https://github.com/dotnet/coreclr/commit/142e77d60e60442b6f31fcea0f06e0c904140337

6 years agoExtract argInfo building from fgMorphArgs (dotnet/coreclr#19658)
Carol Eidt [Tue, 16 Oct 2018 15:26:28 +0000 (15:26 +0000)]
Extract argInfo building from fgMorphArgs (dotnet/coreclr#19658)

* Extract argInfo building from fgMorphArgs

This extracts the code to build the `fgArgInfo` on a call from the code that modifies the arguments.

Eliminated a pre-existing repeated traversal of the argList by changing `EvalToTmp` to take the `fgArgTabEntry` which the caller always has available.

Commit migrated from https://github.com/dotnet/coreclr/commit/d61257b1e85bbe9cc7b126e1ededabd244d5c934

6 years agoOptimize Span.GetPinnableReference (dotnet/coreclr#20428)
Jan Kotas [Tue, 16 Oct 2018 04:39:18 +0000 (21:39 -0700)]
Optimize Span.GetPinnableReference (dotnet/coreclr#20428)

* Optimize Span.GetPinnableReference

* CR feedback

Commit migrated from https://github.com/dotnet/coreclr/commit/d3ed7cb8da830657c376d4adb2862bc3c09cfef7

6 years agoEnable building with older SDKs
Bruce Forstall [Tue, 16 Oct 2018 01:15:48 +0000 (18:15 -0700)]
Enable building with older SDKs

Commit migrated from https://github.com/dotnet/coreclr/commit/203d9c62787a35a51ebef9b7531170455094c70d

6 years agoAdd ARM64 support to ilasm/ilasm
Bruce Forstall [Tue, 16 Oct 2018 00:14:37 +0000 (17:14 -0700)]
Add ARM64 support to ilasm/ilasm

Remove IA-64/Itanium support.

Commit migrated from https://github.com/dotnet/coreclr/commit/777002ce2150ab0aea1588d0fc569325799839b3

6 years agoFix code comments in Utf16Utility (dotnet/coreclr#20425)
Levi Broderick [Mon, 15 Oct 2018 20:53:02 +0000 (13:53 -0700)]
Fix code comments in Utf16Utility (dotnet/coreclr#20425)

Commit migrated from https://github.com/dotnet/coreclr/commit/85ed652fef5f1dec7c532bd4963dd3cde0199211

6 years agoNull out CancellationTokenSource._timer on Dispose/Cancel (dotnet/coreclr#20410)
Stephen Toub [Mon, 15 Oct 2018 19:44:57 +0000 (15:44 -0400)]
Null out CancellationTokenSource._timer on Dispose/Cancel (dotnet/coreclr#20410)

We already Dispose the Timer in such cases, but we don't null out the field.  That's generally fine, unless an errant CancellationToken is held onto somewhere that references the CancellationTokenSource, in which case it in turn may end up keeping the Timer alive and whatever its delegate/state reference, prolonging their GC unnecessarily.  Minor, but good house keeping, as CancellationTokens can be used in a manner that makes them longer-lived than expected.

Commit migrated from https://github.com/dotnet/coreclr/commit/0af70b614ded7636e6615bf035bbd5149670142b

6 years agoFix GitHub dotnet/coreclr#20389 (dotnet/coreclr#20391)
Fei Peng [Mon, 15 Oct 2018 19:30:25 +0000 (12:30 -0700)]
Fix GitHub dotnet/coreclr#20389 (dotnet/coreclr#20391)

Commit migrated from https://github.com/dotnet/coreclr/commit/7c04af489975d715d314a86177a47061d9ac9d75

6 years agoMerge pull request dotnet/coreclr#19914 from CarolEidt/AltJitTailCall
Carol Eidt [Mon, 15 Oct 2018 17:27:22 +0000 (17:27 +0000)]
Merge pull request dotnet/coreclr#19914 from CarolEidt/AltJitTailCall

Dummy TailCallCopyArgsThunk for altjit

Commit migrated from https://github.com/dotnet/coreclr/commit/9ff41e739123909894e70494d03affb864d8cf6e

6 years agoUpgrade symuploader to version 1.0.0-beta-63412-03 (dotnet/coreclr#20394)
Mike McLaughlin [Mon, 15 Oct 2018 17:26:13 +0000 (10:26 -0700)]
Upgrade symuploader to version 1.0.0-beta-63412-03 (dotnet/coreclr#20394)

Turn off verbose symbol publish logging.

Commit migrated from https://github.com/dotnet/coreclr/commit/d0d26d15d48bc87b8643c203354d8e6bb28b59e6

6 years agoPrint target arch on arm64 and target OS during in JIT_Disasm (dotnet/coreclr#20327)
Egor Chesakov [Sat, 13 Oct 2018 21:28:28 +0000 (14:28 -0700)]
Print target arch on arm64 and target OS during in JIT_Disasm (dotnet/coreclr#20327)

Commit migrated from https://github.com/dotnet/coreclr/commit/ffc347acdbcaa05bc85fcd51bca57c551bc33955

6 years agoCorrected misspelled comment (dotnet/coreclr#20408)
Joakim Skoglund [Sat, 13 Oct 2018 07:25:13 +0000 (09:25 +0200)]
Corrected misspelled comment (dotnet/coreclr#20408)

Commit migrated from https://github.com/dotnet/coreclr/commit/6a33b50b6ba2812f8ba271d9411c05bf9b6e578f

6 years agoJIT: add some devirtualization info to the inline context (dotnet/coreclr#20395)
Andy Ayers [Sat, 13 Oct 2018 01:30:10 +0000 (18:30 -0700)]
JIT: add some devirtualization info to the inline context (dotnet/coreclr#20395)

Allows the jit to remember which calls were devirtualized and which
of those were then optimized to use an unboxed entry point. This info
is then dumped out as part of the inline tree.

Also remove some of the clutter from the COMPlus_JitPrintInlinedMethods
output stream -- we don't need to see both the in-stream results and
the final results, and we don't really need to know about the budget.
This information is still dumped for COMPlus_JitDump.

Commit migrated from https://github.com/dotnet/coreclr/commit/10a8e2523bceb49b04dbd21cacbd9b34d77e18af