platform/upstream/coreclr.git
5 years agoOptimize number parsing (#21365)
Pent Ploompuu [Wed, 12 Dec 2018 14:47:16 +0000 (16:47 +0200)]
Optimize number parsing (#21365)

5 years agoUpdate dependencies from https://github.com/dotnet/arcade build 708 (#21487)
dotnet-maestro[bot] [Wed, 12 Dec 2018 13:02:42 +0000 (13:02 +0000)]
Update dependencies from https://github.com/dotnet/arcade build 708 (#21487)

This change updates the following dependencies
- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.18610.4
- Microsoft.DotNet.Helix.Sdk - 1.0.0-beta.18610.4

5 years agoAdded support for debugging a sandboxed app on Mac (#21068)
Oded Hanson [Wed, 12 Dec 2018 00:42:17 +0000 (02:42 +0200)]
Added support for debugging a sandboxed app on Mac (#21068)

* Fixed bug in StackString where the size is not initialized correctly to STACK_COUNT

* Added CharString and WCharString template classes and a generic CharStringFromLPCWSTR method

* Added support for debugging a sandboxed app on Mac

This change fixes the usage of IPC while debugging while running in a sandbox. When running in a sandbox, the temporary folder for each process will be different. Thus the pipes being created in TwoWayPipe right now would be created in different directories in the debugger process and the process being debugged.
This change configures the folder to be used based on the application group ID that the sandboxed app belongs to.
For the same reasons, the names sempahores being used to synchronize the debugger attach need to be prefixed with the application group ID. This change was abit more involved since the name of the semaphore is limited to 31 characters, so we had to encode the semaphore names differently to make them shorter.

Last, new APIs to the debugger shim were added to support this new feature. This change only handles the runtime side and the dbgshim. An additional change to vsdbg needs to be done to use the new APIs.

fixes #21066

* Fixed build breaks on non Mac Unix platforms

* Fixed usage of gApplicationGroupId in non apple environments

* Fixed bug in semaphore names

* Got rid of usage of StackString

* Made PAL_GetApplicationGroupId Apple specific

* Added comment about pragma pack

* Fixed comment

* Added exported symbols

* Duplicated applicationGroupId so it can be used from another thread during register complete callback

* Renamed BitNum2ByteNum to GetExtraEncodedAreaSize to make intent clearer

* Fixed nit comments

* Removed redundant changes in StackString

* Fixed windows build break

* Fixed compilation switch from __APPLE to __APPLE__

* Added missing exports

5 years agoJIT: capture failing inline observation in more cases (#21471)
Andy Ayers [Tue, 11 Dec 2018 22:59:29 +0000 (14:59 -0800)]
JIT: capture failing inline observation in more cases (#21471)

We were not capturing failing inline observations for failed inlines
that got reported by the runtime directly. Move the point of capture
up in the jitted code so it always happens regardless of reporting
obligations.

5 years agoMoving the remaining Vector128/256 helper intrinsics to be implemented using other...
Tanner Gooding [Tue, 11 Dec 2018 21:11:00 +0000 (13:11 -0800)]
Moving the remaining Vector128/256 helper intrinsics to be implemented using other intrinsics (#21451)

* Updating Vector256.Create(V128, V128) to be implemented using other intrinsics

* Updating Vector128.Create(T, ...) and Vector256.Create(T, ...) to be implemented using other intrinsics

* Renaming CreateSoftware to SoftwareFallback and adding clarifying comments to the helper method code

* Fixing Vector128.Create(int, int, int, int) to properly consume the elements for the Sse2 codepath

5 years agoUpdate CoreClr to preview-27211-02 (#21488)
dotnet-maestro-bot [Tue, 11 Dec 2018 18:21:12 +0000 (10:21 -0800)]
Update CoreClr to preview-27211-02 (#21488)

5 years agoUpdate CoreClr to preview-27211-01 (#21481)
dotnet-maestro-bot [Tue, 11 Dec 2018 12:14:52 +0000 (04:14 -0800)]
Update CoreClr to preview-27211-01 (#21481)

5 years agoDelete unnecessary struct initialization (#21482)
Jan Kotas [Tue, 11 Dec 2018 12:12:12 +0000 (07:12 -0500)]
Delete unnecessary struct initialization (#21482)

5 years agomake GC/GCHandle tracing pay-for-play (#21479)
Sung Yoon Whang [Tue, 11 Dec 2018 06:49:18 +0000 (22:49 -0800)]
make GC/GCHandle tracing pay-for-play (#21479)

5 years agoFix for SetGCHandle event not getting emitted when running under Standalone GC (...
Sung Yoon Whang [Tue, 11 Dec 2018 06:49:03 +0000 (22:49 -0800)]
Fix for SetGCHandle event not getting emitted when running under Standalone GC (#21478)

5 years agoEliminate GenTreeRegVar and GT_REG_VAR and RegVar (#18317)
Julius R Friedman [Tue, 11 Dec 2018 05:42:06 +0000 (00:42 -0500)]
Eliminate GenTreeRegVar and GT_REG_VAR and RegVar (#18317)

Issue #18201 / Hackathon

5 years agoAdding support for the 2-byte VEX encoding to the emitter (#21453)
Tanner Gooding [Tue, 11 Dec 2018 01:41:21 +0000 (17:41 -0800)]
Adding support for the 2-byte VEX encoding to the emitter (#21453)

* Adding support for the 2-byte VEX encoding to the emitter

* Relocating and expanding the comment which explains the two-byte VEX encoding check

5 years agoMerge pull request #21386 from briansull/issue_19925
Brian Sullivan [Tue, 11 Dec 2018 01:24:10 +0000 (17:24 -0800)]
Merge pull request #21386 from briansull/issue_19925

Preserve the exception sets from child nodes when we create a new unique value number

5 years agoSpecify HelixTargetQueues in yaml (#21443)
Egor Chesakov [Tue, 11 Dec 2018 00:53:40 +0000 (16:53 -0800)]
Specify HelixTargetQueues in yaml (#21443)

* Parametrize test-job with helixQueues(Public|Internal) in eng/test-job.yml and specify them in eng/platform-matrix.yml

* Remove HelixTargetQueues property in tests/helixpublishwitharcade.proj

* Fix the error "unknown os: linux2" with Python script

5 years agoFix warnings as errors
Jan Kotas [Mon, 10 Dec 2018 14:47:48 +0000 (06:47 -0800)]
Fix warnings as errors

Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
5 years agoRefactor internal System.AppDomain out of CoreLib (#21460)
Jan Kotas [Mon, 10 Dec 2018 21:34:03 +0000 (13:34 -0800)]
Refactor internal System.AppDomain out of CoreLib (#21460)

Fixes #21028

5 years agoRenamed VNCollectExc to VNUnionExcSet
Brian Sullivan [Mon, 10 Dec 2018 21:26:13 +0000 (13:26 -0800)]
Renamed VNCollectExc to VNUnionExcSet

5 years agoMerge branch 'master' into issue_19925
Brian Sullivan [Mon, 10 Dec 2018 21:18:11 +0000 (13:18 -0800)]
Merge branch 'master' into issue_19925

5 years agoInstead of using Win8+ api-sets use forwarder DLL to support downlevel versions of...
Aaron Robinson [Mon, 10 Dec 2018 20:21:48 +0000 (12:21 -0800)]
Instead of using Win8+ api-sets use forwarder DLL to support downlevel versions of Windows. (#21469)

5 years agoUpdate CoreClr to preview-27210-02 (#21467)
dotnet-maestro-bot [Mon, 10 Dec 2018 16:20:17 +0000 (08:20 -0800)]
Update CoreClr to preview-27210-02 (#21467)

5 years agoAdd support for RVA fields to crossgen/R2R (#21463)
Jan Kotas [Mon, 10 Dec 2018 15:52:15 +0000 (07:52 -0800)]
Add support for RVA fields to crossgen/R2R (#21463)

* Add support for RVA fields to crossgen/R2R

RVA fields are became more common with pre-inititialized ReadOnlySpan<byte>. Fix crossgen to deal with them for R2R.

* Fix tests, map new JIT helper for R2R

5 years agoUpdate dependency files (#21448)
dotnet-maestro[bot] [Mon, 10 Dec 2018 14:42:58 +0000 (14:42 +0000)]
Update dependency files (#21448)

* Update dependencies from https://github.com/dotnet/arcade build 677

This change updates the following dependencies
- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.18607.6
- Microsoft.DotNet.Helix.Sdk - 1.0.0-beta.18607.6

* Update dependencies from https://github.com/dotnet/arcade build 679

This change updates the following dependencies
- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.18608.1
- Microsoft.DotNet.Helix.Sdk - 1.0.0-beta.18608.1

* Update dependencies from https://github.com/dotnet/arcade build 679

This change updates the following dependencies
- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.18608.1
- Microsoft.DotNet.Helix.Sdk - 1.0.0-beta.18608.1

5 years agoUpdate CoreClr, PgoData to preview-27210-01, master-20181210-0037, respectively ...
dotnet-maestro-bot [Mon, 10 Dec 2018 11:43:04 +0000 (03:43 -0800)]
Update CoreClr, PgoData to preview-27210-01, master-20181210-0037, respectively (#21452)

5 years agoFix for #21456 (Regressions in attribute allocations for non-generic attributes)...
Nick Craver [Mon, 10 Dec 2018 11:01:52 +0000 (06:01 -0500)]
Fix for #21456 (Regressions in attribute allocations for non-generic attributes) (#21462)

* Fix for #21456 - restrict increased generic attribute allocations to only generic attributes

This is a trivial quick-fix for #21456 where regressions between 2.1 and 3.0 were discovered on most attibute pathways due to the allocation overhead in the generic-supporting pathways. The workaround is to simply not take that slow/expensive path for non-generics.

While I'd like to optimize `RuntimeModule.ResolveMethod` further, there's a public surface area in play there that makes the changes non-trivial. There, we'll have to choose overhead on the public path (which may still be a net win), or duplication in code for another path.

* Update comments

5 years agoDelete vm/context.* (#21459)
Jan Kotas [Mon, 10 Dec 2018 10:57:57 +0000 (02:57 -0800)]
Delete vm/context.* (#21459)

* Delete vm/context.*

Leftover from remoting

5 years agoAdded Close On Exec Attribute for Mutex files (#21455) (#21458)
Oded Hanson [Mon, 10 Dec 2018 09:51:48 +0000 (11:51 +0200)]
Added Close On Exec Attribute for Mutex files (#21455) (#21458)

* Added Close On Exec Attribute for mutex files (#21455)

5 years agoFixed bug where "DCI_NUMA" was missing from debug channel names (#21454) (#21457)
Oded Hanson [Mon, 10 Dec 2018 09:49:39 +0000 (11:49 +0200)]
Fixed bug where "DCI_NUMA" was missing from debug channel names (#21454) (#21457)

In additional to adding "DCI_NUMA" to dbg_channel_names, a static assertion was added to verify that  dbg_channel_names length is valid. Also added some comments to help developpers not to forget to add corresponding entries in dbg_channel_names.

FIxes #21454

5 years agoUpdate CoreClr, CoreFx, CoreSetup, PgoData to preview-27208-01, preview.18606.1,...
dotnet-maestro-bot [Sun, 9 Dec 2018 01:02:09 +0000 (17:02 -0800)]
Update CoreClr, CoreFx, CoreSetup, PgoData to preview-27208-01, preview.18606.1, preview-27206-02, master-20181208-0038, respectively (#21374)

5 years agoFix regression in fat calls (#21446)
Michal Strehovský [Sat, 8 Dec 2018 21:48:06 +0000 (22:48 +0100)]
Fix regression in fat calls (#21446)

This seems to fix an AV in RyuJIT.

5 years agoLeap Seconds Support (#21420)
Tarek Mahmoud Sayed [Sat, 8 Dec 2018 20:40:13 +0000 (12:40 -0800)]
Leap Seconds Support (#21420)

* Leap Seconds Support

* Address Feedback

* More feedback addressing

5 years agoInvalid setting csharp_new_line_within_query_expression_clauses in .editorconfig...
Bastian Schmidt [Sat, 8 Dec 2018 18:45:34 +0000 (19:45 +0100)]
Invalid setting csharp_new_line_within_query_expression_clauses in .editorconfig (#21449)

Same as in https://github.com/dotnet/corefx/issues/25991.

Roslyn doesn't support csharp_new_line_within_query_expression_clauses.
But Roslyn does support csharp_new_line_between_query_expression_clauses and it's missing from .editorconfig.

I also removed the comment "# Trim trailing whitespace" because that option is not set.

5 years agoRemove `TryGetGuid()` and `GetDefaultInterfaceForCoclass()` from the (#21447)
Aaron Robinson [Sat, 8 Dec 2018 18:41:29 +0000 (10:41 -0800)]
Remove `TryGetGuid()` and `GetDefaultInterfaceForCoclass()` from the (#21447)

* Remove `TryGetGuid()` and `GetDefaultInterfaceForCoclass()` from the
stdinterfaces API surface.

5 years agoAdd PNSE CustomMarshaler tests (for Tlbimp compat) (#21438)
Jeremy Koritzinsky [Sat, 8 Dec 2018 05:36:01 +0000 (21:36 -0800)]
Add PNSE CustomMarshaler tests (for Tlbimp compat) (#21438)

5 years agoUse string.Create in ConvertFromUtf32 (#21409)
Stephen Toub [Sat, 8 Dec 2018 04:49:29 +0000 (23:49 -0500)]
Use string.Create in ConvertFromUtf32 (#21409)

* Use string.Create in ConvertFromUtf32

Removes the unsafe code from the method.  Also happens to make it a bit faster.

* Improve Rune.ToString performance

5 years agoRemove some unnecessary spinning (#21437)
Stephen Toub [Sat, 8 Dec 2018 02:14:44 +0000 (21:14 -0500)]
Remove some unnecessary spinning (#21437)

Most of the use of SpinWait in CoreLib involves waiting for some short-lived operation to complete on another thread, in which case the spinning thread should backoff as it's unable to make forward progress until the other operation completes.  In a few cases, however, SpinWait is being used just around CompareExchange operations, such that at least one thread running this code path is guaranteed to make forward progress, and the backoff in the spinning doesn't actually help (in theory it could help to reduce contention if lots of threads were all trying to CompareExchange concurrently, but in such cases you'd actually want more randomized backoff, as otherwise it's likely all the threads would re-attempt at around the same time and similarly re-encounter contention).

5 years agoMoving various Vector128/256 helper method to be implemented using other intrinsics...
Tanner Gooding [Fri, 7 Dec 2018 23:01:23 +0000 (15:01 -0800)]
Moving various Vector128/256 helper method to be implemented using other intrinsics (#21432)

* Updating Vector128.CreateScalar and Vector256.CreateScalar to be implemented using other intrinsics

* Updating Vector128.Equals and Vector256.Equals to be implemented using other intrinsics

* Updating Vector256.WithLower, Vector256.GetUpper, and Vector256.WithUpper to be implemented using other intrinsics

* Updating Vector128.Create(T) and Vector256.Create(T) to be implemented using other intrinsics

* Fixing the `NI_Base_Vector256_As` intrinsics to only fold the cast if AVX is supported and add a clarifying comment to the Vector128/256.Equals code

* Changing the various `*Software()` local functions in Vector128/256 to be `SoftwareFallback()`

5 years agoAdd support for loading registered TLBs (#21430)
Aaron Robinson [Fri, 7 Dec 2018 22:31:24 +0000 (14:31 -0800)]
Add support for loading registered TLBs (#21430)

* Add support for loading registered TLBs

5 years agoBuild Microsoft.NET.Sdk.IL in source-build
Davis Goodin [Thu, 6 Dec 2018 23:16:49 +0000 (17:16 -0600)]
Build Microsoft.NET.Sdk.IL in source-build

5 years agoAdding a note to the genBaseIntrinsic function header about operand assumptions ...
Tanner Gooding [Fri, 7 Dec 2018 21:00:35 +0000 (13:00 -0800)]
Adding a note to the genBaseIntrinsic function header about operand assumptions (#21439)

5 years agoFix some SOS commands after SharedDomain removal (#21401)
Jan Vorlicek [Fri, 7 Dec 2018 19:13:43 +0000 (20:13 +0100)]
Fix some SOS commands after SharedDomain removal (#21401)

The recent removal of SharedDomain has broken some SOS commands, like
Name2EE or bpmd. There was a code that was enumerating domains and
obtaining some information on them. And the shared domain pointer from
DacpAppDomainStoreData was being included in the list of domains. As it
is NULL now, we have failed to get the information and the domain
iteration loop was exited prematurely.
I have made SOS resilient to the possibility of missing shared domain.
On older runtimes, the shared domain is still being reported.

5 years agoAdd CancellationToken parameter to GetAsyncEnumerator (#21397)
Stephen Toub [Fri, 7 Dec 2018 18:56:32 +0000 (13:56 -0500)]
Add CancellationToken parameter to GetAsyncEnumerator (#21397)

5 years agoFactor new AsyncIteratorStateMachineAttribute into TryResolveStateMachineMethod ...
Stephen Toub [Fri, 7 Dec 2018 18:55:53 +0000 (13:55 -0500)]
Factor new AsyncIteratorStateMachineAttribute into TryResolveStateMachineMethod (#21396)

5 years agoMerge pull request #21361 from fiigii/x64tests
Carol Eidt [Fri, 7 Dec 2018 18:11:30 +0000 (10:11 -0800)]
Merge pull request #21361 from fiigii/x64tests

Improve hardware intrinsic tests

5 years agoAdd PNSE implementations of unsupported built-in custom marshalers to enable good...
Jeremy Koritzinsky [Fri, 7 Dec 2018 17:55:37 +0000 (09:55 -0800)]
Add PNSE implementations of unsupported built-in custom marshalers to enable good error messages on PIAs that could possibly directly use them. (#21429)

5 years agoDisable ObjectStackAllocationTests for ARM32 (#21421)
Bruce Forstall [Fri, 7 Dec 2018 16:10:00 +0000 (08:10 -0800)]
Disable ObjectStackAllocationTests for ARM32 (#21421)

Issue #21376

5 years agoFix Microsoft.IO.Redist compilation string.Create compilation failure
Stephen Toub [Fri, 7 Dec 2018 09:56:40 +0000 (04:56 -0500)]
Fix Microsoft.IO.Redist compilation string.Create compilation failure

Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
5 years agoUpdate dependency files (#21403)
dotnet-maestro[bot] [Fri, 7 Dec 2018 14:48:12 +0000 (14:48 +0000)]
Update dependency files (#21403)

* Update dependencies from https://github.com/dotnet/arcade build 626

This change updates the following dependencies
- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.18605.14
- Microsoft.DotNet.Helix.Sdk - 1.0.0-beta.18605.14

* Update dependencies from https://github.com/dotnet/arcade build 650

This change updates the following dependencies
- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.18606.9
- Microsoft.DotNet.Helix.Sdk - 1.0.0-beta.18606.9

5 years agoMerge pull request #21431 from fiigii/fixbmi
Carol Eidt [Fri, 7 Dec 2018 14:20:49 +0000 (06:20 -0800)]
Merge pull request #21431 from fiigii/fixbmi

Fix a bug that disabled Bmi1/2.X64

5 years agoWork around an MCG bug (dotnet/corert#6658)
Michal Strehovský [Fri, 7 Dec 2018 10:46:27 +0000 (11:46 +0100)]
Work around an MCG bug (dotnet/corert#6658)

This is blocking TFS integrations.

Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
5 years agoFix SOS thread statics display (#21426)
Jan Vorlicek [Fri, 7 Dec 2018 09:32:59 +0000 (10:32 +0100)]
Fix SOS thread statics display (#21426)

I've noticed that when dumping an object with thread locals using SOS
dumpobj command, I never get the thread locals. I've stepped through the
code in SOS that displays thread statics and found that for some strange
reason, it dismisses threads where DomainLocalModule doesn't have
"initialized" flag set for the given class. However, when runtime
accesses thread statics, it just checks "allocated" flag set for the
given class in the ThreadLocalModule. Removing the extra check for
DomainLocalModule fixed the problem and now thread statics are displayed
properly.

5 years agoDisable obsolete collectible corefx tests (#21428)
Jan Vorlicek [Fri, 7 Dec 2018 09:20:48 +0000 (10:20 +0100)]
Disable obsolete collectible corefx tests (#21428)

Now that the COM interop support for collectible classes is in, we need
to disable couple of corefx tests that were checking that it fails.

5 years agoJIT: block general cloning of candidate calls (#21418)
Andy Ayers [Fri, 7 Dec 2018 08:12:04 +0000 (00:12 -0800)]
JIT: block general cloning of candidate calls (#21418)

Follow-up from #21270 and #21414.

Block general cloning from inadvertently cloning a candidate call.

Add a separate path for cloning calls that are inline and guarded
devirtualization candidates for use by guarded devirtualization.
Callers need to take extra steps after cloning one of these calls
to properly fix everything up.

Also fix up some issues in the large comment for the fat calli
transformation.

5 years agoFix a bug that disabled Bmi1/2.X64
Fei Peng [Fri, 7 Dec 2018 01:42:17 +0000 (17:42 -0800)]
Fix a bug that disabled Bmi1/2.X64

5 years agoMoving CreateScalarUnsafe, ToScalar, Vector128.ToVector256Unsafe, and Vector256.GetLo...
Tanner Gooding [Fri, 7 Dec 2018 01:15:03 +0000 (17:15 -0800)]
Moving CreateScalarUnsafe, ToScalar, Vector128.ToVector256Unsafe, and Vector256.GetLower to be intrinsics (#21351)

* Moving CreateScalarUnsafe, ToScalar, Vector128.ToVector256Unsafe, and Vector256.GetLower to be intrinsics

* Adding containment support to the helper intrinsics

5 years agoMerge pull request #21314 from CarolEidt/DontPromoteHwVector
Carol Eidt [Thu, 6 Dec 2018 21:50:19 +0000 (13:50 -0800)]
Merge pull request #21314 from CarolEidt/DontPromoteHwVector

Don't struct-promote opaque vectors

5 years agoRevert "Move the perf jobs to Windows.10.Amd64.ClientRS4.DevEx.15.8.Open (#21258...
Michelle McDaniel [Thu, 6 Dec 2018 21:18:28 +0000 (13:18 -0800)]
Revert "Move the perf jobs to Windows.10.Amd64.ClientRS4.DevEx.15.8.Open (#21258)" (#21412)

This reverts commit 5bb1b41dd19bca8f25b6d048c27d6708b86326cb.

5 years agoUse Span instead of manual copy in MetadataImport.GetUserString (#21405)
Stephen Toub [Thu, 6 Dec 2018 21:11:49 +0000 (16:11 -0500)]
Use Span instead of manual copy in MetadataImport.GetUserString (#21405)

* Use Span instead of manual copy in MetadataImport.GetUserString

* Address PR feedback

5 years agoRemove char[] allocation from EventPipePayloadDecoder for strings (#21407)
Stephen Toub [Thu, 6 Dec 2018 21:11:33 +0000 (16:11 -0500)]
Remove char[] allocation from EventPipePayloadDecoder for strings (#21407)

5 years agoUse string.Create in Path.GetRandomFilePath (#21410)
Stephen Toub [Thu, 6 Dec 2018 21:11:09 +0000 (16:11 -0500)]
Use string.Create in Path.GetRandomFilePath (#21410)

* Use string.Create in Path.GetRandomFilePath

Removes a good chunk of the unsafe code.

* Address PR feedback

5 years agoJIT: move indirect call transformations to a new source file (#21414)
Andy Ayers [Thu, 6 Dec 2018 20:58:48 +0000 (12:58 -0800)]
JIT: move indirect call transformations to a new source file (#21414)

Follow-up from a review comment in #21270.

5 years agoReplace a few new string(char, 1) with char.ToString(char) (#21406)
Stephen Toub [Thu, 6 Dec 2018 19:27:42 +0000 (14:27 -0500)]
Replace a few new string(char, 1) with char.ToString(char) (#21406)

Slightly cleaner, slightly faster.

5 years agoWork around apparent bug in CMD's FOR /L
Russ Keldorph [Wed, 5 Dec 2018 23:58:32 +0000 (15:58 -0800)]
Work around apparent bug in CMD's FOR /L

Hopefully this will mean that official build failures during the actual build
phase will correctly be reported as failures.  There could be other places that
need to change, but this is all we know of right now.

Fixes #18788 (at least part of it)

5 years agoFix CancellationTokenRegistration.Token after CTS.Dispose (#21394)
Stephen Toub [Thu, 6 Dec 2018 18:41:54 +0000 (13:41 -0500)]
Fix CancellationTokenRegistration.Token after CTS.Dispose (#21394)

CTR.Token should never throw, but it's currently throwing an ObjectDisposedException if the associated CancellationTokenSource has been disposed.

5 years agoRun MSBuild in parallel when submitting jobs to Helix (#21390)
Egor Chesakov [Thu, 6 Dec 2018 18:22:50 +0000 (10:22 -0800)]
Run MSBuild in parallel when submitting jobs to Helix (#21390)

5 years agoPort CustomMarshalers.dll to C# and .NET Core (#21343)
Jeremy Koritzinsky [Thu, 6 Dec 2018 17:56:21 +0000 (09:56 -0800)]
Port CustomMarshalers.dll to C# and .NET Core (#21343)

* Import CustomMarshalers from corefx PR.

* Add tests for marshalling IEnumerator and IEnumerable using the System.Runtime.InteropServices.CustomMarshalers.

* Verify that the marshaller is used in the managed -> native direction in the tests.

* Remove #if's

* PR Feedback.

* Move ComHelpers.h into interop common headers.

* Add some template machinery to ensure that we don't accidentally pass in an incorrect type into DoQueryInterface.

* Add VariantClear

* Make marshalers internal and root them in ILLinkTrim.xml

* Revert enable-if machinery.

* Add tests for the pass-through unwrapping done by the EnumeratorToEnumVariantMarshaler.

* Remove some of my helper code.

* Added todo about exposing EnumerableToDispatchMarshaler.

* PR Feedback.

* Removed the last placement new.

* Use the runtime hooks to enable us to not have to publically expose the custom marshalers.

* Remove out of date comments.

5 years agoGuarded devirtualization foundations (#21270)
Andy Ayers [Thu, 6 Dec 2018 17:03:31 +0000 (09:03 -0800)]
Guarded devirtualization foundations (#21270)

Lay the groundwork for guarded devirtualization of virtual and interface
calls in the jit.

Introduce the notion of a guarded devirtualization candidate and identify
these if regular devirtualization fails. Use simple heuristics to produce
a class to guess for. Require that the method that would be invoked if the class
guess is correct be a plausible inline candidate.

Generalize the calli transformer to become an indirect call transformer.
This runs after importation because it needs to introduce control flow and
runs before inlining so that the new direct calls it introduces can be inlined.

Implement the transformation to duplicate the call site, devirtualize on the side
where the class is now known exactly, and turn the resulting direct call into an
inline candidate.

Add a motivation and design document.

5 years agoUse array syntax in eng/test-job.yml (#21393)
Egor Chesakov [Thu, 6 Dec 2018 03:41:47 +0000 (19:41 -0800)]
Use array syntax in eng/test-job.yml (#21393)

Update eng/test-job.yml to use array syntax after changing from phase schema to job schema

5 years agoAdded NullChk exceptions for GT_ARR_LENTH, GT_ARR_ELEM and GT_ARR_OFFSET
Brian Sullivan [Thu, 6 Dec 2018 01:46:49 +0000 (17:46 -0800)]
Added NullChk exceptions for GT_ARR_LENTH, GT_ARR_ELEM and GT_ARR_OFFSET

5 years agoDelete FEATURE_TREAT_NI_AS_MSIL_DURING_DIAGNOSTICS (#21387)
Jan Kotas [Thu, 6 Dec 2018 01:39:33 +0000 (17:39 -0800)]
Delete FEATURE_TREAT_NI_AS_MSIL_DURING_DIAGNOSTICS (#21387)

Always defined in .NET Core

5 years agoDisable native image usage for collectible assemblies (#21378)
Jan Vorlicek [Thu, 6 Dec 2018 00:21:43 +0000 (01:21 +0100)]
Disable native image usage for collectible assemblies (#21378)

* Disable native image usage for collectible assemblies

There are couple of issues with using native images as collectible
assemblies. The most important one is that statics handling is different
for collectible and non-collectible classes. Collectible classes have
statics stored in per class allocated blocks while the non-collectible ones
are all stored per module. So the code that accesses them needs to use
different offsets relative to a statics base address in each of these cases.
The crossgen generates just a single form of code that corresponds to the
non-collectible case and so such code cannot be used when a module is
loaded as collectible.
To mitigate that, we disable using the native code from crossgen-ed
assemblies and JIT all the code instead.
We may want to revisit this in the future and e.g. unify the statics
handling for collectible and non-collectible classes.

5 years agoMerge branch 'master' into issue_19925
Brian Sullivan [Wed, 5 Dec 2018 23:33:52 +0000 (15:33 -0800)]
Merge branch 'master' into issue_19925

5 years agoUse fgValueNumberAddExceptionSetForIndirection to calculate the base address for...
Brian Sullivan [Wed, 5 Dec 2018 23:32:22 +0000 (15:32 -0800)]
Use fgValueNumberAddExceptionSetForIndirection to calculate the base address for the VNF_NullPtrExc

5 years agoRefactor genAllocLclFrame into two architecture-specific functions (#21074)
Egor Chesakov [Wed, 5 Dec 2018 23:29:48 +0000 (15:29 -0800)]
Refactor genAllocLclFrame into two architecture-specific functions (#21074)

5 years agoMove the perf jobs to Windows.10.Amd64.ClientRS4.DevEx.15.8.Open (#21258)
Michelle McDaniel [Wed, 5 Dec 2018 23:02:57 +0000 (15:02 -0800)]
Move the perf jobs to Windows.10.Amd64.ClientRS4.DevEx.15.8.Open (#21258)

5 years agoMerge pull request #21322 from mikedn/div-small-int
Brian Sullivan [Wed, 5 Dec 2018 22:26:55 +0000 (14:26 -0800)]
Merge pull request #21322 from mikedn/div-small-int

Fix lclvar "cloning" in const division lowering

5 years agoChange from phases to jobs (#21384)
Jarret Shook [Wed, 5 Dec 2018 22:00:32 +0000 (14:00 -0800)]
Change from phases to jobs (#21384)

* Initial change to use jobs/jobs.yml

* Fix If syntax

* Hopefully fix more syntax

* Change from jobs to job

* change from queue to pool

* change scope of container name

* Change build to sync and init tools inside build.sh

* Add workspace

5 years agoSuppress a CMake Warning (#21147)
Swaroop Sridhar [Wed, 5 Dec 2018 20:55:39 +0000 (12:55 -0800)]
Suppress a CMake Warning (#21147)

* Suppress a CMake Warning

This change adds a local cmake_policy rule to suppress
warnings about libraries with unicode names.

```
CMake Warning (dev) at tests/src/Interop/PInvoke/DllImportPath/CMakeLists.txt:14 (add_library):
  Policy CMP0037 is not set: Target names should not be reserved and should
  match a validity pattern.  Run "cmake --help-policy CMP0037" for policy
  details.  Use the cmake_policy command to set the policy and suppress this
  warning.

  The target name "DllImportPath_U�n�i�c�o�d�e" is reserved or
  not valid for certain CMake features, such as generator expressions, and
  may result in undefined behavior.
This warning is for project developers.  Use -Wno-dev to suppress it.
```

* Update tests/src/Interop/PInvoke/DllImportPath/CMakeLists.txt

Co-Authored-By: swaroop-sridhar <Swaroop.Sridhar@microsoft.com>
5 years agoPreserve the exception sets from child nodes when we create a new unique value number
Brian Sullivan [Wed, 5 Dec 2018 20:05:40 +0000 (12:05 -0800)]
Preserve the exception sets from child nodes when we create a new unique value number

5 years agoAdd tests for marshalling RuntimeHandle types. (#21091)
Jeremy Koritzinsky [Wed, 5 Dec 2018 18:04:52 +0000 (10:04 -0800)]
Add tests for marshalling RuntimeHandle types. (#21091)

* Add tests for marshalling runtime handles.

* Remove DLL signature for impossible test

5 years agoRemove FromGAC & OnTPAList (#21371)
Steve MacLean [Wed, 5 Dec 2018 18:03:56 +0000 (13:03 -0500)]
Remove FromGAC & OnTPAList (#21371)

* Remove FromGAC & OnTPAList
* PR feedback

5 years agoRevert Array enumerator behavior change (#21368)
Jan Kotas [Wed, 5 Dec 2018 16:01:02 +0000 (08:01 -0800)]
Revert Array enumerator behavior change (#21368)

Fixes #21046

5 years agoUpdate dependency files (#21352)
dotnet-maestro[bot] [Wed, 5 Dec 2018 15:13:32 +0000 (15:13 +0000)]
Update dependency files (#21352)

* Update dependencies from https://github.com/dotnet/arcade build 551

This change updates the following dependencies
- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.18603.7
- Microsoft.DotNet.Helix.Sdk - 1.0.0-beta.18603.7

* Update dependencies from https://github.com/dotnet/arcade build 598

This change updates the following dependencies
- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.18604.15
- Microsoft.DotNet.Helix.Sdk - 1.0.0-beta.18604.15

5 years agoConvert SDK projects into non-SDK projects (#21369)
Aaron Robinson [Wed, 5 Dec 2018 04:13:48 +0000 (20:13 -0800)]
Convert SDK projects into non-SDK projects (#21369)

5 years agoAdd repro for `(reg2 == REG_NEXT(reg1)) || (reg2 == REG_LR)` assert in `codegenarm64...
Sergey Andreenko [Wed, 5 Dec 2018 03:58:32 +0000 (19:58 -0800)]
Add repro for `(reg2 == REG_NEXT(reg1)) || (reg2 == REG_LR)` assert in `codegenarm64`. (#21344)

* Add a repro.

* Exclude the failing test.

* fix formatting

5 years agoFix XML comments on *nux (#21372)
Steve MacLean [Wed, 5 Dec 2018 02:57:17 +0000 (21:57 -0500)]
Fix XML comments on *nux (#21372)

5 years agoAdditional tests for type equivalence (#21340)
Aaron Robinson [Wed, 5 Dec 2018 01:59:28 +0000 (17:59 -0800)]
Additional tests for type equivalence (#21340)

* Additional tests for type equivalence

5 years agoMerge pull request #21313 from stephentoub/asynciteratorattr
Stephen Toub [Wed, 5 Dec 2018 00:14:33 +0000 (19:14 -0500)]
Merge pull request #21313 from stephentoub/asynciteratorattr

Add AsyncIteratorStateMachineAttribute

5 years agoImprove BMI2 MultiplyNoFlags APIs (#21362)
Fei Peng [Wed, 5 Dec 2018 00:06:39 +0000 (16:06 -0800)]
Improve BMI2 MultiplyNoFlags APIs (#21362)

5 years agoUpdate the symbol uploader/publisher to version 1.0.0-beta-63604-05. (#21360)
Mike McLaughlin [Tue, 4 Dec 2018 20:51:50 +0000 (12:51 -0800)]
Update the symbol uploader/publisher to version 1.0.0-beta-63604-05. (#21360)

5 years agoMove more SSE2 intrinsic tests to template
Fei Peng [Tue, 4 Dec 2018 20:09:53 +0000 (12:09 -0800)]
Move more SSE2 intrinsic tests to template

5 years agoRemove redundant checks in test templates
Fei Peng [Tue, 4 Dec 2018 19:41:02 +0000 (11:41 -0800)]
Remove redundant checks in test templates

5 years agoMerge pull request #21356 from stephentoub/xmlcomments
Stephen Toub [Tue, 4 Dec 2018 18:55:52 +0000 (13:55 -0500)]
Merge pull request #21356 from stephentoub/xmlcomments

Fix lots of malformed XML comments

5 years agoUpdate CoreClr, CoreFx, CoreSetup to preview-27204-02, preview.18604.2, preview-27204...
dotnet-maestro-bot [Tue, 4 Dec 2018 17:52:55 +0000 (09:52 -0800)]
Update CoreClr, CoreFx, CoreSetup to preview-27204-02, preview.18604.2, preview-27204-02, respectively (#21353)

5 years agoDelete dead code in Task<T>
Stephen Toub [Tue, 4 Dec 2018 16:30:19 +0000 (11:30 -0500)]
Delete dead code in Task<T>

5 years agoEnable building/validating XML comments in CoreLib
Stephen Toub [Tue, 4 Dec 2018 16:28:52 +0000 (11:28 -0500)]
Enable building/validating XML comments in CoreLib

5 years agoFix lots of malformed XML comments
Stephen Toub [Tue, 4 Dec 2018 15:47:21 +0000 (10:47 -0500)]
Fix lots of malformed XML comments

These are causing errors in the source.dot.net build.  Turning on DocumentationFile and suppressing 1591, 1573, and 0419, Corelib builds clean after these changes.

5 years agoUpdate CoreClr, CoreFx, CoreSetup to preview-27204-01, preview.18604.1, preview-27203...
dotnet-maestro-bot [Tue, 4 Dec 2018 13:52:04 +0000 (05:52 -0800)]
Update CoreClr, CoreFx, CoreSetup to preview-27204-01, preview.18604.1, preview-27203-03, respectively (#21346)

5 years agoFixing the Vector64/128/256<T>.ToString(string) methods to pass `null` for the format...
Tanner Gooding [Tue, 4 Dec 2018 13:51:50 +0000 (05:51 -0800)]
Fixing the Vector64/128/256<T>.ToString(string) methods to pass `null` for the formatProvider (#21350)

5 years agoRemove *LoadContextHostBinder (#21342)
Steve MacLean [Tue, 4 Dec 2018 07:27:31 +0000 (02:27 -0500)]
Remove *LoadContextHostBinder (#21342)

5 years agoSort System.Private.CoreLib.csproj
Jan Kotas [Mon, 3 Dec 2018 20:57:56 +0000 (12:57 -0800)]
Sort System.Private.CoreLib.csproj