lua-users home
lua-l archive

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

2013/2/3 Jason Lee <>:

> I am interested in lua vm, and recently start tracing the source v5.2
> after reading some docs such as [1], [2]. However, looks like there
> are changes between different vm version.

The VM opcodes are documented briefly in lopcodes.h. There exists
a long manual of the 5.1 VM by Kein-Hong Man. He has made a list of
5.2 differences that he might be willing to post when he sees this.

Some people (including me) have been working on 5.2 updates of that but
nothing is public yet. The closest is Elijah Frederickson's site, which
has no 5.2 documentation but does have Lua routines for assembling and
disassembling 5.2 bytecode.
Copies of just about all publicly available VM documentation, including
K.-H.M.'s manual, can be found on that site.

> For example, in [1] lua has tag union (TObject?) which seems no longer
> available, only TValue can be found. In addition, the purpose of some
> variables in source is not very clear with its naming style such as
> tt__ in lobject.h.

This has nothing to do with the VM. There are people who can converse
in an informed way on these lowest-level Lua internals. Maybe one of
them could respond.