lua-users home
lua-l archive

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

> A detailed assembler-style listing is generated.

Thanks for a nice tool. But, except for merging source code, that's
essentially what "luac -l" does, right?

Of course, being a Lua script allows you to customize the output and also to
process binaries chunks in other ways. On the other hand, it's tied to a fixed
Lua version, because the format of precompiled chunks usually change with each
new version.

I think we're lacking an assembler, at least for the sake of completeness.
The caveats about changing versions are even much stronger in this case, but
I've been toying with a module for luac that reads luac listings and builds
functions from those. A kind of raw assembler. I'm not sure though how useful
that would be, except for the fun of poking into precompiled chunks.

Perhaps what would be useful is a Lua library that packs and unpacks bytecode.
It would be an inside-information library, in the spirit of my ltokens library,
to resue Lua internal modules and guarantee consistency. It would not solve
the version problem, but it'd make it easier to cope with.