This is the reference Lua interpreter with the Yk JIT retrofitted.
This is experimental!
GNU make is required.
Run:
export PATH=/path/to/yk/bin:${PATH} # local path to https://github.com/ykjit/yk/blob/master/bin/yk-config (yk needs to be compiled)
export YK_BUILD_TYPE=<debug|release>
make -j "$(nproc)"
LYK_DEBUG
- conditionally compiles debugging functionality for YK integration.
LYK_VERBOSE
- enables verbose logs for YK integration. Used for tracking location allocation and function prototypes in the Lua runtime.
Will only work if yklua is compiled with
LYK_DEBUG
flag.
Example:
LYK_VERBOSE=1 ./src/lua ./fibo.lua
[LYK] yk_new_proto 0x137ee60
[LYK] yk_location_new. 0x137ee60->yklocs[12]=0x1378a60
[LYK] yk_location_drop. 0x137ee60->yklocs[12]=0x1378a60
./src/lua -e "print('Hello World')" # execute program passed in as string
./src/lua ./tests/utf8.lua # execute lua program file
./src/luac ./tests/utf8.lua -o ./utf8.out # translates lua programs into Lua bytecode
Make sure to build the project first.
sh ./test.sh
cd tests # navigate to tests directory
../src/lua -e"_U=true" db.lua # run single file
../src/lua -e"_U=true" all.lua # run complete test suite (Currently failing for non-serialised compilation)
run_docker_ci_job # local path to https://github.com/softdevteam/buildbot_config/blob/master/bin/run_docker_ci_job
Use LYK_VERBOSE
environment variable to print LYK (lua yk) debug logs:
LYK_VERBOSE=1 gdb --batch -ex 'r' -ex 'bt' --args ../src/lua all.lua
LYK_VERBOSE=1 ../src/lua all.lua
LYK_VERBOSE=1 sh ./test.sh
Test | Status (Paralel) | Status (Serialised) | Issue |
---|---|---|---|
api.lua | Working | Working | |
bwcoercion.lua | Working | Working | |
closure.lua | Working | Working | |
code.lua | Working | Working | |
events.lua | Working | Working | |
gengc.lua | Working | Working | |
goto.lua | Working | Working | |
pm.lua | Working | Working | |
tpack.lua | Working | Working | |
tracegc.lua | Working | Working | |
vararg.lua | Working | Working | |
cstack.lua | Working | Working | |
locals.lua | Working | Working | |
files.lua | Failing | Working | issue |
literals.lua | Working | Working | issue |
db.lua | Failing | Working | issue |
attrib.lua | Failing | Working | issue |
bitwise.lua | Failing | Working | issue |
strings.lua | Failing | Working | issue |
calls.lua | Failing | Working | issue |
constructs.lua | Failing | Working | issue |
errors.lua | Failing | Working | issue |
math.lua | Failing | Working | issue |
sort.lua | Failing | Working | issue |
nextvar.lua | Failing | Working | issue |
gc.lua | Failing | Working | issue |
utf8.lua | Failing | Working | issue |
big.lua | Failing | Working | issue |
coroutine.lua | Failing | Working | issue |
heavy.lua | Failing | Working | issue |
verybig.lua | Failing | Working | issue |
main.lua | Failing | Working | issue |
all.lua | Failing | Working | issue |