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

Simplify unload-bits-asm and asm-interp when there's a heap #9

Open
dvanhorn opened this issue Jun 21, 2023 · 1 comment
Open

Simplify unload-bits-asm and asm-interp when there's a heap #9

dvanhorn opened this issue Jun 21, 2023 · 1 comment

Comments

@dvanhorn
Copy link
Member

dvanhorn commented Jun 21, 2023

Currently asm-interp changes it's return type if the runtime uses a heap and produces a pair of the result and a pointer to the heap. The latter is only used to free the memory after the value has been reconstructed. You don't need the heap pointer to reconstruct the value.

It seems to make more sense to just not free the memory and return the bits in rax, from which the value can be reconstructed. This keeps the concept of asm-interp simple and consistent from Abscond through to the end.

There's some worry about leaking memory, but one solution is to have asm-interp re-use the heap memory on each call (it may already do this, I'm not sure). This means you have to be done using the memory before another call to asm-interp happens, but that seems reasonable.

@dvanhorn
Copy link
Member Author

Closed by a6d4745.

@dvanhorn dvanhorn transferred this issue from cmsc430/cmsc430.github.io Oct 29, 2024
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

No branches or pull requests

1 participant