platform/upstream/dotnet/runtime.git
21 months agoUpdating owners (#76330)
Eric StJohn [Thu, 29 Sep 2022 15:34:51 +0000 (08:34 -0700)]
Updating owners (#76330)

21 months agoRemove some extra static arrays used in Split() (#76003)
Ilya [Thu, 29 Sep 2022 15:23:24 +0000 (20:23 +0500)]
Remove some extra static arrays used in Split() (#76003)

* Remove some extra static arrays used in Split
* Remove const

21 months agoFix using DependencyGraphViewer with AOT compilers (#76357)
Michal Strehovský [Thu, 29 Sep 2022 14:35:34 +0000 (23:35 +0900)]
Fix using DependencyGraphViewer with AOT compilers (#76357)

The `readonly` addition was one of the 3600 diffs in #74825. `MarkStrategy` can have mutable state that was getting lost because Roslyn considers it valid to put `_marker` into a temporary before calling instance methods on it.

This resulted in DependencyGraphViewer hanging after seeing tens of thousands of new graphs being added.

21 months agoFix value type with static method fails to load (#76262)
James S. Wang [Thu, 29 Sep 2022 14:18:09 +0000 (10:18 -0400)]
Fix value type with static method fails to load (#76262)

* Allow static methods if checking type equivalence

* Add test for loading value type with static method

* Add test in which loading a value type with an instance method should throw a TypeLoadException

21 months agoGenerate single interface dispatch map per canonical form (#76362)
Michal Strehovský [Thu, 29 Sep 2022 14:17:23 +0000 (23:17 +0900)]
Generate single interface dispatch map per canonical form (#76362)

The dispatch maps are identical because canonically-equivalent types have the same vtable layouts.

21 months agoMake KeysCollection.Contains methods public. (#76319)
Eirik Tsarpalis [Thu, 29 Sep 2022 14:05:52 +0000 (17:05 +0300)]
Make KeysCollection.Contains methods public. (#76319)

21 months agoBring back ReadOnlySpan in QuicStream (#76088)
Ilya [Thu, 29 Sep 2022 13:36:12 +0000 (18:36 +0500)]
Bring back ReadOnlySpan in QuicStream (#76088)

21 months agoIssue #75070 - Add PriorityQueue DequeueEnqueue Method (#75993)
Ryan Thomas [Thu, 29 Sep 2022 12:34:24 +0000 (07:34 -0500)]
Issue #75070 - Add PriorityQueue DequeueEnqueue Method (#75993)

* Issue #75070 - Add a DequeueEnqueue method to the System.Collections.Generic.PriorityQueue public api and unit test cases for the new method

* Issue #75070 - Remove unnecessary PriorityQueue DequeueEnqueue property test case and update DequeueEnqueue test assertion and xunit attribute

* Item #75070 - Revert the unnecessary name changes to the PriorityQueue.PropertyTests.cs test case method names

21 months agoReduce Enum.GetEnumName overheads (#76162)
Stephen Toub [Thu, 29 Sep 2022 11:37:41 +0000 (07:37 -0400)]
Reduce Enum.GetEnumName overheads (#76162)

* Reduce Enum.GetEnumName overheads

This also helps Enum.ToString(), Enum.IsDefined, etc.  Many enums are composed of sequential values starting at 0 (half of all enums in corelib, for example, meet this criteria).  Today when looking up a value, we search the array of values, but if an enum is known to have such sequential values, we can instead just index into the array at the appropriate location.

* Address PR feedback

21 months agoReduce allocations around empty ReadOnlyCollections (#76097)
Stephen Toub [Thu, 29 Sep 2022 11:37:10 +0000 (07:37 -0400)]
Reduce allocations around empty ReadOnlyCollections (#76097)

* Reduce allocations around empty ReadOnlyCollections

- Add an internal (for now) `ReadOnlyCollection<T>.Empty`
- Return the singleton `ReadOnlyCollection<T>.Empty` from `Array.AsReadOnly` when the source is empty
- Return a singleton empty enumerator from an empty `ReadOnlyCollection<T>`
- Fix up some reflection code to avoid unnecessary `ReadOnlyCollection<T>` allocations (e.g. just to wrap empty arrays)
- Fix a null reference bug in RuntimeCustomAttributeData.NamedArguments (I don't know if it's actually reachable, but this property shouldn't be returning null)
- Avoid a few unnecessary allocations in TimeZoneInfo.GetSystemTimeZones

* Address feedback, fix faulty tests, improve ConcurrentDictionary

* Fix reflection test expecting specific type for IList

* Address PR feedback

21 months ago[wasm] Update templates to work for multiple versions (#76124)
Ankit Jain [Thu, 29 Sep 2022 09:44:43 +0000 (05:44 -0400)]
[wasm] Update templates to work for multiple versions (#76124)

21 months agoFix distribute free regions (#74916)
Peter Sollich [Thu, 29 Sep 2022 09:09:01 +0000 (11:09 +0200)]
Fix distribute free regions (#74916)

As it turns out, distribute_free_regions does not do a very good job distributing free regions if there are fewer than the budget demands. There are several reasons:

- there is a bug in the adjustment_per_heap computation that causes the value to be too large - that is because dividing a negative number already rounds towards zero, and hence towards positive infinity, thus adding (n_heaps-1) before dividing is wrong.
- if the overall budget is not a multiple of the number of heaps, trying to fill each heap to the budget will allow heaps with higher numbers to have significant shortfalls.
- if the budget is not enough to cover the higher generations, heaps with high budget in these generations may cause other heaps to be unable to even cover their gen 0 budget.

The fix addresses these shortcomings:
- once we cover the budget for a generation, this is considered the minimum, higher generation budgets on other heaps are not allowed to reduce it below that minimum. So lower generations take priority, we are essentially trying to delay running out of budget as long as possible.
- we use a better algorithm to distribute a budget shortfall or surplus over all heaps. there is still a slight tendency for the last heap to receive fewer regions in the case of a shortfall.

21 months ago[wasm][debugger] Tests for static inherited members. (#75512)
Ilona Tomkowicz [Thu, 29 Sep 2022 08:56:31 +0000 (10:56 +0200)]
[wasm][debugger] Tests for static inherited members. (#75512)

* New tests: static inherited + fixed logic for them.

* Remove internal option after merge with main.

* Missing after-merge change.

Co-authored-by: Ankit Jain <radical@gmail.com>
21 months ago[mono] Fix missing defined and SIMD checks in Sqrt, Floor, Ceiling intrinsics (#76177)
Matous Kozak [Thu, 29 Sep 2022 08:15:54 +0000 (10:15 +0200)]
[mono] Fix missing defined and SIMD checks in Sqrt, Floor, Ceiling intrinsics (#76177)

* add missing defined

* SSE intrinsics check

* fix typo

* remove spaces

* add missing defined

* remove SSE and SSE2 checks

21 months ago[wasm] Templates nits (#76182)
Marek Fišera [Thu, 29 Sep 2022 07:42:19 +0000 (09:42 +0200)]
[wasm] Templates nits (#76182)

- Add template descriptions.
- Unify string quotes.

21 months ago[wasm] new unit test for duplicate call to ImportAsync (#76179)
Pavel Savara [Thu, 29 Sep 2022 07:17:19 +0000 (09:17 +0200)]
[wasm] new unit test for duplicate call to ImportAsync (#76179)

* new unit test

21 months ago[Mono] Implement eager finalization of WeakReference (#76173)
Filip Navara [Thu, 29 Sep 2022 07:06:28 +0000 (09:06 +0200)]
[Mono] Implement eager finalization of WeakReference (#76173)

* [Mono] Implement eager finalization of WeakReference

* Make the finalization really eager

* Move the eager finalization a bit earlier - to sgen_finalize_in_range  (PR suggestion)

Co-authored-by: vsadov <8218165+VSadov@users.noreply.github.com>
21 months agoFix not to create unnecessary `thread_params` (#76007)
Hyungju Lee [Thu, 29 Sep 2022 05:02:34 +0000 (14:02 +0900)]
Fix not to create unnecessary `thread_params` (#76007)

21 months agoAdding a debug only config knob for testing loop unrolling limits (#76288)
Tanner Gooding [Thu, 29 Sep 2022 04:28:21 +0000 (21:28 -0700)]
Adding a debug only config knob for testing loop unrolling limits (#76288)

* Adding a debug only config knob for testing loop unrolling limits

* Responding to PR feedback

* Fix a name

* Fixing the name of the JitConfig knob

* Apply formatting patch

21 months ago[Mono][Test]Disable failing iossimulator tests (#74889)
Nathan Ricci [Thu, 29 Sep 2022 02:21:18 +0000 (22:21 -0400)]
[Mono][Test]Disable failing iossimulator tests (#74889)

Disable Added failing ioosimulator tests.

21 months agoAdd List<T> AddRange, InsertRange, and CopyTo extensions for spans (#76274)
Stephen Toub [Thu, 29 Sep 2022 02:11:08 +0000 (22:11 -0400)]
Add List<T> AddRange, InsertRange, and CopyTo extensions for spans (#76274)

* Move CollectionExtensions to corelib

* Add CollectionExtensions.AddRange/InsertRange/CopyTo

* Update src/libraries/System.Private.CoreLib/src/System/Collections/Generic/CollectionExtensions.cs

Co-authored-by: Eirik Tsarpalis <eirik.tsarpalis@gmail.com>
* Update src/libraries/System.Private.CoreLib/src/System/Collections/Generic/CollectionExtensions.cs

Co-authored-by: Eirik Tsarpalis <eirik.tsarpalis@gmail.com>
Co-authored-by: Eirik Tsarpalis <eirik.tsarpalis@gmail.com>
21 months agoDispose of key when importing X.509 certificate from PEM
Kevin Jones [Thu, 29 Sep 2022 01:59:00 +0000 (21:59 -0400)]
Dispose of key when importing X.509 certificate from PEM

21 months agoAdd custom ResponseFile handler (#76271)
Adeel Mujahid [Thu, 29 Sep 2022 00:14:35 +0000 (03:14 +0300)]
Add custom ResponseFile handler (#76271)

* Add custom ResponseFile handler

* Move handler to helpers and use in CG2

* Strip leading and trailing quotes from value

Co-authored-by: Jon Sequeira <jonsequeira@gmail.com>
21 months agoFix DiagnosticSource to work with NativeAOT (#76109)
Eric Erhardt [Wed, 28 Sep 2022 21:30:44 +0000 (16:30 -0500)]
Fix DiagnosticSource to work with NativeAOT (#76109)

* Fix DiagnosticSource to work with NativeAOT

There were 2 problems:

1. The use of MakeGenericType doesn't work when a property is a ValueType.
An app will crash when a listener is enabled and DiagnosticSourceEventSource tries
writing values.
2. The properties on KeyValuePair were not being preserved correctly, so the Arguments
of the DiagnosticSourceEventSource methods were not being serialized correctly.

Add test (and infrastructure) to ensure DiagnosticSource works in a NativeAOT app

Fix #75945

* Enable new NativeAotTests in CI

- Only run them in Release configuration
- Suppress IL2026 warning

* Don't run NativeAot published app tests on OSX since it isn't supported

Set EventSourceSupport only on the projects that need it.

21 months ago[mono][interp] Replace sign extending moves to normal moves (#75837)
Vlad Brezae [Wed, 28 Sep 2022 21:08:11 +0000 (00:08 +0300)]
[mono][interp] Replace sign extending moves to normal moves (#75837)

* [mono][interp] Replace sign extending moves to normal moves

If the source var doesn't have its address taken. These opcodes are very frequent (even over 5%) and they cannot be optimized out and block copy propagation.

* [mono][interp] Add implicit conversions when returning short ints

* [mono][interp] Make sure ret.i4.imm correctly handles short int returns

21 months agoMore disasm check CI fixes (#76276)
Will Smith [Wed, 28 Sep 2022 21:07:01 +0000 (14:07 -0700)]
More disasm check CI fixes (#76276)

* More disasm check CI fixes

* Quick fix

* More fixes. Force failure.

* Update Runtime_34937.cs

21 months agoDon't run superpmi unit test if it appears a SPMI collection is in progress (#76311)
Bruce Forstall [Wed, 28 Sep 2022 21:03:32 +0000 (14:03 -0700)]
Don't run superpmi unit test if it appears a SPMI collection is in progress (#76311)

21 months agofix div by zero (#76294)
Maoni Stephens [Wed, 28 Sep 2022 20:40:05 +0000 (13:40 -0700)]
fix div by zero (#76294)

for regions generation size can be 0 since we don't have the gen start object anymore.

fixes #76257.

21 months agoReplace GetFile() with GetPEAssembly() call in gdb (#76293)
Anthony Shaw [Wed, 28 Sep 2022 18:40:13 +0000 (04:40 +1000)]
Replace GetFile() with GetPEAssembly() call in gdb (#76293)

Fixes #76291

21 months agoUse UTF8 encoding on Tar string fields (#75902)
David Cantú [Wed, 28 Sep 2022 18:39:44 +0000 (13:39 -0500)]
Use UTF8 encoding on Tar string fields (#75902)

* Use UTF8 encoding on Tar string fields

* Slice destination on Checksum

* Use Encoding.GetByteCount as fast path

* Use escape sequences on hardcoded UTF8 characters

* Fix ustar prefix logic and throw if name would be truncated

* Address feedback

* Fix truncation and prefix logic

* Fix nits

* Add async tests

* Add tests for unseekable streams

* Address feedback

21 months agoRemove duplicate length words from xmldoc (#76315)
Ken Dale [Wed, 28 Sep 2022 18:20:24 +0000 (14:20 -0400)]
Remove duplicate length words from xmldoc (#76315)

21 months agoAdd missing xml documentation (#76191)
Eirik Tsarpalis [Wed, 28 Sep 2022 17:57:48 +0000 (20:57 +0300)]
Add missing xml documentation (#76191)

21 months agoCache KeySizes array for EC types
Kevin Jones [Wed, 28 Sep 2022 15:03:11 +0000 (11:03 -0400)]
Cache KeySizes array for EC types

Individual KeySizes instances themselves are immutable, so we can re-use instances there.
Arrays are mutable, so continue to return a copy of the array each time.

21 months agoUpdate disasm-checks documentation (#76286)
Will Smith [Wed, 28 Sep 2022 14:51:36 +0000 (07:51 -0700)]
Update disasm-checks documentation (#76286)

* Update disasm-checks documentation with limitations and future improvements

* Include not about anchors

* Update disasm-checks.md

21 months agoAdd `$schema` to `cgmanifest.json` (#74933)
Jamie Magee [Wed, 28 Sep 2022 14:51:15 +0000 (07:51 -0700)]
Add `$schema` to `cgmanifest.json` (#74933)

Co-authored-by: Jamie Magee <jamie.magee@microsoft.com>
21 months agoGradual decommit in wks (#73620)
Peter Sollich [Wed, 28 Sep 2022 14:33:11 +0000 (16:33 +0200)]
Gradual decommit in wks (#73620)

* Initial version of gradual decommit for WKS.

This is the regions version modeled after the behavior of the segments version.

Idea is simply to limit the amount of decommitted memory based on the time since the last GC.

* Change decommit_step to take a step_milliseconds parameter - this makes the logic for the WKS decommit more straightforward.

* Only do decommits at most every 100 milliseconds to limit the number of decommitted regions.

* Address code review feedback: disable the logic in decommit_ephemeral_segment_pages for WKS, some changes in distribute_free_regions as a consequence.

* Remove unused static field ephemeral_elapsed.

* Fix typo in comment.

21 months agoUse existing variable for SpecialFolder.UserProfile (#76299)
Alexander Köplinger [Wed, 28 Sep 2022 14:28:21 +0000 (16:28 +0200)]
Use existing variable for SpecialFolder.UserProfile (#76299)

While looking at https://github.com/dotnet/runtime/pull/76250 I noticed that we were querying the HOME env variable for SpecialFolder.UserProfile but we're already doing that in PersistedFiles.GetHomeDirectory()

21 months agoFix #76260 Add nullable annotation to INumberBase<>.TryParse (#76272)
Michał Bryłka [Wed, 28 Sep 2022 14:17:26 +0000 (16:17 +0200)]
Fix #76260 Add nullable annotation to INumberBase<>.TryParse (#76272)

21 months agoMake "Personal" on Android also point to a Documents folder (#76250)
Miepee [Wed, 28 Sep 2022 11:19:50 +0000 (13:19 +0200)]
Make "Personal" on Android also point to a Documents folder (#76250)

#68610 moved `Personal`/`MyDocuments` on Unix systems from HOME to the documents folder.
However, it didn't do so for Android systems, which was only noticed after tests later failed. This fixes it.

21 months agoOnly bundle OpenSSL Android on actual Bionic builds (#76266)
Jo Shields [Wed, 28 Sep 2022 10:37:55 +0000 (06:37 -0400)]
Only bundle OpenSSL Android on actual Bionic builds (#76266)

Closes: #75080

21 months ago[mono][llvm] Avoid making the 'this' variable in gshared methods volatile, the genera...
Zoltan Varga [Wed, 28 Sep 2022 10:18:57 +0000 (06:18 -0400)]
[mono][llvm] Avoid making the 'this' variable in gshared methods volatile, the generated llvm code already saves it to separate variable for using during EH. (#76284)

21 months agoPass TargetRid and SourceBuildNonPortable to the native scripts (#74504)
Tom Deseyn [Wed, 28 Sep 2022 09:48:11 +0000 (11:48 +0200)]
Pass TargetRid and SourceBuildNonPortable to the native scripts (#74504)

* Pass SourceBuild TargetRid and SourceBuildPortable args through the native script.

* Rename -packagerid to -distrorid.

* Fix init-distro-rid.sh.

* Use OutputRid instead of PackageRid.

* Drop unnecessary Condition.

* Try passing --distrorid as OutputRid.

* NativeExport: use PackageRID for AppHostRuntimeIdentifier.

* Rename --distrorid to --outputrid.

* Fix SourceBuild.props.

* Undo changes to init-distro-rid.sh.

* Let source-build leg build 'banana-x64' rid.

* SourceBuild.props: don't force a RuntimeOS.

* SourceBuild.props: set AdditionalRuntimeIdentifierParent.

* Build banana.24-x64 instead.

* Fix SourceBuild.props.

* SourceBuild.props: try fix AdditionalRuntimeIdentifier* usage.

* source-build.yml: add runtimeOS parameter.

* SourceBuild.props: derive RuntimeOS from NETCoreSdkRuntimeIdentifier.

* Undo using NETCoreSdkRuntimeIdentifier.

* Update eng/pipelines/common/global-build-job.yml

Co-authored-by: Jeremy Koritzinsky <jkoritzinsky@gmail.com>
Co-authored-by: Jeremy Koritzinsky <jkoritzinsky@gmail.com>
21 months ago[wasm] Run System.Runtime tests in a deterministic order to work around https://githu...
Zoltan Varga [Wed, 28 Sep 2022 09:18:20 +0000 (05:18 -0400)]
[wasm] Run System.Runtime tests in a deterministic order to work around https://github.com/dotnet/runtime/issues/74302. (#76287)

21 months agoAlign repro project settings with SDK defaults (#76233)
Michal Strehovský [Wed, 28 Sep 2022 06:26:25 +0000 (15:26 +0900)]
Align repro project settings with SDK defaults (#76233)

Small quality-of-life improvement since the SDK default means less code to compile and faster compile times.

21 months agoincrease number of Apple trampolines to 40000 (#76246)
Matous Kozak [Wed, 28 Sep 2022 05:02:15 +0000 (07:02 +0200)]
increase number of Apple trampolines to 40000 (#76246)

21 months agoRemove IlcTrimMetadata=false from a couple tests (#76234)
Michal Strehovský [Wed, 28 Sep 2022 00:34:15 +0000 (09:34 +0900)]
Remove IlcTrimMetadata=false from a couple tests (#76234)

Contributes to https://github.com/dotnet/runtime/issues/71506.

21 months agoFix diagnostic for properties on instantiated types (#76227)
Michal Strehovský [Wed, 28 Sep 2022 00:15:28 +0000 (09:15 +0900)]
Fix diagnostic for properties on instantiated types (#76227)

There was a bug in the code that maps accessor names to property names when the method is on an instantiated type. We would incorrectly demangle getters into setters.

Also made this do the same thing for events.

Also changed the throw to an assert. We don't really want to crash the compiler if there's a bug here.

21 months ago[wasm] Keep all icall wrappers in profile only mode, the generated code depends on...
Zoltan Varga [Tue, 27 Sep 2022 23:26:43 +0000 (19:26 -0400)]
[wasm] Keep all icall wrappers in profile only mode, the generated code depends on it. (#75918)

21 months agoChange comments from COMPlus to DOTNET when referring to prefixes of env vars (#76264)
James S. Wang [Tue, 27 Sep 2022 23:23:29 +0000 (19:23 -0400)]
Change comments from COMPlus to DOTNET when referring to prefixes of env vars (#76264)

21 months agoSupport containing HWIntrinsics that can operate like a store (#76212)
Tanner Gooding [Tue, 27 Sep 2022 22:14:47 +0000 (15:14 -0700)]
Support containing HWIntrinsics that can operate like a store (#76212)

* Support containing HWIntrinsics that can operate like a store

* Applying formatting patch

* Ensure code is properly under #if defined(FEATURE_HW_INTRINSICS)

* Resolve an assert in lsrabuild

* Update src/coreclr/jit/emitxarch.cpp

Co-authored-by: SingleAccretion <62474226+SingleAccretion@users.noreply.github.com>
* Update src/coreclr/jit/codegenlinear.cpp

Co-authored-by: SingleAccretion <62474226+SingleAccretion@users.noreply.github.com>
21 months agoSupport a few "shifted register" operations on Arm64 (#75823)
Tanner Gooding [Tue, 27 Sep 2022 20:30:06 +0000 (13:30 -0700)]
Support a few "shifted register" operations on Arm64 (#75823)

* Refactor Lowering::IsContainableBinaryOp so node checks are simpler

* Update Lowering::ContainCheckBinary to check both operands for a commutative oper

* Updating Lowering::IsContainableBinaryOp to support some shifted register instructions

* Resolving some build failures/asserts

* Ensure IsContainableBinaryOp checks IsSafeToContainMem

* Use parentNode not node

* Ensure shifted register instructions that set flags use the right instruction

* Ensure the shift amount is checked for smaller nodes

* Apply suggestions from code review

* Apply suggestions from code review

Co-authored-by: SingleAccretion <62474226+SingleAccretion@users.noreply.github.com>
Co-authored-by: SingleAccretion <62474226+SingleAccretion@users.noreply.github.com>
21 months agoAdd more information to host writer errors
Elinor Fung [Tue, 27 Sep 2022 20:14:24 +0000 (16:14 -0400)]
Add more information to host writer errors

21 months ago[LoongArch64] Fix the assert error for `genSetRegToIcon()` (#76164)
Qiao Pengcheng [Tue, 27 Sep 2022 18:39:02 +0000 (02:39 +0800)]
[LoongArch64] Fix the assert error for `genSetRegToIcon()` (#76164)

* [LoongArch64] Fix the assert error for `genSetRegToIcon()`

* delete the `genSetRegToIcon()` for LA64.

21 months agoEnsure CreateScalarUnsafe gets constant handling on Arm64 (#76204)
Tanner Gooding [Tue, 27 Sep 2022 18:31:13 +0000 (11:31 -0700)]
Ensure CreateScalarUnsafe gets constant handling on Arm64 (#76204)

* Ensure CreateScalarUnsafe gets constant handling on Arm64

* Clear constant reg during upper vector save

* Apply formatting patch

Co-authored-by: Kunal Pathak <Kunal.Pathak@microsoft.com>
21 months agoDisabling disasm checks under certain testing environments (#76202)
Will Smith [Tue, 27 Sep 2022 16:04:11 +0000 (09:04 -0700)]
Disabling disasm checks under certain testing environments (#76202)

* Disabling disasm checks under certain testing environments

* Add extra linux musl check

* Add JitDisasm check back

* Remove JitDisasm check

* Re-enable musl

* Do not run disasm checks under stress modes

* Feedback, force a failure

* Trying to fix targets

* Trying to fix targets

* Update Runtime_34937.cs

21 months agoImprove vectorization of Enumerable.Min/Max (#76144)
Stephen Toub [Tue, 27 Sep 2022 16:02:23 +0000 (12:02 -0400)]
Improve vectorization of Enumerable.Min/Max (#76144)

- Expand it to all supported types with `Enumerable.Min<T>`/`Max<T>`
- Combine Min/Max into a single method using a static abstract interface with generic specialization to differentiate
- Use `Vector128<T>` and `Vector256<T>` instead of `Vector<T>`
- Improve test coverage

21 months ago[mono][aot] Prefer specific instances instead of gshared for methods containing stati...
Zoltan Varga [Tue, 27 Sep 2022 15:44:40 +0000 (11:44 -0400)]
[mono][aot] Prefer specific instances instead of gshared for methods containing static virtual calls. (#76033)

These calls cannot be resolved at compile time in gshared methods, so they cannot be inlined etc.
They are used in perf sensitive BCL code like SpanHelpers. To fix this, modify the AOT compiler
so in addition to the gshared versions, it emits specific instances of these methods if possible.
This only affects a small subset of gshared methods so it doesn't lead to a noticable code size increase.

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

21 months agoFix incorrect string length calculation (#76127)
Sparin [Tue, 27 Sep 2022 15:33:33 +0000 (18:33 +0300)]
Fix incorrect string length calculation (#76127)

ANSI string depends on system encoding charset. Unix's implementation of Marshal.StringToHGlobalAnsi encodes in UTF8. UTF8 characters which are out of 8-bit range (otcet) encodes in multiple bytes (otcets). ASCII characters usually are in 0x00-0x7F range but cyrillic and other characters are not. For example, 'Зфыы123;' (eq. 'Pass123$') will be encoded in 12 bytes instead of 8

Fix #76125

21 months agoImprove IPAddress to/from bytes perf (#75872)
Stephen Toub [Tue, 27 Sep 2022 15:22:32 +0000 (11:22 -0400)]
Improve IPAddress to/from bytes perf (#75872)

* Improve IPAddress to/from bytes perf

Also cleaned up some unnecessary `!`s with `MemberNotNullWhen`.

* Address PR feedback to use shifts instead of shuffle

And also simplify fallback.

* Avoid non-portable cast for big endian

21 months agoJIT: refactor and enhance the redundant branch optimizer (#76207)
Andy Ayers [Tue, 27 Sep 2022 15:17:03 +0000 (08:17 -0700)]
JIT: refactor and enhance the redundant branch optimizer (#76207)

One more preparatory step before introducing the new phi-based
disambiguation.

* handle some cases of ambiguous preds better
* split out the jump threading pre checks into a helper
* properly support updating switch preds
* generalize retry logic a bit to handle more cases

21 months agoExtend RuntimeHelpers.IsBitwiseEquatable to more types (#75640)
Stephen Toub [Tue, 27 Sep 2022 15:15:32 +0000 (11:15 -0400)]
Extend RuntimeHelpers.IsBitwiseEquatable to more types (#75640)

* Extend RuntimeHelpers.IsBitwiseEquatable to more types

Today, RuntimeHelpers.IsBitwiseEquatable is hardcoded to a fixed list of types.  This means that almost all of the vectorization we've done with arrays and spans is limited to just those types; developers can themselves use MemoryMarshal.Cast to convert spans of other types to spans of supported one, but it doesn't naturally happen.

This extends IsBitwiseEquatable a bit more. We already have a CanCompareBitsOrUseFastGetHashCode helper used by ValueType.Equals to determine whether structs that don't override Equals can be compared with the equivalent of memcmp.  This extends that same helper to be used by IsBitwiseEquatable.  However, IsBitwiseEquatable also needs to rule out types that implement `IEquatable<T>` (the existing helper doesn't because it's about the implementation of the object.Equals override where the interface doesn't come into play).

The upside of this is APIs like Array.IndexOf will now automatically vectorize with more types.  The main downside is that types which provide their own equality implementation still don't benefit, which in turn means adding an `IEquality<T>` implementation could in the future be a deoptimization (we should consider some kind of attribute or marker interface a type can use to say "I promise my equality implementation is the same as a bitwise comparison").  We also currently constrain most of our MemoryExtensions methods to types that implement `IEquatable<T>`, so there are only a handful of public methods today that benefit from this.

* Fix contract on CanCompareBitsOrUseFastGetHashCode

* Add more SequenceEqual tests

* Remove duplicative check

* Add IsBitwiseEquatable extension to ilc

* Address PR feedback

* Update src/coreclr/tools/Common/TypeSystem/IL/Stubs/ComparerIntrinsics.cs

21 months agoFix LoggerMessageGenerator parser to check for expression bodied method (#75601)
Wei Chen [Tue, 27 Sep 2022 13:53:10 +0000 (02:53 +1300)]
Fix LoggerMessageGenerator parser to check for expression bodied method (#75601)

* Check for expression bodied method

Fixed LoggerMessageGenerator parser to check for expression bodied
method and generate a proper diagnostic message.

Fix #66080

* Fix expression body in test

Fixed invalid expression body in test

21 months agoRevert "Allocate RuntimeType objects on Frozen Object Heap (#76235)
Jan Kotas [Tue, 27 Sep 2022 13:45:01 +0000 (06:45 -0700)]
Revert "Allocate RuntimeType objects on Frozen Object Heap (#76235)

* Revert "Allocate RuntimeType objects on Frozen Object Heap (#75573)"

This reverts commit 1f1231c36a9b247aaf0111496d3c0a3b3611ef15.

* Revert "don't use write barriers for frozen objects (#76135)"

This reverts commit 315bdd4c138491df154e84b98ba7fae72ca8b83b.

21 months agoUse generated runtime.json when building shared framework packages. (#76068)
Tom Deseyn [Tue, 27 Sep 2022 11:22:50 +0000 (13:22 +0200)]
Use generated runtime.json when building shared framework packages. (#76068)

* Use generated runtime.json when building shared framework packages.

* Don't UpdateRuntimeJson on Build.

* PR feedback.

* Update Microsoft.NETCore.Platforms.csproj

Co-authored-by: Viktor Hofer <viktor.hofer@microsoft.com>
21 months agoNullable annotations for System.Security.Cryptography.Xml (#67198)
Steve Dunn [Tue, 27 Sep 2022 09:53:04 +0000 (10:53 +0100)]
Nullable annotations for System.Security.Cryptography.Xml (#67198)

* First pass

* More annotations

* Rever mistaken change to test

* More annotations

* More annotations

* More annotations

* More annotations

* More annotations

* More annotations

* More annotations

* More annotations

* More annotations

* More annotations

* More annotations

* More annotations

* Remove red flag comment

* PR feedback

* Remove 'red flag' comments

* Revert unintended changes to tests

* Revert unintended changes

* PR feedback: remove redundant !'s from things that can never return null

* Added  `[MemberNotNullWhen(true, nameof(_cachedXml))]` on implementation.

* Updated ref t ypes (with `dotnet msbuild /t:GenerateReferenceAssemblySource`)

* Updated ref assembly

* PR feedback: add `MemberNotNull` attribute on `Initialize`)

* Updated ref again

* Put `MemberNotNull` attribute on the getter rather than the property in the reference file.

* PR feedback: remove MemberNotNullWhenAttribute from ref

* PR feedback: non nullable param to match method in base class

* Fix post-merge build errors

* PR feedback

* PR feedback from @bartonjs - add [DisallowNull] and cascade

* PR feedback

* PR feedback

* PR feedback

* Fix build again, by removing the `protected internal` property `CacheValid`

* PR feedback

* Added back `CacheValid` based on PR comment

* Fix issues from recent rebase

* Add `DisallowNull` attribute to ref file and remove it from `DefaultGenApiDocIds.txt`

* PR feedback

* Fix issues from recent merge

* Remove some more extraneous damnit operators

* Fix NRT analysis errors after prior rebase

* PR feedback

* PR feedback

* PR feedback

* PR feedback

* PR feedback

* CipherReference and CipherValue made to disallow null

* Make Uri non-nullable on EnctrypedReference

* Add AllowNull attribute on EncryptedType::KeyInfo

* AllowNull on EncryptedXml::Recipient

* Made baseUri nullable

* DisallowNull on PropertlyElement

* AllowNull on SignedInfo::CanonicalizationMethod

* AllowNull on SignedXml::EncryptedXml

* Fix build after recent rebase

* Remove redundant damnit operator now that https://github.com/dotnet/runtime/pull/71860 has been merged

* PR feedback

* Fix build due to change of the CanonicalXmlElement constructor

* PR feedback

* Remove redundant damnit operators

* Fix broken tests

* Fix issues after rebase

* PR feedback

* PR feedback

21 months ago74642 change isostorage path (#75541)
Meri Khamoyan [Tue, 27 Sep 2022 07:01:57 +0000 (11:01 +0400)]
74642 change isostorage path (#75541)

* #74642 changed isolated storage path for mobile platforms

21 months ago[mono] Add Vector128 AndNot intrinsic for amd64 (#74586)
Matous Kozak [Tue, 27 Sep 2022 06:51:37 +0000 (08:51 +0200)]
[mono] Add Vector128 AndNot intrinsic for amd64 (#74586)

* Vector128 AndNot

* swap operands for Vector128, block AndNot for integer types

* fix AndNot intermediate type for Vector64

* move AndNot to XBINOP from SSE

* AndNot intrinsics move check outside ifdef

* defined macro

* use different tmp variable

* Re-use OP_SSE_ANDN code

* remove space

* missing {} in SN_AndNot case

21 months agoFix spilling of `MUL_LONG` on x86 and multi-reg HWIs (#73079)
SingleAccretion [Tue, 27 Sep 2022 06:29:58 +0000 (09:29 +0300)]
Fix spilling of `MUL_LONG` on x86 and multi-reg HWIs (#73079)

* Spilling fixes

* Unspilling fixes

* Fix multi-reg HWIs

21 months ago[main] Update dependencies from dotnet/xharness dotnet/runtime-assets dotnet/runtime...
dotnet-maestro[bot] [Tue, 27 Sep 2022 03:32:36 +0000 (03:32 +0000)]
[main] Update dependencies from dotnet/xharness dotnet/runtime-assets dotnet/runtime dotnet/emsdk (#76120)

[main] Update dependencies from dotnet/xharness dotnet/runtime-assets dotnet/runtime dotnet/emsdk

21 months agoFix bugs found from static analyzer (#76160)
Hyungju Lee [Tue, 27 Sep 2022 00:44:07 +0000 (09:44 +0900)]
Fix bugs found from static analyzer (#76160)

* Fix bugs found from static analyzer

Co-authored-by: Jan Kotas <jkotas@microsoft.com>
21 months agoFix some incorrect SpecialFolder entries for Unix (#68610)
Miepee [Mon, 26 Sep 2022 22:49:59 +0000 (00:49 +0200)]
Fix some incorrect SpecialFolder entries for Unix (#68610)

* Fix incorrect SpecialFolder entries for Unix

This fixes an incorrect Documents/Personal for Linux+Mac entry,
incorrect Videos Mac entry,
and an incorrect (Local) ApplicationData Mac entry.

Fix #63214

* Don't make Unix tests assume Personal is Home

* Use the same value for Mac's (Local)ApplicationData

* Use NSPaths for OSX Special Folder

The Apple documentation recommends to use these instead of hardcoding the paths, so the paths that had NSPath equivalents have been replaced.

* Change System.Native CMakeLists to include OSX for SearchPath

`a17e73466ca639388a3d89f4d6be0ab9703802fc` made OSX call the native NSearchPath functions, however a stub was initially called. This fixes it to call the native functions.

21 months ago[mono][debugger] fix exception while decoding value that has a byref field (#75774)
Thays Grazia [Mon, 26 Sep 2022 19:45:50 +0000 (16:45 -0300)]
[mono][debugger] fix exception while decoding value that has a byref field (#75774)

* fix exception while decoding value that has a byref field

* Apply suggestions from code review

Co-authored-by: Larry Ewing <lewing@microsoft.com>
Co-authored-by: Larry Ewing <lewing@microsoft.com>
21 months agoFix assertion in corhlpr (#76189)
Kevin Gosse [Mon, 26 Sep 2022 19:03:04 +0000 (21:03 +0200)]
Fix assertion in corhlpr (#76189)

21 months agoDisallow TimeSpan.Zero in rate limiters (#75496)
Brennan [Mon, 26 Sep 2022 17:22:27 +0000 (10:22 -0700)]
Disallow TimeSpan.Zero in rate limiters (#75496)

21 months agoResolve missing triple-slash in Microsoft.Extensions.Primitives (#76098)
Nick Stanton [Mon, 26 Sep 2022 17:06:53 +0000 (10:06 -0700)]
Resolve missing triple-slash in Microsoft.Extensions.Primitives (#76098)

* Add triple slash in missing areas

* Apply suggestions from code review

Co-authored-by: Carlos Sanchez <1175054+carlossanlop@users.noreply.github.com>
* Rewrite StringSegmentCompare GetHashCode() summary

* implement GetHashCode() feedback

* change instances to objects

Co-authored-by: Carlos Sanchez <1175054+carlossanlop@users.noreply.github.com>
21 months agoRemove hardcoded limit in deserialization constructor arguments (#75982)
Eirik Tsarpalis [Mon, 26 Sep 2022 16:08:25 +0000 (19:08 +0300)]
Remove hardcoded limit in deserialization constructor arguments (#75982)

* Remove hardcoded limit in deserialization constructor arguments.

* Use correct opcode for indices >= 128

* Remove unneeeded changes

* Add reflection fallback in interpreted runtimes

* Revert "Add reflection fallback in interpreted runtimes"

This reverts commit e78ea20c532860d21bd0540a97ebfd1cf02370e3.

* disable test in interpreted mono

* Revert "disable test in interpreted mono"

This reverts commit 53f7a913b710471eadad18f50e962f0f967e07aa.

21 months ago[mono] Add Vector128 ConditionalSelect intrinsics for Amd64 (#75838)
Matous Kozak [Mon, 26 Sep 2022 15:22:07 +0000 (17:22 +0200)]
[mono] Add Vector128 ConditionalSelect intrinsics for Amd64 (#75838)

* Conditional Select for amd64, refactor arm64 code

* Add missing newline in mini-ops.h file

21 months agoFold SIMD-typed partial access to locals; delete base types from vector constants...
SingleAccretion [Mon, 26 Sep 2022 14:40:17 +0000 (17:40 +0300)]
Fold SIMD-typed partial access to locals; delete base types from vector constants (#74580)

* Fold local SIMD-typed indirs

* Introduce "canonical" SIMD handles

To be used for nodes which don't have a handle of their own.

* Remove base types from GenTreeVecCon

21 months agoDo it like in `OperatingSystem`. (#76172)
Ilona Tomkowicz [Mon, 26 Sep 2022 13:46:11 +0000 (15:46 +0200)]
Do it like in `OperatingSystem`. (#76172)

21 months agodon't use write barriers for frozen objects (#76135)
Egor Bogatov [Mon, 26 Sep 2022 12:57:03 +0000 (14:57 +0200)]
don't use write barriers for frozen objects (#76135)

21 months agoRemove most of string.Trim() usages in System.Private.Xml solution. (#75452)
Trayan Zapryanov [Mon, 26 Sep 2022 12:23:54 +0000 (15:23 +0300)]
Remove most of string.Trim() usages in System.Private.Xml solution. (#75452)

* Remove most of string.Trim() usages in Xml solution.

* Address feedback

* Add checks if input string is null

Co-authored-by: Traian Zaprianov <Traian.Zaprianov@docuware.com>
21 months agoperf-pipeline: Remove unnecessary jobs (#76111)
Ankit Jain [Mon, 26 Sep 2022 08:26:31 +0000 (04:26 -0400)]
perf-pipeline: Remove unnecessary jobs (#76111)

* perf-pipeline: Set default value for ExtraSetupArguments

Fixes `line 1: ExtraSetupArguments: command not found` when running
performance/scripts/ci_setup.py .

* perf pipeline: Disable unncessary scheduled builds

`dotnet-runtime-perf` runs:
1. batched builds
2. scheduled builds at 2:30am every night

For the 'scheduled' case, only wasm/jsc perf jobs are run.
And the rest are build jobs - wasm, mono, coreclr, and libraries.

The wasm/jsc runs are known to be broken right now, thus they can be
disabled. And since there are no other perf jobs, none of the remaining
builds are needed, thus the whole scheduled run can be disabled.

* perf-pipeline: Collect logs file from perf runs on dotnet-runtime-perf also

21 months ago[NativeAOT] Remove WeakReference.m_trackResurrection field (#76115)
Vladimir Sadov [Mon, 26 Sep 2022 06:11:26 +0000 (23:11 -0700)]
[NativeAOT] Remove WeakReference.m_trackResurrection field (#76115)

* remove m_trackResurrection field

* switch to GCHandle.Internal  for portability

* remove ENABLE_WINRT dead code

* move IsTrackResurrection

* TracksResurrectionBit

* native part

* move some parts of implementation to common

* tweak a comment

* tweak a comment

* use libraries naming conventions for _handleAndKind

* Apply suggestions from code review

Co-authored-by: Jan Kotas <jkotas@microsoft.com>
* Remove Mono and NativeAOT implementations. Move the handle field to the top of the class per coding conventions

Co-authored-by: Jan Kotas <jkotas@microsoft.com>
21 months agoEnable System.IO.FileSystem tests for native aot (#76146)
Jan Kotas [Mon, 26 Sep 2022 02:03:14 +0000 (19:03 -0700)]
Enable System.IO.FileSystem tests for native aot (#76146)

21 months agoRemove redundant tmp check (#76154)
Rose [Sun, 25 Sep 2022 21:58:38 +0000 (17:58 -0400)]
Remove redundant tmp check (#76154)

The function has an early return if tmp is ever null, so there is no need to have this check here.

21 months agoImprove List<T>.AddRange performance for enumerables (#76043)
Stephen Toub [Sun, 25 Sep 2022 21:00:36 +0000 (17:00 -0400)]
Improve List<T>.AddRange performance for enumerables (#76043)

AddRange is currently implemented as delegating to InsertRange, and InsertRange in turn has a more complicated inner loop as part of adding each item from a source enumerable into the list.  By just copying InsertRange's source into AddRange, deleting all the irrelevant stuff, and changing the Insert call to Add, throughput improves measurably.

21 months agoUpdate il range in optOptimizeBoolsUpdateTrees (#74657)
Igor Bagdamyan [Sun, 25 Sep 2022 17:06:47 +0000 (20:06 +0300)]
Update il range in optOptimizeBoolsUpdateTrees (#74657)

22 months agoDisable frequently failing CriticalFinalizer test (#76131)
Jan Kotas [Sun, 25 Sep 2022 01:34:22 +0000 (18:34 -0700)]
Disable frequently failing CriticalFinalizer test (#76131)

* Disable frequently failing CriticalFinalizer test

Contributes to #76041

* Delete coreclr specific exclusion, the test is failing everywhere

22 months agoJIT: refactor jump threading a bit (#76108)
Andy Ayers [Sun, 25 Sep 2022 00:23:29 +0000 (17:23 -0700)]
JIT: refactor jump threading a bit (#76108)

In anticipation that phi disambiguation will end up reusing the core
part of this transformation.

22 months agoDisable failing test SignedXmlTest.VerifyXmlResolver (#76129)
Karel Zikmund [Sat, 24 Sep 2022 20:58:25 +0000 (22:58 +0200)]
Disable failing test SignedXmlTest.VerifyXmlResolver (#76129)

PR #75369 tried to fix the problem and re-enabled the test, but it is still failing.
Tracked by #74115

22 months agoDelete typeof caches from CoreLib (#76126)
Jan Kotas [Sat, 24 Sep 2022 17:44:16 +0000 (10:44 -0700)]
Delete typeof caches from CoreLib (#76126)

Caching typeof is a de-optimization with frozen runtime types

22 months agoClean up of SPC to match ref assembly public surface for Mono and CoreCLR (#75954)
Marek Safar [Sat, 24 Sep 2022 17:37:02 +0000 (19:37 +0200)]
Clean up of SPC to match ref assembly public surface for Mono and CoreCLR (#75954)

* Clean up of SPC to match ref assembly public surface for Mono and CoreCLR

Contributes to #72594

* Remove TypeDependencyAttribute

Co-authored-by: Jan Kotas <jkotas@microsoft.com>
22 months agoImplement IEEE754 totalOrder comparer (#75517)
Huo Yaoyuan [Sat, 24 Sep 2022 16:28:17 +0000 (00:28 +0800)]
Implement IEEE754 totalOrder comparer (#75517)

* Basic implementation of total order

* Add public api reference

* Add basic tests

* Apply suggestions from code review

Co-authored-by: Tanner Gooding <tagoo@outlook.com>
* Update xmldoc

* Update comparison logic to save calls

* Handle order of NaN

* Implement integer comparison semantic

* Change NaN semantic in fallback comparison

* Adjust test data

* Change to struct

* Fix ApiCompat

* Manually apply suggestion from review

* Defensive for custom float-point

* Nit

* Fix comments

* Implement Equals and GetHashCode

Co-authored-by: Tanner Gooding <tagoo@outlook.com>
22 months agoFix native aot test failures (#76114)
Jan Kotas [Sat, 24 Sep 2022 13:05:07 +0000 (06:05 -0700)]
Fix native aot test failures (#76114)

* Fix native aot test failures

* Fix test failure on NativeAOT with non-English locale

* Delete duplicate and dead files

Fixes #75699

Co-authored-by: Filip Navara <filip.navara@gmail.com>
22 months agoSPMI: Add and utilize number of contexts with diffs (#76011)
Jakob Botsch Nielsen [Sat, 24 Sep 2022 07:43:48 +0000 (09:43 +0200)]
SPMI: Add and utilize number of contexts with diffs  (#76011)

Previously, if there was any diff in a collection, that collection would
be shown in all tables (i.e. Overall, FullOpts, MinOpts). The main
reason was that we only had "has diffs" information on a per-collection
basis, not for each of the categories. This changes SPMI to communicate
back for each category how many contexts had diffs in them, and uses
this to hide tables/rows without any diffs, and to show this information
under details.

22 months agoAdd back missing conv opcodes when compiling via System.Linq.Expressions (#76024)
Vlad Brezae [Sat, 24 Sep 2022 06:23:23 +0000 (09:23 +0300)]
Add back missing conv opcodes when compiling via System.Linq.Expressions (#76024)

* Add new convert tests

With expression funcs that return int32 instead of short/byte to prevent implicit conversions.

* Add back missing conv opcodes when compiling via System.Linq.Expressions

The conversion opcodes are still necessary when the sign of the value might change, in which case the conversion opcode will do a sign/zero extend to the full i32 storage used by the IL execution stack.

For example, before this change, conversions from ushort to short were ignored. Consider expressions converting the value `ushort.MaxValue` to short (testcase ConvertUShortToShortTest). `ushort.MaxValue` will be pushed to execution stack as a i32 ldc of value 0xffff. The conv.i2 opcode would change the value on the stack to 0xffffffff so it shouldn't be omitted.

22 months agoFix impIntrinsic to not raise asserts for the AltJit scenario (#76048)
Tanner Gooding [Sat, 24 Sep 2022 02:54:54 +0000 (19:54 -0700)]
Fix impIntrinsic to not raise asserts for the AltJit scenario (#76048)

* Fix impIntrinsic to not raise asserts for the AltJit scenario

* Respond to PR feedback

* Specially handle NI_Vector64/128/256_* intrinsics where not all overloads are valid

* Change the AltJit intrinsic handling so we get no asserts

* Apply suggestions from code review

Co-authored-by: Jan Kotas <jkotas@microsoft.com>
* Apply suggestions from code review

* Fixing a build error

* Applying formatting patch

Co-authored-by: Jan Kotas <jkotas@microsoft.com>
22 months ago[wasm][debugger] Support create, debugging and running wasmbrowser template from...
Thays Grazia [Fri, 23 Sep 2022 23:43:24 +0000 (20:43 -0300)]
[wasm][debugger] Support create, debugging and running wasmbrowser template from VS (#75986)

* Support create, debugging and running wasmbrowser template from VS

* addings extra line in the end of the file

* remove extra spaces

* fix compilation error

* adding extra line in the end of the file

* Addressing @lewing comment.

22 months ago[tests] Skip XslCompiledTransformApi tests on iOS, tvOS, and when testing native...
Mitchell Hwang [Fri, 23 Sep 2022 23:04:21 +0000 (19:04 -0400)]
[tests] Skip XslCompiledTransformApi tests on iOS, tvOS, and when testing native AOT (#75730)

* Skip XslCompiledTransformApi tests on iOS, tvOS, and when testing native AOT

* Condition each XslCompiledTransformApi test class on IsReflectionEmitSupported

Co-authored-by: Jan Kotas <jkotas@microsoft.com>
22 months ago[JIT] CodeGen verification testing (#75102)
Will Smith [Fri, 23 Sep 2022 22:31:05 +0000 (15:31 -0700)]
[JIT] CodeGen verification testing (#75102)

* Add test

* Add CHECKs

* Build scripts and test settings

* COMPlus -> DOTNET

* Fix filenames

* Missing >

* Missing quotes

* use %scriptPath%

* Rework properties, start two examples

* Arch demo

* Cleanup

* Remove tab

* Easier environment variables.  Undo precommand changes.

* undo blank line

* clean CHECKs

* Draft of bash

* Bash, conditionals

* More variables, start on run.cmd/sh/py

* another output

* Support in cmd/bash for RunningDisasmChecks

* copy, factor, formatting

* Initial work to include FileCheck. Added SuperFileCheck.

* Able to build SuperFileCheck

* Do not DisasmCheck TypeEquality_r for now. Update some FileChecks to follow SuperFileCheck rules.

* Partially wiring up SuperFileCheck to tests

* Piping list of method names from SuperFileCheck to JitDisasm

* Handling bash a little bit

* Moving SuperFileCheck to tests/Common

* Few tweaks

* Building SuperFileCheck as part of the test build

* Tweaking a few things

* Fixed a bug

* Moving SuperFileCheck back to src\coreclr\tools. Removed checks from TypeEquality_r.

* Restore original logic in Runtime_73681

* Trying to add CI leg for disasmchecks

* Use x64 package if x86 platform detected for JIT tools package

* Remove innerloop for disasmchecks

* Trying to fix build. Only run in Windows for now.

* Update Runtime_73681.cs

Trying to fail test

* Trying to fix build

* Update Runtime_73681.cs

* Update Runtime_73681.cs

* Fixing a few issues

* Trying to run disasmchecks as part of CI

* Trying to run disasmchecks

* Trying to run disasmchecks

* Trying to run disasmchecks

* Revert a change

* Trying to run disasmchecks

* Trying to run disasmchecks

* build SuperFileCheck on non-windows

* few tweaks

* Trying to fix CI

* Including SuperFileCheck for tests

* Cleanup

* More cleanup

* Cleanup

* Changed SuperFileCheck to not publish everything. Changed SuperFileCheck's lookup for FileCheck.

* Invoking SuperFileCheck using dotnet

* Making the test pass

* Only run disasm checks for coreclr and not mono

* Using HasBatchDisasmCheck and HasBashDisasmCheck to determine to run the check

* Enabling filecheck on linux and osx

* Added more comments

* Added ARM64 specific test. Do not run SuperFileCheck if no methods were found.

* Added documentation. Changed disasm-output.

* Minor doc tweak

* Minor doc tweak

* Minor doc tweak

* Minor doc tweak

* Minor doc tweak

* Cleanup. Trying to fix linux

* Fixing test

* Add information on additional functionality

* cleanup

* Add FileCheck snippet

* Undo environment variable changes

* Feedback from Mark

* Cleanup

* Trying to fix linux test run

* Trying to fix linux test run

* A few missing changes from the original branch

* Enable OSX for disasm checks

* cleanup / comment

* Force test failure

* Update Runtime_73681.cs

* Set env vars after errorlevel check

* Reverting back on setting environment variables in test. Added new FileCheck test for mod optimization

* Force a failure by changing the register

* Ignore native binaries for superpmi collect

* Update Runtime_34937.cs

* Force the correct failure

* Update Runtime_34937.cs

* Update Runtime_34937.cs

* Adding specific OS check prefixes. Changed dump-input context amount

* Added getting fully qualified method names with wildcards for SuperFileCheck

* More tests. Fixed a few issues with generics.

* Disabling generic support

* Error if it cannot find enclosing type declaration

* Fixing build

* Remove namespac

* Bring generics back, but in a limited form

Co-authored-by: Mark Plesko <markples@microsoft.com>