3b5201cabc97076fabff74ccd5ce1fa24679d068
Once a named argument is hoisted, the call becomes a CallWithNamedArgs block, and inlining moves the Current getter into the block's first argument store. The foreach detection could not move it back out: CanInlineIntoSlot refused the block, and for an instance call the store of the 'this' argument in front counted as a write the getter cannot be moved past. That store only writes the block's own variable, so the getter is checked against the stored value instead, the same way CanExtendNamedArgument allows inlining into that position.
Description
My contributions to icsharpcode/ILSpy: 16 commits, 3 merged PRs
202 KiB
0 Stars
1 Watchers
0 Forks
Languages
C#
99.9%