#include "llex.h"#include "lobject.h"#include "lopcodes.h"#include "lparser.h"Go to the source code of this file.
| #define getcode | ( | fs, | |||
| e | ) | ((fs)->f->code[(e)->info]) |
Definition at line 40 of file lcode.h.
Referenced by discharge2reg(), jumponcond(), luaK_posfix(), luaK_setcallreturns(), and retstat().
| #define luaK_codeAsBx | ( | fs, | |||
| o, | |||||
| A, | |||||
| sBx | ) | luaK_codeABx(fs,o,A,(sBx)+MAXARG_sBx) |
| #define NO_JUMP (-1) |
Definition at line 20 of file lcode.h.
Referenced by block(), enterblock(), forbody(), forlist(), ifstat(), init_exp(), luaK_concat(), luaK_dischargejpc(), luaK_exp2reg(), luaK_fixjump(), luaK_getjump(), luaK_goiffalse(), luaK_goiftrue(), luaK_infix(), luaK_jump(), luaK_patchlistaux(), luaK_posfix(), need_value(), open_func(), and whilestat().
| enum BinOpr |
| void luaK_checkstack | ( | FuncState * | fs, | |
| int | n | |||
| ) |
Definition at line 195 of file lcode.c.
References cast, FuncState::f, FuncState::freereg, FuncState::ls, luaX_syntaxerror(), MAXSTACK, and Proto::maxstacksize.
Referenced by forlist(), and luaK_reserveregs().
| int luaK_code | ( | FuncState * | fs, | |
| Instruction | i, | |||
| int | line | |||
| ) |
Definition at line 729 of file lcode.c.
References Proto::code, FuncState::f, FuncState::L, Proto::lineinfo, luaK_dischargejpc(), luaM_growvector, MAX_INT, FuncState::pc, Proto::sizecode, and Proto::sizelineinfo.
Referenced by luaK_codeABC(), luaK_codeABx(), and whilestat().
Definition at line 744 of file lcode.c.
References CREATE_ABC, getOpMode, iABC, LexState::lastline, FuncState::ls, lua_assert, and luaK_code().
Referenced by breakstat(), close_func(), code_label(), codebinop(), codenot(), constructor(), discharge2reg(), forbody(), fornum(), funcargs(), leaveblock(), luaK_condjump(), luaK_dischargevars(), luaK_nil(), luaK_posfix(), luaK_prefix(), luaK_self(), luaK_storevar(), pushclosure(), recfield(), and retstat().
Definition at line 750 of file lcode.c.
References CREATE_ABx, getOpMode, iABx, iAsBx, LexState::lastline, FuncState::ls, lua_assert, and luaK_code().
Referenced by closelistfield(), discharge2reg(), fornum(), lastlistfield(), luaK_dischargevars(), luaK_storevar(), and pushclosure().
| void luaK_concat | ( | FuncState * | fs, | |
| int * | l1, | |||
| int | l2 | |||
| ) |
Definition at line 181 of file lcode.c.
References luaK_fixjump(), luaK_getjump(), next, and NO_JUMP.
Referenced by breakstat(), ifstat(), luaK_exp2reg(), luaK_goiffalse(), luaK_goiftrue(), luaK_jump(), luaK_patchtohere(), luaK_posfix(), and whilestat().
Definition at line 283 of file lcode.c.
References expdesc::aux, freereg(), expdesc::info, expdesc::k, luaK_codeABC(), luaK_codeABx(), luaK_setcallreturns(), OP_GETGLOBAL, OP_GETTABLE, OP_GETUPVAL, VCALL, VGLOBAL, VINDEXED, VLOCAL, VNONRELOC, VRELOCABLE, and VUPVAL.
Referenced by codenot(), discharge2reg(), luaK_exp2anyreg(), luaK_exp2nextreg(), luaK_exp2val(), luaK_goiffalse(), luaK_goiftrue(), luaK_posfix(), and prefixexp().
Definition at line 406 of file lcode.c.
References hasjumps, expdesc::info, expdesc::k, luaK_dischargevars(), luaK_exp2nextreg(), luaK_exp2reg(), FuncState::nactvar, and VNONRELOC.
Referenced by luaK_exp2RK(), luaK_exp2val(), luaK_prefix(), luaK_self(), luaK_storevar(), luaY_field(), primaryexp(), and retstat().
Definition at line 398 of file lcode.c.
References freeexp(), FuncState::freereg, luaK_dischargevars(), luaK_exp2reg(), and luaK_reserveregs().
Referenced by adjust_assign(), closelistfield(), constructor(), exp1(), explist1(), funcargs(), lastlistfield(), luaK_exp2anyreg(), luaK_infix(), luaK_posfix(), primaryexp(), and retstat().
Definition at line 428 of file lcode.c.
References expdesc::info, expdesc::k, luaK_exp2anyreg(), luaK_exp2val(), MAXARG_C, MAXSTACK, nil_constant(), FuncState::nk, VK, and VNIL.
Referenced by luaK_indexed(), luaK_infix(), luaK_posfix(), luaK_self(), luaK_storevar(), and recfield().
Definition at line 420 of file lcode.c.
References hasjumps, luaK_dischargevars(), and luaK_exp2anyreg().
Referenced by luaK_exp2RK(), luaK_posfix(), luaK_prefix(), and luaY_index().
| void luaK_fixline | ( | FuncState * | fs, | |
| int | line | |||
| ) |
Definition at line 724 of file lcode.c.
References FuncState::f, Proto::lineinfo, and FuncState::pc.
Referenced by forbody(), funcargs(), and funcstat().
| int luaK_getlabel | ( | FuncState * | fs | ) |
Definition at line 78 of file lcode.c.
References FuncState::lasttarget, and FuncState::pc.
Referenced by code_label(), forbody(), luaK_exp2reg(), luaK_patchtohere(), repeatstat(), and whilestat().
Definition at line 548 of file lcode.c.
References expdesc::info, jumponcond(), expdesc::k, luaK_concat(), luaK_dischargevars(), luaK_jump(), NO_JUMP, expdesc::t, VFALSE, VJMP, VNIL, and VTRUE.
Referenced by luaK_infix(), and whilestat().
Definition at line 522 of file lcode.c.
References expdesc::f, expdesc::info, invertjump(), jumponcond(), expdesc::k, luaK_concat(), luaK_dischargevars(), luaK_jump(), NO_JUMP, VFALSE, VJMP, VK, and VTRUE.
Referenced by cond(), and luaK_infix().
Definition at line 608 of file lcode.c.
References expdesc::aux, expdesc::k, luaK_exp2RK(), and VINDEXED.
Referenced by luaY_field(), and primaryexp().
Definition at line 631 of file lcode.c.
References expdesc::f, luaK_exp2nextreg(), luaK_exp2RK(), luaK_goiffalse(), luaK_goiftrue(), luaK_patchtohere(), NO_JUMP, OPR_AND, OPR_CONCAT, OPR_OR, and expdesc::t.
Referenced by subexpr().
| int luaK_jump | ( | FuncState * | fs | ) |
Definition at line 44 of file lcode.c.
References FuncState::jpc, luaK_codeAsBx, luaK_concat(), NO_JUMP, and OP_JMP.
Referenced by breakstat(), forbody(), fornum(), ifstat(), luaK_condjump(), luaK_exp2reg(), luaK_goiffalse(), luaK_goiftrue(), and whilestat().
| void luaK_nil | ( | FuncState * | fs, | |
| int | from, | |||
| int | n | |||
| ) |
Definition at line 28 of file lcode.c.
References Proto::code, FuncState::f, GET_OPCODE, GETARG_A, GETARG_B, FuncState::lasttarget, luaK_codeABC(), OP_LOADNIL, FuncState::pc, and SETARG_B.
Referenced by adjust_assign(), and discharge2reg().
| int luaK_numberK | ( | FuncState * | fs, | |
| lua_Number | r | |||
| ) |
Definition at line 255 of file lcode.c.
References addk(), and setnvalue.
Referenced by fornum(), luaK_prefix(), and simpleexp().
| void luaK_patchlist | ( | FuncState * | fs, | |
| int | list, | |||
| int | target | |||
| ) |
Definition at line 165 of file lcode.c.
References lua_assert, luaK_patchlistaux(), luaK_patchtohere(), NO_REG, and FuncState::pc.
Referenced by forbody(), repeatstat(), and whilestat().
| void luaK_patchtohere | ( | FuncState * | fs, | |
| int | list | |||
| ) |
Definition at line 175 of file lcode.c.
References FuncState::jpc, luaK_concat(), and luaK_getlabel().
Referenced by cond(), forbody(), ifstat(), leaveblock(), luaK_exp2reg(), luaK_infix(), luaK_patchlist(), and whilestat().
Definition at line 680 of file lcode.c.
References expdesc::aux, codebinop(), expdesc::f, freeexp(), GET_OPCODE, GETARG_B, getcode, expdesc::info, expdesc::k, lua_assert, luaK_codeABC(), luaK_concat(), luaK_dischargevars(), luaK_exp2nextreg(), luaK_exp2RK(), luaK_exp2val(), NO_JUMP, OP_CONCAT, OPR_AND, OPR_CONCAT, OPR_OR, SETARG_B, expdesc::t, and VRELOCABLE.
Referenced by subexpr().
Definition at line 614 of file lcode.c.
References codenot(), freeexp(), expdesc::info, expdesc::k, luaK_codeABC(), luaK_exp2anyreg(), luaK_exp2val(), luaK_numberK(), nvalue, OP_UNM, OPR_MINUS, ttisnumber, VK, and VRELOCABLE.
Referenced by subexpr().
| void luaK_reserveregs | ( | FuncState * | fs, | |
| int | n | |||
| ) |
Definition at line 205 of file lcode.c.
References FuncState::freereg, and luaK_checkstack().
Referenced by adjust_assign(), code_params(), discharge2anyreg(), fornum(), localfunc(), luaK_exp2nextreg(), and luaK_self().
Definition at line 482 of file lcode.c.
References freeexp(), FuncState::freereg, CCallS::func, expdesc::info, expdesc::k, luaK_codeABC(), luaK_exp2anyreg(), luaK_exp2RK(), luaK_reserveregs(), OP_SELF, and VNONRELOC.
Referenced by primaryexp().
Definition at line 272 of file lcode.c.
References GETARG_A, getcode, expdesc::info, expdesc::k, SETARG_C, VCALL, and VNONRELOC.
Referenced by adjust_assign(), assignment(), exprstat(), funcargs(), lastlistfield(), luaK_dischargevars(), and retstat().
Definition at line 451 of file lcode.c.
References expdesc::aux, freeexp(), expdesc::info, expdesc::k, lua_assert, luaK_codeABC(), luaK_codeABx(), luaK_exp2anyreg(), luaK_exp2reg(), luaK_exp2RK(), OP_SETGLOBAL, OP_SETTABLE, OP_SETUPVAL, VGLOBAL, VINDEXED, VLOCAL, and VUPVAL.
Referenced by assignment(), funcstat(), and localfunc().
Definition at line 248 of file lcode.c.
References addk(), and setsvalue.
Referenced by codestring(), and singlevaraux().
1.5.2