-
Notifications
You must be signed in to change notification settings - Fork 388
LuaJIT guide
Sergey Kaplun edited this page Sep 6, 2023
·
4 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
- C coding guidelines ↗
- Lua coding guidelines ↗
- Python coding guidelines ↗
- Maintainer's guide
- Debugging
Architecture
- Server architecture
- R tree index quick start and usage
- LuaJIT
- Vinyl
- Vinyl Architecture
- Vinyl Disk Layout
- Vinyl math
- Vinyl Cookbook
- Bullet1
- SQL
- Appserver modules
- Testing
- Performance
- Privileges and Access control
How To ...?
- ... configure build system
- ... 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 fuzzer
- ... generate new bootstrap snapshot
- ... use Address Sanitizer
- ... collect a coredump
- ... generate luacov report for builtin module
- ... verify modified lua files via luacheck
- ... verify Lua files in third_party?
- ... rerun failed jobs
- ... update a third party repository
- Fix wrong decimal indexing after upgrade to 2.10.1
- Caveats when upgrading a cluster on Tarantool 1.6
- Fix illegal field type in a space format when upgrading to 2.10.4
Useful links