> What is the problem that doing tail calls is causing? With setjmp the
> problem is that the called function will corrupt the stack for when
> longjmp is called. If the problem in here is that we are doing
> something
> like
> 
> a = get_state();
> yield();
> 
> with yield being tail called, maybe we can combine it in a
> save_state_and_yield?

Correct, this is the problem. Right now there is get_registers and 
set_registers written in assembly, and a C++ function swap, which calls both of 
them. I think writing swap in assembly will fix this problem, because we can 
control exactly how the calls are made. 

I have opened issue #548 to track this.

-Eric

> Cheers,
> Rafael
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to