lua-users home
lua-l archive

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


Hi,

Luiz Henrique de Figueiredo wrote:
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?

More or less, except I wanted to see *all* the details of a binary chunk. I found that seeing the entire picture helps a bit more, being new to the internals of Lua. I'll probably tweak the code disassembly comments to make them a bit more verbose.

[snip] On the other hand, it's tied to a fixed
Lua version, because the format of precompiled chunks usually change with each
new version.

Can't be helped; it is meant to process binary chunks, after all. Anyway, I guess differentiating between versions is what the version byte in binary chunks is for, so it's a matter of support.

I think we're lacking an assembler, at least for the sake of completeness.

I've heard of a Lua assembler called luas from searching the mail archives, and I've looked at Zed Shaw's notes, but the luas author's site seems to be missing and I couldn't find anything relevant anywhere.

[snip] 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.

I guess these are more or less educational tools. I have also just added an interactive mode to my disassembler script, for exploration and for instant feedback on very short snippets.

--
Cheers,
Kein-Hong Man (esq.)
Kuala Lumpur, Malaysia