Skip to content

Conversation

@linxuanm
Copy link
Contributor

@linxuanm linxuanm commented Jan 5, 2026

This PR introduces an unboxed stack-switching implementation that avoids heap allocation when creating continuations via suspend/switch. This behavior can be configured at build-time: the build defaults to the unboxed mode, and the boxed implementation can be enabled by passing --boxed-continuation to build.sh.

Copy link
Owner

@titzer titzer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, with only the minor-est of comments :)


CONTINUATION="src/engine/continuation/BoxedContinuation.v3"
CONTINUATION="src/engine/continuation/UnboxedContinuation.v3"
CONTINUATION_X86_64="src/engine/continuation/X86_64UnboxedContinuation.v3"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's put this in src/engine/x86-64/

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think everything under /x86-64/* is included unconditionally in the x86-64 target, but which continuation offset file to include is dependent on whether --boxed-continuation is enabled. Can this still be done if both offset files are moved under /x86-64/?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could create a further subdirectory perhaps.

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.

2 participants