platform/upstream/dotnet/runtime.git
2 years agoRegenerate fabricbot config to include several new/revised automation tasks (#68728)
Jeff Handley [Tue, 3 May 2022 05:03:35 +0000 (22:03 -0700)]
Regenerate fabricbot config to include several new/revised automation tasks (#68728)

* Regenerate fabricbot config to include several new automation tasks

* Remove tasks that were moved into the fabricbot-config generation

* Update the needs-author-action comment per feedback

* Update the "PR Needs Champion" tasks to address a bug found during testing

2 years agoDelete unmanaged AssemblyName parser (#68737)
Jan Kotas [Tue, 3 May 2022 03:35:43 +0000 (20:35 -0700)]
Delete unmanaged AssemblyName parser  (#68737)

Replaced the few places that need to parse assembly names in the VM with callbacks to CoreLib

2 years agoRemove REGEX_OPTIONS from TextFieldParser.vb (#68766)
Stephen Toub [Tue, 3 May 2022 02:33:59 +0000 (22:33 -0400)]
Remove REGEX_OPTIONS from TextFieldParser.vb (#68766)

RegexOptions.CultureInvariant is a nop unless RegexOptions.IgnoreCase is specified or the inline `(?i)` is used in the pattern, neither of which is done here.

2 years agoRevise OSR docs (#68778)
Andy Ayers [Tue, 3 May 2022 01:30:46 +0000 (18:30 -0700)]
Revise OSR docs (#68778)

Bring the main document up to date with current implementation. Remove
some obsolete sections (EnC, complex epilog).

Co-authored-by: Jakob Botsch Nielsen <Jakob.botsch.nielsen@gmail.com>
2 years agoUpdate comments and simplify implementation of ResourceManager.IsDefault (#68777)
Jan Kotas [Tue, 3 May 2022 01:10:02 +0000 (18:10 -0700)]
Update comments and simplify implementation of ResourceManager.IsDefault (#68777)

Avoids parsing of AssemblyName that is an overkill for what the method does.

2 years agoClean up some AcriveIssues in regex (#68657)
Stephen Toub [Mon, 2 May 2022 23:50:30 +0000 (19:50 -0400)]
Clean up some AcriveIssues in regex (#68657)

2 years agoRemove GTF_GLOB_REF on a few more addressing nodes (#68741)
Jakob Botsch Nielsen [Mon, 2 May 2022 21:16:24 +0000 (23:16 +0200)]
Remove GTF_GLOB_REF on a few more addressing nodes (#68741)

GTF_GLOB_REF is necessary on a GT_ADDR node only if the child actually
uses a tree with this flag as a value (and not as a location). This
removes the flag in a few more places by using IsLocalAddrExpr.

Fixes #68669

2 years agoMove EventPipe thread buffer allocation outside of lock (#67936)
John Salem [Mon, 2 May 2022 20:32:19 +0000 (13:32 -0700)]
Move EventPipe thread buffer allocation outside of lock (#67936)

2 years agoFix expected number of RequestLeftQueue events in telemetry test. (#68771)
Radek Zikmund [Mon, 2 May 2022 20:31:27 +0000 (13:31 -0700)]
Fix expected number of RequestLeftQueue events in telemetry test. (#68771)

Fixes #67273

2 years agoPass UseStrongCrypto to server-side TLS (#68704)
Radek Zikmund [Mon, 2 May 2022 20:26:59 +0000 (13:26 -0700)]
Pass UseStrongCrypto to server-side TLS (#68704)

2 years agoDelete some unused wrappers for registry operations (#68689)
Elinor Fung [Mon, 2 May 2022 18:38:41 +0000 (11:38 -0700)]
Delete some unused wrappers for registry operations (#68689)

2 years agoBump Intellisense package to Preview3 (#68713)
Carlos Sanchez [Mon, 2 May 2022 18:29:45 +0000 (11:29 -0700)]
Bump Intellisense package to Preview3 (#68713)

Co-authored-by: carlossanlop <carlossanlop@users.noreply.github.com>
2 years agoUpdate solution files to include missing deps (#68668)
Viktor Hofer [Mon, 2 May 2022 18:14:05 +0000 (20:14 +0200)]
Update solution files to include missing deps (#68668)

2 years agoAdding the 2-parameter xplat shuffle helpers and accelerating them (#68559)
Tanner Gooding [Mon, 2 May 2022 17:11:49 +0000 (10:11 -0700)]
Adding the 2-parameter xplat shuffle helpers and accelerating them (#68559)

* Adding managed definitions for cross-platform shuffle helpers

* Adding basic tests covering the Vector64/128/256 Shuffle APIs

* Adding JIT support to recognize Vector64/128/256.Shuffle as intrinsic but not handle it as an intrinsic

* Adding a helper for determining if a node represents a vector constant

* Adding x86/x64 acceleration for the 2-parameter xplat shuffle helpers

* Adding Arm64 acceleration for the 2-parameter xplat shuffle helpers

* Ensure a switch covers the "default" case

* Applying formatting patch

* Ensure the call to Op uses 1-based indexing

* Ensure TYP_LONG and TYP_ULONG fixup simdBaseJitType and simdBaseType

* Have gtNewSimdShuffle use fgMakeMultiUse

* Don't pass an unecessary compiler instance to `gtNewSimdShuffleNode`

* Don't expose the unused gtNewSimdShuffleNode API

* Allow fgMakeMultiUse to take a structType and pass it down to fgInsertCommaFormTemp

* Pass down the clsHnd to fgMakeMultiUse from gtNewSimdShuffleNode

* Adding some additional tests covering the vector shuffle APIs

* Ensure the Vector256 test is accessing the right index

* Ensure we look up the correct clsHnd

* Applying formatting patch

2 years agofix build for musl 1.2.3 (#67763) (#67772)
Antoine Martin [Mon, 2 May 2022 15:50:48 +0000 (11:50 -0400)]
fix build for musl 1.2.3 (#67763) (#67772)

2 years agoAvoid delegate allocation per LowLevelLock (#68751)
Stephen Toub [Mon, 2 May 2022 10:27:04 +0000 (06:27 -0400)]
Avoid delegate allocation per LowLevelLock (#68751)

2 years agoAvoid unnecessary closure/delegate for new SocketsHttpHandler connections (#68750)
Stephen Toub [Mon, 2 May 2022 10:08:42 +0000 (06:08 -0400)]
Avoid unnecessary closure/delegate for new SocketsHttpHandler connections (#68750)

2 years agoavoid Reflection in Quic (#68189)
Tomas Weinfurt [Mon, 2 May 2022 05:38:23 +0000 (22:38 -0700)]
avoid Reflection in Quic (#68189)

* avoid Reflection in Quic

* add missing file

* update comment

* exclude from ref creation

* feedback from review

2 years agoUse 'unsigned short' instead of 'unsigned'. (#68190)
Will Smith [Mon, 2 May 2022 04:57:30 +0000 (21:57 -0700)]
Use 'unsigned short' instead of 'unsigned'. (#68190)

* Use 'unsigned short' instead of 'unsigned'.

Should resolve work item 1507451.

* Widen

2 years agoAvoid delegate allocation in NamedPipeClientStream.ConnectAsync (#68752)
Stephen Toub [Mon, 2 May 2022 02:32:52 +0000 (22:32 -0400)]
Avoid delegate allocation in NamedPipeClientStream.ConnectAsync (#68752)

We still need to allocate an object for the closed-over state, but we can avoid the per-call delegate allocation.

2 years agoRemove unnecessary throwOnPrematureClosure in ManagedWebSocket. (#68745)
Eric Erhardt [Mon, 2 May 2022 00:53:43 +0000 (19:53 -0500)]
Remove unnecessary throwOnPrematureClosure in ManagedWebSocket. (#68745)

* Remove unnecessary throwOnPrematureClosure in ManagedWebSocket.

This parameter is always true, so it can be removed and simplify the code.

2 years agoJIT: fix loop recognition in OSR PGO methods (#68725)
Andy Ayers [Sun, 1 May 2022 23:17:26 +0000 (16:17 -0700)]
JIT: fix loop recognition in OSR PGO methods (#68725)

When both OSR and PGO are active, we both instrument and optimize methods.

The basic block count updates added by instrumentation were interfering
with loop recognition, leading to missed optimizations like loop cloning.

The fix is to recognize and skip over trees added for instrumentation.

Co-authored-by: Bruce Forstall <brucefo@microsoft.com>
2 years agoFix RegexCompiler regression on 32-bit for some set matching (#68655)
Stephen Toub [Sun, 1 May 2022 23:09:00 +0000 (19:09 -0400)]
Fix RegexCompiler regression on 32-bit for some set matching (#68655)

We added an optimization to regex where for sets containing values all within 64 characters of each other (e.g. all hex digits), we use a ulong to represent a bitmap and can implement the check in an entirely branchless manner.  This results in a measurable win on 64-bit, e.g. upwards of 20% for some patterns.  Unfortunately, it also results in a measurable regression on 32-bit.  This PR fixes that for RegexCompiler by special-casing the optimization to only apply when IntPtr.Size == 8.  For the source generator, we don't have the same luxury of knowing that the code is emitted and used on the same bitness, so since it would result in very complicated code to emit multiple implementations and since we generally prefer optimizing for 64-bit, I've left it in for the source generator.

2 years agoClean up some debug-only code in Regex (#68721)
Stephen Toub [Sun, 1 May 2022 18:14:18 +0000 (14:14 -0400)]
Clean up some debug-only code in Regex (#68721)

2 years agoReduce allocation in Process.GetProcessesByName (#68705)
Stephen Toub [Sun, 1 May 2022 17:43:19 +0000 (13:43 -0400)]
Reduce allocation in Process.GetProcessesByName (#68705)

* Reduce allocation in Process.GetProcessesByName

GetProcessesByName is loading all of the information for every process found, even if it'll immediately be thrown away because the name doesn't match.

* Fix a few issues and address PR feedback

2 years agoSimplify AssemblyName marshalling between VM and CoreLib (#68735)
Jan Kotas [Sun, 1 May 2022 14:35:06 +0000 (07:35 -0700)]
Simplify AssemblyName marshalling between VM and CoreLib (#68735)

- Introduce NativeAssemblyNameParts that is unmanaged view for the managed AssemblyNameParts
- Use NativeAssemblyNameParts to convert manually managed code to C#
- Delete unnecessary Version allocation

2 years agoUpdate Microsoft.CodeAnalysis.NetAnalyzers version (#68724)
Stephen Toub [Sun, 1 May 2022 10:22:11 +0000 (06:22 -0400)]
Update Microsoft.CodeAnalysis.NetAnalyzers version (#68724)

- Delete some now unnecessary pragmas
- Enable the new Dictionary.ContainsKey guard rule
- Address on violation of the new rule

2 years ago[MONO] Refactored code into marshal-ilgen and marshal-shared. (#68656)
Nathan Ricci [Sun, 1 May 2022 02:52:05 +0000 (22:52 -0400)]
[MONO] Refactored code into marshal-ilgen and marshal-shared. (#68656)

Refactored marshal code into marshal-ilgen and marshal-shared.

2 years agoFix the TypeConverter when enabling UseSystemResourceKeys (#68687)
Tarek Mahmoud Sayed [Sat, 30 Apr 2022 18:29:51 +0000 (11:29 -0700)]
Fix the TypeConverter when enabling UseSystemResourceKeys (#68687)

* Fix TypeConverter when enabling UseSystemResourceKeys

* Address the feedback

* Keep original behavior and enable running the added test with UseSystemResourceKeys on

2 years agoRemove `Helpers.GenerateRandom`
Theodore Tsirpanis [Sat, 30 Apr 2022 17:23:56 +0000 (20:23 +0300)]
Remove `Helpers.GenerateRandom`

It is identical to `RandomNumberGenerator.GetBytes`.

2 years agoAdd support for LLVM 14.x (#68719)
Zoltan Varga [Sat, 30 Apr 2022 16:06:08 +0000 (12:06 -0400)]
Add support for LLVM 14.x (#68719)

* [mono][jit] Remove AdvSimd.ReverseElementBits () intrinsics, there is no corresponding managed method.

* [mono][llvm] Add support for LLVM 14.x.

* Remove unused AARCH64_ADV_SIMD_RBIT intrinsic.

* Add back ReverseElementBits intrinsic.

2 years agoFixing API compat issues between ref/src for attributes on properties (#68432)
Eric StJohn [Sat, 30 Apr 2022 14:29:14 +0000 (07:29 -0700)]
Fixing API compat issues between ref/src for attributes on properties (#68432)

* Fixing API compat issues between ref/src for attributes on properties

* Fix some build breaks due to obsoleted API

* Fix remaining attribute inconsistencies

* Update API compat baselines for the shared framework.

* Temporarily suppress ApiCompat baseline validation

This will allow us to ensure the codebase is ready to ingest the arcade
fix to ApiCompat.

* Fix usage of obsolete API in Data.Common tests

2 years agoRelax argument checks on pinned GCHandles (#68694)
Jan Kotas [Sat, 30 Apr 2022 07:46:32 +0000 (00:46 -0700)]
Relax argument checks on pinned GCHandles (#68694)

Relax argument checks on pinned GCHandles to allow any objects without references for consistency with DisableRuntimeMarshalling.

Fixes #68686

* More tests

Co-authored-by: Aaron Robinson <arobins@microsoft.com>
Co-authored-by: Aleksey Kliger (λgeek) <akliger@gmail.com>
2 years agoEnsure the generic math APIs are publicly exposed on nint/nuint where relevant (...
Tanner Gooding [Fri, 29 Apr 2022 23:03:27 +0000 (16:03 -0700)]
Ensure the generic math APIs are publicly exposed on nint/nuint where relevant (#68693)

2 years agoFix declaration hiding in host (#68684)
Elinor Fung [Fri, 29 Apr 2022 19:06:31 +0000 (12:06 -0700)]
Fix declaration hiding in host (#68684)

2 years agoAllow empty directory values in FileSystemEventArgs/RenamedEventArgs ctors (#68582)
Jeff Handley [Fri, 29 Apr 2022 17:58:45 +0000 (10:58 -0700)]
Allow empty directory values in FileSystemEventArgs/RenamedEventArgs ctors (#68582)

* Allow empty directory values in FileSystemEventArgs/RenamedEventArgs ctors

* Apply PR feedback for simpler implementation, and allow whitespace

* Apply PR feedback

2 years agoEnsure the Equals instance method for the various vector types is correct (#68691)
Tanner Gooding [Fri, 29 Apr 2022 17:53:48 +0000 (10:53 -0700)]
Ensure the Equals instance method for the various vector types is correct (#68691)

* Adding basic tests validating NaN.Equals(NaN) returns true for various vector types

* Updating the various vector APIs to use .NET compliant equality for the Equals method

* Fixing the Plane and Quaternion GetHashCode tests

* Removing JIT intrinsic support for the Equals instance method

* Accelerating the Equals instance method for the various vector types

2 years agoHoist the nullchecks for 'this' object (#68588)
Kunal Pathak [Fri, 29 Apr 2022 17:46:29 +0000 (10:46 -0700)]
Hoist the nullchecks for 'this' object (#68588)

* CSE nullcheck involving 'this'

* Move the nullcheck to hoistable only

* Minor fix to display IG01 weight correctly

* Hoist nullcheck for other objects as well

2 years agoFixing firefox implementation to avoid this warning: "Addind an id that already exist...
Thays Grazia [Fri, 29 Apr 2022 17:41:45 +0000 (14:41 -0300)]
Fixing firefox implementation to avoid this warning: "Addind an id that already exists in commands_received" (#68618)

2 years agoEnsure decimal.TryWriteSignificandLittleEndian correctly takes endianness into accoun...
Tanner Gooding [Fri, 29 Apr 2022 17:18:09 +0000 (10:18 -0700)]
Ensure decimal.TryWriteSignificandLittleEndian correctly takes endianness into account (#68599)

2 years agoFix is_emulating_x64 on Windows (#68671)
Elinor Fung [Fri, 29 Apr 2022 16:31:11 +0000 (09:31 -0700)]
Fix is_emulating_x64 on Windows (#68671)

2 years agoBuildID parameter correction (#68681)
Juan Hoyos [Fri, 29 Apr 2022 15:20:23 +0000 (08:20 -0700)]
BuildID parameter correction (#68681)

* Correct parameter itemgroup, scope of the flag, and flag value.

2 years agoFix build and analyzer errors in amd64 table gen (#68697)
Adeel Mujahid [Fri, 29 Apr 2022 14:44:30 +0000 (17:44 +0300)]
Fix build and analyzer errors in amd64 table gen (#68697)

2 years agoFix JsonStringEnumConverter bug concerning handling of negative values in changing...
Eirik Tsarpalis [Fri, 29 Apr 2022 11:17:00 +0000 (14:17 +0300)]
Fix JsonStringEnumConverter bug concerning handling of negative values in changing cultures (#68663)

2 years agoFile.ReadLinesAsync() (#66492)
LateApexEarlySpeed [Fri, 29 Apr 2022 09:50:04 +0000 (17:50 +0800)]
File.ReadLinesAsync() (#66492)

#fixes  #2214

2 years agoLocalized file check-in by OneLocBuild Task: Build definition ID 679: Build ID 174302...
dotnet bot [Fri, 29 Apr 2022 08:32:46 +0000 (01:32 -0700)]
Localized file check-in by OneLocBuild Task: Build definition ID 679: Build ID 1743026 (#68680)

2 years ago[wasm] Migrate rest of the JS interop functions to out params (#68642)
Marek Fišera [Fri, 29 Apr 2022 08:24:27 +0000 (10:24 +0200)]
[wasm] Migrate rest of the JS interop functions to out params (#68642)

Migrate rest of the JS interop functions to out params instead of return.
A follow up on the https://github.com/dotnet/runtime/pull/65994.
- `mono_wasm_invoke_js_with_args`
- `mono_wasm_cancel_promise`
- `mono_wasm_compile_function`

2 years ago[mono][llvm] More LLVM refactoring to support LLVM 14.x. (#68426)
Zoltan Varga [Fri, 29 Apr 2022 04:58:09 +0000 (00:58 -0400)]
[mono][llvm] More LLVM refactoring to support LLVM 14.x. (#68426)

* [mono][llvm] More LLVM refactoring to support LLVM 14.x.

Use LLVMBuildGEP2 () instead of LLVMBuildGEP () since the latter is
obsolate and it was removed in LLVM 14.

* [mono][llvm] Use LLVMBuildLoad2 () instead of LLVMBuildLoad ().

* Change ctx->addresses to contain Address* so users can access
the type of the pointer.

2 years agoAdd initial impl of PartitionedRateLimiter.Create (#67677)
Brennan [Fri, 29 Apr 2022 03:21:57 +0000 (20:21 -0700)]
Add initial impl of PartitionedRateLimiter.Create (#67677)

2 years agoEnsure TestHandleCollector has enough memory pressure to trigger (#68652)
Aaron Robinson [Fri, 29 Apr 2022 00:06:17 +0000 (20:06 -0400)]
Ensure TestHandleCollector has enough memory pressure to trigger (#68652)

* Ensure TestHandleCollector has enough memory pressure to trigger

2 years agoCondition S.S.Cryptography tests on SHA1 signature support
Kevin Jones [Thu, 28 Apr 2022 23:23:40 +0000 (19:23 -0400)]
Condition S.S.Cryptography tests on SHA1 signature support

2 years agoAvoid Path.Join(string, ...) allocations for null/empty inputs (#68662)
Stephen Toub [Thu, 28 Apr 2022 21:51:38 +0000 (17:51 -0400)]
Avoid Path.Join(string, ...) allocations for null/empty inputs (#68662)

2 years agoAdd RL non-generic fixed window, sliding window implementations (#68087)
Shreya Verma [Thu, 28 Apr 2022 21:47:44 +0000 (14:47 -0700)]
Add RL non-generic fixed window, sliding window implementations (#68087)

2 years agoFix Typo in Manual Console Testing (#68672)
Nicholas Orlowsky [Thu, 28 Apr 2022 20:51:03 +0000 (15:51 -0500)]
Fix Typo in Manual Console Testing (#68672)

2 years agoRevert "Set SocketsHttpHandler's default connect timeout to 15s (#66607)" (#68649)
Natalia Kondratyeva [Thu, 28 Apr 2022 20:43:49 +0000 (22:43 +0200)]
Revert "Set SocketsHttpHandler's default connect timeout to 15s (#66607)" (#68649)

This reverts commit 436b97cc809a3db1d1a25faedbc64aa97875bae3.

2 years agoUse file-scoped namespaces (#68295)
Jonathan [Thu, 28 Apr 2022 20:35:59 +0000 (22:35 +0200)]
Use file-scoped namespaces (#68295)

Use modern file-scoped namespaces instead of legacy namespaces

2 years agoFixing some bad inheritdoc comments (#68664)
Tanner Gooding [Thu, 28 Apr 2022 19:34:39 +0000 (12:34 -0700)]
Fixing some bad inheritdoc comments (#68664)

2 years agoRemoved TempFile and TempDirectory from FileSystemWatcher Tests (#68444)
Danyy427 [Thu, 28 Apr 2022 19:23:46 +0000 (22:23 +0300)]
Removed TempFile and TempDirectory from FileSystemWatcher Tests (#68444)

* Removed TempFile and TempDirectory from FileSystemWatcher Tests

* Added missing CreateDirectory

* Removed redundant variables

* removed redundant variable

Co-authored-by: Dan Moseley <danmose@microsoft.com>
* removed redundant variable

Co-authored-by: Dan Moseley <danmose@microsoft.com>
* removed redundant variable

Co-authored-by: Dan Moseley <danmose@microsoft.com>
* Fixed directory name

* Reverted changes

* Simplified

* made local tests

* substituted methods

* fix

Co-authored-by: Dan Moseley <danmose@microsoft.com>
* Update src/libraries/Common/tests/TestUtilities/System/IO/FileCleanupTestBase.cs

spacing

Co-authored-by: Dan Moseley <danmose@microsoft.com>
* spacing

Co-authored-by: Dan Moseley <danmose@microsoft.com>
* remove redundant file creation

Co-authored-by: Dan Moseley <danmose@microsoft.com>
* fixes

* fix

* applied suggestions, removed redundant variables

* spacing

* Fix casing bug

Co-authored-by: Dan Moseley <danmose@microsoft.com>
2 years agoRemove gtSetCallArgsOrder quirk (#68621)
Jakob Botsch Nielsen [Thu, 28 Apr 2022 19:18:52 +0000 (21:18 +0200)]
Remove gtSetCallArgsOrder quirk (#68621)

This quirk was added during the call args refactoring because the 'this'
argument had special handling before that.

2 years agoFix interop source generator error message to match the approved API surface (#68635)
Jan Kotas [Thu, 28 Apr 2022 19:09:23 +0000 (12:09 -0700)]
Fix interop source generator error message to match the approved API surface (#68635)

* Fix interop source generator error message to match the approved API surface

* Auto-update of localization files

2 years agoRemove the BBSweep header and uses (#68643)
Aaron Robinson [Thu, 28 Apr 2022 18:49:18 +0000 (14:49 -0400)]
Remove the BBSweep header and uses (#68643)

2 years agoUse SYSLIB prefix for all LibraryImportGenerator diagnostics (#68613)
Elinor Fung [Thu, 28 Apr 2022 16:25:37 +0000 (09:25 -0700)]
Use SYSLIB prefix for all LibraryImportGenerator diagnostics (#68613)

2 years agoCheck if the page is already loaded before connect and start debugging. (#68620)
Thays Grazia [Thu, 28 Apr 2022 15:41:17 +0000 (12:41 -0300)]
Check if the page is already loaded before connect and start debugging. (#68620)

2 years agoLock EnsureConfigured to prevent initialization issues in JsonTypeInfo (#68605)
Krzysztof Wicher [Thu, 28 Apr 2022 14:27:30 +0000 (16:27 +0200)]
Lock EnsureConfigured to prevent initialization issues in JsonTypeInfo (#68605)

* Lock EnsureConfigured to prevent initialization issues in JsonTypeInfo

* do not use this for lock, ensure we call Configure from lock

2 years ago[wasm] print full json results of bench sample (#68594)
Radek Doulik [Thu, 28 Apr 2022 13:57:52 +0000 (15:57 +0200)]
[wasm] print full json results of bench sample (#68594)

For console version with -j option

2 years agoPass build id to clang on Unix for NativeAOT (#68638)
Andy Gocke [Thu, 28 Apr 2022 13:51:30 +0000 (06:51 -0700)]
Pass build id to clang on Unix for NativeAOT (#68638)

2 years agoMaui Blazor Hybrid Android Performance Profiling (#68628)
Tanay Parikh [Thu, 28 Apr 2022 13:29:44 +0000 (06:29 -0700)]
Maui Blazor Hybrid Android Performance Profiling (#68628)

* [MAUI][Blazor][PERF] Add APK file usage for Android Maui Blazor SOD

* Update android_scenarios.proj

* Call ReportFullyDrawn

* Add  --use-fully-drawn-time --fully-drawn-extra-delay

* Add System.Console.WriteLine for non-android platforms

* Add 6 second delay

* Missing `;`

* Add back Directory.Build.{props, targets}

(cherry picked from commit 28d9ef3ab4ac53b947dd435e6494428238b4dea5)

* Fixes based on CI 1729796

https://dev.azure.com/dnceng/internal/_build/results?buildId=1729796&view=logs&j=4d93e3ae-0b8e-5532-bed2-af5c8a7c58d3&t=b13dec14-3eb2-5f1a-4501-8a9fdadb0e3a
(cherry picked from commit d470655576d3abe6a6fec478c221c4d9de698ba9)

* [REVERT THIS] Temporarily skip other jobs

(cherry picked from commit df51582df9e7bb9d1ca82759d664823c76823c29)

* Revert "[REVERT THIS] Temporarily skip other jobs"

This reverts commit 54fa30d876e2be0fef82883033d8fb027de2a150.

2 years agoMinimize the build graph by deleting unnecessary references (#68603)
Viktor Hofer [Thu, 28 Apr 2022 13:04:26 +0000 (15:04 +0200)]
Minimize the build graph by deleting unnecessary references (#68603)

* Minimize the build graph by deleting references

Minimizing projects' dependency graph. There are tons of unnecessary
Reference and ProjectReference items which aren't required anymore as
the referenced projects became full facade assemblies. Removing those
from a leaf's graph makes the graph smaller and therefore the project's
evaluation and build faster.

* Update src/libraries/System.Net.Quic/ref/System.Net.Quic.csproj

Co-authored-by: Jeremy Barton <jbarton@microsoft.com>
* Update Versions.props

Co-authored-by: Jeremy Barton <jbarton@microsoft.com>
2 years agoRemove GTF_LATE_ARG (#68617)
Jakob Botsch Nielsen [Thu, 28 Apr 2022 11:27:48 +0000 (13:27 +0200)]
Remove GTF_LATE_ARG (#68617)

This serves no purpose anymore after the call args refactoring and
removing stores as call operands in LIR.

2 years agoDelete `CLS_VAR` (#68524)
SingleAccretion [Thu, 28 Apr 2022 09:06:29 +0000 (12:06 +0300)]
Delete `CLS_VAR` (#68524)

* Do not add casts on top of CLS_VAR

ApplySelectorsTypeCheck already adds the cast in case it
is necessary, and VN does support small-typed operands.

* Stop generating CLS_VAR

* Delete CLS_VAR

2 years agoAlways set IND_NONFAULTING for not-null addresses (#68518)
SingleAccretion [Thu, 28 Apr 2022 08:59:54 +0000 (11:59 +0300)]
Always set IND_NONFAULTING for not-null addresses (#68518)

The previous code didn't do that in case the address had an
EXCEPT side effect, but that is a needless pessimization.

2 years agoJIT: fix bad arm64 move peephole (#68631)
Andy Ayers [Thu, 28 Apr 2022 05:28:55 +0000 (22:28 -0700)]
JIT: fix bad arm64 move peephole (#68631)

`IF_DR_2G` `(mov sp/reg, reg/sp)` has an implicit reg2, so an unwary peephole opt
might mistakenly think it is `mov reg, x0`. If the opt is unlucky and the next
instruction is a real `mov reg, x0` the peephole opt might suppress the second
instruction, leaving the wrong value in `reg`.

Fix is to just disallow `IF_DR_2G` in the peephole.

Fixes #68527.

2 years ago[main] Update dependencies from dotnet/linker (#68547)
dotnet-maestro[bot] [Thu, 28 Apr 2022 04:01:15 +0000 (21:01 -0700)]
[main] Update dependencies from dotnet/linker (#68547)

* Update dependencies from https://github.com/dotnet/linker build 20220426.3

Microsoft.NET.ILLink.Tasks
 From Version 7.0.100-1.22222.1 -> To Version 7.0.100-1.22226.3

* Remove dead code type that generates analyzer warning

2 years agoUpdate AOT toolchain target to NetCoreAppToolCurrent (#68606)
Jan Kotas [Thu, 28 Apr 2022 01:07:28 +0000 (18:07 -0700)]
Update AOT toolchain target to NetCoreAppToolCurrent (#68606)

Co-authored-by: Viktor Hofer <viktor.hofer@microsoft.com>
Co-authored-by: Adeel Mujahid <3840695+am11@users.noreply.github.com>
2 years agoDelete .NET Framework ildasm headers from test sources (#68614)
Jan Kotas [Thu, 28 Apr 2022 00:51:48 +0000 (17:51 -0700)]
Delete .NET Framework ildasm headers from test sources (#68614)

2 years agocrossgen2: Add --imagebase option (#65567)
t-mustafin [Wed, 27 Apr 2022 22:48:12 +0000 (01:48 +0300)]
crossgen2: Add --imagebase option (#65567)

--imagebase option set preferable ImageBase field to output PE-file

2 years agoUpdate the ILAsm and SDK packages to support the new keyword. (#68598)
Aaron Robinson [Wed, 27 Apr 2022 22:25:13 +0000 (18:25 -0400)]
Update the ILAsm and SDK packages to support the new keyword. (#68598)

2 years agofix stuck when trying to kill process (#68573)
Thays Grazia [Wed, 27 Apr 2022 21:29:26 +0000 (18:29 -0300)]
fix stuck when trying to kill process (#68573)

2 years agoRework unloadability fix (#68550)
Jan Vorlicek [Wed, 27 Apr 2022 19:55:22 +0000 (21:55 +0200)]
Rework unloadability fix (#68550)

* Rework the unloadability fix

The recent fix had a problem when GC collected the managed Assembly
loaded via the Load override or the Resolving event before we added the
reference between the related native LoaderAllocators. The managed
LoaderAllocator of the ALC we've loaded the Assembly into was collected
and we couldn't create the managed Type objects for the interfaces from
that assembly in the GetInterfaces call on a type that implemented
those.

This change fixes it by moving the creation of reference between the
native LoaderAllocators to the RuntimeInvokeHostAssemblyResolver where
we still have a live managed reference to the loaded Assembly.

* Move clearing of the m_pAssemblyLoaderAllocator to a later stage

* Throw exception on collectible assembly in non-collectible ALC

* Update the ResolvedFromDifferentContext test

Make it test that we throw an exception when the parent ALC is not
collectible.

2 years agoskip the test when dotnet.exe is locked (#66196)
Adam Sitnik [Wed, 27 Apr 2022 19:51:06 +0000 (21:51 +0200)]
skip the test when dotnet.exe is locked (#66196)

* when dotnet.exe is locked, wait a little bit and try few more times

* just skip this test when it's impossible to start dotnet.exe

* grant access to the working directory as well (hopefully to avoid access denied)

* handle lack of working directory specified in explicit way

2 years agoRemove stores as operands of calls in LIR (#68460)
Jakob Botsch Nielsen [Wed, 27 Apr 2022 19:38:44 +0000 (21:38 +0200)]
Remove stores as operands of calls in LIR (#68460)

These are part of operands in HIR simply for ordering purposes, which is
no longer necessary in LIR. This means that every argument operand in
LIR now has exactly one node, which between rationalization and lowering
is always a value.

We still have cases of operands that are non-values, in particular the
operand of GT_JTRUE nodes and also GT_PUTARG_STK nodes after lowering.
However, at least for calls the LIR invariant is now simpler: before
lowering all argument operands are values, and after all argument
operands are GT_PUTARG_* nodes.

Not having stores as operands will also allow us to get rid of
GTF_LATE_ARG in a follow-up change.

2 years agoClean up NonBacktracking doubly-linked changes (#68514)
Stephen Toub [Wed, 27 Apr 2022 18:30:37 +0000 (14:30 -0400)]
Clean up NonBacktracking doubly-linked changes (#68514)

2 years agoClose the xml quote in markdown (#68609)
Andrew Au [Wed, 27 Apr 2022 18:13:05 +0000 (11:13 -0700)]
Close the xml quote in markdown (#68609)

2 years agoFix linux-x86 compilation for clr.alljits subset (#68046)
ta264 [Wed, 27 Apr 2022 15:50:47 +0000 (16:50 +0100)]
Fix linux-x86 compilation for clr.alljits subset (#68046)

2 years agoClean-up CacheEntry (#59110)
Pent Ploompuu [Wed, 27 Apr 2022 15:44:51 +0000 (18:44 +0300)]
Clean-up CacheEntry (#59110)

2 years agoFix Missing Metadata for ThreadPool Event (#67150)
John Salem [Wed, 27 Apr 2022 15:39:21 +0000 (08:39 -0700)]
Fix Missing Metadata for ThreadPool Event (#67150)

2 years agoCopy the SSA name when cloning locals (#68482)
SingleAccretion [Wed, 27 Apr 2022 15:37:14 +0000 (18:37 +0300)]
Copy the SSA name when cloning locals (#68482)

* Copy SSA names when cloning in-SSA locals

Assert that we're only doing so for uses -- cloning defs was and still is not supported.

* Add a test

* Undo the LCL_VAR_ADDR addition

It is simply not correct, "gtNewLclvNode" only produces "LCL_VAR"s...

2 years agoJIT: add standard range enable for register stress (#68574)
Andy Ayers [Wed, 27 Apr 2022 15:32:22 +0000 (08:32 -0700)]
JIT: add standard range enable for register stress (#68574)

Add `COMPlus_JitStressRegsRange` to specify a subset of methods that should be
subjected to register stress. The range is the standard method hash range,
for example:

```
COMPlus_JitStressRegsRange=FD400000-FD4FFFFF
```

Remove the older non-standard bits that did something similar, along with the
version based on method number, which tends to be less useful with modern tests like
libraries tests where jit order is never fully deterministic.

2 years agoReduce leaked test files (#68522)
Dan Moseley [Wed, 27 Apr 2022 15:29:37 +0000 (09:29 -0600)]
Reduce leaked test files (#68522)

* add line num

* Remove RO attrib

* Dispose test file

* Cleanup readonly files

* Add more path entropy

* Add # prefix

* Robustify test against random paths

* Cleanup after Directory_Delete_str_bool

* Some more lingering

* Add IsUnixAndElevated and update tests to use conditionals

* Rename Elevated to SuperUser in Unix context

* typo

* Linux failures

* Fix net4.8 build

* Fix S.T.O leak

* Fix TWTL leak

* Set directories to writeable too

* naming

* comment

* comment

* Fix netfx failure

Co-authored-by: Tarun <gtarun047@gmail.com>
2 years agoFix VS complaining about missing projects in slns (continued) (#68543)
Viktor Hofer [Wed, 27 Apr 2022 15:27:56 +0000 (17:27 +0200)]
Fix VS complaining about missing projects in slns (continued) (#68543)

* Infra clean-up to simplify auto references

* Ref project file updates

* Src project file updates

* Test project file updates

2 years agoAdd ValueTask pooling in more places (#68457)
David Fowler [Wed, 27 Apr 2022 14:48:42 +0000 (07:48 -0700)]
Add ValueTask pooling in more places (#68457)

- Use ValueTask pooling on StreamPipeReader.ReadAsync and ReadAtLeastAsync and StreamPipeWriter.FlushAsync

2 years agoVectorized MemoryExtensions.CommonPrefixLength (#68210)
Günther Foidl [Wed, 27 Apr 2022 14:01:13 +0000 (16:01 +0200)]
Vectorized MemoryExtensions.CommonPrefixLength (#68210)

* Vectorized MemoryExtensions.CommonPrefixLength

* Tests

* Addressed feedback

* Update src/libraries/System.Private.CoreLib/src/System/SpanHelpers.Byte.cs

Co-authored-by: Tanner Gooding <tagoo@outlook.com>
Co-authored-by: Tanner Gooding <tagoo@outlook.com>
2 years ago[wasm][debugger] Rebind invalid breakpoints after receiving an update in that source...
Thays Grazia [Wed, 27 Apr 2022 13:24:17 +0000 (10:24 -0300)]
[wasm][debugger] Rebind invalid breakpoints after receiving an update in that source file (#64462)

* Addressing what was discussed with @lewing offline.

* Addressing comments from code review and fixing merge.

* Fix merge

* Fixing merge

* Fix merge

2 years ago[wasm] Fix linux/arm64 build (#68492)
Radek Doulik [Wed, 27 Apr 2022 12:55:35 +0000 (14:55 +0200)]
[wasm] Fix linux/arm64 build (#68492)

Don't checkout particular emscripten version and instead use main.

It is not needed and fixes linux/arm64 build, where precompiled version
is available in emscripten 3.1.7 and later versions.
The `emsdk install|activate <version>` doesn't work correctly for 3.1.7
tag and does with uptodate main.

It will still install and activate the emscripten version we want, like 3.1.7 currently.

2 years agoAsynchronous opening of QuicStreams (#67859)
Radek Zikmund [Wed, 27 Apr 2022 10:57:28 +0000 (03:57 -0700)]
Asynchronous opening of QuicStreams (#67859)

* Early draft of Open(Uni|Bidi)rectionalStreamAsync

* Improve exception handling

* Remove non-Async versions

* fixup! Improve exception handling

* Add tests

* fixup! Remove non-Async versions

* handle connection abort

* Minor change

* Fix build

* Code review feedback

* Remove WaitForAvailable* methods

* fixup! Remove WaitForAvailable* methods

* Remove CreateOuboundAsync static method

* Remove StartStatus

* Code review changes

* More code review changes

* Fix build

* Fix data race on locally closing the connection

* Code review feedback

* Remove PInvoke for reporting telemetry

* Minor fixes

* fixup! Minor fixes

* Regenerate ref source

* Fix exception type in test

2 years agoHandle concurrent reads and concurrent writes on MsQuicStream (#67329)
Radek Zikmund [Wed, 27 Apr 2022 08:46:50 +0000 (01:46 -0700)]
Handle concurrent reads and concurrent writes on MsQuicStream (#67329)

* Throw on concurrent operations

* Remove redundant test

* Move _state.SendState access under a lock

* Fix data race on ReceiveResettableCompletionSource

* Remove unnecessary override

* Move task completion outside of the lock

* Fix failing tests

* Update comments

* Add missing case

* fixup! Add missing case

2 years agoLocalized file check-in by OneLocBuild Task: Build definition ID 679: Build ID 173955...
dotnet bot [Wed, 27 Apr 2022 08:40:03 +0000 (01:40 -0700)]
Localized file check-in by OneLocBuild Task: Build definition ID 679: Build ID 1739550 (#68575)

2 years agoJIT ARM32: Fix wrong emitAttr passed for loads/stores in PUTARG_STK (#68540)
Jakob Botsch Nielsen [Wed, 27 Apr 2022 08:31:37 +0000 (10:31 +0200)]
JIT ARM32: Fix wrong emitAttr passed for loads/stores in PUTARG_STK (#68540)

On arm architectures the small load/store instructions all work larger
registers and for loads the instruction automatically normalizes the
result. Due to this we always expect to pass the normalized size for
loads/stores when generating these instructions, but in this particular
place we did not do so, resulting in asserts on arm32.

On arm64 the function ignores the size so nothing happens.

Fix #60827

2 years agoRemove an unnecessary assertion in tiering (#68577)
Koundinya Veluri [Wed, 27 Apr 2022 03:44:09 +0000 (20:44 -0700)]
Remove an unnecessary assertion in tiering (#68577)

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

2 years ago[wasm-mt] fix build config logic error, and pthread_getschedparam initialization...
Aleksey Kliger (λgeek) [Wed, 27 Apr 2022 03:43:09 +0000 (23:43 -0400)]
[wasm-mt] fix build config logic error, and pthread_getschedparam initialization (#68563)

* follow code style

* [threads] initialize pthreads_getschedparam policy

   On Emscripten, pthreads_getschedparam doesn't write to its output variables, so set them to good initial values

* [wasm-mt] fix logic error in wasm.proj / CMakeLists.txt

The wasm CMakeLists.txt defaults DISABLE_THREADS to ON, so instead set it to _off_ when MonoWasmThreads is true, and leave it at the default value (ie off) otherwise.