platform/upstream/dotnet/runtime.git
16 months agoUpdate know issues template. (#83846)
Juan Hoyos [Thu, 23 Mar 2023 21:23:44 +0000 (14:23 -0700)]
Update know issues template. (#83846)

16 months agoLoad levels explanation (#83840)
David Wrighton [Thu, 23 Mar 2023 20:35:25 +0000 (13:35 -0700)]
Load levels explanation (#83840)

Add some descriptions of how load levels work in the runtime

16 months agoAppend leftovers of FromBase64Transform's input buffer to the transform buffer (...
David Cantú [Thu, 23 Mar 2023 20:32:13 +0000 (15:32 -0500)]
Append leftovers of FromBase64Transform's input buffer to the transform buffer (#82148)

* Append leftovers of FromBase64Transform's input buffer to the transform buffer

* Address feedback

* fill _inputbuffer correctly on small inputs (< 4)

16 months agoUpdate debug-dump-template.md AzDO tenant link (#83845)
Juan Hoyos [Thu, 23 Mar 2023 20:04:17 +0000 (13:04 -0700)]
Update debug-dump-template.md AzDO tenant link (#83845)

16 months agoAdded floor and ceiling intrinsics for `System.Runtime.Intrinsics.Vector128` and...
Vlad-Alexandru Ionescu [Thu, 23 Mar 2023 20:02:51 +0000 (21:02 +0100)]
Added floor and ceiling intrinsics for `System.Runtime.Intrinsics.Vector128` and `System.Numerics.Vector` (#83592)

Added floor and ceil intrinsics

Signed-off-by: Vlad - Alexandru Ionescu <vlad-alexandruionescu@Vlads-MacBook-Pro-4.local>
16 months ago[main] Update dependencies from dotnet/arcade (#83584)
dotnet-maestro[bot] [Thu, 23 Mar 2023 19:49:37 +0000 (14:49 -0500)]
[main] Update dependencies from dotnet/arcade (#83584)

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

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

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

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

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

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

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

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

---------

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
16 months agoUsing canonical All-pointers GC desc in more scenarios. (#83800)
Vladimir Sadov [Thu, 23 Mar 2023 19:26:55 +0000 (12:26 -0700)]
Using canonical All-pointers GC desc in more scenarios. (#83800)

* all-pointer maps in AOT

* a few asserts and refactorings

* IsAllGCPointers

* optimize more cases of all-pointer GC series

* Adding a test

* undo redundant changes

* make gcc happy

* missing null check

* fix x86 build (more parenthesis and casting)

* SkipOnMono an implementation-specific test.

16 months agoAdjust Test Watcher Timeout for Test Collections (#83746)
Ivan Diaz Sanchez [Thu, 23 Mar 2023 18:11:55 +0000 (11:11 -0700)]
Adjust Test Watcher Timeout for Test Collections (#83746)

16 months agoFix paths in "Stripping symbols" message (#82215)
Adeel Mujahid [Thu, 23 Mar 2023 17:15:22 +0000 (19:15 +0200)]
Fix paths in "Stripping symbols" message (#82215)

16 months ago[wasm] Do not run embuilder minimal build (#83475)
Radek Doulik [Thu, 23 Mar 2023 16:56:14 +0000 (17:56 +0100)]
[wasm] Do not run embuilder minimal build (#83475)

* [wasm] Do not run embuilder minimal build

* Update emsdk deps

* Do not set WasmCachePath for AOT tests

* Use staging images

* Use specific images as staging are not ready

* Revert "Do not set WasmCachePath for AOT tests"

This reverts commit 988ccd483ae9a3362af7db5d20b1fcac4d623fbe.

* Do not set WasmCachePath for AOT tests

* Use the stable images again

The changes should be already in

* One more image to stable

* Remove obsolete line

16 months agoFix typo 'to if check' -> 'to check if' (#83809)
Ilia Kosenkov [Thu, 23 Mar 2023 12:23:24 +0000 (14:23 +0200)]
Fix typo 'to if check' -> 'to check if' (#83809)

16 months agoMono: Replace exception strings with those stored in the resx file (#78341)
Sami Haq [Thu, 23 Mar 2023 10:59:44 +0000 (10:59 +0000)]
Mono: Replace exception strings with those stored in the resx file (#78341)

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

Co-authored-by: Dan Moseley <danmose@microsoft.com>
Co-authored-by: Alexander Köplinger <alex.koeplinger@outlook.com>
16 months agoAdd template to open a known issue with populated JSON (#83801)
Juan Hoyos [Thu, 23 Mar 2023 05:49:24 +0000 (22:49 -0700)]
Add template to open a known issue with populated JSON (#83801)

* Rename 04_blank_issue.md to 05_blank_issue.md

* Create known issue template

* Rename 04_known_issue.md to 04_known_issue.yml

* Update 04_known_issue.yml

* Update 04_known_issue.yml

16 months ago[wasm] More accurate jiterpreter cfg size estimation; generate smaller dispatch table...
Katelyn Gadd [Thu, 23 Mar 2023 03:52:33 +0000 (20:52 -0700)]
[wasm] More accurate jiterpreter cfg size estimation; generate smaller dispatch tables (#83759)

* More accurate cfg size estimation
* Generate smaller dispatch tables for traces with backward branches
* Make sure we never actually can dispatch to the unreachable entries in the back branch table
* If we somehow generate a module bigger than 4KB, don't try to compile it. Just log a warning
* Better cfg logging for failed branches
* Add a separate runtime option that controls whether trace monitoring will print to the log

16 months agoStop displaying missing info in replay runs (#83788)
Kunal Pathak [Thu, 23 Mar 2023 03:07:32 +0000 (20:07 -0700)]
Stop displaying missing info in replay runs (#83788)

* Stop displaying missing info in replay runs

* Stop displaying missing info in asmdiff runs

16 months agoTemporary workaround for #83792 (#83794)
Katelyn Gadd [Thu, 23 Mar 2023 02:00:21 +0000 (19:00 -0700)]
Temporary workaround for #83792 (#83794)

The inlining changes have caused us to run some stuff in the interpreter in AOT configuration that used to run in AOT, which is somehow causing some floating point tests to fail that pass in interp-only mode. This workaround makes the tests work again.

16 months agoReduce size of async state machine by a reference field (#83696)
Stephen Toub [Thu, 23 Mar 2023 01:09:10 +0000 (21:09 -0400)]
Reduce size of async state machine by a reference field (#83696)

Every async state machine today has a field for an Action.  That field is used to cache an Action that's lazily created to point to its MoveNext method.  It's only needed, however, if the state machine awaits something that's not a known awaiter.

Interestingly, Task itself has a field for storing a delegate, which is only used today when the Task is created to invoke a delegate (e.g. Task.Run, ContinueWith, etc.).  I've considered that a liability, but I just realized we can use that same field for this async method cached Action as well, making it relevant to almost all tasks, and avoiding the need to have an extra field on the state machine box.

As the m_action on a task impacts the DebuggerDisplay rendering, I've also added a DebuggerDisplay to the state machine box type.  We can improve this further in the future, and also add a DebuggerTypeProxy later if desired.

16 months agoRemove another reference field from async state machines (#83737)
Stephen Toub [Wed, 22 Mar 2023 22:50:22 +0000 (18:50 -0400)]
Remove another reference field from async state machines (#83737)

The async state machine Task-derived type currently adds three fields:
- The StateMachine
- An Action field for caching any delegate created to MoveNext
- The ExecutionContext to flow to the next MoveNext invocation

The other pending PR gets rid of the Action field by using the unused Action field from the base Task for that purpose.

This PR gets rid of the ExecutionContext field by using the unused state object field from the base Task for that purpose.  The field is exposed via the public AsyncState property, so this also uses a bit from the state flags field to prevent this state object from being returned from that property.

The combination of removing those two fields shaves 16 bytes off of every `async Task` state machine box on 64-bit.  The only remaining field added by the state machine type is for the state machine itself, which is required.

16 months agoRemove now unnecessary IsKnownConstant special-casing in interpolated string handlers...
Stephen Toub [Wed, 22 Mar 2023 22:49:42 +0000 (18:49 -0400)]
Remove now unnecessary IsKnownConstant special-casing in interpolated string handlers (#83762)

Now that the JIT will unroll memcpys, we're better off just letting it do its thing.

16 months agoForce ASM compiler to target the same triple as C, in WASI build (#83787)
Jo Shields [Wed, 22 Mar 2023 22:32:21 +0000 (18:32 -0400)]
Force ASM compiler to target the same triple as C, in WASI build (#83787)

The upstream WASI SDK sets a default compiler triple of `--target=wasm32-wasi`. We don't, because we're compiling our for-WASI-use version of Clang as part of our more general LLVM, and as such, the default compiler triple is the LLVM default (i.e. linux-x64 on x64 Linux, etc).

In one place, we compile an Assembly file using Clang by setting CMAKE_ASM_COMPILER_VERSION = CMAKE_ASM_COMPILER_VERSION - but whilst CMAKE_C_COMPILER_TARGET is overridden to always be wasm32-wasi in the wasi-sdk.cmake toolchain file, the toolchain file does not set CMAKE_ASM_COMPILER_TARGET (and thus, when compiling Assembly, our Clang default to linux-x64 etc, not wasm32-wasi). Therefore, force the issue here in our CMakeLists.txt, so we use the correct compiler target.

16 months agoJIT: tolerate malformed IL when counting block successors (#83676)
Andy Ayers [Wed, 22 Mar 2023 19:51:01 +0000 (12:51 -0700)]
JIT: tolerate malformed IL when counting block successors (#83676)

If we run synthesis, we may now invoke `BasicBlock::NumSucc` before we've
detected some cases of invalid IL, In particular an endfinally that is not
within a finally (this gets detected during importation).

Tolerate this by reporting that an endfinally with no handler index has no
successors.

Fixes #83674.

16 months agoUpdate owners and fabricbot (#83732)
Arthur Vickers [Wed, 22 Mar 2023 18:27:30 +0000 (18:27 +0000)]
Update owners and fabricbot (#83732)

16 months agoAdd MemoryMappedFile.CreateFromFile(SafeFileHandle) overload (#83134), fixes #79187
Amal Abeygunawardana [Wed, 22 Mar 2023 15:40:18 +0000 (02:40 +1100)]
Add MemoryMappedFile.CreateFromFile(SafeFileHandle) overload (#83134), fixes #79187

16 months agoMove optimize bools pass to a new file (#83768)
Alan Hayward [Wed, 22 Mar 2023 13:04:34 +0000 (13:04 +0000)]
Move optimize bools pass to a new file (#83768)

No code changes, just moving.

16 months agoIncreased max length of OP_STOREX_MEMBASE to 16 on arm64, (#83770)
Jan Dupej [Wed, 22 Mar 2023 12:31:39 +0000 (13:31 +0100)]
Increased max length of OP_STOREX_MEMBASE to 16 on arm64, (#83770)

16 months ago[NativeAOT] Support exporting methods from referenced assemblies in a formal way...
Ivan Povazan [Wed, 22 Mar 2023 09:02:35 +0000 (10:02 +0100)]
[NativeAOT] Support exporting methods from referenced assemblies in a formal way (#83396)

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

16 months ago[wasm] Cache files in simple server (#83744)
Radek Doulik [Wed, 22 Mar 2023 08:53:42 +0000 (09:53 +0100)]
[wasm] Cache files in simple server (#83744)

* [wasm] Cache files in simple server

This improves measurements comparison between hosts with different
storage speeds. In our case local storage vs NFS storage
on the otherwise equal hardware.

The cache is filled during initial runs of browser-bench.

Also do not prefetch `icudt.dat` as it is not used anymore.

* Use StringComparer.OrdinalIgnoreCase for the cache

16 months agoAdd LinkerFlavor to NativeAOT (#83558)
Adeel Mujahid [Wed, 22 Mar 2023 06:15:16 +0000 (08:15 +0200)]
Add LinkerFlavor to NativeAOT (#83558)

* Add ability to specify linker via -p:LinkerFlavor

* Set linux default to bfd

16 months agoImprove string.Substring (#83758)
Egor Bogatov [Wed, 22 Mar 2023 04:29:55 +0000 (05:29 +0100)]
Improve string.Substring (#83758)

16 months agoCorrect formatting of config binder generator (#83614)
Layomi Akinrinade [Wed, 22 Mar 2023 01:13:01 +0000 (18:13 -0700)]
Correct formatting of config binder generator (#83614)

* Correct formatting of config binder generator

* Use span tokenization in multi-line emission logic

16 months agoUse an aka.ms link for the breaking change doc issue template (#83757)
Jeff Handley [Wed, 22 Mar 2023 00:29:51 +0000 (17:29 -0700)]
Use an aka.ms link for the breaking change doc issue template (#83757)

16 months agoAvoid losing messages for memory-mapped stress log (#81038)
Andrew Au [Tue, 21 Mar 2023 22:36:00 +0000 (15:36 -0700)]
Avoid losing messages for memory-mapped stress log (#81038)

16 months agoBump main pre-release version iteration to preview4 (#83691)
Carlos Sánchez López [Tue, 21 Mar 2023 21:44:42 +0000 (14:44 -0700)]
Bump main pre-release version iteration to preview4 (#83691)

* Bump main version to preview4

* Bump to P4 of emsdk manifest

---------

Co-authored-by: Steve Pfister <steve.pfister@microsoft.com>
16 months ago[wasm] Jiterpreter monitoring phase take 2 (#83489)
Katelyn Gadd [Tue, 21 Mar 2023 20:47:40 +0000 (13:47 -0700)]
[wasm] Jiterpreter monitoring phase take 2 (#83489)

* Add a monitoring phase to jiterpreter traces, that monitors an approximate number of opcodes executed before specific types of bailouts.
If a trace bails out frequently without executing enough opcodes, it will be rejected and turned into a nop to improve performance.
* Fix assert when running out of TraceInfo space

16 months ago[browser] partial reversal of PR #82826 (#83637)
Pavel Savara [Tue, 21 Mar 2023 20:36:44 +0000 (21:36 +0100)]
[browser] partial reversal of PR #82826 (#83637)

16 months ago[mono][jit] Add some barriers to the delegate invoke code. (#83673)
Zoltan Varga [Tue, 21 Mar 2023 19:06:30 +0000 (15:06 -0400)]
[mono][jit] Add some barriers to the delegate invoke code. (#83673)

Re: https://github.com/dotnet/runtime/issues/81123.

16 months agoArm64: Combine if conditions into compare chains (#79283)
Alan Hayward [Tue, 21 Mar 2023 18:23:05 +0000 (18:23 +0000)]
Arm64: Combine if conditions into compare chains (#79283)

Add a new stage optOptimizeCompareChainCondBlock in pass optOptimizeBools.

This aims to reduced the number of conditional jumps by joining cases when multiple conditions gate the execution of a block.

Example 1:
If ( a > b || c == d) { x = y; }

Will be represented in IR as:

 ------------ BB01 -> BB03 (cond), succs={BB02,BB03}
 *  JTRUE (GT a,b)

 ------------ BB02 -> BB04 (cond), preds={BB01} succs={BB03,BB04}
 *  JTRUE (NE c,d)

 ------------ BB03, preds={BB01, BB02} succs={BB04}
 *  ASG (x,y)
These operands will be combined into a single AND in the first block (with the first
condition inverted), wrapped by the test condition (NE(...,0)). Giving:

 ------------ BB01 -> BB03 (cond), succs={BB03,BB04}
 *  JTRUE (NE (AND (LE a,b), (NE c,d)), 0)

 ------------ BB03, preds={BB01} succs={BB04}
 *  ASG x,y
Example 2:
If ( a > b && c == d) { x = y; } else { x = z; }

Here the && conditions are connected via an OR. After the pass:

 ------------ BB01 -> BB03 (cond), succs={BB03,BB04}
 *  JTRUE (NE (OR (LE a,b), (NE c,d)), 0)

 ------------ BB03, preds={BB01} succs={BB05}
 *  ASG x,y

 ------------ BB04, preds={BB01} succs={BB05}
 *  ASG x,z
Example 3:
If ( a > b || c == d || e < f ) { x = y; }
The first pass of the optimization will combine two of the conditions. The
second pass will then combine remaining condition the earlier chain.

 ------------ BB01 -> BB03 (cond), succs={BB03,BB04}
 *  JTRUE (NE (OR ((NE (OR (NE c,d), (GE e,f)), 0), (LE a,b))), 0)

 ------------ BB03, preds={BB01} succs={BB04}
 *  ASG x,y
This optimization means that every condition within the IF statement is always evaluated,
as opposed to stopping at the first positive match.
Theoretically there is no maximum limit on the size of the generated chain. Therefore cost
checking is used to limit the maximum number of conditions that can be chained together.

Currently the cost checking limits to a maximum of three simple conditions. This is the same behaviour as GCC. Note that LLVM allows chains of much longer length.

16 months agoJIT: Expand handling of non-value commas in gtSplitTree (#83725)
Jakob Botsch Nielsen [Tue, 21 Mar 2023 18:21:59 +0000 (19:21 +0100)]
JIT: Expand handling of non-value commas in gtSplitTree (#83725)

We can have a 'value'-typed COMMA whose RHS operand is actually an
assignment. gtSplitTree would create illegal IR for this case.

For example:

N018 ( 38, 33) [000327] -ACXGO----- arg1 setup              ├──▌  COMMA     simd32
N011 ( 28, 25) [000328] -ACXGO-----                         │  ├──▌  COMMA     void
N008 ( 24, 22) [000320] -ACXG---R--                         │  │  ├──▌  ASG       byref
N007 (  3,  2) [000319] D------N---                         │  │  │  ├──▌  LCL_VAR   byref  V50 tmp45
N006 ( 20, 19) [000126] --CXG------                         │  │  │  └──▌  CALL help byref  CORINFO_HELP_UNBOX
N004 (  3,  2) [000124] ----------- arg1 in rsi             │  │  │     ├──▌  LCL_VAR   ref    V02 loc1
N005 (  3, 10) [000125] H---------- arg0 in rdi             │  │  │     └──▌  CNS_INT(h) long   0x7f6e4bb0e500 class
N010 (  4,  3) [000322] ---X-O-----                         │  │  └──▌  NULLCHECK byte
N009 (  3,  2) [000321] -----------                         │  │     └──▌  LCL_VAR   byref  V50 tmp45
N017 ( 10,  8) [000331] -A-XGO--R--                         │  └──▌  ASG       simd32 (copy)
N016 (  3,  2) [000330] D------N---                         │     ├──▌  LCL_VAR   simd32 V51 tmp46
N015 (  6,  5) [000329] ---XGO-N---                         │     └──▌  IND       simd32
N014 (  4,  3) [000326] -----O-N---                         │        └──▌  ADD       byref
N012 (  3,  2) [000324] -----O-----                         │           ├──▌  LCL_VAR   byref  V50 tmp45
N013 (  1,  1) [000325] -----------                         │           └──▌  CNS_INT   long   32

gtSplitTree would believe that [000327] was a value and would create the
following IR shape:

N016 ( 14, 11) [000428] -A-XGO--R--                         ▌  ASG       simd32 (copy)
N015 (  3,  2) [000427] D------N---                         ├──▌  LCL_VAR   simd32 V76 tmp71
N014 ( 10,  8) [000331] -A-XGO-NR--                         └──▌  ASG       simd32 (copy)
N013 (  3,  2) [000330] D------N---                            ├──▌  LCL_VAR   simd32 V51 tmp46
N012 (  6,  5) [000329] ---XGO-N---                            └──▌  IND       simd32
N011 (  4,  3) [000326] -----O-N---                               └──▌  ADD       byref
N009 (  3,  2) [000324] -----O-----                                  ├──▌  LCL_VAR   byref  V50 tmp45
N010 (  1,  1) [000325] -----------                                  └──▌  CNS_INT   long   32

Fix #83576

16 months agoDelete Mono/RuntimeMarshal.cs (#83678)
Jan Kotas [Tue, 21 Mar 2023 17:34:08 +0000 (10:34 -0700)]
Delete Mono/RuntimeMarshal.cs (#83678)

The methods in this file were partially redundant and partially specific to AssemblyName.

16 months agoUnroll Buffer.Memmove for constant lengths (#83638)
Egor Bogatov [Tue, 21 Mar 2023 16:52:34 +0000 (17:52 +0100)]
Unroll Buffer.Memmove for constant lengths (#83638)

Co-authored-by: SingleAccretion <62474226+SingleAccretion@users.noreply.github.com>
Co-authored-by: Jakob Botsch Nielsen <Jakob.botsch.nielsen@gmail.com>
16 months ago[mono][aot] Load AOT module of a container assembly using assembly name (#83711)
Milos Kotlar [Tue, 21 Mar 2023 15:50:34 +0000 (16:50 +0100)]
[mono][aot] Load AOT module of a container assembly using assembly name (#83711)

* Load AOT module of a container assembly using assembly name

* Use mono_image_init to init the image

* Implement mono_loader_lock on load_container_amodule

* Avoid recursive invocation by setting container_assm_name to NULL

16 months ago[browser] Fix encoding problem when publishing with AOT (#83510)
Ilona Tomkowicz [Tue, 21 Mar 2023 14:53:21 +0000 (15:53 +0100)]
[browser] Fix encoding problem when publishing with AOT (#83510)

* Fix.

* Regex approach is not necessary.

* Fix encoding on Windows.

* Fixed build error.

* Reverted unnecessary changes. Blocked relink with unicode.

* Revet + nit.

* Applied @kg's review.

16 months ago[mono][jit] Add vector horizontal sums and ToScalar on arm64. (#83675)
Jan Dupej [Tue, 21 Mar 2023 14:49:00 +0000 (15:49 +0100)]
[mono][jit] Add vector horizontal sums and ToScalar on arm64. (#83675)

* SN_Sum operation on arm64. Fixed dup. Replaced addv, addp, faddp with their generalized variants. Added OP_EXTRACTx opcodes to arm64 codegen. Added horizontal sums.

* Fixed smov macro. Added SN_ToScalar. Fixed code style.

* Fixed vector sums of nint/nuint.

* Temporarily disable intrinsics, until all are implemented.

16 months ago[tvOS] Bump to new OSX 13 AppleTV queue (#83272)
Steve Pfister [Tue, 21 Mar 2023 14:14:30 +0000 (10:14 -0400)]
[tvOS] Bump to new OSX 13 AppleTV queue (#83272)

16 months agoReplace a load with cheaper mov instruction when possible (#83458)
SwapnilGaikwad [Tue, 21 Mar 2023 12:39:01 +0000 (12:39 +0000)]
Replace a load with cheaper mov instruction when possible (#83458)

16 months ago[mono][jit] Adding compare all/any intrinsics. (#83515)
Jan Dupej [Tue, 21 Mar 2023 09:37:45 +0000 (10:37 +0100)]
[mono][jit] Adding compare all/any intrinsics. (#83515)

* xxAny, xAll comparisons in progress.

* xxAny, xxAll comparisons, part 2.

* [mono][jit] Adding compare all/any operations. Fixed umov,smov macros.

* Removed superfluous changes.

* Restored newline at the end of HelloWorld.

* Fixed unmatched brace.

* Indentation.

* Normalized boolean values to 0/1. SIMD_EXTR_ constants have friendlier names. Equality/Inequality are now also intrinsics.

* Fixed element type for comparisons.

* Temporarily disabled intrinsics. Will be permanenty reenabled once all are implemented.

16 months agoLocalized file check-in by OneLocBuild Task: Build definition ID 679: Build ID 214003...
dotnet bot [Tue, 21 Mar 2023 07:53:26 +0000 (00:53 -0700)]
Localized file check-in by OneLocBuild Task: Build definition ID 679: Build ID 2140030 (#83703)

16 months agoCorrect doc comment for IMultiplyOperators returns (#83693)
Marc Brooks [Tue, 21 Mar 2023 03:33:39 +0000 (22:33 -0500)]
Correct doc comment for IMultiplyOperators returns (#83693)

Replaced _divided-by_ with _multiplied-by_ in both
IMultiplyOperators.cs and NFloat.cs.
Fixes https://github.com/dotnet/runtime/issues/80521

16 months agoCleanup some HWIntrinsic logic to ensure the right gtType and simdSize are being...
Tanner Gooding [Tue, 21 Mar 2023 02:16:57 +0000 (19:16 -0700)]
Cleanup some HWIntrinsic logic to ensure the right gtType and simdSize are being set (#83516)

* Cleanup some HWIntrinsic logic to ensure the right gtType and simdSize are being set

* Apply formatting patch

* Add a missing GetLower call

* Fix an assert for lowering TYP_SIMD12 where its handled as TYP_SIMD16

* Ensure GetLower is used in Dot for TYP_SIMD32

* Apply formatting patch

* Insert after, not before, for the _GetLower to avoid a codegen regression

* Put the _GetLower in the right place to avoid the codegen regression

* Don't change the simd size of TYP_SIMD8/12 DotProduct unnecessarily

16 months agoUse BitOperations::PopCount() in genCountBits() (#83661)
Kunal Pathak [Tue, 21 Mar 2023 02:08:44 +0000 (19:08 -0700)]
Use BitOperations::PopCount() in genCountBits() (#83661)

16 months agoImprove RA for LowerBlockStore (#83627)
Egor Bogatov [Tue, 21 Mar 2023 00:49:42 +0000 (01:49 +0100)]
Improve RA for LowerBlockStore (#83627)

16 months agoSyntaxValueProvider: avoid performance issue with syntax list containing many items...
Charles Stoner [Tue, 21 Mar 2023 00:08:42 +0000 (17:08 -0700)]
SyntaxValueProvider: avoid performance issue with syntax list containing many items (#83483)

16 months agoRemove calling convention modifiers from cpuid sig (#83672)
Adeel Mujahid [Tue, 21 Mar 2023 00:03:59 +0000 (02:03 +0200)]
Remove calling convention modifiers from cpuid sig (#83672)

> /runtime/src/coreclr/vm/cgensys.h:107:26: error: stdcall calling convention is not supported on builtin function [-Werror,-Wignored-attributes]

16 months agoHandle recursive type graphs in config binding generator (#83644)
Layomi Akinrinade [Mon, 20 Mar 2023 22:25:17 +0000 (15:25 -0700)]
Handle recursive type graphs in config binding generator (#83644)

16 months agoRevert "[mono][aot] Load AOT module of a container assembly using assembly name ...
Milos Kotlar [Mon, 20 Mar 2023 21:42:54 +0000 (22:42 +0100)]
Revert "[mono][aot] Load AOT module of a container assembly using assembly name (#83511)" (#83686)

This reverts commit 1e601c5101e1f0573cd03560615aa8f6cb38fa64.

16 months ago[mono] Fix a race in gparam construction. (#83688)
Zoltan Varga [Mon, 20 Mar 2023 20:08:25 +0000 (16:08 -0400)]
[mono] Fix a race in gparam construction. (#83688)

Re: https://github.com/dotnet/runtime/issues/81123.

16 months agoImplement support for unspeakable types. (#83631)
Eirik Tsarpalis [Mon, 20 Mar 2023 20:08:09 +0000 (20:08 +0000)]
Implement support for unspeakable types. (#83631)

* Implement support for unspeakable types.

* Remove unneeded declarations.

* Record ambiguity information in exception message.

* Fix error message testing in wasm.

* Address feedback.

* Add test case for interface POCOs

* Update src/libraries/System.Text.Json/src/Resources/Strings.resx

Co-authored-by: Dan Moseley <danmose@microsoft.com>
---------

Co-authored-by: Dan Moseley <danmose@microsoft.com>
16 months agoReduce the size of some Http header values (#83640)
Miha Zupan [Mon, 20 Mar 2023 19:45:43 +0000 (20:45 +0100)]
Reduce the size of some Http header values (#83640)

* Reduce the size of some Http header values

* PR feedback

16 months agoupdate mariner Linux image to 2.0 (#81973)
Tomas Weinfurt [Mon, 20 Mar 2023 19:23:04 +0000 (12:23 -0700)]
update mariner Linux image to 2.0 (#81973)

* update mariner Linux image to 2.0

* product

* test

* force run

* centos

* update

16 months agoJIT: revise inlinee block numbering, enable synthesis for inlinees (#83610)
Andy Ayers [Mon, 20 Mar 2023 19:06:31 +0000 (12:06 -0700)]
JIT: revise inlinee block numbering, enable synthesis for inlinees (#83610)

Start numbering inlinee blocks from 1 instead of 1 + the root compiler's
max BB num. Update inlinee block bbNums when they are inserted into the
root compiler's graph.

Adjust computations in various places that knew about the old approach
and looked from inlinee compiler to root compiler for bitset, epochs and
the like.

Enable synthesis for inlinees, now that regular bitsets on inlinee compiler
instances behave sensibly.

There is still some messiness around inlinees inheriting root compiler
EH info which requires special checks. I will clean this up separately.

Fixes #82755.
Contributes to #82964.

16 months agoFix 'x < 0' for unsigned (#83656)
Will Smith [Mon, 20 Mar 2023 19:05:29 +0000 (12:05 -0700)]
Fix 'x < 0' for unsigned (#83656)

16 months agoFix porting from servicing release (#83633)
Tarek Mahmoud Sayed [Mon, 20 Mar 2023 18:08:42 +0000 (11:08 -0700)]
Fix porting from servicing release (#83633)

16 months agoPrint the state when the align instructions don't match up (#83286)
Kunal Pathak [Mon, 20 Mar 2023 17:58:52 +0000 (10:58 -0700)]
Print the state when the align instructions don't match up (#83286)

* Print the state when the align instructions don't match up

* build fix

* Update loop number during block compaction

* Adjust the ifdef

* Fix #ifdef with #if

* TEMP COMMIT

* Revert "TEMP COMMIT"

This reverts commit c10b70dc4787f734bb99d5d4bb69b1a545d6516d.

16 months agoAdd linux-musl-riscv64 RID (#83465)
Antoine Martin [Mon, 20 Mar 2023 16:51:16 +0000 (12:51 -0400)]
Add linux-musl-riscv64 RID (#83465)

16 months ago[mono][aot] Load AOT module of a container assembly using assembly name (#83511)
Milos Kotlar [Mon, 20 Mar 2023 16:22:38 +0000 (17:22 +0100)]
[mono][aot] Load AOT module of a container assembly using assembly name (#83511)

* Load AOT module of a container assembly using assembly name

* Use mono_image_init to init the image

* Implement mono_loader_lock on load_container_amodule

* Avoid recursive invocation by setting container_assm_name to NULL

16 months agoAdd new MemoryExtension.Replace(src, dst, ...) overload (#83120)
Stephen Toub [Mon, 20 Mar 2023 15:39:16 +0000 (11:39 -0400)]
Add new MemoryExtension.Replace(src, dst, ...) overload (#83120)

* Add new MemoryExtension.Replace(src, dst, ...) overload

* Address PR feedback

16 months agoUse escape sequence instead of char in utf-8 tests. (#83595)
Ilona Tomkowicz [Mon, 20 Mar 2023 15:24:55 +0000 (16:24 +0100)]
Use escape sequence instead of char in utf-8 tests. (#83595)

16 months agoFix ToString handling of [Flags] enums with negative values (#83616)
Stephen Toub [Mon, 20 Mar 2023 11:25:43 +0000 (07:25 -0400)]
Fix ToString handling of [Flags] enums with negative values (#83616)

* Fix ToString handling of [Flags] enums with negative values

Our Enum rewrite earlier in .NET 8 broke the handling of ToString for [Flags] enums with negative values.  Prior to that rewrite, all of the enum values were stored as a sorted array of ulongs, regardless of the enum's underlying type. Now, they're stored as a sorted array of the underlying type.  However, that means that for signed underlying types, the position of negative values moved from the end to the beginning.  We knew this, and accordingly updated tests that reflected that order (which as an implementation detail is observable via APIs that get the underlying values).  But what we didn't notice because we didn't have tests covering it is that the logic for formatting [Flags] enums actually depends on those negative values being after the non-negative ones.  That's for two reasons.  First, there's logic that special-cases 0 and assumes that an enum value of 0 must be in the first slot of the values array if it exists.  Second, the logic for deciding which enum values should be included starts at the largest unsigned value and walks down subtracting out matching bit patterns as they're found; if the values are sorted differently, the resulting strings are different.  Not only might different names be included, but a number might be rendered if the order of evaluation means that no perfect subsetting is found even if there would have been had a different order been used.

This fixes the issues by restoring the ordering based on the values being unsigned.  When we sort, we sort based on the unsigned version of the underlying primitive, even if it's signed.

* Collapse GetEnumInfo for integer types to only be unsigned

Rather than 13 possible `EnumInfo<T>`, we consolidate down to just 8, such that for all of the underlying types that are signed integers, we instead always use their unsigned counterparts.  This then ensures that the data for the values is always sorted according to the unsigned representation and all logic in Enum that performs searches based on value is always doing so consistently.

16 months agoDelete dead GetUserFeatureDirectory functions (#83660)
Stephen Toub [Mon, 20 Mar 2023 11:17:54 +0000 (07:17 -0400)]
Delete dead GetUserFeatureDirectory functions (#83660)

The only overload that's used is the one taking two arguments.

16 months ago[eventpipe] Perform endian aware serialization of structs and arrays above FireETW...
Stefan Schulze Frielinghaus [Mon, 20 Mar 2023 08:31:51 +0000 (09:31 +0100)]
[eventpipe] Perform endian aware serialization of structs and arrays above FireETW layer (#80493)

16 months agoFix missing comparer when creating FrozenDictionary (#83651)
Stephen Toub [Sun, 19 Mar 2023 22:05:03 +0000 (18:05 -0400)]
Fix missing comparer when creating FrozenDictionary (#83651)

16 months agoUpdate xarch to track more instruction metadata as flags (#83473)
Tanner Gooding [Sun, 19 Mar 2023 14:30:51 +0000 (07:30 -0700)]
Update xarch to track more instruction metadata as flags (#83473)

* Reorder entries in instrsxarch to make finding SIMD instructions easier

* Remove unused instructions: cvtpd2pi, cvtpi2pd, cvtpi2ps, cvtps2pi, cvttpd2pi, and cvttps2pi

* Updating the xarch SIMD instructions to track flags indicating REX.W bit encoding and VEX/EVEX support

* Update the emitter to take advantage of the new insFlags

* Ensure TakesRexWPrefix works on x86

* Properly track REX.W encoding for VEX vs EVEX

* Ensure supportsVEX is set before supportsEVEX

* Ensure canUseVexEncoding is true when ForceEVEXEncoding is set

* Track how some special EVEX instructions are handled differently

* Apply formatting patch

* Ensure REX.WX is handled for EVEX where required

16 months agoAdd async post to deep-dive-blog-posts.md (#83506)
Stephen Toub [Sun, 19 Mar 2023 12:34:46 +0000 (08:34 -0400)]
Add async post to deep-dive-blog-posts.md (#83506)

16 months ago[Mono] Intrinsify As* on ARM64 with mini JIT (#83544)
Fan Yang [Sat, 18 Mar 2023 19:37:20 +0000 (15:37 -0400)]
[Mono] Intrinsify As* on ARM64 with mini JIT (#83544)

* Intrinsify As* on arm64

* Address review feedback

* Uncomment

16 months agoImprove and enable writing test wrappers to disk (#83444)
Mark Plesko [Sat, 18 Mar 2023 17:00:39 +0000 (10:00 -0700)]
Improve and enable writing test wrappers to disk (#83444)

`CodeBuilder` utility (mainly handles indentation) was lifted from the [PROSE codebase](https://msdata.visualstudio.com/PROSE/_git/PROSE?version=GCa244bb231dcaabe04b4825d4e093beaceed434d8&path=/Microsoft.ProgramSynthesis/Common/Utils/CodeBuilder.cs).  I omitted the last two revisions to it as they opened a few API questions for me and I didn't need the functionality anyway.

Then use it to format the generated code in `XUnitWrapperGenerator`.  Diffs are probably best viewed with whitespace ignored.  Writing simple text (`Append`/`AppendLine`) is the same as `StringBuilder`.  Indentation is specified (usually with a `using` that cleans up) and then added automatically.

Interesting tidbits:
- Factored `AppendAliasMap` from the 3 identical uses
- The loop structure for breaking the tests into groups of 50 doesn't allow `using`.  I did the push/pop of indentation manually rather than trying to restructure it.

Add a new MergedTestRunner.targets for relevant logic.  Enable `EmitCompilerGeneratedFiles` in it.

16 months agoInclude args in hostfxr entry point tracing (#83605)
Elinor Fung [Sat, 18 Mar 2023 15:40:27 +0000 (08:40 -0700)]
Include args in hostfxr entry point tracing (#83605)

16 months ago[android][ios] Add SDK and workload to support library mode (#83487)
Steve Pfister [Sat, 18 Mar 2023 03:39:51 +0000 (23:39 -0400)]
[android][ios] Add SDK and workload to support library mode (#83487)

Introduces the experimental workload mobile-librarybuilder-experimental that supports building self-contained shared or static native libraries on iOS and Android.

Once installed, the workload can be activated when the runtime identifier is android, ios, tvos, or maccatalyst based and the project contains the property <NativeLib>true</NativeLib>. NativeLib is a property NativeAOT uses to activate library mode and we will use that for consistency.

The Microsoft.NET.Runtime.LibraryBuilder.Sdk is a new nuget package will contain all of the necessary msbuild props and targets that drive the whole library builder process.

16 months agoUse Environment.SystemDirectory from GetFolderPath(System) on Windows (#83593)
Stephen Toub [Sat, 18 Mar 2023 00:49:26 +0000 (20:49 -0400)]
Use Environment.SystemDirectory from GetFolderPath(System) on Windows (#83593)

* Use Environment.SystemDirectory from GetFolderPath(System) on Windows

* Address PR feedback and fix up a few other occurrences

* Remove KnownFolders.System

16 months agoUnsigned division for IndexOf offsets (#83612)
Miha Zupan [Sat, 18 Mar 2023 00:02:07 +0000 (01:02 +0100)]
Unsigned division for IndexOf offsets (#83612)

16 months agoBump webpack in /src/mono/sample/wasm/browser-webpack (#83420)
dependabot[bot] [Fri, 17 Mar 2023 22:04:08 +0000 (23:04 +0100)]
Bump webpack in /src/mono/sample/wasm/browser-webpack (#83420)

Bumps [webpack](https://github.com/webpack/webpack) from 5.68.0 to 5.76.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.68.0...v5.76.0)

---
updated-dependencies:
- dependency-name: webpack
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
16 months agoVarious jiterpreter optimizations (#83322)
Katelyn Gadd [Fri, 17 Mar 2023 21:25:32 +0000 (14:25 -0700)]
Various jiterpreter optimizations (#83322)

* Implement CALL_HANDLER and CALL_HANDLER_S, since upon closer inspection they turned out to basically be a slightly more complex version of BR.
* Introduce persistent imported functions (similar to persistent types), which reduces the amount of time defining imports before compiling a trace.
* Don't call into C in order to emit single-byte unsigned LEB values (appendULeb is one of the hottest parts of the trace compiler).
* Track bailouts on a per-trace basis when bailout counting is enabled. This makes it easier to understand which traces have the worst performance problems. This does make bailout counting more expensive, but it was already expensive. (This probably needs more improvement to be truly useful, but it was helpful already.)
* Don't abort trace compiles for simple icalls, since in my testing many of them are in rarely-taken branches. They become bailouts instead.
* Unify the implementation of compressed names to simplify things.
* When defining an import you now pass the actual function (or function pointer) instead of manually providing it when instantiating the module.
* Various small optimizations to remove temporary JS allocations.
* Improve message formatting in the branch trace messages (off by default)

16 months agoSwitch tests for --additionalprobingpath to mocked components (#83541)
Elinor Fung [Fri, 17 Mar 2023 19:47:41 +0000 (12:47 -0700)]
Switch tests for --additionalprobingpath to mocked components (#83541)

16 months ago[mono][interp] Correctly track livness of vars used with MINT_MOV_8_* (#83597)
Vlad Brezae [Fri, 17 Mar 2023 19:29:29 +0000 (21:29 +0200)]
[mono][interp] Correctly track livness of vars used with MINT_MOV_8_* (#83597)

These instructions are defined as having no svars/dvars, even though they have multiple svars/dvars. We were failing to remove svars used by these instructions from the set of active vars, leading to vars remaining alive until the end of the basic block. This could lead to the consuming of the entire stack space available for interp vars.

16 months ago[Mono] Intrinsify max/min on ARM64 with mini JIT (#83468)
Fan Yang [Fri, 17 Mar 2023 17:15:23 +0000 (13:15 -0400)]
[Mono] Intrinsify max/min on ARM64 with mini JIT (#83468)

* Seperate smax/smin and umax/umin

* Intrinsify max/min on arm64

* Enforce rd == rn

* Replace comments with asserts

* Address review feedback

* Fix test failure

* Remove unused macros

* uncomment

16 months agoRename VirtualMethodTableManagedImplementation and add manual CCW to test generated...
Jackson Schuster [Fri, 17 Mar 2023 16:43:24 +0000 (09:43 -0700)]
Rename VirtualMethodTableManagedImplementation and add manual CCW to test generated RCW in ComInterfaceGenerator (#83285)

16 months ago[wasm] Fix dotnet.withRuntimeOptions (#83586)
Marek Fišera [Fri, 17 Mar 2023 16:35:52 +0000 (17:35 +0100)]
[wasm] Fix dotnet.withRuntimeOptions (#83586)

16 months ago[main] Update dependencies from dotnet/roslyn-analyzers (#83300)
dotnet-maestro[bot] [Fri, 17 Mar 2023 15:57:25 +0000 (10:57 -0500)]
[main] Update dependencies from dotnet/roslyn-analyzers (#83300)

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

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

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

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

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

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

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

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

---------

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
16 months ago[main] Update dependencies from 9 repositories (#83299)
dotnet-maestro[bot] [Fri, 17 Mar 2023 15:52:18 +0000 (10:52 -0500)]
[main] Update dependencies from 9 repositories (#83299)

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

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

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

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.3.23155.6 -> To Version 8.0.0-preview.3.23162.2

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

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

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

Microsoft.NETCore.Runtime.ICU.Transport
 From Version 8.0.0-preview.3.23160.1 -> To Version 8.0.0-preview.3.23163.3

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

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

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

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

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

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

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

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

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

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

* Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build 20230316.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.23068.4 -> To Version 1.0.0-prerelease.23166.4

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

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

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

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

---------

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
16 months agoJIT: profile synthesis blend and repair modes (#83567)
Andy Ayers [Fri, 17 Mar 2023 15:24:38 +0000 (08:24 -0700)]
JIT: profile synthesis blend and repair modes (#83567)

Implement blend and repair modes for synthesis. Blend merges a bit of
synthesized data into an existing PGO data set; repair tries to fix any
local inconsistencies (via heuristics). Both run count construction
afterwards.

Trust blended data like we trust dynamic data. Probably will want more
nuance here (eg trust dynamic blend, but not static blend) but this is
sufficent for now.

Also implement random and reverse modes; these will ultimately be used
for stress testing (not called anywhere yet).

Parameterize some of the magic constants that have cropped up.

Add blend mode as a new weekend pgo stress mode; fix the other synthesis
mode I added recently to pgo stress to set the config properly.

Contributes to #82964.

16 months ago[browser] disable memorySnapshot for WS test (#83583)
Pavel Savara [Fri, 17 Mar 2023 15:24:16 +0000 (16:24 +0100)]
[browser] disable memorySnapshot for WS test (#83583)

* disable memorySnapshot for WS test
* Update src/mono/wasm/test-main.js

Co-authored-by: Radek Doulik <radek.doulik@gmail.com>
16 months agoRuntime lookup clean up, enable for helper-based tail calls (#83430)
Egor Bogatov [Fri, 17 Mar 2023 13:30:52 +0000 (14:30 +0100)]
Runtime lookup clean up, enable for helper-based tail calls (#83430)

16 months ago[tasks] Add auto runtime initialization template to LibraryBuilder (#83050)
Mitchell Hwang [Fri, 17 Mar 2023 13:27:10 +0000 (09:27 -0400)]
[tasks] Add auto runtime initialization template to LibraryBuilder (#83050)

* [tasks] Add auto runtime initialization template to LibraryBuilder

* Grab shared library directory

* [tasks] Extend auto initialization template to account for customization

* Revert "Grab shared library directory"

This reverts commit bc86f2b91c76f0e40ad60516dcb1031d02e7054b.

* Remove platform specific naming

* [tasks] Move App Context setup back to autoinit.c

* Remove registering bundled modules and debugging until they can be validated

* Remove unnecessary wrapper

* Grab bundle_path later without eglib

Setting bundle_path in constructor may be too early for environment variables to be set
so grab it first thing when initializing the runtime.

Use getenv directly instead of calling into eglib with just one api

* Rename AssetsPath to AssembliesLocation

* Move assembly loading into separate function

* Remove unnecessary function

* Cleanup CMakeLists template indentation

* Add dotnet header to autoinit.c

* Default bundle_path if assemblies path environment variable not set

* Pass bundle_path to load assemblies

* Add logging and abort on failures

* Load assemblies with partial name

* Clean up targets and unneeded properties

* Rename source file

* Remove preload hook and make out of memory error more generic

* Throw when no exported symbols are found

* Remove aot data load prehook and aotdata generation

* Address feedback

* Address more feedback

* Add various fixes and make bundle_path a local variable

* Reintroduce load aot data hook in autoinit with guard

* Fix closing tag

* Include guard library-builder.h

* Fix typo

16 months ago[nodejs] add active issue (#83580)
Pavel Savara [Fri, 17 Mar 2023 13:21:56 +0000 (14:21 +0100)]
[nodejs] add active issue (#83580)

16 months ago [browser] fix advanced sample for MT (#83582)
Pavel Savara [Fri, 17 Mar 2023 13:19:46 +0000 (14:19 +0100)]
 [browser] fix advanced sample for MT (#83582)

16 months agoSlightly improve struct zeroing & copying (#83488)
Egor Bogatov [Fri, 17 Mar 2023 12:38:12 +0000 (13:38 +0100)]
Slightly improve struct zeroing & copying (#83488)

16 months agoUse nameof in attributes (#83566)
Stephen Toub [Fri, 17 Mar 2023 12:28:19 +0000 (08:28 -0400)]
Use nameof in attributes (#83566)

16 months ago[wasm] Implement rotate left/right immediate interp intrinsics in jiterpreter; implem...
Katelyn Gadd [Fri, 17 Mar 2023 10:06:19 +0000 (03:06 -0700)]
[wasm] Implement rotate left/right immediate interp intrinsics in jiterpreter; implement clz/ctz/popcnt (#83573)

* Implement rotate left/right immediate interp intrinsics
* Implement clz/ctz/popcnt

16 months agoEnsure free buffer space when reading TLS messages (#83480)
Radek Zikmund [Fri, 17 Mar 2023 08:17:18 +0000 (09:17 +0100)]
Ensure free buffer space when reading TLS messages (#83480)

* Ensure free buffer space when reading TLS messages

* Move buffer expansion outside of the loop to prevent unbounded grow

* Fix failing tests

The initial size is not enough to cover later TLS frames

16 months ago[wasm] Post 3.1.30 emscripten bump feedback (#83391)
Radek Doulik [Fri, 17 Mar 2023 06:39:24 +0000 (07:39 +0100)]
[wasm] Post 3.1.30 emscripten bump feedback (#83391)

* [wasm] Post 3.1.30 emscripten bump feedback

Make the minimal build env vars item group "private".

Enable simd for old v8 in tests

* Add jsvu binaries to the path

Do not use experimental flags, as we should get newer v8

* Export PATH and echo it

* Use webassembly helix image

16 months agodisable NTLM tests on RedHat.7 (#83559)
Tomas Weinfurt [Fri, 17 Mar 2023 05:40:49 +0000 (22:40 -0700)]
disable NTLM tests on RedHat.7 (#83559)

* disable NTLM tests on RedHat.7

* Package_Unsupported_NTLM