lua-users home
lua-l archive

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


On Thu, 20 Dec 2001, Thatcher Ulrich wrote:

> A couple of questions: I notice the VM is now stackless for
> Lua-calls-to-Lua, and there's an explicit CallInfo stack.  But there
> doesn't seem to be any sign of lua_resume(), lua_sleep()/yield() etc.
> Is that planned, and just not implemented yet?

It is planned, but we still have to work out some details. One
particular concern is the use of longjmp/setjmp in a "regular" mechanism
(as opposed to error handling).


> Also, whatever happened to non-recursive tailcalls?  In 4.0 with the
> sleep/yield patch they worked nicely because of OP_TAILCALL.  Are you
> thinking about implementing that?  I guess it could be implemented
> without OP_TAILCALL by peeking at the opcode following an OP_CALL, and
> if it's OP_RETURN then just reuse the current stack frame instead of
> making a new one.

Our concern here is error messages. A OP_TAILCALL leaves no trace of the
calling function, and that may be quite confusing in error messages.

-- Roberto