-
Notifications
You must be signed in to change notification settings - Fork 833
Tail recursion warning and attribute, take 3 #15394
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
|
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.