platform/upstream/dotnet/runtime.git
2 years ago[tests] Fix local test runs for mobile (#62549)
Mitchell Hwang [Thu, 9 Dec 2021 09:03:24 +0000 (04:03 -0500)]
[tests] Fix local test runs for mobile (#62549)

Co-authored-by: Mitchell Hwang <mitchell.hwang@microsoft.com>
2 years agoEscape lower-cased type names (#62507)
Julien Couvreur [Thu, 9 Dec 2021 08:05:25 +0000 (00:05 -0800)]
Escape lower-cased type names (#62507)

2 years agoPopulate NativeAOT sources from runtimelab (#62563)
Michal Strehovský [Thu, 9 Dec 2021 06:11:46 +0000 (15:11 +0900)]
Populate NativeAOT sources from runtimelab (#62563)

2 years agoPort annotations from runtimelab (#62562)
Michal Strehovský [Thu, 9 Dec 2021 05:12:59 +0000 (14:12 +0900)]
Port annotations from runtimelab (#62562)

Placing the attribute into ApiComplatExlude for now - there will be follow up work to do any necessary cleanups/propagation to non-shared parts of CoreLib before this can go into ref assemblies.

2 years agoUsing ReadOnlySpan<char> on SymbolicRegexRunner (#62542)
Jose Perez Rodriguez [Thu, 9 Dec 2021 03:12:33 +0000 (19:12 -0800)]
Using ReadOnlySpan<char> on SymbolicRegexRunner (#62542)

2 years ago[build] Create clr.host subset to remove patching step for mono runtime tests (#62500)
Nathan Ricci [Thu, 9 Dec 2021 03:07:08 +0000 (22:07 -0500)]
[build] Create clr.host subset to remove patching step for mono runtime tests (#62500)

* [build] Define a component and subset for corerun and copy mono runtime files to coreroot.

2 years agoImprove loop JitDump output (#62556)
Bruce Forstall [Thu, 9 Dec 2021 01:49:30 +0000 (17:49 -0800)]
Improve loop JitDump output (#62556)

In addition,
- Added COMPlus_JitDumpFgBlockFlags to include BasicBlock flags in the JitDumpFg ".dot" file
- Added COMPlus_JitDumpFgLoopFlags to include loop table flags in the JitDumpFg ".dot" file
- Added cLoopPtr/dLoopPtr, cLoops/dLoops debugger-used functions, and changed cLoop to call the standard dumper
- Added clrjit.natvis debugger display for LoopDsc
- Improved a few comments

No asm diffs

2 years agoSwitch over miscellaneous DllImports to GeneratedDllImport. (#62353)
Jeremy Koritzinsky [Thu, 9 Dec 2021 00:47:18 +0000 (16:47 -0800)]
Switch over miscellaneous DllImports to GeneratedDllImport. (#62353)

Co-authored-by: Aaron Robinson <arobins@microsoft.com>
2 years agoUpdate build pool to macOS 11 (#62294)
Juan Hoyos [Wed, 8 Dec 2021 23:18:41 +0000 (15:18 -0800)]
Update build pool to macOS 11 (#62294)

2 years agoDisable tests on Mac Catalyst in App Sandbox mode (#62536)
Simon Rozsival [Wed, 8 Dec 2021 22:22:13 +0000 (23:22 +0100)]
Disable tests on Mac Catalyst in App Sandbox mode (#62536)

* Run only relevat tests for app sandbox

* Fix typo

* Update src/libraries/tests.proj

Co-authored-by: Jan Kotas <jkotas@microsoft.com>
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
2 years ago[TODO-List-Cleanup] `gtHasRef` refactoring (#62526)
SingleAccretion [Wed, 8 Dec 2021 22:19:09 +0000 (01:19 +0300)]
[TODO-List-Cleanup] `gtHasRef` refactoring (#62526)

* Delete the "defOnly" parameter from "gtHasRef"

It was always passed as "false" and so effectively unused.

Additionally, the handling for it was broken, as the only
ASGs checked for were children of unary nodes, and those
do not even exist in IR (ASGs are either top-level, or
under a COMMA, or setup args).

Additionally, the meaning of "def" in IR is rather ambigious
and requires more context than just looking if it is the LHS
of an assignment, because of indirect stores with ADDR nodes.

* Use VisitOperands in gtHasRef

Allows to delete one more custom traversal.

I have measured the performance impact of this change on
a variety of IR and see that there is no change or a slight
improvement, on the order of 10%, depending on the how the
opers are distributed.

* Bring back the comment

2 years agoIntegration of changes in shared files from runtimelab/NativeAOT (#62515)
Michal Strehovský [Wed, 8 Dec 2021 21:42:14 +0000 (06:42 +0900)]
Integration of changes in shared files from runtimelab/NativeAOT (#62515)

2 years agoEnable memory-mapped stress log on cross platform (#61123)
Andrew Au [Wed, 8 Dec 2021 20:52:15 +0000 (12:52 -0800)]
Enable memory-mapped stress log on cross platform (#61123)

Co-authored-by: Adeel Mujahid <3840695+am11@users.noreply.github.com>
2 years agoFix createdump failure on MacOS Monterey version 12.0.1 (#62465)
Mike McLaughlin [Wed, 8 Dec 2021 20:32:57 +0000 (12:32 -0800)]
Fix createdump failure on MacOS Monterey version 12.0.1 (#62465)

Fix createdump failure on MacOS Monterey version 12.0.1.

Fails looking for the symbol _dyld_all_image_infos in dylinker. The fix is to fallback to searching all the symbols after searching the "external" symbols.

Issue: https://github.com/dotnet/runtime/issues/62181

2 years agoJIT: refactor arm64 epilog generation (#62381)
Andy Ayers [Wed, 8 Dec 2021 19:54:46 +0000 (11:54 -0800)]
JIT: refactor arm64 epilog generation (#62381)

Instead of rederiving the frame type for epilog generation, use the
frame type (and other info) we derived during prolog generation.

This is done in anticipation of creating OSR epilogs, where we will
need aspects of epilog sequences for both the OSR method and the Tier0
method, and they may have different frame types.

2 years agoDelete gtEvalSizeFirst (#62330)
SingleAccretion [Wed, 8 Dec 2021 19:22:55 +0000 (22:22 +0300)]
Delete gtEvalSizeFirst (#62330)

The gtEvalSizeFirst special ordering case for dynamic block nodes
was originally introduced to ensure the changes were zero-diff.

However, it seems it does not pay for the complexity it introduces.
The dynamic block nodes are very rare, rarer still are cases when
we do actually make use of this mechanism, and practically non-existent
are cases where it matters (this is a rather minor optimization,
after all).

In fact, it appears it matters so little that this change is a
zero-diff one across all of SPMI...

2 years agoPort changes from 6.0 for future servicing releases into main (#62469)
Santiago Fernandez Madero [Wed, 8 Dec 2021 19:14:29 +0000 (13:14 -0600)]
Port changes from 6.0 for future servicing releases into main (#62469)

* Port changes from 6.0 for future servicing releases into main

* Include another change needed for servicing

* PR Feedback

2 years agoCI matrix: add openSUSE 15.2 - second attempt (#60161)
Jan Jahoda [Wed, 8 Dec 2021 17:17:08 +0000 (18:17 +0100)]
CI matrix: add openSUSE 15.2 - second attempt (#60161)

* CI matrix: add openSUSE 15.2 (#59574)

* Update opensuse docker image

* Add experimentaly another filte to the PR to trigger suse build

* Update eng/pipelines/libraries/helix.yml

Co-authored-by: Santiago Fernandez Madero <safern@microsoft.com>
2 years ago[mono][jit] Fix and optimize llvmonly+gsharedvt code generation (#61117)
Zoltan Varga [Wed, 8 Dec 2021 16:09:06 +0000 (11:09 -0500)]
[mono][jit] Fix and optimize llvmonly+gsharedvt code generation (#61117)

* [mono][jit] Revert parts of 62eafc1e67d332b902772065cb36b3c51c40c732.

The new approach doesn't work because it requires gsharedvt out
wrappers with signatures which might not exist in the program.

* Fix interp->aot calls to gsharedvt methods, they don't need a gsharedvt out wrapper.

* Fix the initialization of info->invoke_impl in mini_llvmonly_init_delegate (). Also initialize del->method there instead of doing it in generated code.

* Fix interp entry for gsharedvt methods.

* Extract vtable.interp_vtable into a MonoVTableEEData structure so more per-vtable ee data can be added later.

* Enable gsharedvt on wasm as an experiment.

* Add a fastpath for gsharedvt virtual calls.

* Fix/optimize interp entries for methods which cannot be AOTed.

* Instead of obtaining the interp entry wrapper using a JIT icall,
  store it as an AOT constant/rgctx entry.
* For gsharedvt methods, collect the arguments and call into
  the interpreter directly instead of using a gsharedvt out
  + interp entry wrapper.

* [mono][jit] Avoid computing a vtable arg for ctors which don't need it.

This can happen if the ctor is implemented as an intrinsics like
System.ByReference ().

* [mono][jit] Allow inline rgctx fetches during some parts of the decompose pass.

* [mono][jit] Add more specialized imt functions in llvmonly mode.

* [mono][aot] Fix the addition of generic methods from profiles.

Same as 0666ebc475871c27f5b9d4ee8e91922f20be46e9 but for generic methods.

* Disable gsharedvt on wasm.

2 years agoOptimize ReadOnlyTernaryTree for System.Private.Xml (#60076)
kronic [Wed, 8 Dec 2021 15:10:11 +0000 (18:10 +0300)]
Optimize ReadOnlyTernaryTree for System.Private.Xml (#60076)

* change generator

* generate code

* Refactoring FindElementProperty, FindAttributeProperty

* fix method FindCaseInsensitiveString scope

* move enum TernaryTreeByte and fix scope

* fix naming in enum TernaryTreeByte

* use ROS in FindElementProperty, FindAttributeProperty

* genarate code

* minor refactoring HtmlRawTextWriterGenerator.ttinclude

* generate code

Co-authored-by: kronic <kronic@softland.ru>
2 years agoMark static boxes as invariant (#62298)
SingleAccretion [Wed, 8 Dec 2021 13:37:06 +0000 (16:37 +0300)]
Mark static boxes as invariant (#62298)

This will be needed to make the upcoming changes to how
we parse the field sequences for boxed statics zero-diff.

It also happens to be a CQ improvement on its own.

2 years ago[wasm][debugger] View object attributes - DebugType=full (#62278)
Thays Grazia [Wed, 8 Dec 2021 13:12:03 +0000 (10:12 -0300)]
[wasm][debugger] View object attributes - DebugType=full (#62278)

* Fix view variable values from an assembly with debugType = full

* Addressing @ilonatommy comment.

* Adding the csproj for the new test.

* Adressing @radical comments.

* Apply suggestions from code review

Co-authored-by: Ankit Jain <radical@gmail.com>
* Removing method duplicated.
Keep peReader as an attribute as is recommended in the documentation. https://docs.microsoft.com/en-us/dotnet/api/system.reflection.metadata.pereaderextensions.getmetadatareader?view=net-6.0#System_Reflection_Metadata_PEReaderExtensions_GetMetadataReader_System_Reflection_PortableExecutable_PEReader_

* Calling Runtime.consoleAPICalled.

* addressing @radical comment.

Co-authored-by: Ankit Jain <radical@gmail.com>
2 years agoUnblock tests in LINQ interpreter only mode (#62463)
Michal Strehovský [Wed, 8 Dec 2021 08:10:20 +0000 (17:10 +0900)]
Unblock tests in LINQ interpreter only mode (#62463)

These tests were blocked for interpreter in #54970, but the failures don't repro when run with interpreter only on CoreCLR. The failures are specific to iDevices.

2 years agoS.IO.StringReader: Use ReadOnlySpan.IndexOfAny in ReadLine() for performance (#60463)
nietras [Wed, 8 Dec 2021 07:59:26 +0000 (08:59 +0100)]
S.IO.StringReader: Use ReadOnlySpan.IndexOfAny in ReadLine() for performance (#60463)

Co-authored-by: Adam Sitnik <adam.sitnik@gmail.com>
Co-authored-by: Stephen Toub <stoub@microsoft.com>
2 years agoEnable max warnlevel from C# compiler (#62506)
Julien Couvreur [Wed, 8 Dec 2021 06:38:12 +0000 (22:38 -0800)]
Enable max warnlevel from C# compiler (#62506)

2 years agoConvert TryGetRawMetadata comment to XML documentation (#61515)
Petr Onderka [Wed, 8 Dec 2021 06:13:42 +0000 (07:13 +0100)]
Convert TryGetRawMetadata comment to XML documentation (#61515)

2 years agoDisable DispatchProxyTests.Test_Unloadability on Mono (#62504)
Aleksey Kliger (λgeek) [Wed, 8 Dec 2021 02:58:05 +0000 (21:58 -0500)]
Disable DispatchProxyTests.Test_Unloadability on Mono (#62504)

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

Collectible ALCs aren't collected yet

2 years agoAdd Runtime portion of android startup scenario (#61861)
Parker Bibus [Wed, 8 Dec 2021 00:27:04 +0000 (18:27 -0600)]
Add Runtime portion of android startup scenario (#61861)

Add app with debug instrumentation build and download. Add android scenario calls and include xharness.

Co-authored-by: Bill Wert <billwert@microsoft.com>
2 years agoonly trigger compatibility mode when usage and configuration are global (#62488)
Pavel Savara [Tue, 7 Dec 2021 20:52:08 +0000 (21:52 +0100)]
only trigger compatibility mode when usage and configuration are global (#62488)

2 years agoSupport Process.Start() on MacCatalyst (#61507)
Simon Rozsival [Tue, 7 Dec 2021 19:33:38 +0000 (20:33 +0100)]
Support Process.Start() on MacCatalyst (#61507)

* Modify existing tests

* Enable process start and kill on MacCatalyst

* Typo

* Temporarily enable ProcessTests for MacCatalyst

* Temporarily enable ProcessTests for MacCatalyst - attempt 2

* Allow running Mac Catalyst builds in App Sandbox

* Allow enabling app sandbox for the other Mac Catalyst sample

* Add missing parameter to XCode project generator

* Remove unnecessary MacCatalyst detection

* Enable App Sandbox for Mac Catalyst tests

* Create a separate test branch for App Sandbox

* Remove the restriction to enable app sandbox just for Mac Catalyst apps

* Do not throw PNSE for Mac Catalyst

* Clean-up platform-specific conditions

* Build correct Process implementation for MacCatalyst

* Try to get more information from CI for further investigation of the failing build

* Revert "Try to get more information from CI for further investigation of the failing build"

This reverts commit fc63a370d688aa0d1dc890e6928a8d031d148e56.

* Add MacCatalyst target framework for System.Diagnostics.Process

* Add supported platform annotations for Mac Catalyst

* Fix annotations

* Remove incorrectly placed attributes

* Update attributes including the reference file

* Change platform attributes

* Generate app.entitlements in the BuildAppleAppBundles test build target

* Revert "Generate app.entitlements in the BuildAppleAppBundles test build target"

This reverts commit abbe2241586e3469c3d3e9d4ecd2cea2e09d3641.

* Enable AppSandbox when generating CMakeLists.txt for libraries tests

* Try implementing a workaround for app sandbox mode

* Fix app sandbox detection bug

* Add explanation comment

* Enable more tests for MacCatalyst

* Add apple app builder input validation

* Add Mac Catalyst w/ App Sandbox enabled to runtime-manual test pipeline

* Enable networking in App Sandbox mode

* Skip test which won't work on Mac Catalyst

* Skip some tests in app sandbox mode

* Update src/tasks/AppleAppBuilder/AppleAppBuilder.cs

Co-authored-by: Alexander Köplinger <alex.koeplinger@outlook.com>
* Add a clarification comment for a networking entitlement

* Simplify supported platform condition

* Remove temporarily enabled test

* Remove unnecessary attributes

* Replace checking env variable with checking errno in libproc

* Update docs

* Remove unnecessary changes

* Temporarily enable running System.Diagnostics.Process.Tests for this PR

This reverts commit 02d370c2cf730bf67a3cf6fca8fcb8c5e4ff1ccd.

* Revert "Temporarily enable running System.Diagnostics.Process.Tests for this PR"

This reverts commit dc72f0f1d068314317d088d33ec87f9aa6447854.

* Fix job suffix in runtime-manual

* Remove attributes

* Revert "Remove attributes"

This reverts commit 704e9fa73cd40854d1becc2889569bab3c47d62d.

* Try changing the order of attributes to please CI

* Update ApiCompat baseline

* ApiCompat step 1: remove all attributes for MaxWorkingSet setter

* Revert "Update ApiCompat baseline"

This reverts commit a2ad03207c5f9f40b9dd2c335a1b0f31c37a0ac5.

* Revert "ApiCompat step 1: remove all attributes for MaxWorkingSet setter"

This reverts commit be72a3d2564afb89a83198ef010b3d4622799601.

* Update ApiCompat baseline

* Update ApiCompat baseline after pulling upstream main

* Remove trailing whitespace

Co-authored-by: Alexander Köplinger <alex.koeplinger@outlook.com>
2 years agoUpdate area owners: carlossanlop changes area pods (#62495)
Jeff Handley [Tue, 7 Dec 2021 19:31:10 +0000 (11:31 -0800)]
Update area owners: carlossanlop changes area pods (#62495)

2 years ago[mono] Fix samples building against from TFM (#62491)
Alexander Köplinger [Tue, 7 Dec 2021 18:35:27 +0000 (19:35 +0100)]
[mono] Fix samples building against from TFM (#62491)

They were building against NetCoreAppToolCurrentVersion which is net6.0 instead of net7.0 and that caused the runtime pack from nuget.org to be used instead of the live-built binaries since the override in targetingpacks.targets no longer kicked in.

2 years ago[mono] Remove unused defines from config.h.in (#62490)
Alexander Köplinger [Tue, 7 Dec 2021 18:00:47 +0000 (19:00 +0100)]
[mono] Remove unused defines from config.h.in (#62490)

We're not actually using them in the code and not checking for the function existence in configure.cmake so they're a no-op.

2 years agoRemove #ifs in System.ComponentModel.TypeConverter (#62364)
Badre BSAILA [Tue, 7 Dec 2021 17:27:54 +0000 (18:27 +0100)]
Remove #ifs in System.ComponentModel.TypeConverter (#62364)

Make 2 scenarios work like they did on .NET Framework:

1. Skipping GuidAttribute and InterfaceTypeAttribute on interfaces.
2. GetExtenderProviders checks `component.Site.Container` for extenders

* Remove #ifs in System.ComponentModel.TypeConverter

* use reflection instead of making internals visible to test assembly

* make pass broken trimming test

* drop reflection

2 years agoNotepad with uppercase (#62487)
Dan Moseley [Tue, 7 Dec 2021 16:55:18 +0000 (09:55 -0700)]
Notepad with uppercase (#62487)

2 years agodon't run CanZipNamedPipe test on iOS/tvOS (#62477)
Adam Sitnik [Tue, 7 Dec 2021 16:18:59 +0000 (17:18 +0100)]
don't run CanZipNamedPipe test on iOS/tvOS (#62477)

* don't run the test on iOS/tvOS

* disable the buffering as originally intended https://github.com/dotnet/runtime/pull/62240/files#r761093748

2 years agoIssue 55685 processname optimisation (#59672)
Steve Dunn [Tue, 7 Dec 2021 16:15:15 +0000 (16:15 +0000)]
Issue 55685 processname optimisation (#59672)

Co-authored-by: Adam Sitnik <adam.sitnik@gmail.com>
2 years agoFix perf issues discovered in "For software performance, can you always trust inlinin...
Egor Bogatov [Tue, 7 Dec 2021 15:27:58 +0000 (18:27 +0300)]
Fix perf issues discovered in "For software performance, can you always trust inlining" blog (#61408)

2 years agoUpdate windows-requirements.md (#62476)
Steve Dunn [Tue, 7 Dec 2021 14:46:42 +0000 (14:46 +0000)]
Update windows-requirements.md (#62476)

* Update windows-requirements.md

* Update docs/workflow/requirements/windows-requirements.md

Co-authored-by: Stephen Toub <stoub@microsoft.com>
Co-authored-by: Dan Moseley <danmose@microsoft.com>
Co-authored-by: Stephen Toub <stoub@microsoft.com>
2 years agoMore cleanup for source generator (#62461)
Stephen Toub [Tue, 7 Dec 2021 14:32:08 +0000 (09:32 -0500)]
More cleanup for source generator (#62461)

* More cleanup for source generator

- Add more comments, both to the implementation and to the generated code
- Avoid an unnecessary goto in the last branch of an alternation
- Invert the backreference logic so that we don't have an extra else branch / level of nesting in the common case
- Add node type asserts to all EmitXx functions
- Move the open-coded uncapture loop into its own shared function
- Remove scoping when outputting a Nothing
- Swap the sides of some if clauses to make them more idiomatic
- Change some "if (i < 1)" to "if (i == 0)"
- Change some "if (0 < span.Length)" to be "if (!span.IsEmpty)"

* Fix renames across RegexCompiler / source generator

2 years agoOptimize XmlTextEncoder.Write (#61773)
kronic [Tue, 7 Dec 2021 14:09:29 +0000 (17:09 +0300)]
Optimize XmlTextEncoder.Write (#61773)

* Optimize

* str->ros

* remove comment

* remove offset, count

* chunkSize to local

* Remove WriteStringFragment

* cleanup usings

* fix nullability

* optimize empty string

* Use ReadOnlySpan<char>

Co-authored-by: kronic <kronic@softland.ru>
2 years agoClean up symlink tests (#62087)
Dan Moseley [Tue, 7 Dec 2021 09:49:54 +0000 (02:49 -0700)]
Clean up symlink tests (#62087)

2 years ago[arm64] JIT: X % 2 == 0 -> X & 1 == 0 (#62399)
Egor Bogatov [Tue, 7 Dec 2021 09:01:17 +0000 (12:01 +0300)]
[arm64] JIT: X % 2 == 0 -> X & 1 == 0 (#62399)

2 years agoConvert System.DirectoryServices.Protocols and System.Drawing.Common to use Generated...
Jeremy Koritzinsky [Tue, 7 Dec 2021 05:09:15 +0000 (21:09 -0800)]
Convert System.DirectoryServices.Protocols and System.Drawing.Common to use GeneratedDllImport (#62365)

2 years agoEnsure all types are loaded when methods are accessed as function pointers (#62158)
Aaron Robinson [Tue, 7 Dec 2021 03:03:03 +0000 (19:03 -0800)]
Ensure all types are loaded when methods are accessed as function pointers (#62158)

* Ensure all types are loaded when methods are accessed as function pointers.

* Fix issues with Type punning with Type Equivalence.

* Add support for Generic instantiation over Canon for type punning.

2 years agoSymlink for dotnet host should be created at build time (#62455)
Nikola Milosavljevic [Tue, 7 Dec 2021 02:40:50 +0000 (18:40 -0800)]
Symlink for dotnet host should be created at build time (#62455)

* Create symlink at build time

* Pick up latest Installers package from Arcade

2 years agoRenaming some local variables to make the generated code more readable (#62460)
Jose Perez Rodriguez [Tue, 7 Dec 2021 02:32:04 +0000 (18:32 -0800)]
Renaming some local variables to make the generated code more readable (#62460)

* Renaming some local variables to make the generated code more readable

* Renaming crawlpos as well.

2 years agoFix Some Date and Time parsing cases (#62376)
Tarek Mahmoud Sayed [Tue, 7 Dec 2021 01:43:32 +0000 (17:43 -0800)]
Fix Some Date and Time parsing cases (#62376)

* Fix Some Date and Time parsing cases

* Avoid running the new test on Mac

* Exclude the browser for the new test

* Update src/libraries/System.Private.CoreLib/src/System/Globalization/DateTimeParse.cs

Co-authored-by: Santiago Fernandez Madero <safern@microsoft.com>
2 years agoFollow up to universal System.Linq.Expressions (#62229)
Michal Strehovský [Tue, 7 Dec 2021 00:20:12 +0000 (09:20 +0900)]
Follow up to universal System.Linq.Expressions (#62229)

2 years agoFix the presence of managed build logs on Windows (#62446)
Tomáš Rylek [Mon, 6 Dec 2021 21:29:36 +0000 (22:29 +0100)]
Fix the presence of managed build logs on Windows (#62446)

When analyzing PR failures I noticed that the log / wrn / err / binlog
combo only gets produced on Unix runs. I think this is also a bug
I made in the build script refactoring, the logging parameters
were used for the cmake build instead of the managed build.
[I can add a second set of logging parameters for the cmake build
phase if needed but I believe it wasn't there before my change.]

Thanks

Tomas

2 years agoFix for `cor.h(1951,8): error C2665: 'CorSigUncompressData': none of the 3 overloads...
Mikhail Pilin [Mon, 6 Dec 2021 21:15:55 +0000 (22:15 +0100)]
Fix for `cor.h(1951,8): error C2665: 'CorSigUncompressData': none of the 3 overloads could convert all the argument types` on VS2019 with warning level 4. (#60967)

2 years ago[wasm] load dotnet.js with import in tests (#62415)
Pavel Savara [Mon, 6 Dec 2021 21:13:56 +0000 (22:13 +0100)]
[wasm] load dotnet.js with import in tests (#62415)

* load dotnet.js with import in tests
* fix proxy fail and handle errors of this type
* feedback

2 years agoSome more Regex cleanup and optimization (mostly source generator) (#62426)
Stephen Toub [Mon, 6 Dec 2021 20:41:56 +0000 (15:41 -0500)]
Some more Regex cleanup and optimization (mostly source generator) (#62426)

* Reduce (?!) to nothing

The expression "(?!)" (an empty negative lookahead) is sometimes used in expressions at a point where we want to match nothing and thus fail a match, often in combination with a conditional operation.  This negative lookahead wrapped around an empty can be reduced to simply a Nothing, which is cheaper to process.

* Special-case an empty pattern in the source generator

* Output more idiomatic C# for some backreference conditionals

We currently output goto-based code, avoiding an actual if/else construct in case the child branches need to backtrack (and with the forced scoping for the if/else blocks, backtracking would result in compilation failures due to trying to jump to labels defined inside those scopes).  But if we know in advance that no such backtracking will happen, we can output the nicer if/else code.

* Improve code generated for backreferences

We were iterating through each individual character in our own open-coded loop, but for case-sensitive, we can just delegate to SequenceEqual.

* Avoid mutating RegexNode tree for expression conditionals

Rather than wrapping a node in a new positive lookahead assertion node, just call the logic to emit the node as if it were a positive lookahead.

* Change a few -1 comparisons to be 0 comparisons

Ever so slightly cheaper

* Factor stack pushing/popping into helper methods

2 years agoDisable Rollup warning for use of eval. (#62432)
Marek Fišera [Mon, 6 Dec 2021 19:47:08 +0000 (20:47 +0100)]
Disable Rollup warning for use of eval. (#62432)

2 years agoClarifying a comment in genFMAIntrinsic (#62439)
Tanner Gooding [Mon, 6 Dec 2021 19:33:26 +0000 (11:33 -0800)]
Clarifying a comment in genFMAIntrinsic (#62439)

2 years agoRevise the Regex description output in source (#62369)
Stephen Toub [Mon, 6 Dec 2021 18:58:53 +0000 (13:58 -0500)]
Revise the Regex description output in source (#62369)

* Improve comments in generated Regex code

To help make the generated code easier to understand and debug.

* Format RegexOptions textually when possible

2 years agoFix SuperPMI unit test 'strip' behavior (#62373)
Bruce Forstall [Mon, 6 Dec 2021 18:41:13 +0000 (10:41 -0800)]
Fix SuperPMI unit test 'strip' behavior (#62373)

In the case where replay of a test collection contains MISSING items,
or other SuperPMI replay failures, we strip the failing method contexts
from the result. This is very rare in the test scenario, but does happen
mostly (presumably) due to SuperPMI tool bugs. However, the strip command
wasn't actually being passed the set of things to strip, so it was just
doing a straight copy. Thus, we ended up failing the "clean replay" because
the failing MCs were still in the collection.

The test has had this problem for a long time, and it looks like it has
periodically hit in testing, but we haven't had bugs opened on these failures,
so we haven't noticed.

2 years agoEnsure that FMA codegen operand swapping matches the lsra selections (#62382)
Tanner Gooding [Mon, 6 Dec 2021 16:26:25 +0000 (08:26 -0800)]
Ensure that FMA codegen operand swapping matches the lsra selections (#62382)

* Ensure that FMA codegen operand swapping matches the lsra selections

* Ensure operands end up in the right slots

2 years ago[wasm] benchmark sample modularized (#62395)
Pavel Savara [Mon, 6 Dec 2021 15:50:32 +0000 (16:50 +0100)]
[wasm] benchmark sample modularized (#62395)

- silence errors before aborting the iframe
- separate iframe code
Co-authored-by: Radek Doulik <radek.doulik@gmail.com>
2 years ago[mono][wasm] Fix an issue with the passing of small vtypes. (#62400)
Zoltan Varga [Mon, 6 Dec 2021 15:45:06 +0000 (10:45 -0500)]
[mono][wasm] Fix an issue with the passing of small vtypes. (#62400)

* [mono][wasm] Fix an issue with the passing of small vtypes.

Fixes an issue introduced by 915ee6db9cb871bb2ef32698015bca0f2c895ce8.

* Reenable tests.

* Enable the tests for windows/aot also

Co-authored-by: Ankit Jain <radical@gmail.com>
2 years ago[wasm] Work around the browser having a lower timer resolution than the (#62411)
Ankit Jain [Mon, 6 Dec 2021 14:53:52 +0000 (14:53 +0000)]
[wasm] Work around the browser having a lower timer resolution than the (#62411)

.. desktop. Earlier we did this for one test, but others are hitting
this issue randomly too. New one:

```
[00:32:41] fail: [FAIL] System.Diagnostics.Tests.StopwatchTests.StartNewAndReset
[00:32:41] info: Assert.True() Failure
[00:32:41] info: Expected: True
[00:32:41] info: Actual:   False
[00:32:41] info:    at System.Diagnostics.Tests.StopwatchTests.StartNewAndReset()
[00:32:41] info:    at System.Reflection.RuntimeMethodInfo.InvokeWorker(Object obj, BindingFlags invokeAttr, Span`1 parameters)
```

Issue: https://github.com/dotnet/runtime/issues/62021

2 years agoFilter blocks to be used for hiding alignment instruction (#62262)
Kunal Pathak [Mon, 6 Dec 2021 14:46:54 +0000 (06:46 -0800)]
Filter blocks to be used for hiding alignment instruction (#62262)

* fix for #61899

* proper fix

* Fix for #62238

* misc change

* Revert "fix for #61899"

This reverts commit 1fc26a53a943fdb6eed262cc0fc86cdf388772c8.

* fix formatting

* fix formatting once again

* add validJumpKind check

* review comments

2 years agoMove FabricBot rules to Config-As-Code (#62297)
Eirik Tsarpalis [Mon, 6 Dec 2021 12:24:17 +0000 (12:24 +0000)]
Move FabricBot rules to Config-As-Code (#62297)

* Move FabricBot rules to Configuration-As-Code

* Update docs/infra/automation.md

Co-authored-by: Dan Moseley <danmose@microsoft.com>
* update FabricBot dump to most recent version

Co-authored-by: Dan Moseley <danmose@microsoft.com>
2 years agoforce versioned dotnet.d.ts to always have unix style end of line (#62418)
Pavel Savara [Mon, 6 Dec 2021 09:34:16 +0000 (10:34 +0100)]
force versioned dotnet.d.ts to always have unix style end of line (#62418)

2 years ago[wasm] Re-enable windows wasm AOT tests (#62352)
Ankit Jain [Sun, 5 Dec 2021 01:15:39 +0000 (01:15 +0000)]
[wasm] Re-enable windows wasm AOT tests (#62352)

They had been disabled earlier because of #61721

2 years agoFixes an issue with FeatureSIMD=0 and ArmBase.Yield (#62351)
Egor Chesakov [Sat, 4 Dec 2021 23:11:21 +0000 (15:11 -0800)]
Fixes an issue with FeatureSIMD=0 and ArmBase.Yield (#62351)

* Mark ArmBase.Yiels with HW_Flag_NoFloatingPointUsed in src/coreclr/jit/hwintrinsiclistarm64.h

* Move handling of ArmBase.Yield to an earlier point in impSpecialIntrinsic and simplify the remaining logic in src/coreclr/jit/hwintrinsicarm64.cpp

* Address feedback

2 years agoChange assert in NewPutArg(), so it is consistent with transformation done by fgMorph...
Egor Chesakov [Sat, 4 Dec 2021 23:10:55 +0000 (15:10 -0800)]
Change assert in NewPutArg(), so it is consistent with transformation done by fgMorphArgs() (#62379)

* Add regression test for https://github.com/dotnet/runtime/issues/62249

* On Arm32 FEATURE_SIMD is not supported, hence varTypeIsSIMD() always returns false.
Change the assert, so it checks that the argument type is TYP_DOUBLE in Lowering::NewPutArg() in src/coreclr/jit/lower.cpp

* Fix GCC error

2 years agoMake copynative use nested msbuild out-of-proc executions (#62404)
Tomáš Rylek [Sat, 4 Dec 2021 22:56:44 +0000 (23:56 +0100)]
Make copynative use nested msbuild out-of-proc executions (#62404)

I recently noticed that the copynative step often takes an
excessive amount of time (up to 20 minutes). I tracked this down
to a deficiency caused by my summer cleanup of the test build
scripts - in the copynative step we should also use out-of-proc
msbuild executions for the individual test groups otherwise msbuild
chokes on the huge number of properties and slows down dramatically.

Thanks

Tomas

2 years agoAdd regex test for parsing runtime-assets expressions (#62344)
Stephen Toub [Sat, 4 Dec 2021 21:11:00 +0000 (16:11 -0500)]
Add regex test for parsing runtime-assets expressions (#62344)

* Add regex test for parsing runtime-assets expressions

* Address PR feedback

2 years agoDisable TestIgnoreCaseRelation test
Stephen Toub [Sat, 4 Dec 2021 21:10:37 +0000 (16:10 -0500)]
Disable TestIgnoreCaseRelation test

2 years agoFix re-initialization of hash objects on CNG.
Kevin Jones [Sat, 4 Dec 2021 20:54:53 +0000 (15:54 -0500)]
Fix re-initialization of hash objects on CNG.

In .NET 6, we added "real" support for Initialize on hash objects.
However, the Reset call would create a new hash object without the CNG
"resuable" flag. This led to the HashProvider's "_reusable" field and
the actual reusability of the hash instance to disagree.

2 years agoRemove explicit Exe output types from tests without Main (#62361)
Tomáš Rylek [Sat, 4 Dec 2021 20:41:12 +0000 (21:41 +0100)]
Remove explicit Exe output types from tests without Main (#62361)

These three projects apparently already use the [Fact] model;
this causes trouble in the switch-over to support new-style merged
test wrappers as the system believes these are standalone tests
due to the explicit Exe output type specification and and they fail
to provide a Main method. Thanks to Jeremy's source generation
change we can now tag them as "new-style tests".

Thanks

Tomas

2 years agoSmall fix for Crossgen2 execution on Windows (#62358)
Tomáš Rylek [Sat, 4 Dec 2021 18:44:31 +0000 (19:44 +0100)]
Small fix for Crossgen2 execution on Windows (#62358)

During my work on runtime test refactoring I noticed that when
CG2-compiling the merged test, the component assemblies end up
with an ever-increasing reference list. I tracked it down to this
poorly placed environment variable update.

Thanks

Tomas

2 years agoUpdate previous netcoreapp version to run API Compat against 6.0 ref pack (#61437)
Santiago Fernandez Madero [Sat, 4 Dec 2021 16:28:33 +0000 (10:28 -0600)]
Update previous netcoreapp version to run API Compat against 6.0 ref pack (#61437)

2 years ago[wasm] Build improvements, and fixes (#61581)
Ankit Jain [Sat, 4 Dec 2021 06:48:02 +0000 (06:48 +0000)]
[wasm] Build improvements, and fixes (#61581)

Includes:
- Better error logging, and handling
- Add @(NativeFileReference) to up-to-date check items for VS
- Add `WasmBuild.sln`
- Better fix up of symbol names for pinvokes, and callbacks, based on @lambdageek's suggestion in https://github.com/dotnet/runtime/pull/60814#discussion_r736903990

Fixes dotnet#60862

2 years agoJIT: three fixes for OSR (#62367)
Andy Ayers [Sat, 4 Dec 2021 03:41:55 +0000 (19:41 -0800)]
JIT: three fixes for OSR (#62367)

Found when trying to enable OSR by default and prospecting for arm64 support.

* Explicitly initalize the OSR step variable.
* Prevent `fgOptimizeUncondBranchToSimpleCond` from changing the scratch entry
  BB to have conditional flow.
* Retain runtime supplied patchpoint info when cleaning up after an altjit failure.

2 years agoUse Spans on Go() methods for Code Gen engines (#62324)
Jose Perez Rodriguez [Sat, 4 Dec 2021 02:45:02 +0000 (18:45 -0800)]
Use Spans on Go() methods for Code Gen engines (#62324)

* Use Spans on Emitter Go() methods

* Use Spans on Compiler Go() methods

* Rename localSpan to slice in order to avoid confusion with runtextSpan

2 years agoFix superpmi.exe handling of exclusion lists (#62349)
Bruce Forstall [Fri, 3 Dec 2021 23:44:37 +0000 (15:44 -0800)]
Fix superpmi.exe handling of exclusion lists (#62349)

superpmi.exe has the concept of an exclusion list file which is automatically read
and processed when reading a .mch file. (I'm not sure if anyone actually uses it.)
So, when opening a `t.mch` file, it looks for an adjacent `t.mch.exc` and then `t.exc`
file.

There was a bug where it would also look for a `t` file (the comments say it takes t.exc.mch
and looks for t.exc, but it didn't check for that). In my case when I was testing, I actually
had a `t` directory (not file), which it found, but then emitted an error trying to load.

So, two fixes:
1. For `t.mch`, don't look for `t`.
2. Check all cases for being a directory, and fail if any name is a directory.

2 years agoAlways create the zip folder to upload (#62368)
Kunal Pathak [Fri, 3 Dec 2021 23:32:18 +0000 (15:32 -0800)]
Always create the zip folder to upload (#62368)

2 years agoAdd RateLimiting APIs (#61788)
Brennan [Fri, 3 Dec 2021 23:06:44 +0000 (15:06 -0800)]
Add RateLimiting APIs (#61788)

2 years agoFix superpmi.py collect script (#62347)
Bruce Forstall [Fri, 3 Dec 2021 22:45:29 +0000 (14:45 -0800)]
Fix superpmi.py collect script (#62347)

Collect also does a replay, so needs all the replay arguments set to something.
Fixes this error: `'CoreclrArguments' object has no attribute 'compile'`

2 years agoDelete old code generation approach from RegexCompiler / source generator (#62318)
Stephen Toub [Fri, 3 Dec 2021 22:09:51 +0000 (17:09 -0500)]
Delete old code generation approach from RegexCompiler / source generator (#62318)

* Delete old code generation approach from RegexCompiler / source generator

In .NET Framework and up through .NET Core 3.1, the code generated for RegexOptions.Compiler was effectively an unrolled version of what RegexInterpreter would process.  The RegexNode tree would be turned into a series of opcodes via RegexWriter; the interpreter would then sit in a loop processing those opcodes, and the RegexCompiler iterates through the opcodes generating code for each equivalent to what the interpreter would do but with some decisions made at compile-time rather than at run-time.  This approach, however, leads to complicated code that's not pay-for-play (e.g. a big backtracking jump table that all compilations go through even if there's no backtracking), that doesn't factor in the shape of the tree (e.g. it's difficult to add optimizations based on interactions between nodes in the graph), and that doesn't read well when emitted as C# instead of IL as part of the source generator.  In .NET 5, we started adding an alternative implementation that processed the RegexNode tree directly, addressing all of those cited issues; however, it only worked for a subset of expressions, namely those with little-to-no backtracking (e.g. non-atomic loops and alternations weren't supported).  Since then, we've improved it to the point where everything other than RegexOptions.RightToLeft (which implicitly means lookbehinds as well) is supported, and we've agreed it's ok to drop compilation for those constructs; if they ever become an issue, we can add support for them via the new compilation scheme.

As such, this PR:
- Deletes all of the code associated with the older code generation scheme
- Updates the Regex ctor to fall back to selecting the interpreter if the expression can't be compiled
- Updates the source generator to fall back to just emitting a cached use of Regex if the expression can't be compiled (and issuing a diagnostic in that case)
- Adds several tests that now pass with the new scheme that didn't with the old (and that still don't with the interpreter)

* Make the addition of more declarations a bit more robust

* Reduce backtracking code gen when nodes are atomic

Also added some comments and renamed a few methods for consistency between RegexCompiler and RegexGenerator.Emitter

* Fix tests on mono interpreter

2 years agoConsistently use CreateProxyUri in WebProxy ctors (#62338)
Miha Zupan [Fri, 3 Dec 2021 21:54:28 +0000 (13:54 -0800)]
Consistently use CreateProxyUri in WebProxy ctors (#62338)

2 years agoAdd parser tests from nim-regex (#62093)
Dan Moseley [Fri, 3 Dec 2021 19:52:18 +0000 (12:52 -0700)]
Add parser tests from nim-regex (#62093)

* new parser tests

* baseline

* Nim tests

* typos

* positive cases

* new parser tests

* change to \u

2 years agoUpdate overlapped field test to conflict on 32-bit arches (#62308)
Aleksey Kliger (λgeek) [Fri, 3 Dec 2021 19:43:21 +0000 (14:43 -0500)]
Update overlapped field test to conflict on 32-bit arches (#62308)

* Update overlapped field test to conflict on 32-bit arches

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

* [class-init] Setup fields of nested structs in layout check

   On AOT the field's class may not have been fully inited yet.

   Related to https://github.com/dotnet/runtime/issues/62311

2 years ago[mono][wasm] Fix the passing/returning of small vtypes. (#62299)
Zoltan Varga [Fri, 3 Dec 2021 19:38:03 +0000 (14:38 -0500)]
[mono][wasm] Fix the passing/returning of small vtypes. (#62299)

According to the ABI, they need to be returned by value.

2 years ago[mono][wasm] Fix a windows cross compiler issue. (#62339)
Zoltan Varga [Fri, 3 Dec 2021 19:37:47 +0000 (14:37 -0500)]
[mono][wasm] Fix a windows cross compiler issue. (#62339)

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

2 years ago[mono] Disable new test running on AOT. (#62335)
Thays Grazia [Fri, 3 Dec 2021 19:14:29 +0000 (16:14 -0300)]
[mono] Disable new test running on AOT. (#62335)

* Disable test running on AOT.

2 years agoFixes #62167. WriteAsync was bugged when writing multiple segments if called after...
Kuinox [Fri, 3 Dec 2021 19:08:28 +0000 (20:08 +0100)]
Fixes #62167. WriteAsync was bugged when writing multiple segments if called after an .Advance(int) (#62306)

2 years agoSupport unloadability in `DispatchProxy`. (#62095)
Theodore Tsirpanis [Fri, 3 Dec 2021 17:52:35 +0000 (19:52 +0200)]
Support unloadability in `DispatchProxy`. (#62095)

* Use separate ProxyAssemblies per ALC in DispatchProxyGenerator.

2 years ago[main] Update dependencies from dotnet/arcade dotnet/xharness dotnet/runtime-assets...
dotnet-maestro[bot] [Fri, 3 Dec 2021 16:56:45 +0000 (11:56 -0500)]
[main] Update dependencies from dotnet/arcade dotnet/xharness dotnet/runtime-assets (#62331)

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

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

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

Microsoft.DotNet.XHarness.CLI , Microsoft.DotNet.XHarness.TestRunners.Xunit
 From Version 1.0.0-prerelease.21602.1 -> To Version 1.0.0-prerelease.21602.2

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

Microsoft.DotNet.CilStrip.Sources , System.ComponentModel.TypeConverter.TestData , System.Drawing.Common.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.Windows.Extensions.TestData
 From Version 7.0.0-beta.21579.1 -> To Version 7.0.0-beta.21602.1

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
2 years agoFix soundplayer (#62323)
Dan Moseley [Fri, 3 Dec 2021 14:42:09 +0000 (07:42 -0700)]
Fix soundplayer (#62323)

2 years agoDisable TestIgnoreCaseRelationBorderCasesInNonBacktracking test (#62319)
Stephen Toub [Fri, 3 Dec 2021 11:28:35 +0000 (06:28 -0500)]
Disable TestIgnoreCaseRelationBorderCasesInNonBacktracking test (#62319)

2 years agoSimplify code emitted for single char repeater (#62322)
Stephen Toub [Fri, 3 Dec 2021 11:26:51 +0000 (06:26 -0500)]
Simplify code emitted for single char repeater (#62322)

Rather than outputting an if block per unrolled iteration, just output a clause for each iteration as part of a single if block.  We already do this for concatenations, but we don't yet for standalone repeaters.

2 years agoAvoid closure for GetOrAdd (#62317)
Gérald Barré [Fri, 3 Dec 2021 07:27:38 +0000 (02:27 -0500)]
Avoid closure for GetOrAdd (#62317)

2 years agoMove the remainder of X509Certificates and TestUtilities use GeneratedDllImport ...
Jeremy Koritzinsky [Fri, 3 Dec 2021 05:08:27 +0000 (21:08 -0800)]
Move the remainder of X509Certificates and TestUtilities use GeneratedDllImport (#62309)

2 years ago[wasm] Work around `System.Diagnostics.Tests.StopwatchTests.GetTimestamp` failure...
Ankit Jain [Fri, 3 Dec 2021 04:31:38 +0000 (04:31 +0000)]
[wasm] Work around `System.Diagnostics.Tests.StopwatchTests.GetTimestamp` failure (#62290)

2 years agoEnsure that we don't try to get the simdBaseJitType for scalar intrinsics (#61982)
Tanner Gooding [Fri, 3 Dec 2021 03:02:06 +0000 (19:02 -0800)]
Ensure that we don't try to get the simdBaseJitType for scalar intrinsics (#61982)

* Ensure that we don't try to get the simdBaseJitType for scalar intrinsics

* Update a condition to also check for isScalarIsa

2 years agoReduce repeated variable add operations to a single multiply. (#61663)
anthonycanino [Fri, 3 Dec 2021 00:49:43 +0000 (19:49 -0500)]
Reduce repeated variable add operations to a single multiply. (#61663)

* Reduce repeated variable add operations to a single multiply.

`gtReduceStrength` will reduce `i + i + i + i` to `i * 4`, which
will be optimized to `i << 2`. The reduction is not limited to
power of twos, as `i + i + i + i + i` will reduce to `i * 5`, which
will be optimized to `lea reg1, [reg2+4*reg2]` etc on xarch.

* Produce a `GT_MUL` compatible with non-64 bit arch.

A `GT_MUL` with `TYP_LONG` must go through the GT_MUL preorder
processing on non-64 bit arch. Change forces that to happen by
creating a new GenTree node if GT_ADD can be reduced to GT_MUL
and then running fgMorphTree on then new node.

* Run jit-format.

* Suggested style changes.

* Abort optimization if result will create 64-bit MUL on 32-bit arch.

Also cleaned up the code per suggestions regarding structure (move
to morph.cpp) and fgGlobalOpt check.

* Run jit-format.

* Fix small typo bug.

* Small code cleanups per review.

* Moving definition of transformed tree nodes for clarity.

2 years agoUse GeneratedDllImport throughout System.Private.CoreLib. (#62295)
Jeremy Koritzinsky [Fri, 3 Dec 2021 00:15:47 +0000 (16:15 -0800)]
Use GeneratedDllImport throughout System.Private.CoreLib. (#62295)

Co-authored-by: Aaron Robinson <arobins@microsoft.com>