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

Do tail-calls properly in Speedy. #8036

Merged
merged 1 commit into from Nov 25, 2020
Merged

Conversation

nickchapman-da
Copy link
Contributor

@nickchapman-da nickchapman-da commented Nov 23, 2020

Fix tail-calls to execute in constant space by doing early pop of temporaries stack.

See code comments for an explanation of the operation and invariants of the new early-pop scheme

Pull Request Checklist

  • Read and understand the contribution guidelines
  • Include appropriate tests
  • Set a descriptive title and thorough description
  • Add a reference to the issue this PR will solve, if appropriate
  • Include changelog additions in one or more commit message bodies between the CHANGELOG_BEGIN and CHANGELOG_END tags
  • Normal production system change, include purpose of change in description

NOTE: CI is not automatically run on non-members pull-requests for security
reasons. The reviewer will have to comment with /AzurePipelines run to
trigger the build.

@nickchapman-da nickchapman-da marked this pull request as ready for review November 24, 2020 15:11
@nickchapman-da nickchapman-da changed the title WIP: early pop of temp stack, for tail recursion in constant space Do tail-calls properly in Speedy. Nov 24, 2020
@nickchapman-da nickchapman-da added the component/daml-engine DAML-LF Engine & Interpreter label Nov 24, 2020
Copy link
Contributor

@hurryabit hurryabit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice. Thank you so much!

Our interpreter is getting more and more complicated. We'll probably have to do a thorough cleanup before we do the next big changes.

…poraries stack.

changelog_begin
changelog_end
@nickchapman-da
Copy link
Contributor Author

squash commits; set auto merge

@mergify mergify bot merged commit 654f5e3 into master Nov 25, 2020
@mergify mergify bot deleted the nick-early-pop-temps-stack branch November 25, 2020 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/daml-engine DAML-LF Engine & Interpreter
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants