Boost logo

Boost :

Subject: Re: [boost] [Boost.Lambda] Some new features are suggested: return, iterating yield, & local var
From: Huang Huan (mr.huanghuan_at_[hidden])
Date: 2012-01-06 05:25:26

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_at_[hidden]>:
> On 1/6/2012 10:15 AM, Huang Huan wrote:
>> 2012/1/6 Mathias Gaunard <mathias.gaunard_at_[hidden]>
>>>> 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
> _______________________________________________
> Unsubscribe & other changes:

Boost list run by bdawes at, gregod at, cpdaniel at, john at