- 
                Notifications
    
You must be signed in to change notification settings  - Fork 5.2k
 
          Consume Roslyn with ref fields support
          #71498
        
          New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Update public APIs
This is supplied by Roslyn.
| 
           Note regarding the  This serves as a reminder for when your PR is modifying a ref *.cs file and adding/modifying public APIs, to please make sure the API implementation in the src *.cs file is documented with triple slash comments, so the PR reviewers can sign off that change.  | 
    
| 
           I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label.  | 
    
| 
           Tagging subscribers to this area: @dotnet/area-meta Issue DetailsMoves to a Roslyn version that support  Removes  
  | 
    
          
 @BrzVlad I think we've made it past most of the legs that were failing so I perhaps this is solved. I applied your suggestion and verified it locally fixed the issue I was hitting above - Thank you. @BrzVlad or @lambdageek Can I get one of you to sign-off on the mono changes?  | 
    
          public Span<byte> Test(byte[] array) => array.AsSpan(0, 10);codegen before this PR: ; Method Program:ArrayAsSpanStartLength(System.Byte[]):System.Span`1[Byte]:this
G_M63029_IG01:      
       4883EC28             sub      rsp, 40
G_M63029_IG02:            
       4D85C0               test     r8, r8
       741D                 je       SHORT G_M63029_IG04
       418378080A           cmp      dword ptr [r8+8], 10
       7216                 jb       SHORT G_M63029_IG04
       4983C010             add      r8, 16
       4C8902               mov      bword ptr [rdx], r8
       C742080A000000       mov      dword ptr [rdx+8], 10
       488BC2               mov      rax, rdx
G_M63029_IG03:         
       4883C428             add      rsp, 40
       C3                   ret      
G_M63029_IG04:          
       FF15247D2700         call     [System.ThrowHelper:ThrowArgumentOutOfRangeException()]
       CC                   int3     
; Total bytes of code: 45Codegen after this PR: ; Method Program:ArrayAsSpanStartLength(System.Byte[]):System.Span`1[Byte]:this
G_M63029_IG01:  
       57                   push     rdi
       56                   push     rsi
       53                   push     rbx
       4883EC30             sub      rsp, 48
       C5F877               vzeroupper 
       488BDA               mov      rbx, rdx
G_M63029_IG02:             
       C5F857C0             vxorps   xmm0, xmm0
       C5FA7F442420         vmovdqu  xmmword ptr [rsp+20H], xmm0
       4D85C0               test     r8, r8
       7432                 je       SHORT G_M63029_IG04
       418378080A           cmp      dword ptr [r8+8], 10
       722B                 jb       SHORT G_M63029_IG04
       4983C010             add      r8, 16
       4C89442420           mov      bword ptr [rsp+20H], r8
       C74424280A000000     mov      dword ptr [rsp+28H], 10
       488BFB               mov      rdi, rbx
       488D742420           lea      rsi, bword ptr [rsp+20H]
       E8DF738B5F           call     CORINFO_HELP_ASSIGN_BYREF
       48A5                 movsq    
       488BC3               mov      rax, rbx
G_M63029_IG03:         
       4883C430             add      rsp, 48
       5B                   pop      rbx
       5E                   pop      rsi
       5F                   pop      rdi
       C3                   ret      
G_M63029_IG04:
       FF158CDB0B00         call     [System.ThrowHelper:ThrowArgumentOutOfRangeException()]
       CC                   int3     
; Total bytes of code: 85perf-triage team (@DrewScoggins, @tannergooding, @kunalspathak) noticed that this PR caused a lot of perf regressions  | 
    
| 
           Notably   | 
    
          
  | 
    
          
 Since all the significant changes here are on the VM side that is to be expected. SPMI will only reflect JIT changes.  | 
    

Moves to a Roslyn version that support
reffield support and thescopedkeyword.Removes
ByReference<T>from all runtimes.Contributes to #63768