Skip to content

Ravi (a Lua 5.3 dialect) Alpha Release 0.11 with LLVM and libgccjit JIT compilation support

Pre-release
Pre-release
Compare
Choose a tag to compare
@dibyendumajumdar dibyendumajumdar released this 15 Nov 00:57
· 1535 commits to master since this release

In this release there are following changes:

  • It is now possible to annotate local variables and function parameters as 'table' type. This helps the compiler generate specialized bytecodes when the key is known to be an integer or a string literal. As a result the JIT code generator is able to generate more efficient code. There are no benchmarks as yet to assess the performance improvements.

    NOTE: A bug has been found in the implementation - metamethods will not be invoked (issue #73)

  • Locals that are declared as 'table', 'integer[]' or 'number[]' must now be initialized; uninitialized locals were causing segmentation faults in the JITed code as the JIT compiler does not generate null checks.

  • A bug related to type checking of assignments was fixed.

  • A null JIT implementation was added - this is now the default build option. That is, by default the JIT compiler is not built; to enable the JIT compiler you have to explicitly supply -DLLVM_JIT=ON or -DGCC_JIT=ON options to cmake.

  • As LLVM generated code in 64-bit Windows still cannot handle longjmps properly, fixes were implemented to allow generation of 32-bit binaries; performance of the 32-binary is degraded compared to 64-bit.

Build Info

  • On Windows this release was tested against LLVM 3.7.0, in 64-bit and 32-bit mode. The 64-bit build has known issues as stated below.
  • On Linux the build was tested against LLVM 3.7.0 and libgccjit 5.2.
  • On Mac OSX the build was tested against LLVM 3.7.0.

Known Issues

Please refer to the logged issues for known problems. In particular on Windows platforms the 64-bit JIT code does not handle longjmp/setjmp reliably due to limitations in LLVM 64-bit code generation on Windows. For details please refer to issue #30. As a workaround I am supplying 32-bit binaries for the Windows platform until the issue is resolved.

Please also refer to the Ravi documentation for a list of known differences between JIT mode and interpreted mode, and compatibility with Lua 5.3.