platform/upstream/dotnet/runtime.git
16 months agoupdate alpine test images (#82931)
Tomas Weinfurt [Fri, 10 Mar 2023 19:10:57 +0000 (11:10 -0800)]
update alpine test images (#82931)

* update alpine test images

* tests

16 months agoSupport sites with invalid IDN in SslStream (#82934)
Tomas Weinfurt [Fri, 10 Mar 2023 19:00:18 +0000 (11:00 -0800)]
Support sites with invalid IDN in SslStream (#82934)

* initial test

* 'update'

* feedback from review

* android

16 months agoUpdate the Roslyn version our ref-pack generators reference to 4.5.0 (#83238)
Jeremy Koritzinsky [Fri, 10 Mar 2023 18:45:02 +0000 (10:45 -0800)]
Update the Roslyn version our ref-pack generators reference to 4.5.0 (#83238)

16 months agoUpdate dependencies from https://github.com/dotnet/roslyn build 20230310.1 (#83264)
dotnet-maestro[bot] [Fri, 10 Mar 2023 16:50:16 +0000 (10:50 -0600)]
Update dependencies from https://github.com/dotnet/roslyn build 20230310.1 (#83264)

Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
 From Version 4.6.0-3.23159.1 -> To Version 4.6.0-3.23160.1

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
16 months ago[wasm] Introduce jiterpreter control flow pass (#83247)
Katelyn Gadd [Fri, 10 Mar 2023 16:14:40 +0000 (08:14 -0800)]
[wasm] Introduce jiterpreter control flow pass (#83247)

* Checkpoint CFG

Generate fallthrough in CFG

Generate branch block header partially in cfg

Emit branches in CFG

Checkpoint: Emit loop and exit return in CFG (broken)

Fix CFG emitting function header in the wrong place

Improve accuracy of cfg size estimation

Remove log messages

Checkpoint: Forward branches partially working

Fix non-conditional branches not being added to target table
Remove fallthrough

* Implement backward branches via a dispatch table

* Cleanup

* Cleanup

* Remove use of DataView since it has a hazard around heap growth
Use copyWithin to implement appendBytes where possible
More accurate overhead calculation

16 months agoUpdate dependencies from https://github.com/dotnet/arcade build 20230309.1 (#83261)
dotnet-maestro[bot] [Fri, 10 Mar 2023 15:59:15 +0000 (09:59 -0600)]
Update dependencies from https://github.com/dotnet/arcade build 20230309.1 (#83261)

Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Build.Tasks.Archives , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Build.Tasks.Installers , Microsoft.DotNet.Build.Tasks.Packaging , Microsoft.DotNet.Build.Tasks.TargetFramework , Microsoft.DotNet.Build.Tasks.Templating , Microsoft.DotNet.Build.Tasks.Workloads , Microsoft.DotNet.CodeAnalysis , Microsoft.DotNet.GenAPI , Microsoft.DotNet.GenFacades , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.PackageTesting , Microsoft.DotNet.RemoteExecutor , Microsoft.DotNet.SharedFramework.Sdk , Microsoft.DotNet.VersionTools.Tasks , Microsoft.DotNet.XUnitConsoleRunner , Microsoft.DotNet.XUnitExtensions
 From Version 8.0.0-beta.23156.4 -> To Version 8.0.0-beta.23159.1

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
16 months agoMassively simplify getBaseJitTypeAndSizeOfSIMDType and the general SIMD handle cachin...
Tanner Gooding [Fri, 10 Mar 2023 15:06:49 +0000 (07:06 -0800)]
Massively simplify getBaseJitTypeAndSizeOfSIMDType and the general SIMD handle caching/lookup (#83228)

16 months ago[browser] ts code cleanup (#83210)
Pavel Savara [Fri, 10 Mar 2023 11:41:11 +0000 (12:41 +0100)]
[browser] ts code cleanup (#83210)

16 months agoFix path for packing (#83017)
Andrii Kurdiumov [Fri, 10 Mar 2023 11:38:02 +0000 (17:38 +0600)]
Fix path for packing (#83017)

* Fix path for packing

* Apply PR feedback

* Update docs/workflow/building/libraries/README.md

Co-authored-by: Adeel Mujahid <3840695+am11@users.noreply.github.com>
* Update docs/workflow/building/libraries/README.md

Co-authored-by: Adeel Mujahid <3840695+am11@users.noreply.github.com>
---------

Co-authored-by: Viktor Hofer <viktor.hofer@microsoft.com>
Co-authored-by: Adeel Mujahid <3840695+am11@users.noreply.github.com>
16 months ago[mono][jit] Optimized loading imm on arm64. (#83204)
Jan Dupej [Fri, 10 Mar 2023 10:00:23 +0000 (11:00 +0100)]
[mono][jit] Optimized loading imm on arm64. (#83204)

* [mono][jit] Optimized loading certain 32- and 64-bit immediates on arm64.

* [mono][jit] Loading small negative imm32 optimized on arm64.

16 months agoImplements correct handling of RequiresAssemblyFiles on properties and events (#83195)
Vitek Karas [Fri, 10 Mar 2023 09:50:30 +0000 (01:50 -0800)]
Implements correct handling of RequiresAssemblyFiles on properties and events (#83195)

The `RequiresAssemblyFiles` attribute can be present on property or event (in which case it applies to all accessors). The analyzer already handles this case, but the NativeAOT compiler didn't. This change implements the correct behavior in NativeAOT as well.

The implementation actually handles all Requires attributes this way now, but the other two are not allowed on properties or event (yet).

Had to add an optimization to the `GetPropertyForAccessor`/`GetEventForAccessor` as these are now called very frequently and they can be really slow.

Implements a new behavior with regard to IL3003 as described in the comment in the code as well as: #83235

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

16 months agoImplement native container types used by shared EventPipe code. (#78852)
Johan Lorensson [Fri, 10 Mar 2023 08:23:08 +0000 (09:23 +0100)]
Implement native container types used by shared EventPipe code. (#78852)

* Implement native container types used by shared EventPipe code.

Use eglib's list, slist, array, ptr_array, queue, hash table as a starting point creating a new set of native container types shared between native runtime components like EventPipe.

EventPipe shim container API used a STL like API, new container types follows STL style container API and match STL type names:

vector
forward list
list
queue
unordered map

Native container types are still included in runtime build artifacts (through EventPipe cmake files), this can be changed/done differently depending on how each runtime would like to build/use the source files. In order to make that intent more clear, container and EventPipe cmake files have been renamed to not use CMakeList.txt, but .cmake.

A number of new native tests for added container types have been added into EventPipe native test runner.

16 months agoChange logic around GC.Collect in objwriter (#83249)
Michal Strehovský [Fri, 10 Mar 2023 05:41:36 +0000 (14:41 +0900)]
Change logic around GC.Collect in objwriter (#83249)

16 months agoVectorize ProbabilisticMap.IndexOfAny (#80963)
Miha Zupan [Fri, 10 Mar 2023 04:17:27 +0000 (05:17 +0100)]
Vectorize ProbabilisticMap.IndexOfAny (#80963)

* Vectorize ProbabilisticMap.IndexOfAny on AVX2

* Use ResetLowestSetBit from BitOperations

* Speed up Avx2 and add Vector128 support

* Add Vector{128/256}.LoadUnsafe(ref char) and Vector128.ShuffleUnsafe

* Use Vector128.ShuffleUnsafe in more places

* PR feedback

* Replace another ShiftRightLogical with '>>>'

* Add WASM path to Vector128.ShuffleUnsafe

* PR feedback

16 months ago[workloads] Add more win-arm64 entries in the net6 manifest (#83237)
Steve Pfister [Fri, 10 Mar 2023 00:53:36 +0000 (19:53 -0500)]
[workloads] Add more win-arm64 entries in the net6 manifest (#83237)

Co-authored-by: Steve Pfister <steve.pfister@microsoft.com>
16 months ago[wasm] Flow emsdk using a stable package name instead of one that will break every...
Larry Ewing [Fri, 10 Mar 2023 00:52:16 +0000 (18:52 -0600)]
[wasm] Flow emsdk using a stable package name instead of one that will break every preview (#83208)

* Update dependencies from https://github.com/dotnet/llvm-project build 20230308.1

runtime.linux-arm64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.linux-arm64.Microsoft.NETCore.Runtime.ObjWriter , runtime.linux-musl-arm64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.linux-musl-arm64.Microsoft.NETCore.Runtime.ObjWriter , runtime.linux-musl-x64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.linux-musl-x64.Microsoft.NETCore.Runtime.ObjWriter , runtime.linux-x64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.linux-x64.Microsoft.NETCore.Runtime.ObjWriter , runtime.osx-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.osx-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.osx-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.osx-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.win-arm64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.win-arm64.Microsoft.NETCore.Runtime.ObjWriter , runtime.win-x64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.win-x64.Microsoft.NETCore.Runtime.ObjWriter
 From Version 14.0.0-alpha.1.23156.3 -> To Version 14.0.0-alpha.1.23158.1

* Update dependencies from https://github.com/dotnet/emsdk build 20230308.1

Microsoft.NET.Workload.Emscripten.Current.Manifest-8.0.100-preview.3 , Microsoft.NET.Workload.Emscripten.net6.Manifest-8.0.100-preview.3 , Microsoft.NET.Workload.Emscripten.net7.Manifest-8.0.100-preview.3
 From Version 8.0.0-preview.3.23156.1 -> To Version 8.0.0-preview.3.23158.1

* try flowing a stable name

* fix typo

* Update since _ doesn't get removed in the package name

* Update to new name

---------

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
16 months agoUpdate dependencies from https://github.com/dotnet/roslyn-analyzers build 20230308...
dotnet-maestro[bot] [Fri, 10 Mar 2023 00:49:09 +0000 (18:49 -0600)]
Update dependencies from https://github.com/dotnet/roslyn-analyzers build 20230308.3 (#83198)

Microsoft.CodeAnalysis.Analyzers , Microsoft.CodeAnalysis.NetAnalyzers
 From Version 3.3.5-beta1.23124.1 -> To Version 3.3.5-beta1.23158.3

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
16 months agoUpdate dependencies from https://github.com/dotnet/roslyn build 20230309.1 (#83200)
dotnet-maestro[bot] [Fri, 10 Mar 2023 00:48:31 +0000 (18:48 -0600)]
Update dependencies from https://github.com/dotnet/roslyn build 20230309.1 (#83200)

Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
 From Version 4.6.0-3.23157.14 -> To Version 4.6.0-3.23159.1

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
16 months ago[JIT] ARM64 - Overflow check optimizations for division (#82924)
Will Smith [Fri, 10 Mar 2023 00:42:13 +0000 (16:42 -0800)]
[JIT] ARM64 - Overflow check optimizations for division (#82924)

* Do not emit overflow check for div if we know first operand is a constant that is a not a min value

* Remove redundant branch

* Update codegenarm64.cpp

* Try to use subs, zr, dividendReg, 1 to determine overflow in division

* Cleanup

* Use IsNeverNegative to help not emit overflow checks

* Fix check

* Added helper functions

* Use main node instead of op1 for type check

* Add 64-bit check

* Use cmp instead of subs since it is an alias

* Handle 32-bit arch division for LONG.

* Additional checks

* More cleanup

* More cleanup

* Do not find exception blocks

* Try using flags

* Try using flags

* More checks, more comments

* Update src/coreclr/jit/gentree.cpp

Co-authored-by: SingleAccretion <62474226+SingleAccretion@users.noreply.github.com>
* Flip meaning of check flags. Rename OperExceptions to GetExceptionSetFlags. Use GetExceptionSetFlags to determine to add div-by-zero or overflow blocks for arm64.

* Use GetExceptionSetFlags in arm64 codegen

* Revert name

* Use GTF_DIV_MOD_NO_OVERFLOW_CHK in CanDivOrModPossiblyOverflow

* Fix build

* Rename flags by removing '_CHK'

* Remove break

---------

Co-authored-by: SingleAccretion <62474226+SingleAccretion@users.noreply.github.com>
16 months agoAdd tar tests to confirm entries owned by deleted users can still be read or written...
Carlos Sánchez López [Fri, 10 Mar 2023 00:29:49 +0000 (16:29 -0800)]
Add tar tests to confirm entries owned by deleted users can still be read or written (#83126)

* Add tar tests to confirm entries owned by deleted users can still be read and written.

* Improve Process execution code to avoid potential deadlock.

16 months agoJIT: Disallow 0-sized block ops (#83224)
Jakob Botsch Nielsen [Fri, 10 Mar 2023 00:27:39 +0000 (01:27 +0100)]
JIT: Disallow 0-sized block ops (#83224)

Avoid creating 0-sized block ops in the importer (but keep the side effects of the addresses). Add asserts that we don't create these nodes and get rid of some downstream checks for the case.

Fix #12807

Also merge CEE_INITBLK and CEE_CPBLK importer cases. As part of this fix a bug where we weren't setting GTF_EXCEPT on the destination in the CEE_INITBLK case.

16 months ago[wasm] Fix missing branch target table update (#83236)
Katelyn Gadd [Fri, 10 Mar 2023 00:25:59 +0000 (16:25 -0800)]
[wasm] Fix missing branch target table update (#83236)

The jiterpreter was failing to add unconditional branch targets to the branch target table, which could cause branches targeting them to fail and make the trace bail out.

16 months ago[workloads] Update the workload descriptions (#83223)
Larry Ewing [Fri, 10 Mar 2023 00:25:38 +0000 (18:25 -0600)]
[workloads] Update the workload descriptions (#83223)

* Update the workload description

* Update the path

* Update the description for net6.0

* Add more descriptions

* Add descriptions for the windows runtime packs

* Update WorkloadManifest.en.json

fix review comment

16 months ago[browser] cold start benchmark with download throttling and latency (#83220)
Pavel Savara [Fri, 10 Mar 2023 00:11:42 +0000 (01:11 +0100)]
[browser] cold start benchmark with download throttling and latency (#83220)

* cold start benchmark with download throttling and latency

* make throttling shared on the same session

* sequential

* removed PageShowCold

16 months agoJIT: treat synthesized profile data as pgo data, fix finally weights (#83185)
Andy Ayers [Thu, 9 Mar 2023 23:46:28 +0000 (15:46 -0800)]
JIT: treat synthesized profile data as pgo data, fix finally weights (#83185)

Once synthesis arrives on the scene, we're not going to want phases in the JIT
to arbitrarily modifying block weights. There is already a guard of this sort
for regular profile data, so it makes sense to extend that to synthesized data
as well.

When synthesizing counts, propagate counts to finallies from the associated
trys. This needs to be done carefully as we have make sure not to visit the
finally until the count in the try is set. We rely on some of the properties
of DFS pre and post number bracketing to do this efficiently, without needing
to track extra state.

Contributes to #82964.

16 months agoSwitch to selfhosted NativeAOT compiler (#81205)
Michal Strehovský [Thu, 9 Mar 2023 23:30:30 +0000 (08:30 +0900)]
Switch to selfhosted NativeAOT compiler (#81205)

This will compile the NativeAOT compiler with the LKG build of the NativeAOT compiler that the repo is building with.

At this point NativeAOT-compiled compiler is significantly better than the R2R+Trimmed+SingleFile-compiled combo we're shipping right now.

ilc.exe size before: 31 MB. ilc.exe size after: 14 MB.
Time to compile hello world before: 2.3 seconds. Time to compile hello world after: 1.3 seconds.

16 months agoEnable DwarfDump AOT test in Release (#82862)
Andy Gocke [Thu, 9 Mar 2023 21:45:56 +0000 (13:45 -0800)]
Enable DwarfDump AOT test in Release (#82862)

* Enable DwarfDump AOT test in Release

There are some reports (#82802) that debugging might be particularly bad
in Release.

* Update warning counts for Release

16 months ago[main] Update dependencies from dotnet/llvm-project dotnet/emsdk (#83173)
dotnet-maestro[bot] [Thu, 9 Mar 2023 21:18:02 +0000 (13:18 -0800)]
[main] Update dependencies from dotnet/llvm-project dotnet/emsdk (#83173)

* Update dependencies from https://github.com/dotnet/llvm-project build 20230308.1

runtime.linux-arm64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.linux-arm64.Microsoft.NETCore.Runtime.ObjWriter , runtime.linux-musl-arm64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.linux-musl-arm64.Microsoft.NETCore.Runtime.ObjWriter , runtime.linux-musl-x64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.linux-musl-x64.Microsoft.NETCore.Runtime.ObjWriter , runtime.linux-x64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.linux-x64.Microsoft.NETCore.Runtime.ObjWriter , runtime.osx-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.osx-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.osx-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.osx-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.win-arm64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.win-arm64.Microsoft.NETCore.Runtime.ObjWriter , runtime.win-x64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.win-x64.Microsoft.NETCore.Runtime.ObjWriter
 From Version 14.0.0-alpha.1.23156.3 -> To Version 14.0.0-alpha.1.23158.1

* Update dependencies from https://github.com/dotnet/emsdk build 20230308.1

Microsoft.NET.Workload.Emscripten.Current.Manifest-8.0.100-preview.3 , Microsoft.NET.Workload.Emscripten.net6.Manifest-8.0.100-preview.3 , Microsoft.NET.Workload.Emscripten.net7.Manifest-8.0.100-preview.3
 From Version 8.0.0-preview.3.23156.1 -> To Version 8.0.0-preview.3.23158.1

---------

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
16 months agoJIT: Fix EQ/NE(relop/SETCC, 0) optimization (#83144)
Jakob Botsch Nielsen [Thu, 9 Mar 2023 21:02:43 +0000 (22:02 +0100)]
JIT: Fix EQ/NE(relop/SETCC, 0) optimization (#83144)

Fix #83140

16 months ago[wasm] Add getNN_unaligned memory.ts APIs for potentially unaligned pointers (#83213)
Katelyn Gadd [Thu, 9 Mar 2023 20:37:21 +0000 (12:37 -0800)]
[wasm] Add getNN_unaligned memory.ts APIs for potentially unaligned pointers (#83213)

* Add getNN_unaligned memory.ts APIs for cases where we cannot be certain the source address is aligned
* Remove CU64 typescript APIs since they were unused

16 months agoprovide custom marshaller for USER_INFO_1 (#82350)
Badre BSAILA [Thu, 9 Mar 2023 19:58:23 +0000 (20:58 +0100)]
provide custom marshaller for USER_INFO_1 (#82350)

* provide custom marshaller for USER_INFO_1

16 months ago[workloads] Add win-arm64 to wasm-tools in the net6 manifest (#83162)
Steve Pfister [Thu, 9 Mar 2023 19:36:41 +0000 (14:36 -0500)]
[workloads] Add win-arm64 to wasm-tools in the net6 manifest (#83162)

* [workloads] Add win-arm64 in the net6 manifest

This was added in release/7.0, but not in main.

Fixes https://github.com/dotnet/sdk/issues/30019

* alias the aot compiler for win-arm64

---------

Co-authored-by: Steve Pfister <steve.pfister@microsoft.com>
16 months agoRevert changes (#83196)
Egor Bogatov [Thu, 9 Mar 2023 18:16:37 +0000 (19:16 +0100)]
Revert changes (#83196)

16 months agoSwap order of OnError in FileSystemWatcher.ReadDirectoryChangesCallback on Windows...
Stephen Toub [Thu, 9 Mar 2023 18:01:59 +0000 (13:01 -0500)]
Swap order of OnError in FileSystemWatcher.ReadDirectoryChangesCallback on Windows (#83121)

If the directory watching encounters a failure error code other than abort, the Windows implementation raises the Error event and sets EnableRaisingEvents to false. However, because it does so in that order, the Error event handler may or may not see the FSW's EnableRaisingEvents as false, based on whether there's a SynchronizingObject that results in the callback being queued.  By swapping the order to always disable first, we can ensure consistency regardless of SynchronizingObject, which also means the Error handler can choose based on the error to set EnableRaisingEvents to true again if it desires.

16 months agoRename ManagedVirtualMethodTable and adjust VTable indices (#83158)
Jackson Schuster [Thu, 9 Mar 2023 17:03:02 +0000 (09:03 -0800)]
Rename ManagedVirtualMethodTable and adjust VTable indices (#83158)

16 months ago[iOS] Add gss framework back into sample linker args (#83182)
Steve Pfister [Thu, 9 Mar 2023 16:28:47 +0000 (11:28 -0500)]
[iOS] Add gss framework back into sample linker args (#83182)

https://github.com/dotnet/runtime/pull/81919 introduced a regression where the gss framework was omitted from the sample build. This change adds it back in.

Fixes https://github.com/dotnet/performance/issues/2924

16 months ago[LoongArch64] delete the unused code for comparing. (#83187)
Qiao Pengcheng [Thu, 9 Mar 2023 15:58:44 +0000 (10:58 -0500)]
[LoongArch64] delete the unused code for comparing. (#83187)

16 months agoReplace `SafeLocalAllocHandle` in `System.Diagnostics.PerformanceCounter` (#82456)
xtqqczze [Thu, 9 Mar 2023 13:54:27 +0000 (13:54 +0000)]
Replace `SafeLocalAllocHandle` in `System.Diagnostics.PerformanceCounter` (#82456)

* Replace `SafeLocalAllocHandle` in `Diagnostics.PerformanceCounter`

* Update SharedPerformanceCounter.cs

* Update System.Diagnostics.PerformanceCounter.csproj

16 months agoJIT: Remove TYP_BLK and TYP_LCLBLK (#83036)
Jakob Botsch Nielsen [Thu, 9 Mar 2023 13:09:48 +0000 (14:09 +0100)]
JIT: Remove TYP_BLK and TYP_LCLBLK (#83036)

This PR allows TYP_STRUCT locals to have block layouts and replaces uses
of TYP_BLK and TYP_LCLBLK with such locals instead.

There is still an invariant that any struct parameter local (even SIMD) has a non-block layout.

Also fixes a bug related to GS cookie handle with jit32 GC encoder -- it is
not allowed to be at fp+0, so we need to insert some padding in some cases because
now that some GS cookie-requiring locals are TYP_STRUCT they can sometimes be
removed from the frame.

To fix a TP regression, also precache the 0-sized block layout in the layout table. This
layout is used by all non-x86 compilations because the outgoing arg area starts out
as a 0-sized block local that is always allocated.

16 months agoFix RequiresAccessedThrough tests (#83190)
Vitek Karas [Thu, 9 Mar 2023 12:09:24 +0000 (04:09 -0800)]
Fix RequiresAccessedThrough tests (#83190)

This was caused by interaction between two PRs.
AOT is now expected to warn on all single-file and dynamic code attributes, just like the analyzer.

16 months agoFix handling of required & init-only properties with custom property names in source...
Eirik Tsarpalis [Thu, 9 Mar 2023 11:44:58 +0000 (11:44 +0000)]
Fix handling of required & init-only properties with custom property names in source gen. (#83147)

* Fix handling of required & init-only properties with custom property names in source gen.

* Address feedback.

16 months agoLocalized file check-in by OneLocBuild Task: Build definition ID 679: Build ID 213110...
dotnet bot [Thu, 9 Mar 2023 09:43:16 +0000 (01:43 -0800)]
Localized file check-in by OneLocBuild Task: Build definition ID 679: Build ID 2131103 (#83171)

16 months ago[metadata] make mono_method_get_param_names external only (#83183)
Aleksey Kliger (λgeek) [Thu, 9 Mar 2023 08:36:25 +0000 (03:36 -0500)]
[metadata] make mono_method_get_param_names external only (#83183)

16 months agoTry reducing memory pressure during object writing (#83181)
Michal Strehovský [Thu, 9 Mar 2023 06:13:02 +0000 (15:13 +0900)]
Try reducing memory pressure during object writing (#83181)

16 months agoCall FlushInstructionCache in CFG test (#83168)
Michal Strehovský [Thu, 9 Mar 2023 03:25:21 +0000 (12:25 +0900)]
Call FlushInstructionCache in CFG test (#83168)

Should address https://github.com/dotnet/runtime/pull/82307#discussion_r1111436978.

16 months agoRemove fragile NGen logic for precomputed hashcodes (#82563)
Aaron Robinson [Thu, 9 Mar 2023 02:48:42 +0000 (21:48 -0500)]
Remove fragile NGen logic for precomputed hashcodes (#82563)

* Remove fragile NGen logic for precomputed hashcodes

Hashing was confirmed to offer minor performance wins
but not with lazy hash code generation. Pre hashing was needed
to have a benefit on start-up but even then it was minor.

16 months agoFix PAX extended attribute reading logic to treat '=' character as valid in the value...
Carlos Sánchez López [Thu, 9 Mar 2023 02:25:45 +0000 (18:25 -0800)]
Fix PAX extended attribute reading logic to treat '=' character as valid in the value strings. (#82810)

* Move PaxExtendedAttribute_Roundtrips test to correct source code file. It is not handling any filesystem entries.

* Bug fix: Do not fail when reading an extended attribute when the value contains an '=' character.,

* Add unit tests that verify extended attribute and global extended attribute roundtripping when the value contains an '=' character.
Also add a null check for a subsequent GetNextEntry.

* Convert duplicate InlineData to single shared MemberData method.

* Apply suggestion

---------

Co-authored-by: carlossanlop <carlossanlop@users.noreply.github.com>
16 months agoEnsure that the new Vector512 related ISAs are covered by ILLink Substitutions (...
Tanner Gooding [Wed, 8 Mar 2023 23:14:40 +0000 (15:14 -0800)]
Ensure that the new Vector512 related ISAs are covered by ILLink Substitutions (#83040)

* Ensure that the new Vector512 related ISAs are covered by ILLink Substitutions

* Define the Avx512F and derived classes

16 months agoRefactoring GenTreeVecCon to support TYP_SIMD64 (#83053)
Tanner Gooding [Wed, 8 Mar 2023 22:31:56 +0000 (14:31 -0800)]
Refactoring GenTreeVecCon to support TYP_SIMD64 (#83053)

* Refactoring GenTreeVecCon to support TYP_SIMD64

* Apply formatting patch

* Fixing a couple bugs in the refactoring

* Respond to some PR feedback by deduplicating code

16 months ago[wasm] Partially revert #82604 (#83156)
Katelyn Gadd [Wed, 8 Mar 2023 22:20:35 +0000 (14:20 -0800)]
[wasm] Partially revert #82604 (#83156)

#82604 produced more regressions than it did improvements, so this PR relaxes one of its changes and disables the more suspect one temporarily. In the future the heuristic will be significantly revised, and the actual overhead of various parts of traces is going to change once the CFG is added, so it's not worthwhile to invest a bunch of time into tuning the parameters right now. Once things are more stable we will hopefully be able to identify the right parameter values by doing a bunch of benchmark runs.

16 months agoFix undefined behaviour in Array.cs (#83116)
Michał Petryka [Wed, 8 Mar 2023 22:19:04 +0000 (23:19 +0100)]
Fix undefined behaviour in Array.cs (#83116)

Fixes #83115

16 months agoAdding System.Runtime.CompilerServices.Unsafe.BitCast (#82917)
Tanner Gooding [Wed, 8 Mar 2023 22:18:53 +0000 (14:18 -0800)]
Adding System.Runtime.CompilerServices.Unsafe.BitCast (#82917)

* Adding System.Runtime.CompilerServices.Unsafe.BitCast

* Adding some basic intrinsic recognition for Unsafe.BitCast

* Use ClassLayout::AreCompatible as part of Unsafe.BitCast

* Fixup BitConverter to use Unsafe.BitCast

* Fixup Enum to use Unsafe.BitCast

* Ensure BitCast resolves the right generic type for toTypeHnd

* Use Unsafe.BitCast in places using the `*(TTo*)&tfrom` pattern

* Don't use BitCast in places the generic constraints disallows it

* Missing semicolon

* Don't use Unsafe.BitCast where it introduces additional generic instantiations

* Don't regress the files that are used for both netstandard and netcoreapp

* Responding to PR feedback

* Fix a typo in the bitcast tests

16 months ago[wasm] Revert to using latest chrome for testing (#83150)
Ankit Jain [Wed, 8 Mar 2023 22:00:38 +0000 (17:00 -0500)]
[wasm] Revert to using latest chrome for testing (#83150)

https://github.com/dotnet/runtime/issues/81792

16 months agoLowering subset of Vector512 methods for avx512. (#82953)
DeepakRajendrakumaran [Wed, 8 Mar 2023 21:52:52 +0000 (13:52 -0800)]
Lowering subset of Vector512 methods for avx512. (#82953)

* Load(), LoadUnsafe(), LoadAligned(), LoadAlignedNonTemporal()

* Store(), StoreUnsafe(), StoreAligned(), StoreAlignedNonTemporal()

* Fixing 'HasSideEffect()' check used for RedundantMov

16 months ago[wasm] Add tests for build with SIMD disabled (#82845)
Radek Doulik [Wed, 8 Mar 2023 21:36:36 +0000 (22:36 +0100)]
[wasm] Add tests for build with SIMD disabled (#82845)

* [wasm] Add tests for build with SIMD disabled

Add BuildWithoutSIMD_AOT and PublishWithoutSIMD_AOT tests

Also try to enable SIMD tests on V8 and node

* The BuildWithoutSIMD_AOT should be without AOT

* Feedback

* Removed too much

* Negate the assert, it should not relink

* Update src/mono/wasm/Wasm.Build.Tests/WasmSIMDTests.cs

Co-authored-by: Ankit Jain <radical@gmail.com>
---------

Co-authored-by: Ankit Jain <radical@gmail.com>
17 months ago[wasm] Consume libc math functions directly from the jiterpreter without wrappers...
Katelyn Gadd [Wed, 8 Mar 2023 20:26:35 +0000 (12:26 -0800)]
[wasm] Consume libc math functions directly from the jiterpreter without wrappers (#82963)

Implement more math opcodes and use the f32 functions as appropriate

17 months agoAdd ConsoleKey.None and ConsoleModifiers.None (#83114)
Immo Landwerth [Wed, 8 Mar 2023 19:43:41 +0000 (11:43 -0800)]
Add ConsoleKey.None and ConsoleModifiers.None (#83114)

This fixes #79868.

17 months agoImplement parity for RAF and RDC attributes in NativeAOT (#83085)
Vitek Karas [Wed, 8 Mar 2023 19:20:08 +0000 (11:20 -0800)]
Implement parity for RAF and RDC attributes in NativeAOT (#83085)

The `RequiresUnreferencedCode` (RDC), `RequiresAssemblyFiles` (RAF) and `RequiresDynamicCode` (RDC) attributes should behave the same way in NativeAOT compiler. This change implements the necessary bits to make them almost 100% the same.
The only difference left is type hierarchy marking doesn't produce RAF/RDC related warnings - this is for now intentional, as it would probably produce unnecessary noise and the need for this seems to be really small.

Test changes are to basically fill in the missing expected warnings. We already have solid tests for pretty much all scenarios, they just didn't baseline these warnings since no tool produced them (illink doesn't produce RAF/RDC warnings, analyzer only produces them on direct access, not on reflection access).

This doesn't yet implement the IL3000 and IL3001 warnings in NativeAOT - that will be done in a subsequent change.

17 months agoChange a few more Encoding.UTF8.GetBytes to u8 in json (#83138)
Stephen Toub [Wed, 8 Mar 2023 18:15:09 +0000 (13:15 -0500)]
Change a few more Encoding.UTF8.GetBytes to u8 in json (#83138)

17 months agoClean up some code in SmtpDateTime (#83142)
Stephen Toub [Wed, 8 Mar 2023 18:14:28 +0000 (13:14 -0500)]
Clean up some code in SmtpDateTime (#83142)

- Remove an unnecessary static readonly char[]
- Simplified formatting via interpolated strings
- Removed some string allocation in parsing via spans
- Deleted some dead code
- Simplified some consts and readonly static creation

17 months agoUpdate SourceBuild image to be our Centos 8 Stream image. (#83106)
Jeremy Koritzinsky [Wed, 8 Mar 2023 17:58:30 +0000 (09:58 -0800)]
Update SourceBuild image to be our Centos 8 Stream image. (#83106)

17 months agoUpdate dependencies from https://github.com/dotnet/roslyn build 20230307.14 (#83136)
dotnet-maestro[bot] [Wed, 8 Mar 2023 17:49:14 +0000 (11:49 -0600)]
Update dependencies from https://github.com/dotnet/roslyn build 20230307.14 (#83136)

Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
 From Version 4.6.0-3.23156.6 -> To Version 4.6.0-3.23157.14

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
17 months ago[mono] Fix virtual method resolution in mono_delegate_trampoline (). (#83004)
Zoltan Varga [Wed, 8 Mar 2023 17:40:13 +0000 (12:40 -0500)]
[mono] Fix virtual method resolution in mono_delegate_trampoline (). (#83004)

Use delegate->method_is_virtual instead of complicated conditions.
That flag is set by the code generated in handle_delegate_ctor () if
an ldvirtftn instruction was skipped, and thus virtual method
resolution needs to be done at call time.

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

17 months ago[main] Update dependencies from dotnet/xharness (#83135)
dotnet-maestro[bot] [Wed, 8 Mar 2023 16:46:51 +0000 (11:46 -0500)]
[main] Update dependencies from dotnet/xharness (#83135)

Microsoft.DotNet.XHarness.CLI , Microsoft.DotNet.XHarness.TestRunners.Common , Microsoft.DotNet.XHarness.TestRunners.Xunit
 From Version 1.0.0-prerelease.23152.1 -> To Version 1.0.0-prerelease.23157.1

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
17 months agoMinor tweaks to IndexOfAnyLookupCore (#83139)
Miha Zupan [Wed, 8 Mar 2023 16:37:43 +0000 (17:37 +0100)]
Minor tweaks to IndexOfAnyLookupCore (#83139)

17 months agoSupport WindowStyle without UseShellExecute (#82662)
Jordan Borean [Wed, 8 Mar 2023 16:34:45 +0000 (02:34 +1000)]
Support WindowStyle without UseShellExecute (#82662)

* Support WindowStyle without UseShellExecute

Supports specifying a custom ProcessStartInfo.WindowStyle without having
to use UseShellExecute.

Fix #81681

* Add tests for new behaviour

* Revert exception with CreateNoWindow and WindowStyle

* Apply suggestions from code review

Co-authored-by: David Cantú <dacantu@microsoft.com>
* Implement review suggestions

* Avoid running test on Windows nano since does not support UseShellExecute

---------

Co-authored-by: David Cantú <dacantu@microsoft.com>
17 months ago[wasi] Fixes to enable more tests (#82966)
Ankit Jain [Wed, 8 Mar 2023 16:26:04 +0000 (11:26 -0500)]
[wasi] Fixes to enable more tests (#82966)

* [wasi] Copy WasmFilesToIncludeInFileSystem to the bundle too

This could be changed in the future to include in the single file bundle

* [wasi] Enable System.IO.Packaging, and System.Data.DataSetExtensions tests

* WasiAppBuilder: Create an empty /tmp

* Disable System.Runtime.Serialization.Xml.XsdDataContractExporterTests.ExporterTypesTests.TypesTest_Negative - Issue: https://github.com/dotnet/runtime/issues/82967

* Enable System.Runtime.Serialization.Xml.Tests, and System.Runtime.Serialization.Xml.ReflectionOnly.Tests

Remaining fixed by adding `/tmp`

17 months ago[mono][arm64] Implement delegate virtual invoke trampolines. (#83028)
Zoltan Varga [Wed, 8 Mar 2023 14:12:23 +0000 (09:12 -0500)]
[mono][arm64] Implement delegate virtual invoke trampolines. (#83028)

17 months agoSwitch JsonReaderHelper.IndexOfQuoteOrAnyControlOrBackSlash to use IndexOfAnyValues...
Stephen Toub [Wed, 8 Mar 2023 14:12:08 +0000 (09:12 -0500)]
Switch JsonReaderHelper.IndexOfQuoteOrAnyControlOrBackSlash to use IndexOfAnyValues (#82789)

* Switch JsonReaderHelper.IndexOfQuoteOrAnyControlOrBackSlash to use IndexOfAnyValues

* Remove aggressive inlining

17 months ago[mono][jit] Don't try to do devirt for Delegate.Invoke (). (#83026)
Zoltan Varga [Wed, 8 Mar 2023 14:11:54 +0000 (09:11 -0500)]
[mono][jit] Don't try to do devirt for Delegate.Invoke (). (#83026)

The optimized delegate calling code in mini_emit_method_call_full ()
expects calls to Invoke to stay a virtual call.

17 months agoAdd wasm support to IndexOfAnyAsciiSearcher (#83122)
Stephen Toub [Wed, 8 Mar 2023 14:11:39 +0000 (09:11 -0500)]
Add wasm support to IndexOfAnyAsciiSearcher (#83122)

* Add wasm support to IndexOfAnyAsciiSearcher

* Update with newly-added PackedSimd.ConvertNarrowing methods

---------

Co-authored-by: Miha Zupan <mihazupan.zupan1@gmail.com>
17 months agoRemove S.S.Permissions reference from S.C.ConfigurationManager (#82259)
Steve Harter [Wed, 8 Mar 2023 14:02:23 +0000 (08:02 -0600)]
Remove S.S.Permissions reference from S.C.ConfigurationManager (#82259)

17 months agoAdd type-forwarders for Xamarin.Android compatibility to System.Drawing.Common.dll...
Alexander Köplinger [Wed, 8 Mar 2023 13:29:44 +0000 (14:29 +0100)]
Add type-forwarders for Xamarin.Android compatibility to System.Drawing.Common.dll (#82839)

The legacy Xamarin.Android version of System.Drawing.Common.dll contained these types, add forwarders so we don't get a TypeLoadException when using an assembly compiled against that in modern .NET Android.

Fixes #82829

17 months agoImplement correct handling of new constraint in ilc (#82818)
Vitek Karas [Wed, 8 Mar 2023 13:11:11 +0000 (05:11 -0800)]
Implement correct handling of new constraint in ilc (#82818)

This is done by treating the new constraint as a data flow annotation `PublicParameterlessConstructor` (which are supposed to be identical). The rest falls out from this change since all of the validation and marking will automatically kick in.

This change causes more methods to go through data flow (since that's what will actually perform the constraint validation/marking). I tested this on the ASP.NET API AOT template. Before this change it ran ~620 methods through data flow. With this change that number goes up to ~2100. The problem is tracked by https://github.com/dotnet/runtime/issues/82603.

I measured compiler perf but didn't see any noticeable changes. Current thinking is that ~2100 is still not that much and most of those methods are pretty small and thus cheap to run data flow on.

Fixes https://github.com/dotnet/runtime/issues/81720 - note that the repro still fails on AOT with this fix, but the failure is different (`System.InvalidOperationException: Sequence contains no matching element`). I verified that the missing .ctor is present in the app with the fix.

17 months ago[browser] legacy JS interop optional via WasmEnableLegacyJsInterop - managed (#82826)
Pavel Savara [Wed, 8 Mar 2023 10:34:21 +0000 (11:34 +0100)]
[browser] legacy JS interop optional via WasmEnableLegacyJsInterop - managed (#82826)

* WasmEnableLegacyJsInterop and ILLink.Descriptors.LegacyJsInterop.xml
* revert back to USE_PTHREADS symbol
* feedback

17 months agoJIT: Support converting OR(condition, condition) -> CCMP (#83089)
Jakob Botsch Nielsen [Wed, 8 Mar 2023 09:15:21 +0000 (10:15 +0100)]
JIT: Support converting OR(condition, condition) -> CCMP (#83089)

Also support generating ccmp for GC pointers, which fixes #82703.

Also makes the handling of operands symmetrical, so that the ccmp can be
generated for either op1 or op2 of the AND/OR.

17 months agouse MsQuic 2.1 again (#83124)
Tomas Weinfurt [Wed, 8 Mar 2023 08:36:27 +0000 (00:36 -0800)]
use MsQuic 2.1 again (#83124)

17 months ago[browser] cleanup before memory snapshot (#83082)
Pavel Savara [Wed, 8 Mar 2023 08:17:12 +0000 (09:17 +0100)]
[browser] cleanup before memory snapshot (#83082)

- moved get_preferred_icu_asset
- moved TZ detection
- moved runtimeHelpers.waitForDebugger
- added runtimeHelpers.updateGlobalBufferAndViews
- removed obsolete comments about blazor startup sequence
- removed diplicate calls mono_wasm_init_diagnostics (also previously blazor startup path)
- introduce DotnetModuleInternal instaed of anyModule

17 months agoRename cgroup.cpp to cgroupcpu.cpp (#83029)
Adeel Mujahid [Wed, 8 Mar 2023 02:17:54 +0000 (04:17 +0200)]
Rename cgroup.cpp to cgroupcpu.cpp (#83029)

* Revert "Revert "Enable symbol stripping for crossgen2 (#82698)" (#82881)"

This reverts commit 13853e5a78dafb364305af823bac3a4dbeddf894.

* Rename cgroup.cpp to cgroupcpu.cpp

17 months ago[main] Update dependencies from 8 repositories (#83032)
dotnet-maestro[bot] [Tue, 7 Mar 2023 23:50:45 +0000 (17:50 -0600)]
[main] Update dependencies from 8 repositories (#83032)

* Update dependencies from https://github.com/dotnet/runtime build 20230305.6

Microsoft.NET.ILLink.Tasks , Microsoft.NET.Sdk.IL , Microsoft.NETCore.App.Runtime.win-x64 , Microsoft.NETCore.ILAsm , runtime.native.System.IO.Ports , System.Text.Json
 From Version 8.0.0-preview.2.23126.3 -> To Version 8.0.0-preview.3.23155.6

* Update dependencies from https://github.com/dotnet/llvm-project build 20230306.3

runtime.linux-arm64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.linux-arm64.Microsoft.NETCore.Runtime.ObjWriter , runtime.linux-musl-arm64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.linux-musl-arm64.Microsoft.NETCore.Runtime.ObjWriter , runtime.linux-musl-x64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.linux-musl-x64.Microsoft.NETCore.Runtime.ObjWriter , runtime.linux-x64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.linux-x64.Microsoft.NETCore.Runtime.ObjWriter , runtime.osx-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.osx-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.osx-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.osx-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.win-arm64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.win-arm64.Microsoft.NETCore.Runtime.ObjWriter , runtime.win-x64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.win-x64.Microsoft.NETCore.Runtime.ObjWriter
 From Version 14.0.0-alpha.1.23124.1 -> To Version 14.0.0-alpha.1.23156.3

* Update dependencies from https://github.com/dotnet/icu build 20230306.1

Microsoft.NETCore.Runtime.ICU.Transport
 From Version 8.0.0-preview.3.23151.1 -> To Version 8.0.0-preview.3.23156.1

* Update dependencies from https://github.com/dotnet/runtime-assets build 20230306.1

Microsoft.DotNet.CilStrip.Sources , System.ComponentModel.TypeConverter.TestData , System.Data.Common.TestData , System.Drawing.Common.TestData , System.Formats.Tar.TestData , System.IO.Compression.TestData , System.IO.Packaging.TestData , System.Net.TestData , System.Private.Runtime.UnicodeData , System.Runtime.Numerics.TestData , System.Runtime.TimeZoneData , System.Security.Cryptography.X509Certificates.TestData , System.Text.RegularExpressions.TestData , System.Windows.Extensions.TestData
 From Version 8.0.0-beta.23127.1 -> To Version 8.0.0-beta.23156.1

* Update dependencies from https://github.com/dotnet/emsdk build 20230306.1

Microsoft.NET.Workload.Emscripten.Current.Manifest-8.0.100-preview.3 , Microsoft.NET.Workload.Emscripten.net6.Manifest-8.0.100-preview.3 , Microsoft.NET.Workload.Emscripten.net7.Manifest-8.0.100-preview.3
 From Version 8.0.0-preview.3.23151.1 -> To Version 8.0.0-preview.3.23156.1

* Update dependencies from https://github.com/dotnet/msquic build 20230306.1

System.Net.MsQuic.Transport
 From Version 8.0.0-alpha.1.23153.1 -> To Version 8.0.0-alpha.1.23156.1

* Update dependencies from https://github.com/dotnet/hotreload-utils build 20230306.1

Microsoft.DotNet.HotReload.Utils.Generator.BuildTool
 From Version 1.1.0-alpha.0.23152.1 -> To Version 1.1.0-alpha.0.23156.1

* Update dependencies from https://github.com/dotnet/cecil build 20230306.1

Microsoft.DotNet.Cecil
 From Version 0.11.4-alpha.23127.1 -> To Version 0.11.4-alpha.23156.1

---------

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
17 months agoget transport MsQuic for Windows arm64 (#83104)
Tomas Weinfurt [Tue, 7 Mar 2023 23:44:18 +0000 (15:44 -0800)]
get transport MsQuic for Windows arm64 (#83104)

17 months agofix failing ConnectWithRevocation_ServerCertWithoutContext_NoStapledOcsp failures...
Tomas Weinfurt [Tue, 7 Mar 2023 22:25:17 +0000 (14:25 -0800)]
fix failing ConnectWithRevocation_ServerCertWithoutContext_NoStapledOcsp failures (#83013)

17 months ago[main] Update dependencies from dotnet/roslyn (#83031)
dotnet-maestro[bot] [Tue, 7 Mar 2023 22:04:38 +0000 (16:04 -0600)]
[main] Update dependencies from dotnet/roslyn (#83031)

* Update dependencies from https://github.com/dotnet/roslyn build 20230306.1

Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
 From Version 4.6.0-3.23154.2 -> To Version 4.6.0-3.23156.1

* Update dependencies from https://github.com/dotnet/roslyn build 20230306.6

Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
 From Version 4.6.0-3.23154.2 -> To Version 4.6.0-3.23156.6

---------

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
17 months agoUpdate dependencies from https://github.com/dotnet/arcade build 20230306.4 (#83087)
dotnet-maestro[bot] [Tue, 7 Mar 2023 22:02:44 +0000 (16:02 -0600)]
Update dependencies from https://github.com/dotnet/arcade build 20230306.4 (#83087)

Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Build.Tasks.Archives , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Build.Tasks.Installers , Microsoft.DotNet.Build.Tasks.Packaging , Microsoft.DotNet.Build.Tasks.TargetFramework , Microsoft.DotNet.Build.Tasks.Templating , Microsoft.DotNet.Build.Tasks.Workloads , Microsoft.DotNet.CodeAnalysis , Microsoft.DotNet.GenAPI , Microsoft.DotNet.GenFacades , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.PackageTesting , Microsoft.DotNet.RemoteExecutor , Microsoft.DotNet.SharedFramework.Sdk , Microsoft.DotNet.VersionTools.Tasks , Microsoft.DotNet.XUnitConsoleRunner , Microsoft.DotNet.XUnitExtensions
 From Version 8.0.0-beta.23153.1 -> To Version 8.0.0-beta.23156.4

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
17 months agoSeparate the generation of PerfMap and JitDump files (#82142)
Daniel Ramos [Tue, 7 Mar 2023 21:28:02 +0000 (13:28 -0800)]
Separate the generation of PerfMap and JitDump files (#82142)

17 months agoChange the ComInterfaceGenerator to output source in one file per interface and use...
Jeremy Koritzinsky [Tue, 7 Mar 2023 21:03:33 +0000 (13:03 -0800)]
Change the ComInterfaceGenerator to output source in one file per interface and use file-scoped types (#83055)

17 months agoSome minor cleanup post the addition of TYP_SIMD64 and ZMM support - P1 (#83044)
Tanner Gooding [Tue, 7 Mar 2023 19:56:26 +0000 (11:56 -0800)]
Some minor cleanup post the addition of TYP_SIMD64 and ZMM support - P1 (#83044)

* Ensure EA_16BYTE is FEATURE_SIMD only and EA_32/64BYTE are TARGET_XARCH only

* Remove getSIMDSupportLevel as its now unnecessary

* Ensure canUseVexEncoding and canUseEvexEncoding are xarch only

* Don't make EA_16BYTE+ require FEATURE_SIMD

* Resolving formatting and build failures

* Adding back a check that shouldn't have been removed

17 months agoUse more traditional interface implementation + delegation for generator unit tests...
Jeremy Koritzinsky [Tue, 7 Mar 2023 19:00:30 +0000 (11:00 -0800)]
Use more traditional interface implementation + delegation for generator unit tests (#83057)

17 months agoRename IntegralRange::IsPositive() to IsNonNegative to be accurate (#83062)
Bruce Forstall [Tue, 7 Mar 2023 17:33:15 +0000 (10:33 -0700)]
Rename IntegralRange::IsPositive() to IsNonNegative to be accurate (#83062)

Also, add a few `const` in various places.

17 months agoJIT: profile synthesis consistency checking and more (#83068)
Andy Ayers [Tue, 7 Mar 2023 16:31:45 +0000 (08:31 -0800)]
JIT: profile synthesis consistency checking and more (#83068)

Add the ability to verify that the profile counts produced by synthesis are
self-consistent, and optionally to assert if they're not. Disable checking
if we know profile flow will be inconsistent (because of irreducible loops
and/or capped cyclic probabilities).

Consistently ignore the likely flow out of handlers. Generally we model
handlers as isolated subgraphs that do not contribute flow to the main flow
graph. This is generally acceptable.

The one caveat is for flow into finallies. The plan here is to fix the weights
for finallies up in a subsequent pass via simple scaling once callfinallies
are introduced. Flow weights out of finallies will be ignored as the
callfinally block will be modeled as always flowing to its pair tail.

Also add the ability to propagate the synthesized counts into the live profile
data. This is mainly to facilitate using the MIBC comparison tools we have
to assess how closely the synthesiszed data comes to actual PGO data.

Finally, enable the new synthesized plus checked modes in a few of our PGO
pipelines.

Contributes to #82964.

17 months ago[wasm] Disable GetAsync_ManyDifferentResponseHeaders_ParsedCorrectly on NodeJS (...
Marek Fišera [Tue, 7 Mar 2023 15:54:24 +0000 (16:54 +0100)]
[wasm] Disable GetAsync_ManyDifferentResponseHeaders_ParsedCorrectly on NodeJS (#83090)

17 months ago[wasm] Add narrow methods to PackedSimd (#83084)
Radek Doulik [Tue, 7 Mar 2023 15:21:36 +0000 (16:21 +0100)]
[wasm] Add narrow methods to PackedSimd (#83084)

* [wasm] Add narrow methods to PackedSimd

Add them as internal as the approved API contains wrong methods for
these. https://github.com/dotnet/runtime/issues/53730#issuecomment-1453900537

This will allow faster implementation of IndexOfAnyValues for wasm.
https://github.com/dotnet/runtime/pull/82789#issuecomment-1451056305

* Fix build

17 months agoMake open method resolver pay for play (#83064)
Michal Strehovský [Tue, 7 Mar 2023 11:50:15 +0000 (20:50 +0900)]
Make open method resolver pay for play (#83064)

Resolver is called into from delegate thunks, so we can't get rid of it, but to construct a resolver one needs to do some reflection first. Make the resolution logic statically depend on resolver being constructed.

17 months agoIfdef out a piece of unreachable reflection stack (#83067)
Michal Strehovský [Tue, 7 Mar 2023 07:00:18 +0000 (16:00 +0900)]
Ifdef out a piece of unreachable reflection stack (#83067)

This is only reachable if we have a .NET Native-esque SharedLibrary.dll. Method signature comparison calls into the type loader.

17 months agoEmit leaner cctor context for preinitialized types (#83065)
Michal Strehovský [Tue, 7 Mar 2023 06:59:49 +0000 (15:59 +0900)]
Emit leaner cctor context for preinitialized types (#83065)

If a type is preinitialized, we shouldn't need the cctor pointer anymore. This was the only thing keeping around general-purpose comparers logic after @EgorBo's #83054.

17 months agoImprove perf of CharEnumerator (#82990)
Stephen Toub [Tue, 7 Mar 2023 06:48:45 +0000 (01:48 -0500)]
Improve perf of CharEnumerator (#82990)

17 months agoAllow devirtualizing more interface calls (#82927)
Michal Strehovský [Tue, 7 Mar 2023 04:52:41 +0000 (13:52 +0900)]
Allow devirtualizing more interface calls (#82927)

There is an existing implementation of "does this introduce variance complexities"?

17 months agoAvoid generic virtual methods in enum infrastructure (#83063)
Michal Strehovský [Tue, 7 Mar 2023 04:50:22 +0000 (13:50 +0900)]
Avoid generic virtual methods in enum infrastructure (#83063)

17 months ago[wasm] Don't generate unused imports in jiterpreter traces (#83061)
Katelyn Gadd [Tue, 7 Mar 2023 03:37:49 +0000 (19:37 -0800)]
[wasm] Don't generate unused imports in jiterpreter traces (#83061)

17 months agoImprove EqualityComparer for NativeAOT (#83054)
Egor Bogatov [Tue, 7 Mar 2023 03:09:08 +0000 (04:09 +0100)]
Improve EqualityComparer for NativeAOT (#83054)

Remove s_default field from EqualityComparer.NativeAot.cs and Comparer.NativeAot.cs