Skip to content

Conversation

@AnsonYeung
Copy link

@AnsonYeung AnsonYeung commented Dec 7, 2025

There is some further optimization in mind including optimizing the states and there is some regression since I do not include the code for detecting whether there is any call rn. Once the state optimization is included I believe this will be resolved anyway.

I also want to remove resumeValue and instead have the runtime modify the saved locals directly as that seem to cause quite some amount of excessive code.

The current approach mandates the use of the lifter. As lifter can not handle semantics of handle blocks (and it does not need to), we lower handle block to an equivalent form first, without the insertion of effect checks/resumption prelude. Now we invoke the lifter after handle block is translated and before the actual instrumentation takes place. We make use of the fact that lifter will preserve the mayRaiseEffect field.

For stack safety, I simplified the approach taken in #307, since we always include the entry state and we do not need to split into different cases when stack safety is enabled.

@LPTK LPTK mentioned this pull request Dec 9, 2025
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

Successfully merging this pull request may close these issues.

3 participants