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

Consider Inferring Masks for Locals #632

Open
TimWhiting opened this issue Dec 21, 2024 · 1 comment
Open

Consider Inferring Masks for Locals #632

TimWhiting opened this issue Dec 21, 2024 · 1 comment

Comments

@TimWhiting
Copy link
Collaborator

A local effect should only be used by functions below it on the stack. In fact any function created above it on the stack cannot have any lexical capture of the variables and therefore cannot use the local effect anyways. It always makes sense to infer a mask for those functions. (Except maybe in the special case of functions that have an explicit local effect and use a byref variable).

All functions created below the variables - as long as they do not escape should be fine to use the local effect.

What about escaping functions? They really shouldn't access local variables, so there is likely no problem here?

@TimWhiting
Copy link
Collaborator Author

TimWhiting commented Dec 21, 2024

Feel free to move this to the next milestone (async / next release). Not sure how soon you want the small release out & how much time you will have for these issues.

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