Opcode

April 30, 2017 ยท View on GitHub

nameargumentdescriptionexampleShowingStackChange
tagused as a tag/label
pop_to_tagpop elements from stack, until pop a tag.
values_shift_to_1[end by a tag]
make sure there has only one value.
a,b = (func()), 2;-- make sure b equals to 2(1) (2)
localdeclare variable(s) in current environment, and init them to default values(nil).local foo; local a, b;
local_initdeclare variable(s) in current environment, and init them to specify values.local a, b = 1, 2, 3
table_getused to access key-value of one specify tabletab["key1"] tab[1 + 2] tab[func()]
table_get_immidentifierused to access key-value of one specify table by immediate stringtab.name tab.socket.port tab._test func().key
table_set_tkttab['key'] ='value';
assign add_assign sub_assign mul_assign div_assigna = b; a += b; a -= b;
addsub, mul, div, and, or, less, greater, less_eql, greater_eql, eql_eql, not_eql are the same.1 + 2
callcall a luax objectfunc() func(a, b) tab[1]() func()()
func_args_initdo the same thing as local_init, but generates a table arguments at the same time.

see opcode.h