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

Support a "spegetti stack" #455

Open
PaulBone opened this issue Mar 26, 2023 · 0 comments
Open

Support a "spegetti stack" #455

PaulBone opened this issue Mar 26, 2023 · 0 comments
Labels
component: runtime Concerning the runtime system meta: triaged Has the issue been triaged yet? skill: C++ status: accepted A bug we intend to fix it. type: enhancement
Milestone

Comments

@PaulBone
Copy link
Member

PaulBone commented Mar 26, 2023

Add a stack structure that can allow us to re-use stack frames. There's lots of different stratergies but I'm partial to a spagetti stack that makes use of the GC to clean up frames. Something like.

  • Adding a new frame uses a bump-pointer allocation (just like a regular stack frame).
  • Capturing marks the frame as captured (mark parents?!)
  • Returning "pops" the frame only if it is topmost AND not captured.
  • The GC cleans and compacts the stack, removing captured-but-not-referenced frames.

If stack frames are not captured, it means that this part of the program isn't making use of continuations or similar features, or only captures them but never replays them. Then the Plasma abstract machine modle should work as near as possible to native execution, especially with regard to something like the x86 shadow stack.

@PaulBone PaulBone added type: enhancement skill: C++ component: runtime Concerning the runtime system meta: triaged Has the issue been triaged yet? status: accepted A bug we intend to fix it. labels Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: runtime Concerning the runtime system meta: triaged Has the issue been triaged yet? skill: C++ status: accepted A bug we intend to fix it. type: enhancement
Projects
None yet
Development

No branches or pull requests

1 participant