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

Locals x effects #2215

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Open

Conversation

mshinwell
Copy link
Collaborator

This provides support for local allocations in the presence of algebraic effects.

There aren't presently any clever optimisations, although care is taken to ensure that the code sequences generated by the OCaml compiler for local allocations remain unchanged. This is done by arranging for some of the per-stack locals state to be present at the root of Caml_state in addition to being stored in the stack_info structures.

Based on #2205.

@mshinwell mshinwell added runtime OCaml 5 effects Relating to algebraic effects and removed OCaml 5 labels Jan 9, 2024
@mshinwell mshinwell requested a review from stedolan January 9, 2024 14:40
@mshinwell mshinwell force-pushed the locals-and-effects branch 4 times, most recently from 90a71c0 to 6634a71 Compare January 9, 2024 14:48
@mshinwell
Copy link
Collaborator Author

mshinwell commented Jan 9, 2024

I'm also going to put in this PR the re-enabling of tests disabled with the CR ocaml 5 effects marker (at least the ones that don't use Domain, anyway).

@lpw25
Copy link
Collaborator

lpw25 commented Jan 10, 2024

Could you or @stedolan add some description to this PR of how this works, and some indication of what invariants it relies on to work? It's unclear whether this supports e.g. pointers to locals on a parent's stack.

@mshinwell
Copy link
Collaborator Author

Could you or @stedolan add some description to this PR of how this works, and some indication of what invariants it relies on to work? It's unclear whether this supports e.g. pointers to locals on a parent's stack.

Sure, I'll probably do this as comments in the code.

@mshinwell mshinwell force-pushed the locals-and-effects branch 3 times, most recently from cf4d38d to 74e9015 Compare April 15, 2024 12:00
@mshinwell mshinwell force-pushed the locals-and-effects branch from 74e9015 to 69f0be7 Compare July 8, 2024 12:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effects Relating to algebraic effects runtime
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants