Wasm stack switching in SpiderMonkey is the most complex feature I've ever built. One of those projects you get lost and start rethinking the basics like "what is the stack even really?"
Was fun to give a talk on it:
https://www.youtube.com/watch?v=OvYFHH9AxOw