platform/upstream/dotnet/runtime.git
7 years agoMerge pull request dotnet/coreclr#8664 from dotnet-bot/master-UpdateDependencies
Gaurav Khanna [Fri, 16 Dec 2016 21:52:33 +0000 (13:52 -0800)]
Merge pull request dotnet/coreclr#8664 from dotnet-bot/master-UpdateDependencies

Update CoreClr to beta-24816-04 (master)

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

7 years agoAvoid Unsafe.AsRef in Span<T> implementation (dotnet/coreclr#8657)
Jan Kotas [Fri, 16 Dec 2016 21:45:48 +0000 (13:45 -0800)]
Avoid Unsafe.AsRef in Span<T> implementation (dotnet/coreclr#8657)

The JIT is not able to inline the current implementation of Unsafe.AsRef because of it has type mismatch on return. Change the the corelib Span to call Unsafe.As instead since fixing the type mismatch is not easy in the internal corelib version of Unsafe.AsRef.

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

7 years agoDictionary.GetValueOrDefault (dotnet/coreclr#8641)
Alexander Radchenko [Fri, 16 Dec 2016 21:06:41 +0000 (04:06 +0700)]
Dictionary.GetValueOrDefault (dotnet/coreclr#8641)

* Dictionary.GetValueOrDefault

* Fixed IDictionary.TryGetValue

* remove extensions

* // Method similar to TryGetValue that returns the value instead of putting it in an out param.

* public TValue GetValueOrDefault(TKey key) => GetValueOrDefault(key, default(TValue));

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

7 years agoUpdate CoreClr to beta-24816-04
dotnet-bot [Fri, 16 Dec 2016 19:40:29 +0000 (19:40 +0000)]
Update CoreClr to beta-24816-04

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

7 years agoFix buildsystem for linux cross-architecture component build (dotnet/coreclr#8646)
Hyeongseok Oh [Fri, 16 Dec 2016 19:06:16 +0000 (04:06 +0900)]
Fix buildsystem for linux cross-architecture component build (dotnet/coreclr#8646)

* Fix buildsystem for linux cross-architecture component build

* refactoring build.sh, bug fix and typo fix

* Update build.sh

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

7 years agoMakes CultureInfo.get_Parent thread safe (dotnet/coreclr#8656)
Rama krishnan Raghupathy [Fri, 16 Dec 2016 18:31:45 +0000 (10:31 -0800)]
Makes CultureInfo.get_Parent thread safe (dotnet/coreclr#8656)

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

7 years agoMerge pull request dotnet/coreclr#8659 from dotnet-bot/master-UpdateDependencies
Gaurav Khanna [Fri, 16 Dec 2016 18:04:46 +0000 (10:04 -0800)]
Merge pull request dotnet/coreclr#8659 from dotnet-bot/master-UpdateDependencies

Update CoreFx to beta-24816-02 (master)

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

7 years agoUpdate CoreFx to beta-24816-02
dotnet-bot [Fri, 16 Dec 2016 15:49:19 +0000 (15:49 +0000)]
Update CoreFx to beta-24816-02

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

7 years ago[Linux][GDB-JIT] Add try/catch blocks to methods in DWARF (dotnet/coreclr#8650)
Igor Kulaychuk [Fri, 16 Dec 2016 13:05:25 +0000 (16:05 +0300)]
[Linux][GDB-JIT] Add try/catch blocks to methods in DWARF (dotnet/coreclr#8650)

* Add try/catch blocks to DWARF info

Use info about exception handling from IL and map it to
native code as try/catch blocks in DWARF.

* Improve locals naming convention consistency in gdbjit

* Drop pointer to line info from FunctionMember after it is dumped

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

7 years agoMake it easier to use StringComparison & StringComparer with GetHashCode (dotnet...
Alexander Radchenko [Thu, 15 Dec 2016 23:24:14 +0000 (06:24 +0700)]
Make it easier to use StringComparison & StringComparer with GetHashCode (dotnet/coreclr#8633)

* Make it easier to use StringComparison & StringComparer with GetHashCode

* model.xml

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

7 years agoSwitch GCSample to the canonical GCToOSInterface implementation (dotnet/coreclr#8653)
Jan Kotas [Thu, 15 Dec 2016 22:26:48 +0000 (14:26 -0800)]
Switch GCSample to the canonical GCToOSInterface implementation (dotnet/coreclr#8653)

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

7 years agoMerge pull request dotnet/coreclr#8649 from dotnet-bot/master-UpdateDependencies
Gaurav Khanna [Thu, 15 Dec 2016 21:36:26 +0000 (13:36 -0800)]
Merge pull request dotnet/coreclr#8649 from dotnet-bot/master-UpdateDependencies

Update CoreClr, CoreFx to beta-24815-03, beta-24815-03, respectively (master)

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

7 years agoMerge pull request dotnet/coreclr#8642 from CarolEidt/Fix359736
Carol Eidt [Thu, 15 Dec 2016 19:02:19 +0000 (11:02 -0800)]
Merge pull request dotnet/coreclr#8642 from CarolEidt/Fix359736

Correctly sequence fgMorphModToSubMulDiv

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

7 years agoUpdate CoreClr, CoreFx to beta-24815-03, beta-24815-03, respectively
dotnet-bot [Thu, 15 Dec 2016 17:39:00 +0000 (17:39 +0000)]
Update CoreClr, CoreFx to beta-24815-03, beta-24815-03, respectively

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

7 years agoRemove API Set dependency (dotnet/coreclr#8624)
John Chen [Thu, 15 Dec 2016 16:47:23 +0000 (08:47 -0800)]
Remove API Set dependency (dotnet/coreclr#8624)

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

7 years agoMerge pull request dotnet/coreclr#8207 from CarolEidt/StreamlineResolution
Carol Eidt [Thu, 15 Dec 2016 16:38:57 +0000 (08:38 -0800)]
Merge pull request dotnet/coreclr#8207 from CarolEidt/StreamlineResolution

Streamline LSRA resolution

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

7 years agoMerge pull request dotnet/coreclr#8329 from litian2025/Fix_SIMDScalarMoveEncoding
Sivarv [Thu, 15 Dec 2016 15:37:02 +0000 (07:37 -0800)]
Merge pull request dotnet/coreclr#8329 from litian2025/Fix_SIMDScalarMoveEncoding

Fix SIMD Scalar Move Encoding: VEX.L should be 0

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

7 years agoMerge pull request dotnet/coreclr#8645 from dotnet-bot/master-UpdateDependencies
Gaurav Khanna [Thu, 15 Dec 2016 05:08:28 +0000 (21:08 -0800)]
Merge pull request dotnet/coreclr#8645 from dotnet-bot/master-UpdateDependencies

Update CoreFx to beta-24815-01 (master)

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

7 years agoUpdate CoreFx to beta-24815-01
dotnet-bot [Thu, 15 Dec 2016 03:48:47 +0000 (03:48 +0000)]
Update CoreFx to beta-24815-01

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

7 years agoMerge pull request dotnet/coreclr#8546 from alsemenn/debuggertests_generate_scripts_win
Sasha Semennikov [Thu, 15 Dec 2016 01:09:20 +0000 (17:09 -0800)]
Merge pull request dotnet/coreclr#8546 from alsemenn/debuggertests_generate_scripts_win

Add script generator and generate test scripts to adapt debuggertests…

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

7 years agoMerge pull request dotnet/coreclr#8640 from pgavlin/VSO359734
Pat Gavlin [Thu, 15 Dec 2016 00:14:46 +0000 (16:14 -0800)]
Merge pull request dotnet/coreclr#8640 from pgavlin/VSO359734

Fix ref count adjustment in `fgMorphBlockStmt`.

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

7 years agoFix SIMD Scalar Move Encoding: VEX.L should be 0
Li Tian [Mon, 28 Nov 2016 22:48:01 +0000 (14:48 -0800)]
Fix SIMD Scalar Move Encoding: VEX.L should be 0

For SIMD Scalar Move instructions such as vmovlpd, vmovlps, vmovhps,
vmovhps and vmovss on AVX system, JIT should ensure that those
instructions are encoded with VEX.L=0, because encoding them with
VEX.L=1 may encounter unpredictable behavior across different
processor generations. The reason of VEX.L is encoded with 1 is
because JIT calls compiler->getSIMDVectorType() which returns
EA_32BYTE, and it is been passed into emitter AddVexPrefix() which
ends up encoded VEX.L=1, the fix is to pass target type and base
type for those instructions to ensure that VEX.L=0 at emitter
AddVexPrefix()

Fix dotnet/coreclr#8328

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

7 years agoCorrectly sequence fgMorphModToSubMulDiv
Carol Eidt [Wed, 14 Dec 2016 21:58:11 +0000 (13:58 -0800)]
Correctly sequence fgMorphModToSubMulDiv

This method was creating a temp, but the final result was a GT_SUB with
a use of the temp as its op1, and it was not setting GTF_REVERSE_OPS.
This led to a liveness assert in LSRA.

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

7 years agoAdd a regression test.
Pat Gavlin [Wed, 14 Dec 2016 21:52:50 +0000 (13:52 -0800)]
Add a regression test.

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

7 years agoMerge pull request dotnet/coreclr#8582 from dotnet-bot/master-UpdateDependencies
Gaurav Khanna [Wed, 14 Dec 2016 21:32:00 +0000 (13:32 -0800)]
Merge pull request dotnet/coreclr#8582 from dotnet-bot/master-UpdateDependencies

Update CoreClr, CoreFx to beta-24814-03, beta-24814-02, respectively (master)

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

7 years agoFix ref count adjustment in `fgMorphBlockStmt`.
Pat Gavlin [Wed, 14 Dec 2016 20:23:54 +0000 (12:23 -0800)]
Fix ref count adjustment in `fgMorphBlockStmt`.

LclVar ref counts must be incremented before attempting to remove the
morphed statement, since doing so decrements ref counts (and thus
requires refcounts to be conservatively correct).

Fixes VSO 359734.

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

7 years ago[Linux][GDB-JIT] Add simple C++ mangling of method names in GDBJIT DWARF (dotnet...
Igor Kulaychuk [Wed, 14 Dec 2016 19:38:11 +0000 (22:38 +0300)]
[Linux][GDB-JIT] Add simple C++ mangling of method names in GDBJIT DWARF (dotnet/coreclr#8638)

* Add simple C++ mangling of method names in GDBJIT DWARF

Example:
    Namespace1.Class1.Method -> void Namespace1_Class1::Method()

* Do not convert a name during mangling if target buffer is NULL

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

7 years agoMerge pull request dotnet/coreclr#8601 from pgavlin/gh7963
Pat Gavlin [Wed, 14 Dec 2016 19:21:17 +0000 (11:21 -0800)]
Merge pull request dotnet/coreclr#8601 from pgavlin/gh7963

Fix consume-order checking in codegen.

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

7 years agoAdd support for R2R ldvirtftn helpers (dotnet/coreclr#8608)
Michal Strehovský [Wed, 14 Dec 2016 18:03:53 +0000 (10:03 -0800)]
Add support for R2R ldvirtftn helpers (dotnet/coreclr#8608)

The codegen for the non-readytorun path (used on CoreCLR) requires the
runtime to support general purpose virtual method resolution based on a
method handle. CoreRT doesn't have such helpers.

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

7 years agoUpdate CoreClr, CoreFx to beta-24814-03, beta-24814-02, respectively
dotnet-bot [Wed, 14 Dec 2016 17:26:31 +0000 (17:26 +0000)]
Update CoreClr, CoreFx to beta-24814-03, beta-24814-02, respectively

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

7 years agoMove RUNTIME_FUNCTION__BeginAddress into clrnt.h (dotnet/coreclr#8632)
Jonghyun Park [Wed, 14 Dec 2016 10:35:21 +0000 (19:35 +0900)]
Move RUNTIME_FUNCTION__BeginAddress into clrnt.h (dotnet/coreclr#8632)

RUNTIME_FUNCTION__BeginAddress is defined in corcompile.h for x86, but
is defined in clrnt.h for all the other architectures.

This commit moves RUNTIME_FUNCTION__BeginAddress defines for x86 into
clrnt.h to make it consistent.

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

7 years ago[x86/Linux] Adds Dummy Exception Handler (dotnet/coreclr#8613)
Jonghyun Park [Wed, 14 Dec 2016 10:29:32 +0000 (19:29 +0900)]
[x86/Linux] Adds Dummy Exception Handler (dotnet/coreclr#8613)

This commit adds a dummy exeption handler to enable x86/Linux build.

This commit also reverts 7b92136d5ee to make it easy to enable
WIN64EXCEPTIONS in x86/Linux.

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

7 years ago[ARM32/Linux] Initial bring up of FEATURE_INTERPRETER (dotnet/coreclr#8594)
mskvortsov [Wed, 14 Dec 2016 02:26:32 +0000 (05:26 +0300)]
[ARM32/Linux] Initial bring up of FEATURE_INTERPRETER (dotnet/coreclr#8594)

* Bring up FEATURE_INTERPRETER for ARM32/Linux
* Add a disclaimer message for GC preemption workaround

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

7 years agoAdding method implementations to fast span/readonlyspan (dotnet/coreclr#8607)
ahsonkhan [Wed, 14 Dec 2016 02:25:29 +0000 (18:25 -0800)]
Adding method implementations to fast span/readonlyspan  (dotnet/coreclr#8607)

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

7 years ago[x86/Linux] Enforce 16-byte stack alignment (dotnet/coreclr#8587)
Jonghyun Park [Wed, 14 Dec 2016 02:15:21 +0000 (11:15 +0900)]
[x86/Linux] Enforce 16-byte stack alignment (dotnet/coreclr#8587)

Clang (and GCC) requires 16-byte stack alignment, but the current
implementation of CallDescrInternal and ThePreStub does not provide any
guarantee on stack alignment.

This commit adds 16-byte stack alignment adjust code inside these functions.

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

7 years ago[x86/Linux] Fix incorrect __fastcall definition (dotnet/coreclr#8585)
Jonghyun Park [Wed, 14 Dec 2016 01:26:14 +0000 (10:26 +0900)]
[x86/Linux] Fix incorrect __fastcall definition (dotnet/coreclr#8585)

In x86/Linux, __fastcall is defined as __stdcall which causes stack
corruption issue for the following functions:
 - HelperMethodFrameRestoreState
 - LazyMachStateCaptureState

This commit removes __fastcall definition as clang recognize __fastcall.

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

7 years ago[x86/Linux] Fix "Bad opcode" assert in unwindLazyState (dotnet/coreclr#8609)
Jonghyun Park [Wed, 14 Dec 2016 00:46:40 +0000 (09:46 +0900)]
[x86/Linux] Fix "Bad opcode" assert in unwindLazyState (dotnet/coreclr#8609)

* [x86/Linux] Fix "Bad opcode" assert in unwindLazyState

This commit suppresses "Bad opcode" assert while runing "Hello, World" example.

This commit address the following three code patterns discovered while
digging the assert failure:
 - and $0x1, %al
 - xor $0xff, %al
 - stack protection code:
   mov %gs:<off>, <reg>
   cmp <off>(%esp), <reg>
   mov <reg>, <off>($esp)
   jne <disp32>

This commit revises LazyMachState::unwindLazyState to handle the first two patterns,
and revises compile options not to emit the third pattern.

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

7 years agoMerge pull request dotnet/coreclr#8617 from hqueue/arm/test20161210/IsContainableImmed
Bruce Forstall [Tue, 13 Dec 2016 23:59:02 +0000 (15:59 -0800)]
Merge pull request dotnet/coreclr#8617 from hqueue/arm/test20161210/IsContainableImmed

Ryujit/ARM32 Initial Lowering::IsContainableImmed for ARM

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

7 years ago[x86/Linux] Port jithelp.asm (dotnet/coreclr#8491)
Jonghyun Park [Tue, 13 Dec 2016 23:36:06 +0000 (08:36 +0900)]
[x86/Linux] Port jithelp.asm (dotnet/coreclr#8491)

* [x86/Linux] Port jithelp.asm

This commit ports jithelp.asm for x86/Linux

The following Tailcall helpers are marked as NYI:
 - JIT_TailCall
 - JIT_TailCallReturnFromVSD
 - JIT_TailCallVSDLeave
 - JIT_TailCallLeave

* Revise macro and indentation

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

7 years agoFix the ARM32 build.
Pat Gavlin [Tue, 13 Dec 2016 23:30:09 +0000 (15:30 -0800)]
Fix the ARM32 build.

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

7 years agoRemove no-op file security (dotnet/coreclr#8611)
Jeremy Kuhne [Tue, 13 Dec 2016 22:40:23 +0000 (14:40 -0800)]
Remove no-op file security (dotnet/coreclr#8611)

Deletes FileSecurityState and pulls redundant methods. Also
removes DriveInfo, which isn't in use in Core.

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

7 years agoFix consume-order checking in codegen.
Pat Gavlin [Mon, 12 Dec 2016 19:34:26 +0000 (11:34 -0800)]
Fix consume-order checking in codegen.

The switch to LIR invalidated the correspondence between a node's
sequence number and the order in which it must be consumed with respect
to other nodes. This in turn made the consume-order checks during code
generation incorrect.

This change introduces a new field, `gtUseNum`, that is used during code
generation to check the order in which nodes are consumed. Re-enabling
these checks revealed a bug in code generation for locked instructions
on x86, which were consuming their operands out-of-order; this change
also contains a fix for that bug.

Fixes dotnet/coreclr#7963.

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

7 years agoMerge pull request dotnet/coreclr#8560 from AlexRadch/Deconstruction
Wes Haggard [Tue, 13 Dec 2016 21:34:16 +0000 (13:34 -0800)]
Merge pull request dotnet/coreclr#8560 from AlexRadch/Deconstruction

Supporting C# 7 deconstruction of KeyValuePair and DictionaryEntry

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

7 years agoMerge pull request dotnet/coreclr#8621 from mikedn/cmp-cast-drop
Sivarv [Tue, 13 Dec 2016 19:39:02 +0000 (11:39 -0800)]
Merge pull request dotnet/coreclr#8621 from mikedn/cmp-cast-drop

Fix incorrect compare narrowing in TreeNodeInfoInitCmp

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

7 years agoFix incorrect compare narrowing in TreeNodeInfoInitCmp
Mike Danes [Tue, 13 Dec 2016 12:45:13 +0000 (14:45 +0200)]
Fix incorrect compare narrowing in TreeNodeInfoInitCmp

TreeNodeInfoInitCmp attempts to eliminate the cast from
`cmp(cast<ubyte>(x), icon)` by narrowing the compare to ubyte. This should
only happen if the constant fits in a byte so it can be narrowed too,
otherwise codegen produces an int sized compare. (or a byte sized compare
with a truncated constant if we try to use GTF_RELOP_SMALL).

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

7 years agoEnable interop debugging for Windows amd64 and x86. (dotnet/coreclr#8603)
Mike McLaughlin [Tue, 13 Dec 2016 17:11:57 +0000 (09:11 -0800)]
Enable interop debugging for Windows amd64 and x86. (dotnet/coreclr#8603)

Found sos portable pdb problem on x86.  Fixed interop problems between the native sos and SOS.NetCore managed helper assembly.

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

7 years agoSynchronize src\mscorlib\corefx with the CoreRT fork (dotnet/coreclr#8619)
Jan Kotas [Tue, 13 Dec 2016 16:35:56 +0000 (08:35 -0800)]
Synchronize src\mscorlib\corefx with the CoreRT fork (dotnet/coreclr#8619)

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

7 years agoRemove managed environment cache (dotnet/coreclr#8604)
Jeremy Kuhne [Tue, 13 Dec 2016 12:51:28 +0000 (04:51 -0800)]
Remove managed environment cache (dotnet/coreclr#8604)

The PAL already caches- no need to do it in managed.
Fold the code back into Environment.cs.

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

7 years agoDelete HostProtection attributes (dotnet/coreclr#8610)
Jan Kotas [Tue, 13 Dec 2016 12:19:55 +0000 (04:19 -0800)]
Delete HostProtection attributes (dotnet/coreclr#8610)

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

7 years agoRyujit/ARM32 Initial Lowering::IsContainableImmed for ARM
Hyung-Kyu Choi [Tue, 13 Dec 2016 06:27:01 +0000 (15:27 +0900)]
Ryujit/ARM32 Initial Lowering::IsContainableImmed for ARM

Initial implementation of IsContainableImmed for ARM.

Signed-off-by: Hyung-Kyu Choi <hk0110.choi@samsung.com>
Commit migrated from https://github.com/dotnet/coreclr/commit/04689b1b87d1cca78649066b79e8317f1e0cfd92

7 years agoMerge pull request dotnet/coreclr#8520 from hqueue/arm/test20161208/lowercast
Carol Eidt [Tue, 13 Dec 2016 02:48:18 +0000 (18:48 -0800)]
Merge pull request dotnet/coreclr#8520 from hqueue/arm/test20161208/lowercast

Ryujit/ARM32: Implement Lowering::LowerCast for ARM

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

7 years agoRyujit/ARM32 Implement Lowering::LowerCast for ARM
Hyung-Kyu Choi [Tue, 13 Dec 2016 00:36:33 +0000 (09:36 +0900)]
Ryujit/ARM32 Implement Lowering::LowerCast for ARM

Simple integer to interger type conversion is passed.
Add comment for LowreCast with C++ comment style.

Signed-off-by: Hyung-Kyu Choi <hk0110.choi@samsung.com>
Commit migrated from https://github.com/dotnet/coreclr/commit/fd68b6fe29f18d69093c7a007fbc8fb9e5eaaa90

7 years agoMerge pull request dotnet/coreclr#8510 from DrewScoggins/CommitNameFix
Drew Scoggins [Tue, 13 Dec 2016 00:30:34 +0000 (16:30 -0800)]
Merge pull request dotnet/coreclr#8510 from DrewScoggins/CommitNameFix

Add ability to give a name to a manual PR run

When using the PR leg of the Jenkins performance jobs it is now possible to specify a name that will be used when inserting the data into the perf database.

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

7 years agoAdd ability to give a name to a PR run
Drew Scoggins [Thu, 8 Dec 2016 00:12:14 +0000 (16:12 -0800)]
Add ability to give a name to a PR run

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

7 years agoRename Contract.Assert to Debug.Assert (dotnet/coreclr#8600)
Jan Kotas [Mon, 12 Dec 2016 23:43:49 +0000 (15:43 -0800)]
Rename Contract.Assert to Debug.Assert (dotnet/coreclr#8600)

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

7 years ago[x86/Linux] implement TheUMEntryPrestub (dotnet/coreclr#8589)
SaeHie Park [Mon, 12 Dec 2016 23:22:29 +0000 (08:22 +0900)]
[x86/Linux] implement TheUMEntryPrestub (dotnet/coreclr#8589)

Initial code for x86 TheUMEntryPrestub, UMThunkStub

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

7 years agoFix longname DAC to enable arm[64] symbol packages (dotnet/coreclr#8574)
Davis Goodin [Mon, 12 Dec 2016 21:50:05 +0000 (15:50 -0600)]
Fix longname DAC to enable arm[64] symbol packages (dotnet/coreclr#8574)

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

7 years agoMerge pull request dotnet/coreclr#8532 from sivarv/fixedRegFix
Sivarv [Mon, 12 Dec 2016 21:36:43 +0000 (13:36 -0800)]
Merge pull request dotnet/coreclr#8532 from sivarv/fixedRegFix

Fix to issue 8286.

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

7 years agoMerge pull request dotnet/coreclr#8598 from adiaaida/disableGetGeneration
Michelle McDaniel [Mon, 12 Dec 2016 21:26:02 +0000 (13:26 -0800)]
Merge pull request dotnet/coreclr#8598 from adiaaida/disableGetGeneration

Disable GetGenerationWR2 for GCStress on x86

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

7 years agoMerge pull request dotnet/coreclr#8541 from briansull/vso-287671
Brian Sullivan [Mon, 12 Dec 2016 19:43:10 +0000 (11:43 -0800)]
Merge pull request dotnet/coreclr#8541 from briansull/vso-287671

Fix missing flags on GT_DYN_BLK node

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

7 years ago// BLOCKED (do not add now): [EditorBrowsable(EditorBrowsableState.Never)]
Alexander Radchenko [Mon, 12 Dec 2016 19:27:49 +0000 (02:27 +0700)]
// BLOCKED (do not add now): [EditorBrowsable(EditorBrowsableState.Never)]

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

7 years agoDisable GetGenerationWR2 for GCStress on x86
Michelle McDaniel [Mon, 12 Dec 2016 19:01:47 +0000 (11:01 -0800)]
Disable GetGenerationWR2 for GCStress on x86

Disable this test for GCStress on x86 until the cause for its failure
can be investigated.

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

7 years agoMerge pull request dotnet/coreclr#8421 from hseok-oh/enable_arm_linux_nupkg
Gaurav Khanna [Mon, 12 Dec 2016 18:54:13 +0000 (10:54 -0800)]
Merge pull request dotnet/coreclr#8421 from hseok-oh/enable_arm_linux_nupkg

First step to create nuget packages for ARM32/Linux

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

7 years agoSpan<T> api update (dotnet/coreclr#8583)
Matt Warren [Mon, 12 Dec 2016 17:30:58 +0000 (17:30 +0000)]
Span<T> api update (dotnet/coreclr#8583)

* Changing method/property order to match CoreFX impl

To make diffing the files easier

* Added other missing methods to match CoreFX impl

Added:
- public void CopyTo(Span<T> destination)
- public static bool operator ==(Span<T> left, Span<T> right)
- public static bool operator !=(Span<T> left, Span<T> right)
- public override bool Equals(object obj)
- public override int GetHashCode()

Also removed 'public void Set(ReadOnlySpan<T> values)' and it's no
longer part of the Span<T> public API, see

https://github.com/dotnet/apireviews/tree/master/2016/11-04-SpanOfT#spantset

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

7 years ago[x86/Linux][SOS] Don't include utilcode.h in gcdumpx86.cpp and gcdump.cpp (dotnet...
Evgeny Pavlov [Mon, 12 Dec 2016 12:27:49 +0000 (15:27 +0300)]
[x86/Linux][SOS] Don't include utilcode.h in gcdumpx86.cpp and gcdump.cpp (dotnet/coreclr#8475)

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

7 years ago[x86/Linux][SOS] Add CALLBACK (aka stdcall) to function declarations (dotnet/coreclr...
Evgeny Pavlov [Mon, 12 Dec 2016 10:55:15 +0000 (13:55 +0300)]
[x86/Linux][SOS] Add CALLBACK (aka stdcall) to function declarations (dotnet/coreclr#8476)

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

7 years agoLocal GC: Decouple write barrier operations between the GC and EE (dotnet/coreclr...
Sean Gillespie [Sun, 11 Dec 2016 01:50:06 +0000 (17:50 -0800)]
Local GC: Decouple write barrier operations between the GC and EE (dotnet/coreclr#8568)

* Decouple write barrier operations between the GC and EE

* Address code review feedback

* Address code review feedback

* Repair the standalone GC build

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

7 years agoFix typo in clang-format directive and reformat end of flowgraph.cpp (dotnet/coreclr...
Andy Ayers [Sat, 10 Dec 2016 18:11:04 +0000 (10:11 -0800)]
Fix typo in clang-format directive and reformat end of flowgraph.cpp (dotnet/coreclr#8573)

Last 4K or so lines of flowgraph.cpp were not being formatted because
the clang-format on directive had a typo.

Fix the typo and reformat the latter part of the file.

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

7 years agoMerge pull request dotnet/coreclr#8581 from stephentoub/cwt_unsafecast
Stephen Toub [Sat, 10 Dec 2016 16:03:19 +0000 (11:03 -0500)]
Merge pull request dotnet/coreclr#8581 from stephentoub/cwt_unsafecast

Use JitHelpers.UnsafeCast in ConditionalWeakTable

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

7 years agoUse JitHelpers.UnsafeCast in ConditionalWeakTable
Stephen Toub [Sat, 10 Dec 2016 14:54:15 +0000 (09:54 -0500)]
Use JitHelpers.UnsafeCast in ConditionalWeakTable

We know the types and can use UnsafeCast when reading out the objects as TKey and TValue.  This improves reading speed by ~30%.

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

7 years agoMerge pull request dotnet/coreclr#8420 from dotnet-bot/master-UpdateDependencies
Stephen Toub [Sat, 10 Dec 2016 13:35:29 +0000 (08:35 -0500)]
Merge pull request dotnet/coreclr#8420 from dotnet-bot/master-UpdateDependencies

Update CoreClr, CoreFx to beta-24810-01, beta-24810-02, respectively (master)

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

7 years agoImprove ConditionalWeakTable.Remove (dotnet/coreclr#8580)
Jan Kotas [Sat, 10 Dec 2016 08:31:20 +0000 (00:31 -0800)]
Improve ConditionalWeakTable.Remove (dotnet/coreclr#8580)

Clear the key of the deleted entry to allow GC collect objects pointed to by it

Fixes dotnet/coreclr#8577

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

7 years agoTimeZoneInfo: Avoid cloning privately-created ArgumentRule[] arrays (dotnet/coreclr...
Justin Van Patten [Sat, 10 Dec 2016 06:27:54 +0000 (22:27 -0800)]
TimeZoneInfo: Avoid cloning privately-created ArgumentRule[] arrays (dotnet/coreclr#8575)

TimeZoneInfo currently always creates a defensive copy of the specified
ArgumentRule[] array when created. This makes sense for the public
static factory methods. However, there's no need to create a defensive
copy of arrays created privately as part of its implementation (e.g.
reading the rules from the registry/disk). This change avoids the
unnecessary cloning.

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

7 years agoFix misguided lock in CurrentTimeZone (dotnet/coreclr#8569)
Justin Van Patten [Sat, 10 Dec 2016 06:15:56 +0000 (22:15 -0800)]
Fix misguided lock in CurrentTimeZone (dotnet/coreclr#8569)

CurrentTimeZone locks against a static lock object when modifying a
non-static Hashtable. Instead, use the Hashtable instance itself as the
lock object.

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

7 years agoRemoves final FEATURE_CORECLR defines (dotnet/coreclr#8555)
Jeremy Kuhne [Sat, 10 Dec 2016 05:11:20 +0000 (21:11 -0800)]
Removes final FEATURE_CORECLR defines (dotnet/coreclr#8555)

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

7 years agoAdding API ConditionalWeakTable.AddOrUpdate (dotnet/coreclr#8490)
Santiago Fernandez Madero [Sat, 10 Dec 2016 05:11:05 +0000 (21:11 -0800)]
Adding API ConditionalWeakTable.AddOrUpdate (dotnet/coreclr#8490)

* Added ConditionalWeakTable.AddOrUpdate

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

7 years agoUpdate CoreClr, CoreFx to beta-24810-01, beta-24810-02, respectively
dotnet-bot [Sat, 10 Dec 2016 04:00:24 +0000 (04:00 +0000)]
Update CoreClr, CoreFx to beta-24810-01, beta-24810-02, respectively

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

7 years agoFix to issue 8286.
sivarv [Thu, 8 Dec 2016 20:12:35 +0000 (12:12 -0800)]
Fix to issue 8286.

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

7 years agoMerge pull request dotnet/coreclr#8576 from stephentoub/cwt_clear
Stephen Toub [Sat, 10 Dec 2016 01:41:08 +0000 (20:41 -0500)]
Merge pull request dotnet/coreclr#8576 from stephentoub/cwt_clear

Change ConditionalWeakTable.Clear

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

7 years agoChange ConditionalWeakTable.Clear
Stephen Toub [Sat, 10 Dec 2016 00:00:50 +0000 (19:00 -0500)]
Change ConditionalWeakTable.Clear

The original CoreRT implementation just dropped the current table and replaced it with a new one.  In the process of porting the CoreRT implementation to CoreCLR, I'd changed it to instead remove each item from the table (by setting its hashcode to -1, as does Remove), in order to work around some code in the finalizer that would null out te parent's reference to the container, and that would cause problems with dropping this table... but that code in the finalizer changed before it got merged, and in its current form, the old CoreRT clear implementation was fine.  It's also likely better, as it'll let the handles be cleaned up earlier, and it's simple.  So reverting back to it.

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

7 years agoMerge pull request dotnet/coreclr#8572 from stephentoub/cwt_gpas
Stephen Toub [Fri, 9 Dec 2016 23:42:10 +0000 (18:42 -0500)]
Merge pull request dotnet/coreclr#8572 from stephentoub/cwt_gpas

Change CWT use of GetPrimaryAndSecondary to GetPrimary

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

7 years agoStrip some security related attributes (dotnet/coreclr#8571)
Jeremy Kuhne [Fri, 9 Dec 2016 21:42:16 +0000 (13:42 -0800)]
Strip some security related attributes (dotnet/coreclr#8571)

Strips SecurityCritical, SecuritySafeCritical, SecurityPermission,
EnvironmentPermission, and PermissionSet attributes.

Also removes empty defines these left behind.

Patterns used:

^.*\[(System\.Security\.)?SecurityCritical\](\s*//.*|\s*)$[\r\n]*
^.*#if FEATURE_CORECLR[\s\r\n]*(#else)?[\s\r\n]*#endif.*[\r\n]*
^.*\[(System\.Security\.Permissions\.)?SecurityPermission(Attribute)?\([^)]*\)\](\s*//.*|\s*)$[\r\n]*

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

7 years agoChange CWT use of GetPrimaryAndSecondary to GetPrimary
Stephen Toub [Fri, 9 Dec 2016 21:09:26 +0000 (16:09 -0500)]
Change CWT use of GetPrimaryAndSecondary to GetPrimary

This snuck in as part of my previous ConditionalWeakTable changes.  We don't need the secondary here, and it's more expensive to get than just the primary.

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

7 years agoFix path separator in CrossGen help on Linux
John Chen [Fri, 9 Dec 2016 17:20:39 +0000 (09:20 -0800)]
Fix path separator in CrossGen help on Linux

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

7 years agoMake it easier to iterate through an ArraySegment (dotnet/coreclr#8559)
Alexander Radchenko [Fri, 9 Dec 2016 19:33:44 +0000 (02:33 +0700)]
Make it easier to iterate through an ArraySegment (dotnet/coreclr#8559)

* Make it easier to iterate through an ArraySegment. See Make it easier to iterate through an ArraySegment

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

7 years agoMerge pull request dotnet/coreclr#8544 from sivarv/moveRegFix
Sivarv [Fri, 9 Dec 2016 19:30:30 +0000 (11:30 -0800)]
Merge pull request dotnet/coreclr#8544 from sivarv/moveRegFix

Fix to issue 8287.

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

7 years agoMerge pull request dotnet/coreclr#8507 from stephentoub/portcorert_cwt
Stephen Toub [Fri, 9 Dec 2016 18:04:01 +0000 (13:04 -0500)]
Merge pull request dotnet/coreclr#8507 from stephentoub/portcorert_cwt

Make ConditionalWeakTable reads lock-free

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

7 years agoStringBuilder.AppendJoin (appending lists to StringBuilder) (dotnet/coreclr#8350)
Alexander Radchenko [Fri, 9 Dec 2016 17:37:23 +0000 (00:37 +0700)]
StringBuilder.AppendJoin (appending lists to StringBuilder) (dotnet/coreclr#8350)

Adding StringBuilder.AppendJoin

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

7 years agoMerge pull request dotnet/coreclr#8563 from xoofx/TPA_glossary
Gaurav Khanna [Fri, 9 Dec 2016 16:24:31 +0000 (08:24 -0800)]
Merge pull request dotnet/coreclr#8563 from xoofx/TPA_glossary

Add TPA/Trusted Platform Assemblies description to the glossary

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

7 years agoAdd TPA/Trusted Platform Assemblies description to the glossary (From https://github...
Alexandre Mutel [Fri, 9 Dec 2016 16:17:46 +0000 (17:17 +0100)]
Add TPA/Trusted Platform Assemblies description to the glossary (From https://github.com/dotnet/coreclr/issues/6470#issuecomment-235161459 )

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

7 years agomodel.xml
Alexander Radchenko [Fri, 9 Dec 2016 15:14:37 +0000 (22:14 +0700)]
model.xml

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

7 years ago[x86/Linux] Port ResolveWorkerAsmStub (dotnet/coreclr#8557)
Jonghyun Park [Fri, 9 Dec 2016 12:27:03 +0000 (21:27 +0900)]
[x86/Linux] Port ResolveWorkerAsmStub (dotnet/coreclr#8557)

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

7 years ago[x86/Linux] Use Portable FastGetDomain (dotnet/coreclr#8556)
Jonghyun Park [Fri, 9 Dec 2016 12:22:06 +0000 (21:22 +0900)]
[x86/Linux] Use Portable FastGetDomain (dotnet/coreclr#8556)

FastGetDomain function (with  __declspec(naked)) causes segmentation
fault.

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

7 years agoFix incremental build when dummy version.cpp is generated (dotnet/coreclr#8547)
Jan Vorlicek [Fri, 9 Dec 2016 09:50:01 +0000 (10:50 +0100)]
Fix incremental build when dummy version.cpp is generated (dotnet/coreclr#8547)

This change fixes a problem with incremental build on Unix. When the
version.cpp is generated by the build.sh as a dummy one with no real
version stamp in it, it is recreated every time the build.sh is run.
That means that build needs to rebuild that file and also re-link
all the components that include it.
This change tests the file presence and contents before actually
regenerating it.

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

7 years ago[x86/Linux] Fix getcpuid calling convention (dotnet/coreclr#8552)
SaeHie Park [Fri, 9 Dec 2016 09:29:16 +0000 (18:29 +0900)]
[x86/Linux] Fix getcpuid calling convention (dotnet/coreclr#8552)

Fix getcpuid(), getextcpuid() with STDCALL
Fix xmmYmmStateSupport() with STDCALL

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

7 years agoStrip more defines from CoreLib (dotnet/coreclr#8545)
Jeremy Kuhne [Fri, 9 Dec 2016 05:39:00 +0000 (21:39 -0800)]
Strip more defines from CoreLib (dotnet/coreclr#8545)

* Strip more defines from CoreLib

Removes the rest of

FEATURE_CAS_POLICY
FEATURE_REMOTING
FEATURE_MACL

And another significant chunk of

!FEATURE_CORECLR

* Address feedback

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

7 years agoFix perf regression with lots of objects in a ConditionalWeakTable
Stephen Toub [Wed, 7 Dec 2016 21:35:03 +0000 (16:35 -0500)]
Fix perf regression with lots of objects in a ConditionalWeakTable

The CoreRT implementation of ConditionalWeakTable that was ported back to CoreCLR uses a special scheme to make reads lock-free.  When the container needs to grow, it allocates new arrays and duplicates all of the dependency handles from the previous array, rather than just copying them.  This avoids issues stemming from a thread getting a dependency handle in an operation on the container, then having that handle destroyed, and then trying to use it; the handle won't be destroyed as long as the container is referenced.

However, this also leads to a significant cost in a certain situation.  Every time the container grows, it allocates another N dependency handles where N is the current size of the container.  So, for example, with an initial size of 8, if 64 objects are added to the container, it'll allocate 8 dependency handles, then another 16, then another 32, and then another 64, resulting in significantly more handles than in the old implementation, which would only allocate 64 handles total.

This commit fixes that by changing the scheme slightly.  A container still frees its handles in its finalizer.  However, rather than duplicating all handles, that responsibility for freeing is transferred from one container to the next.  Then to avoid issues where, for example, the second container is released while the first is still in use, a reference is maintained from the first to the second, so that the second can't be finalized while the first is still in use.

The commit also fixes a race condition with resurrection and finalization, whereby dependency handles could be used while or after they're being freed by the finalizer. It's addressed by only freeing handles in a second finalization after clearing out state in the first finalization to guarantee no possible usage during the second.

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

7 years agoPort ConditionalWeakTable from CoreRT
Stephen Toub [Wed, 7 Dec 2016 20:43:05 +0000 (15:43 -0500)]
Port ConditionalWeakTable from CoreRT

The CoreRT ConditionalWeakTable was modified to support lock-free reads.  This ports the implementation back to coreclr.

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

7 years agoFix to issue 8287.
sivarv [Thu, 8 Dec 2016 23:40:20 +0000 (15:40 -0800)]
Fix to issue 8287.

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

7 years agoMerge pull request dotnet/coreclr#8539 from sandreenko/fix-unix-unwind-info
sandreenko [Fri, 9 Dec 2016 01:56:58 +0000 (17:56 -0800)]
Merge pull request dotnet/coreclr#8539 from sandreenko/fix-unix-unwind-info

Fix unix unwind info

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