platform/upstream/dotnet/runtime.git
7 years agoMerge pull request dotnet/coreclr#7852 from AndyAyersMS/InlinerSmallFixes
Andy Ayers [Mon, 31 Oct 2016 21:47:16 +0000 (14:47 -0700)]
Merge pull request dotnet/coreclr#7852 from AndyAyersMS/InlinerSmallFixes

Inliner: Fix LegacyPolicyAssert; Dump prejit noinline reasons

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

7 years agoMerge pull request dotnet/coreclr#7884 from AlexGhiondea/Port_SecureString
AlexGhiondea [Mon, 31 Oct 2016 20:06:26 +0000 (13:06 -0700)]
Merge pull request dotnet/coreclr#7884 from AlexGhiondea/Port_SecureString

Bring to CoreCLR the SecureString implementation from CoreFx.

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

7 years agoMerge pull request dotnet/coreclr#7886 from jkotas/SpanOfT
Jan Kotas [Mon, 31 Oct 2016 18:47:57 +0000 (11:47 -0700)]
Merge pull request dotnet/coreclr#7886 from jkotas/SpanOfT

Merge SpanOfT branch into master

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

7 years agoMerge pull request dotnet/coreclr#7758 from pgavlin/VSO267565
Pat Gavlin [Mon, 31 Oct 2016 18:07:46 +0000 (11:07 -0700)]
Merge pull request dotnet/coreclr#7758 from pgavlin/VSO267565

Fix P/Invoke cookie passing on x86.

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

7 years agoSecureStringMarshal was not correctly being build for Unix.
Alex Ghiondea [Mon, 31 Oct 2016 17:13:52 +0000 (10:13 -0700)]
SecureStringMarshal was not correctly being build for Unix.

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

7 years agoMerge pull request dotnet/coreclr#7901 from AlexGhiondea/FixBinCompat
AlexGhiondea [Mon, 31 Oct 2016 17:05:18 +0000 (10:05 -0700)]
Merge pull request dotnet/coreclr#7901 from AlexGhiondea/FixBinCompat

Get latest behavior when missing TFM for BinaryCompatibility class

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

7 years agoAdd workaround for JIT crash
Jan Kotas [Sun, 30 Oct 2016 21:21:16 +0000 (14:21 -0700)]
Add workaround for JIT crash

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

7 years agoChange Span fields to private readonly + other review feedback
Jan Kotas [Sun, 30 Oct 2016 19:30:18 +0000 (12:30 -0700)]
Change Span fields to private readonly + other review feedback

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

7 years agoWhen reading the TFM for the BinaryCompatibility class on CoreCLR, set the TFM to...
Alex Ghiondea [Mon, 31 Oct 2016 14:26:59 +0000 (07:26 -0700)]
When reading the TFM for the BinaryCompatibility class on CoreCLR, set the TFM to be the latest version we have in our code.

This ensures that we are going to get the latest behavior (4.5.2+) for all the quirks that were using that class.

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

7 years agoAdd the SecureStringMarshal and CryptographicException to model.xml
Alex Ghiondea [Mon, 31 Oct 2016 14:21:28 +0000 (07:21 -0700)]
Add the SecureStringMarshal and CryptographicException to model.xml

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

7 years agoMerge pull request dotnet/coreclr#7897 from stephentoub/stream_copyto
Stephen Toub [Mon, 31 Oct 2016 13:03:30 +0000 (09:03 -0400)]
Merge pull request dotnet/coreclr#7897 from stephentoub/stream_copyto

Use ArrayPool in Stream.CopyTo{Async}

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

7 years agoRemove StreamHelpers.ArrayPoolCopy.cs
Stephen Toub [Mon, 31 Oct 2016 11:05:13 +0000 (07:05 -0400)]
Remove StreamHelpers.ArrayPoolCopy.cs

It's no longer necessary now that Stream.CopyToAsync itself uses ArrayPool.

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

