Luaの命令の例(2)
$ luac -l test.lua
main <test.lua:0,0> (6 instructions at 0x6000014c8080)
0+ params, 2 slots, 1 upvalue, 0 locals, 1 constant, 1 function
1 [1] VARARGPREP 0
2 [3] CLOSURE 0 0 ; 0x6000014c8100
3 [1] SETTABUP 0 0 0 ; _ENV "hello"
4 [5] GETTABUP 0 0 0 ; _ENV "hello"
5 [5] CALL 0 1 1 ; 0 in 0 out
6 [5] RETURN 0 1 1 ; 0 out
function <test.lua:1,3> (4 instructions at 0x6000014c8100)
0 params, 2 slots, 1 upvalue, 0 locals, 1 constant, 0 functions
1 [2] GETTABUP 0 0 0 ; _ENV "print"
2 [2] LOADI 1 3
3 [2] CALL 0 2 1 ; 1 in 0 out
4 [3] RETURN0