Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Run Rust code on native stack segments #4479
Currently when we call into C code we don't update the stack pointer to account for the native stack segment, and when we call back into Rust code we immediately switch back to a Rust stack, wasting space on the native stack.
Instead, we should treat the foreign segment the same as any other - putting it into the TCB. Instead of an explicit stack switch to call Rust code, we'll just Run it on the foreign stack. Then the Rust code will start adding new stack segments as needed.
This will give uv callbacks better performance, and will eliminate some of performance concerns around calls from SpiderMonkey into the Rust DOM.
referenced this issue
Jan 14, 2013
Nominating for a milestone. I'm not entirely sure how this interacts with the current runtime along with all the FFI changes for extern fns that happened recently. I would suggest milestone 1 because this sounds like it will likely help define how we manage stacks during FFI, but I would also be OK with other milestones.