Description
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.
It will also eliminate the need to set the TCB stack pointer to 0 when entering the native stack, eliminating some of the need for no_split_stack
. (#1804, #1226)