
Yes, it's will spend some more time in push/pop the local var into/out the virtual stack(not as real stack efficiency). If only implement the return feature, using virtual stack is a bad way. But I think it's the only way to the real yielding. None of local vars will be destructed after once yielding, Hold the stack object for next yielding call. How can I get this without virtual stack? 2012/1/6 Joel de Guzman <joel@boost-consulting.com>:
On 1/6/2012 10:15 AM, Huang Huan wrote:
2012/1/6 Mathias Gaunard <mathias.gaunard@ens-lyon.org>
return is the most usefull part of function. I'm working on the implement, it's approved work with no exception for return. The architect is defferent from the lambda, I think the phoenix is also . The final functional call is wrapped, and create a heap/stack like workspace. It will support restore for yielding calls. and yielding& local var are also involved in the return architect.
Does it call destructors correctly?
Yes, the stack is simulated by one object pass through the all lambda item with internal function, because all lambda item should not runtime item. It's not a real function stack, just { } domain for scope and local destruct. so yielding will be no change of the stack vars, if the stack object keeped by the iteration.
I suspect that strategy will be slow at runtime.
Regards, -- Joel de Guzman http://www.boostpro.com http://boost-spirit.com
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost