Bruce Forstall [Sat, 10 Dec 2022 00:36:40 +0000 (17:36 -0700)]
Enable `runtime-coreclr jitstress-isas-avx512` pipeline on Linux (#79417)
Now our Linux x64 machines in CI are AVX-512 capable.
Andrew Au [Sat, 10 Dec 2022 00:10:26 +0000 (16:10 -0800)]
Move the rearrange_uoh_segments call earlier so that distribute_free_regions can take them into account (#79262)
Andrew Au [Fri, 9 Dec 2022 22:55:10 +0000 (14:55 -0800)]
A gentle reminder that TraceGC is turned off (#79183)
ws77.cho [Fri, 9 Dec 2022 22:39:02 +0000 (07:39 +0900)]
fix determin lib name varation logic (#79370)
When checking whether the suffix is contained, the size calcuation is wrong.
In case of Linux, u".so" is defined to PLATFORM_SHARED_LIB_SUFFIX_W.
So, string length (3) should be added to iterator.
But, in the current implementation, ARRAY_SIZE(PLATFORM_SHARED_LIB_SUFFIX_W) (4) is added to iterator.
Brian Bohe [Fri, 9 Dec 2022 19:57:12 +0000 (14:57 -0500)]
Fixing assert on variable live range for simd12 LCL / STORE_LCL (#79182)
* Adding jitdump for varible debug info
* Forcing home and live update after SIMD12 store lcl
Although LSRA is indicating the tree produces the
result in an xmm's register, we are storing vector3
always on stack, so its home on varDsc and liveness
information must be recorded accordingly. LSRA
seems not to has this information.
* Formatting file
* Add missing case of targetReg in genStoreLclTypeSIMD12()
* Fix liveness update for genStoreLclFld() and genStoreLclVar on x64
* Fix liveness update for genStoreLclTypeSIMD12() on arm64
* Fix and unifying genStoreLclFld/LclVar on x64
* Revert "Ignoring test regression runtime_63354 in x86 (#79358)"
This reverts commit
1dec6480669d2008cd4c067dc43fa9da31e779ac.
Co-authored-by: Brian Bohe <brianbohe@microsoft.com>
Co-authored-by: Kunal Pathak <Kunal.Pathak@microsoft.com>
Josie Bigler [Fri, 9 Dec 2022 17:51:37 +0000 (11:51 -0600)]
Increase test coverage of System.Reflection.Context (#77999)
Radek Doulik [Fri, 9 Dec 2022 17:38:28 +0000 (18:38 +0100)]
[wasm] Add Vector128.Narrow intrinsics (#79447)
Add intrinsics for
i8x16.narrow_i16x8_s(a: v128, b: v128) -> v128
i8x16.narrow_i16x8_u(a: v128, b: v128) -> v128
i16x8.narrow_i32x4_s(a: v128, b: v128) -> v128
i16x8.narrow_i32x4_u(a: v128, b: v128) -> v128
These improve string handling, where the i16x8.narrow_i32x4_u is used.
Like:
> wa-info -d -f corlib_System_Text_ASCIIUtility_ExtractAsciiVector_System_Runtime_Intrinsics_Vector128_1_uint16_System_Runtime_Intrinsics_Vector128_1_uint16 dotnet.wasm
(func corlib_System_Text_ASCIIUtility_ExtractAsciiVector_System_Runtime_Intrinsics_Vector128_1_uint16_System_Runtime_Intrinsics_Vector128_1_uint16(param $0 i32, $1 i32, $2 i32, $3 i32))
local.get $0
local.get $1
v128.load align:4 [SIMD]
local.get $2
v128.load align:4 [SIMD]
i8x16.narrow.i16x8.u [SIMD]
v128.store [SIMD]
> wa-info -d -f corlib_System_Text_ASCIIUtility_NarrowUtf16ToAscii_Intrinsified_char__byte__uintptr dotnet.wasm
(func corlib_System_Text_ASCIIUtility_NarrowUtf16ToAscii_Intrinsified_char__byte__uintptr(param $0 i32, $1 i32, $2 i32, $3 i32) (result i32))
...
v128.load [SIMD]
local.tee $5
v128.const 0xff80ff80ff80ff80ff80ff80ff80ff80 [SIMD]
local.tee $6
v128.and [SIMD]
v128.any.true [SIMD]
br.if
local.get $1
i32.eqz
br.if
local.get $1
local.get $5
local.get $5
i8x16.narrow.i16x8.u [SIMD]
v128.store64.lane 0 [SIMD]
...
It is also measurable in the browser-bench, where
`Json, non-ASCII text deserialize` improves from 0.5048ms to 0.4428ms
for simd on chrome.
Zoltan Varga [Fri, 9 Dec 2022 16:45:37 +0000 (11:45 -0500)]
[mono] Add a managed cache for flags in RuntimeType. (#78840)
Ankit Jain [Fri, 9 Dec 2022 16:17:16 +0000 (11:17 -0500)]
[wasm] Wasm.Build.Tests - build projects for net8.0 by default (#79254)
* [wasm] Wasm.Build.Tests - build projects for net8.0 by default
* [wasm] Fix templates to use the correct tfm
* InstallWorkloadFromArtifacts: Share the nuget cache for installing all the workload combinations
* WBT: fix re-runs
* WBT: fix non-wasm console project tests
* Fix tfm used for blazor projects
* WBT: Update to use 7.0.0 version of the workload
* WBT: Update tests to remove workarounds for 7.0 that aren't needed anymore
* Fix BrowserBuildAndRun for 7.0
* WBT: Run a blazor template referencing a native lib
* WBT: Update SkiaSharp reference
* WBT: Use warnAsError for blazor builds
* WBT: Disable tests failing to run 8.0-sdk+tfm=net7 - https://github.com/dotnet/runtime/issues/79313
Pavel Savara [Fri, 9 Dec 2022 13:52:32 +0000 (14:52 +0100)]
[wasm] optimize interop startup and linker hints (#77256)
Prepare for making legacy interop optional and small optimization
Filip Navara [Fri, 9 Dec 2022 13:11:26 +0000 (14:11 +0100)]
Don't embed bitcode on tvOS anymore (#79349)
Co-authored-by: Michal Strehovský <MichalStrehovsky@users.noreply.github.com>
Milos Kotlar [Fri, 9 Dec 2022 09:29:01 +0000 (10:29 +0100)]
[mono][tests] Throw InvalidProgramException when ENDFILTER has invalid value type or invalid number of values (#79394)
* Throw InvalidProgramException when ENDFILTER has invalid value type or invalid number of values
Michal Strehovský [Fri, 9 Dec 2022 09:16:51 +0000 (18:16 +0900)]
Fix creation of pointer arrays (#79433)
Creation of pointer arrays is on a similar plan to multi-dim arrays - we create them from a template type, but the template is slightly wrong. Previously, EETypeCreator would massage the bits into the correct shape, but now we mostly just copy the bits from the template. Use a more precise template for pointer arrays.
Without this, the base size and element type of pointer arrays was slightly wrong.
I'm also deleting the duplicated "use a special template for this one" logic.
dotnet-maestro[bot] [Fri, 9 Dec 2022 08:25:19 +0000 (09:25 +0100)]
[main] Update dependencies from dotnet/linker (#79272)
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Radek Zikmund [Fri, 9 Dec 2022 01:45:57 +0000 (02:45 +0100)]
Temporarily disable NoCallback_RevokedCertificate_NoRevocationChecking_Succeeds (#79407)
The 3rd party service has expired certificate
Jeff Handley [Thu, 8 Dec 2022 21:50:09 +0000 (13:50 -0800)]
Add ImmutableArray<T>.Builder.DrainToImmutable() (#79385)
* Add ImmutableArray<T>.Builder.DrainToImmutable
* Refactor DrainToImmutable for a more optimized implementation
* Augment and refine DrainToImmutable unit tests
Marek Fišera [Thu, 8 Dec 2022 21:08:34 +0000 (22:08 +0100)]
[wasm] Ignore not relevant rollup warnings (#79396)
Radek Doulik [Thu, 8 Dec 2022 20:58:58 +0000 (21:58 +0100)]
Fix wrong value in the comment (#79401)
Tlakaelel Axayakatl Ceja [Thu, 8 Dec 2022 20:55:38 +0000 (12:55 -0800)]
Remaining feedback part1 (#79011)
* Delete remaining eng folder files
* Import repo root Directory.Build.props|targets
* Remove some of the duplicated package settings defined in the repo root Directory.Build.props
* Use shared new Roslyn ApiCompat infrastructure
* Disable some warning codes in illink editorconfig
* Disable warning about IL3000 since code is safe, it will never be used in single file
* Move ilasm.proj file outside of the eng folder
* Add missing analyzer generated tests and skip the CompilerGeneratedCodeSubstitutions test since it uses constant propagation that is not supported by the analyzer
Thays Grazia [Thu, 8 Dec 2022 19:04:44 +0000 (16:04 -0300)]
[wasm][debugger] Revert don't need to escape special characters anymore (#78320)
* Trying to fix again
* Removing comment
* trying to fix CI
* implementing escaped string for dotnet:// as discussed with @radical
* addressing radical suggestion
* fix CI
* implementing test with colon as discussed with @radical.
* fix on windows
* pushing @radical changes and addressing @radical comments
* using ilona suggestion about conditionalfact
* Reverting one suggestion.
* Fixing behavior on mac
Stephen Toub [Thu, 8 Dec 2022 18:54:00 +0000 (13:54 -0500)]
Fix startingStackpos tracking for loop in loop (#79382)
* Fix startingStackpos tracking for loop in loop
This extends the fix made earlier around proper handling of the backtracking stack in EmitLoop. If this loop is inside of another loop, then we need to preserve the startingStackpos on the backtracking stack upon successfully completing the loop, as the outer loop might iterate and cause another occurrence of this loop to run, which will then overwrite our single startingStackpos local. If that iteration backtracks, we then need to be able to pop the previous iterations startingStackpos and restore its value.
* Update src/libraries/System.Text.RegularExpressions/src/System/Text/RegularExpressions/RegexCompiler.cs
Jeremy Koritzinsky [Thu, 8 Dec 2022 18:29:21 +0000 (10:29 -0800)]
Implement unmanaged-to-managed direction for vtable stub generator (#77130)
Elinor Fung [Thu, 8 Dec 2022 18:08:06 +0000 (10:08 -0800)]
Update doc to describe host_runtime_contract (#79374)
Elinor Fung [Thu, 8 Dec 2022 18:01:13 +0000 (10:01 -0800)]
Delete some remnants from fusion (#79380)
Stephen Halter [Thu, 8 Dec 2022 17:41:51 +0000 (09:41 -0800)]
Do not override content root with default (#79242)
dotnet-maestro[bot] [Thu, 8 Dec 2022 17:23:10 +0000 (12:23 -0500)]
[main] Update dependencies from dotnet/arcade (#79271)
* Update dependencies from https://github.com/dotnet/arcade build
20221205.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.22579.2 -> To Version 8.0.0-beta.22605.1
* Update dependencies from https://github.com/dotnet/arcade build
20221206.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.22579.2 -> To Version 8.0.0-beta.22606.1
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Jan Kotas [Thu, 8 Dec 2022 17:14:59 +0000 (09:14 -0800)]
Replacing exception strings with those stored in the resx file (#79378)
* Replacing exception strings with those stored in the resx file
Contributes to #34056
* Update argument name
Co-authored-by: databunks <sahaq2001@gmail.com>
Mark Plesko [Thu, 8 Dec 2022 16:24:31 +0000 (08:24 -0800)]
Convert b08046 to C# and fix it (#79389)
Resolves #5810
I verified manually that the original IL and original C# translation both failed. The C#-generated IL is very close though not identical the original IL.
Vlad Brezae [Thu, 8 Dec 2022 15:31:10 +0000 (17:31 +0200)]
[mono][interp] Add intrinsic for string allocation (#79392)
* [mono][metadata] Remove redundant use of coop handles
mono_string_new_size_handle was making use of handles for no reason, while mono_string_new_size_checked was just ignoring the created handle. Make mono_string_new_size_checked fast again.
* [mono][interp] Add intrinsic for string allocation
Vlad Brezae [Thu, 8 Dec 2022 14:42:45 +0000 (16:42 +0200)]
[mono][interp] Remove some dead opcodes (#79343)
* [mono][interp] Remove opcodes used only by the managed allocator
Which normally shouldn't be compiled with interpreter.
* [mono][interp] Remove unused branch opcodes
* [mono][interp] Remove dead opcode
* [mono][interp] Remove Array.IsPrimitive which is no longer used
* [mono][interp] Remove redundant ldelem.i/stelem.i
Pavel Savara [Thu, 8 Dec 2022 13:25:14 +0000 (14:25 +0100)]
[wasm] Lazy init of [JSExport] bindings (#77293)
* don't trigger static ctor with JSExport init
* lazy init from JS
* fix for backward compatibility with Net7
Miha Zupan [Thu, 8 Dec 2022 12:36:10 +0000 (13:36 +0100)]
Fix Sse3 => Ssse3 typo (#79368)
Stephen Toub [Thu, 8 Dec 2022 11:45:18 +0000 (06:45 -0500)]
Remove span pinning associated with string.Create (#78914)
* Remove span pinning associated with string.Create
This is now possible with C# 11.
* Address PR feedback
Jakob Botsch Nielsen [Thu, 8 Dec 2022 09:11:55 +0000 (10:11 +0100)]
JIT: Allow cloning addresses even before initobj (#79341)
Roslyn emits ldloca + dup + initobj when initializing structs. Normally
we clone address trees instead of creating a local for them (which will
address expose the local), but we treat this initobj pattern specially.
Remove this special treatment. It means we sometimes end up with
slightly larger code because we no longer have a register with the
address in it (could potentially be fixed by CSE), but avoiding the
address exposure seems like the right trade off to me.
Fix #42354
Fix #57055
Michal Strehovský [Thu, 8 Dec 2022 07:51:52 +0000 (16:51 +0900)]
Delete parts of type system that deal with layouts (#79366)
The layout of type is always the same as the template so we don't need the logic. This gets rid of uncertainities around "can I reliably ask type system questions around layouts" (see the deleted FieldLayoutAlgorithms). Now the answer is: "you can't ask those questions", which is better than "you could get an answer that you might not like" (an assert).
Will Smith [Thu, 8 Dec 2022 06:21:01 +0000 (22:21 -0800)]
[JIT] - Fixed sub-optimal optimization for `a % 1` to Zero (#77760)
* Optimize a % 1 to Zero
* Update disasm tests
* Minor change
* Remove duplicate opt
* Use extract side effects
* Re-arranging mod optimizations
* Re-arranging mod optimizations
* Extended mod optimization with -1. Unsetting debug node morphed flag.
* Remove space
* Try catch the regression
* Use FULL-LINE for tests
* Remove '% -1' opt
* Updated vn for constant. Re-using op2 for zero constant.
* Do not optimize part of this if not global morph
* Checking side effect flag early
* Check for GT_CNS_LNG
* Update Regression1.csproj
* Recording issue for mono
* Update issues.targets
* Using SetIntegralValue, removed unrelated changes, transformation will not happen if optimizations are disabled
* Minor change
* Minor change
* Use IsIntegralConst
Stephen Toub [Thu, 8 Dec 2022 03:49:24 +0000 (22:49 -0500)]
Add MemoryExtensions.Split (#79048)
* Add MemoryExtensions.Split
* Remove unnecessary IndexOf
* Fix a couple uses
* Use simpler pattern matching syntax instead of SequenceEqual
* Address PR feedback
Kevin Jones [Thu, 8 Dec 2022 02:00:38 +0000 (21:00 -0500)]
Fix BN_is_zero for OpenSSL 1.0.2 non-portable build
Stephen Toub [Thu, 8 Dec 2022 01:23:59 +0000 (20:23 -0500)]
Add experimental Regex test based on SampleMatches (#79364)
This adds a (currently disactivated) test that takes the ~15K regexes in our pattern database, generates inputs for each using the NonBacktracking engine's sampler, and then validates all the engines with that pattern. The sampler currently hangs on some patterns, and it asserts on others, so this is manual-only until such issues can be fixed. Still, I was able to run another ~10K patterns through all the engines before it fell over with an assert.
Stephen Toub [Thu, 8 Dec 2022 01:22:04 +0000 (20:22 -0500)]
Fix declaration of local in regex source generator (#79362)
Mike McLaughlin [Wed, 7 Dec 2022 23:17:41 +0000 (15:17 -0800)]
Fix dump creation on MacOS Ventura (#79356)
Use the task_info(TASK_DYLD_INFO) API to get the dylinker info instead of
enumerating all the memory regions. This works on Ventura and simplifies
the module enumeration quite a bit.
Brian Bohe [Wed, 7 Dec 2022 21:59:45 +0000 (16:59 -0500)]
Ignoring test regression runtime_63354 in x86 (#79358)
* Ignoring test regression runtime_63354 in x86
* Adding doble * just in case
Co-authored-by: Brian Bohe <brianbohe@microsoft.com>
Michal Strehovský [Wed, 7 Dec 2022 21:54:00 +0000 (06:54 +0900)]
Use static sealed vtable for dynamically created types (#79332)
The sealed vtable is identical for all canonically equivalent types. We had a to make a copy because in the presence of universal shared generics, new sealed vtables could be created for dynamic types and those need to use pointer-sized slots (the slots are relative pointers in the static case and have been since Redhawk times).
Stephen Toub [Wed, 7 Dec 2022 21:51:16 +0000 (16:51 -0500)]
Use IndexOfAnyExceptInRange in ZipHelper.GetEncoding (#79357)
Stephen Toub [Wed, 7 Dec 2022 20:33:47 +0000 (15:33 -0500)]
Fix handling of backtracking stack with some loops (#79353)
With both RegexOptions.Compiled and the Regex source generator, Regex greedy loops with
- a minimum bound of at least 2
- no child constructs that backtrack
- and a child that's more than a one/notone/set (aka things that match a single character)
are possibly leaving state on the backtracking stack when:
- at least one iteration of the loop successfully matches
- but not enough iterations match to make the loop successful such that matching the loop fails
In that case, if a previous construct in the pattern pushed any state onto the backtracking stack such that it expects to be able to pop off and use that state upon backtracking to it, it will potentially pop the erroneously leftover state. This can then cause execution to go awry, as it's getting back an unexpected value. That can lead to false positives, false negatives, or exceptions such as an IndexOutOfRangeException due to trying to pop too much from the backtracking stack.
We already have the ability to remember the backtracking stack position when we initially enter the loop so that we can reset to that position later on. The fix is simply to extend that to also perform that reset when failing the match of such a loop in such circumstances.
Kevin Jones [Wed, 7 Dec 2022 19:34:30 +0000 (14:34 -0500)]
Call BIO_gets in a loop until no more data is available
Kevin Jones [Wed, 7 Dec 2022 18:33:55 +0000 (13:33 -0500)]
Handle zero value modulus for OpenSSL 1.x
OpenSSL 1.x reports an RSA modulus of zero as an OutOfMemoryException. This maps it correctly to a CryptographicException.
Olli Saarikivi [Wed, 7 Dec 2022 18:04:36 +0000 (10:04 -0800)]
Fix a NonBacktracking subsumption checking rule for XY|X??Y (#79163)
* Add test for subsumption rule bug
* Fix subsumption rule by adding missing check for nullability of X
Michal Strehovský [Wed, 7 Dec 2022 17:51:28 +0000 (02:51 +0900)]
Compile native code with `-ffunction-sections` (#79322)
Pavel Savara [Wed, 7 Dec 2022 17:24:42 +0000 (18:24 +0100)]
[wasm] fix marshaling Error to C# as JSType.Any
Simon Rozsival [Wed, 7 Dec 2022 12:36:41 +0000 (13:36 +0100)]
[Android] Fix path to ping on Android API 21-27 (#79076)
Zoltan Varga [Wed, 7 Dec 2022 10:10:38 +0000 (05:10 -0500)]
[mono] Convert Array icalls to use ObjectHandleOnStack. (#77343)
Michal Strehovský [Wed, 7 Dec 2022 09:12:51 +0000 (18:12 +0900)]
Simplify MethodCell (#79321)
Even if my life depended on it, I would not be able to explain how/why `MethodCell` works and which code paths in it we would take at runtime. This pretty much restores `MethodCell` to how it looked like before the universal shared code RI in .NET Native.
Ben Adams [Wed, 7 Dec 2022 08:37:31 +0000 (08:37 +0000)]
Only allocate StringBuilder for complex type names (#79325)
Co-authored-by: Stephen Toub <stoub@microsoft.com>
Resolves https://github.com/dotnet/runtime/issues/79317
Vlad Brezae [Wed, 7 Dec 2022 07:47:57 +0000 (09:47 +0200)]
[mono][interp] Replace ldobj.vt + stobj.vt.noref pair with cpobj.vt.noref (#79302)
* [mono][interp] Add new cpobj version that doesn't require card marking
* [mono][interp] Replace ldobj.vt + stobj.vt.noref pair with cpobj.vt.noref
Zoltan Varga [Wed, 7 Dec 2022 05:17:51 +0000 (00:17 -0500)]
[mono][aot] Fix infinite recursion in the AOT dwarf emitter. (#79310)
The recursion would happen if a gshared type would contain a recursive reference to
it. It was triggered by the JsonTypeInfo:JsonTypeInfo<Queue<T>> field added by #78646.
Fixes https://github.com/dotnet/runtime/issues/79279.
Will Smith [Wed, 7 Dec 2022 02:39:38 +0000 (18:39 -0800)]
Added IsContainableMemoryOpSize (#79126)
David Perfors [Wed, 7 Dec 2022 01:52:16 +0000 (02:52 +0100)]
Fix test by actually passing the message and exception. (#79307)
* Fix test by actually passing the message and exception.
* Add tests to project
Jan Vorlicek [Wed, 7 Dec 2022 01:29:15 +0000 (02:29 +0100)]
CoreCLR initialization failures logging (#78790)
* CoreCLR initialization failures logging
This change adds detecting and logging of failures during coreclr
initialization. For logging, it uses a new host API
`coreclr_set_error_writer` to register a callback to report the errors
to the host. The hosts have support for optional usage of this API so
that they can work with older runtime versions as well.
The logging checks and reports failures with:
* System.Private.CoreLib.dll
* GC initialization
* JIT initialization
* libSystem.Native.so/dylib on Unix
The logging messages should allow customers to self-diagnose the issues
causing the failures.
* Reflect PR feedback and a bit of cleanup
* revert the try_get_export to not to have the isOptional argument
* Unify the error logging in JIT loading to single variadic macro
* Also fixes Unix build, the code in gcenv.unix.cpp cannot use the GCToEEInterface
* Add single file host detection
* Fix libSystem.Native check location
* Add the coreclr_set_error_writer API to Mono
* Fix Mono x86 missing calling convention spec
* Fix error code returned when the S.P.C. is not found
Jakob Botsch Nielsen [Tue, 6 Dec 2022 23:39:16 +0000 (00:39 +0100)]
JIT: Avoid containing small memory operands in GT_SELECT (#79296)
Fix #79290
Sven Boemer [Tue, 6 Dec 2022 23:34:39 +0000 (15:34 -0800)]
Prevent warning for implicit ILCompiler reference (#79240)
Elinor Fung [Tue, 6 Dec 2022 23:23:40 +0000 (15:23 -0800)]
Add mechanism for runtime to query host for information (#78798)
Egor Bogatov [Tue, 6 Dec 2022 23:20:23 +0000 (00:20 +0100)]
Reserve memory for FOH in-range (#78292)
Vitek Karas [Tue, 6 Dec 2022 18:34:01 +0000 (10:34 -0800)]
Documentation signature parser tests and fixes for NativeAOT (#79168)
This ports infra for the "MemberAssertions" tests which linker uses.
It then ports the document signature parser test from linker.
And adds fixes to make the tests pass. After this AOT and Linker are behaving exactly the same with regard to the tests we have for this area.
Vitek Karas [Tue, 6 Dec 2022 18:33:26 +0000 (10:33 -0800)]
Use tokens for validation of Kept members in linker tests for NativeAOT (#79228)
Switches from using display names (which are currently not consitent between linker/AOT) to tokens. This is possible for NativeAOT because the analysis reports type system entities as read from the input assembly, and thus we can directly compare them to the input assembly read via Cecil.
(Note that this is not possible in linker version of this infra, because the linked members are read from the output assembly which has different token numbers).
This also enables validation of properties and events.
Andrew Au [Tue, 6 Dec 2022 18:23:13 +0000 (10:23 -0800)]
Avoid dereferencing null if the debugger APIs are called before initializing the AppDomain (#78970)
SingleAccretion [Tue, 6 Dec 2022 17:26:30 +0000 (20:26 +0300)]
Fold all local addresses in local morph (#79194)
* Fix FIELD<struct> size calculation
"getFieldClass" returns the field's owner class, not its own.
* Precise value numbering for local addresses
* ADD(LCL_ADDR, CONST) => LCL_FLD_ADDR
* Fold to local address nodes in local morph
Unconditionally.
* Clean up lvQuirkToLong
* Support ADD(ADDR(LCL), CONST) in local morph
* Morph the local address for locations
* Fold hidden buffer args too
* Fix gcWriteBarrierFormFromTargetAddress
* Simplify IsLocalAddrExpr equivalents
No diffs except for one regression in a 400K bytes struct test.
Egor Bogatov [Tue, 6 Dec 2022 16:40:30 +0000 (17:40 +0100)]
Fix Runtime_76194 test (#78760)
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
Benjamin Hodgson [Tue, 6 Dec 2022 16:29:01 +0000 (11:29 -0500)]
Fix comment typo in DateTime.cs (#79278)
Gleb Balykov [Tue, 6 Dec 2022 15:51:57 +0000 (18:51 +0300)]
Add tizen x64 cross build support (#79226)
* Add tizen x64 cross build support
Co-authored-by: Adeel Mujahid <3840695+am11@users.noreply.github.com>
Alexander Köplinger [Tue, 6 Dec 2022 15:50:20 +0000 (16:50 +0100)]
Don't include Interop.InitializeTerminalAndSignalHandling.cs on mobile (#79269)
It is only used by PosixSignalRegistration.Unix.cs which is already excluded there. The same applies to Interop.PosixSignal.cs
Michal Strehovský [Tue, 6 Dec 2022 15:43:04 +0000 (00:43 +0900)]
Delete .NET Native leftovers from type loader (part 6 of X) (#79264)
This finishes the largely mechanical deletions. Type loader codebase now shrank to almost a half of what it was when I started. I want to look at a couple more things that look a lot more complicated than they should be, but leave the rest.
Simon Rozsival [Tue, 6 Dec 2022 14:32:37 +0000 (15:32 +0100)]
[Android] Fix SslStream on APIs 21-23 (#78918)
Alexander Köplinger [Tue, 6 Dec 2022 14:20:35 +0000 (15:20 +0100)]
Add condition to backport.yml (#79276)
Viktor Hofer [Tue, 6 Dec 2022 13:40:19 +0000 (14:40 +0100)]
Move reference assembly logic into root msbuild files (#79268)
* Move reference assembly logic into root msbuild files
That allows other components like the linker that don't reside under src/libraries to build reference assemblies without duplicating the infrastructure.
kasperk81 [Tue, 6 Dec 2022 11:13:59 +0000 (13:13 +0200)]
remove default framework in perf setup script (#79258)
* remove default framework in perf setup script
* remove default framework in perf setup script
Marek Fišera [Tue, 6 Dec 2022 10:46:09 +0000 (11:46 +0100)]
[wasm] Supply `INITIAL_MEMORY` to emcc in wasm.proj (#79148)
Ivan Diaz Sanchez [Tue, 6 Dec 2022 08:34:17 +0000 (00:34 -0800)]
Fix Processor Count getting ignored due to typo in libs/build-native.proj (#79249)
Michal Strehovský [Tue, 6 Dec 2022 08:22:33 +0000 (17:22 +0900)]
Delete .NET Native leftovers from type loader (part 5 of X) (#79260)
Jan Kotas [Tue, 6 Dec 2022 05:44:36 +0000 (21:44 -0800)]
Delete workarounds for RuntimeInformation.OSArchitecture bugs (#79256)
This workaround is no longer needed after https://github.com/dotnet/runtime/pull/60910
Ivan Povazan [Tue, 6 Dec 2022 04:21:06 +0000 (05:21 +0100)]
Fix creating incorrect options in the repro package (#79095)
* Fix creating incorrect options in the repro package
* Reverting changes for --root --conditionalroot and --trim options handling
Stephen Toub [Tue, 6 Dec 2022 03:37:30 +0000 (22:37 -0500)]
Rewrite Enum and add {ISpanFormattable}.TryFormat (#78580)
* Add generic Enum.TryFormat method
* Rewrite Enum using generic specialization per underlying type
Also revises the shape of the newly added Enum.TryFormat method and fixes tests accordingly.
* Use Enum.TryFormat in interpolated string handlers
* Implement ISpanFormattable on Enum
* Use generic Enum methods in more places
* Replace Unsafe.As with unmanaged pointers where possible
Reduces cost of the generic methods
* Simplify Enum_GetValuesAndNames QCall, fix handling of floats and doubles
This change avoids allocation of the temporary ulong[] array during EnumInfo initialization
Fixes #29266
* Fix mono's GetEnumNamesAndValues, and make ToObject handle float/double as well
* Fix perf gap and polish
* Undo update of Enum.GetTypeCode to include float/double
* Address PR feedback
* Accomodate net8.0 TFM update
* Fix InvalidCastException from GetEnumValues on mono when dealing with bool-based enums
Co-authored-by: Heath Baron-Morgan <heathbm@outlook.com>
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
Theodore Tsirpanis [Tue, 6 Dec 2022 03:08:00 +0000 (05:08 +0200)]
Add `InstructionEncoder.Switch`. (#76526)
* Avoid passing a redundant parameter in BranchInfo.GetBranchDistance.
The opcode is already stored in a field.
And it's no more stored as a byte; it takes the same space as an ILOpCode due to packing.
* Track only the label operand instead of the whole instruction in ControlFlowBuilder.
It simplifies the control flow builder and paves the way to support the switch instruction in the future.
As a drawback the BranchInfo struct became bigger due to fields that are necessary for error reporting.
* Replace immutable array builders with regular lists in ControlFlowBuilder.
There didn't seem to be any reason to use them; they were not converted to immutable arrays.
* Clean-up EnumerableExtensions; remove an unused method and forward another one.
* Fix the tests.
And rename instructionStartOffset to ilOffset.
* Add InstructionEncoder.Switch.
* Add tests.
* Remove a potentially unclear comment.
* Validate that an `InstructionEncoder` is not used in any other way while switch branches are being emitted.
* Use named parameters instead of just `default`.
* Remove an automatically generated comment in the resx.
* Revert "Remove a potentially unclear comment."
This reverts commit
92a1f80ee09b6625e077696f901407bb3974f034.
* Apply suggestions from code review
Co-authored-by: Stephen Toub <stoub@microsoft.com>
* Remove `EnumerableExtensions.FirstOrDefault`.
* Rename `AssertNotInSwitch` to `ValidateNotInSwitch` and call it on `DefineLabel`.
Co-authored-by: Stephen Toub <stoub@microsoft.com>
Bruce Forstall [Tue, 6 Dec 2022 02:59:37 +0000 (18:59 -0800)]
Fix run.cmd syntax error (#79250)
Kunal Pathak [Tue, 6 Dec 2022 02:52:53 +0000 (18:52 -0800)]
Map correct fmt for mov instruction (#79174)
* Map fmt for mov instruction
* Move it to default
Bruce Forstall [Tue, 6 Dec 2022 02:47:49 +0000 (18:47 -0800)]
Disable Runtime_31615 (#79252)
Tracking: #79170
Michal Strehovský [Tue, 6 Dec 2022 02:12:43 +0000 (11:12 +0900)]
Delete .NET Native leftovers from type loader (part 4 of X) (#79138)
Main theme is unused generic dictionary kinds.
Will Smith [Tue, 6 Dec 2022 02:11:38 +0000 (18:11 -0800)]
[JIT] Allow new temp assignment whose dstTyp is TYP_I_IMPL and valTyp is TYP_BYREF (#79162)
* Allow temp assignment whose dstTyp is TYP_I_IMPL and valTyp is GC
* Only do this for byref
Egor Bogatov [Tue, 6 Dec 2022 00:30:39 +0000 (01:30 +0100)]
Allocate static boxes on FOH (#79188)
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
Viktor Hofer [Mon, 5 Dec 2022 23:03:11 +0000 (00:03 +0100)]
Follow-up from NetCoreAppCurrent tfm update (#79218)
As mentioned in https://github.com/dotnet/runtime/pull/78354#discussion_r1039328223, this documentation refers to libraries tests and not `RunNativeAotTestApps` testing. Reverting the documentation change.
Tomas Weinfurt [Mon, 5 Dec 2022 21:44:53 +0000 (13:44 -0800)]
add SEC_E_CONTEXT_EXPIRED to avoid throwing InternalException (#79129)
Vitek Karas [Mon, 5 Dec 2022 21:31:29 +0000 (13:31 -0800)]
Speeds up linker tests in NativeAOT (#79176)
The main gain is from disable cycle detection in generic instantiations. None of the tests rely on this functionality and it is only useful if we had a cycle in the test - which we don't for now. It's perf cost especially in Debug builds is substantial (in some tests it completely dominates everything).
This adds the ability for a test to choose if the framework should be compiled or not. By default it's not. Compiling framework makes the test slower (about 10x for small tests), but for some functionality it might be necessary (for example Linq Expression special behaviors will need this).
Also disables additional feature switches to make the framework "Smaller".
Co-authored-by: Michal Strehovský <MichalStrehovsky@users.noreply.github.com>
Marek Fišera [Mon, 5 Dec 2022 19:07:15 +0000 (20:07 +0100)]
[wasm] Update generated typescript files (#79222)
Stephen Toub [Mon, 5 Dec 2022 18:06:12 +0000 (13:06 -0500)]
Update new ArgumentOutOfRangeException.Throw methods to include ActualValue (#79157)
Elinor Fung [Mon, 5 Dec 2022 17:58:40 +0000 (09:58 -0800)]
Delete host test targeting old xunit packages (#79177)
These tests restore/build projects that use old, unsupported packages for running xunit tests. These are no longer useful, especially since the normal test scenario is already covered with using the live host to run libraries tests.
The old test packages also depend on other old/unsupported packages, some of which get flagged by component governance.
kasperk81 [Mon, 5 Dec 2022 17:12:51 +0000 (19:12 +0200)]
fix a typo (#79230)
Viktor Hofer [Mon, 5 Dec 2022 17:12:32 +0000 (18:12 +0100)]
Enable package validation for libs introduced in .NET 7 (#79221)
Fixes https://github.com/dotnet/runtime/issues/78705
SingleAccretion [Mon, 5 Dec 2022 16:48:01 +0000 (19:48 +0300)]
Speed up Matrix4x4.CreateScale (#79172)
Eric Erhardt [Mon, 5 Dec 2022 16:35:50 +0000 (10:35 -0600)]
Small ConfigurationBinder Cleanup (#79042)
Now that we know dictionaryType is either the built-in IDictionary or Dictionary types, we don't need to check if the indexer property is missing or if it is not writeable. Removing unnecessary checks.
Also removing a few nullable suppressions and adding a Debug.Assert instead.
Eirik Tsarpalis [Mon, 5 Dec 2022 16:15:10 +0000 (18:15 +0200)]
Implement a heuristic for using fast-path serialization in streaming JsonSerializer methods. (#78646)
* Implement a heuristic for using fast-path serialization in streaming JsonSerializer methods.
* Add testing for polymorphic serialization
* Apply refactorings to root-level deserialization methods similar to serialization for consistency.
* Use pooled Utf8JsonWriter in fast-path async serialization
* Only record streaming serialization sizes on successful operations