Skip to content

Instantly share code, notes, and snippets.

@ToxicFrog
Created March 9, 2012 07:07
Show Gist options
  • Save ToxicFrog/2005415 to your computer and use it in GitHub Desktop.
Save ToxicFrog/2005415 to your computer and use it in GitHub Desktop.
-- function f() return foo.bar[1] end
function <stdin:1,1> (5 instructions, 20 bytes at 0x1e19410)
0 params, 2 slots, 0 upvalues, 0 locals, 3 constants, 0 functions
1 [1] GETGLOBAL 0 -1 ; foo
2 [1] GETTABLE 0 0 -2 ; "bar"
3 [1] GETTABLE 0 0 -3 ; 1
4 [1] RETURN 0 2
5 [1] RETURN 0 1
-- function g() return foo[1] end
function <stdin:2,2> (4 instructions, 16 bytes at 0x1e196e0)
0 params, 2 slots, 0 upvalues, 0 locals, 2 constants, 0 functions
1 [2] GETGLOBAL 0 -1 ; foo
2 [2] GETTABLE 0 0 -2 ; 1
3 [2] RETURN 0 2
4 [2] RETURN 0 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment