Welcome to Ravi Programming Language’s documentation!¶
Contents:
- Ravi Programming Language
- Ravi Extensions to Lua 5.3
- Build Ravi with Eclipse OMR JIT
- Building Ravi with LLVM JIT backend
- Introduction to Lua
- Introduction
- Key Features of Lua
- Lua versions matter
- Lua is dynamically typed
- Variables are global unless declared local
- The ‘table’ type
- Functions are values stored in variables
- Globals are just values in a special table
- Functions in Lua are closures
- Lua functions can return multiple values
- Lua has integer and floating point numeric types
- A special
nil
value represents non-existent value - Any value that is not
false
ornil
is true - Logical
and
and logicalor
select one of the values '~='
is not equals operator and'..'
is string concatenation operator- Lua has some nice syntactic sugar for tables and functions
- A Lua script is called a chunk - and is the unit of compilation in Lua
- The Lua stack is a heap allocated structure
- Lua functions can be yielded from and resumed later
- Lua’s error handling is based on C setjmp/longjmp
- Lua is single threaded but each OS thread can be given its own Lua VM
- Lua has a meta mechanism that enables a DIY class / object system
- Lua 5.3 Bytecode Reference
- Lua Stack and Registers
- Instruction Notation
- Instruction Summary
- OP_CALL instruction
- OP_TAILCALL instruction
- OP_RETURN instruction
- OP_JMP instruction
- OP_VARARG instruction
- OP_LOADBOOL instruction
- OP_EQ, OP_LT and OP_LE Instructions
- OP_TEST and OP_TESTSET instructions
- OP_FORPREP and OP_FORLOOP instructions
- OP_TFORCALL and OP_TFORLOOP instructions
- OP_CLOSURE instruction
- OP_GETUPVAL and OP_SETUPVAL instructions
- OP_NEWTABLE instruction
- OP_SETLIST instruction
- OP_GETTABLE and OP_SETTABLE instructions
- OP_SELF instruction
- OP_GETTABUP and OP_SETTABUP instructions
- OP_CONCAT instruction
- OP_LEN instruction
- OP_MOVE instruction
- OP_LOADNIL instruction
- OP_LOADK instruction
- Binary operators
- Unary operators
- Lua Parsing and Code Generation Internals
- Ravi Parsing and ByteCode Implementation Details
- LLVM Compilation hooks in Ravi
- Lua Types in LLVM
- LLVM Type Based Alias Analysis
- LLVM Bindings for Lua/Ravi
- Ravi Performance Benchmarks
- Ravi JIT Compilation Status