[ANN] luajit language toolkit news

  • From: Francesco Abbate <francesco.bbt@xxxxxxxxx>
  • To: luajit <luajit@xxxxxxxxxxxxx>
  • Date: Fri, 19 Dec 2014 23:52:23 +0100

Hi all,

this is mainly un update about some improvements I've recently made in
the LuaJIT Language Toolkit.

For those who doesn't know about the project, the LuaJIT Language
Toolkit is an implementation of the Lua programming language written
in Lua iself. It works by generating a LuaJIT's bytecode including the
debug informations and use the LuaJIT's virtual machine to run the
generated bytecode.

The parser generate an AST tree for the whole program and a separate
bytecode genrator module emit the bytecode taking the AST tree as
input. The purpose of the language toolkit is to provide a starting
point to implement a programming language that target the LuaJIT
virtual machine.

The github page for the project is:

https://github.com/franko/luajit-lang-toolkit

Here the NEWS about the project.

- the debug information included in the bytecode are now accurate and
in most case identical to those generated by luajit itself
- I've added a new option, -bx, to dump the bytecode with side-by-side
annotations. This option is very useful to debug the generated
bytecode and more generally to inspect any bytecode.
- I have fixed a number of problems in the bytecode generator with the
help of the author of OctaScript. The most important fix was a problem
with base register operand in JUMP instructions.
- I have added a "luajit-x" executable that works like the luajit
executable but use the language toolkit toolchain to execute the code.
The executable override also the standard package.loader and the
functions loadstring, dofile and loadfile.

The language toolkit was already using a test suite to verify the
correctness of the generated bytecode. With the new changes the test
suite was significantly enlarged to cover some corner cases and
language features.

As a result the language toolkit is now much more reliable and it can
execute without problems even very complex projects. In particular the
language toolkit is now able to execute itself so this is a sort of
milestone.

Yet the project should be still considered as beta quality so be
careful if you decide to use it.

As far as I know OctaScript is now based on the language toolkit but
for the moment no other languages are using it. I'm personally
planning to use the language toolkit in the next release of gsl shell.

In any case, if you have always dreamed of changing the Lua language
now you can and it is easy! :-)

Francesco

Other related posts:

  • » [ANN] luajit language toolkit news - Francesco Abbate