Skip to content

Instantly share code, notes, and snippets.

@nefftd
Created September 24, 2014 21:27
Show Gist options
  • Select an option

  • Save nefftd/94f52a35f505779e6288 to your computer and use it in GitHub Desktop.

Select an option

Save nefftd/94f52a35f505779e6288 to your computer and use it in GitHub Desktop.
local function foo()
return foo()
end
local bar; bar = function()
return bar()
end
main <D:\Desktop\test.lua:0,0> (5 instructions at 0000000000898070)
0+ params, 3 slots, 1 upvalue, 2 locals, 0 constants, 2 functions
1 [5] CLOSURE 0 0 ; 00000000008982B0
2 [7] LOADNIL 1 0
3 [9] CLOSURE 2 1 ; 0000000000898510
4 [9] MOVE 1 2
5 [9] RETURN 0 1
function <D:\Desktop\test.lua:3,5> (4 instructions at 00000000008982B0)
0 params, 2 slots, 1 upvalue, 0 locals, 0 constants, 0 functions
1 [4] GETUPVAL 0 0 ; foo
2 [4] TAILCALL 0 1 0
3 [4] RETURN 0 0
4 [5] RETURN 0 1
function <D:\Desktop\test.lua:7,9> (4 instructions at 0000000000898510)
0 params, 2 slots, 1 upvalue, 0 locals, 0 constants, 0 functions
1 [8] GETUPVAL 0 0 ; bar
2 [8] TAILCALL 0 1 0
3 [8] RETURN 0 0
4 [9] RETURN 0 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment