Re: how to read the source codes of luajit?

  • From: Cosmin Apreutesei <cosmin.apreutesei@xxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Sun, 28 Jun 2015 18:03:15 +0300

Tumbleweed moment? :) Well, I guess someone would have to do the
groking and put it online like Peter Cawley did for DynASM except this
time it's much more involved. I've seen people blogging about it but
nothing beyond a few days of analysis. I did this too for a week and I
soon realized that I had so many notes for just a few days that it
would be a waste not to share the results if I would to continue, so I
started looking for the closest thing to a "groking platform". I
figured this needs to be a mix of wiki with source code browsing with
cross-referencing between code and wiki, but couldn't find anything.
Couldn't even find a C parser that keeps preprocessor info (google's
kythe might have one) and luajit has many macros (a dynasm parser
would be needed too). Anyway, that's the easy part. The hard part I
think is making a test suite that exercises parts of the code in
isolation so that you can see the data because the real story is in
the state not in the code. Until someone starts a project like that
and puts some love into it, it's every man for himself :)

Some links:

http://wiki.luajit.org/Home#LuaJIT-Internals
http://lua-users.org/lists/lua-l/2009-11/msg00089.html
https://pwparchive.wordpress.com/2012/10/16/peeking-inside-luajit/
https://luapower.com/files/htags/luajit/

Other related posts: