Stephen Toub [Tue, 28 Mar 2023 10:22:42 +0000 (06:22 -0400)]
Use bit mask in Regex's IsWordChar (#84003)
Stephen Toub [Tue, 28 Mar 2023 10:18:27 +0000 (06:18 -0400)]
Enable regex source gen / compiler vectorization of all sets (#83992)
* Enable regex source gen / compiler vectorization of all sets
When emitting TryFindNextPossibleStartingPosition based on a set that's a fixed-distance from the start of the pattern, today we're able to vectorize a variety of cases. In .NET 7, this was largely limited to very small sets that contained only 1-5 characters. Earlier in .NET 8, we expanded this to include ranges (e.g. [0-9]) and more impactfully sets containing any number of only ASCII values (e.g. [A-Za-z0-9]). That still, however, leaves sets that are non-continguous and contain anything non-ASCII, which is extremely common. For example, the set `[a-z]` with `RegexOptions.IgnoreCase` actually gets expanded to be `[A-Za-z\u212A]` because the Kelvin sign is considered case-equivalent with `k`, and that means for such a set, we wouldn't employ any vectorized helper and would instead just walk character by character.
With this PR, we'lll now employ some vectorization as part of that remaining class of set as well in the compiler and source generator. In particular, we do a vectorize a search for the ASCII portion of the set along with anything non-ASCII. If the found result is ASCII, we're done. If the found result is non-ASCII, then we proceed to walk character by character as was done previously.
* Address PR feedback
Meri Khamoyan [Tue, 28 Mar 2023 08:13:28 +0000 (12:13 +0400)]
Initial changes for GetLocaleInfoString (#81470)
Initial changes for globalization hybrid mode.
Implemented GetLocaleInfoStringName and GetLocaleNameNative for osx platforms.
Jakob Botsch Nielsen [Tue, 28 Mar 2023 07:07:52 +0000 (09:07 +0200)]
JIT: Allow forward substituting small-typed nodes (#83969)
Jakob Botsch Nielsen [Tue, 28 Mar 2023 07:03:17 +0000 (09:03 +0200)]
JIT: Generalize handling of commas in block morphing (#83590)
Eliminate commas early in block morphing, before the rest of the
transformation needs to look at it. Do this by extracting their side
effects and adding them on top of the returned result instead. This
allows us to handle arbitrary COMMAs on destination operand in a general
manner.
Prerequisite to #83388.
Fix #1699.
Larry Ewing [Tue, 28 Mar 2023 04:51:43 +0000 (23:51 -0500)]
Mark the windows runtime packs workload as abstract (#83230)
Aaron Robinson [Tue, 28 Mar 2023 04:50:50 +0000 (21:50 -0700)]
Add osx-arm64 for coreclr packages. (#84001)
* Add osx-arm64 for coreclr packages.
This was found looking for TestHost osx-arm64
Co-authored-by: Adeel Mujahid <3840695+am11@users.noreply.github.com>
Michal Strehovský [Tue, 28 Mar 2023 03:45:48 +0000 (12:45 +0900)]
Extend mstat format with information that maps to dependency nodes (#83578)
This will allow crossreferencing MSTAT with DGML files. The ultimate goal is to allow folding information from DGML into MSTAT (so that we don't need two files) but... baby steps.
This is a breaking change to the file format. I don't anticipate a breaking change after this. The DGML folding would be backwards compatible. I considered making it non-breaking, but I think it's just better to bite the bullet now. To fix existing readers, just skip over the new entry. Like in this diff: https://gist.github.com/MichalStrehovsky/
2c7cb3d623c7f8901541914dab04238d/revisions
This adds an extra instruction encoding the name into each entry of the Method and Types stream.
We avoid the problem in #75328 (where the strings ran over the 16 MB total length limit) by generating the textual strings into a separate PE section. The record contains an integer index into this section.
If you would like to read it, it's not possible with Cecil, but the superior metadata reader in S.R.Metadata comes to the rescue. This is the ~diff you'd want to apply (and make a similar adjustment for methods): https://gist.github.com/MichalStrehovsky/
195967f3a117663b6340cd828a52dfc7/revisions. If you're worried about duplicate loading, I'd suggest creating a memory mapped view of the file and sharing the same view between Cecil and S.R.Metadata. S.R.Metadata is pretty much no overhead on it's own.
Zoltan Varga [Tue, 28 Mar 2023 02:42:21 +0000 (22:42 -0400)]
[mono][jit] Fix the removal of relations added by basic blocks. (#83943)
If a basic block added two relations to the same variable, like by two op_not_null
opcodes, then sometimes the relations were not removed, causing
invalid null check elimination in unrelated basic blocks.
Fixes https://github.com/dotnet/runtime/issues/83941.
Murat Duisenbayev [Mon, 27 Mar 2023 23:25:56 +0000 (01:25 +0200)]
[System.Net] Introduce CIDR IPNetwork (#82779)
Aaron Robinson [Mon, 27 Mar 2023 21:31:31 +0000 (14:31 -0700)]
Fix function pointer as fields inspection (#83981)
This was missed when C# function pointers support
was added to the runtime. The current fix is reporting
all functions pointers as `IntPtr` type. It should be
possible in a future update to properly represent a
more accurate type for the function pointer.
Andrii Kurdiumov [Mon, 27 Mar 2023 20:11:52 +0000 (02:11 +0600)]
Add ability specify core_root when run (#82387)
I use this to run tests of Loongarch, it was long time ago when I implement this, but most likely missing crossgen2 do not allow me properly build Core_Root automatically, so I have to specify it manually from well known location.
Kunal Pathak [Mon, 27 Mar 2023 19:30:17 +0000 (12:30 -0700)]
Switch the channel from 8.0 to 8.0-preview (#83984)
Tom Rathbone [Mon, 27 Mar 2023 18:58:46 +0000 (20:58 +0200)]
update types mentioned in comment to match method (#82768)
seems that the comment got copied over from FrozenSet and not updated
Dan Moseley [Mon, 27 Mar 2023 18:40:19 +0000 (12:40 -0600)]
add link to interop guidelines (#83987)
Joseph Lennox [Mon, 27 Mar 2023 18:14:52 +0000 (11:14 -0700)]
Modernize XmlUTF8TextWriter with u8/inline out's. (#75812)
* Modernize XmlUTF8TextWriter with u8/inline out's.
* PR feedback
---------
Co-authored-by: Steve Molloy <smolloy@microsoft.com>
Tarek Mahmoud Sayed [Mon, 27 Mar 2023 18:04:09 +0000 (11:04 -0700)]
Fix Iran time zone test case (#83952)
Co-authored-by: Stephen Toub <stoub@microsoft.com>
Tanner Gooding [Mon, 27 Mar 2023 17:42:51 +0000 (10:42 -0700)]
Updating Unix to save/restore Avx512 state (#83784)
* Updating Unix to save/restore Avx512 state
* Ensure compilation works when XSTATE_SUPPORTED isn't defined
* Ensure __cpuid isn't implemented on Arm32/Arm64
* Fixing a couple of build failures
* Fixing some OSX failures
* More OSX fixes
* More build fixes
* AltJit and another OSX build fix
* Ensure an assert checks the right bit
* Fixing an assert on OSX to account for general XSTATE tracking
* Addressing PR feedback
* Various fixups and bug fixes to appease CI
* Use HOST_AMD64 not HOST_64BIT
* Explicitly bypass AVX512 support on OSX until thread enablement can be resolved
* Remove commented out code for OSX in favor of just leaving a comment explaining
* Use HAVE_MACH_EXCEPTIONS not TARGET_OSX
careri [Mon, 27 Mar 2023 17:06:09 +0000 (19:06 +0200)]
Issue 83667 (#83820)
* Fixed devcontainer
* Issue-83667 Fixed misleading exception message
* issue-83667 Fixed test
* issue-83667 Reverted .devcontainer fix
dotnet-maestro[bot] [Mon, 27 Mar 2023 15:21:55 +0000 (10:21 -0500)]
[main] Update dependencies from dotnet/roslyn (#83301)
* Update dependencies from https://github.com/dotnet/roslyn build
20230310.6
Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
From Version 4.6.0-3.23160.1 -> To Version 4.6.0-3.23160.6
* Update dependencies from https://github.com/dotnet/roslyn build
20230311.1
Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
From Version 4.6.0-3.23160.1 -> To Version 4.6.0-3.23161.1
* Update dependencies from https://github.com/dotnet/roslyn build
20230313.3
Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
From Version 4.6.0-3.23160.1 -> To Version 4.6.0-3.23163.3
* Update dependencies from https://github.com/dotnet/roslyn build
20230314.6
Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
From Version 4.6.0-3.23160.1 -> To Version 4.6.0-3.23164.6
* Update dependencies from https://github.com/dotnet/roslyn build
20230320.16
Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
From Version 4.6.0-3.23160.1 -> To Version 4.6.0-3.23170.16
* Update dependencies from https://github.com/dotnet/roslyn build
20230321.17
Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
From Version 4.6.0-3.23160.1 -> To Version 4.6.0-3.23171.17
* Update dependencies from https://github.com/dotnet/roslyn build
20230322.9
Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
From Version 4.6.0-3.23160.1 -> To Version 4.6.0-3.23172.9
* Update dependencies from https://github.com/dotnet/roslyn build
20230324.2
Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
From Version 4.6.0-3.23160.1 -> To Version 4.6.0-3.23174.2
* Add unsafe
* Update dependencies from https://github.com/dotnet/roslyn build
20230324.3
Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
From Version 4.6.0-3.23160.1 -> To Version 4.6.0-3.23174.3
* Update dependencies from https://github.com/dotnet/roslyn build
20230325.1
Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
From Version 4.6.0-3.23160.1 -> To Version 4.6.0-3.23175.1
---------
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Larry Ewing <lewing@microsoft.com>
Ilona Tomkowicz [Mon, 27 Mar 2023 15:00:45 +0000 (17:00 +0200)]
Documentation for loading custom files in Blazor. (#83925)
* How to load custom icu files in Blazor.
* Specify the path form.
Specify how the path should look like for both: Blazor and WASM app.
* Nit
Vitek Karas [Mon, 27 Mar 2023 11:28:03 +0000 (04:28 -0700)]
Implement checking for Requires* on attributes for NativeAOT (#83550)
Any of the RUC/RDC/RAF attributes can be added to an attribute (either the type or the .ctor or properties). The compiler needs to check for these and produce warnings if such attribute is instantiated somewhere.
This was added to "Dataflow" existing class, while it's not exactly data flow, adding a new abstraction didn't seem worth it.
Also does a simple dedupe of RUC/RDC/RAF checks in some places.
Adapt the tests to the new behavior. The most notable change is that NativeAOT will only look at attributes for reflection enabled members, so had to modify the tests to reflection access basically everything.
Use GetDisplayName for anything which is supported by that extension method - this fixes wrong origin printed out for property/event (we would print out 'PropertyPseudoDescriptor').
Mapping IL offset to source file/line number - if the PDB specifies that line as "hidden", then don't use it, instead look for the begining of the method - so first non-hidden sequence point in the method's body.
This is a copy of the logic implemented in illink already.
Nikola Milosavljevic [Mon, 27 Mar 2023 09:33:58 +0000 (02:33 -0700)]
Trim away netframework targets in source-build (#83899)
* Trim away netframework targets in source-build
* Move property unsetting to Directory.Build.props so it works in repo source-build
Mark Plesko [Mon, 27 Mar 2023 09:11:16 +0000 (02:11 -0700)]
JIT: Fix ordering of type initialization and stsfld (#80485)
Insertion of the type initializer before the tree for a stsfld could reorder them inappropriately. This includes those computation in the spill check.
Fixes #72354.
Marie Píchová [Mon, 27 Mar 2023 08:54:10 +0000 (10:54 +0200)]
Disable test failing on bad Alt-Svc header (#83876)
Radek Doulik [Mon, 27 Mar 2023 08:33:24 +0000 (10:33 +0200)]
[wasm] Add PackedSimd bit shift intrinsics (#83896)
* Add bit shifts to PackedSimd class
* [wasm] Add PackedSimd bit shift intrinsics
Example of code generated for this method:
void Snippet(Vector128<int> vector)
{
var v2 = PackedSimd.ShiftLeft (vector, 3);
var v3 = PackedSimd.ShiftRightArithmetic (vector, 3);
var v4 = PackedSimd.ShiftRightLogical (vector, 3);
Print (vector, v2, v3, v4);
}
Relevant parts:
(func Wasm_Browser_Bench_Sample_Sample_VectorTask_Add_Snippet_System_Runtime_Intrinsics_Vector128_1_int(param $0 i32, $1 i32, $2 i32))
...
local.tee $3
i32.const 3
i32x4.shr.u [SIMD]
v128.store offset:96 align:4 [SIMD]
local.get $0
local.get $3
i32.const 3
i32x4.shr.s [SIMD]
v128.store offset:80 align:4 [SIMD]
local.get $0
local.get $3
i32.const 3
i32x4.shl [SIMD]
v128.store offset:64 align:4 [SIMD]
...
* Fix build
Kunal Pathak [Mon, 27 Mar 2023 04:20:55 +0000 (21:20 -0700)]
Update the hardcoded dotnet-version with channels (#83905)
* Update the hardcoded dotnet-version with channels
* fix the parameter
Tanner Gooding [Mon, 27 Mar 2023 02:29:43 +0000 (19:29 -0700)]
Ensure kmask registers are marked available (#83927)
* Revert "Disable EVEX support until the bug can be resolved"
This reverts commit
ce95709587a45d682ae147737071b7174d1c1e2d.
* Ensure availableMaskRegs is included where required
* Track a new regTyp entry in the typelist metadata
* Utilize varTypeUsesIntReg and varTypeUsesMaskReg
* Ensure we don't use TYP_MASK on platforms without FEATURE_SIMD
* Responding to PR feedback
Theodor Zoulias [Mon, 27 Mar 2023 02:09:01 +0000 (05:09 +0300)]
Fixed a typo in SpinLock.cs (#83953)
Jakob Botsch Nielsen [Sun, 26 Mar 2023 13:21:26 +0000 (15:21 +0200)]
SPMI: Fix recGetStaticFieldCurrentClass (#83843)
getStaticFieldCurrentClass has very different behavior depending on
whether pIsSpeculative is passed or not, and we need to record the
resulting class handle in both cases.
This fixes a case of replays not working after recording that I hit
while tracking down a separate issue.
Andy Ayers [Sun, 26 Mar 2023 07:47:31 +0000 (00:47 -0700)]
JIT: import entire method for OSR, prune unneeded parts later (#83910)
For OSR compiles, always import from the original entry point in addition
to the OSR entry point. This gives the OSR compiler a chance
to see all of the method and so properly compute address exposure,
instead of relying on the Tier0
analysis.
Once address exposure has been determined, revoke special protection
for the original entry and try and prune away blocks that are no longer
needed (we actually wait until morph).
Fixes #83783.
May also fix some of the cases where OSR perf is lagging (though
don't expect this to fix them all).
Tudor Anghelina [Sun, 26 Mar 2023 05:20:11 +0000 (08:20 +0300)]
Replace empty string literals in Marshal.cs (#83928)
Replace empty string literals exception messages with null in Marshal.cs
Remove redundant switches in Marshal.cs
Group together switches for ObjectDisposedException
Fix #68347
* Apply suggestions from code review
Co-authored-by: Tudor Anghelina <tudor.anghelina91@gmail.com>
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
Jan Kotas [Sun, 26 Mar 2023 01:36:36 +0000 (18:36 -0700)]
Delete redundant test (#83931)
This scenario has comprehensive test coverage under src/libraries
Fixes #83929
Tarek Mahmoud Sayed [Sat, 25 Mar 2023 19:34:08 +0000 (12:34 -0700)]
Introducing Time abstraction Part1 (#83604)
Tanner Gooding [Sat, 25 Mar 2023 15:38:32 +0000 (08:38 -0700)]
Disable EVEX support until the bug can be resolved (#83922)
Adeel Mujahid [Sat, 25 Mar 2023 14:21:39 +0000 (16:21 +0200)]
Persist FPU variables across try_compile passes (#83206)
* Persist FPU variables across try_compile passes
* Fix cmakeargs in corehost and build-native projs
Egor Bogatov [Sat, 25 Mar 2023 13:38:59 +0000 (14:38 +0100)]
Unroll Buffer.Memmove for arm64 (#83740)
Co-authored-by: Michał Petryka <35800402+MichalPetryka@users.noreply.github.com>
Co-authored-by: Bruce Forstall <brucefo@microsoft.com>
Jakob Botsch Nielsen [Sat, 25 Mar 2023 11:05:59 +0000 (12:05 +0100)]
JIT: Stop creating "location" commas (#83814)
Avoid creating commas that are on the LHS of an assignment or below an ADDR node.
These primarily were created by morph which has an IND(COMMA(x, y)) -> COMMA(x, IND(y)) transformation that did not pay attention to whether it was on the left of an assignment.
The IR shape is pretty odd; the RHS of these commas are not actually evaluated in the traditional sense, but happen as part of the parent ASG, so the semantics of the construct ends up being confusing.
Additionally it complicates #83590.
Jan Kotas [Sat, 25 Mar 2023 10:49:06 +0000 (03:49 -0700)]
Comment out Iran timezone tests (#83916)
Fixes #83901
Adeel Mujahid [Sat, 25 Mar 2023 06:47:18 +0000 (08:47 +0200)]
Exclude a source-gen test project from NativeAOT (#83881)
* Exclude a source-gen test project from NativeAOT
* Exclude more test projects
* Delete duplicate exclusion
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
Jan Kotas [Sat, 25 Mar 2023 03:46:49 +0000 (20:46 -0700)]
Unify managed runtime type name parsers (#83484)
Contributes to #72833 and #77868
The performance effect of this change on typical use of `Type.GetType` like `Type.GetType("MyType, MyAssembly")` is in the noise range. The typical use of `Type.GetType` spends most of the time in assembly loader and type loader. The time spent by parsing the type name is small fraction of the total and the performance improvement is hardly noticeable.
When the type name parser performance is measured in isolation, it is several times faster compared to the existing unmanaged CoreCLR type name parser. For example:
```
Type.GetType("System.Object, System.Private.CoreLib",
assemblyResolver: (an) => typeof(object).Assembly,
typeResolver: (assembly, name, ignoreCase) => typeof(object));
```
is about 3x faster with this change on CoreCLR.
Co-authored-by: Aaron Robinson <arobins@microsoft.com>
Jeremy Koritzinsky [Sat, 25 Mar 2023 03:33:53 +0000 (20:33 -0700)]
Fix a read-out-of-local error in the MD library. (#83906)
Fixes #73718.
Based on #73736
t-mustafin [Sat, 25 Mar 2023 03:32:00 +0000 (06:32 +0300)]
Fix false PASS JIT/CodeGenBringUpTests/DivConst.cs (#83880)
Huo Yaoyuan [Sat, 25 Mar 2023 03:30:09 +0000 (11:30 +0800)]
Update BOTR description of function pointer (#83914)
Tanner Gooding [Sat, 25 Mar 2023 00:18:49 +0000 (17:18 -0700)]
Enable EVEX support by default (#83648)
* Remove JitForceEVEXEncoding in favor of the existing AltJit enablement
* Rename IsVexEncodingInstruction to IsVexEncodableInstruction
* Updating the JIT to support EVEX by default
* Mark the AVX512 ISAs as "fully implemented" since they have no unimplemented instructions
* Simplify some of the EVEX related checks in emitxarch
* Tweak the Vector512 ISA check to properly account for VL
* Applying formatting patch
* Ensure we're checking for actual KMask usage and not just potential usage
* Fixing CORJIT_ALLOCMEM_FLG_RODATA_64BYTE_ALIGN for the managed VM
* Fixing the DoJitStressEvexEncoding check to account for VEX vs EVEX differences
* Break apart an overly long assert
* Ensure IsBaselineVector512IsaSupported works on x86
* Block NI_Vector512_ExtractMostSignificantBits on x86 pending decomposition work
* Ensure we don't overwrite 64-byte alignment for SPMI
* Include Vector512 HWIntrinsic tests by default
Ilia [Fri, 24 Mar 2023 21:36:24 +0000 (22:36 +0100)]
Fix reserving executable memory as per allocation type in ClrVirtualAllocWithinRange() (#83819)
Fixes #83818
Stephen Toub [Fri, 24 Mar 2023 21:05:41 +0000 (17:05 -0400)]
Improve incremental handling in regex generator (#83868)
* Improve incrementalism:
- Don't calculate the tree or analysis inside the semantic info.
- Dont' store methodDeclartionSyntax and store a comparable across runs location instead.
* Add comments, clean up, and simplify parser
---------
Co-authored-by: Chris Sienkiewicz <chsienki@microsoft.com>
Kunal Pathak [Fri, 24 Mar 2023 20:44:13 +0000 (13:44 -0700)]
[LSRA TP]: Skip free heuristics if no free registers are available (#83569)
* Add busy regs selection in different file to improve Release TP
* jit format
* Remove all the ifdef except in Release
* Skip the freeCandidates checks from free heuristics in Release mode
* Simplify things
Tomáš Rylek [Fri, 24 Mar 2023 19:28:10 +0000 (20:28 +0100)]
Fix for issue #78866 and regression test (#83697)
This fix breaks the infinite recursion cycle reported in the
above issue by propagating class load level to the interface
iterator.
Thanks
Tomas
Ilia [Fri, 24 Mar 2023 19:13:05 +0000 (20:13 +0100)]
Fix null dereference when logging enabled on 32-bit platforms in HostCodeHeap::InitializeHeapList() (#83875)
SwapnilGaikwad [Fri, 24 Mar 2023 18:37:39 +0000 (18:37 +0000)]
Encode the previous instruction's source reg to match consecutive loads from the same stack location (#83886)
Mark Plesko [Fri, 24 Mar 2023 17:57:06 +0000 (10:57 -0700)]
Convert JIT\Directed tests to merged test groups (#83256)
Steps involved in conversion:
- Remove test straccess4 - identical to straccess3_cs_d
- Remove duplicate csproj files - identical to versions without _cs in their names
- Manually remove main arg from out_of_range_fp_to_int_conversions.
- Remove Main from straccess3 (save as comment for local use)
- Remove switchdefaultonly* Main argument (replace with noinline constant argument)
- Remove IL namespace/class declarations (in shift/) that break ILTransform tool
Related PR #64837
- Use $(TestLibraryProjectPath) in 5 ilproj files (helps ILTransform)
Related PR #66157
- Manually rename ldfldstatic1_il_r
Actual dedup strategy groups projs in groups based on suffixes _r, _d, etc.
This file does not have a matching _d version, which leads ILTransform to
inconsistently renaming projects.
- [cs-main] Remove unused Main arg from arglist\vararg.cs
- [ILTransform -p] Rename _d/_r ilproj to _il_d/_il_r (but undo debuginfo/tests)
- [ILTransform -n] 3 iterations - Deduplicate project names
- [ILTransform -a] Match .assembly names to project names
- [ILTransform -prociso] Set RequiresProcessIsolation based on other attributes
- [ILTransform -collapse-main-sig] Collapse .method Main to one line to help future ILTransform passes
- [ILTransform -public] Make entry points public, add class if entrypoint is global
- Manually remove "public public" from C# (ILTransform failure on multiline declaration)
- Manually fix accessibility after exposing main class (other now-public methods with private signatures)
- Manually add missing public/class to entry points (missed by ILTransform)
- [ILTransform -sr] Fix System.Runtime references
- [ILTransform -ilfact] [Fact], Main->TestEntryPoint, no OutputType==Exe
- Add projects for merged test runners and Directory.Build.props
- Move simple test runner code to __GenerateMainWrapper.Main (avoids conflicts with Program in tests)
- Rename IL classes to avoid keywords
- Manually update issues.targets (after renaming various projects)
- Manually convert more_tails.cs (and generated IL from it)
- Manually fix punning.cs (depended on simple wrapper using "class Program")
- Finish merge - incorporate changes to csproj/Dir.B.props - fix xunit.analyzers errors
- Rename csproj to be shorter/more consistent with upcoming JIT/Regression change
Alexander Köplinger [Fri, 24 Mar 2023 17:27:43 +0000 (18:27 +0100)]
[wasm] Work around NuGet-Migrations issue (#83832)
Like https://github.com/dotnet/runtime/pull/83833 but also includes wasi jobs.
See https://github.com/dotnet/runtime/issues/80619
Bruce Forstall [Fri, 24 Mar 2023 17:26:06 +0000 (10:26 -0700)]
Dump Jit flags textually in mcs (#83865)
E.g.,
`
0-GetJitFlags key 0 sizeInBytes-16 jitFlags-
0000010040800010 instructionSetFlags-
03FD7FFFFFA1FFFE ( CORJIT_FLAG_DEBUG_INFO CORJIT_FLAG_SKIP_VERIFICATION CORJIT_FLAG_BBOPT CORJIT_FLAG_TIER1 X86Base SSE SSE2 SSE3 SSSE3 SSE41 SSE42 AVX AVX2 AES BMI1 BMI2 FMA LZCNT PCLMULQDQ POPCNT MOVBE AVX512F AVX512F_VL AVX512BW AVX512BW_VL AVX512CD AVX512CD_VL AVX512DQ AVX512DQ_VL X86Base_X64 SSE_X64 SSE2_X64 SSE3_X64 SSSE3_X64 SSE41_X64 SSE42_X64 AVX_X64 AVX2_X64 AES_X64 BMI1_X64 BMI2_X64 FMA_X64 LZCNT_X64 PCLMULQDQ_X64 POPCNT_X64 MOVBE_X64 AVX512F_X64 AVX512F_VL_X64 AVX512BW_X64 AVX512BW_VL_X64 AVX512CD_X64 AVX512CD_VL_X64 AVX512DQ_X64 AVX512DQ_VL_X64 )
`
Elinor Fung [Fri, 24 Mar 2023 17:11:43 +0000 (10:11 -0700)]
Add note to doc about not specifying `hostfxr_initialize_parameters::dotnet_root` (#83802)
Elinor Fung [Fri, 24 Mar 2023 17:10:53 +0000 (10:10 -0700)]
Move version.cpp out of hostcommon - only used by hostpolicy (#83864)
Tomas Weinfurt [Fri, 24 Mar 2023 16:38:25 +0000 (09:38 -0700)]
enable SupportedLinuxPlatforms_IsSupportedIsTrue on arm32 Ubuntu (#83799)
Steve Harter [Fri, 24 Mar 2023 16:26:42 +0000 (11:26 -0500)]
Handle custom modifiers on parameter constraints (#83850)
Viktor Hofer [Fri, 24 Mar 2023 14:55:56 +0000 (15:55 +0100)]
Update Microsoft.Build.* SDKs (#83877)
Avoids net45 prebuilds in Traversal projects: https://github.com/microsoft/MSBuildSdks/pull/430
Jan Dupej [Fri, 24 Mar 2023 14:53:46 +0000 (15:53 +0100)]
Disabled SIMD operator intrinsics. (#83888)
Theodor Zoulias [Fri, 24 Mar 2023 13:51:11 +0000 (15:51 +0200)]
Update PartitionerStatic.cs (#83867)
Fixed a typo in the title of a region directive.
Marek Fišera [Fri, 24 Mar 2023 12:04:20 +0000 (13:04 +0100)]
[wasm] Exclude PInvoke with function pointer in TimeZoneTests from wasm compilation (#83805)
Tom Deseyn [Fri, 24 Mar 2023 11:37:29 +0000 (12:37 +0100)]
eng/SourceBuild.props: when unset, let the repo determine RuntimeOS. (#82546)
* eng/SourceBuild.props: when unset, let the repo determine RuntimeOS.
When source-build builds runtime, it will pass RuntimeOS and BaseOS.
When the repo is built directly using './build.sh --sb', let the repo
determine those values rather than calculating them in SourceBuild.props.
* global-build-job.yml: remove unneeded runtimeOS param.
Vlad Brezae [Fri, 24 Mar 2023 09:27:27 +0000 (11:27 +0200)]
[mono][sgen] Remove outdated assertion (#83824)
objects_pinned is incremented when we fail to promote an object from nursery due to lack of memory. A long time ago, the concurrent collector was only scanning major objects, while the nursery objects were promoted from a separate nursery collection done also during the finishing pause. This is no longer the case as the finishing concurrent collection directly promotes objects from the nursery, having similar behavior to a normal blocking collection.
Marie Píchová [Fri, 24 Mar 2023 08:31:04 +0000 (09:31 +0100)]
[QUIC] Fix failing parallel tests (#83687)
* Hocus pocus
* Enable failing test
* Fixed touching msquic when it's not supported.
* Feedback
* Test of output
* Feedback
Adeel Mujahid [Fri, 24 Mar 2023 03:46:52 +0000 (05:46 +0200)]
Explicitly require `.eh_frame_hdr` section (#83866)
Katelyn Gadd [Fri, 24 Mar 2023 00:24:17 +0000 (17:24 -0700)]
More precise fix for #83792 (#83856)
dotnet-maestro[bot] [Thu, 23 Mar 2023 23:51:53 +0000 (18:51 -0500)]
[main] Update dependencies from dotnet/roslyn-analyzers (#83722)
* Update dependencies from https://github.com/dotnet/roslyn-analyzers build
20230320.2
Microsoft.CodeAnalysis.Analyzers , Microsoft.CodeAnalysis.NetAnalyzers
From Version 3.3.5-beta1.23165.1 -> To Version 3.3.5-beta1.23170.2
* Update dependencies from https://github.com/dotnet/roslyn-analyzers build
20230321.1
Microsoft.CodeAnalysis.Analyzers , Microsoft.CodeAnalysis.NetAnalyzers
From Version 3.3.5-beta1.23165.1 -> To Version 3.3.5-beta1.23171.1
* Update dependencies from https://github.com/dotnet/roslyn-analyzers build
20230322.1
Microsoft.CodeAnalysis.Analyzers , Microsoft.CodeAnalysis.NetAnalyzers
From Version 3.3.5-beta1.23165.1 -> To Version 3.3.5-beta1.23172.1
---------
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Jeremy Koritzinsky [Thu, 23 Mar 2023 23:36:03 +0000 (16:36 -0700)]
Fix marshaller types in attributes for exception marshallers and fix non-generic managed type with generic marshaller cases (#80461)
Steve Pfister [Thu, 23 Mar 2023 23:15:55 +0000 (19:15 -0400)]
[wasm] Try to work around NuGet-Migrations issue (#83833)
Works around a CI issue where we somehow can't access a named mutex and fails
Contributes to https://github.com/dotnet/runtime/issues/80619
Thays Grazia [Thu, 23 Mar 2023 23:11:41 +0000 (20:11 -0300)]
[mono][debugger] Trying to fix dereference null pointer (#83848)
* Trying to fix dereference null pointer
* fix compilation error
Andy Ayers [Thu, 23 Mar 2023 22:46:49 +0000 (15:46 -0700)]
JIT: ensure we keep throw blocks cold when combining blocks (#83842)
Noticed in a bunch of diffs that there were throw blocks intermixed
with regular blocks. Turns out when compacting a block followed by
a throw, we'd lose track of the fact that the combination should be cold.
Dan Moseley [Thu, 23 Mar 2023 21:56:07 +0000 (15:56 -0600)]
better link to open new issues in other repos (#83839)
linking to the actual page that has links to open issues in other repos, not the template.
Ivan Diaz Sanchez [Thu, 23 Mar 2023 21:53:16 +0000 (14:53 -0700)]
Add Symbolication to XUnitLogChecker (#83702)
Mark Plesko [Thu, 23 Mar 2023 21:38:44 +0000 (14:38 -0700)]
Enable xunit.analyzers in merged test groups. (#83806)
Main goal is to enable the rule that all [Fact] methods are in public types.
We'll need a custom rule to check that [Fact] methods are themselves public.
- Add reference in test_dependencies.csproj
- Set RunAnalyzers in Directory.Build.props for merged test groups
- Mostly disable other analyzer rules
- Clean a few warnings - notably enable a few tests in HardwareIntrinsics by making them public
In the future we will likely use a src/tests-specific EditorConfigFiles (.globalconfig) to disable some things across that entire tree.
Mukund Raghav Sharma (Moko) [Thu, 23 Mar 2023 21:35:11 +0000 (14:35 -0700)]
When the aggressive GCCollectionMode is specified, make sure the compacting parameter is set appropriately (#83708)
* When the aggressive GCCollectionMode is specified, make sure the compacting parameter is set appropriately
* Update src/coreclr/System.Private.CoreLib/src/System/GC.CoreCLR.cs
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
* Updated logic for NativeAoT
---------
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
Juan Hoyos [Thu, 23 Mar 2023 21:23:44 +0000 (14:23 -0700)]
Update know issues template. (#83846)
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
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)
Juan Hoyos [Thu, 23 Mar 2023 20:04:17 +0000 (13:04 -0700)]
Update debug-dump-template.md AzDO tenant link (#83845)
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>
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>
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.
Ivan Diaz Sanchez [Thu, 23 Mar 2023 18:11:55 +0000 (11:11 -0700)]
Adjust Test Watcher Timeout for Test Collections (#83746)
Adeel Mujahid [Thu, 23 Mar 2023 17:15:22 +0000 (19:15 +0200)]
Fix paths in "Stripping symbols" message (#82215)
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
Ilia Kosenkov [Thu, 23 Mar 2023 12:23:24 +0000 (14:23 +0200)]
Fix typo 'to if check' -> 'to check if' (#83809)
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>
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
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
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
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.
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.
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.
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.
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.
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.
Arthur Vickers [Wed, 22 Mar 2023 18:27:30 +0000 (18:27 +0000)]
Update owners and fabricbot (#83732)
Amal Abeygunawardana [Wed, 22 Mar 2023 15:40:18 +0000 (02:40 +1100)]
Add MemoryMappedFile.CreateFromFile(SafeFileHandle) overload (#83134), fixes #79187
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.