-
Notifications
You must be signed in to change notification settings - Fork 787
Fix two issues in --spill-pointers #5315
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
base: main
Are you sure you want to change the base?
Conversation
a1ce83a
to
8dff0a2
Compare
What is the status of this patch? Has anyone investigated the CI failures? Thanks for working on this @juj! It looks helpful. |
8dff0a2
to
6d91ceb
Compare
Took quite a bit of time to get back to looking into GC on Emscripten.. I see that in current main branch, the issue 1) has already been fixed. So I reset this branch now on top of latest main, and only kept the second fix "2) do not spill pointers in the functions stackAlloc()/stackSave()/stackRestore(), which should operate on the global stack pointer without a stack frame of their own." from the original code. I am developing a small toy garbage collector to test things out, and with this Binaryen PR landed, it is now working properly to scan the local stack and global static data section. |
I am testing this out against https://github.com/juj/emgc to prototype garbage collection against Emscripten. The plan is to experiment with multithreaded garbage collection from multiple managed threads, with cooperative stop-the-world signaling, and then try to transplant the whole thing back to Boehm, or something like that. |
@juj Are you aiming to get this approved and landed here in upstream, or is this just for experimentation at this time? |
This is now for experimentation, though I'll try to work towards test cases on the stackAlloc issue to make sure I'm proposing a fix that patches that issue. |
…oops in correct order. Add debugging statistics.
Fix two issues in --spill-pointers: 1) properly generate the stack frame in a stack-grows-downwards manner, and 2) do not spill pointers in the functions stackAlloc()/stackSave()/stackRestore(), which should operate on the global stack pointer without a stack frame of their own.