Go to the source code of this file.
Macros | |
#define | NO_JUMP (-1) |
#define | getcode(fs, e) ((fs)->f->code[(e)->u.info]) |
#define | luaK_codeAsBx(fs, o, A, sBx) luaK_codeABx(fs,o,A,(sBx)+MAXARG_sBx) |
#define | luaK_setmultret(fs, e) luaK_setreturns(fs, e, LUA_MULTRET) |
#define | luaK_jumpto(fs, t) luaK_patchlist(fs, luaK_jump(fs), t) |
Typedefs | |
typedef enum BinOpr | BinOpr |
typedef enum UnOpr | UnOpr |
Enumerations | |
enum | BinOpr { OPR_ADD, OPR_SUB, OPR_MUL, OPR_DIV, OPR_MOD, OPR_POW, OPR_CONCAT, OPR_EQ, OPR_LT, OPR_LE, OPR_NE, OPR_GT, OPR_GE, OPR_AND, OPR_OR, OPR_NOBINOPR } |
enum | UnOpr { OPR_MINUS, OPR_NOT, OPR_LEN, OPR_NOUNOPR } |
Definition at line 38 of file lcode.h.
Referenced by discharge2reg(), exprstat(), jumponcond(), luaK_posfix(), luaK_setoneret(), luaK_setreturns(), and retstat().
#define luaK_codeAsBx | ( | fs, | |
o, | |||
A, | |||
sBx | |||
) | luaK_codeABx(fs,o,A,(sBx)+MAXARG_sBx) |
Definition at line 40 of file lcode.h.
Referenced by forbody(), and luaK_jump().
#define luaK_jumpto | ( | fs, | |
t | |||
) | luaK_patchlist(fs, luaK_jump(fs), t) |
Definition at line 44 of file lcode.h.
Referenced by whilestat().
#define luaK_setmultret | ( | fs, | |
e | |||
) | luaK_setreturns(fs, e, LUA_MULTRET) |
Definition at line 42 of file lcode.h.
Referenced by funcargs(), lastlistfield(), and retstat().
#define NO_JUMP (-1) |
Definition at line 19 of file lcode.h.
Referenced by dischargejpc(), exp2reg(), fixjump(), forbody(), getjump(), ifstat(), init_exp(), isnumeral(), luaK_concat(), luaK_goiffalse(), luaK_goiftrue(), luaK_jump(), luaK_patchclose(), luaK_posfix(), luaK_prefix(), need_value(), open_func(), patchlistaux(), and removevalues().
enum BinOpr |
Definition at line 260 of file lcode.cpp.
References cast_byte, FuncState::f, FuncState::freereg, FuncState::ls, luaX_syntaxerror(), MAXSTACK, and Proto::maxstacksize.
Referenced by forlist(), and luaK_reserveregs().
Definition at line 226 of file lcode.cpp.
References CREATE_ABC, getBMode, getCMode, getOpMode, iABC, lua_assert, luaK_code(), MAXARG_A, MAXARG_B, MAXARG_C, and OpArgN.
Referenced by check_conflict(), code_label(), codearith(), codenot(), condjump(), constructor(), discharge2reg(), forbody(), funcargs(), luaK_dischargevars(), luaK_nil(), luaK_ret(), luaK_self(), luaK_setlist(), luaK_storevar(), recfield(), and simpleexp().
Definition at line 235 of file lcode.cpp.
References CREATE_ABx, getCMode, getOpMode, iABx, iAsBx, lua_assert, luaK_code(), MAXARG_A, MAXARG_Bx, and OpArgN.
Referenced by codeclosure(), and luaK_codek().
Definition at line 249 of file lcode.cpp.
References codeextraarg(), luaK_codeABx(), MAXARG_Bx, OP_LOADK, and OP_LOADKX.
Referenced by discharge2reg(), and fornum().
Definition at line 197 of file lcode.cpp.
References fixjump(), getjump(), next, and NO_JUMP.
Referenced by exp2reg(), luaK_goiffalse(), luaK_goiftrue(), luaK_jump(), luaK_patchtohere(), luaK_posfix(), and test_then_block().
Definition at line 382 of file lcode.cpp.
References freereg(), expdesc::ind, expdesc::info, expdesc::k, luaK_codeABC(), luaK_setoneret(), OP_GETTABLE, OP_GETTABUP, OP_GETUPVAL, expdesc::u, VCALL, VINDEXED, VLOCAL, VNONRELOC, VRELOCABLE, VUPVAL, and VVARARG.
Referenced by codenot(), discharge2reg(), luaK_exp2anyreg(), luaK_exp2nextreg(), luaK_exp2val(), luaK_goiffalse(), luaK_goiftrue(), luaK_posfix(), and primaryexp().
Definition at line 499 of file lcode.cpp.
References exp2reg(), hasjumps, expdesc::info, expdesc::k, luaK_dischargevars(), luaK_exp2nextreg(), FuncState::nactvar, expdesc::u, and VNONRELOC.
Referenced by luaK_exp2anyregup(), luaK_exp2RK(), luaK_exp2val(), luaK_prefix(), luaK_self(), luaK_storevar(), and retstat().
Definition at line 513 of file lcode.cpp.
References hasjumps, expdesc::k, luaK_exp2anyreg(), and VUPVAL.
Referenced by fieldsel(), and suffixedexp().
Definition at line 491 of file lcode.cpp.
References exp2reg(), freeexp(), FuncState::freereg, luaK_dischargevars(), and luaK_reserveregs().
Referenced by adjust_assign(), closelistfield(), codeclosure(), constructor(), exp1(), explist(), funcargs(), lastlistfield(), luaK_exp2anyreg(), luaK_infix(), luaK_posfix(), retstat(), and suffixedexp().
Definition at line 527 of file lcode.cpp.
References boolK(), expdesc::info, expdesc::k, luaK_exp2anyreg(), luaK_exp2val(), luaK_numberK(), MAXINDEXRK, nilK(), FuncState::nk, expdesc::nval, RKASK, expdesc::u, VFALSE, VK, VKNUM, VNIL, and VTRUE.
Referenced by codearith(), codecomp(), luaK_indexed(), luaK_infix(), luaK_self(), luaK_storevar(), and recfield().
Definition at line 519 of file lcode.cpp.
References hasjumps, luaK_dischargevars(), and luaK_exp2anyreg().
Referenced by luaK_exp2RK(), luaK_posfix(), and yindex().
Definition at line 861 of file lcode.cpp.
References FuncState::f, Proto::lineinfo, and FuncState::pc.
Referenced by codearith(), forbody(), funcargs(), and funcstat().
Definition at line 93 of file lcode.cpp.
References FuncState::lasttarget, and FuncState::pc.
Referenced by code_label(), exp2reg(), luaK_patchtohere(), repeatstat(), and whilestat().
Definition at line 644 of file lcode.cpp.
References expdesc::f, expdesc::info, jumponcond(), expdesc::k, luaK_concat(), luaK_dischargevars(), luaK_patchtohere(), NO_JUMP, expdesc::t, expdesc::u, VFALSE, VJMP, and VNIL.
Referenced by luaK_infix(), and test_then_block().
Definition at line 620 of file lcode.cpp.
References expdesc::f, expdesc::info, invertjump(), jumponcond(), expdesc::k, luaK_concat(), luaK_dischargevars(), luaK_patchtohere(), NO_JUMP, expdesc::t, expdesc::u, VJMP, VK, VKNUM, and VTRUE.
Referenced by cond(), luaK_infix(), and test_then_block().
Definition at line 702 of file lcode.cpp.
References check_exp, hasjumps, expdesc::ind, expdesc::info, expdesc::k, lua_assert, luaK_exp2RK(), expdesc::u, VINDEXED, vkisinreg, VLOCAL, and VUPVAL.
Referenced by fieldsel(), singlevar(), and suffixedexp().
Definition at line 785 of file lcode.cpp.
References isnumeral(), luaK_exp2nextreg(), luaK_exp2RK(), luaK_goiffalse(), luaK_goiftrue(), OPR_ADD, OPR_AND, OPR_CONCAT, OPR_DIV, OPR_MOD, OPR_MUL, OPR_OR, OPR_POW, and OPR_SUB.
Referenced by subexpr().
Definition at line 58 of file lcode.cpp.
References FuncState::jpc, luaK_codeAsBx, luaK_concat(), NO_JUMP, and OP_JMP.
Referenced by condjump(), exp2reg(), forbody(), leaveblock(), statement(), and test_then_block().
Definition at line 36 of file lcode.cpp.
References Proto::code, FuncState::f, GET_OPCODE, GETARG_A, GETARG_B, FuncState::lasttarget, luaK_codeABC(), OP_LOADNIL, FuncState::pc, SETARG_A, and SETARG_B.
Referenced by adjust_assign(), and discharge2reg().
LUAI_FUNC int luaK_numberK | ( | FuncState * | fs, |
lua_Number | r | ||
) |
Definition at line 325 of file lcode.cpp.
References addk(), LexState::L, FuncState::ls, luaS_newlstr(), setnvalue, setsvalue, and lua_State::top.
Referenced by discharge2reg(), fornum(), and luaK_exp2RK().
Definition at line 178 of file lcode.cpp.
References Proto::code, FuncState::f, GET_OPCODE, GETARG_A, getjump(), lua_assert, next, NO_JUMP, OP_JMP, and SETARG_A.
Referenced by findlabel(), leaveblock(), movegotosout(), and repeatstat().
Definition at line 168 of file lcode.cpp.
References lua_assert, luaK_patchtohere(), NO_REG, patchlistaux(), and FuncState::pc.
Referenced by closegoto(), forbody(), and repeatstat().
Definition at line 191 of file lcode.cpp.
References FuncState::jpc, luaK_concat(), and luaK_getlabel().
Referenced by exp2reg(), forbody(), ifstat(), leaveblock(), luaK_goiffalse(), luaK_goiftrue(), luaK_patchlist(), test_then_block(), and whilestat().
Definition at line 812 of file lcode.cpp.
References cast, codearith(), codecomp(), expdesc::f, freeexp(), GET_OPCODE, GETARG_B, getcode, expdesc::info, expdesc::k, lua_assert, luaK_concat(), luaK_dischargevars(), luaK_exp2nextreg(), luaK_exp2val(), NO_JUMP, OP_ADD, OP_CONCAT, OP_EQ, OPR_ADD, OPR_AND, OPR_CONCAT, OPR_DIV, OPR_EQ, OPR_GE, OPR_GT, OPR_LE, OPR_LT, OPR_MOD, OPR_MUL, OPR_NE, OPR_OR, OPR_POW, OPR_SUB, SETARG_B, expdesc::t, expdesc::u, and VRELOCABLE.
Referenced by subexpr().
Definition at line 761 of file lcode.cpp.
References codearith(), codenot(), expdesc::f, isnumeral(), expdesc::k, lua_assert, luaK_exp2anyreg(), NO_JUMP, expdesc::nval, OP_LEN, OP_UNM, OPR_LEN, OPR_MINUS, OPR_NOT, expdesc::t, expdesc::u, and VKNUM.
Referenced by subexpr().
Definition at line 270 of file lcode.cpp.
References FuncState::freereg, and luaK_checkstack().
Referenced by adjust_assign(), check_conflict(), discharge2anyreg(), forbody(), fornum(), luaK_exp2nextreg(), luaK_self(), luaK_setreturns(), and parlist().
Definition at line 68 of file lcode.cpp.
References luaK_codeABC(), and OP_RETURN.
Referenced by close_func(), and retstat().
Definition at line 584 of file lcode.cpp.
References freeexp(), FuncState::freereg, expdesc::info, expdesc::k, luaK_codeABC(), luaK_exp2anyreg(), luaK_exp2RK(), luaK_reserveregs(), OP_SELF, expdesc::u, and VNONRELOC.
Referenced by suffixedexp().
Definition at line 866 of file lcode.cpp.
References codeextraarg(), FuncState::freereg, LFIELDS_PER_FLUSH, FuncState::ls, lua_assert, LUA_MULTRET, luaK_codeABC(), luaX_syntaxerror(), MAXARG_Ax, MAXARG_C, and OP_SETLIST.
Referenced by closelistfield(), and lastlistfield().
Definition at line 370 of file lcode.cpp.
References GETARG_A, getcode, expdesc::info, expdesc::k, SETARG_B, expdesc::u, VCALL, VNONRELOC, VRELOCABLE, and VVARARG.
Referenced by assignment(), and luaK_dischargevars().
Definition at line 358 of file lcode.cpp.
References FuncState::freereg, getcode, expdesc::k, luaK_reserveregs(), SETARG_A, SETARG_B, SETARG_C, VCALL, and VVARARG.
Referenced by adjust_assign().
Definition at line 557 of file lcode.cpp.
References e, exp2reg(), freeexp(), expdesc::ind, expdesc::info, expdesc::k, lua_assert, luaK_codeABC(), luaK_exp2anyreg(), luaK_exp2RK(), OP_SETTABLE, OP_SETTABUP, OP_SETUPVAL, expdesc::u, VINDEXED, VLOCAL, and VUPVAL.
Referenced by assignment(), and funcstat().
Definition at line 318 of file lcode.cpp.
References addk(), LexState::L, FuncState::ls, and setsvalue.
Referenced by codestring().