You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The temporaries generated by LocalRewriter for collection expression spans are created at the outermost scope of the method and span multiple statements or sequence points, and therefore should be considered long-lived locals.
Currently however, the temporaries are created with SynthesizedLocalKind.LoweringTemp, for which SynthesizedLocalExtensions.IsLongLived(kind) returns false.
The fact that the temp locals are not considered long-lived may cause issues for the following:
EnC which matches locals across method versions
SpillSequenceSpiller which rewrites locals that are not long-lived (although currently ref struct instances cannot be used across await)
The temporaries generated by
LocalRewriter
for collection expression spans are created at the outermost scope of the method and span multiple statements or sequence points, and therefore should be considered long-lived locals.Currently however, the temporaries are created with
SynthesizedLocalKind.LoweringTemp
, for whichSynthesizedLocalExtensions.IsLongLived(kind)
returnsfalse
.The fact that the temp locals are not considered long-lived may cause issues for the following:
SpillSequenceSpiller
which rewrites locals that are not long-lived (although currentlyref struct
instances cannot be used acrossawait
)Based on comment and discussion with @AlekseyTs.
The text was updated successfully, but these errors were encountered: