Native Disassembly only shows first basic block
I rather like the Native Disassembly feature in LINQPad and use it often to compare implementations. However it seems to be broken I think in the latest version, because only the first basicblock is shown. For example:
ref T ElementAt(T[] array, int offset)
=> ref array[offset];
Above code generates the following. At line L0008 it refers to label L0017 but that code is not visible anymore. (It used to show: int 3)
L0000 sub rsp, 0x28
L0004 cmp r8d, [rdx+8]
L0008 jae short L0017
L000a mov eax, r8d
L000d lea rax, [rdx+rax*4+0x10]
L0012 add rsp, 0x28
L0016 ret
Does anyone know a workaround? (Other than going back to a previous version of LINQPad)
Comments
8.8.6
(latest beta), the same:Can you provide a full repro? I've tried running a fresh install of LINQPad 8.8.6 (Windows Sandbox) with the following script:
This is the X64 shown:
Here is a full example. A clue might be that on my work-pc it works okay if I select .NET 8, but only shows the first basic block when .NET 9 is selected.
LINQPad version: 8.7.4 (X64)
Host runtime version: 8.0.12
Default query runtime version: 9.0.1
Default query reference assembly version: 9.0.1
Roslyn Version: 4.12.0-3.24572.7
FSharp.Compiler.Service version: 43.8.101.0
NuGet client version: 6.7.1.1
This outputs with /o+:
X64
Main ()
ElementAt (T[], Int32)
Code generated is the same for .NET 8/9