platform/upstream/dotnet/runtime.git
4 years agoFix doc comment (#37061)
Brian Friesen [Mon, 1 Jun 2020 16:08:50 +0000 (12:08 -0400)]
Fix doc comment (#37061)

Looks like a copy/paste error.

4 years agoDisable additional validation that is run post-build (#37102)
Matt Mitchell [Mon, 1 Jun 2020 15:21:04 +0000 (08:21 -0700)]
Disable additional validation that is run post-build (#37102)

* Disable additional validation that is run post-build
Disable more validation stages that are run post-build. The only
thing left to run during each build at this point is SourceLink validation.
Once that is available, the entire validation stage should be able to be skipped

4 years agoRev cmake minimum version from 3.14.2 to 3.14.5 (#34757)
Adeel Mujahid [Mon, 1 Jun 2020 15:05:33 +0000 (18:05 +0300)]
Rev cmake minimum version from 3.14.2 to 3.14.5 (#34757)

iOS requires 3.14.5 version and we have a special case for it. Since this is a minor version difference, and no distro is particularly providing cmake 3.14.2 package, it is safe to update to 3.14.5 to cover our supported platform matrix.

Discussion: https://github.com/dotnet/runtime/pull/33959#discussion_r396389297
Fixes: https://github.com/dotnet/runtime/issues/33976

Co-authored-by: Alexander Köplinger <alex.koeplinger@outlook.com>
4 years agoMake URI Unc path recognition more consistent across platforms (#35050)
Miha Zupan [Mon, 1 Jun 2020 09:38:52 +0000 (11:38 +0200)]
Make URI Unc path recognition more consistent across platforms (#35050)

* Recognize '//' Uris as UNC on Unix

* Add test for Unc equality

* Add test for short Unc paths

* Add test for UNC implicit-explicit roundtrip

* Merge two if statements into one

4 years ago[browser][wasm][http] Fix System.Net.Http build failure (#37234)
Kenneth Pouncey [Mon, 1 Jun 2020 09:07:57 +0000 (11:07 +0200)]
[browser][wasm][http] Fix System.Net.Http build failure (#37234)

4 years ago[interp] Remove saving of clause_args from interp state (#37048)
monojenkins [Mon, 1 Jun 2020 07:59:04 +0000 (03:59 -0400)]
[interp] Remove saving of clause_args from interp state (#37048)

clause_args can be set only from EH. This means that clause_args can be set only in the first executed frame, so there is no need to save it in the interp state. Also make sure we never check for it in the main_loop block, for normal calls and returns. Added exec_frame to the clause_args so we can detect whether a frame is the first frame invoked from EH. We can no longer use clause_args for this purpose because we no longer save it in the interp state.

Makes calls 6% faster

Co-authored-by: BrzVlad <BrzVlad@users.noreply.github.com>
4 years ago[wasm] Initial addition of Browser WebAssembly support (#35573)
Kenneth Pouncey [Mon, 1 Jun 2020 05:37:19 +0000 (07:37 +0200)]
[wasm] Initial addition of Browser WebAssembly support (#35573)

* Add Browser specific files to the project

* Browser specific file modification to not include Quic support

* Add Browser specific support files for Http Handler code

* Add Interop code for JavaScript support

* Remove unused reference

* Add Http handler bindings implementation

- This still needs to have the code implement nullable

* Nullable support

* Add browser files back after upstream merge conflict

* Use attribute Link syntax for Common files to bring in sync with existing format

* Address Missing license header

* Code formatting and removal of comment code.

* Address PR comments.

* Address commit comments

* Add blank line between License and first line of code.  Address comments

* Replace SocketsHttpHandler build for Browser.

- Throws `PlatformNotSupportedException` for properties and methods of the HttpMessageHandler abstract implementation.

* Cleanup SendAsync code when doing the call out to JavaScript Fetch.

- Addresses commit comments.

* Refactor BrowserHttpHandler code.

* Cleanup

* Remove null check as it should be checked in outer classes

* Cleanup var usage to use explicit type.  Address commit comments

- For all of these vars, please replace them with the actual type, except when the type is obvious from a new or explicit cast on the right-hand side.

* Move `.ConfigureAwait(true)` to `.ConfigureAwait(false)`

- Address review comments

* Change accessor of Runtime javascript interop methods.

* Change accessor of Runtime javascript interop methods.

* Address review comments for unused code

* Cleanup leftover debug WriteLines

* Remove the AllowNull attributes as per review comments.

* Update src/libraries/Common/src/Interop/Browser/Interop.Runtime.cs

Co-Authored-By: Marek Safar <marek.safar@gmail.com>
* throw different exception type as per review comment

* use char[] array instead and return new string(array).

- Address review comments

* Initial addition of Browser Interop library

* use char[] array instead and return new string(array).

- Address review comments

* Add project references so the Interop.JavaScript project builds

* Coding Style update

* Split the runtime methods into two modules.

- .Api contains the methods that are only used internally from JavaScript bindings code.

* Move System.Runtime.Interop.JavaScript to \src\libraries

- Address review comments

* Change preprocessor to upper case TARGETS_BROWSER

- Address review comments

* Update src/libraries/Common/src/Interop/Browser/Interop.Runtime.Api.cs

Co-authored-by: Marek Safar <marek.safar@gmail.com>
* Update src/libraries/Common/src/Interop/Browser/Interop.Runtime.Api.cs

Co-authored-by: Marek Safar <marek.safar@gmail.com>
* Update src/libraries/Common/src/Interop/Browser/Interop.Runtime.Api.cs

Co-authored-by: Marek Safar <marek.safar@gmail.com>
* Rename from .Api to .Bridge to address review comments

* Modify .csproj files to reflect .Bridge.cs change.

* Remove unnecessary constant

* Add docs

* Update Bridge link

* Collapse code as per review comment.

* Address review comments on `Task.ConfigureAwait(continueOnCapturedContext: true)`.

- Added comment in source code.

* Address review comment about using PropertyInfo reflection.

- GetMethod("get_Result") is less expensive to use.

* Coding Style - Address review comments

* Part of code style and object documentation to partially address review comments.

* Update src/libraries/Common/src/Interop/Browser/Interop.JavaScript.JSObject.cs

Co-authored-by: Stephen Toub <stoub@microsoft.com>
* Update src/libraries/Common/src/Interop/Browser/Interop.Runtime.Bridge.cs

Co-authored-by: Stephen Toub <stoub@microsoft.com>
* Update src/libraries/System.Net.Http/src/System/Net/Http/BrowserHttpHandler/BrowserHttpHandler.cs

Co-authored-by: Stephen Toub <stoub@microsoft.com>
* Update src/libraries/System.Net.Http/src/System/Net/Http/BrowserHttpHandler/BrowserHttpHandler.cs

Co-authored-by: Stephen Toub <stoub@microsoft.com>
* Update src/libraries/System.Net.Http/src/System/Net/Http/BrowserHttpHandler/BrowserHttpHandler.cs

Co-authored-by: Stephen Toub <stoub@microsoft.com>
* Update src/libraries/System.Net.Http/src/System/Net/Http/BrowserHttpHandler/BrowserHttpHandler.cs

Co-authored-by: Stephen Toub <stoub@microsoft.com>
* Update src/libraries/System.Net.Http/src/System/Net/Http/BrowserHttpHandler/BrowserHttpHandler.cs

Co-authored-by: Stephen Toub <stoub@microsoft.com>
* Add class docs and code style updates

- Address review comments

* Update src/libraries/System.Net.Http/src/System/Net/Http/BrowserHttpHandler/BrowserHttpHandler.cs

Co-authored-by: Stephen Toub <stoub@microsoft.com>
* Fix badly formed XML

* Update src/libraries/System.Net.Http/src/System/Net/Http/BrowserHttpHandler/BrowserHttpHandler.cs

Co-authored-by: Stephen Toub <stoub@microsoft.com>
* Remove unnecessary Property implementations.

* Update src/libraries/System.Net.Http/src/System/Net/Http/BrowserHttpHandler/BrowserHttpHandler.cs

Co-authored-by: Stephen Toub <stoub@microsoft.com>
* Update code style involving the use of `var`

* Modify the underlying sockets field name.

- address review comments.

* Style and address review comments

* Remove reliance on ConnectHelper.cs code as it is not supported on Browser

- This removes the reliance on the QUIC support.

* Update src/libraries/Common/src/Interop/Browser/Interop.Runtime.Bridge.cs

Co-authored-by: Stephen Toub <stoub@microsoft.com>
* Remove null check for httpresponse.Content as it is always assigned to.

- Address review comments

* Address review comments

* Remove methods that will not be implemented right now,

* Add properties back to fix build error

- error : MembersMustExist : Member 'public System.Boolean System.Net.Http.SocketsHttpHandler.XXXXXXXXXXXX.get()' does not exist in the implementation but it does exist in the contract.

* Remove tcs TaskCompletionSource to address review comments

* code style change

* Remove disposing of _abortCts here as it causes runtime errors as being disposed of too early

* Address review comment for GetType()

* Rename library as per discussions

* Add lock around the _boundObjects and _rawToJS access.

- Address concurrency review comments

* Address review comments for disposing of CancellationTokenSource

* Address new HttpContent overloads in .NET 5 that take CancellationToken

* Add project and test structure for JavaScript InteropServices

* Remove previous modification as it is no longer needed.

* Update src/libraries/System.Net.Http/src/System/Net/Http/BrowserHttpHandler/BrowserHttpHandler.cs

Co-authored-by: Stephen Toub <stoub@microsoft.com>
* Remove custom message passed to the PNSE .ctor

* Update `mono` to dotnet or .NET

* Address review comment for internal sealed class

* Address extra message text

* Move these source modules to System.Runtime.InteropServices.JavaScript

* Add interop source modules to System.Runtime.InteropServices.JavaScript project

* Remove placeholder source

* Reference System.Runtime.InteropServices.JavaScript project

* Address review comments Unsafe.SizeOf

* Finish move of sources to InteropServices.JavaScript

* Remove ActiveIssue to address review comments

* Add core implementations

* Add core object implementation for Map

* Remove unused targetframework

* Fix PNSE in HttpClientHandler .ctor

- When creating an instance of the browser webassembly `System.Net.Http.BrowserHttpHandler` the following error is thrown.

```
System.PlatformNotSupportedException: Operation is not supported on this platform.
    at System.Net.Http.BrowserHttpHandler.get_SslOptions()
    at System.Net.Http.HttpClientHandler.ThrowForModifiedManagedSslOptionsIfStarted()
    at System.Net.Http.HttpClientHandler.set_ClientCertificateOptions(ClientCertificateOption value)
    at System.Net.Http.HttpClientHandler..ctor()
    at System.Net.Http.HttpClient..ctor()

```

* Remove extra parameters to `PlatformNotSupportedException`

* Fix tests due to underlying field name changing and reflection being used to obtain the socket field

Co-authored-by: Marek Safar <marek.safar@gmail.com>
Co-authored-by: Stephen Toub <stoub@microsoft.com>
4 years agoRevert "Enable test for MemoryBarrierProcessWide on arm64. Update comments." (#35974)
Vladimir Sadov [Mon, 1 Jun 2020 03:57:00 +0000 (20:57 -0700)]
Revert "Enable test for MemoryBarrierProcessWide on arm64. Update comments." (#35974)

* Revert "Enable test for MemoryBarrierProcessWide on arm64. Update comments. (#35817)"

This reverts commit b6341c6e1ada32117639cc409d445fd6b9b9e9f0.

* Update InterlockedTests.cs

rerun CI

4 years agoRewrite HashSet<T>'s implementation based on Dictionary<T>'s (#37180)
Stephen Toub [Sun, 31 May 2020 22:47:49 +0000 (18:47 -0400)]
Rewrite HashSet<T>'s implementation based on Dictionary<T>'s (#37180)

* Move HashSet to Corelib

* Small style cleanups in Dictionary

And factor out InsertionBehavior into its own file

* Rewrite HashSet based on Dictionary's implementation

This effectively deletes HashSet's data structure and replaces it with the one used by Dictionary, then updated for the differences (e.g. just a value rather than a key and a value).  HashSet used to have the same implementation, but Dictionary has evolved significantly and HashSet hasn't; this brings them to basic parity on implementation.

Based on perf tests, I veered away from Dictionary's implementation in a few places (e.g. a goto-based implementation in the core find method led to a significant regression for Int32-based Contains operations), and we should follow-up to understand whether Dictionary should be changed as well, or why there's a difference between the two.

Functionally, bringing over Dictionary's implementation yields a few notable changes, namely that Remove and Clear no longer invalidate enumerations.  The tests have been updated accordingly.

* Make a corresponding cleanup change to Dictionary

* Use HashSet in Corelib

* Address PR feedback

* Clean up HashSetEqualityComparer

* Port Dictionary's comparer serialization test to HashSet

* Address PR feedback

4 years agoFix ActivitySource to log the right amount of stopped (#37211)
Chandramouleswaran [Sun, 31 May 2020 22:06:11 +0000 (15:06 -0700)]
Fix ActivitySource to log the right amount of stopped (#37211)

* Fix ActivitySource to log the right amount of stopped

* Fix test and typo

Co-authored-by: Chandramouleswaran Ravichandran <chandramouleswaranravichandran@Chandramouleswarans-MacBook-Pro.local>
4 years agoAdd Or int? (#37225)
Steven Yeh [Sun, 31 May 2020 21:17:52 +0000 (16:17 -0500)]
Add Or int? (#37225)

4 years agoUpdate Directory.Build.props (#37218)
Viktor Hofer [Sun, 31 May 2020 20:42:01 +0000 (22:42 +0200)]
Update Directory.Build.props (#37218)

Remove workaround for https://github.com/microsoft/msbuild/issues/4474.

4 years ago[wasm] Include the pinvoke table into a separate file, so the generated declarations...
Zoltan Varga [Sun, 31 May 2020 20:26:12 +0000 (16:26 -0400)]
[wasm] Include the pinvoke table into a separate file, so the generated declarations don't conflict with the ones in the header files included by driver.c. (#37202)

* [wasm] Include the pinvoke table into a separate file, so the generated declarations don't conflict with the ones in the header files included by driver.c.

Same as https://github.com/mono/mono/pull/19853.

* Update src/mono/wasm/runtime/pinvoke.c

Co-authored-by: Alexander Köplinger <alex.koeplinger@outlook.com>
Co-authored-by: Alexander Köplinger <alex.koeplinger@outlook.com>
4 years agoUse the wasm version of System.Console on wasm. (#37221)
Zoltan Varga [Sun, 31 May 2020 19:54:23 +0000 (15:54 -0400)]
Use the wasm version of System.Console on wasm. (#37221)

4 years agoReduce Uri ctor overhead (#36915)
Miha Zupan [Sun, 31 May 2020 19:15:45 +0000 (21:15 +0200)]
Reduce Uri ctor overhead (#36915)

* Optimize UriHelper.EscapedAscii

* Contains > IndexOf

* Join CheckForUnicode and CheckForEscapedUnreserved into 1 function

* Rename EscapedAscii to DecodeHexChars

4 years agoFix bad documentation links (#37222)
Bruce Forstall [Sun, 31 May 2020 17:49:58 +0000 (10:49 -0700)]
Fix bad documentation links (#37222)

Also, don't make documentation specific to CoreCLR.

4 years agoUpdate coverlet version to fix coverage exceptions (#37217)
Viktor Hofer [Sun, 31 May 2020 17:44:26 +0000 (19:44 +0200)]
Update coverlet version to fix coverage exceptions (#37217)

* Update coverlet version to fix coverage FNFEs

Changelog: https://github.com/coverlet-coverage/coverlet/blob/master/Documentation/Changelog.md#release-date-2020-05-30

-Fix 'The process cannot access the file...because it is being used by another process' due to double flush for collectors driver #https://github.com/coverlet-coverage/coverlet/pull/835

* Update dotnet-tools.json

4 years agoReduce duplication in Linux build instructions (#37175)
Bruce Forstall [Sun, 31 May 2020 17:30:19 +0000 (10:30 -0700)]
Reduce duplication in Linux build instructions (#37175)

All the Docker information was duplicated in two places; remove
that duplication.

4 years agoAdd SslStream test for zero-byte reads (#37128)
Stephen Toub [Sun, 31 May 2020 14:19:39 +0000 (10:19 -0400)]
Add SslStream test for zero-byte reads (#37128)

* Add SslStream test for zero-byte reads

We have higher-level tests for libraries like WebSockets that validate the behavior of zero-byte reads, but we don't currently have one in System.Net.Security's tests.  Adding one.

* Address PR feedback

4 years agoDefine TargetsUnix for wasm. (#37207)
Zoltan Varga [Sun, 31 May 2020 13:49:00 +0000 (09:49 -0400)]
Define TargetsUnix for wasm. (#37207)

4 years ago[mono] Enable parallel mode for xunit on Android by default (#37058)
Egor Bogatov [Sun, 31 May 2020 13:28:47 +0000 (16:28 +0300)]
[mono] Enable parallel mode for xunit on Android by default (#37058)

4 years ago[master] Update dependencies from dotnet/arcade Microsoft/vstest (#37200)
dotnet-maestro[bot] [Sat, 30 May 2020 23:53:16 +0000 (16:53 -0700)]
[master] Update dependencies from dotnet/arcade Microsoft/vstest (#37200)

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

Microsoft.DotNet.XUnitExtensions , Microsoft.DotNet.VersionTools.Tasks , Microsoft.DotNet.ApiCompat , Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Build.Tasks.Packaging , Microsoft.DotNet.Build.Tasks.SharedFramework.Sdk , Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk , Microsoft.DotNet.CodeAnalysis , Microsoft.DotNet.GenAPI , Microsoft.DotNet.GenFacades , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.RemoteExecutor , Microsoft.DotNet.XUnitConsoleRunner
 From Version 5.0.0-beta.20261.9 -> To Version 5.0.0-beta.20278.4

* Update dependencies from https://github.com/microsoft/vstest build 20200529-01

Microsoft.NET.Test.Sdk
 From Version 16.7.0-preview-20200521-01 -> To Version 16.7.0-preview-20200529-01

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
4 years agoFix fast tail calls on Windows ARM64. (#37192)
Eugene Rozenfeld [Sat, 30 May 2020 23:34:19 +0000 (16:34 -0700)]
Fix fast tail calls on Windows ARM64. (#37192)

LowerFastTailCall has code that looks for incoming stack arguments
that may be overwritten by outgoing stack arguments and copies
them to a temp. The logic was incorrect for Windows Arm64 because it was
assuming shadow space, which only exists in Windows x64 abi.

Fixes #31729.
Fixes #36911.

4 years agoDelete unused file (#37201)
Jan Kotas [Sat, 30 May 2020 19:20:18 +0000 (12:20 -0700)]
Delete unused file (#37201)

4 years agoLowLevelLifoSemaphore: Fix incorrect field offset (#37076)
Filip Navara [Sat, 30 May 2020 17:15:58 +0000 (19:15 +0200)]
LowLevelLifoSemaphore: Fix incorrect field offset (#37076)

Fixes #37075

4 years agoInit dictionary with clear count (#37041)
lindexi [Sat, 30 May 2020 17:13:05 +0000 (01:13 +0800)]
Init dictionary with clear count (#37041)

4 years agoUse nuint for bytes counter inside SafeBuffer (#37173)
Marek Safar [Sat, 30 May 2020 16:04:26 +0000 (18:04 +0200)]
Use nuint for bytes counter inside SafeBuffer (#37173)

* Use nuint for bytes counter inside SafeBuffer

* One more place to update

4 years agoReformat WasmAppBuilder to conform to the coding conventions. NFC. (#37199)
Zoltan Varga [Sat, 30 May 2020 15:09:38 +0000 (11:09 -0400)]
Reformat WasmAppBuilder to conform to the coding conventions. NFC. (#37199)

4 years agoBump to updated WebAssembly runner from xharness (#37178)
Alexander Köplinger [Sat, 30 May 2020 08:02:50 +0000 (10:02 +0200)]
Bump to updated WebAssembly runner from xharness (#37178)

4 years agoAllow GetReJITIDs calls with NULL to get number of IDs (#37187)
David Mason [Sat, 30 May 2020 06:36:02 +0000 (23:36 -0700)]
Allow GetReJITIDs calls with NULL to get number of IDs (#37187)

4 years agoReplace CoreClr issue numbers with Runtime issue links. (#37188)
Anton Lapounov [Sat, 30 May 2020 03:39:02 +0000 (20:39 -0700)]
Replace CoreClr issue numbers with Runtime issue links. (#37188)

Also replace tabs with spaces and remove a duplicate entry.

4 years agoRemove ObsoleteAttribute and EditorBrowsableAttribute (#37184)
Aaron Robinson [Sat, 30 May 2020 00:59:37 +0000 (17:59 -0700)]
Remove ObsoleteAttribute and EditorBrowsableAttribute (#37184)

4 years agoFix Mono C++ build. (#37153)
Johan Lorensson [Sat, 30 May 2020 00:52:53 +0000 (02:52 +0200)]
Fix Mono C++ build. (#37153)

4 years agoRemove built-in WinRT support from the runtime (#36715)
Jeremy Koritzinsky [Sat, 30 May 2020 00:37:12 +0000 (17:37 -0700)]
Remove built-in WinRT support from the runtime (#36715)

4 years agofixed a bug in updating the gen0 budget for AllocateUninitializedArray (#37148)
Maoni Stephens [Fri, 29 May 2020 23:57:43 +0000 (16:57 -0700)]
fixed a bug in updating the gen0 budget for AllocateUninitializedArray (#37148)

For AllocateUninitializedArray, we don't consume all the memory we get
from the gen0 budget but we are not putting back the part we don't consume.
This artificial consumption in budget can mean we trigger a GC way too early
when we haven't actually allocated that much.

4 years agoMake H3StaticTable class static (#36222)
Youssef Victor [Fri, 29 May 2020 22:35:04 +0000 (00:35 +0200)]
Make H3StaticTable class static (#36222)

* Make class as static

* Update H3StaticTable.cs

* Update H3StaticTable.cs

* Update H3StaticTable.cs

4 years agoAdd activity Ids and Context to log scopes (#37092)
Tarek Mahmoud Sayed [Fri, 29 May 2020 22:28:26 +0000 (15:28 -0700)]
Add activity Ids and Context to log scopes (#37092)

* Add activity Ids and Context to log scopes

* Fix name casing

* Address the feedback

* Address the feedback

* Validate ActivityTrackingOptions input and add test

4 years ago[interp] Remove assertions from release and add more to debug builds (#37160)
Vlad Brezae [Fri, 29 May 2020 22:09:11 +0000 (01:09 +0300)]
[interp] Remove assertions from release and add more to debug builds (#37160)

* [interp] Remove some assertions from hot path

We can keep them only for debug builds, where in the future we can add more verbose assertions, like ones for stack overflows.

* [interp] Add more assertions on debug build

Most of the weird interp bugs are due to overflows in the interp stacks. Since we now test interp on CI with debug build, try to catch them early.

4 years agoFix fixed dictionary sizes in apple crypto key generation
Kevin Jones [Fri, 29 May 2020 21:58:04 +0000 (17:58 -0400)]
Fix fixed dictionary sizes in apple crypto key generation

Both dictionaries had a fixed size of two, however three items were being added to it.
This is undefined behavior in the documentation.

4 years agoAllow DynamicallyAccessedMembersAttribute on methods (#36340)
Vitek Karas [Fri, 29 May 2020 21:15:46 +0000 (14:15 -0700)]
Allow DynamicallyAccessedMembersAttribute on methods (#36340)

Allow DynamicallyAccessedMembersAttribute on methods

4 years agoRemove AnonymousType ILLinkTrim entry for EventSource (#37083)
Eric Erhardt [Fri, 29 May 2020 21:09:22 +0000 (16:09 -0500)]
Remove AnonymousType ILLinkTrim entry for EventSource (#37083)

Instead of using an anonymous type to do the logging, just pass the string directly.

Contributes to #35199

4 years agoUpdate dependencies from https://github.com/mono/linker build 20200529.1 (#37157)
dotnet-maestro[bot] [Fri, 29 May 2020 20:46:22 +0000 (20:46 +0000)]
Update dependencies from https://github.com/mono/linker build 20200529.1 (#37157)

Microsoft.NET.ILLink.Tasks
 From Version 5.0.0-preview.3.20278.2 -> To Version 5.0.0-preview.3.20279.1

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
4 years ago[browser][wasm] Add initial webassembly instructions document. (#37123)
Kenneth Pouncey [Fri, 29 May 2020 20:35:37 +0000 (22:35 +0200)]
[browser][wasm] Add initial webassembly instructions document. (#37123)

4 years ago[mono] Remove some dead code from Delegate.DynamicInvoke (#37085)
Aleksey Kliger (λgeek) [Fri, 29 May 2020 19:30:41 +0000 (15:30 -0400)]
[mono] Remove some dead code from Delegate.DynamicInvoke (#37085)

* [mono] Remove some dead code from System.Delegate.DynamicInvokeImpl

Remove some dead code from `System.Delegate.DynamicInvoke`.  It should be the
case that `Method` is non-`null` when we call `DynamicInvoke` - the delegate
method should be known at the time of the invoke, and it should not be picked
based on the arguments.

Fixes https://github.com/dotnet/runtime/issues/37008

4 years agoUpdate area-owners.md (#37171)
Dan Moseley [Fri, 29 May 2020 19:27:55 +0000 (12:27 -0700)]
Update area-owners.md (#37171)

4 years agoMerge pull request #37147 from swaroop-sridhar/publishhost
Swaroop Sridhar [Fri, 29 May 2020 18:22:43 +0000 (11:22 -0700)]
Merge pull request #37147 from swaroop-sridhar/publishhost

Publish singlefilehost on Linux, Osx, FreeBSD

4 years agoFix Linux requirements document (#37145)
Bruce Forstall [Fri, 29 May 2020 18:09:05 +0000 (11:09 -0700)]
Fix Linux requirements document (#37145)

Update linux-requirements.md

Fix copy/paste error, update wording related to LLVM APT feed.

4 years agoAdd more verbose logging (#37089)
John Salem [Fri, 29 May 2020 16:36:18 +0000 (09:36 -0700)]
Add more verbose logging (#37089)

* log out stdout/stderr of subprocess
* instead of using Process.Kill, gracefully exit

4 years agoDefine _FILE_OFFSET_BITS=64 (#33266)
Next Turn [Fri, 29 May 2020 10:13:51 +0000 (18:13 +0800)]
Define _FILE_OFFSET_BITS=64 (#33266)

* Define _FILE_OFFSET_BITS=64

* Set unconditionally for all hosts

* Move forward

4 years agoPublish singlefilehost on Linux,Osx,FreeBSD
Swaroop Sridhar [Fri, 29 May 2020 07:09:42 +0000 (00:09 -0700)]
Publish singlefilehost on Linux,Osx,FreeBSD

singlefilehost is currently only published in the microsoft.netcore.app.host.win-x64
Add it to host packages for other platforms.

4 years ago[mono] Implement AssemblyBuilder.GetSatelliteAssembly (#36589)
Alexis Christoforides [Fri, 29 May 2020 02:58:14 +0000 (22:58 -0400)]
[mono] Implement AssemblyBuilder.GetSatelliteAssembly (#36589)

[mono] Implement AssemblyBuilder.GetSatelliteAssembly

Contributes to https://github.com/mono/mono/issues/14788

4 years agoMerge pull request #37098 from terrajobst/api-review-process
Immo Landwerth [Thu, 28 May 2020 23:18:36 +0000 (16:18 -0700)]
Merge pull request #37098 from terrajobst/api-review-process

Add information about API review schedule

4 years agoReword section
Immo Landwerth [Thu, 28 May 2020 23:17:47 +0000 (16:17 -0700)]
Reword section

4 years agoUpdate docs/project/api-review-process.md
Immo Landwerth [Thu, 28 May 2020 23:14:47 +0000 (16:14 -0700)]
Update docs/project/api-review-process.md

Co-authored-by: Eric StJohn <ericstj@microsoft.com>
4 years agoDisable BackgroundWorkerTests.TestFinalization on mono interpreter mode (#37137)
Santiago Fernandez Madero [Thu, 28 May 2020 22:57:36 +0000 (15:57 -0700)]
Disable BackgroundWorkerTests.TestFinalization on mono interpreter mode (#37137)

4 years agoAdding arm64 as a platform for the interpreter tests (#37133)
Steve Pfister [Thu, 28 May 2020 22:26:24 +0000 (18:26 -0400)]
Adding arm64 as a platform for the interpreter tests (#37133)

Co-authored-by: Steve Pfister <steve.pfister@microsoft.com>
4 years ago[mono] Implement AssemblyBuilder.GetReferencedAssemblies (#36346)
Alexis Christoforides [Thu, 28 May 2020 22:15:33 +0000 (18:15 -0400)]
[mono] Implement AssemblyBuilder.GetReferencedAssemblies (#36346)

[mono] Implement AssemblyBuilder.GetReferencedAssemblies

4 years agoGCCoverageInfo support 32-bit Tiered compilation (#37116)
Aaron Robinson [Thu, 28 May 2020 20:34:28 +0000 (13:34 -0700)]
GCCoverageInfo support 32-bit Tiered compilation (#37116)

* GCCoverageInfo support 32-bit Tiered compilation

Update the GC coverage info code path to respect Tiered compilation
  on a 32-bit platform.

4 years agoReduce ConcurrentDictionary.TryGetValue overhead (#37081)
Stephen Toub [Thu, 28 May 2020 20:12:22 +0000 (16:12 -0400)]
Reduce ConcurrentDictionary.TryGetValue overhead (#37081)

* Clean up style in ConcurrentDictionary

No functional changes.

* Optimize ConcurrentDictionary for no comparer as well as value type keys

* Special-case StringComparer.Ordinal in ConcurrentDictionary

* Store repeatedly used fields into locals

* Use FastMod in ConcurrentDictionary

* Allow atomic writes of {U}IntPtr

From ECMA 335:
"The native size types (native int, native unsigned int, and &) are always naturally aligned (4 bytes or 8 bytes, depending on the architecture)"
and
"A conforming CLI shall guarantee that read and write access to properly aligned memory locations no larger than the native word size (the size of type native int) is atomic (see §I.12.6.2) when all the write accesses to a location are the same size. "

* Address PR feedback

4 years agoAdd mono interpreter test leg to CI (#35568)
Steve Pfister [Thu, 28 May 2020 19:18:00 +0000 (15:18 -0400)]
Add mono interpreter test leg to CI (#35568)

This change enables the interpreter on CI as well as providing an option for the local test run.

4 years ago[runtime] Fix Mono BStr marshaling, cleanup IL generation (#35804)
Ryan Lucia [Thu, 28 May 2020 19:01:05 +0000 (15:01 -0400)]
[runtime] Fix Mono BStr marshaling, cleanup IL generation (#35804)

* [COM] Set and free BSTR size correctly

Apparently, while the previous 4 bytes contain the size, the actual allocation is either 4 or 8 bytes depending on the platform! See https://github.com/dotnet/runtime/blob/fcd862e06413a000f9cafa9d2f359226c60b9b42/src/coreclr/tests/src/Common/Platform/platformdefines.cpp#L418

* [meta] Cleanup string marshalling and support additional conversions

* [COM] Align BSTR creation to 16 bytes

* Enable test

* Feedback

* Fix offset

* Add support for AnsiBStr and TBStr marshalling

Also makes BStr changes netcore-only and enables AnsiBStr test. No TBStr test appears to exist.

* String marshaling IL gen refactoring

* Fix Windows build

* Feedback

4 years agoUse dictionary to track PackageRelationships instead of searching a list (#35978)
Taylor Southwick [Thu, 28 May 2020 18:48:08 +0000 (11:48 -0700)]
Use dictionary to track PackageRelationships instead of searching a list (#35978)

This change adds an OrderedDictionary<TKey,TValue> type to System.IO.Packaging to keep a list of relationships that have been added, while ensuring that the ids are unique with decent performance characteristics. The current implementation searches a list which gets really slow with large numbers of relationships. A Dictionary by itself does not work for this as the order of addition is important. Thus, this combines a LinkedList to track the order, while a Dictionary is used to for quick look up of existing items.

4 years agoremove some old Sierra craft in ping test (#36987)
Tomas Weinfurt [Thu, 28 May 2020 18:36:42 +0000 (11:36 -0700)]
remove some old Sierra craft in ping test (#36987)

Co-authored-by: Tomas Weinfurt <furt@Shining.local>
4 years agoSupport async KeyValuePair (de)serialization (#36607)
Layomi Akinrinade [Thu, 28 May 2020 17:15:29 +0000 (13:15 -0400)]
Support async KeyValuePair (de)serialization (#36607)

* Support async KeyValuePair (de)serialization

* Address review feedback

* Fix up test

4 years ago[CBOR] Add Bugfixes, XML Documentation and other refinements (#36770)
Eirik Tsarpalis [Thu, 28 May 2020 16:20:08 +0000 (17:20 +0100)]
[CBOR] Add Bugfixes, XML Documentation and other refinements (#36770)

* Remove buffer pooling and IDisposable implementation from CborWriter

* rename CborWriter.GetEncoding()/TryWriteEncoding() to Encode()/TryEncode()

* move exception messages to resource file

* rebase on top of latest cbor changes

* move writer exception messages to resource strings

* fix failing tests

* Implement a CborWriter.Reset() method

* remove clearArray argument from Reset() function

* add XML docs for shared CBOR types

* tolerate invalid utf8 encodings in lax conformance levels

* flip default validateConformance value in SkipValue() method

* tidy up CborReader internal state; add more comments

* more CborReader internal state tidying up

* fix strict conformance level rollback bug

* Deprecate CborReader.BytesRemaining property

* Change return type of CborReader.ReadEncodedValye() to ReadOnlySpan<byte>

* factor CborReaderState to a separate file, add xml docs

* Add xml docs for CborReader.cs and CborReader.Integer.cs

* string reader should not throw OverflowException on large indefinite-length

* simplify integer decoding implementation

* add xml docs for CborReader.String.cs

* add missing docs to CborReader.cs

* clean up CborReader.String.cs and add more code comments

* add xml docs for array and map readers

* refine CborReader.PeekTag() error semantics & add xml docs

* add CborReader.Simple.cs xml docs

* add xml docs for CborReader.SkipValue.cs

* remove unnecessary usings

* rename encodeIndefiniteLengths parameter to convertIndefiniteLengthEncodings and change default value.

* add xml docs to CborWriter.cs

* Render major types using their numeric values in exception messages

* fix handling of root-level break bytes when multiple root-level items are permitted

* add xml docs to CborWriter.Integer.cs

* Cleanup CborReader.Simple.cs

* add xml docs to CborWriter.String.cs

* add xml docs for CborWriter array and map methods

* add xmldocs for CborWriter.Tag.cs

* add xmldocs for CborWriter.Simple.cs; refine behaviour and add tests

* add conformance level tests for CborWriter.WriteEncodedValue()

* Update src/libraries/System.Security.Cryptography.Encoding/tests/Cbor/CborReader.Simple.cs

Co-authored-by: Jeremy Barton <jbarton@microsoft.com>
* Update src/libraries/System.Security.Cryptography.Encoding/tests/Cbor/CborReader.Map.cs

Co-authored-by: Jeremy Barton <jbarton@microsoft.com>
* address PR feedback

* Update src/libraries/System.Security.Cryptography.Encoding/tests/Cbor/CborWriter.cs

Co-authored-by: Jeremy Barton <jbarton@microsoft.com>
* Update src/libraries/System.Security.Cryptography.Encoding/tests/Cbor/CborWriter.cs

Co-authored-by: Jeremy Barton <jbarton@microsoft.com>
* Update src/libraries/System.Security.Cryptography.Encoding/tests/Cbor/CborWriter.cs

Co-authored-by: Jeremy Barton <jbarton@microsoft.com>
* address feedback

* have lax conformance level tolerate reserved simple value encodings

* fix xmldoc issues

* minor docs fixes

* add more docs fixes

* remove redundant <see> elements in xml docs

* Remove more <see> elements from <summary> docs

Co-authored-by: Jeremy Barton <jbarton@microsoft.com>
4 years agoUse friendly name in exception if OID value is null. (#37110)
Kevin Jones [Thu, 28 May 2020 16:14:37 +0000 (12:14 -0400)]
Use friendly name in exception if OID value is null. (#37110)

4 years agoUpdate dependencies from https://github.com/mono/linker build 20200528.2 (#37126)
dotnet-maestro[bot] [Thu, 28 May 2020 16:13:49 +0000 (12:13 -0400)]
Update dependencies from https://github.com/mono/linker build 20200528.2 (#37126)

Microsoft.NET.ILLink.Tasks
 From Version 5.0.0-preview.3.20276.2 -> To Version 5.0.0-preview.3.20278.2

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
4 years agoJIT: some small improvements to tail duplication (#37038)
Andy Ayers [Thu, 28 May 2020 16:13:39 +0000 (09:13 -0700)]
JIT: some small improvements to tail duplication (#37038)

1. Allow duplicating when predecessor is BBJ_NONE
2. Require that predecessor and successor reference the same local
3. Make sure that local is not address exposed
4. Check up to two statements in predecessor for local reference
5. Require successor to compare local to constant, or local to local

Changes inspired by #36649 but don't actually improve CQ for that case (yet).

Also, add morph to post-phase whitelist because it seems odd not
to dump the IR after morph.

4 years ago[runtime] Implement the many argument version of the Vector128.Create () intrinsic...
Zoltan Varga [Thu, 28 May 2020 16:07:01 +0000 (12:07 -0400)]
[runtime] Implement the many argument version of the Vector128.Create () intrinsic. (#37036)

4 years agoFix namespace for Nullable converters (#37019)
Steve Harter [Thu, 28 May 2020 15:12:32 +0000 (10:12 -0500)]
Fix namespace for Nullable converters (#37019)

4 years ago[wasm] Fix the handling of i8/u8 in get_wrapper_shared_type_full (). (#37056)
monojenkins [Thu, 28 May 2020 14:43:51 +0000 (10:43 -0400)]
[wasm] Fix the handling of i8/u8 in get_wrapper_shared_type_full (). (#37056)

Fixes https://github.com/mono/mono/issues/19837.

<!--
Thank you for your Pull Request!

If you are new to contributing to Mono, please try to do your best at conforming to our coding guidelines http://www.mono-project.com/community/contributing/coding-guidelines/ but don't worry if you get something wrong. One of the project members will help you to get things landed.

Does your pull request fix any of the existing issues? Please use the following format: Fixes #issue-number
-->

Co-authored-by: vargaz <vargaz@users.noreply.github.com>
4 years agoMove thread pool initialization to native side (#36789)
Koundinya Veluri [Thu, 28 May 2020 13:32:31 +0000 (09:32 -0400)]
Move thread pool initialization to native side (#36789)

Move thread pool initialization to native side

- Following up from https://github.com/dotnet/runtime/pull/36697. Currently the initialization occurs when a static variable is accessed before calling into the VM, and after thinking about it some more the intent and need to initialize the thread pool can be a bit unclear
- The initialization is specific to this implementation and the managed side doesn't necessarily need to know about it
- Moved the initialization to the native side similarly to other thread pool APIs
- Added some more assertions to relevant managed-to-native entry point paths to ensure that they are not called before the thread pool is initialized
- This adds a non-volatile check when requesting a worker thread, which is already a very slow path. I ran into some issues with testing on the arm64 machine with updated locally built libcoreclr.so, so wasn't able to test that. I looked at the baseline profile and looking at time spent exclusively in ThreadPoolNative::RequestWorkerThread() and what it already does, I don't think the change would result in any significant perf difference.

4 years ago[wasm] Test runner improvements. (#37097)
Zoltan Varga [Thu, 28 May 2020 09:35:18 +0000 (05:35 -0400)]
[wasm] Test runner improvements. (#37097)

* Fix the test runner script.

* Add a ExtraFiles property to the wasm app builder.

* Add helper make targets.

* Bump sdk version to pick up wasm support.

* Fix make targets.

* Compile wasm runtime with --enable-minimal=threads.

4 years agoUpdate Microsoft.DotNet.Build.Tasks.SharedFramework.Sdk. (#36889)
Jeremy Koritzinsky [Thu, 28 May 2020 05:36:55 +0000 (22:36 -0700)]
Update Microsoft.DotNet.Build.Tasks.SharedFramework.Sdk. (#36889)

* Update Microsoft.DotNet.Build.Tasks.SharedFramework.Sdk.

Unblocks #36715

* Enable creating the LightCommand package drop to fix MSI creation.

* Update shared framework sdk to 20277.7

4 years agoAdd linux arm/arm64 libraries checked coreclr test runs (#36910)
Santiago Fernandez Madero [Thu, 28 May 2020 01:45:56 +0000 (18:45 -0700)]
Add linux arm/arm64 libraries checked coreclr test runs (#36910)

* Add linux arm/arm64 libraries checked coreclr test runs

* Add linux_musl_arm64

* Disable BitmapTests on linux checked coreclr

4 years agoARM/ARM64: Optimize virtual call stub for R2R and JIT (#36817)
Kunal Pathak [Thu, 28 May 2020 01:04:17 +0000 (18:04 -0700)]
ARM/ARM64: Optimize virtual call stub for R2R and JIT (#36817)

Optimize virtual call stub for R2R ARM/ARM64 scenarios

4 years agoLoosen property name collision detection involving hidden properties (#36936)
Layomi Akinrinade [Wed, 27 May 2020 23:59:48 +0000 (19:59 -0400)]
Loosen property name collision detection involving hidden properties (#36936)

* Loosen property name collision detection involving hidden properties

* Delay ignored prop cache creation; add more tests

* Clarify comments

4 years agoAdd ICU App-Local support on Mono (#37037)
Santiago Fernandez Madero [Wed, 27 May 2020 23:37:44 +0000 (16:37 -0700)]
Add ICU App-Local support on Mono (#37037)

* Add ICU App-Local support on Mono

* PR Feedback

4 years agoFix multi-reg copy (#37062)
Carol Eidt [Wed, 27 May 2020 22:02:47 +0000 (15:02 -0700)]
Fix multi-reg copy (#37062)

Also, fix dump for multi-reg copy.

Fix #37059

4 years agoAdd information about API review schedule
Immo Landwerth [Wed, 27 May 2020 21:45:06 +0000 (14:45 -0700)]
Add information about API review schedule

4 years ago[master] Update dependencies from mono/linker dotnet/xharness (#37051)
dotnet-maestro[bot] [Wed, 27 May 2020 17:11:49 +0000 (17:11 +0000)]
[master] Update dependencies from mono/linker dotnet/xharness (#37051)

* Update dependencies from https://github.com/mono/linker build 20200526.2

Microsoft.NET.ILLink.Tasks
 From Version 5.0.0-preview.3.20271.1 -> To Version 5.0.0-preview.3.20276.2

* Update dependencies from https://github.com/dotnet/xharness build 20200527.1

Microsoft.DotNet.XHarness.Tests.Runners
 From Version 1.0.0-prerelease.20275.1 -> To Version 1.0.0-prerelease.20277.1

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
4 years agouddate Ubuntu and Alpine RID (#37031)
Tomas Weinfurt [Wed, 27 May 2020 16:46:41 +0000 (09:46 -0700)]
uddate Ubuntu and Alpine RID (#37031)

Co-authored-by: Tomas Weinfurt <furt@DESKTOP-0J9757E.corp.microsoft.com>
4 years agoImprove test ALPN detection (#36928)
Tomas Weinfurt [Wed, 27 May 2020 16:35:05 +0000 (09:35 -0700)]
Improve test ALPN detection (#36928)

* Improve test ALPN detection

* feedback from review

* add tvos

* update casing

4 years agoFix build with FEATURE_GDBJIT enabled (#37054)
Kirill Frolov [Wed, 27 May 2020 15:30:20 +0000 (18:30 +0300)]
Fix build with FEATURE_GDBJIT enabled (#37054)

This commit fixes broken build in case when following arguments added to
build.sh script: --cmakeargs -DFEATURE_GDBJIT=true

4 years agoEnable jumps4 tests, since the issue has been fixed via mono/mono PR #19809 (#37015)
Fan Yang [Wed, 27 May 2020 15:21:49 +0000 (11:21 -0400)]
Enable jumps4 tests, since the issue has been fixed via mono/mono PR #19809 (#37015)

4 years agoAdd a BundleTestWasmApp target to build wasm test apps for libraries. (#36739)
Zoltan Varga [Wed, 27 May 2020 14:37:31 +0000 (10:37 -0400)]
Add a BundleTestWasmApp target to build wasm test apps for libraries. (#36739)

Beginning of a BundleTestWasmApp target to build wasm test apps for libraries.

4 years agoUpdate the -vs switch and add docs for it (#37026)
Viktor Hofer [Wed, 27 May 2020 13:59:38 +0000 (15:59 +0200)]
Update the -vs switch and add docs for it (#37026)

* Remove testhost DOTNET_ROOT from vs switch

We don't need to point to the testhost folder anymore for libraries for
supporting VS Test Explorer.

* Update docs

* Fix verbosity alias

4 years agoReduce app size for iOS (#36902)
Egor Bogatov [Wed, 27 May 2020 13:57:20 +0000 (16:57 +0300)]
Reduce app size for iOS (#36902)

We did the same mistake for Android - `libmonosgen-2.0.dylib` shouldn't be copied to bundle (we already have a mono runtime there)

4 years agoMake ApkBuilder less verbose (#37050)
Egor Bogatov [Wed, 27 May 2020 13:56:10 +0000 (16:56 +0300)]
Make ApkBuilder less verbose (#37050)

The output is still pretty useful and x4 times less verbose.

4 years ago[browser][wasm] InteropServices.JavaScript backing code. (#37044)
Kenneth Pouncey [Wed, 27 May 2020 09:12:39 +0000 (11:12 +0200)]
[browser][wasm] InteropServices.JavaScript backing code. (#37044)

4 years ago[interp] Remove return value indirection (#37004)
Vlad Brezae [Wed, 27 May 2020 08:57:58 +0000 (11:57 +0300)]
[interp] Remove return value indirection (#37004)

* [interp] Remove return value indirection

When returning from a method we used to save the return value into frame->retval. We would then have separate opcodes for normal and void call and, depending on the type of call, we would access the retval and push it on the stack. In case of valuetype returns, the value is not returned in the proper space so we have an additional MINT_VTRESULT that copies the return around in the caller frame. In addition to this we had retval, is_void locals, saved as part of the current frame state which just make things confusing and are not needed.

This commit simplifies the call procedure by completely moving the responsability of the return to the called method. Simply put, once a method is ready for the call, it will leave its stack and vtstack to the state after pop-ing the arguments. The called method will then directly push the result to the parent frame's stack/vtstack. This means the calling code doesn't care about the type of the return anymore, the IL instructions after the call will just expect the return on the stack, if any, and use it naturally.

We still make use of frame->retval for interp entry frames (since we don't have a parent frame to push to), for pinvoke and jit_call frames out of convenience, but we should consider removing this variable to further trim down InterpFrame.

* [interp] Remove call opcodes that are no longer necessary

* [interp] Split up CALL and CALLVIRT opcodes

MINT_CALLVIRT is soon to be removed while MINT_CALL is the most common call opcode.

* [interp] Fix jit calls done through MINT_CALLVIRT

The callee should push the vt stack if there is a vt return, except when we are calling out of the interpreter, in which case the calling opcodes handle the push explicitly. We weren't handling the case of exiting the interpreter when doing a jit call through MINT_CALLVIRT. In order to keep the same structure for MINT_CALLVIRT, which doesn't need to know about the vt_res_size, we handle the vtstack change when doing a jit call by caching the return size in the InterpMethod, together with other jit_call information. Maybe we can refactor this later.

* [interp] Cleanup call opcode emitting

Add the opcode and set its data in the same place, making the code
easier to follow.

* [interp] Split up MINT_CALL_NAT in 2 opcodes

This opcode had two different cases embedded in it. Clean up the code,
split the opcode in two, removing also a dirty recursive call.

* [tests] Disable a few tests that fail with this PR due to false pinning

There are over a hundred tests calling GC.WaitForPendingFinalizers and potentially flaky with mono. We might have to disable all of them or tweak them to be mono friendly.

4 years agoAvoid HttpClientHandler.ServerCertificateCustomValidationCallback keeping first reque...
Stephen Toub [Wed, 27 May 2020 08:29:11 +0000 (04:29 -0400)]
Avoid HttpClientHandler.ServerCertificateCustomValidationCallback keeping first request message alive (#37021)

4 years agoRuyJIT: `Array.Length / cns` can be converted to unsigned div (mod) (#32368)
Egor Bogatov [Wed, 27 May 2020 05:52:18 +0000 (08:52 +0300)]
RuyJIT: `Array.Length / cns` can be converted to unsigned div (mod) (#32368)

* Optimize `array.Length / cns` and `array.Length % cns` if cns is positive

* Address feedback

4 years agoFix a couple of bugs in multi-reg stores (#36994)
Carol Eidt [Wed, 27 May 2020 04:56:16 +0000 (21:56 -0700)]
Fix a couple of bugs in multi-reg stores (#36994)

* Fix a couple of bugs in multi-reg stores

Fix #36912

4 years agoEnsure Vector3 inequality doesn't use the hidden 4th element (#36953)
Tanner Gooding [Wed, 27 May 2020 03:48:14 +0000 (20:48 -0700)]
Ensure Vector3 inequality doesn't use the hidden 4th element (#36953)

* Renable Vector3InequalityTest

* Fixing ARM64 LowerHWIntrinsicCmpOp to always treat the extra element of a TYP_SIMD12 as equivalent

* Adding a regression test for Vector3InequalityTest

* Update src/coreclr/src/jit/lowerarmarch.cpp

Co-authored-by: Carol Eidt <carol.eidt@microsoft.com>
* Applying formatting patch

Co-authored-by: Carol Eidt <carol.eidt@microsoft.com>
4 years agoAlign assembler mnemonics and operands in R2RDump (#37034)
Anton Lapounov [Wed, 27 May 2020 03:44:23 +0000 (20:44 -0700)]
Align assembler mnemonics and operands in R2RDump (#37034)

* Align assembler mnemonics and operands in R2RDump.
* For ARM64 images dump instruction bytes as 4-byte hexadecimal integers.
* Fix incorrect usage of _methods.Count.
* Fix the corrupted R2RFormat.png file.

4 years agoDisable AddThresholdTest in all archs (#37032)
Santiago Fernandez Madero [Wed, 27 May 2020 03:02:09 +0000 (20:02 -0700)]
Disable AddThresholdTest in all archs (#37032)

4 years agoUse nint instead of IntPtr in _RegisterFrozenSegment. (#37029)
Eric Erhardt [Wed, 27 May 2020 02:55:46 +0000 (21:55 -0500)]
Use nint instead of IntPtr in _RegisterFrozenSegment. (#37029)

4 years agorearrange tfms for intellisense (#37027)
Anirudh Agnihotry [Wed, 27 May 2020 00:43:37 +0000 (17:43 -0700)]
rearrange tfms for intellisense (#37027)

4 years agoSimple sideloaded profile guided optimization support (#36887)
Andy Ayers [Tue, 26 May 2020 23:26:53 +0000 (16:26 -0700)]
Simple sideloaded profile guided optimization support (#36887)

1. Add code so the runtime can read profile data from a text file and then
make this data available to the jit, so it will be easier to test the jit's
behavior when profile data is available.
2. Add code so the runtime can create profile text files by telling the jit
to insert probes into jitted code that write into a persistent buffer, which
is saved to text at shutdown. This is mainly intended to make creation of the
sideloaded profile data files easier, since their internal structure must
exactly match artifacts from jitted methods.
3. Add a mode where jit-instrumented Tier0 code can feed counts into Tier1
jitting. This is an experiment to see what benefit, if any, might accrue from
having  profile data available for Tier1 jitting.

External format is text so it can be edited by hand or checked into the repo
alongside tests. Binary format would be more compact but opaque.

In all cases the jit internally sees a profile buffer identical to the one it
sees with IBC; the only minor changes in the jit are to initialize the count
field of each probe entry to zero and to only emit the entry helper call for
prejitted IBC.

Only root methods are instrumented, and only root method blocks are given
profile weights. Broadening to handle inlinees is future work, facilitated by
the new capabilites added here.