Skip to content

Tail call optimization is present now - #247

Merged
skx merged 3 commits into
mainfrom
244-tails
Sep 15, 2026
Merged

skx merged 3 commits into
mainfrom
244-tails

Conversation

@skx

@skx skx commented Sep 15, 2026

Copy link
Copy Markdown
Owner

This pull-request closes #244 by implementing tail call optimization:

  • If the last statement of a function is a call
    • Then replace it with a stack-teardown and a jump.
  • Add a test case and documentation.

Simpler than I thought, but still needs more testing.

@skx
skx merged commit e81ccc3 into main Sep 15, 2026
1 check passed
@skx
skx deleted the 244-tails branch September 15, 2026 19:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement tail call optimization..

1 participant