Tail recursion warning and attribute, take 3#15394
Tail recursion warning and attribute, take 3#15394dawedawe wants to merge 12 commits intodotnet:mainfrom
Conversation
|
Haven't reviewed it in detail yet, however, the first thouhg is that ilxgen doesn't feel like the right place for doing the tailcall analysis. The analysis happens when we emit call(virt)s, which is orthogonal to the F#'s (tail) recursion (when we unroll recursion to loops, etc). |
@vzarytovskii Thanks for your thoughts on this. |
That's a good question, I would think that post inference phase, or optimization phase are the most fitting ones. |
|
For those following along, I thing this PR is superseded by #15503 |
This is an alternative approach to #15260 (RFC1011)
Instead of operating in
PostInferenceChecks.fsthis PR is using the IL level to emit warnings.It seems a lot easier to emit warnings from there, but this approach currently suffers from a lot of false positives as can be seen in the tests.