[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: More lua stack operations support?
- From: Dirk Laurie <dirk.laurie@...>
- Date: Mon, 3 Mar 2014 11:17:45 +0200
2014-03-03 10:50 GMT+02:00 Jean-Luc Jumpertz <jean-luc@celedev.eu>:
> In effect, it corresponds to a real and rather common use case where:
> - you want to push several "result" values to the stack,
> - for this you need to compute a number of intermediate stuff like table references and so push these intermediate values in the stack
> - you compute your "result" values that are located at the top of the stack
> - you need to remove the intermediate values from the stack in order to leave it in a clean non-leaking state
If you are returning to Lua, the return values are used and the stack
is cleaned up.
So this situation only applies when you staying in C.
I find it hard to imagine a situation where stack leakage would be
critical when you
have all the resources of C at your disposal.
Maybe you would be able to convince me if you showed an actual
rather than a hypothetical example.