luajit-lang-toolkit
luajit-lang-toolkit copied to clipboard
Please add luajit2.1 bytecode
luajit2.1 enable GC64 lj_arch.h #define LJ_FR2 1
The bytecode changes are as follows. Bold is the changing bytecode
test code
local ffi = require("ffi") local a = "12345" local b = "test" print(a,b)
luajit-lang-toolkit
'''lua
luajit run.lua -bl 1.lua
-- BYTECODE -- 1.lua:0-9
0001 GGET 0 0 ; "require"
0002 KSTR 1 1 ; "ffi"
0003 CALL 0 2 2
0004 KSTR 1 2 ; "12345"
0005 KSTR 2 3 ; "test"
0006 GGET 3 4 ; "print"
0007 MOV 4 1
0008 MOV 5 2
0009 CALL 3 1 3
0010 RET0 0 1
'''
luajit
'''lua
luajit -bl 1.lua
-- BYTECODE -- 1.lua:0-9
0001 GGET 0 0 ; "require"
0002 KSTR 2 1 ; "ffi"
0003 CALL 0 2 2
0004 KSTR 1 2 ; "12345"
0005 KSTR 2 3 ; "test"
0006 GGET 3 4 ; "print"
0007 MOV 5 1
0008 MOV 6 2
0009 CALL 3 1 3
0010 RET0 0 1