Eirik Tsarpalis [Thu, 20 Apr 2023 17:18:02 +0000 (18:18 +0100)]
Do not surface resolver exceptions when running ancestor type resolution (#85108)
Parker Bibus [Thu, 20 Apr 2023 17:14:17 +0000 (10:14 -0700)]
Remove missed iOSMobileNet6 runtimeType check. (#85075)
Aleksey Kliger (λgeek) [Thu, 20 Apr 2023 15:04:43 +0000 (11:04 -0400)]
[mono] add internal WebWorkerEventLoop utility class (#84492)
This is part of https://github.com/dotnet/runtime/issues/84489 - landing support for async JS interop on threadpool threads in multi-threaded WebAssembly.
Provides two pieces of functionality:
1. A keepalive token that can be used to prevent the current POSIX thread from terminating when it returns from its thread start function, or from an invocation from the JS event loop. When the last keepalive token is destroyed (assuming Emscripten isn't keeping the thread alive for other reasons) it will terminate as if by calling `pthread_exit` and the webworker will be made available to other threads
2. A `HasUnsettledInteropPromises` property that peeks `_js_owned_object_table` to see if there are any promises created by the interop subsystem that have not been fulfilled or rejected yet.
* [mono] add internal WebWorkerEventLoop utility class
Provides two pieces of functionality:
1. A keepalive token that can be used to prevent the current POSIX
thread from terminating when it returns from its thread start
function, or from an invocation from the JS event loop. When the last
keepalive token is destroyed (assuming Emscripten isn't keeping the
thread alive for other reasons) it will terminate as if by calling
`pthread_exit` and the webworker will be made available to other
threads
2. A `HasUnsettledInteropPromises` property that peeks
`_js_owned_object_table` to see if there are any promises created by
the interop subsystem that have not been fulfilled or rejected yet.
* Use a per-thread unsettled promise count
for mono_wasm_eventloop_has_unsettled_interop_promises we
can't use the _js_owned_object_table size because it contains
other interop objects, not just promises
* remove old emscripten keepalive workaround hack
* Add a more general getter for JS interop to keep a webworker alive
And link to #85052 for more details
* fixup docs
Pavel Savara [Thu, 20 Apr 2023 13:53:56 +0000 (15:53 +0200)]
[browser] bump System.Text.Json timeout (#85041)
* bump System.Text.Json timeout to 45 minutes
* feedback
Qiao Pengcheng [Thu, 20 Apr 2023 12:36:45 +0000 (08:36 -0400)]
[LoongArch64] amend the gcinfo. (#85092)
Jan Dupej [Thu, 20 Apr 2023 12:00:54 +0000 (14:00 +0200)]
[mono][jit] Adding Vector128.GetElement as intrinsic in arm64. (#84929)
* Adding Vector128.GetElement.
* Cases with 32b and smaller elements are now spill+load.
* Addressed review comments.
* Code cleanup.
Stephen Toub [Thu, 20 Apr 2023 10:14:25 +0000 (06:14 -0400)]
Obsolete some protected, unused members of Regex{Runner} (#84812)
Stephen Toub [Thu, 20 Apr 2023 10:14:03 +0000 (06:14 -0400)]
Reduce regex test suite time (#84865)
On my machine, depending on the order in which the tests end up running, the suite takes anywhere between 50 seconds and 130 seconds. With these changes, it's fairly consistently around 50 seconds. The majority of the time is spent in building new Regex instances with the source generator. This change just applies to a few of the test classes with _lots_ of test cases the same batching-in-the-source-generator approach we've taken in other test classes.
Vitek Karas [Thu, 20 Apr 2023 09:17:29 +0000 (02:17 -0700)]
Improve docs for the linker analyzer tool (#84833)
The instructions were valid only for Xamarin projects which run linker during build.
.NET Console projects only run linker during publish, so the instructions need to look different.
Qiao Pengcheng [Thu, 20 Apr 2023 08:20:25 +0000 (04:20 -0400)]
[LoongArch64] revert the modification about the LA64's PageSize by #83632. (#84960)
* [LoongArch64] revert the modification about
the LA64's PageSize by #83632.
* keep the comment by CR.
github-actions[bot] [Thu, 20 Apr 2023 07:51:55 +0000 (15:51 +0800)]
Sync shared code from aspnetcore (#85090)
Co-authored-by: JamesNK <JamesNK@users.noreply.github.com>
Vlad Brezae [Thu, 20 Apr 2023 07:19:06 +0000 (10:19 +0300)]
[mono][metadata] Fix lookup of matching interface method with covariant returns (#84160)
* [mono][metadata] Fix lookup of matching interface method with covariant returns
When a class is implementing an interface, we lookup up a matching method (with exact signature) in the class methods and inherited virtual methods. This doesn't handle the situation where the interface was matching a virtual method declared in one of the parents, which was then overriden with a covariant return method. If that is the case, the covariant return method is considered as the implementation of the interface method.
* Add test
Michal Strehovský [Thu, 20 Apr 2023 05:25:38 +0000 (14:25 +0900)]
Implement function pointer type support (#85031)
Implements function pointer type support in the compiler, runtime, and reflection stack.
Contributes to #71883.
* Introduce a new kind of `MethodTable` for function pointers in the compiler.
* Remove function pointer type blocking from various places in the compiler.
* Generate a new summary table so we can construct/deconstruct function pointer types at runtime.
* Update metadata format so that we can capture calling conventions and distinguish managed/unmanaged function pointers in metadata.
* Update `MethodTable` reader.
* Update casting logic in the runtime.
* Update BCL (arrays, TypedReference, etc.)
* Update reflection stack: representation of the type, parsing metadata, invoke, field get/set
* Enable applicable tests.
Not implemented yet: the modified type stuff, runtime type loader support.
Larry Ewing [Thu, 20 Apr 2023 04:57:35 +0000 (23:57 -0500)]
bump emsdk manually (#85084)
Tarek Mahmoud Sayed [Thu, 20 Apr 2023 02:53:40 +0000 (19:53 -0700)]
Add TimeProvider.GetElapsedTime(long) overload (#85078)
Miha Zupan [Thu, 20 Apr 2023 00:14:19 +0000 (02:14 +0200)]
Add a dedicated Ascii.IsValid path (#84881)
* Add dedicated Ascii.IsValid path
* Remove wrong assert
* Use for loop instead of chasing end byref
* Add an extra assert
* Use nuint in loop for [0, 3] elements
* Remove leftover byref increment
Kunal Pathak [Thu, 20 Apr 2023 00:05:59 +0000 (17:05 -0700)]
Various fixes for consecutive registers found with jitstressregs (#84824)
* restore the upper vector at the use of GT_FIELD_LIST
* Introduce isLiveAtConsecutiveRegistersLoc and fix #84747
This method will track if the defs/uses are live at the same location as
where the consecutive registers were allocated. If yes, it will skip the
constraint imposition on it during JitStressRegs
* Handle tracking of previously assigned register for copyReg
When we have copyReg that was just restored or previously assigned
to a different register, also track it as live at the location so
it doesn't get allocated again for different refposition at the same
location.
* fix the release build errors
* Mark consecutive refpositions registers as busy
* Update the comments
* Stop stresslimiting registerAssignment and instead limit the free registers
Under JitStressRegs, there are multiple ways in which consecutive registers demand
cannot be met. So skip restricting the registers for `registerAssignment` of a refPosition
(which are allowable candidates that can be assigned to the given refposition). Instead
limit the free registers to alternate under stress mode, so we can verify the code if it
can handle situation where it needs to pick from a mix of free/busy registers.
* Introduce updateRegsFreeBusyState() for common trackign
* Update comment
* misc. changes
* review feedback
Theodore Tsirpanis [Wed, 19 Apr 2023 23:31:44 +0000 (02:31 +0300)]
Avoid allocations when adding existing items to the blob heap. (#81059)
* Add `BlobDictionary`.
* Use `BlobDictionary` in `MetadataReader` and optimize the simple cases.
* Optimize adding blobs from UTF-16 strings and from blob builders.
* Delete `ByteSequenceComparer`.
* Fix compiler errors.
* Clean-up `BlobDictionary`; move it, make it non-generic and streamline its API.
* Don't try to copy the blob builder's contents to a stack-allocated buffer.
The blob builder's default starting size is 256 bytes; the same as the stack-alllocated buffer, and making it bigger does not have any benefit since such large blobs are rare.
SingleAccretion [Wed, 19 Apr 2023 21:28:07 +0000 (00:28 +0300)]
Disallow `BLK<SIMD>` (#84868)
* Add an assert
* Move gtNewStructVal/gtNewBlkIndir/gtNewIndir
From compiler.hpp to gentree.cpp.
Motivation: more methods are to come and the header file is very large already.
* Generalize "gtNewStructVal" to avoid diffs
* Stop producing BLK<SIMD>
* Fix some regressions
The IND(COMMA) -> COMMA(IND) transformation decanonicalizes array
access as it is only performed on "uses" (i. e. not stores).
Simply do not do this for SIMD types. Evidently, this unblocks some if conversions.
* Fix gtNewZeroCon
* Fix regressions related to SIMD promotion
Preserve the behavior of setting the "is used in a SIMD intrinsic" flag.
Will bring additional positive diffs due to the "ldobj" change.
Stephen Toub [Wed, 19 Apr 2023 21:23:20 +0000 (17:23 -0400)]
Improve DateTime{Offset} formatting further in a variety of cases (#84963)
* Improve DateTime{Offset} formatting further in a variety of cases
- Utf8Formatter special-cases 'G' / the default format. By moving that specialized implementation into DateTimeFormat, we can benefit from it from DateTime{Offset}.ToString/TryFormat as well. This was the last custom formatting routine in Utf8Formatter. As part of deleting two Utf8Formatter.Date.* files, I also changed the TryFormatDateTimeL shim function to go directly to TryFormatR rather than going through the wrapping TryFormat function.
- The "s" and "u" formats are also reasonably popular and have a fixed pattern that's not sensitive to culture. By writing custom routines for those, we can not only speed them up, but also restructure the calling code to avoid needing the FormatIntoBuilder for some default/G cases.
- The above requires being able to check whether a provider is invariant, but DateTimeFormatInfo.InvariantInfo and CultureInfo.InvariantCulture.DateTimeFormat actually returned different instances. I made them the same instance, such that we can now just compare against DateTimeFormatInfo.InvariantInfo to handle the 99.9% case of checking whether a DTFI represents the invariant culture. This also make access to DTFI.InvariantInfo faster, as it's now just returning a static readonly field rather than a lazily-initialized volatile field.
- For "U", we were allocating a new DateTimeFormatInfo and GregorianCalendar (and supporting strings) on every formatting, resulting in ~1K of allocation. I fixed it to only allocate when necessary, which is rare.
- Removed some bounds checking in ParseRepeatPattern and various DateTimeFormatInfo.GetXx helpers
- Removed a % from 'h' handling in FormatCustomized.
- Plus a few renames and changing DateTimeOffsetPattern to not access a lazily-initialized property on every iteration of the search loop.
- And Tarek noticed one place we were appending an unchecked char that could have been non-ASCII, so I fixed that to check appropriately.
* Address PR feedback
* Fix TryFormat optimization
Tanner Gooding [Wed, 19 Apr 2023 20:38:27 +0000 (13:38 -0700)]
Ensure vextractf64x4 and vextracti64x4 aren't marked DstDstSrc (#85030)
Tanner Gooding [Wed, 19 Apr 2023 20:38:13 +0000 (13:38 -0700)]
Remove more unnecessary scenarios from HWIntrinsic test templates and fix timeout/failure (#85026)
* Remove unnecessary scenarios from other HWIntrinsic templates
* Remove ClsVar scenarios from HWIntrinsic test templates
* Removing ClassLclFld scenarios from the HWIntrinsic test templates
* Divide the original striping between the split hwintrinsic test projects
* Minor formatting change to trigger JIT tests
* Allow Avx512 tests to run in Pri0
* Ensure that crossgen correctly handles the VL nested class
* Fixing an issue with NI_AVX512F_ConvertToVector256Int32 for TYP_DOUBLE
* Fixing a couple small test failures that were masked
* Fix a mistyped intrinsic id
Jasper [Wed, 19 Apr 2023 19:31:41 +0000 (21:31 +0200)]
Fix typo in debugging-runtime.md (#85060)
I believe this is a typo. The subset isn't recognized by build.cmd and git grep find nothing for corelibnative except this line.
Jeremy Koritzinsky [Wed, 19 Apr 2023 19:30:16 +0000 (12:30 -0700)]
Remove unused helix queue definitions (#85018)
Badre BSAILA [Wed, 19 Apr 2023 18:20:25 +0000 (20:20 +0200)]
Reduce the trim requirements on MetadataUpdateHandlerAttribute (#84369)
Eirik Tsarpalis [Wed, 19 Apr 2023 17:45:20 +0000 (18:45 +0100)]
Fix a number of issues related to boxed value serialization (#84768)
* Remove unspeakable type support form serialization overloads accepting an explicit `Type` parameter.
* Honor polymorphism metadata when serializing boxed polymorphic values.
* Support boxed root value serialization in source generators that don't supply metadata for `object`.
* Address feedback
Milos Kotlar [Wed, 19 Apr 2023 17:12:46 +0000 (19:12 +0200)]
Revert "[mono][aot] Enable deduplication of runtime invoke wrappers (#84304)" (#85048)
This reverts commit
0a204f53780858d5206b80f8bb71d5829c828d03.
Mark Plesko [Wed, 19 Apr 2023 17:07:39 +0000 (10:07 -0700)]
Fix build -alltargets on Windows (#85039)
Steve Pfister [Wed, 19 Apr 2023 15:30:01 +0000 (11:30 -0400)]
[workloads] Bump .NET 7 Package Version (#84956)
Zoltan Varga [Wed, 19 Apr 2023 15:06:24 +0000 (11:06 -0400)]
[mono][jit] Improve mono_print_ins (). (#85011)
Print more information for instructions which are not in the cpu-<arch>.mdesc files.
Bruno Blanes [Wed, 19 Apr 2023 15:00:35 +0000 (12:00 -0300)]
Fix HTTP3 header decoder buffer allocation (#78862)
* Add test for literal field without name reference
* Fix header name buffer allocation
* Add more tests
* Unified QPackDecoderTest test files
* Fix variable name
* Fixed HPackDecoder and ported QPack tests
* Feedback
---------
Co-authored-by: ManickaP <mapichov@microsoft.com>
Vlad Brezae [Wed, 19 Apr 2023 14:56:06 +0000 (17:56 +0300)]
[mono][sgen] Fix GetTotalMemory (#84480)
The previous code was iterating over all blocks, and their freelist, without checking if the block has been swept in the first place. This would lead to incorrect size computation if the block wasn't swept and undefined behavior when racing with concurrent sweep.
Adeel Mujahid [Wed, 19 Apr 2023 13:28:14 +0000 (16:28 +0300)]
Fix illumos-x64 build (#85006)
Pavel Savara [Wed, 19 Apr 2023 13:13:33 +0000 (15:13 +0200)]
[browser] JSObject thread affinity assertions (#84981)
Co-authored-by: Ilona Tomkowicz <32700855+ilonatommy@users.noreply.github.com>
SingleAccretion [Wed, 19 Apr 2023 10:34:24 +0000 (13:34 +0300)]
Delete `GT_STORE_OBJ` (#84951)
* Rationalization
* General lowering
* General LSRA
* XARCH backend
* ARMARCH backend
* LA64 backend
* RISCV64 backend
* General IR support
SingleAccretion [Wed, 19 Apr 2023 10:31:48 +0000 (13:31 +0300)]
Address a couple `TODO-ADDR`s (#84906)
* Add GTF_EXCEPT handling to gtNewField[Addr]Node
* Delete a not-needed condition
* Delete RewriteSIMDIndir
Pavel Savara [Wed, 19 Apr 2023 10:14:46 +0000 (12:14 +0200)]
[browser] Make JSExport worker thread friendlier (#83680)
Co-authored-by: Ilona Tomkowicz <32700855+ilonatommy@users.noreply.github.com>
Stephen Toub [Wed, 19 Apr 2023 09:58:27 +0000 (05:58 -0400)]
Add binary parsing support to integer types (#84998)
* Add binary parsing support to integer types
* Fix a couple of tests
Egor Bogatov [Wed, 19 Apr 2023 09:44:20 +0000 (11:44 +0200)]
Fix unrollings on AVX1-only machines (#84946)
Pavel Savara [Wed, 19 Apr 2023 09:25:05 +0000 (11:25 +0200)]
[browser] trimming of `LegacyExports` with `WasmEnableLegacyJsInterop` (#83664)
dotnet-maestro[bot] [Wed, 19 Apr 2023 09:20:25 +0000 (11:20 +0200)]
[main] Update dependencies from dotnet/arcade (#84987)
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
dotnet-maestro[bot] [Wed, 19 Apr 2023 09:19:24 +0000 (11:19 +0200)]
[main] Update dependencies from dotnet/roslyn-analyzers (#84992)
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Andrew Au [Wed, 19 Apr 2023 04:18:46 +0000 (21:18 -0700)]
Private API for RefreshMemoryLimit (#83707)
Zoltan Varga [Wed, 19 Apr 2023 04:06:12 +0000 (00:06 -0400)]
[mono][wasm] Avoid stripping the runtimes built by the make targets in src/mono/wasm. (#85021)
Tanner Gooding [Wed, 19 Apr 2023 03:23:49 +0000 (20:23 -0700)]
Updating XML doc comments for hardware intrinsics to include VEX and EVEX forms (#84892)
* Updating XML doc comments for hardware intrinsics to include VEX and EVEX forms
* Fixing a formatting issue
* Ensure all changes are actually committed
* Apply suggestions from code review
Co-authored-by: Clinton Ingram <clinton.ingram@outlook.com>
* Add back a using that got removed in the merge
---------
Co-authored-by: Clinton Ingram <clinton.ingram@outlook.com>
Katelyn Gadd [Wed, 19 Apr 2023 01:39:34 +0000 (18:39 -0700)]
Increase the opcode value for opcodes where the jiterpreter is able to unroll fixed-size sets and moves (#85007)
Tanner Gooding [Wed, 19 Apr 2023 01:35:44 +0000 (18:35 -0700)]
Reduce the number of hwintrinsic tests by removing no longer interesting scenarios (#85008)
* Reduce striping for HWIntrinsic tests now that they're filtered a bit more
* Reduce the number of hwintrinsic tests by removing no longer interesting scenarios
* Minor comment change to trigger test runs
Kunal Pathak [Tue, 18 Apr 2023 23:28:05 +0000 (16:28 -0700)]
Disable TLS field access for Arm (#84954)
* Disable TLS field access for Arm
* Update src/coreclr/jit/helperexpansion.cpp
Co-authored-by: Bruce Forstall <brucefo@microsoft.com>
* Revert "Add issues.targets entries for four tests failing on Windows arm (#84943)"
This reverts commit
80ce3b666823f2855b678307850e719a5f7366af.
---------
Co-authored-by: Bruce Forstall <brucefo@microsoft.com>
Stephen Toub [Tue, 18 Apr 2023 23:22:21 +0000 (19:22 -0400)]
Avoid unnecessary array allocation in DateTimeParse (#84964)
When using DateTime{Offset}.ParseExact with a culture that employs genitive month names, the public DateTimeFormatInfo.AbbreviatedMonthGenitiveNames and DateTimeFormatInfo.MonthGenitiveNames properties are being accessed to get a string[] of the month names, but those properties clone. If we instead access the internal non-cloning version, we save on an array allocation on each parse.
Tanner Gooding [Tue, 18 Apr 2023 23:19:39 +0000 (16:19 -0700)]
Don't contain operands for intrinsics when generating a jmp table fallback (#84933)
Layomi Akinrinade [Tue, 18 Apr 2023 23:18:36 +0000 (16:18 -0700)]
Add config binder generator to ASP.NET Core transport pack (#84436)
Stephen Toub [Tue, 18 Apr 2023 23:18:02 +0000 (19:18 -0400)]
Revert Deflater/Inflater changes around SafeHandle initialization (#85001)
Deflater/Inflater's ctor calls a P/Invoke that initializes a SafeHandle. Previously this was being done to directly initialize a field, but I'd changed that months ago due to it leaving a handle for finalization. What I failed to notice, however, was that these types themselves defined finalizers, and those finalizers expected that SafeHandle field to have been initialized; now that it's not, if a rare zlib initialization error occurs (e.g. zlib couldn't be found/loaded), the finalizer may crash the process due to an unhandled null reference exception.
For Deflater, it'd be possible to just call GC.SuppressFinalize(this) inside the existing catch block that's disposing of the SafeHandle in the event of an exception. But it's more complicated for Inflater, where the SafeHandle might be recreated during the Inflater's lifetime, and thus the existing catch block is inside of a helper method that's used from more than just the ctor, and we shouldn't be suppressing finalization in that case.
So, rather than do something complicated for the small gains this provided (it was part of a much larger sweep to clean up non-disposed SafeHandles), I've just reverted these cases.
Jeremy Koritzinsky [Tue, 18 Apr 2023 23:14:37 +0000 (16:14 -0700)]
Fix running tests against our DNNE'd NativeExports project to work in NativeAOT (#84578)
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
Will Smith [Tue, 18 Apr 2023 19:42:00 +0000 (12:42 -0700)]
[JIT] ARM32/ARM64 - Fixed zero/sign-extension for `GT_STORE_LCL_VAR` in codegen (#84716)
* Try to zero-extend if it is possible
* Added test
* Fix arm32 as well
* Remove branch check for arm32. Added more specific check for arm64.
* Remove unwanted code
* Trying to fix build
* use general register check
* Update Runtime_84693.cs
Tanner Gooding [Tue, 18 Apr 2023 19:29:14 +0000 (12:29 -0700)]
Expose AVX512 variants of SSE-SSE4.2 instructions (#84909)
* Ensure already exposed AVX512 APIs are in the right ISAs
* Exposing Add and Subtract for AVX512F and AVX512BW
* Exposing Abs for AVX512F, AVX512F.VL, and AVX512BW
* Exposing AddSaturate and SubtractSaturate for AVX512BW
* Expose AlignRight and Average for AVX512BW
* Expose ConvertToVector* for AVX512F and AVX512BW
* Expose Divide, Multiply, MultiplyAddAdjacent, MultiplyLow, and MultiplyHigh for AVX512F, AVX512BW, AVX512DQ, and AVX512DQ.VL
* Expose DuplicateEvenIndexed and DuplicateOddIndexed in Avx512F
* Expose LoadAlignedVector512NonTemporal in Avx512F
* Expose Max and Min for Avx512F, Avx512F.VL, and Avx512BW
* Expose PackSignedSaturate and PackUnsignedSaturate for Avx512BW
* Expose ShiftLeftLogical, ShiftLeftLogical128BitLane, ShiftRightArithmetic, ShiftRightLogical, and ShiftRightLogical128BitLane for Avx512F, Avx512F.VL, and Avx512BW
* Expose Shuffle, ShuffleLow, and ShuffleHigh for Avx512F and Avx512BW
* Expose Sqrt and SumAbsoluteDifferences for Avx512F and Avx512BW
* Expose UnpackLow and UnpackHigh for Avx512F and Avx512BW
* Ensure Avx2.Shuffle correctly handles containment for pshufb
* Apply formatting patch
* Fixing a couple of minor asserts
* Ensure TYP_DOUBLE is correctly handled for arithmetic right shift
* Work around an SPMI failure with the baseline
* Fixing some test logic to account for "per lane" operations on 512-bit vectors
* Ensure we don't fail for 64-bit vector multiplication on 32-bit
Vladimir Sadov [Tue, 18 Apr 2023 19:07:58 +0000 (12:07 -0700)]
when applying/removing breapoints, try PAGE_EXECUTE_WRITECOPY as well (#84965)
Aleksey Kliger (λgeek) [Tue, 18 Apr 2023 18:29:11 +0000 (14:29 -0400)]
Split PortableThreadPool.WorkerThread start and loop body (#84490)
This is Part 1 of https://github.com/dotnet/runtime/issues/84489 - landing support for async JS interop on threadpool threads in multi-threaded WebAssembly.
We will need to start the threadpool worker threads on the browser in a special way, such that they can exit back to the JS event loop, and use callbacks to run the worker loop body.
The current PR splits into a separate file the logic for starting threadpool worker threads, and the outer loop that waits for the semaphore that signals that work is available for the worker. The loop body (to be shared with the callback-based approach in a future PR) remains in PortableThreadPool.WorkerThread.cs as several new toplevel functions.
Current PR is just refactoring existing code. No functional change.
* Split PortableThreadPool.WorkerThread start and loop body
For browser-wasm we will need to start the worker thread in a special way, and use callbacks to run the loop body.
Current PR is just refactoring existing code. No functional change.
* Change loop to use return instead of break
* rename utility method to ShouldExitWorker
Mitchell Hwang [Tue, 18 Apr 2023 17:46:32 +0000 (13:46 -0400)]
[tests] Stand up iOS arm runtime tests and enable tracing/eventpipe tests (#79169)
Stand up iOS arm runtime tests and enable tracing/eventpipe tests
---------
Co-authored-by: Nathan Ricci <naricc@microsoft.com>
Co-authored-by: Milos Kotlar <kotlarmilos@gmail.com>
kkeirstead [Tue, 18 Apr 2023 17:15:24 +0000 (10:15 -0700)]
Publish Aggregated Values For `Counter` and `UpDownCounter` For System.Diagnostics.Metrics (#84846)
Alexander Köplinger [Tue, 18 Apr 2023 16:36:42 +0000 (18:36 +0200)]
Fix OperatingSystemTest.TestIsOSPlatform_MacCatalyst (#84842)
It got broken by
3d160bc247960bb255bb45421f422d6bd543f2e2 because the assert wasn't updated.
Changed the code to verify the iOS/Catalyst conditions explicitly so this doesn't happen again.
Marek Fišera [Tue, 18 Apr 2023 15:56:48 +0000 (17:56 +0200)]
[browser] Minimal blazor.boot.json integration (#84296)
Jan Kotas [Tue, 18 Apr 2023 15:45:10 +0000 (08:45 -0700)]
Bump expected Dwarf warning count (#84980)
Fixes #84979
Sven Boemer [Tue, 18 Apr 2023 15:03:49 +0000 (08:03 -0700)]
Fix R2R test build (#84952)
887c043eb94be364188e2b23a87efa214ea57f1e broke the outerloop R2R
jobs, because the x64 musl build became a cross build, but the
R2R test compilation did not use the x64 glibc hosted crossgen2.
Fixed by using the crossgen2 that is built during the cross-components
build, when cross-targeting.
Stephen Toub [Tue, 18 Apr 2023 14:49:47 +0000 (10:49 -0400)]
Add binary support to number formatting (#84889)
* Add binary support to number formatting
* Fix inlining of Convert.ToString
It's now typically inlined by the JIT if toBase is a const.
Tanner Gooding [Tue, 18 Apr 2023 14:48:38 +0000 (07:48 -0700)]
Split the MergedTestWrapper for the HWIntrinsic tests so we can actually filter per platform (#84959)
* Split the MergedTestWrapper for the HWIntrinsic tests so we can actually filter per platform
* Small formatting change to force JIT tests to run
* Further split x86 hwintrinsic tests into X86, X86_Avx, and X86_Avx512
Qiao Pengcheng [Tue, 18 Apr 2023 14:08:22 +0000 (10:08 -0400)]
[LoongArch64] Fix the compiling errors for aligned and definiations. (#84971)
Qiao Pengcheng [Tue, 18 Apr 2023 14:06:23 +0000 (10:06 -0400)]
[LoongArch64] fix the CMakeLists which destroyed by RISCV #82381. (#84970)
Tom Deseyn [Tue, 18 Apr 2023 12:10:43 +0000 (14:10 +0200)]
OSDescription.Linux: return a user-friendly name based on /etc/os-release. (#83976)
* OSDescription.Linux: return a user-friendly name based on /etc/os-release.
* Use FileCleanupTestBase.
* Avoid some allocations by using Span.
* expectedName can be null.
* Apply suggestions from code review
Co-authored-by: Stephen Toub <stoub@microsoft.com>
* Break when we encounter PRETTY_NAME.
---------
Co-authored-by: Stephen Toub <stoub@microsoft.com>
dotnet-maestro[bot] [Tue, 18 Apr 2023 07:36:21 +0000 (09:36 +0200)]
[main] Update dependencies from dotnet/roslyn-analyzers (#84708)
* Update dependencies from https://github.com/dotnet/roslyn-analyzers build
20230412.1
Microsoft.CodeAnalysis.Analyzers , Microsoft.CodeAnalysis.NetAnalyzers
From Version 3.3.5-beta1.23207.2 -> To Version 3.3.5-beta1.23212.1
* Update dependencies from https://github.com/dotnet/roslyn-analyzers build
20230413.1
Microsoft.CodeAnalysis.Analyzers , Microsoft.CodeAnalysis.NetAnalyzers
From Version 3.3.5-beta1.23207.2 -> To Version 3.3.5-beta1.23213.1
---------
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Larry Ewing <lewing@microsoft.com>
Ilona Tomkowicz [Tue, 18 Apr 2023 07:32:31 +0000 (09:32 +0200)]
[browser][non-icu] `HybridGlobalization` SortKey (#84621)
* Throw on SortKey.
* Fix NLS tests.
* Do not add these files for WASI.
* Removed WASI from targets.
* Run tests with HG only on browser, rename.
* Missing WASI removal.
* General docs fix.
* Storing exception text as resource string.
Jan Kotas [Tue, 18 Apr 2023 05:52:02 +0000 (22:52 -0700)]
Fix Environment.GetCommandLineArg for AOT compiled libraries (#84953)
Made the implementation shared between standard CoreCLR and native AOT
Fixes #84944
Jan Kotas [Tue, 18 Apr 2023 05:51:19 +0000 (22:51 -0700)]
Fix Type.GetType for global type names with leading '.' (#84957)
Ignore leading '.' for global typenames for compatibility with earlier .NET versions.
Fixes #84644
Michal Strehovský [Tue, 18 Apr 2023 03:11:52 +0000 (12:11 +0900)]
Adjust managed type system for new function pointer handling (#84819)
After #81006, the calling convention is no longer part of the type system identity of a function pointer type - it serves more like a modopt as far as the type system is concerned. The type system only cares whether the pointer is managed or not. Adjust the managed type system accordingly:
* If we're reading/representing a standalone method signature, read it as usual. Calling convention is available in flags/modopts.
* If we're reading/representing a function pointer type, collapse the calling convention information into the managed/unmanaged bit only.
Dong-Heon Jung [Tue, 18 Apr 2023 02:32:35 +0000 (11:32 +0900)]
[RISC-V] Disable corelib crossgen2 (#84781)
Michal Strehovský [Tue, 18 Apr 2023 02:18:01 +0000 (11:18 +0900)]
Start running Loader and Interop tests for NativeAOT (#84404)
These are the most interesting ones to cover in regular testing.
Tanner Gooding [Mon, 17 Apr 2023 23:29:15 +0000 (16:29 -0700)]
Reconfigure the HWIntrinsic tests to run more selectively (#84948)
* Increase the number of stripes to use in stress for HardwareIntrinsics tests
* Reconfigure the HWIntrinsic tests to run more selectively
* Fix a _ro.csproj
lexi-nadia [Mon, 17 Apr 2023 23:24:04 +0000 (19:24 -0400)]
fix aarch64+clang compilation errors (#84947)
* don't use the gcc workaround on clang
clang doesn't need it, and clang also doesn't support the `optimize`
attribute.
* cast _zzq_default to a 64-bit type
Otherwise, clang complains that "value-size does not match register size",
since the 32-bit value (generally a literal 0) doesn't match the 64-bit
x3 register.
Tomáš Rylek [Mon, 17 Apr 2023 22:55:02 +0000 (00:55 +0200)]
Add issues.targets entries for four tests failing on Windows arm (#84943)
After several fixes and additions to issues.targets I'm now seeing
a relatively limited set of tests failing on Windows arm with
a nullref tracked under
https://github.com/dotnet/runtime/issues/84818
This should finally let us see a green outerloop run despite the
fact that some additional rare failures still remain, I've seen
a few in the runs from the last couple of days.
Thanks
Tomas
Sven Boemer [Mon, 17 Apr 2023 22:49:02 +0000 (15:49 -0700)]
Re-enable gc-sections with lld for NativeAOT (#84935)
* Revert "Revert "Write linker script for lld to enable gc-sections (#84493)""
This reverts the revert of commit
3ab663e128e233ad1f4a1a4a0df64b08a846bcd5.
The revert of that commit was included in
887c043eb94be364188e2b23a87efa214ea57f1e.
* Lower the lld version requirement
* Adjust dwarfdump baseline
---------
Co-authored-by: Adeel <3840695+am11@users.noreply.github.com>
Tanner Gooding [Mon, 17 Apr 2023 22:28:40 +0000 (15:28 -0700)]
Deduplicate Binary Integer parsing logic (#84582)
* Deduplicate TryNumberToInt*
* Deduplicate TryParseInt*IntegerStyle parsing methods
* Deduplicate TryParseInt*HexNumberStyle
* Deduplicate TryParseInt*Number
* Deduplicate TryParseInt*
* Deduplicate ParseInt*
* Deduplicate some more binary integer parsing logic
* Ensure the right overflow message is used for binary integer parsing
* Ensure HasTrailingCharsZero handling is in the right spot
* Resolving PR feedback
* Revert using the public throw helpers
Lee Culver [Mon, 17 Apr 2023 21:09:56 +0000 (14:09 -0700)]
Memory Diagnostics: GC Bookkeeping (#84454)
* Add ISOSMemoryEnum and HandleTable enum
* Update comment
* Add GC Bookkeeping data to the dac
- bookkeeping_covered_start is now compiled into all versions of the GC, instead of just with USE_REGIONS. This allows us to find the base address of the allocated memory for GC Bookkeeping.
- Added dac enumeration of GC Bookkeeping.
* Add assert
* Add support for free gc regions
* Don't require card_table_element_layout
* Fix issue with naming in request
* Remote DEFINE_MISSING_FIELD from dac
We should never have missing fields in the dac. This is a leftover from
previous code.
* Whitespace fix
* Break if we loop
* Fix static_assert
* Segment fixes
When using segments, update bookkeeping_covered_start and card_table_info.size when we update the card table.
* Defensive coding
Check how many times we loop through memory to guard against heap corruption.
* free_region fixes
* Remove hardcoding of region list
* Fix gcc warnings
* Remove unneeded #define
* Add freeable_soh_segment/freeable_uoh_segment
* Add more card table checks
* Fix field definition issue
* Fix pointer issue
* Fix compile issue
* Rename bookkeeping_covered_start to bookkeeping_start
* Update src/coreclr/debug/daccess/daccess.cpp
Co-authored-by: Andrew Au <cshung@gmail.com>
* Code review feedback
* Remove unused parameter
* Add heap number
---------
Co-authored-by: Andrew Au <andrewau@microsoft.com>
Co-authored-by: Andrew Au <cshung@gmail.com>
Bruce Forstall [Mon, 17 Apr 2023 21:05:07 +0000 (14:05 -0700)]
Fix JIT use of BitScan* APIs (#84915)
* Fix JIT use of BitScan* APIs
windows.h defines the BitScan* APIs with a leading underscore
and includes `#define` definitions of non-underscore versions
to the underscore versions.
This is annoying in the JIT, where we have a BitOperations class that
uses these same names; the class members end up with leading underscores
and it confuses Visual Studio source browsing.
In the JIT, `#undef` the windows.h underscore defines. Define pass-through
non-underscore functions to call the actual functions. (We need to always
call the non-underscore versions because that is what is defined in the PAL.)
Replace usage of bitposition.h in the JIT and remove it from utilcode.h
(only one other place in the CLR uses it and they already include it.)
* Fixes
1. Remove unused genFindHighestBit
2. Remove genFindLowestReg
3. Remove BitScanForwardPtr
4. Put BitScanForward64/BitScanReverse64 under `HOST_64BIT`
Sven Boemer [Mon, 17 Apr 2023 20:43:19 +0000 (13:43 -0700)]
Fix nativeaot libraries test cross-build (#84870)
Marek Fišera [Mon, 17 Apr 2023 20:24:50 +0000 (22:24 +0200)]
Integrate compression from StaticWebAssets (#84924)
Egor Bogatov [Mon, 17 Apr 2023 18:40:18 +0000 (20:40 +0200)]
Enable AVX-512 for string/span Equals/StartsWith (#84885)
Will Smith [Mon, 17 Apr 2023 18:32:38 +0000 (11:32 -0700)]
[JIT] ARM64 - Combine `cmp` and shift ops into a single `cmp` op (#84605)
* Combine compare and shift ops into a single compare op
* Fix comment
* Expanding IsContainableBinaryOp.
* Remove commented code
* Added more cases
* Update codegenarm64.cpp
* Feedback
* Feedback
Miha Zupan [Mon, 17 Apr 2023 17:12:21 +0000 (19:12 +0200)]
Add status code and exception info to System.Net.Http events (#84036)
* Add status code and exception info to System.Net.Http events
* Update HttpTelemetry fake
Radek Doulik [Mon, 17 Apr 2023 16:12:51 +0000 (18:12 +0200)]
[wasm] Bump emscripten to 3.1.34 (#83998)
* [wasm] Bump emscripten to 3.1.34
* Update emsdk deps
* Update icu deps
* Use new images
* Use emscripten_main_runtime_thread_id
* Ignore ExitStatus exceptions
This should fix these errors:
[wasm test] [23:10:04] dbug: Reached wasm exit
[wasm test] [23:10:04] info: node:internal/process/promises:246
[wasm test] [23:10:04] info: triggerUncaughtException(err, true /* fromPromise */);
[wasm test] [23:10:04] info: ^
[wasm test] [23:10:04] info:
[wasm test] [23:10:04] info: [UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "#<ExitStatus>".] {
[wasm test] [23:10:04] info: code: 'ERR_UNHANDLED_REJECTION'
[wasm test] [23:10:04] info: }
[wasm test] [23:10:04] info:
[wasm test] [23:10:04] info: Node.js v17.3.1
[wasm test] [23:10:04] info: Process node.exe exited with 1
* Handle UnhandledPromiseRejection for ExitStatus
* Exclude 2 failing tests
* Updade ICU deps
* Revert "Updade ICU deps"
This reverts commit
ad92e213c38b339d4ab685c91880d355190334ba.
Looks like main is behind and doesn't work with latest ICU, so go back
to the one with 3.1.34 bump
Radek Doulik [Mon, 17 Apr 2023 16:12:07 +0000 (18:12 +0200)]
[wasm] PackedSimd, add extending integer arithmetic (#84687)
* [wasm] PackedSimd, add extended integer arithmetic
* Add ref methods and build fix
* Implement the new PackedSimd intrinsics
Stephen Toub [Mon, 17 Apr 2023 15:21:04 +0000 (11:21 -0400)]
Implement IUtf8SpanFormattable on Complex (#84779)
Jan Dupej [Mon, 17 Apr 2023 14:42:45 +0000 (16:42 +0200)]
[mono][jit] Adding Vector128.Dot as intrinsic for arm64. (#84245)
* [mono][jit] Adding Vector128.Dot as intrinsic for arm64.
* Fixed the (u)int64 case, which now falls back to unoptimized code.
* Fixed klass.
* Disabled the intrinsic for native ints, enabled for LLVM.
* Fixed COMPILE_LLVM condition.
* Relaxing non-LLVM restriction for WASM.
Jan Dupej [Mon, 17 Apr 2023 14:41:58 +0000 (16:41 +0200)]
[mono][jit] Adding Vector128.Narrow,Widen as intrinsics on arm64. (#84837)
* Adding Vector128.Narrow as intrinsic.
* Adding Vector128.WidenLower,WidenUpper as intrinsics on arm64.
* Fixed WASM builds.
Egor Bogatov [Mon, 17 Apr 2023 13:54:35 +0000 (15:54 +0200)]
Improve SeqEquals shape (#84524)
Egor Bogatov [Mon, 17 Apr 2023 11:15:01 +0000 (13:15 +0200)]
Fix JitDisasmWithAlignmentBoundaries (#84827)
github-actions[bot] [Mon, 17 Apr 2023 07:48:00 +0000 (09:48 +0200)]
[main] Upload buildlogs with an _Attempt suffix (#83826)
Co-authored-by: Matt Mitchell <mmitche@microsoft.com>
Tomáš Rylek [Mon, 17 Apr 2023 07:00:40 +0000 (09:00 +0200)]
Baseline two systemic failures in the CoreCLR outerloop pipeline (#84904)
On Windows arm, several tests typically fail in the
coreclr-runtime outerloop pipeline. This change introduces
issues.targets exclusions for two tests that fail all the time
and apparently due to a different cause than the rest of the tests
that involve non-deterministic nullrefs the cause of which hasn't
yet been established to my knowledge.
Thanks
Tomas
Dong-Heon Jung [Mon, 17 Apr 2023 05:51:51 +0000 (14:51 +0900)]
[RISC-V] Fix build error (#84910)
- Resolve assertion because size of DT_CONTEXT and T_CONTEXT is not equal
Adeel Mujahid [Mon, 17 Apr 2023 01:30:24 +0000 (04:30 +0300)]
Generate SslConnectionInfo.Unix.cs with T4 template (#84690)
* Generate SslConnectionInfo.Unix.cs with T4 template
* Try fitting into ushort
Jan Kotas [Mon, 17 Apr 2023 01:05:21 +0000 (18:05 -0700)]
Revert use of raw pointers in System.Text.Json (#78741)" (#84899)
Revert use of raw pointers for .NET Standard support. This particular raw pointer use does not work with .NET UWP toolchain.
Also, convert uses of Enum.HasFlags to simple bit tests for better .NET Framework and .NET Standard support. Enum.HasFlags performs poorly (boxes) on .NET Framework and .NET Standard targets.
Fixes #84895
Weihan Li [Sun, 16 Apr 2023 17:56:02 +0000 (01:56 +0800)]
fix a typo (#84897)