Skip to content

[pull] main from dotnet:main#573

Merged
pull[bot] merged 8 commits intoehtick:mainfrom
dotnet:main
Jan 13, 2026
Merged

[pull] main from dotnet:main#573
pull[bot] merged 8 commits intoehtick:mainfrom
dotnet:main

Conversation

@pull
Copy link
Copy Markdown

@pull pull bot commented Jan 13, 2026

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

jkoritzinsky and others added 8 commits January 12, 2026 13:20
This PR removes the `SORT_MARK_STACK` feature and related `rqsort1`
function from the GC. These aren't used and if we need them, we can
always bring them back from history.

I don't know the full history here but I assume it's not enabled because
the performance benefits weren't worth the sorting cost. Plus we have
prefetch in the mark phase now which should help hide memory latency.
Co-authored-by: Milos Kotlar <kotlarmilos@gmail.com>
…stack arg sizes through our data structures where possible (#123016)

A quick analysis of the current use of PInvokeArgIterator leads me to
believe that we would use it to calculate a value we never actually
used. This PR changes the implementation of the runtime to remove those
uses which were tied to construction of function pointers from delegates
where the delegate parameters were a structure which required
marshalling. Should be a small code size win for Unix X64 platforms
along with a negligible perf boost on all non-windows platforms. We
still need this thing for COM scenarios on Windows so I haven't touched
it there.

This work is not removing the PInvokeArgIterator itself, as it appears
to be necessary for the interpreter call stub generator (although it
also needs to be fixed to be correct in those cases as well.)
…custom VARIANT types in libraries (#123060)

Co-authored-by: Aaron R Robinson <arobins@microsoft.com>
…rtion (#121527)

When RangeCheck inspects, say, "i + cns" tree, it tries to get the
"assertion-based" range for `i` via its block's `bbAssertionIn`. It's
too conservative and doesn't take into account assertions created before
that `i` in the block (inter-block assertions). Let's see if we can
cheaply just accumulate those by hands (@AndyAyersMS's idea).

A simplified version of the repro is the following (thanks @BoyBaykiller
for the repro):
```cs
void Test(int[] arr, int i)
{
    arr[i] = 0;  // creates 'i >= 0 && i < arr.Length' assertion
    i++;         // same block as ^

    if (i < arr.Length)
        arr[i] = 0;
}
```
Codegen diff:
```diff
; Method Benchmarks:Test(int[],int):this (FullOpts)
G_M59621_IG01:
       sub      rsp, 40
G_M59621_IG02:
       mov      eax, dword ptr [rdx+0x08]
       cmp      r8d, eax
       jae      SHORT G_M59621_IG05
       mov      ecx, r8d
       xor      r10d, r10d
       mov      dword ptr [rdx+4*rcx+0x10], r10d
       inc      r8d
       cmp      eax, r8d
       jle      SHORT G_M59621_IG04
G_M59621_IG03:
-      cmp      r8d, eax
-      jae      SHORT G_M59621_IG05
       mov      eax, r8d
       xor      ecx, ecx
       mov      dword ptr [rdx+4*rax+0x10], ecx
G_M59621_IG04:
       add      rsp, 40
       ret      
G_M59621_IG05:
       call     CORINFO_HELP_RNGCHKFAIL
       int3     
-; Total bytes of code: 56
+; Total bytes of code: 51
```
@pull pull bot locked and limited conversation to collaborators Jan 13, 2026
@pull pull bot added the ⤵️ pull label Jan 13, 2026
@pull pull bot merged commit 7ed6f1c into ehtick:main Jan 13, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants