Skip to content
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

Oversaturated Arguments for Tail Calls #549

Closed
2 tasks
iamrecursion opened this issue Sep 10, 2019 · 1 comment
Closed
2 tasks

Oversaturated Arguments for Tail Calls #549

iamrecursion opened this issue Sep 10, 2019 · 1 comment
Labels
p-lowest Should be completed at some point

Comments

@iamrecursion
Copy link
Contributor

Summary

Currently we have handling for oversaturated arguments in all cases except that of the tail-call-optimised function. As the tail-call optimisation logic is going to change dramatically in the face of the CPS transform, it seems like wasted effort to implement a significant extra amount of code only to have it change later.

This issue exists to track the implementation of this functionality once the CPS transformation has been implemented.

Value

Comprehensive handling of oversaturated function applications.

Specification

  • Develop a design for how to handle oversaturated function applications in the face of CPS and the associated tail-call optimisation.
  • Implement this design, ensuring that it doesn't result in any undue performance regressions.

Acceptance Criteria & Test Cases

  • TCO'd functions hand have oversaturated applications without causing a stack overflow.
@kustosz
Copy link
Contributor

kustosz commented Sep 10, 2019

Just a note though, as the description is overly pessimistic. We're still not sure if it's possible to construct a case that would break the current logic.

@iamrecursion iamrecursion transferred this issue from another repository Jun 23, 2020
@joenash joenash added Category: Interpreter p-lowest Should be completed at some point labels Jun 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p-lowest Should be completed at some point
Projects
None yet
Development

No branches or pull requests

3 participants