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

Improve toplevel lifting criterion #247

Open
mshinwell opened this issue Aug 25, 2020 · 1 comment
Open

Improve toplevel lifting criterion #247

mshinwell opened this issue Aug 25, 2020 · 1 comment

Comments

@mshinwell
Copy link

No description provided.

@mshinwell
Copy link
Author

I think we should keep track of whether variables were defined at toplevel. Then, when lifting, we should check whether all variables involved (e.g. in a closure environment) were defined at toplevel. If so, it's ok to lift. At present we make the decision based on where the potentially-liftable value is, which is more restrictive (e.g. we'll never lift a lambda under another lambda if its environment is inconstant, even if that environment can be computed at toplevel). The existing algorithm for placing "let symbol" bindings shouldn't need much modification to deal with this new criterion.

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

No branches or pull requests

1 participant