forked from tarantool/tarantool
-
Notifications
You must be signed in to change notification settings - Fork 0
LuaJIT guide
Nick Volynkin edited this page Mar 3, 2021
·
2 revisions
Honestly, LuaJIT is not such ugly and complex as you expect. Check out this talk about LuaJIT.
-
Lua:
- Language basics: "global" and local variables, conditions, loops
- Plain types, functions as first-class values
- Table as a single complex data structure
- Metatables and metamethods
- Coroutines
- Userdata
- LuaJIT (implementation):
- Type system (
src/lj_obj.h
): primitives, numbers, strings, tables, coroutines, prototypes (including list of literals and upvalues) - Interpreter (
src/vm_x86.dasc
):- Bytecode reference
- Types of callable objects: Lua functions, C functions, fast functions
- Dispatch table
- Host frame vs. guest frame (guest frame types): Lua, C, continuation, vararg, protected frames
- Error handling incl. DWARF2 stack unwinding
-
Talk by Peter Cawley about LuaJIT history and
LJ_GC64
- Several talks by Roberto Ierusalimschy about Lua per se and its internals related to LuaJIT
- You can find lots of talks related to LuaJIT here
- Brief dive into LuaJIT by Nick Zavaritsky
Architecture Specifications
- Server architecture
- Feature specifications
- What's in a good specification
- Functional indexes
- Space _index structure
- R tree index quick start and usage
- LuaJIT
- Vinyl
- SQL
- Testing
- Performance
How To ...?
- ... add new fuzzers
- ... build RPM or Deb package using packpack
- ... calculate memory size
- ... debug core dump of stripped tarantool
- ... debug core from different OS
- ... debug Lua state with GDB
- ... generate new bootstrap snapshot
- ... use Address Sanitizer
- ... collect a coredump
Lua modules
Useful links