lua-users home
lua-l archive

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


I believe it means that the call info, ie saved instruction pointer, function base/top (to allow call stack traversal), number of tail calls, etc are all stored as implicit, hidden local variables. A simple method would be to store them as basic Lua types, light userdata and numbers, but I imagine Mike Pall's method would make significant optimizations. For instance the state and number of tail calls could be stored together in a number, likewise the base and top could be stored as offsets rather full addresses which may also allow them to be combined into one number. Or the struct could be stored as binary data across multiple stack positions, with each tag being set to some Internal value.

Does away with the second stack Lua maintains, which can only be a good thing imo.

I wonder if Mike would like to reveal more ;).

- Alex

----- Original Message ----- From: "tankxx" <tankxx@gmail.com>
To: "Lua list" <lua@bazar2.conectiva.com.br>
Sent: Thursday, October 29, 2009 9:39 AM
Subject: LuaJIT roadmap 2008 question


In LuaJIT roadmap 2008:

- The explicit frame stack (CallInfo) is gone. The frame
 structure is implicitly stored in the regular Lua stack (tagged
 values). This speeds up call handling substantially and also
 simplifies the compiler (uniform treatment of slots and frames).


I cannot figure out the details about it, May anyone explain it in details?