Skip to content

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

Pre-release
Pre-release
Compare
Choose a tag to compare
@dibyendumajumdar dibyendumajumdar released this 01 Jan 02:44
· 1481 commits to master since this release

The principal change in this release is the addition of type assertion operators to the language. A type assertion operator behaves like a unary operator. It is introduced by the '@' symbol, after which a supported type must be given followed by the expression whose type is being asserted. The result of the expression then becomes of the asserted type. Example:

  local t = { 1,2,3 }
  local i: integer = @integer( t[1] )

Without the type assertion operator @integer above the compiler would not allow the assignment of t[1] to the variable i.

The type assertion operators do nothing if an expression is already known to be of the required type. If the variable is not known to be of the required type then special bytecodes are generated that perform run-time checks on the expression's type; an error is thrown if the type check fails.

Build Info

  • On Windows this release was tested against LLVM 3.7.1, in 64-bit and 32-bit mode. The Windows builds have 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.

The 32-bit build on Windows fails to correctly perform bitwise operations when statically typed local variables are used (issue #74).

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.