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

Shared-to-non-shared edges #45

Open
manoskouk opened this issue Feb 22, 2024 · 1 comment
Open

Shared-to-non-shared edges #45

manoskouk opened this issue Feb 22, 2024 · 1 comment

Comments

@manoskouk
Copy link

It seems that with the current design, some shared-to-non-shared edges are unavoidable: at the very least functions are closed wrt. their instance, which is always non-shared.
Do we need to support such edges or are we planning to allow shared instances?

@tlively
Copy link
Member

tlively commented Feb 22, 2024

One idea would be to internally split instance objects into separate shared and non-shared parts. Non-shared functions would close over the non-shared part, which would have a reference to the shared part so that the non-shared functions could still access shared functions, globals, etc. Shared functions, OTOH, would close over only the shared part, which would not have a reference back to the non-shared part. This is fine because shared functions are not allowed to access non-shared module elements anyway.

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

2 participants