lua-users home
lua-l archive

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



On 7-Jun-05, at 8:38 AM, Luiz Henrique de Figueiredo wrote:

Another: there doesn't seem to be a way to access return values. They're on the stack, and the core code appears to know how many values on the stack
are return values, but there's no way to find this out from a hook.

This is really hard. How would this work for a function that ends like this?
	return f()

I personally feel that tail call counting ought to go away altogether, and be replaced with a TAILCALL hook, if that is considered necessary. In the case of a tail call, you can see what the return values are when the tailcalled function returns (or further down the chain, maybe) which will actually happen about when you expect it to.