7 years agoFixing Typo in variable name in DateTime (dotnet/coreclr#7898)
Peter Marcu [Mon, 31 Oct 2016 10:55:44 +0000 (03:55 -0700)]
Fixing Typo in variable name in DateTime (dotnet/coreclr#7898)

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

7 years agoAvoid boxing in calls to enum's GetHashCode (dotnet/coreclr#7895)
Michal Strehovský [Mon, 31 Oct 2016 05:45:58 +0000 (22:45 -0700)]
Avoid boxing in calls to enum's GetHashCode (dotnet/coreclr#7895)

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

7 years agoDateTime.ToString() Fast Track for RFC1123 (dotnet/coreclr#7891)
Peter Marcu [Mon, 31 Oct 2016 05:28:45 +0000 (22:28 -0700)]
DateTime.ToString() Fast Track for RFC1123 (dotnet/coreclr#7891)

* DateTime.ToString() Fast Track for RFC1123

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

7 years agoFix P/Invoke cookie passing on x86.
Pat Gavlin [Fri, 21 Oct 2016 21:08:11 +0000 (14:08 -0700)]
Fix P/Invoke cookie passing on x86.

On x86, the P/Invoke cookie (when required) is passed on the stack
after all other stack arguments (if any).

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

7 years agoUse ArrayPool in Stream.CopyTo{Async}
Stephen Toub [Mon, 31 Oct 2016 02:08:26 +0000 (22:08 -0400)]
Use ArrayPool in Stream.CopyTo{Async}

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

7 years agoAdd boilerplate doc comments to trivial methods
Jan Kotas [Sun, 30 Oct 2016 09:28:14 +0000 (02:28 -0700)]
Add boilerplate doc comments to trivial methods

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

7 years agoStreamline implementation of ToArray to call CopyTo<T> directly
Jan Kotas [Sun, 30 Oct 2016 08:50:27 +0000 (01:50 -0700)]
Streamline implementation of ToArray to call CopyTo<T> directly
Fix missing pinning in CopyTo<T>
Move and rename some JitHelpers to S.R.CS.Unsafe to make different implementations more similar

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

7 years agoFix build break on 32-bit platforms
Jan Kotas [Sat, 29 Oct 2016 06:04:36 +0000 (23:04 -0700)]
Fix build break on 32-bit platforms

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

7 years agoDisable Span<T> GC reporting under TODO to workaround JIT issue
Jan Kotas [Sat, 29 Oct 2016 05:28:49 +0000 (22:28 -0700)]
Disable Span<T> GC reporting under TODO to workaround JIT issue

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

7 years agoadded implicit cast operator from ArraySegment to Spans (dotnet/coreclr#7297)
Adam Sitnik [Wed, 21 Sep 2016 21:24:02 +0000 (23:24 +0200)]
added implicit cast operator from ArraySegment to Spans (dotnet/coreclr#7297)

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

7 years agocreate ReadOnlySpan<char> from string (dotnet/coreclr#7276)
Adam Sitnik [Wed, 21 Sep 2016 00:12:47 +0000 (02:12 +0200)]
create ReadOnlySpan<char> from string (dotnet/coreclr#7276)

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

7 years agoadded AsBytes() and NonPortableCast() to Span and ReadOnlySpan API (dotnet/coreclr...
Adam Sitnik [Fri, 16 Sep 2016 20:25:08 +0000 (22:25 +0200)]
added AsBytes() and NonPortableCast() to Span and ReadOnlySpan API (dotnet/coreclr#7220)

* added AsBytes() and NonPortableCast() to Span and ReadOnlySpan API, fixes dotnet/coreclr#7211

* throw when casted types contain pointers

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

7 years agoAdd TryCopyTo and Set methods to Spans API dotnet/coreclr#5857 (dotnet/coreclr#6648)
Adam Sitnik [Mon, 12 Sep 2016 16:21:53 +0000 (18:21 +0200)]
Add TryCopyTo and Set methods to Spans API dotnet/coreclr#5857 (dotnet/coreclr#6648)

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

7 years agoFix reference types (dotnet/coreclr#6954)
Jan Kotas [Mon, 29 Aug 2016 06:18:11 +0000 (23:18 -0700)]
Fix reference types (dotnet/coreclr#6954)

- Generic ArrayPinningHelper resulted into incorrect array data offset for reference types. Use non-generic one instead.
- Add array covariance checks to guarantee type safety.

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

7 years agoAdd basic Span<T> test
Jan Kotas [Fri, 17 Jun 2016 00:44:57 +0000 (17:44 -0700)]
Add basic Span<T> test

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

7 years agoAdd implementation for hand-written JIT helpers
Jan Kotas [Fri, 17 Jun 2016 00:40:18 +0000 (17:40 -0700)]
Add implementation for hand-written JIT helpers

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

7 years agoSpan<T> managed implementation
Jan Kotas [Thu, 16 Jun 2016 16:28:37 +0000 (09:28 -0700)]
Span<T> managed implementation

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

7 years agoSpan support in VM
Jan Kotas [Thu, 16 Jun 2016 16:39:28 +0000 (09:39 -0700)]
Span support in VM

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

7 years agoUse Roslyn with ref returns and locals
Jan Kotas [Thu, 16 Jun 2016 16:28:02 +0000 (09:28 -0700)]
Use Roslyn with ref returns and locals

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

7 years agoAdd FEATURE_SPAN_OF_T
Jan Kotas [Sun, 12 Jun 2016 17:53:58 +0000 (10:53 -0700)]
Add FEATURE_SPAN_OF_T

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

7 years agoWork around a Visual C++ silent bad code generation bug (dotnet/coreclr#7890)
Bruce Forstall [Sun, 30 Oct 2016 09:34:49 +0000 (02:34 -0700)]
Work around a Visual C++ silent bad code generation bug (dotnet/coreclr#7890)

Fixes dotnet/coreclr#7837

The full description of the problem is in that issue.

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

7 years agoRemove unnecessary assert. (dotnet/coreclr#7889)
Jim Ma [Sat, 29 Oct 2016 17:47:15 +0000 (01:47 +0800)]
Remove unnecessary assert. (dotnet/coreclr#7889)

Remvoe the unneccessary assert that might cause a bug.

fix dotnet/coreclr#6856

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

7 years agoCleanup: Remove BitArray from mscorlib (dotnet/coreclr#7888)
Marek Linka [Sat, 29 Oct 2016 14:41:18 +0000 (16:41 +0200)]
Cleanup: Remove BitArray from mscorlib (dotnet/coreclr#7888)

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

7 years agoFix a race condition in the test build (dotnet/coreclr#7810)
Sean Gillespie [Sat, 29 Oct 2016 01:19:35 +0000 (18:19 -0700)]
Fix a race condition in the test build (dotnet/coreclr#7810)

* Fix a race condition in the test build

* Move dir.targets to the Tests directory

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

7 years agoMerge pull request dotnet/coreclr#7882 from JeremyKuhne/fixarraypool
Jeremy Kuhne [Sat, 29 Oct 2016 00:13:41 +0000 (17:13 -0700)]
Merge pull request dotnet/coreclr#7882 from JeremyKuhne/fixarraypool

Align ArrayPool to shared code pattern

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

7 years agoDateTime.ToString(“o”) allocates 32 objects, (dotnet/coreclr#7836)
Peter Marcu [Sat, 29 Oct 2016 00:08:43 +0000 (17:08 -0700)]
DateTime.ToString(“o”) allocates 32 objects, (dotnet/coreclr#7836)

* Enabling a lower allocating DateTime.ToString('o')

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

7 years agoReplace BCLDebug with Debug
Alex Ghiondea [Fri, 28 Oct 2016 22:47:45 +0000 (15:47 -0700)]
Replace BCLDebug with Debug

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

7 years agoBring to CoreCLR the SecureString implementation from CoreFx.
Alex Ghiondea [Fri, 28 Oct 2016 22:19:07 +0000 (15:19 -0700)]
Bring to CoreCLR the SecureString implementation from CoreFx.

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

7 years agoAlign ArrayPool to shared code pattern
Jeremy Kuhne [Fri, 28 Oct 2016 21:56:24 +0000 (14:56 -0700)]
Align ArrayPool to shared code pattern

Move the ArrayPool code to the shared location. Also use wraps to make
code identical to CoreFX. (Fixing an exception message issue.)

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

7 years agoMerge pull request dotnet/coreclr#7817 from JeremyKuhne/movefs
Jeremy Kuhne [Fri, 28 Oct 2016 21:38:25 +0000 (14:38 -0700)]
Merge pull request dotnet/coreclr#7817 from JeremyKuhne/movefs

Copy CoreFX FileStream to CoreLib

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

7 years agoRemove some unused PAL functions (dotnet/coreclr#7873)
Jan Vorlicek [Fri, 28 Oct 2016 21:32:45 +0000 (23:32 +0200)]
Remove some unused PAL functions (dotnet/coreclr#7873)

This change removes some unused PAL functions and the corresponding PAL tests.

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

7 years agoMerge pull request dotnet/coreclr#7832 from pgavlin/VSO279868
Pat Gavlin [Fri, 28 Oct 2016 20:44:02 +0000 (13:44 -0700)]
Merge pull request dotnet/coreclr#7832 from pgavlin/VSO279868

Correct indirect P/Invoke call prlogs on x86.

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

7 years agoMerge pull request dotnet/coreclr#3941 from sivarv/MultiRegCallNodes
Sivarv [Fri, 28 Oct 2016 20:30:33 +0000 (13:30 -0700)]
Merge pull request dotnet/coreclr#3941 from sivarv/MultiRegCallNodes

Design to support Multi-reg GT_CALL/GT_RETURN nodes (for x64/unix, arm64, x86, arm32)

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

7 years agoFix formatting.
Pat Gavlin [Fri, 28 Oct 2016 20:30:30 +0000 (13:30 -0700)]
Fix formatting.

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

7 years agoMulti-reg call node design doc.
sivarv [Sat, 22 Oct 2016 03:03:43 +0000 (20:03 -0700)]
Multi-reg call node design doc.

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

7 years agoMerge pull request dotnet/coreclr#7864 from BruceForstall/simd
Bruce Forstall [Fri, 28 Oct 2016 18:56:56 +0000 (11:56 -0700)]
Merge pull request dotnet/coreclr#7864 from BruceForstall/simd

Initial RyuJIT x86 SIMD support

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

7 years agoCopy CoreFX FileStream to CoreLib
Jeremy Kuhne [Wed, 26 Oct 2016 04:52:41 +0000 (21:52 -0700)]
Copy CoreFX FileStream to CoreLib

This copies FileStream to CoreLib and uses it in place of the legacy
FileStream. Code is mostly a direct copy with the addition of a few
internal constructor overloads.

Adds a simple Debug wrapper for BCLDebug to allow keeping the code
the same. Also follows the same pattern for SR wrapping.

Needed to bring down PreAllocatedOverlapped.

- Expose FileStream in model.xml
- Remove native usage of FileStreamAsyncResult
- #ifdef SafeFileHandle creation in existing code (to avoid mismatched
  PAL/CoreFX usage)

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

7 years agoEnsure the module slot in R2R image can be located (dotnet/coreclr#7875)
John Chen [Fri, 28 Oct 2016 18:48:58 +0000 (11:48 -0700)]
Ensure the module slot in R2R image can be located (dotnet/coreclr#7875)

Each Ready-to-Run image has a slot for storing a pointer to the Module
object associated with this image. However, if the image contains no
code (e.g., facade assemblies), the import table needed to locate
this slot wasn't written out, so the runtime couldn't find this slot.
This casued "crossgen /createpdb" command to fail on facade assemblies
after PR dotnet/coreclr#7809, and required a workaround (commit c4d8994).

This commit ensures writing the import table needed to locate the
slot for module. It also removes the workaround in commit c4d8994,
which is no longer necessary.

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

7 years agoMerge pull request dotnet/coreclr#7835 from DrewScoggins/coreclr-perf
Drew Scoggins [Fri, 28 Oct 2016 18:32:14 +0000 (11:32 -0700)]
Merge pull request dotnet/coreclr#7835 from DrewScoggins/coreclr-perf

Adding CoreCLR Perf support for Jenkins

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

7 years agoMerge pull request dotnet/coreclr#7872 from jkotas/revert-tuple-hash
Jan Kotas [Fri, 28 Oct 2016 14:42:28 +0000 (07:42 -0700)]
Merge pull request dotnet/coreclr#7872 from jkotas/revert-tuple-hash

Revert changes in tuple hashing algorithm

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

7 years agoAdd comment about F# dependency on hashing algorithm
Jan Kotas [Fri, 28 Oct 2016 11:25:48 +0000 (04:25 -0700)]
Add comment about F# dependency on hashing algorithm

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

7 years agoRevert "Better Tuple hashing, avoid boxing in Equals/GetHashCode (dotnet/coreclr...
Jan Kotas [Fri, 28 Oct 2016 11:20:21 +0000 (04:20 -0700)]
Revert "Better Tuple hashing, avoid boxing in Equals/GetHashCode (dotnet/coreclr#6767)"

This reverts commit dotnet/coreclr@361e6eb85c74b57691955d97dda801d725cd2a59.

Conflicts:
src/mscorlib/mscorlib.shared.sources.props

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

7 years agoC++ conformance. (building with /permissive-) (dotnet/coreclr#7855)
Phil Christensen [Fri, 28 Oct 2016 09:09:35 +0000 (02:09 -0700)]
C++ conformance. (building with /permissive-) (dotnet/coreclr#7855)

These issues were found when building with the /permissive- flag in the
latest version of MSVC. No tests were added/modified because this does not
change any behavior.
There are a few types of language conformance issues fixed in this:

1) Strict string conversion (this is also covered by the /Zc:strictStrings
flag)

The 'const' is not implicitly dropped by string literals, which means the
following is not allowed:
char str = "const string literal"; //error: cannot convert a 'const char'
to a 'char*'
This fix to to make str 'const char*'. (This can have a domino effect
depending on where str is used)

2) Fully qualified inline declarations members inside class

struct A {
void A::f() { } // Error: illegal qualified name in member declaration,
remove redundant 'A::' to fix
};

3) MSVC by default will allows name lookup in a dependent base. This is
disabled by /permissive-

template <class T> struct B {
  void f();
};

template <class T> struct D
 : public B<T> //B is a dependent base because its type depends on the type of T in D<T>.
{
    //One possible fix is to uncomment the following line.  If this
    //were a type we should have 'using typename'...
    //using B<T>::f;

    void g() {
       f(); //Error: identifier not found, one possible fix is change it to 'this->f();'
    }
};

void h()
{
   D<int> d;
   d.g();
}

4) Warning 4800 has been removed in version 19.1 (1910) of the compiler.

For backwards compatability, surround the usage of 4800.
This is not related to C++ conformance.
 #if _MSC_VER <= 1900
 // 'BOOL' forcing value to bool 'true' or 'false'
 #pragma warning(disable: 4800)
 #endif

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

7 years agoMerge pull request dotnet/coreclr#7866 from dotnet-bot/from-tfs
Jan Kotas [Fri, 28 Oct 2016 03:39:24 +0000 (20:39 -0700)]
Merge pull request dotnet/coreclr#7866 from dotnet-bot/from-tfs

Merge changes from TFS

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

7 years agoAdd missing std::move to one exception throw (dotnet/coreclr#7865)
Jan Vorlicek [Fri, 28 Oct 2016 02:34:42 +0000 (04:34 +0200)]
Add missing std::move to one exception throw (dotnet/coreclr#7865)

We had the std::move missing in one of the exception throws. For some reason,
the current clang didn't complain about it even though the copy constructor was
deleted.

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

7 years agoUpdate broken link to RIDs (dotnet/coreclr#7850)
kchoi [Fri, 28 Oct 2016 02:33:51 +0000 (19:33 -0700)]
Update broken link to RIDs (dotnet/coreclr#7850)

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

7 years agoUse memset instead of ZeroMemory (dotnet/coreclr#7851)
Michal Strehovský [Fri, 28 Oct 2016 02:32:55 +0000 (19:32 -0700)]
Use memset instead of ZeroMemory (dotnet/coreclr#7851)

`CORINFO_HELP_READYTORUN_STATIC_BASE` and
`CORINFO_HELP_READYTORUN_GENERIC_STATIC_BASE` both use a mostly/fully
zeroed out `resolvedToken`, the common practice is to zero out with
`memset` in this codebase.

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

7 years agoFix exception.StackTrace race condition. Issue dotnet/coreclr#12467. (dotnet/coreclr...
Mike McLaughlin [Fri, 28 Oct 2016 02:31:45 +0000 (19:31 -0700)]
Fix exception.StackTrace race condition.  Issue dotnet/coreclr#12467. (dotnet/coreclr#7856)

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

7 years agoFix conversion from CorJitFlag2 enum to JitFlag. (dotnet/coreclr#7857)
Austin Wise [Fri, 28 Oct 2016 01:03:30 +0000 (18:03 -0700)]
Fix conversion from CorJitFlag2 enum to JitFlag. (dotnet/coreclr#7857)

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

7 years agoInitial RyuJIT x86 SIMD support
Bruce Forstall [Thu, 29 Sep 2016 03:44:06 +0000 (20:44 -0700)]
Initial RyuJIT x86 SIMD support

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

7 years agofix typo
Dan Moseley [Thu, 27 Oct 2016 23:45:57 +0000 (16:45 -0700)]
fix typo

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

7 years agorollback CS1635584
Rahul Kumar [Thu, 27 Oct 2016 22:39:18 +0000 (15:39 -0700)]
rollback CS1635584

[tfs-changeset: 1635595]

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

7 years agoExpose System.Security.Principal.PrincipalPolicy (required for AppDomain apis)
Rahul Kumar [Thu, 27 Oct 2016 21:26:11 +0000 (14:26 -0700)]
Expose System.Security.Principal.PrincipalPolicy (required for AppDomain apis)

[tfs-changeset: 1635584]

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

7 years agoMerge pull request dotnet/coreclr#7837 from BruceForstall/JitFlags4
Bruce Forstall [Thu, 27 Oct 2016 20:48:06 +0000 (13:48 -0700)]
Merge pull request dotnet/coreclr#7837 from BruceForstall/JitFlags4

Introduce new CORJIT_FLAGS type

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

7 years agoAdd verification of System.Globalization.Native.so symbols (dotnet/coreclr#7848)
Jan Vorlicek [Thu, 27 Oct 2016 19:53:35 +0000 (21:53 +0200)]
Add verification of System.Globalization.Native.so symbols (dotnet/coreclr#7848)

This change adds check of undefined dependencies of the System.Globalization.Native.so
to the build.sh. The recent change that made the ICU APIs resolving driven by the
shared library itself creates a potential for someone adding usage of an ICU API that
is not defined in the icushim.h.
With this change, such problem will be caught during the build and cause it to fail.

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

7 years agoIntroduce new CORJIT_FLAGS type
Bruce Forstall [Wed, 26 Oct 2016 22:52:06 +0000 (15:52 -0700)]
Introduce new CORJIT_FLAGS type

The "JIT flags" currently passed between the EE and the JIT have traditionally
been bit flags in a 32-bit word. Recently, a second 32-bit word was added to
accommodate additional flags, but that set of flags is definitely "2nd class":
they are not universally passed, and require using a separate set of bit
definitions, and comparing those bits against the proper, 2nd word.

This change replaces all uses of bare DWORD or 'unsigned int' types
representing flags with CORJIT_FLAGS, which is now an opaque type. All
flag names were renamed from CORJIT_FLG_* to CORJIT_FLAG_* to ensure all
cases were changed to use the new names, which are also scoped within the
CORJIT_FLAGS type itself.

Another motivation to do this, besides cleaner code, is to allow enabling the
SSE/AVX flags for x86. For x86, we had fewer bits available in the "first
word", so would have to either put them in the "second word", which, as
stated, was very much 2nd class and not plumbed through many usages, or
we could move other bits to the "second word", with the same issues. Neither
was a good option.

RyuJIT compiles with both COR_JIT_EE_VERSION > 460 and <= 460. I introduced
a JitFlags adapter class in jitee.h to handle both JIT flag types. All JIT
code uses this JitFlags type, which operates identically to the new
CORJIT_FLAGS type.

In addition to introducing the new CORJIT_FLAGS type, the SSE/AVX flags are
enabled for x86.

The JIT-EE interface GUID is changed, as this is a breaking change.

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

7 years agoMerge pull request dotnet/coreclr#7803 from AlexGhiondea/Fix_SB
AlexGhiondea [Thu, 27 Oct 2016 18:55:16 +0000 (11:55 -0700)]
Merge pull request dotnet/coreclr#7803 from AlexGhiondea/Fix_SB

Make sure that when the StringBuilder.Append method is called we firs…

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

7 years agoInliner: Fix LegacyPolicyAssert; Dump prejit noinline reasons
Andy Ayers [Thu, 27 Oct 2016 18:15:25 +0000 (11:15 -0700)]
Inliner: Fix LegacyPolicyAssert; Dump prejit noinline reasons

The LegacyPolicy does not do the no-return deduction, so if it's active,
skip the validating assert in `fgFindBasicBlocks`.

When tracing inlines, dump the reason why a prejit root can't be inlined,
so it's easier to track this down later.

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

7 years agoImplement initThisClass for generic types in ReadyToRun (dotnet/coreclr#7842)
Michal Strehovský [Thu, 27 Oct 2016 18:11:52 +0000 (11:11 -0700)]
Implement initThisClass for generic types in ReadyToRun (dotnet/coreclr#7842)

Only implementing the RyuJIT portion for CoreRT purposes (CoreRT side at dotnet/corertdotnet/coreclr#2085).
I can file an issue to add support for this in CoreCLR if there's interest. On CoreCLR this is currently a disqualification from ReadyToRun and causes fallback to JITting.

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

7 years agoMerge pull request dotnet/coreclr#7839 from rahku/_appdomain
Rahul Kumar [Thu, 27 Oct 2016 18:11:04 +0000 (11:11 -0700)]
Merge pull request dotnet/coreclr#7839 from rahku/_appdomain

expose events from AppDomain via AssemblyLoadContext

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

7 years agoexpose events from AppDomain via AssemblyLoadContext
Rahul Kumar [Thu, 27 Oct 2016 01:14:39 +0000 (18:14 -0700)]
expose events from AppDomain via AssemblyLoadContext

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

7 years agoFix PDB creation for Ready-to-Run image of facade assemblies
dotnet-bot [Thu, 27 Oct 2016 17:34:18 +0000 (10:34 -0700)]
Fix PDB creation for Ready-to-Run image of facade assemblies

[tfs-changeset: 1635538]

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

7 years agoProperly spell class name in comments (dotnet/coreclr#7821)
Dmitry-Me [Thu, 27 Oct 2016 16:45:34 +0000 (19:45 +0300)]
Properly spell class name in comments (dotnet/coreclr#7821)

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

7 years agoFixed gcinfoencoder build errors. (dotnet/coreclr#7826)
Jim Ma [Thu, 27 Oct 2016 08:37:22 +0000 (16:37 +0800)]
Fixed gcinfoencoder build errors. (dotnet/coreclr#7826)

MEASURE_INFO switch now depends on _DEBUG switch. Ensure NumUntracked,
UntrackedSlotSize, NumUntrackedSize and EncPreservedSlots fields handled correctly in
GcInfoSize::operator+=() and GCInfoSize::Log().

fix dotnet/coreclr#6008

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

7 years agoAdd the missing ICU APIs to the ICU shim (dotnet/coreclr#7840)
Tarek Mahmoud Sayed [Thu, 27 Oct 2016 08:16:07 +0000 (01:16 -0700)]
Add the missing ICU APIs to the ICU shim (dotnet/coreclr#7840)

there was a change done by the PR dotnet/coreclr#7773 which removed the dependency on ICU version. and there is another PR dotnet/coreclr#7811 which used more ICU APIs not listed in the shim.
the change here is to add these APIs to the shim

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

7 years agoUse getLocationOfThisType instead of embedGenericHandle (dotnet/coreclr#7813)
Michal Strehovský [Thu, 27 Oct 2016 02:57:41 +0000 (19:57 -0700)]
Use getLocationOfThisType instead of embedGenericHandle (dotnet/coreclr#7813)

getLocationOfThisType does way less work and gives the same result (the part we care about).

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

7 years ago[ARM/CI] Change the name of corefx project (dotnet/coreclr#7820)
Hanjoung Lee [Thu, 27 Oct 2016 02:45:46 +0000 (11:45 +0900)]
[ARM/CI] Change the name of corefx project (dotnet/coreclr#7820)

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

7 years agoMerge pull request dotnet/coreclr#7787 from sivarv/cmpOpt
Sivarv [Thu, 27 Oct 2016 02:15:23 +0000 (19:15 -0700)]
Merge pull request dotnet/coreclr#7787 from sivarv/cmpOpt

Optimize 'test' instruction in case of op1 == 0 or op1 != 0 where op1 is known to set Zero flag.

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

7 years agoMerge pull request dotnet/coreclr#7828 from MichalStrehovsky/readyToRunGenericStaticB...
Michal Strehovský [Thu, 27 Oct 2016 00:50:15 +0000 (17:50 -0700)]
Merge pull request dotnet/coreclr#7828 from MichalStrehovsky/readyToRunGenericStaticBaseValueNum

Fix value numbering of ReadyToRunGenericStaticBase

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

7 years agoMerge pull request dotnet/coreclr#7746 from AndyAyersMS/LessGCLayout
Andy Ayers [Thu, 27 Oct 2016 00:33:46 +0000 (17:33 -0700)]
Merge pull request dotnet/coreclr#7746 from AndyAyersMS/LessGCLayout

Jit: use class attributes check to reduce GC layout asks

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

7 years agoMove JIT perf tests to new infrastructure
Drew Scoggins [Wed, 26 Oct 2016 20:32:30 +0000 (13:32 -0700)]
Move JIT perf tests to new infrastructure

Moved over the running of the JIT perf tests to use the same logic as the
perflab tests.  Had to make a few changes to what we save and where since
we reuse the sandbox folder.

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

7 years agoUpdate performance tests
Drew Scoggins [Tue, 25 Oct 2016 23:58:31 +0000 (16:58 -0700)]
Update performance tests

Add inner iterations to all performance tests in the perflab directory.
This is because we were measuring a time that was to small, and the
results were not useful.  This should also reduce the number of high level
iterations we run as well.

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

7 years agoMove benchmarks to use netstandard1.4 instead of netcoreapp1.0 to fix desktop reflect...
John Soklaski [Tue, 18 Oct 2016 01:09:58 +0000 (18:09 -0700)]
Move benchmarks to use netstandard1.4 instead of netcoreapp1.0 to fix desktop reflection issue

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

7 years agoMake sure that when the StringBuilder.Append method is called we first check that...
Alex Ghiondea [Tue, 25 Oct 2016 20:51:28 +0000 (13:51 -0700)]
Make sure that when the StringBuilder.Append method is called we first check that we can insert as many characters as were requested before we actually start writting them into the StringBuilder.

This will prevent the case when we realize that there is not enough space in the StringBuilder (and we cannot grow it as much as it is requested) after we already wrote stuff in it.

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

7 years agoCorrect indirect P/Invoke call prlogs on x86.
Pat Gavlin [Wed, 26 Oct 2016 21:40:59 +0000 (14:40 -0700)]
Correct indirect P/Invoke call prlogs on x86.

32-bit targets require the size of the stack argument area in
InlinedCallFrame.m_Datum rather than the stub argument (as on 64-bit
targets).

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

7 years agoAllow Ready-to-Run image to be loaded multiple times (dotnet/coreclr#7809)
John Chen [Wed, 26 Oct 2016 20:49:54 +0000 (13:49 -0700)]
Allow Ready-to-Run image to be loaded multiple times (dotnet/coreclr#7809)

Address issue dotnet/coreclr#6695 by porting the fix from desktop CLR.

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

7 years agoFix value numbering of ReadyToRunGenericStaticBase
Michal Strehovský [Wed, 26 Oct 2016 19:41:14 +0000 (12:41 -0700)]
Fix value numbering of ReadyToRunGenericStaticBase

Fixes dotnet/corertdotnet/coreclr#2080.

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

7 years agoAdd Misc types to InteropServices
Faizur Rahman [Wed, 26 Oct 2016 00:29:16 +0000 (17:29 -0700)]
Add Misc types to InteropServices

Add the following types to InteropServices:
- AutomationProxyAttribute
- ComAliasNameAttribute
- ComCompatibleVersionAttribute
- ComConversionLossAttribute
- ComRegisterFunctionAttribute
- ComUnregisterFunctionAttribute
- ICustomFactory
- ICustomMarshaler
- ImportedFromTypeLibAttribute
- LCIDConversionAttribute
- ManagedToNativeComInteropStubAttribute
- PrimaryInteropAssemblyAttribute
- ProgIdAttribute
- TypeLibImportClassAttribute
- TypeLibVersionAttribute

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

7 years agoOptimize 'test' instruction for op1 == 0 and op1 != 0 where op1 is known to set flags.
sivarv [Tue, 25 Oct 2016 23:52:08 +0000 (16:52 -0700)]
Optimize 'test' instruction for op1 == 0 and op1 != 0 where op1 is known to set flags.

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

7 years agoUpdate CoreClr, CoreFx to beta-24625-03, beta-24625-02, respectively (master) (dotnet...
Davis Goodin [Wed, 26 Oct 2016 18:52:41 +0000 (13:52 -0500)]
Update CoreClr, CoreFx to beta-24625-03, beta-24625-02, respectively (master) (dotnet/coreclr#7804)

* Update CoreClr, CoreFx to beta-24625-03, beta-24625-02, respectively

* Upgrade S.R.Serialization.Primitives to prerelease

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

7 years agoMerge pull request dotnet/coreclr#7808 from pgavlin/VSO280103
Pat Gavlin [Wed, 26 Oct 2016 16:59:37 +0000 (09:59 -0700)]
Merge pull request dotnet/coreclr#7808 from pgavlin/VSO280103

Clear side-effect flags on local reads in rationalize.

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

7 years agoMerge pull request dotnet/coreclr#7823 from adiaaida/checkformatlocation
Michelle McDaniel [Wed, 26 Oct 2016 16:15:46 +0000 (09:15 -0700)]
Merge pull request dotnet/coreclr#7823 from adiaaida/checkformatlocation

Fix format.py to look for .bat on Windows

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

7 years agoFix format.py to look for .bat on Windows
Michelle McDaniel [Wed, 26 Oct 2016 15:45:10 +0000 (08:45 -0700)]
Fix format.py to look for .bat on Windows

https://github.com/dotnet/jitutils/pull/56 changed the file extension for
the script files on Windows to be .bat, so the format.py script needs to
be updated.

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

7 years agoEnable CultureInfo netstandard 1.7 APIs on Linux (dotnet/coreclr#7811)
Tarek Mahmoud Sayed [Wed, 26 Oct 2016 15:37:53 +0000 (08:37 -0700)]
Enable CultureInfo netstandard 1.7 APIs on Linux (dotnet/coreclr#7811)

* Enable CultureInfo netstandard 1.7 APIs on Linux

* fix spaces

* Use Array.Empty<CultureInfo> instead of CultureInfo[0]

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

7 years agoRemove dependency of System.Globalization.Native.so on specific ICU version (dotnet...
Jan Vorlicek [Wed, 26 Oct 2016 09:46:24 +0000 (11:46 +0200)]
Remove dependency of System.Globalization.Native.so on specific ICU version (dotnet/coreclr#7773)

Remove dependency of System.Globalization.Native.so on specific ICU version

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

7 years agoMerge pull request dotnet/coreclr#7816 from ramarag/ThreadingOverlapped
Rama krishnan Raghupathy [Wed, 26 Oct 2016 05:47:27 +0000 (22:47 -0700)]
Merge pull request dotnet/coreclr#7816 from ramarag/ThreadingOverlapped

Adding missing members of threading.overlapped

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

7 years agoMerge pull request dotnet/coreclr#7806 from sandreenko/fix-VSO-278365
sandreenko [Wed, 26 Oct 2016 05:32:11 +0000 (22:32 -0700)]
Merge pull request dotnet/coreclr#7806 from sandreenko/fix-VSO-278365

RyuJIT/x86: fix VSO 278365

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

7 years agoMerge pull request dotnet/coreclr#7814 from dotnet-bot/from-tfs
Bruce Forstall [Wed, 26 Oct 2016 04:36:19 +0000 (21:36 -0700)]
Merge pull request dotnet/coreclr#7814 from dotnet-bot/from-tfs

Merge changes from TFS

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