Skip to content

Locals x effects#2215

Closed
mshinwell wants to merge 1 commit intooxcaml:mainfrom
mshinwell:locals-and-effects
Closed

Locals x effects#2215
mshinwell wants to merge 1 commit intooxcaml:mainfrom
mshinwell:locals-and-effects

Conversation

@mshinwell
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

@TheNumbat TheNumbat mentioned this pull request Mar 3, 2025
@mshinwell
Copy link
Copy Markdown
Collaborator Author

Superceded by #3648

@mshinwell mshinwell closed this Mar 5, 2025
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