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

Further optimizations for closure conversion #98

Open
1 of 4 tasks
Idorobots opened this issue Mar 22, 2021 · 0 comments
Open
1 of 4 tasks

Further optimizations for closure conversion #98

Idorobots opened this issue Mar 22, 2021 · 0 comments

Comments

@Idorobots
Copy link
Owner

Idorobots commented Mar 22, 2021

This needs more analysis done beforehand, also #93 would certainly simplify things greatly.

  • allocate the closure statically if there are no free variables,
  • avoid creating a closure if all the call sites are known - essentially a lambda-lift.
  • flatten the closure & environment structure - put all the free vars into the closure right after the code pointer,
  • eliminate self-references for recursive functions - use the closure directly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant