lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Cosmin Apreutesei <cosmin.apreutesei@gmail.com> wrote:
>
> So it could only work with a fixed number of state vars for the entire
> loop. Could these stack slots be counted upon evaluation of explist
> and then the same number of variables be sent back to f ? Or would
> that still be a pain to implement?

Sorry, I now realise I made a mistake. The extra state variables you were
thinking of are actually visible in the source, so the compiler can know
how many stack slots are required. This means the programmer has to know
how many state variable are needed, and can't leave out the ones that
aren't used in the loop body.

Tony.
-- 
f.anthony.n.finch  <dot@dotat.at>  http://dotat.at/
German Bight: East or northeast 5 to 7. Moderate, occasionally rough in west.
Rain or sleet then mainly fair. Good, occasionally poor.