platform/upstream/dotnet/runtime.git
2 years agoUpdate area-owners and fabricbot to reflect libraries area pod changes (#65830)
Jeff Handley [Thu, 24 Feb 2022 09:41:08 +0000 (01:41 -0800)]
Update area-owners and fabricbot to reflect libraries area pod changes (#65830)

* Update area-owners to use area team names for the libraries area pods

* Update fabricbot for libraries pod changes; remove configs for old project boards

* Remove intra-team consultants from libraries areas

2 years agoUpdate dependencies from https://github.com/dotnet/linker build 20220222.1 (#65772)
dotnet-maestro[bot] [Thu, 24 Feb 2022 09:01:40 +0000 (10:01 +0100)]
Update dependencies from https://github.com/dotnet/linker build 20220222.1 (#65772)

Microsoft.NET.ILLink.Tasks
 From Version 7.0.100-1.22121.2 -> To Version 7.0.100-1.22122.1

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
2 years ago[mono] Throw a MarshalDirectiveException when marshalling generic instances as return...
monojenkins [Thu, 24 Feb 2022 08:53:59 +0000 (03:53 -0500)]
[mono] Throw a MarshalDirectiveException when marshalling generic instances as return types from pinvoke callbacks. (#65743)

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

Co-authored-by: vargaz <vargaz@users.noreply.github.com>
2 years agoProcess.GetProcessById bugfix (#64723)
Evgeny Peshkov [Thu, 24 Feb 2022 07:52:15 +0000 (10:52 +0300)]
Process.GetProcessById bugfix (#64723)

* Bugfix: Process.GetProcessById claims killed process is still alive in .NET Core #63937

* Added test for GetProcessById with killed process

Co-authored-by: epeshk <>
2 years ago[wasm] Use `--emit-symbol-map` to generate a `dotnet.js.symbols` (#65162)
Ankit Jain [Thu, 24 Feb 2022 07:31:56 +0000 (02:31 -0500)]
[wasm] Use `--emit-symbol-map` to generate a `dotnet.js.symbols` (#65162)

* [wasm] Use --emit-symbol-map to generate a dotnet.js.symbols

.. and package it in the runtime pack. This can be disabled with
`$(WasmEmitSymbolMap)`.

* wasm.proj: cleanup

* [wasm] honor XunitShowProgress property

* [wasm] avoid extra build when publishing

* [wasm] WasmAppBuilder: Fix handling of ExtraFilesToDeploy

It incorrectly treated `TargetPath` metadata as a directory.

* [wasm] Disable generation of symbol maps by default

- this is needed because the sdk needs to handle this file specifically,
  and would break tests.
- Once, the sdk gets the fix, then we can turn this on by default.

- For tests, turn it on by default

* [wasm] Deploy dotnet.js.symbols with the tests

* cleanup

* [wasm] dotnet-install.sh logs errors from curl, while trying older urls,

.. don't let that fail the build.

* [wasm] Temporarily disable WasmEmitSymbolMap by default

.. because sdk needs a fix for blazor projects to handle
`dotnet.js.symbols`.

But explicitly enable this for tests.

* Address review feedback

2 years agofix few Filesystem tests on FreeBSD (#65059)
Tomas Weinfurt [Thu, 24 Feb 2022 07:19:21 +0000 (23:19 -0800)]
fix few Filesystem tests on FreeBSD (#65059)

* fix few FileSystem tests on FreeBSD

* fix MoveDirectory_FailToMoveLowerCaseDirectoryWhenUpperCaseDirectoryExists

* feedback from review

2 years agoReduce alignment of dispatch maps (#65823)
Michal Strehovský [Thu, 24 Feb 2022 05:49:00 +0000 (14:49 +0900)]
Reduce alignment of dispatch maps (#65823)

We've been aligning these at 16 bytes [since dispatch maps were added](https://github.com/dotnet/corert/pull/626) in 2016. Not clear where the 16 came from. Rhbind seems to be aligning these at pointer boundaries, but we only place `ushort`s in here.

This likely results in some size savings.

2 years ago[MonoAPI] Split type and function headers, add MONO_API_FUNCTION macro (#65446)
Aleksey Kliger (λgeek) [Thu, 24 Feb 2022 03:52:46 +0000 (22:52 -0500)]
[MonoAPI] Split type and function headers, add MONO_API_FUNCTION macro (#65446)

* [monoapi] Split type and function headers, add MONO_API_FUNCTION macro

The idea is that the function header can be included multiple times with different definitions of MONO_API_FUNCTION in order to make it easier to re-used the definitions for embedding the runtime in late-binding scenarios

* rename public mono/mini subdirectory to mono/jit

  To match how embedders see the tree.

  Update the runtime to include <mono/jit/jit.h> instead of <mono/mini/jit.h>.

  No change in public API

* Add needed includes to mobile testing host templates

* add unstable API comment to the details headers, too

* use install(FILES) to copy the headers

  not other stray files to the include dir

* update CODEOWNERS

* Remove duplicate definitions of mono_event_get_remove_method

  This was already duplicated before the header reorganization, e.g. here https://github.com/dotnet/runtime/blob/b9a55b4f52243325359ced26e3d4b31ccacdc381/src/native/public/mono/metadata/class.h#L279-L282

2 years agoRemove checks and settings for Internal.Runtime.CompilerServices.Unsafe since that...
Jeremy Koritzinsky [Thu, 24 Feb 2022 03:17:58 +0000 (19:17 -0800)]
Remove checks and settings for Internal.Runtime.CompilerServices.Unsafe since that type is gone (#65809)

2 years agoUpdate GeneratedDllImportAttribute CharSet -> StringMarshalling (#65544)
Elinor Fung [Thu, 24 Feb 2022 02:36:10 +0000 (18:36 -0800)]
Update GeneratedDllImportAttribute CharSet -> StringMarshalling (#65544)

2 years ago[wasm] Misc Debugger improvements (including tests) (#65752)
Ankit Jain [Thu, 24 Feb 2022 01:08:23 +0000 (20:08 -0500)]
[wasm] Misc Debugger improvements (including tests) (#65752)

* [wasm][debugger] Fail test if an assertion is detected

* [wasm][debugger] Make DevToolsProxy's `pending_ops` thread-safe

Currently, `pending_ops` can get written by different threads at the
same time, and also read in parallel. This causes tests to randomly fail
with:

```
DevToolsProxy::Run: Exception System.ArgumentException: The tasks argument included a null value. (Parameter 'tasks')
    at System.Threading.Tasks.Task.WhenAny(Task[] tasks)
    at Microsoft.WebAssembly.Diagnostics.DevToolsProxy.Run(Uri browserUri, WebSocket ideSocket) in /_/src/mono/wasm/debugger/BrowserDebugProxy/DevToolsProxy.cs:line 269
```

Instead, we use `Channel<T>` to add the ops, and then read those in
the main loop, and add to the *local* `pending_ops` list.

* [wasm] Install chrome for debugger tests

- controlled by `$(InstallChromeForDebuggerTests)` which defaults to
`true` for non-CI docker containers
- Useful for using the correct chrome version when testing locally, or
on codespaces

- Also, add support for detecting, and defaulting to such an
installation

* [wasm][debugger] Disable tests failing with runtime assertions

`DebuggerTests.EvaluateOnCallFrameTests.EvaluateSimpleMethodCallsError`: https://github.com/dotnet/runtime/issues/65744
`DebuggerTests.ArrayTests.InvalidArrayId`: https://github.com/dotnet/runtime/issues/65742

* [wasm][debugger] Fix NRE with `"null"` condition for a breakpoint

`ConditionalBreakpoint` test fails.
The test with condition=`"null"` failed with a NRE, instead of correctly
handling it as a condition that returns null.

```
Unable evaluate conditional breakpoint: System.Exception: Internal Error: Unable to run (null ),
    error: Object reference not set to an instance of an object..
    ---> System.NullReferenceException: Object reference not set to an instance of an object.
            at Microsoft.WebAssembly.Diagnostics.EvaluateExpression.CompileAndRunTheExpression(String expression, MemberReferenceResolver resolver, CancellationToken token) in /workspaces/runtime/src/mono/wasm/debugger/BrowserDebugProxy/EvaluateExpression.cs:line 399
            --- End of inner exception stack trace ---
            at Microsoft.WebAssembly.Diagnostics.EvaluateExpression.CompileAndRunTheExpression(String expression, MemberReferenceResolver resolver, CancellationToken token) in /workspaces/runtime/src/mono/wasm/debugger/BrowserDebugProxy/EvaluateExpression.cs:line 407
            at Microsoft.WebAssembly.Diagnostics.MonoProxy.EvaluateCondition(SessionId sessionId, ExecutionContext context, Frame mono_frame, Breakpoint bp, CancellationToken token) in /workspaces/runtime/src/mono/wasm/debugger/BrowserDebugProxy/MonoProxy.cs:line 801 condition:null
```

* [wasm] Improve default message for ReturnAsErrorException,

.. since we seem to be not catching them as intended in many places.

* [wasm] Better log, and surface errors in evaluation conditional

.. breakpoints.
Catch the proper exception `ReturnAsErrorException`, so we can get the
actual error message. And log that as an error for the user too.

* [wasm][debugger] Allow setting proxy port for BrowserDebugHost

.. with `--proxy-port=<port>`.

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

* [wasm][debugger] Handle errors in getting value for locals

Essentially, catch, and skip.

* message cleanup

* remove trailing space

2 years agoDisable packaging for DllImportGenerator for now (#65795)
Viktor Hofer [Wed, 23 Feb 2022 22:45:30 +0000 (23:45 +0100)]
Disable packaging for DllImportGenerator for now (#65795)

* Disable packaging for DllImportGenerator for now

For reasoning see https://github.com/dotnet/runtime/issues/65495#issuecomment-1049111768.

2 years agoAdd proposed plan for the COM source generator (#60143)
Jeremy Koritzinsky [Wed, 23 Feb 2022 22:26:24 +0000 (14:26 -0800)]
Add proposed plan for the COM source generator (#60143)

2 years ago[wasm][debugger] Add per-test ids, and save logs to files for the test, and proxy...
Ankit Jain [Wed, 23 Feb 2022 20:00:00 +0000 (15:00 -0500)]
[wasm][debugger] Add per-test ids, and save logs to files for the test, and proxy messages (#63564)

* [wasm][debugger] Add test ids, and log test output, and proxy messages

.. to files.

* log level cleanup

* [wasm][debugger] Allow setting proxy port for BrowserDebugHost

.. with `--proxy-port=<port>`.

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

2 years ago[LoongArch64] submit some compiling depended files. (#65769)
Qiao Pengcheng [Wed, 23 Feb 2022 18:59:06 +0000 (02:59 +0800)]
[LoongArch64] submit some compiling depended files. (#65769)

2 years agoMake NegotiatedCipherSuiteTests.SupportedNonTls13CipherSuites lazy (#65771)
Radek Zikmund [Wed, 23 Feb 2022 18:08:05 +0000 (19:08 +0100)]
Make NegotiatedCipherSuiteTests.SupportedNonTls13CipherSuites lazy (#65771)

This greatly reduces number of exceptions thrown when debugging
System.Net.Security tests on Unix platforms

2 years agoChange default of SslServerAuthenticationOptions.AllowRenegotiation to false (#65777)
Radek Zikmund [Wed, 23 Feb 2022 17:42:12 +0000 (18:42 +0100)]
Change default of SslServerAuthenticationOptions.AllowRenegotiation to false (#65777)

Fixes #65547

2 years agoImplement HttpTelemetry for HTTP/3 (#65644)
Miha Zupan [Wed, 23 Feb 2022 16:28:51 +0000 (08:28 -0800)]
Implement HttpTelemetry for HTTP/3 (#65644)

2 years agoOptimize the Regex source generator's handling of `Compilation` objects. (#65431)
Theodore Tsirpanis [Wed, 23 Feb 2022 13:54:47 +0000 (15:54 +0200)]
Optimize the Regex source generator's handling of `Compilation` objects. (#65431)

* Optimize the Regex source generator's handling of Compilation objects.

* Use the common downlevel IsExternalInit file in the regex source generator.

And remove a now-unused file.

* Address PR feedback; revert to the old way of matching symbols.

* Fix an outdated comment.

2 years agoAdd missing GC.SuppressFinalize (#64997)
Adam Sitnik [Wed, 23 Feb 2022 09:24:01 +0000 (10:24 +0100)]
Add missing GC.SuppressFinalize (#64997)

2 years ago[EventPipe] Fix reverse connection socket leaking to child processes. (#65365)
Juan Hoyos [Wed, 23 Feb 2022 08:21:20 +0000 (00:21 -0800)]
[EventPipe] Fix reverse connection socket leaking to child processes. (#65365)

* [EventPipe] Fix reverse connection socket leaking to child processes.

2 years agoFix unwanted session caching in mutual authentication tests (#65739)
Radek Zikmund [Wed, 23 Feb 2022 08:01:56 +0000 (09:01 +0100)]
Fix unwanted session caching in mutual authentication tests (#65739)

2 years agoJIT: Faster vector == Vector128.Zero on arm64 (#65632)
Egor Bogatov [Wed, 23 Feb 2022 07:40:50 +0000 (10:40 +0300)]
JIT: Faster vector == Vector128.Zero on arm64 (#65632)

2 years ago[wasm][tests] Fix use of `RandomTest*Orderer` with trimming (#65754)
Ankit Jain [Wed, 23 Feb 2022 05:12:02 +0000 (00:12 -0500)]
[wasm][tests] Fix use of `RandomTest*Orderer` with trimming (#65754)

With trimming the tests would fail to load the types:
```
[21:11:50] info: Discovered:  System.Runtime.Tests.dll (found 6200 of 6302 test cases)
[21:11:50] info: Could not find type 'TestUtilities.RandomTestCaseOrderer' in TestUtilities for assembly-level test case orderer
[21:11:50] info: Could not find type 'TestUtilities.RandomTestCollectionOrderer' in TestUtilities for assembly-level test collection orderer
```

2 years agoFix entrypoint name. (#65745)
Jeremy Koritzinsky [Wed, 23 Feb 2022 03:28:40 +0000 (19:28 -0800)]
Fix entrypoint name. (#65745)

Fixes #65648

2 years agoFix inlining of IPAddress ctor (#65735)
Stephen Toub [Wed, 23 Feb 2022 02:55:47 +0000 (21:55 -0500)]
Fix inlining of IPAddress ctor (#65735)

2 years agoCleanup platform-specific ifdefs (#65624)
Jan Kotas [Wed, 23 Feb 2022 02:01:04 +0000 (18:01 -0800)]
Cleanup platform-specific ifdefs (#65624)

2 years ago[mono][jit] Remove support for -O=-float32, i.e. treating r4 values as r8 on the...
Zoltan Varga [Wed, 23 Feb 2022 01:44:00 +0000 (20:44 -0500)]
[mono][jit] Remove support for -O=-float32, i.e. treating r4 values as r8 on the IL stack. (#65740)

This is not compatible with coreclr, and it has been disabled
and untested for a long time.

2 years agoDeduplicate some HWI codegen code (#65302)
SingleAccretion [Wed, 23 Feb 2022 01:14:51 +0000 (04:14 +0300)]
Deduplicate some HWI codegen code (#65302)

* Add OperandDesc

* Clean two 'instr_XYZ' methods up

* Clean HWI codegen up using OperandDesc

2 years ago[docs] Create mono-thread-state-machine.md (#65720)
Aleksey Kliger (λgeek) [Wed, 23 Feb 2022 00:50:33 +0000 (19:50 -0500)]
[docs] Create mono-thread-state-machine.md (#65720)

* Create mono-thread-state-machine.md

  Add the thread state machine design document

* Add some sequence diagrams

* Add hybrid suspend race sequence diagram

* More details on self-transitions

* fix coop GC suspend discussion

* undo accidental deletion

2 years ago[mono] Remove an usage of g_utf8_strup (), its not needed. (#65727)
Zoltan Varga [Tue, 22 Feb 2022 22:11:12 +0000 (17:11 -0500)]
[mono] Remove an usage of g_utf8_strup (), its not needed. (#65727)

2 years agoAdd back StructWithPublicDefaultConstructor test (#65616)
Badre BSAILA [Tue, 22 Feb 2022 20:48:40 +0000 (21:48 +0100)]
Add back StructWithPublicDefaultConstructor test (#65616)

2 years ago[wasm][debugger] Add support for using Conditional* attributes for tests (#65684)
Ankit Jain [Tue, 22 Feb 2022 20:02:28 +0000 (15:02 -0500)]
[wasm][debugger] Add support for using Conditional* attributes for tests (#65684)

- Discoverer for `ActiveIssue` doesn't seem to be running, so that is
  not working right now.
- Only, `ConditionalFact`, and `ConditionalTheory` work

2 years agoAlways dispose inner stream in StreamPipeWriter.Complete* (#65462)
William Godbe [Tue, 22 Feb 2022 17:41:06 +0000 (09:41 -0800)]
Always dispose inner stream in StreamPipeWriter.Complete* (#65462)

* Always dispose inner stream in StreamPipeWriter.Complete*

* Add tests

* Fixup

* Update StreamPipeWriterTests.cs

2 years agoDisable no_tiered_compilation scenario for mono in run-test-job.yml (#65701)
Alexander Köplinger [Tue, 22 Feb 2022 17:34:03 +0000 (18:34 +0100)]
Disable no_tiered_compilation scenario for mono in run-test-job.yml (#65701)

Mono doesn't do tiered compilation today so we're just duplicating work that runs the same config.

2 years agoNetworkAddressChange.Unix: use async Socket API to wait for events. (#64614)
Tom Deseyn [Tue, 22 Feb 2022 17:31:45 +0000 (18:31 +0100)]
NetworkAddressChange.Unix: use async Socket API to wait for events. (#64614)

* NetworkAddressChange.Unix: use async Socket API to wait for events.

By replacing the raw handle with a Socket, we ensure only the handle
we own gets used.

By using the Socket async APIs we no longer need a dedicated Thread
to synchronously read the events.

* Fix compilation.

* PR feedback.

* Add logging of unexpected errors.

* Assert lock is entered.

2 years agoAllow SslStream in ConnectCallback (#63851)
Tomas Weinfurt [Tue, 22 Feb 2022 17:22:55 +0000 (09:22 -0800)]
Allow SslStream in ConnectCallback (#63851)

* Allow SslStream in ConnectCallback

* fix win7

* disable win7

2 years ago[main] Update dependencies from dotnet/linker (#65561)
dotnet-maestro[bot] [Tue, 22 Feb 2022 17:08:37 +0000 (18:08 +0100)]
[main] Update dependencies from dotnet/linker (#65561)

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Alexander Köplinger <alex.koeplinger@outlook.com>
Co-authored-by: vitek-karas <10670590+vitek-karas@users.noreply.github.com>
2 years agoFix slngen.proj and update solution files (#65711)
Viktor Hofer [Tue, 22 Feb 2022 16:18:54 +0000 (17:18 +0100)]
Fix slngen.proj and update solution files (#65711)

* Fix slngen.proj

The SolutionName property is defined by the SDK and hence the condition was always true. Also the star (*) didn't expand when using the ValurOrDefault msbuild function. Fixing this by using a different name `SolutionNameOverride` and avoiding the ValueOrDefault msbuild function.

* Update solution files

Updating the solution files as those changed because of
microsoft/slngen@cb57e28 and apparently the solution files never were
updated.

2 years agoDo not set GLOB_REF for invariant indirections (#65709)
SingleAccretion [Tue, 22 Feb 2022 15:37:25 +0000 (18:37 +0300)]
Do not set GLOB_REF for invariant indirections (#65709)

The GTF_GLOB_REF flag in the compiler has the meaning that
the node marked with it produces a value that could be modified
by a call or an indirect store. It is used for optimizations
that need to know whether it is safe to reorder two trees.

Invariant indirections, by definition, always produce the
same value, and as such do not need to be marked with GLOB_REF.

Some nice diffs from args sorting: string literals can now
be put in the "late args" list directly (without a temp).

2 years ago[mono][interp] Fix conv.r.un from r4 (#65697)
Vlad Brezae [Tue, 22 Feb 2022 14:43:53 +0000 (16:43 +0200)]
[mono][interp] Fix conv.r.un from r4 (#65697)

2 years agoFix scheduled search in issue cleanup (#65699)
Eirik Tsarpalis [Tue, 22 Feb 2022 14:28:42 +0000 (14:28 +0000)]
Fix scheduled search in issue cleanup (#65699)

2 years agoAdded OnesComplement, Sqrt, Negate vector intrinsics (#65438)
Meri Khamoyan [Tue, 22 Feb 2022 11:58:49 +0000 (15:58 +0400)]
Added OnesComplement, Sqrt, Negate vector intrinsics (#65438)

* Added Not, Sqrt, Negate vector intrinsics

2 years agoRoll out automated issue cleanup (#65576)
Eirik Tsarpalis [Tue, 22 Feb 2022 10:22:29 +0000 (10:22 +0000)]
Roll out automated issue cleanup (#65576)

* Roll out automated issue cleanup

* Update .github/fabricbot.json

* Update .github/fabricbot.json

2 years agoEnsure all expected paths are logged on test failure (#65666)
Adam Sitnik [Tue, 22 Feb 2022 09:40:20 +0000 (10:40 +0100)]
Ensure all expected paths are logged on test failure (#65666)

* move duplicated logic to a method

* ensure all paths are logged, so we can diagnose #65601

* Apply suggestions from code review

Co-authored-by: Stephen Toub <stoub@microsoft.com>
2 years agoMore clean up for RegexOptions.NonBacktracking (#65479)
Stephen Toub [Tue, 22 Feb 2022 00:12:47 +0000 (19:12 -0500)]
More clean up for RegexOptions.NonBacktracking (#65479)

* More clean up for RegexOptions.NonBacktracking

- Added more comments
- Removed some dead code and ifdef'd some code to DEBUG-only
- Updated an IComparable implementation to IComparable<T>
- Sealed some internal types
- Made UnicodeCategoryTheory into a static type
- Made CharSetSolver into a singleton
- Renamed a bunch of Mk* methods to Create*
- Renamed Watchdog
- Removed duplicative helper functions
- Fixed thread-safety of UnicodeCategoryTheory (in practice it was probably fine but we now have true singletons)
- Changed some iterators to be lists
- Used var less
- Cleaned up the set parsing code in RegexNodeConverter
- Lazily-initialized a bunch of members of SymbolicRegexBuilder
- Fixed a bug in the handling of \w
- And some other style stuff...

* Rename file

2 years agoFix Type.IsPublic for pointer and byref types (#65156)
Buyaa Namnan [Mon, 21 Feb 2022 23:35:46 +0000 (15:35 -0800)]
Fix Type.IsPublic for pointer and byref types (#65156)

2 years ago[wasm] Add support for a random test case orderer, for xunit tests (#65628)
Ankit Jain [Mon, 21 Feb 2022 21:58:09 +0000 (16:58 -0500)]
[wasm] Add support for a random test case orderer, for xunit tests (#65628)

* [wasm] Add support for a random test case orderer, for xunit tests

This is enabled by default for wasm with
`$(XUnitUseRandomizedTestOrderer)=true`.

When the library tests run, they print two messages like:

```
  info: Using random seed for test cases: 700149826
  info: Using random seed for collections: 700149826
  info: Starting:    System.Collections.Immutable.Tests.dll
```

These seeds are picked randomly every time the tests are run. To run the
tests with a specific seed, use environment variable
`XUNIT_RANDOM_ORDER_SEED`.

When running with tests, this can be used as:

    `WasmXHarnessMonoArgs="--setenv=XUNIT_RANDOM_ORDER_SEED=<seed>`

* Enable test orderer only for libraries tests

* [wasm] Automatically pass XUNIT_RANDOM_ORDER_SEED envvar to wasm apps

* Disable random test ordering for `System.Xml.RW.XmlWriterApi.Tests`

`System.Xml.Tests.TCCloseOutput.*` tests seem to depend on the order of
execution.

```
[06:35:14] fail: [FAIL] System.Xml.Tests.TCCloseOutput.CloseOutput_4(utils: XmlWriterUtils { Async = False, WriterType = UTF8Writer }, outputType: "Stream")
[06:35:14] info: System.IO.FileNotFoundException : File Not Found: writer.out
[06:35:14] info:    at XmlCoreTest.Common.FilePathUtil.getStream(String filename)
[06:35:14] info:    at System.Xml.Tests.TCCloseOutput.CloseOutput_4(XmlWriterUtils utils, String outputType)
[06:35:14] info:    at System.Reflection.RuntimeMethodInfo.InvokeWorker(Object obj, BindingFlags invokeAttr, Span`1 parameters)
```

* [wasm] Disable random tests ordering for `System.Runtime.Loader`

It seems to cause failures like, reproducible with
`XUNIT_RANDOM_ORDER_SEED=2106784294`:

```
[06:25:43] fail: [FAIL] System.Runtime.Loader.Tests.SatelliteAssembliesTests.SatelliteLoadsCorrectly_FromName(alc: "Empty", assemblyName: "System.Runtime.Loader.Tests", culture: "en")
[06:25:43] info: Assert.Same() Failure
[06:25:43] info: Expected: "Default" System.Runtime.Loader.DefaultAssemblyLoadContext #0
[06:25:43] info: Actual:   "Empty" System.Runtime.Loader.AssemblyLoadContext #4
[06:25:43] info:    at System.Runtime.Loader.Tests.SatelliteAssembliesTests.SatelliteLoadsCorrectly_FromName(String alc, String assemblyName, String culture)
[06:25:43] info:    at System.Reflection.RuntimeMethodInfo.InvokeWorker(Object obj, BindingFlags invokeAttr, Span`1 parameters)
```

* [wasm] Disable random test ordering for `System.Runtime.Numerics`

Randomized runs seem to fail with:

```
[03:29:54] info: Starting:    System.Runtime.Numerics.Tests.dll
[03:29:58] fail: [FAIL] System.Numerics.Tests.cast_toTest.RunDoubleExplicitCastToBigIntegerTests
[03:29:58] info: Assert.Equal() Failure
[03:29:58] info:           ↓ (pos 0)
[03:29:58] info: Expected: -0
[03:29:58] info: Actual:   0
[03:29:58] info:           ↑ (pos 0)
[03:29:58] info:    at System.Numerics.Tests.cast_toTest.VerifyDoubleExplicitCastToBigInteger(Double value)
[03:29:58] info:    at System.Numerics.Tests.cast_toTest.RunDoubleExplicitCastToBigIntegerTests()
[03:29:58] info:    at System.Reflection.RuntimeMethodInfo.InvokeWorker(Object obj, BindingFlags invokeAttr, Span`1 parameters)
```

Reproducible with `XUNIT_RANDOM_SEED_ORDER=1883302047`.

* Add issues for the failing tests

2 years agoFix PGO jobs on official builds (#65669)
Alexander Köplinger [Mon, 21 Feb 2022 21:02:29 +0000 (22:02 +0100)]
Fix PGO jobs on official builds (#65669)

After https://github.com/dotnet/runtime/pull/65603 the official build failed because we missed passing in the `isOfficialBuild` variable on the PGO jobs.

* Don't sign PGO bits

* Don't run upload-intermediate-artifacts-step.yml for PGO leg

2 years agoDo not number partial definitions and `ARGPLACE` nodes (#64898)
SingleAccretion [Mon, 21 Feb 2022 19:25:35 +0000 (22:25 +0300)]
Do not number partial definitions and `ARGPLACE` nodes (#64898)

* Refactor LCL_VAR/FLD numbering

Do not number "partial definitions" - it is simply wasted work.

* Don't create unnecessary unique VNs

For ARGPLACE nodes, they will be overwritten when numbering the call.
For nodes that do not produce values, they serve no purpose, and just
waste memory.

Also, delete RET_EXPR/FTN_ADDR handling. They will never appear in VN.

* Fix printing for ASG(struct, CALL)

2 years agoJIT: revise approach for x64 OSR epilogs (#65609)
Andy Ayers [Mon, 21 Feb 2022 19:08:33 +0000 (11:08 -0800)]
JIT: revise approach for x64 OSR epilogs (#65609)

Rework x64 OSR so OSR methods have standard epilogs.

Details in attached doc.

2 years agoMove more things out of Internal/Cryptography
Kevin Jones [Mon, 21 Feb 2022 18:17:32 +0000 (13:17 -0500)]
Move more things out of Internal/Cryptography

2 years agoCleanup CLRConfig (#65655)
Adeel Mujahid [Mon, 21 Feb 2022 17:01:43 +0000 (19:01 +0200)]
Cleanup CLRConfig (#65655)

* Cleanup CLRConfig

Co-authored-by: Robin Sue <robinsue@live.de>
2 years agoFix liveness for dead non-removable partial definitions (#65618)
SingleAccretion [Mon, 21 Feb 2022 16:47:16 +0000 (19:47 +0300)]
Fix liveness for dead non-removable partial definitions (#65618)

* Harmonize front-end liveness with SSA

It is the case that in our SSA model "partial defs" are considered uses.

However, liveness was not considering them as such in one particular
case: when a dead partial store wasn't removed. The consequence of this
is that SSA would miss pushing a definition for the "use" portion of the
partial def.

This change fixes that.

Notably, back-end liveness does not need to pessimize itself like that
because we don't have SSA in the backend.

* Add test

2 years agoMove iOS/tvOS simulator and Android emulator legs from runtime-staging to runtime...
Maxim Lipnin [Mon, 21 Feb 2022 16:00:48 +0000 (19:00 +0300)]
Move iOS/tvOS simulator and Android emulator legs from runtime-staging to runtime-extra-platforms pipeline (#65551)

This change is to move the Apple mobile simulator (iOS/tvOS x64, iOS arm64) and Android emulator (x86/x64) CI leg definitions, used to build the whole product using Mono and run libraries tests, from runtime-staging to runtime-extra-platforms pipeline. The iOS simulator arm64 leg will remain on rolling build until we can get significantly more devices.

2 years agoFix several casing mismatches causing failures on Unix (#65639)
Tomáš Rylek [Mon, 21 Feb 2022 14:16:42 +0000 (15:16 +0100)]
Fix several casing mismatches causing failures on Unix (#65639)

While there might be a way to make the merged test wrapper infra tolerant to these casing
mismatches, in general they amount to one-off typos and I believe they are worth fixing.

Thanks

Tomas

2 years agoAlways build ref pack even in servicing releases (#65579)
Santiago Fernandez Madero [Mon, 21 Feb 2022 12:17:41 +0000 (04:17 -0800)]
Always build ref pack even in servicing releases (#65579)

This was already done in release/6.0 branch, this is just making sure we have it in main so that in future servicing branches this is already taken care of.

2 years agoAllow to run tests for internal AzDo PRs (#65603)
Santiago Fernandez Madero [Mon, 21 Feb 2022 12:12:44 +0000 (04:12 -0800)]
Allow to run tests for internal AzDo PRs (#65603)

Addresses https://github.com/dotnet/runtime/issues/47328

This allows to run tests when submitting PRs in AzDO.

2 years agoTreat TZCNT/POPCNT/LZCNT as never negative (#64951)
TrymPet [Mon, 21 Feb 2022 10:29:02 +0000 (11:29 +0100)]
Treat TZCNT/POPCNT/LZCNT as never negative (#64951)

2 years agoSuppress some new trimmer warnings (#65580)
Vitek Karas [Mon, 21 Feb 2022 10:28:47 +0000 (02:28 -0800)]
Suppress some new trimmer warnings (#65580)

The next update of linker will improve some data flow analysis and this uncovers more warnings in the libraries.
None of these warnings are a real problem, they're all basically inability to express the desired behavior with the current annotation system.

This change suppresses the new warnings.

2 years agoSlightly relax file pattern for copying native components (#65640)
Tomáš Rylek [Mon, 21 Feb 2022 08:41:29 +0000 (09:41 +0100)]
Slightly relax file pattern for copying native components (#65640)

Apparently not all native test components stick to the $(LibPrefix)
style; checking $(LibSuffix) should be sufficient for now.

Thanks

Tomas

2 years ago[mono][jit] Fix --break (#65467)
Vlad Brezae [Sun, 20 Feb 2022 20:03:17 +0000 (22:03 +0200)]
[mono][jit] Fix --break (#65467)

2 years agoRemove S.R.CS.Unsafe and Intrinsify Unsafe (#64861)
Wraith [Sun, 20 Feb 2022 05:50:14 +0000 (05:50 +0000)]
Remove S.R.CS.Unsafe and Intrinsify Unsafe (#64861)

* private assemblies moved from Internal to System Runtime.CompilerServices

* reformat existing unsafe vm intrinsics

* implement Copy, CopyBlock, CopyBlockUnaligned, InitBlock, InitBlockUnaligned, Unbox, Add, Subtract, SubtractByteOffset

* remove System.Runtime.CompilerServices.Unsafe il project and replace with forward only cs project

* change all ilproj references to csproj

* remove nativeaot Unsafe

* add conditional package reference for S.R.CS.Unsafe on netcoreapp 6.0

* regenerate solutions

* mono interp

* [mono][interp] Implement Copy and Unbox intrinsics

* [mono][jit] Implement Copy and Unbox intrinsics

Co-authored-by: Vlad Brezae <brezaevlad@gmail.com>
2 years agoFaster Math.Max/Min on arm64 (#65584)
Egor Bogatov [Sat, 19 Feb 2022 23:51:48 +0000 (02:51 +0300)]
Faster Math.Max/Min on arm64 (#65584)

Co-authored-by: Adeel Mujahid <3840695+am11@users.noreply.github.com>
Co-authored-by: Tanner Gooding <tagoo@outlook.com>
2 years agoPropagate native references to merged project wrapper outputs (#65592)
Tomáš Rylek [Sat, 19 Feb 2022 13:52:17 +0000 (14:52 +0100)]
Propagate native references to merged project wrapper outputs (#65592)

When building tests in merged mode, we need to copy the native
references along with the component test dlls to the output folder
to make them discoverable by the OS loader.

Thanks

Tomas

2 years agoDon't mark prefldinit4 as requiring process isolation (#65596)
Tomáš Rylek [Sat, 19 Feb 2022 13:51:29 +0000 (14:51 +0100)]
Don't mark prefldinit4 as requiring process isolation (#65596)

Turns out this particular test doesn't actually need process
isolation, I overzealously marked it as such in a previous wave
just because it's a static initialization test. This lets us
postpone dealing with out-of-process ilproj tests to a later
phase.

Thanks

Tomas

2 years agoFix HelperMethodFrame::UpdateRegDisplay on x86 (#65589)
Jan Vorlicek [Sat, 19 Feb 2022 07:20:29 +0000 (08:20 +0100)]
Fix HelperMethodFrame::UpdateRegDisplay on x86 (#65589)

While running managed debugger tests with x86 runtime debug build, I was
hiting an assert in MachineState::pRetAddress() method in a couple of
tests.
It turns out there was a bug in the HelperMethodFrame::UpdateRegDisplay
introduced about 5 years ago that only happens in DAC. The m_MachState
can be uninitialized when we enter the method and we were calling
m_MachState.pRetAddr() before performing the initialization.

This change fixes it.

2 years agoRemove ExactSpelling from GeneratedDllImport (#65343)
Jeremy Koritzinsky [Sat, 19 Feb 2022 06:51:27 +0000 (22:51 -0800)]
Remove ExactSpelling from GeneratedDllImport (#65343)

* Update conversion code fix to offer multiple fixes for appending each previously probed entry-point suffix when ExactSpelling is false.

* Remove ExactSpelling property and move properties that were relying on ExactSpelling = false to use explicit entrypoint names.

* Emit ExactSpelling = true for all of our emitted target DllImports.

* Fix a few entry points

* Add a comment around CharSet.Auto

* Update compatibility doc.

* Update docs/design/libraries/DllImportGenerator/Compatibility.md

Co-authored-by: Elinor Fung <elfung@microsoft.com>
Co-authored-by: Elinor Fung <elfung@microsoft.com>
2 years ago[wasm] Trigger all wasm jobs, if `eng/Version.Details.xml` has any chan… (#65451)
Ankit Jain [Sat, 19 Feb 2022 01:08:37 +0000 (20:08 -0500)]
[wasm] Trigger all wasm jobs, if `eng/Version.Details.xml` has any chan… (#65451)

* [wasm] Trigger all wasm jobs, if eng/Version.Details.xml has any changes, so we run a full check on emsdk updates

* fix yml

* Fix merge

* [wasm] Pass isRollingBuild to runtime-extra-platforms-wasm template, to correctly trigger the EAT/AOT builds

* .. and pass isWasmOnlyBuild also

2 years agoAllow Trace Samplers to Modify the Activity Trace State (#65530)
Tarek Mahmoud Sayed [Sat, 19 Feb 2022 00:46:07 +0000 (16:46 -0800)]
Allow Trace Samplers to Modify the Activity Trace State (#65530)

2 years ago[wasm] Make the sanitize pass less aggressive (#65571)
Larry Ewing [Fri, 18 Feb 2022 23:09:37 +0000 (17:09 -0600)]
[wasm] Make the sanitize pass less aggressive (#65571)

* Make the sanitize pass less aggressive

2 years agoDisable System.Diagnostics.Tests.EventLogRecordTests.ExceptionOnce on Windows Server...
Elinor Fung [Fri, 18 Feb 2022 23:06:24 +0000 (15:06 -0800)]
Disable System.Diagnostics.Tests.EventLogRecordTests.ExceptionOnce on Windows Server 2022 (#65588)

2 years ago[wasm] Implicit NodeJS version on Helix (#65514)
Marek Fišera [Fri, 18 Feb 2022 22:14:22 +0000 (23:14 +0100)]
[wasm] Implicit NodeJS version on Helix (#65514)

- Read first directory name under node instead of hardcoded version.

2 years agoImprove SuperPMI script robustness (#65586)
Bruce Forstall [Fri, 18 Feb 2022 21:33:17 +0000 (13:33 -0800)]
Improve SuperPMI script robustness (#65586)

1. Be more robust to temp directory removal failure

If we fail to remove a temporary directory, don't crash. Log the failure
and the set of directories and files still remaining, and continue.

We have seen this failure in at least one Linux x64 PMI coreclr_tests
SuperPMI collection:
```
[Errno 39] Directory not empty: '/datadisks/disk1/work/B18E0979/t/tmpov3b4_qa'
```

2. Limit the length of file names created by `make_safe_filename`. We were creating
file names out of full path names, where those paths contained long temporary directory
paths, and thus we were exceeding the maximum allowed file name component.

2 years agoClean-up slngen related logic (#65507)
Viktor Hofer [Fri, 18 Feb 2022 21:03:14 +0000 (22:03 +0100)]
Clean-up slngen related logic (#65507)

* Clean-up slngen related logic

* Update dotnet-tools.json

Co-authored-by: Alexander Köplinger <alex.koeplinger@outlook.com>
2 years agoSkip RegexOptions.NonBacktracking phase 3 for some patterns (#65531)
Stephen Toub [Fri, 18 Feb 2022 20:41:08 +0000 (15:41 -0500)]
Skip RegexOptions.NonBacktracking phase 3 for some patterns (#65531)

* Skip RegexOptions.NonBacktracking phase 3 for some patterns

If a pattern doesn't have any captures and if any match of that pattern will always be the same length, we can skip the Phase 3 computation as, given the computed starting position of the match, we know exactly where it's going to end.

* Add example to the phase comments

2 years agoAllow constant propagation of Vector.Zero. (#65028)
Will Smith [Fri, 18 Feb 2022 19:51:53 +0000 (11:51 -0800)]
Allow constant propagation of Vector.Zero. (#65028)

* Initial work

* Added a comma to display

* Cleanup

* Fixing build

* More cleanup

* Update comment

* Update comment

* Added CompareEqual Vector64/128 with Zero tests

* Do not contain op1 for now

* Wrong intrinsic id used

* Removing generated tests

* Removing generated tests

* Added CompareEqual tests

* Supporting containment for first operand

* Fix test build

* Passing correct register

* Check IsVectorZero before not allocing a register

* Update comment

* Fixing test

* Minor format change

* Fixed formatting

* Renamed test

* Adding AdvSimd_Arm64 tests:

* Adding support for rest of 'cmeq' and 'fcmeq' instructions

* Removing github csproj

* Minor test fix

* Fixed tests

* Fix print

* Minor format change

* Fixing test

* Initial commit for Vector.Create to Vector.Zero normalization

* Added some emitter tests

* Feedback

* Update emitarm64.cpp

* Feedback

* Handling variations of Vector.Create

* Use Operands iterator instead of edges

* Fix condition

* Simplify

* format

* Fixed IsFloatPositiveZero

* Uncomment

* Updated tests to include Vector64.Create/Vector128.Create for ARM64

* Making implementation of IsFloatPositiveZero explicit

* Update src/coreclr/jit/gentree.cpp

Co-authored-by: SingleAccretion <62474226+SingleAccretion@users.noreply.github.com>
* Feedback

* Update comment

* Update comment

* Do not perform optimization when VN CSE phase

* use ResetHWIntrinsicId

* Assert !optValnumCSE_phase

* Simplify IsVectorZero

* Simplify IsVectorZero

* Simplify some uses of Vector*_get_Zero

* Added another test

* Fixed formatting

* Revert lowering removal

* Initial work for optimizations on VectorZero value numbering

* Allowing all Vector.Zero to be constant prop'ed. Added VNFuncSimdTypeInfo.

* Update gentree.h

* Quick rename

* Removed extra variable

* Added default case

* Format

* Fixed vnDumpSimdType to take into account CorInfoType

* Fixed gtNewSimdZeroNode to produce the right Vector*_get_Zero based on simdSize

* Formatting

* Feedback and a loop test

* Added another test. Formatting fixes

* Added GetSimdBaseJitPreciseType

* Feedback

* Minor fix

* Minor comment update

* Added another comment

* Added another comment

* Added another comment

* Update comment

* Formatting

* Feedback

* Fixing build

* Feedback

* Update assertionprop.cpp

* Formatting

Co-authored-by: SingleAccretion <62474226+SingleAccretion@users.noreply.github.com>
2 years agoFix Vector256.IsHardwareAccelerated in R2R binaries (#65351)
David Wrighton [Fri, 18 Feb 2022 19:35:57 +0000 (11:35 -0800)]
Fix Vector256.IsHardwareAccelerated in R2R binaries (#65351)

* Fix Vector256.IsHardwareAccelerated in R2R binaries
- If a function had a dependency on Vector256<T> but not on any Avx2 functionality then we would fail to produce an R2R image using a debug version of the compiler, and would generate an incorrect function where the result of calling Vector256.IsHardwareAccelerated would produce the wrong result.
- To fix this we now annotate the VectorXXX instruction sets so that if there is a negative depenedency on them during R2R generation, that the function is not available for use if the underlying actual instruction set is available to use at runtime.
- Adjust test Runtime_34587 to test instruction set manner in a way that allows testing crossgen2 instruction set variation
  - Move instruction set issupported checks into standalone functions to isolate the tests in the JIT/Crossgen2 compiler to better see exactly what is happening
  - Add diagnostic output to test, for better diagnosis of future failures.

2 years agoClass types with layout that inherit from System.Object should be ManagedSequential...
Jeremy Koritzinsky [Fri, 18 Feb 2022 18:05:18 +0000 (10:05 -0800)]
Class types with layout that inherit from System.Object should be ManagedSequential (#65447)

2 years agoForward DefaultDllImportSearchPathsAttribute to the inner P/Invoke. (#65458)
Jeremy Koritzinsky [Fri, 18 Feb 2022 18:04:03 +0000 (10:04 -0800)]
Forward DefaultDllImportSearchPathsAttribute to the inner P/Invoke. (#65458)

2 years agoFix missing zero-offset sequences and add checking (#64805)
SingleAccretion [Fri, 18 Feb 2022 17:51:51 +0000 (20:51 +0300)]
Fix missing zero-offset sequences and add checking (#64805)

* Add checking for zero-offset FldSeq addition

* Add a test

* Fix ADDR(LCL_VAR) Zero [FldSeq]

* Always add NotAField field sequences

* NotAField printing improvements

2 years agoFix assert (#65564)
SingleAccretion [Fri, 18 Feb 2022 17:48:22 +0000 (20:48 +0300)]
Fix assert (#65564)

We only require the "greater than" condition on x86.

2 years agoNew Arcade Installers package with Mariner cm.2 change (#65542)
Nikola Milosavljevic [Fri, 18 Feb 2022 16:51:48 +0000 (08:51 -0800)]
New Arcade Installers package with Mariner cm.2 change (#65542)

2 years ago[wasm] Ensure NodeJS for running tests isn't too old (#65549)
Marek Fišera [Fri, 18 Feb 2022 16:47:17 +0000 (17:47 +0100)]
[wasm] Ensure NodeJS for running tests isn't too old (#65549)

2 years ago[wasm] Rationalize wasm jobs run on CI (#65035)
Ankit Jain [Fri, 18 Feb 2022 16:16:31 +0000 (11:16 -0500)]
[wasm] Rationalize wasm jobs run on CI (#65035)

* Rationalize wasm jobs run on CI

Essentially:
- For rolling builds, we want to run all the wasm jobs, unconditionally
   - And `runtime-extra-platforms` runs the tests that were not in `runtime`, and `runtime-staging`
- For PRs, we use the various path checks

Changes:
- split wasm jobs into various templates
- combine, and simplify some jobs

* `runtime-extra-platforms`, and `runtime-wasm` run only when manually
  triggered with a comment - `/azp run <pipeline-name>`
* `runtime`, and `runtime-staging`, run jobs only when relevant paths
  change. And for `EAT`, and `AOT`, only smoke tests are run.
* And when `runtime-wasm` is triggered manually, it runs *all* the wasm
  jobs completely

| .                 | runtime               | runtime-staging         | runtime-extra-platforms(manual only) | runtime-wasm (manual only) |
| ----------------- | --------------------  | ---------------         | ------------------------------------ | -------                    |
| libtests          | linux: all,   only-pc | windows: all,   only-pc | linux+windows: all, only-pc          | linux+windows: all, always |
| libtests eat      | linux: smoke, only-pc | -                       | linux:         all, only-pc          | linux:         all, always |
| libtests aot      | linux: smoke, only-pc | windows: smoke, only-pc | linux+windows: all, only-pc          | linux+windows: all, always |
|                   |                       |                         |                                      |                            |
| Wasm.Build.Tests  | linux:        only-pc | windows:        only-pc | linux+windows: only-pc               | linux+windows              |
| Debugger tests    | -                     | linux+windows:  only-pc | linux+windows: only-pc               | linux+windows              |
| Runtime tests     | linux:        only-pc | -                       | linux: only-pc                       | linux                      |

* `runtime`, and `runtime-staging`, run all the wasm jobs unconditionally, but `EAT`, and `AOT` still run only smoke tests.
* `runtime-extra-platforms` also runs by default. And it runs only the cases not covered by the above two pipelines.

* jobs w/o `only-pc` are always run

| .                 | runtime                   | runtime-staging       | runtime-extra-platforms (always run) | runtime-wasm (manual only) |
| ----------------- | -------------             | ---------------       | ------------------------------------ | ------                     |
| libtests          | linux: all(v8/chr/node)   | windows: all          | linux+windows: all with node         | N/A                        |
| libtests eat      | linux: smoke              | -                     | linux: all                           |                            |
| libtests aot      | linux: smoke              | windows: smoke        | linux+windows: all                   |                            |
|                   |                           |                       |                                      |                            |
| Wasm.Build.Tests  | linux: always             | windows: always       | none                                 |                            |
| Debugger tests    | -                         | linux+windows: always | none                                 |                            |
| Runtime tests     | linux: always             | -                     | none                                 |                            |

* [wasm] Run tests with node only on runtime-wasm

2 years agoImprove PipeWriterTests.CompleteWithLargeWriteThrows (#65506)
Alexander Köplinger [Fri, 18 Feb 2022 13:46:35 +0000 (14:46 +0100)]
Improve PipeWriterTests.CompleteWithLargeWriteThrows (#65506)

Allocate the buffer outside of the loop so we don't hit OOM issues.

While looking at the test I noticed that it actually had a bug too:
Nothing was asserting that we indeed throw an InvalidOperationException when the writer is completed. Adding `Assert.ThrowsAsync` revealed that the current loop iteration count was too low to hit the exception reliably
within the 10ms delay so instead check for the execution time.

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

2 years agoSupport resumable serialization in NullableConverter<T> (#65524)
Eirik Tsarpalis [Fri, 18 Feb 2022 10:44:23 +0000 (10:44 +0000)]
Support resumable serialization in NullableConverter<T> (#65524)

* Support resumable serialization in NullableConverter<T>

* use null instead of default

2 years agoFix XNodeReaderFunctionalTests (#65500)
Krzysztof Wicher [Fri, 18 Feb 2022 08:12:10 +0000 (09:12 +0100)]
Fix XNodeReaderFunctionalTests (#65500)

* Fix XNodeReaderFunctionalTests

* cleanup Flush/Dispose

* cleanup few more flushes

2 years ago[LoongArch64] JIT/EE interface for getting ABI-info (#62893)
Qiao Pengcheng [Fri, 18 Feb 2022 08:07:48 +0000 (16:07 +0800)]
[LoongArch64] JIT/EE interface for getting ABI-info (#62893)

* [LoongArch64] add ToolBox directory about jitinterace for getting ABI-info. (#59561)

Co-authored-by: Loongson's .NET-teams
* [LoongArch64] add new interace for getting ABI-info. (#59561)

* [LoongArch64] add the linking page for LoongArch64 ABI-info. (#59561)

* [LoongArch64] moved ThunkInput.txt to #62885.

* [LoongArch64] moved vm/jitinterface.cpp to #62885.

* remove the JIT/EE interface back from #62885..

* [LoongArch64] Fix the compiling error after merge.

* [LoongArch64] add comments for the returned value of `getFieldTypeByHnd`.

* [LoongArch64] rename getFieldTypeByHnd to getFieldSizeClassificationByHnd.
Also add macro define for returned value of `getFieldSizeClassificationByHnd`.

* [LoongArch64] Delete the interface `getArgType2`.
And refactor the returned values of `getFieldSizeClassificationByHnd`.

* [LoongArch64] delete `GetArgType` within `ToolBox/superpmi`.

* [LoongArch64] rename `getFieldSizeClassificationByHnd` to
`getLoongArch64PassStructInRegisterFlags`.

* [LoongArch64] amend the floating-ABI for native-struct.

* [LoongArch64] update all related `GetFieldSizeClassificationByHnd`
by `GetLoongArch64PassStructInRegisterFlags` and amend some comments.

* [LoongArch64] replace `LookupApproxFieldTypeHandle()`
by `GetFieldTypeHandleThrowing()`.

* [LoongArch64] implements the crossgen2 for LoongArch64.

* Revert "[LoongArch64] implements the crossgen2 for LoongArch64."

This reverts commit b05a2b90e8d8a2f6d1cf7f101ddfc9d4ed8d984e.

The crossgen2 for LoongArch64 will be submitted by a new PR.

* [LoongArch64] update the `GUID JITEEVersionIdentifier`.
Also delete some unused comments.

Co-authored-by: qiaopengcheng <qiaopengcheng-hf@loongson.cn>
2 years ago[wasm] Replace active issue for browser platform with NodeJS only (#65505)
Marek Fišera [Fri, 18 Feb 2022 07:55:22 +0000 (08:55 +0100)]
[wasm] Replace active issue for browser platform with NodeJS only (#65505)

2 years agoFileSystemWatcher.Linux: handle races while adding child directories. (#64906)
Tom Deseyn [Fri, 18 Feb 2022 07:49:37 +0000 (08:49 +0100)]
FileSystemWatcher.Linux: handle races while adding child directories. (#64906)

* FileSystemWatcher.Linux: handle races while adding child directories.

This handles the child directory getting removed or replaced by a file
while we are adding a watch for it or enumerating its subdirectories.

* Pass other enumeration exceptions to the user.

2 years agoUse CopyContext to restore saved context on X86 (#65490)
Vladimir Sadov [Fri, 18 Feb 2022 07:09:20 +0000 (23:09 -0800)]
Use CopyContext to restore saved context on X86 (#65490)

* Use CopyContext to restore saved context on X86

* PR feedback

* more PR feedback

2 years ago[mono] Cache aotdata file in AOTCompiler task (#65472)
Steve Pfister [Fri, 18 Feb 2022 03:29:36 +0000 (22:29 -0500)]
[mono] Cache aotdata file in AOTCompiler task (#65472)

This change improves the inner devloop experience by making sure to cache the .aotdata file when it's generated. Otherwise, if you clean your artifacts directory and no aot changes have been made, it will not be generated again.  The result being an error when building an app.

I believe this mostly impacts iOS configurations.

2 years ago[mono][wasm] Link the aot profiler into dotnet.wasm by default in debug mode. (#63262)
Zoltan Varga [Fri, 18 Feb 2022 02:25:10 +0000 (21:25 -0500)]
[mono][wasm] Link the aot profiler into dotnet.wasm by default in debug mode. (#63262)

Enable it using a define instead of generating code into driver-gen.c.

Co-authored-by: Larry Ewing <lewing@microsoft.com>
2 years ago[wasm] Rollback emscripten to 2.0.23 (#65517)
Radek Doulik [Fri, 18 Feb 2022 01:02:47 +0000 (02:02 +0100)]
[wasm] Rollback emscripten to 2.0.23 (#65517)

* [wasm] Rollback emscripten to 2.0.23

* Enable disabled tests

2 years agoAdd line break to please Firefox
Immo Landwerth [Fri, 18 Feb 2022 00:37:39 +0000 (16:37 -0800)]
Add line break to please Firefox

2 years ago[wasm] Disable wasm aot tests hitting OOM on all platforms (#65521)
Elinor Fung [Fri, 18 Feb 2022 00:25:49 +0000 (16:25 -0800)]
[wasm] Disable wasm aot tests hitting OOM on all platforms (#65521)

2 years agoUpdate main branding to preview 3 (#65346)
Santiago Fernandez Madero [Thu, 17 Feb 2022 23:12:54 +0000 (15:12 -0800)]
Update main branding to preview 3 (#65346)

2 years agoMove IsKnownConstant handling to ExtendedDefaultPolicy (#64809)
Egor Bogatov [Thu, 17 Feb 2022 22:36:15 +0000 (01:36 +0300)]
Move IsKnownConstant handling to ExtendedDefaultPolicy (#64809)

2 years agoPGO: Profile isinst/castclass (#65460)
Egor Bogatov [Thu, 17 Feb 2022 22:25:44 +0000 (01:25 +0300)]
PGO: Profile isinst/castclass (#65460)

Co-authored-by: Andy Ayers <andya@microsoft.com>