platform/upstream/dotnet/runtime.git
14 months agoFix broken link in editing-and-debugging.md (#87681)
Eric Mutta [Fri, 16 Jun 2023 13:00:16 +0000 (16:00 +0300)]
Fix broken link in editing-and-debugging.md (#87681)

14 months agoAttempt to fix browser-wasm test failures. (#87680)
Eirik Tsarpalis [Fri, 16 Jun 2023 12:50:21 +0000 (13:50 +0100)]
Attempt to fix browser-wasm test failures. (#87680)

* Attempt to fix browser-wasm test failures.

* Address feedback.

14 months agoFix DependencyModel tests on NativeAOT (#87666)
Eric Erhardt [Fri, 16 Jun 2023 12:40:11 +0000 (07:40 -0500)]
Fix DependencyModel tests on NativeAOT (#87666)

14 months agoFix broken link in CONTRIBUTING.md (#87685)
Eric Mutta [Fri, 16 Jun 2023 12:37:23 +0000 (15:37 +0300)]
Fix broken link in CONTRIBUTING.md (#87685)

Update link to point to the [Pull Request Guide](https://github.com/dotnet/runtime/blob/main/docs/workflow/ci/pr-guide.md) in its current location.

14 months ago[mono][llvm] Fixed personality function on Windows (#87675)
Jan Dupej [Fri, 16 Jun 2023 11:50:19 +0000 (13:50 +0200)]
[mono][llvm] Fixed personality function on Windows (#87675)

* Fixed personality function on Windows.

* Removed unnecessary files.

14 months agoReimplement NegotiateStream using (mostly) public NegotiateAuthenticaton API (#86948)
Filip Navara [Fri, 16 Jun 2023 10:47:47 +0000 (12:47 +0200)]
Reimplement NegotiateStream using (mostly) public NegotiateAuthenticaton API (#86948)

* Reimplement NegotiateStream using (mostly) public NegotiateAuthentication API

* Minor adjustment to NegotiateStreamPal on Android/tvOS to allow NegotiateStream to work

* Remove unrelated ApiCompat
suppression changes

14 months agoFix redundant MethodInfo lookup in UnixNativeCodeManager (#87664)
Jan Kotas [Fri, 16 Jun 2023 08:17:59 +0000 (01:17 -0700)]
Fix redundant MethodInfo lookup in UnixNativeCodeManager (#87664)

Fixes #75807

14 months agoLocalized file check-in by OneLocBuild Task: Build definition ID 679: Build ID 220232...
dotnet bot [Fri, 16 Jun 2023 07:10:57 +0000 (09:10 +0200)]
Localized file check-in by OneLocBuild Task: Build definition ID 679: Build ID 2202323 (#87660)

* Localized file check-in by OneLocBuild Task: Build definition ID 679: Build ID 2202051

* Localized file check-in by OneLocBuild Task: Build definition ID 679: Build ID 2202051

14 months agoRemove dead code (#87399)
Filip Navara [Fri, 16 Jun 2023 05:43:29 +0000 (07:43 +0200)]
Remove dead code (#87399)

14 months agoBuild integration support for Bionic in NativeAOT (#87595)
Michal Strehovský [Fri, 16 Jun 2023 05:25:31 +0000 (14:25 +0900)]
Build integration support for Bionic in NativeAOT (#87595)

Doesn't actually work E2E because the inline threadstatics work broke our Android support (the one added in https://github.com/dotnet/corert/pull/8323).

```
  C:\Users\michals\.nuget\packages\microsoft.netcore.app.runtime.nativeaot.linux-bionic-arm64\8.0.0-preview.6.23307.4/r
  untimes/linux-bionic-arm64/\native\libRuntime.WorkstationGC.a(MiscStubs.S.o): In function `RhpGetInlinedThreadStaticB
  ase':
  /__w/1/s/src/coreclr/nativeaot/Runtime/arm64/MiscStubs.S:12: undefined reference to `tls_InlinedThreadStatics'
  /__w/1/s/src/coreclr/nativeaot/Runtime/arm64/MiscStubs.S:12: undefined reference to `tls_InlinedThreadStatics'
  /__w/1/s/src/coreclr/nativeaot/Runtime/arm64/MiscStubs.S:12: undefined reference to `tls_InlinedThreadStatics'
  /__w/1/s/src/coreclr/nativeaot/Runtime/arm64/MiscStubs.S:12: undefined reference to `tls_InlinedThreadStatics'
```

14 months ago[Mono] Add mono hot reload support for updating parameter name (#85796)
Fan Yang [Fri, 16 Jun 2023 04:53:52 +0000 (00:53 -0400)]
[Mono] Add mono hot reload support for updating parameter name (#85796)

Fixes #56626
Fixes #50978

* Add mono hot reload support for updating parameter name

* Add a debugger test

* Don't invalidate the whole assembly when using hot reload

* don't ignore reflection cache entries when the "no invalidate" flag is set

---------

Co-authored-by: Aleksey Kliger <alklig@microsoft.com>
14 months agoAdd DebuggerDisplay to some hosting types (#87599)
James Newton-King [Fri, 16 Jun 2023 04:17:52 +0000 (12:17 +0800)]
Add DebuggerDisplay to some hosting types (#87599)

14 months agoRemove KeyValuePairConverter. (#87637)
Eirik Tsarpalis [Fri, 16 Jun 2023 04:11:07 +0000 (05:11 +0100)]
Remove KeyValuePairConverter. (#87637)

14 months agoFaster optimized frozen dictionary creation (2/n) (#87630)
Adam Sitnik [Fri, 16 Jun 2023 04:10:16 +0000 (06:10 +0200)]
Faster optimized frozen dictionary creation (2/n) (#87630)

* use stackalloc for smaller sizes

* Revert "use stackalloc for smaller sizes", it did not help much

This reverts commit 204e1752d828fac0f772d144b0daaf7dd4ab93ec.

* let the caller of FrozenHashTable.Create provide the hashcodes, it avoids a closure, index boundary checks and helps with inlining (7% gain)

in case of hash set of integers it avoids renting and copying all integers to just have a copy of them

* keys and values are needed for every strategy, lets create them up-front (2-4% gain)

* in CreateLengthBucketsFrozenDictionaryIfAppropriate iterate over array rather than dictionary
* in OrdinalStringFrozenDictionary ctor avoid creating a copy of all entires (we already have a copy of keys)

* refactor: there is no need to pass entriesLength anymore (hashCodes.Length is the replacement)

14 months agoAdd ContainsAny{Except} (#87621)
Miha Zupan [Fri, 16 Jun 2023 04:03:27 +0000 (06:03 +0200)]
Add ContainsAny{Except} (#87621)

* Add ContainsAny{Except}

* Use it everywhere

* Test coverage

* Fix ContainsAny on a string

* Reword summaries on ContainsAny

* Appease older TFMs

* Revert TestFilter.cs changes

* Appease older TFMs part 2

14 months ago[wasm] Fix inclusion of `marshal-ilgen` component (#87629)
Ankit Jain [Fri, 16 Jun 2023 03:00:20 +0000 (23:00 -0400)]
[wasm] Fix inclusion of `marshal-ilgen` component (#87629)

* [wasm] Fix inclusion of `marshal-ilgen`

Issue: `marshal-ilgen` component never included

Reason:
The item inclusion was being done *outside* any targets, which would get
evaluated *before* any targets are run.

But the item that it depends on to decide whether to include
`marshal-ilgen` is in target
`_ScanAssembliesDecideLightweightMarshaler`.

This broke microbenchmarks with:
```
Error: [MONO] * Assertion at /__w/1/s/src/mono/mono/component/marshal-ilgen-stub.c:28, condition `!m_type_is_byref(t)' not met

    at ft (/home/helixbot/work/96640802/w/B9C40A15/e/performance/artifacts/bin/for-running/MicroBenchmarks/fa21f9df-08d0-43a4-b28d-0078821ea492/bin/net8.0/browser-wasm/AppBundle/dotnet.runtime.js:3:12422)
    at mt (/home/helixbot/work/96640802/w/B9C40A15/e/performance/artifacts/bin/for-running/MicroBenchmarks/fa21f9df-08d0-43a4-b28d-0078821ea492/bin/net8.0/browser-wasm/AppBundle/dotnet.runtime.js:3:12676)
    at wasm_trace_logger (wasm://wasm/00a5f7d6:wasm-function[7879]:0x1e41d0)
    at eglib_log_adapter (wasm://wasm/00a5f7d6:wasm-function[581]:0x37fbb)
    at monoeg_g_logv_nofree (wasm://wasm/00a5f7d6:wasm-function[504]:0x35f57)
    at monoeg_assertion_message (wasm://wasm/00a5f7d6:wasm-function[508]:0x36078)
    at mono_assertion_message (wasm://wasm/00a5f7d6:wasm-function[510]:0x360bb)
    at stub_emit_marshal_ilgen (wasm://wasm/00a5f7d6:wasm-function[1300]:0x66db1)
    at mono_emit_marshal (wasm://wasm/00a5f7d6:wasm-function[1820]:0x8990b)
    at emit_native_wrapper_ilgen (wasm://wasm/00a5f7d6:wasm-function[2651]:0xb86de)
```

* [wasm] WBT: Use sdk 8.0.100-preview.6.23314.19

.. to workaround https://github.com/dotnet/runtime/issues/87647 .

* [wasm] Add test for marshal-ilgen - wbt

* add missing file

14 months agoMake virtual delegate targets less costly (#87308)
Michal Strehovský [Fri, 16 Jun 2023 00:55:40 +0000 (09:55 +0900)]
Make virtual delegate targets less costly (#87308)

Saves 1.5% on the Stage2 app.

We make sure delegate targets are reflection visible to support Delegate.GetMethodInfo. When I originally did this work in #70198 I made a shortcut to avoid yet another node kind in the system (with a giant comment explaining what the problem is). But there's a lot of benefit in having this new node for apps with many reflection visible virtual methods.

14 months ago[Mono] Add the capability of trimming IL code of individual methods (#86722)
Fan Yang [Fri, 16 Jun 2023 00:54:31 +0000 (20:54 -0400)]
[Mono] Add the capability of trimming IL code of individual methods (#86722)

* Add the capability of trimming individual methods

* Fix build errors

* Remove printf's

* Add the option to use compiled-methods-outfile

* Avoid trimming shared methods when they are still in use

* Add parameter description

* Add the option to trim compiled methods

* Address review feedback

* Add metadata MethodTokenFile to CompiledAssemblies

* Add GUID checks and use metadata of assemblies

* Create smaller functions and use hex value

* Update src/tasks/AotCompilerTask/MonoAOTCompiler.cs

Co-authored-by: Ankit Jain <radical@gmail.com>
* Move parameter validation code

* Update src/tasks/MonoTargetsTasks/ILStrip/ILStrip.cs

Co-authored-by: Ankit Jain <radical@gmail.com>
* Update src/tasks/MonoTargetsTasks/ILStrip/ILStrip.cs

Co-authored-by: Ankit Jain <radical@gmail.com>
* Update src/tasks/MonoTargetsTasks/ILStrip/ILStrip.cs

Co-authored-by: Ankit Jain <radical@gmail.com>
* Update src/tasks/MonoTargetsTasks/ILStrip/ILStrip.cs

Co-authored-by: Ankit Jain <radical@gmail.com>
* Update src/tasks/MonoTargetsTasks/ILStrip/ILStrip.cs

Co-authored-by: Ankit Jain <radical@gmail.com>
* Update src/tasks/MonoTargetsTasks/ILStrip/ILStrip.cs

Co-authored-by: Ankit Jain <radical@gmail.com>
* Update src/tasks/MonoTargetsTasks/ILStrip/ILStrip.cs

Co-authored-by: Ankit Jain <radical@gmail.com>
* Update src/tasks/MonoTargetsTasks/ILStrip/ILStrip.cs

Co-authored-by: Ankit Jain <radical@gmail.com>
* Add more error handling

* Provide a list of trimmed assemblies as output

* Update src/tasks/MonoTargetsTasks/ILStrip/ILStrip.cs

Co-authored-by: Ankit Jain <radical@gmail.com>
* Address coding style feedbacks

* Fix var anmes

* Delete trimmed assemblies after copy

---------

Co-authored-by: Ankit Jain <radical@gmail.com>
14 months agoDon't set mark array bits for UOH objects during concurrent marking (#87533)
Maoni Stephens [Thu, 15 Jun 2023 23:01:12 +0000 (16:01 -0700)]
Don't set mark array bits for UOH objects during concurrent marking (#87533)

marking UOH objects was a historical thing from a policy we had a long time ago. and I had been meaning to get rid of it. a recent workitem we needed to do makes this actually a necessity.

14 months agoUpdate dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimizati...
dotnet-maestro[bot] [Thu, 15 Jun 2023 22:53:19 +0000 (17:53 -0500)]
Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build 20230614.6 (#87609)

optimization.linux-arm64.MIBC.Runtime , optimization.linux-x64.MIBC.Runtime , optimization.windows_nt-arm64.MIBC.Runtime , optimization.windows_nt-x64.MIBC.Runtime , optimization.windows_nt-x86.MIBC.Runtime , optimization.PGO.CoreCLR
 From Version 1.0.0-prerelease.23311.2 -> To Version 1.0.0-prerelease.23314.6

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
14 months agoRe-enable disabled BigInteger tests. (#87640)
Eirik Tsarpalis [Thu, 15 Jun 2023 22:45:21 +0000 (23:45 +0100)]
Re-enable disabled BigInteger tests. (#87640)

14 months agoAdd regression testing for #76802. (#87632)
Eirik Tsarpalis [Thu, 15 Jun 2023 21:26:38 +0000 (22:26 +0100)]
Add regression testing for #76802. (#87632)

14 months agoImplement ExperimentalAttribute (#85444)
Igor Velikorossov [Thu, 15 Jun 2023 21:13:20 +0000 (07:13 +1000)]
Implement ExperimentalAttribute (#85444)

Resolves #77869

14 months agoAdd DOTNET_JitDisasmWithCodeBytes (#87580)
Bruce Forstall [Thu, 15 Jun 2023 21:09:24 +0000 (14:09 -0700)]
Add DOTNET_JitDisasmWithCodeBytes (#87580)

Setting this to non-zero will display the generated code bytes in the disassembly listings.

e.g.,
```
49B910577431FA7F0000 mov      r9, 0x7FFA31745710
```

By default, it is not set and the code bytes are not displayed.

This change splits this off from the DEBUG-only `DOTNET_JitDasmWithAddress` setting.

It is available in Release.

14 months agoIgnore CORJIT_FLAG_VECTOR512_THROTTLING sometimes under stress (#87631)
Bruce Forstall [Thu, 15 Jun 2023 21:09:00 +0000 (14:09 -0700)]
Ignore CORJIT_FLAG_VECTOR512_THROTTLING sometimes under stress (#87631)

14 months agoAdd missing API docs to RateLimiting (#87627)
Brennan [Thu, 15 Jun 2023 19:53:35 +0000 (12:53 -0700)]
Add missing API docs to RateLimiting (#87627)

14 months agoEnsure the JIT consistently does opportunistic queries for its optimizations (#87620)
Tanner Gooding [Thu, 15 Jun 2023 19:35:55 +0000 (12:35 -0700)]
Ensure the JIT consistently does opportunistic queries for its optimizations (#87620)

14 months ago[mono][exceptions] Don't attempt to catch StackOverflowException (#87601)
Vlad Brezae [Thu, 15 Jun 2023 19:18:21 +0000 (22:18 +0300)]
[mono][exceptions] Don't attempt to catch StackOverflowException (#87601)

* [mono][exceptions] Don't attempt to catch StackOverflowException

* [mono][exceptions] Don't invoke ToString when logging StackOveflowException

Invoking ToString can trigger method compilations and put pressure on the stack space. Instead, build the output directly from the `exc->trace_ips` with already existing methods.

* Remove unused variable

14 months ago[mono][interp] Refactor icall opcodes (#87269)
Vlad Brezae [Thu, 15 Jun 2023 19:17:59 +0000 (22:17 +0300)]
[mono][interp] Refactor icall opcodes (#87269)

* [mono][interp] Use MINT_CALLI_NAT_FAST opcode instead of MINT_ICALL_*

MINT_ICALL_* opcodes are pretty much dead and untested

* [mono][interp] Remove duplicated code

* [mono][interp] Add new generic icall opcode

Having the signature hardcoded in the opcode seems overkill for icalls.

* [mono][interp] Remove per signature CALLI opcodes

* Remove code in jiterp

* [mono][interp] Rename defines

* [mono][interp] Opcode data consistency

* [mono][interp] Fix jiterp build

14 months agoLocalized file check-in by OneLocBuild Task: Build definition ID 679: Build ID 220168...
dotnet bot [Thu, 15 Jun 2023 17:01:09 +0000 (19:01 +0200)]
Localized file check-in by OneLocBuild Task: Build definition ID 679: Build ID 2201684 (#87613)

* Localized file check-in by OneLocBuild Task: Build definition ID 679: Build ID 2201520

* Localized file check-in by OneLocBuild Task: Build definition ID 679: Build ID 2201520

14 months agoSHAKE128 and SHAKE256
Kevin Jones [Thu, 15 Jun 2023 16:49:11 +0000 (12:49 -0400)]
SHAKE128 and SHAKE256

14 months agoFix parameter ordering and value in gtNewColonNode (#87366)
Huo Yaoyuan [Thu, 15 Jun 2023 16:27:27 +0000 (00:27 +0800)]
Fix parameter ordering and value in gtNewColonNode (#87366)

14 months agoStop setting HelixResultsDestinationDir (#86413)
Bruce Forstall [Thu, 15 Jun 2023 15:33:58 +0000 (08:33 -0700)]
Stop setting HelixResultsDestinationDir (#86413)

Use the default, which is `$(BUILD_SOURCESDIRECTORY)\artifacts\helixresults`

Fixes #75169

14 months agoFix mcs missing flags (#87584)
Bruce Forstall [Thu, 15 Jun 2023 15:04:57 +0000 (08:04 -0700)]
Fix mcs missing flags (#87584)

When a new JIT flag is added, it needs to be added to spmidumphelper.cpp as well.

14 months ago[mono][simd] Add MONO_TYPE_I and MONO_TYPE_U types for OP_NEGATION on amd64 (#87607)
Milos Kotlar [Thu, 15 Jun 2023 14:54:39 +0000 (16:54 +0200)]
[mono][simd] Add MONO_TYPE_I and MONO_TYPE_U types for OP_NEGATION on amd64 (#87607)

* Add MONO_TYPE_I and MONO_TYPE_U types for OP_NEGATION on amd64

* Use TYPE_I64 for MONO_TYPE_I and MONO_TYPE_U types

14 months agoAvoid linking to non-existent System.Net.Security.Native on tvOS (#87605)
Filip Navara [Thu, 15 Jun 2023 14:15:33 +0000 (16:15 +0200)]
Avoid linking to non-existent System.Net.Security.Native on tvOS (#87605)

14 months ago`UnsafeAccessorAttribute` non-generic support (#86932)
Aaron Robinson [Thu, 15 Jun 2023 13:59:49 +0000 (06:59 -0700)]
`UnsafeAccessorAttribute` non-generic support (#86932)

* CoreCLR and NativeAOT

* Add UnsafeAccessorAttribute API

* Implement IL generation for all accessor paths

* Implement static/instance field lookup - non-generic

* Implement static/instance method lookup - non-generic

* Defined ambiguity logic with respect to
custom modifiers.
- First pass ignore custom modifiers
- If ambiguity detected, rerun algorithm but
  require precise matching of custom modifiers.
- If there is no clear match throw AmbiguousImplementationException.

* Cleanup memory management confusion
with ILStubResolver.

* Fix non-standard C++

* Remove CORINFO_MODULE_ALLACCESS scope

* Remove enum METHOD_TYPE.

* Update BOTR on TypeDesc

14 months agoAdd managed entry points for raising Contention events (#87087)
Koundinya Veluri [Thu, 15 Jun 2023 13:36:33 +0000 (06:36 -0700)]
Add managed entry points for raising Contention events (#87087)

* Add managed entry points for raising Contention events

- Added the events similarly to how the PortableThreadPool events are currently set up. They may need further tweaking to make them work from NativeAOT.
- The events are not raised anywhere from the managed side yet, it's expected that they will eventually be raised by a new Lock type and at least by NativeAOT's Lock

14 months agoRemove some unnecessary Substrings (#87479)
Stephen Toub [Thu, 15 Jun 2023 12:40:56 +0000 (08:40 -0400)]
Remove some unnecessary Substrings (#87479)

* Remove some unnecessary Substrings

* Address PR feedback

14 months agoMake the soure generator format enums using their identifiers rather than numeric...
Eirik Tsarpalis [Thu, 15 Jun 2023 12:32:19 +0000 (13:32 +0100)]
Make the soure generator format enums using their identifiers rather than numeric values. (#87557)

* Make the soure generator format enums using their identifiers rather than numeric values.

* Address feedback

14 months ago[RISC-V][JIT] Fix FCVT (#87591)
Dong-Heon Jung [Thu, 15 Jun 2023 11:54:42 +0000 (20:54 +0900)]
[RISC-V][JIT] Fix FCVT (#87591)

14 months ago[RISC-V] Fix struct passing on reflection calls (#87535)
t-mustafin [Thu, 15 Jun 2023 11:53:56 +0000 (14:53 +0300)]
[RISC-V] Fix struct passing on reflection calls (#87535)

14 months agoLocalized file check-in by OneLocBuild Task: Build definition ID 679: Build ID 220139...
dotnet bot [Thu, 15 Jun 2023 10:08:46 +0000 (12:08 +0200)]
Localized file check-in by OneLocBuild Task: Build definition ID 679: Build ID 2201397 (#87570)

* Localized file check-in by OneLocBuild Task: Build definition ID 679: Build ID 2200838

* Localized file check-in by OneLocBuild Task: Build definition ID 679: Build ID 2200838

* Localized file check-in by OneLocBuild Task: Build definition ID 679: Build ID 2201000

* Localized file check-in by OneLocBuild Task: Build definition ID 679: Build ID 2201000

* Localized file check-in by OneLocBuild Task: Build definition ID 679: Build ID 2201301

* Localized file check-in by OneLocBuild Task: Build definition ID 679: Build ID 2201301

14 months agoJitdump fixes (#87547)
David Mason [Thu, 15 Jun 2023 07:03:13 +0000 (00:03 -0700)]
Jitdump fixes (#87547)

14 months agoPackage static libraries into NativeAOT runtime pack (#87594)
Michal Strehovský [Thu, 15 Jun 2023 06:27:14 +0000 (15:27 +0900)]
Package static libraries into NativeAOT runtime pack (#87594)

The iOS one only gets them because of the TargetsMobile condition. This condition is not true for bionic.

14 months agoReport warnings for COM interfaces with instance properties or events (#87492)
Jeremy Koritzinsky [Thu, 15 Jun 2023 04:01:05 +0000 (21:01 -0700)]
Report warnings for COM interfaces with instance properties or events (#87492)

14 months agoEnable option to use the Windows ThreadPool (#85373)
Eduardo Velarde [Thu, 15 Jun 2023 01:50:10 +0000 (18:50 -0700)]
Enable option to use the Windows ThreadPool (#85373)

When running on Windows, enable an option to switch between the Portable thread pool and the Windows thread pool.

This change targets NativeAOT, CoreCLR, and Mono.

Windows threadpool remains as the default for NativeAOT on Windows. For any other case the Portable thread pool remains the default.

Tests with the Windows thread pool enabled were added to the System.Threading.Threadpool solution.

Trimming is enabled to remove the unused thread pool.
---------

Co-authored-by: Jan Kotas <jkotas@microsoft.com>
Co-authored-by: Koundinya Veluri <kouvel@users.noreply.github.com>
14 months ago[wasm] Don't use `_WasmDevel=true` when publishing (#87544)
Ankit Jain [Thu, 15 Jun 2023 01:24:46 +0000 (21:24 -0400)]
[wasm] Don't use `_WasmDevel=true` when publishing (#87544)

* [wasm] Add missing Wasm.Build.Tests.Blazor.AppsettingsTests to list of tests to run

* [wasm] CI: Trigger only wasm jobs on workload-testing.targets changes, since only wasm is using this currently

* [wasm] host: Add `--no-silent` command line parameter

- this is the equivalent to `--verbose`
- The default is "silent" behavior

Cannot use `--verbose` because that conflicts with `dotnet run`.

* [wasm] WBT: Update template tests to use `--no-silent` with `dotnet run`

.. which would be useful in debugging tests.

* [wasm] Don't use _WasmDevel=true whenever publishing

`_WasmDevel=true` causes the optimization flags to be `-O0`.

- This *was* automatically set whenever `Configuration=Debug`, and
`WasmBuildNative=true`, which is useful when relinking in inner loop.
- But when publishing, and relinking/AOT, `-O0` results in larger output.

* Update src/mono/wasm/host/JSEngineHost.cs

* Address feedback from @ilonatommy

14 months agoExtend Task.FromResult default task optimization to 16 byte unmanaged types (#87541)
Stephen Toub [Thu, 15 Jun 2023 01:14:55 +0000 (21:14 -0400)]
Extend Task.FromResult default task optimization to 16 byte unmanaged types (#87541)

* Extend Task.FromResult default task optimization to 16 byte unmanaged types

For years, async methods / Task.FromResult has cached a `Task<T>` for `default(T)`, however it was only used when the result value was null.  Earlier in this release we extended that optimization to also use the default task when the value was 1, 2, 4, or 8 bytes (and not a reference type).  This extends that further to also handle types that are 16 bytes, so as to include types like Decimal, Guid, Int128, and DateTimeOffset.

* Fix tests to accomodate additional use of default cached task

14 months agoFix a warning. (#87573)
Zoltan Varga [Wed, 14 Jun 2023 23:11:01 +0000 (19:11 -0400)]
Fix a warning. (#87573)

14 months ago[iOS][maccatalyst] Reenable MacCatalyst and Simulator CI runs (#84930)
Mitchell Hwang [Wed, 14 Jun 2023 23:05:39 +0000 (19:05 -0400)]
[iOS][maccatalyst] Reenable MacCatalyst and Simulator CI runs (#84930)

This reverts commit 67b6e81d9d2fca8544d37f04998d352bdc0fd69e.

Co-authored-by: Steve Pfister <steve.pfister@microsoft.com>
Co-authored-by: Meri Khamoyan <merikhamoyan@microsoft.com>
14 months agoRemove a couple of asserts, which are no longer valid, from getMaxVectorTByteLength...
Tanner Gooding [Wed, 14 Jun 2023 22:30:12 +0000 (15:30 -0700)]
Remove a couple of asserts, which are no longer valid, from getMaxVectorTByteLength (#87504)

14 months agoFix StrictlyBlittable check to work for "source Compilation" references. (#87507)
Jeremy Koritzinsky [Wed, 14 Jun 2023 22:06:53 +0000 (15:06 -0700)]
Fix StrictlyBlittable check to work for "source Compilation" references. (#87507)

14 months agoHandle a null operation type (for example if the null literal is being cast/assigned...
Jeremy Koritzinsky [Wed, 14 Jun 2023 22:06:07 +0000 (15:06 -0700)]
Handle a null operation type (for example if the null literal is being cast/assigned to a ComImport interface type). (#87566)

Co-authored-by: Jackson Schuster <36744439+jtschuster@users.noreply.github.com>
14 months ago[browser][debugger][MT] Make operations on dictionary thread-safe follow-up (#87474)
Ilona Tomkowicz [Wed, 14 Jun 2023 22:05:51 +0000 (00:05 +0200)]
[browser][debugger][MT] Make operations on dictionary thread-safe follow-up (#87474)

* Revert unintentionally removed logging.

* Fix

14 months ago[main] Update dependencies from dotnet/roslyn-analyzers (#87272)
dotnet-maestro[bot] [Wed, 14 Jun 2023 20:12:43 +0000 (15:12 -0500)]
[main] Update dependencies from dotnet/roslyn-analyzers (#87272)

* Update dependencies from https://github.com/dotnet/roslyn-analyzers build 20230607.1

Microsoft.CodeAnalysis.Analyzers , Microsoft.CodeAnalysis.NetAnalyzers
 From Version 3.3.5-beta1.23275.7 -> To Version 3.3.5-beta1.23307.1

* Update dependencies from https://github.com/dotnet/roslyn-analyzers build 20230608.2

Microsoft.CodeAnalysis.Analyzers , Microsoft.CodeAnalysis.NetAnalyzers
 From Version 3.3.5-beta1.23275.7 -> To Version 3.3.5-beta1.23308.2

---------

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
14 months ago[Mono] Update Mono build README.md (#87517)
Fan Yang [Wed, 14 Jun 2023 19:58:14 +0000 (15:58 -0400)]
[Mono] Update Mono build README.md (#87517)

Added one more useful switch `-p:KeepNativeSymbols=true`

14 months ago[ComInterfaceGenerator] Warn on visibility of interface and StringMarshallingCustomTy...
Jackson Schuster [Wed, 14 Jun 2023 16:56:58 +0000 (09:56 -0700)]
[ComInterfaceGenerator] Warn on visibility of interface and StringMarshallingCustomType (#87065)

The generated code is in file scoped classes, so the interface and StringMarshallingCustomType need to be at least internal visibility. These changes warn if that condition isn't met.

Originally, I expected to report a diagnostic, but still generate code for the interface. This required some changes to DiagnosticOr<T> to allow it to hold both a diagnostic and a value if the diagnostic didn't cause failure. In the end those changes weren't necessary, but I left them because I can see them being valuable at some point in the future.

Completes #84662

14 months agoAllow bigger json parsing to JsonDocument (#87343)
Egor Boyarkin [Wed, 14 Jun 2023 15:35:53 +0000 (18:35 +0300)]
Allow bigger json parsing to JsonDocument (#87343)

* Allow bigger json parsing to JsonDocument

* Use single constant and assert it on .NET 6

* Force ArrayPool.Rent to throw if it's impossible to enlarge

14 months agoAdd delay load hook for singlefilehost and enable delay load of version.dll (#87495)
Elinor Fung [Wed, 14 Jun 2023 13:40:36 +0000 (06:40 -0700)]
Add delay load hook for singlefilehost and enable delay load of version.dll (#87495)

`coreclr` delay loads `version.dll` and adds a hook such that it loads from the system directory. In single-file, we lost this behaviour since it uses static library version of `coreclr`. This adds the same mechanism to single-file.

14 months agoFix typo in object.h (#87553)
Eric Mutta [Wed, 14 Jun 2023 13:02:58 +0000 (16:02 +0300)]
Fix typo in object.h (#87553)

14 months ago[mono][jit] Disable passing SIMD args in SIMD regs on arm64. (#87540)
Zoltan Varga [Wed, 14 Jun 2023 11:40:49 +0000 (07:40 -0400)]
[mono][jit] Disable passing SIMD args in SIMD regs on arm64. (#87540)

It has the following problems:
- the gshared versions of SIMD types like Vector<T_INT> are not marked
  as SIMD, so there is a calling convention mismatch if the callee is
  generic shared.
- the gsharedvt code doesn't support it, i.e. it asserts in get_arg_slots ().
- the dyncall code might not support it either.

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

14 months ago[QUIC] Fix rooted connection when hanshake failed (#87328)
Marie Píchová [Wed, 14 Jun 2023 11:34:21 +0000 (13:34 +0200)]
[QUIC] Fix rooted connection when hanshake failed (#87328)

* Added tests

* Fixed logging and minor typos

* Fix

* Fix test

* "Added asserts checking GCHandle state"

* Exclude test from mono

* Removed unnecessary _disposed checks

14 months ago[mono][wasm] marshal-ilgen is dropped when not required (#86035)
Jan Dupej [Wed, 14 Jun 2023 10:51:44 +0000 (12:51 +0200)]
[mono][wasm] marshal-ilgen is dropped when not required (#86035)

* Replicating naricc's PInvokeScanner.

* MarshalingPInvokeScanner now detects and outputs incompatible assemblies.

* Allowing void return type.

* PInvoke

* Two-pass searching in progress.

* Second pass resolves inconclusive types.

* Cleanup.

* Modifying the wasm toolchain to omit marshal-ilgen when possible.

* Hopefully fix incorrect app dir.

* Added definitions to MarshalingPInvokeScannerPath hopefully where needed.

* Adding definitions of MarshalingPInvokeScannerPath to more locations.

* Adding missing references to PInvoke scanner.

* Changed task ordering, assemblies list.

* Removed metadata load context.

* Fixed code analyzer issues.

* Fixed file name.

* Moved MarshalingPInvokeScanner to MonoTargetsTask.

* Removed BlazorApp.

* Implemented more marshaling validation rules, removed warning message that got "promoted" to an error.

* Catching bad image exceptions, giving reason for requiring marshal-ilgen.

* Cleaned up references to standalone MarshalingPInvokeScanner project, now that the analyzer is in MonoTargtesTask.

* More cleanup.

* Fixed P/Invoke return value in marshal-lightweight.

* Removed incompatible assemblies listing.

* Restoring minimal functionality to marshal-ilgen-stub.

* Addressed feedback.

* Tweaked identification of blittable types. Added explanation to Compatibility enum.

* Moved PInvokeCollector.cs and SignatureMapper.cs back to WasmAppBuilder.

* Addressed feedback.

14 months agoFaster optimized frozen dictionary creation (1/n) (#87510)
Adam Sitnik [Wed, 14 Jun 2023 10:37:44 +0000 (12:37 +0200)]
Faster optimized frozen dictionary creation (1/n) (#87510)

* every strategy needs an array of keys, we can create it up-front and iterate over it rather than the dictionary to get min and max lengths (1-2% gain)

* Instead of ensuring that at least 95% of data is good, we stop when we know that at least 5% is bad (13-14% gain)

* toggle the direction and re-use the comparer and hashset (3% time gain, 12% allocations reduction)

14 months agoFix GetILFunctionBody for dynamic methods (#87530)
David Mason [Wed, 14 Jun 2023 09:55:48 +0000 (02:55 -0700)]
Fix GetILFunctionBody for dynamic methods (#87530)

15 months ago[QUIC] Moved a test using external server to outerloop (#87476)
Marie Píchová [Wed, 14 Jun 2023 07:56:39 +0000 (09:56 +0200)]
[QUIC] Moved a test using external server to outerloop (#87476)

* Moved tests using external server to outerloop

* Removed unnecessary code

15 months agoRemove test exclusions for Json tests (#87457)
Michal Strehovský [Wed, 14 Jun 2023 07:34:09 +0000 (16:34 +0900)]
Remove test exclusions for Json tests (#87457)

15 months agoSPMI: Unify error handling path for replay and asmdiffs (#87464)
Jakob Botsch Nielsen [Wed, 14 Jun 2023 07:07:18 +0000 (09:07 +0200)]
SPMI: Unify error handling path for replay and asmdiffs (#87464)

For asmdiffs we would go into the success path always when the base JIT
succeeded. This meant that if the diff JIT missed we would confusingly
print an error message

    ERROR: method xyz is missing a compileResult, cannot do diffing

even though the "base success, diff miss" case is quite common and
expected. This change makes us take the same error path if either of the
JIT results failed, and then moves the JIT1 unique error handling into
an earlier check.

15 months ago[API Proposal]: Add overload for EventSource primitives (#83751)
Andy Gocke [Wed, 14 Jun 2023 05:58:00 +0000 (22:58 -0700)]
[API Proposal]: Add overload for EventSource primitives (#83751)

I've seen a lot of calls to the varargs EventSource overload that have to manually
suppress the trim warning because they only use primitive types.

Adding this overload solves two problems:
  1. Users won't get a warning if their usage is safe.
  2. Users won't have to suppress a warning.

15 months agoGenerate fewer GenericMethodHashtable entries (#87466)
Michal Strehovský [Wed, 14 Jun 2023 05:06:43 +0000 (14:06 +0900)]
Generate fewer GenericMethodHashtable entries (#87466)

GenericMethodHashtable is a hashtable of all method generic dictionaries statically present in the image. In practice, we don't need a database of all of them - only those that are reflection-visible, or have a type loader template. This PR implements that.

Saves 0.2% on BasicMinimalApi. A bit less than I hoped for but since I already have this...

15 months agoFix DependencyContext splitting on semi-colon (#87518)
Eric Erhardt [Wed, 14 Jun 2023 02:47:39 +0000 (20:47 -0600)]
Fix DependencyContext splitting on semi-colon (#87518)

* Fix DependencyContext splitting on semi-colon

https://github.com/dotnet/runtime/commit/5e67657e20665c32c2bd5c4ac1c8b1af78c9677e introduced a bug in DependencyContextPaths where the static array is not initialized before it is being used in the Create static method.

This fix removes the static array since it is only used once.

- Don't cache the semicolon array since it is only used once at startup
- Skip test on netfx since it doesn't work.

15 months agoImprove the performance of the type loader through various tweaks (#85743)
David Wrighton [Tue, 13 Jun 2023 22:25:50 +0000 (15:25 -0700)]
Improve the performance of the type loader through various tweaks (#85743)

* Skip type validation by default in ReadyToRun images
- Technically, this is a breaking change, so I've provided a means for disabling the type validation skip
- The model is that the C# compile won't get these details wrong, so disable the checks when run through crossgen2. The idea is that we'll get these things checked during normal, non-R2R usage of the app, and publish won't check these details.

* Replace expensive lookups of generic parameter and nested class data with R2R optimized forms

* Store index of MethodDesc as well as ChunkIndex. Makes MethodDesc::GetTemporaryEntryPoint *much* faster

* Optimize the path for computing if a method is eligible for tiered compilation

* Remove CanShareVtableChunksFrom concept
- it was only needed to support NGen

* Fix up some more issues

* Bring back late virtual propagation in the presence of covariant overrides only

* Check correct flag on EEClass

* Drive by fix for GetRestoredSlot. We don't need the handling of unrestored slots anymore

* Fix composite build with new tables

* Uniquify the mangled names

* Add more __

* Initial pass at type skip verifation checker

* Fix logging and some correctness issues

* Enable the more of type checking
- Notably, the recursive stuff now works
- Also fix a bug in constraint checking involving open types in the type system

* Fix build breaks involving new feature of GenericParameterDesc

* Add documentation for R2R format changes
Fix command line parameter to be more reasonable, and allow logging on command
Fix the rest of issues noted in crossgen2 testing

* Fix implementation of CompareMethodContraints. instead of using IsGeneric map, check to see if the method is generic in the first place. It turns out we have an efficient way to check in every place that matters

* Fix nits noticed by Aaron

* Add some const correctness to the world

* Fix issues noted by Michal, as well as remaining constrain checking issues

* Code review details

* Code review from trylek

15 months agoAdd Diagnostics for ComClassGenerator (#87436)
Jackson Schuster [Tue, 13 Jun 2023 22:13:48 +0000 (15:13 -0700)]
Add Diagnostics for ComClassGenerator (#87436)

Adds diagnostics to ComClassGenerator for invalid uses of GeneratedComClass

15 months ago[mono][jit] Add JIT support for the methods in Vector128<T> on amd64. (#86546)
Zoltan Varga [Tue, 13 Jun 2023 22:00:41 +0000 (18:00 -0400)]
[mono][jit] Add JIT support for the methods in Vector128<T> on amd64. (#86546)

* [mono][jit] Add JIT support for the methods in Vector128<T> on amd64.

* Avoid emitting OP_NOT_NULL opcodes in non-llvm mode, they are not used, and they keep their inputs alive.

* Return true for IsSupported for non 128 bit types even if the operations are not supported.

* Fix windows support.

* Add support for some binary operations.

* Disable Dot for integer types.

* Add support for Create.

* Fix some typos in the intrinsics tests.

* Enable As methods.

* Enable Abs/AndNot. Simplify INSERT_R8.

* Add more methods.

* Add compare methods.

* Add CreateScalar/CreateScalarUnsafe.

* Add Sqrt/Sum.

* Fix GetElement/WithElement<long>.

* Implement some of the convert methods, disable the rest.

* Fix GetElement<int>.

* Require SSE41.

* Fix OP_EXTRACT_I1.

* Fix INSERT_R8.

* Improve OP_NEGATION R4/R8.

15 months agoShrink ManifestEnvelope.MaxChunkSize to hold extended data (#87322)
ms-hujia [Tue, 13 Jun 2023 21:49:14 +0000 (05:49 +0800)]
Shrink ManifestEnvelope.MaxChunkSize to hold extended data (#87322)

15 months agoEmit additional attributes with global qualifier (#87497)
Jeremy Koritzinsky [Tue, 13 Jun 2023 21:36:39 +0000 (14:36 -0700)]
Emit additional attributes with global qualifier (#87497)

15 months agoSubject src-gen serializer to full number-handling test (#87484)
Eirik Tsarpalis [Tue, 13 Jun 2023 21:10:48 +0000 (22:10 +0100)]
Subject src-gen serializer to full number-handling test (#87484)

* Subject src-gen serializer to full number-handling tests

* Make failing tests pass

* Revert API break and use contract APIs instead

* React to test infra changes

* Fix rebase conflicts & ensure all tests are passing.

---------

Co-authored-by: Layomi Akinrinade <laakinri@microsoft.com>
15 months agoUpdate debugging-vscode.md (#87338)
Dan Moseley [Tue, 13 Jun 2023 21:01:37 +0000 (14:01 -0700)]
Update debugging-vscode.md (#87338)

15 months ago[wasm] Change optimization flag to workaround llvm issue (#87473)
Radek Doulik [Tue, 13 Jun 2023 20:39:58 +0000 (22:39 +0200)]
[wasm] Change optimization flag to workaround llvm issue (#87473)

15 months ago[wasm] Fix perf pipeline (#87469)
Ankit Jain [Tue, 13 Jun 2023 20:05:47 +0000 (16:05 -0400)]
[wasm] Fix perf pipeline (#87469)

* [wasm] Use the current `test-main.js` instead of the one for 7.0

* [wasm] perf: Add `--module` arg for v8, to support the es6 module

* [wasm] perf: Use tar for BrowserWasm for perf runs

.. because the new image does not have `zip` installed.

* remove debug bits

15 months agoFix break from wchar_t usage in disableddotnetruntime (#87509)
Elinor Fung [Tue, 13 Jun 2023 20:04:43 +0000 (13:04 -0700)]
Fix break from wchar_t usage in disableddotnetruntime (#87509)

15 months ago[RISC-V][JIT] Fix encoding of CallGCregs (#87467)
Dong-Heon Jung [Tue, 13 Jun 2023 19:18:09 +0000 (04:18 +0900)]
[RISC-V][JIT] Fix encoding of CallGCregs (#87467)

- It fixes what Encoding and Decoding logic handle CallGCregs differently.

15 months ago[main] Update dependencies from dotnet/runtime dotnet/icu dotnet/xharness dotnet...
dotnet-maestro[bot] [Tue, 13 Jun 2023 18:13:31 +0000 (13:13 -0500)]
[main] Update dependencies from dotnet/runtime dotnet/icu dotnet/xharness dotnet/emsdk dotnet/cecil dotnet/sdk (#87375)

* Update dependencies from https://github.com/dotnet/sdk build 20230610.2

Microsoft.DotNet.ApiCompat.Task
 From Version 8.0.100-preview.6.23309.13 -> To Version 8.0.100-preview.6.23310.2

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

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

* Update dependencies from https://github.com/dotnet/sdk build 20230612.2

Microsoft.DotNet.ApiCompat.Task
 From Version 8.0.100-preview.6.23309.13 -> To Version 8.0.100-preview.6.23312.2

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

Microsoft.NETCore.Runtime.ICU.Transport
 From Version 8.0.0-preview.6.23305.2 -> To Version 8.0.0-preview.6.23312.1

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

Microsoft.DotNet.XHarness.CLI , Microsoft.DotNet.XHarness.TestRunners.Common , Microsoft.DotNet.XHarness.TestRunners.Xunit
 From Version 8.0.0-prerelease.23307.1 -> To Version 8.0.0-prerelease.23312.1

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

Microsoft.NET.Workload.Emscripten.Current.Manifest-8.0.100.Transport
 From Version 8.0.0-preview.6.23307.1 -> To Version 8.0.0-preview.6.23312.1

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

Microsoft.DotNet.Cecil
 From Version 0.11.4-alpha.23306.1 -> To Version 0.11.4-alpha.23312.1

* Update dependencies from https://github.com/dotnet/sdk build 20230613.1

Microsoft.DotNet.ApiCompat.Task
 From Version 8.0.100-preview.6.23309.13 -> To Version 8.0.100-preview.6.23313.1

---------

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
15 months ago[main] Update dependencies from dnceng/internal/dotnet-optimization (#87124)
dotnet-maestro[bot] [Tue, 13 Jun 2023 18:13:03 +0000 (13:13 -0500)]
[main] Update dependencies from dnceng/internal/dotnet-optimization (#87124)

* Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build 20230604.4

optimization.linux-arm64.MIBC.Runtime , optimization.linux-x64.MIBC.Runtime , optimization.windows_nt-arm64.MIBC.Runtime , optimization.windows_nt-x64.MIBC.Runtime , optimization.windows_nt-x86.MIBC.Runtime , optimization.PGO.CoreCLR
 From Version 1.0.0-prerelease.23303.6 -> To Version 1.0.0-prerelease.23304.4

* Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build 20230605.4

optimization.linux-arm64.MIBC.Runtime , optimization.linux-x64.MIBC.Runtime , optimization.windows_nt-arm64.MIBC.Runtime , optimization.windows_nt-x64.MIBC.Runtime , optimization.windows_nt-x86.MIBC.Runtime , optimization.PGO.CoreCLR
 From Version 1.0.0-prerelease.23303.6 -> To Version 1.0.0-prerelease.23305.4

* Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build 20230606.3

optimization.linux-arm64.MIBC.Runtime , optimization.linux-x64.MIBC.Runtime , optimization.windows_nt-arm64.MIBC.Runtime , optimization.windows_nt-x64.MIBC.Runtime , optimization.windows_nt-x86.MIBC.Runtime , optimization.PGO.CoreCLR
 From Version 1.0.0-prerelease.23303.6 -> To Version 1.0.0-prerelease.23306.3

* Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build 20230607.4

optimization.linux-arm64.MIBC.Runtime , optimization.linux-x64.MIBC.Runtime , optimization.windows_nt-arm64.MIBC.Runtime , optimization.windows_nt-x64.MIBC.Runtime , optimization.windows_nt-x86.MIBC.Runtime , optimization.PGO.CoreCLR
 From Version 1.0.0-prerelease.23303.6 -> To Version 1.0.0-prerelease.23307.4

* Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build 20230608.6

optimization.linux-arm64.MIBC.Runtime , optimization.linux-x64.MIBC.Runtime , optimization.windows_nt-arm64.MIBC.Runtime , optimization.windows_nt-x64.MIBC.Runtime , optimization.windows_nt-x86.MIBC.Runtime , optimization.PGO.CoreCLR
 From Version 1.0.0-prerelease.23303.6 -> To Version 1.0.0-prerelease.23308.6

* Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build 20230609.6

optimization.linux-arm64.MIBC.Runtime , optimization.linux-x64.MIBC.Runtime , optimization.windows_nt-arm64.MIBC.Runtime , optimization.windows_nt-x64.MIBC.Runtime , optimization.windows_nt-x86.MIBC.Runtime , optimization.PGO.CoreCLR
 From Version 1.0.0-prerelease.23303.6 -> To Version 1.0.0-prerelease.23309.6

* Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build 20230610.6

optimization.linux-arm64.MIBC.Runtime , optimization.linux-x64.MIBC.Runtime , optimization.windows_nt-arm64.MIBC.Runtime , optimization.windows_nt-x64.MIBC.Runtime , optimization.windows_nt-x86.MIBC.Runtime , optimization.PGO.CoreCLR
 From Version 1.0.0-prerelease.23303.6 -> To Version 1.0.0-prerelease.23310.6

* Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build 20230611.2

optimization.linux-arm64.MIBC.Runtime , optimization.linux-x64.MIBC.Runtime , optimization.windows_nt-arm64.MIBC.Runtime , optimization.windows_nt-x64.MIBC.Runtime , optimization.windows_nt-x86.MIBC.Runtime , optimization.PGO.CoreCLR
 From Version 1.0.0-prerelease.23303.6 -> To Version 1.0.0-prerelease.23311.2

---------

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
15 months agoDon't return `0` from `getMaxVectorByteLength` when intrinsics are disabled (#87420)
Tanner Gooding [Tue, 13 Jun 2023 17:43:42 +0000 (10:43 -0700)]
Don't return `0` from `getMaxVectorByteLength` when intrinsics are disabled (#87420)

15 months agoFix WCHAR definition on non-Windows for nativeaot (#87465)
Elinor Fung [Tue, 13 Jun 2023 15:47:43 +0000 (08:47 -0700)]
Fix WCHAR definition on non-Windows for nativeaot (#87465)

This fixes enabling of runtime events on non-Windows. The GC events that don't go
through ETW::GCLog are now fired/collected on non-Windows.

There is still work needed to pull in the ETW::GCLog implementation on non-Windows

15 months agoFix missing GC counter data on non-Windows (#87430)
Elinor Fung [Tue, 13 Jun 2023 15:47:05 +0000 (08:47 -0700)]
Fix missing GC counter data on non-Windows (#87430)

This sets FEATURE_EVENT_TRACE on non-Windows platforms as well, such that GC counter
information is tracked and provided when requested.

This does not fully enable runtime event tracing via EventPipe on non-Windows.

15 months agoCombine two table lookups into one while formatting Guid on Arm64 (#87126)
SwapnilGaikwad [Tue, 13 Jun 2023 15:28:53 +0000 (16:28 +0100)]
Combine two table lookups into one while formatting Guid on Arm64 (#87126)

* Combine two table lookups into one while formatting Guid on Arm64

* Add a comment to explain the combined table look-up and hex indices

15 months agoClone files on OSX-like platforms when possible, instead of copying the whole file...
Hamish Arblaster [Tue, 13 Jun 2023 14:58:17 +0000 (00:58 +1000)]
Clone files on OSX-like platforms when possible, instead of copying the whole file (#79243)

Co-authored-by: Stephen Toub <stoub@microsoft.com>
Co-authored-by: Dan Moseley <danmose@microsoft.com>
15 months agoRedirect ActiveIssue on a test (#87468)
Michal Strehovský [Tue, 13 Jun 2023 13:34:48 +0000 (22:34 +0900)]
Redirect ActiveIssue on a test (#87468)

15 months ago [browser][debugger][MT] Make operations on dictionary thread-safe. (#87405)
Ilona Tomkowicz [Tue, 13 Jun 2023 11:57:38 +0000 (13:57 +0200)]
 [browser][debugger][MT] Make operations on dictionary thread-safe. (#87405)

* `ConcurrentDicionary` should be thread-safe.

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

Co-authored-by: Ankit Jain <radical@gmail.com>
15 months agoFold const WithElement to CNS_VEC (#86212)
Jasper [Tue, 13 Jun 2023 11:53:59 +0000 (13:53 +0200)]
Fold const WithElement to CNS_VEC (#86212)

Co-authored-by: Egor Bogatov <egorbo@gmail.com>
15 months ago[wasm] Disable the PackedSimd.Shuffle intrinsic. (#86025)
Zoltan Varga [Tue, 13 Jun 2023 11:21:12 +0000 (07:21 -0400)]
[wasm] Disable the PackedSimd.Shuffle intrinsic. (#86025)

LLVM crashes if the underlying intrinsic has a non-constant
shuffle argument, and we can't guarantee that.

Co-authored-by: Radek Doulik <radek.doulik@gmail.com>
15 months ago[wasm] Add PackedSimd load and load scalar methods (#87052)
Radek Doulik [Tue, 13 Jun 2023 11:09:08 +0000 (13:09 +0200)]
[wasm] Add PackedSimd load and load scalar methods (#87052)

* [wasm] Add PackedSimd load and load scalar methods

* Fix build

15 months agoJIT: Handle commas in physical promotion (#87401)
Jakob Botsch Nielsen [Tue, 13 Jun 2023 10:06:26 +0000 (12:06 +0200)]
JIT: Handle commas in physical promotion (#87401)

Physical promotion was not properly handling accounting in the presence
of commas and was not properly handling struct commas during
replacement.

15 months agoUse INS_inc for Interlocked.Increment (#87442)
Egor Bogatov [Tue, 13 Jun 2023 09:21:18 +0000 (11:21 +0200)]
Use INS_inc for Interlocked.Increment (#87442)

15 months agoProperly check ISAs for static readonly simd fields (#87402)
Egor Bogatov [Tue, 13 Jun 2023 09:21:02 +0000 (11:21 +0200)]
Properly check ISAs for static readonly simd fields (#87402)

15 months agoEnsure that types of ignored or inaccessible properties are not included by the sourc...
Eirik Tsarpalis [Tue, 13 Jun 2023 08:30:27 +0000 (09:30 +0100)]
Ensure that types of ignored or inaccessible properties are not included by the source generator. (#87383)

15 months agoApplyStartupHook diagnostic IPC command (#86813)
Justin Anderson [Tue, 13 Jun 2023 07:28:19 +0000 (00:28 -0700)]
ApplyStartupHook diagnostic IPC command (#86813)