Github User Fetcher 1.0.0
C Application with Server and GUI
|
#include "lprefix.h"
#include <limits.h>
#include <math.h>
#include <stdlib.h>
#include "lua.h"
#include "lcode.h"
#include "ldebug.h"
#include "ldo.h"
#include "lgc.h"
#include "llex.h"
#include "lmem.h"
#include "lobject.h"
#include "lopcodes.h"
#include "lparser.h"
#include "lstring.h"
#include "ltable.h"
#include "lvm.h"
Go to the source code of this file.
Macros | |
#define | lcode_c |
#define | LUA_CORE |
#define | MAXREGS 255 |
#define | hasjumps(e) ((e)->t != (e)->f) |
#define | LIMLINEDIFF 0x80 |
Functions | |
static int | codesJ (FuncState *fs, OpCode o, int sj, int k) |
l_noret | luaK_semerror (LexState *ls, const char *msg) |
static int | tonumeral (const expdesc *e, TValue *v) |
static TValue * | const2val (FuncState *fs, const expdesc *e) |
int | luaK_exp2const (FuncState *fs, const expdesc *e, TValue *v) |
static Instruction * | previousinstruction (FuncState *fs) |
void | luaK_nil (FuncState *fs, int from, int n) |
static int | getjump (FuncState *fs, int pc) |
static void | fixjump (FuncState *fs, int pc, int dest) |
void | luaK_concat (FuncState *fs, int *l1, int l2) |
int | luaK_jump (FuncState *fs) |
void | luaK_ret (FuncState *fs, int first, int nret) |
static int | condjump (FuncState *fs, OpCode op, int A, int B, int C, int k) |
int | luaK_getlabel (FuncState *fs) |
static Instruction * | getjumpcontrol (FuncState *fs, int pc) |
static int | patchtestreg (FuncState *fs, int node, int reg) |
static void | removevalues (FuncState *fs, int list) |
static void | patchlistaux (FuncState *fs, int list, int vtarget, int reg, int dtarget) |
void | luaK_patchlist (FuncState *fs, int list, int target) |
void | luaK_patchtohere (FuncState *fs, int list) |
static void | savelineinfo (FuncState *fs, Proto *f, int line) |
static void | removelastlineinfo (FuncState *fs) |
static void | removelastinstruction (FuncState *fs) |
int | luaK_code (FuncState *fs, Instruction i) |
int | luaK_codeABCk (FuncState *fs, OpCode o, int a, int b, int c, int k) |
int | luaK_codeABx (FuncState *fs, OpCode o, int a, unsigned int bc) |
int | luaK_codeAsBx (FuncState *fs, OpCode o, int a, int bc) |
static int | codeextraarg (FuncState *fs, int a) |
static int | luaK_codek (FuncState *fs, int reg, int k) |
void | luaK_checkstack (FuncState *fs, int n) |
void | luaK_reserveregs (FuncState *fs, int n) |
static void | freereg (FuncState *fs, int reg) |
static void | freeregs (FuncState *fs, int r1, int r2) |
static void | freeexp (FuncState *fs, expdesc *e) |
static void | freeexps (FuncState *fs, expdesc *e1, expdesc *e2) |
static int | addk (FuncState *fs, TValue *key, TValue *v) |
static int | stringK (FuncState *fs, TString *s) |
static int | luaK_intK (FuncState *fs, lua_Integer n) |
static int | luaK_numberK (FuncState *fs, lua_Number r) |
static int | boolF (FuncState *fs) |
static int | boolT (FuncState *fs) |
static int | nilK (FuncState *fs) |
static int | fitsC (lua_Integer i) |
static int | fitsBx (lua_Integer i) |
void | luaK_int (FuncState *fs, int reg, lua_Integer i) |
static void | luaK_float (FuncState *fs, int reg, lua_Number f) |
static void | const2exp (TValue *v, expdesc *e) |
void | luaK_setreturns (FuncState *fs, expdesc *e, int nresults) |
static void | str2K (FuncState *fs, expdesc *e) |
void | luaK_setoneret (FuncState *fs, expdesc *e) |
void | luaK_dischargevars (FuncState *fs, expdesc *e) |
static void | discharge2reg (FuncState *fs, expdesc *e, int reg) |
static void | discharge2anyreg (FuncState *fs, expdesc *e) |
static int | code_loadbool (FuncState *fs, int A, OpCode op) |
static int | need_value (FuncState *fs, int list) |
static void | exp2reg (FuncState *fs, expdesc *e, int reg) |
void | luaK_exp2nextreg (FuncState *fs, expdesc *e) |
int | luaK_exp2anyreg (FuncState *fs, expdesc *e) |
void | luaK_exp2anyregup (FuncState *fs, expdesc *e) |
void | luaK_exp2val (FuncState *fs, expdesc *e) |
static int | luaK_exp2K (FuncState *fs, expdesc *e) |
int | luaK_exp2RK (FuncState *fs, expdesc *e) |
static void | codeABRK (FuncState *fs, OpCode o, int a, int b, expdesc *ec) |
void | luaK_storevar (FuncState *fs, expdesc *var, expdesc *ex) |
void | luaK_self (FuncState *fs, expdesc *e, expdesc *key) |
static void | negatecondition (FuncState *fs, expdesc *e) |
static int | jumponcond (FuncState *fs, expdesc *e, int cond) |
void | luaK_goiftrue (FuncState *fs, expdesc *e) |
void | luaK_goiffalse (FuncState *fs, expdesc *e) |
static void | codenot (FuncState *fs, expdesc *e) |
static int | isKstr (FuncState *fs, expdesc *e) |
int | luaK_isKint (expdesc *e) |
static int | isCint (expdesc *e) |
static int | isSCint (expdesc *e) |
static int | isSCnumber (expdesc *e, int *pi, int *isfloat) |
void | luaK_indexed (FuncState *fs, expdesc *t, expdesc *k) |
static int | validop (int op, TValue *v1, TValue *v2) |
static int | constfolding (FuncState *fs, int op, expdesc *e1, const expdesc *e2) |
static void | codeunexpval (FuncState *fs, OpCode op, expdesc *e, int line) |
static void | finishbinexpval (FuncState *fs, expdesc *e1, expdesc *e2, OpCode op, int v2, int flip, int line, OpCode mmop, TMS event) |
static void | codebinexpval (FuncState *fs, OpCode op, expdesc *e1, expdesc *e2, int line) |
static void | codebini (FuncState *fs, OpCode op, expdesc *e1, expdesc *e2, int flip, int line, TMS event) |
static int | finishbinexpneg (FuncState *fs, expdesc *e1, expdesc *e2, OpCode op, int line, TMS event) |
static void | swapexps (expdesc *e1, expdesc *e2) |
static void | codearith (FuncState *fs, BinOpr opr, expdesc *e1, expdesc *e2, int flip, int line) |
static void | codecommutative (FuncState *fs, BinOpr op, expdesc *e1, expdesc *e2, int line) |
static void | codebitwise (FuncState *fs, BinOpr opr, expdesc *e1, expdesc *e2, int line) |
static void | codeorder (FuncState *fs, OpCode op, expdesc *e1, expdesc *e2) |
static void | codeeq (FuncState *fs, BinOpr opr, expdesc *e1, expdesc *e2) |
void | luaK_prefix (FuncState *fs, UnOpr op, expdesc *e, int line) |
void | luaK_infix (FuncState *fs, BinOpr op, expdesc *v) |
static void | codeconcat (FuncState *fs, expdesc *e1, expdesc *e2, int line) |
void | luaK_posfix (FuncState *fs, BinOpr opr, expdesc *e1, expdesc *e2, int line) |
void | luaK_fixline (FuncState *fs, int line) |
void | luaK_settablesize (FuncState *fs, int pc, int ra, int asize, int hsize) |
void | luaK_setlist (FuncState *fs, int base, int nelems, int tostore) |
static int | finaltarget (Instruction *code, int i) |
void | luaK_finish (FuncState *fs) |
#define hasjumps | ( | e | ) | ((e)->t != (e)->f) |
Definition at line 37 of file lua-5.4.3/src/lcode.c.
Referenced by exp2reg(), isKstr(), isSCnumber(), luaK_exp2anyreg(), luaK_exp2anyregup(), luaK_exp2const(), luaK_exp2K(), luaK_exp2val(), luaK_indexed(), luaK_isKint(), and tonumeral().
#define lcode_c |
Definition at line 7 of file lua-5.4.3/src/lcode.c.
#define LIMLINEDIFF 0x80 |
Definition at line 318 of file lua-5.4.3/src/lcode.c.
Referenced by savelineinfo().
#define LUA_CORE |
Definition at line 8 of file lua-5.4.3/src/lcode.c.
#define MAXREGS 255 |
Definition at line 34 of file lua-5.4.3/src/lcode.c.
Referenced by luaK_checkstack().
Definition at line 542 of file lua-5.4.3/src/lcode.c.
References cast_int, FuncState::f, LexState::h, ivalue, Proto::k, LexState::L, FuncState::ls, luaC_barrier, luaH_finishset(), luaH_get(), luaM_growvector, luaV_rawequalobj, MAXARG_Ax, FuncState::nk, setivalue, setnilvalue, setobj, Proto::sizek, ttisinteger, and ttypetag.
Referenced by boolF(), boolT(), luaK_intK(), luaK_numberK(), nilK(), and stringK().
|
static |
Definition at line 607 of file lua-5.4.3/src/lcode.c.
References addk(), and setbfvalue.
Referenced by luaK_exp2K().
|
static |
Definition at line 617 of file lua-5.4.3/src/lcode.c.
References addk(), and setbtvalue.
Referenced by luaK_exp2K().
Definition at line 870 of file lua-5.4.3/src/lcode.c.
References luaK_codeABC, and luaK_getlabel().
Referenced by exp2reg().
Definition at line 1020 of file lua-5.4.3/src/lcode.c.
References expdesc::info, luaK_codeABCk(), luaK_exp2RK(), and expdesc::u.
Referenced by luaK_self(), and luaK_storevar().
|
static |
Definition at line 1426 of file lua-5.4.3/src/lcode.c.
References cast, codebinexpval(), finishbinexpval(), expdesc::info, luaK_exp2K(), NULL, OP_ADD, OP_ADDK, OP_MMBINK, swapexps(), TM_ADD, tonumeral(), and expdesc::u.
Referenced by codecommutative(), and luaK_posfix().
|
static |
Definition at line 1374 of file lua-5.4.3/src/lcode.c.
References cast, finishbinexpval(), lua_assert, luaK_exp2anyreg(), OP_ADD, OP_MMBIN, OP_SHR, and TM_ADD.
Referenced by codearith(), codebitwise(), and luaK_posfix().
|
static |
Definition at line 1386 of file lua-5.4.3/src/lcode.c.
References cast_int, finishbinexpval(), int2sC, expdesc::ival, expdesc::k, lua_assert, OP_MMBINI, expdesc::u, and VKINT.
Referenced by codecommutative(), and luaK_posfix().
Definition at line 1466 of file lua-5.4.3/src/lcode.c.
References cast, codebinexpval(), FuncState::f, finishbinexpval(), expdesc::info, Proto::k, expdesc::k, lua_assert, luaK_exp2RK(), OP_ADD, OP_ADDK, OP_MMBINK, swapexps(), TM_ADD, ttisinteger, expdesc::u, and VKINT.
Referenced by luaK_posfix().
|
static |
Definition at line 1448 of file lua-5.4.3/src/lcode.c.
References cast, codearith(), codebini(), isSCint(), NULL, OP_ADDI, OPR_ADD, swapexps(), TM_ADD, and tonumeral().
Referenced by luaK_posfix().
Definition at line 1622 of file lua-5.4.3/src/lcode.c.
References freeexp(), GET_OPCODE, GETARG_A, GETARG_B, expdesc::info, lua_assert, luaK_codeABC, luaK_fixline(), OP_CONCAT, previousinstruction(), SETARG_A, SETARG_B, and expdesc::u.
Referenced by luaK_posfix().
Definition at line 1522 of file lua-5.4.3/src/lcode.c.
References condjump(), freeexps(), expdesc::info, isSCnumber(), expdesc::k, lua_assert, luaK_exp2anyreg(), luaK_exp2RK(), OP_EQ, OP_EQI, OP_EQK, OPR_EQ, swapexps(), expdesc::u, VJMP, VK, VKFLT, VKINT, and VNONRELOC.
Referenced by luaK_posfix().
|
static |
Definition at line 439 of file lua-5.4.3/src/lcode.c.
References CREATE_Ax, lua_assert, luaK_code(), MAXARG_Ax, and OP_EXTRAARG.
Referenced by luaK_codek(), and luaK_setlist().
Definition at line 1168 of file lua-5.4.3/src/lcode.c.
References discharge2anyreg(), expdesc::f, freeexp(), expdesc::info, expdesc::k, lua_assert, luaK_codeABC, negatecondition(), OP_NOT, removevalues(), expdesc::t, expdesc::u, VFALSE, VJMP, VK, VKFLT, VKINT, VKSTR, VNIL, VNONRELOC, VRELOC, and VTRUE.
Referenced by luaK_prefix().
Definition at line 1492 of file lua-5.4.3/src/lcode.c.
References cast, condjump(), freeexps(), expdesc::info, isSCnumber(), expdesc::k, luaK_exp2anyreg(), OP_GEI, OP_GTI, OP_LT, OP_LTI, expdesc::u, and VJMP.
Referenced by luaK_posfix().
Definition at line 428 of file lua-5.4.3/src/lcode.c.
References CREATE_sJ, getOpMode, isJ, lua_assert, luaK_code(), MAXARG_sJ, and OFFSET_sJ.
Referenced by luaK_jump().
Definition at line 1341 of file lua-5.4.3/src/lcode.c.
References freeexp(), expdesc::info, expdesc::k, luaK_codeABC, luaK_exp2anyreg(), luaK_fixline(), expdesc::u, and VRELOC.
Referenced by luaK_prefix().
Definition at line 221 of file lua-5.4.3/src/lcode.c.
References luaK_codeABCk(), and luaK_jump().
Referenced by codeeq(), codeorder(), and jumponcond().
Definition at line 674 of file lua-5.4.3/src/lcode.c.
References fltvalue, expdesc::ival, ivalue, expdesc::k, lua_assert, LUA_VFALSE, LUA_VLNGSTR, LUA_VNIL, LUA_VNUMFLT, LUA_VNUMINT, LUA_VSHRSTR, LUA_VTRUE, expdesc::nval, expdesc::strval, tsvalue, ttypetag, expdesc::u, VFALSE, VKFLT, VKINT, VKSTR, VNIL, and VTRUE.
Referenced by luaK_dischargevars().
Definition at line 73 of file lua-5.4.3/src/lcode.c.
References Dyndata::actvar, Dyndata::arr, LexState::dyd, expdesc::info, expdesc::k, Vardesc::k, FuncState::ls, lua_assert, expdesc::u, and VCONST.
Referenced by luaK_dischargevars(), and luaK_exp2const().
Definition at line 1315 of file lua-5.4.3/src/lcode.c.
References fltvalue, expdesc::ival, ivalue, expdesc::k, LexState::L, FuncState::ls, luai_numisnan, luaO_rawarith(), expdesc::nval, tonumeral(), ttisinteger, expdesc::u, validop(), VKFLT, and VKINT.
Referenced by luaK_posfix(), and luaK_prefix().
Definition at line 862 of file lua-5.4.3/src/lcode.c.
References discharge2reg(), FuncState::freereg, expdesc::k, luaK_reserveregs(), and VNONRELOC.
Referenced by codenot(), and jumponcond().
Definition at line 807 of file lua-5.4.3/src/lcode.c.
References getinstruction, expdesc::info, expdesc::ival, expdesc::k, lua_assert, luaK_codeABC, luaK_codek(), luaK_dischargevars(), luaK_float(), luaK_int(), luaK_nil(), expdesc::nval, OP_LOADFALSE, OP_LOADTRUE, OP_MOVE, SETARG_A, str2K(), expdesc::u, VFALSE, VJMP, VK, VKFLT, VKINT, VKSTR, VNIL, VNONRELOC, VRELOC, and VTRUE.
Referenced by discharge2anyreg(), and exp2reg().
Definition at line 896 of file lua-5.4.3/src/lcode.c.
References code_loadbool(), discharge2reg(), expdesc::f, hasjumps, expdesc::info, expdesc::k, luaK_concat(), luaK_getlabel(), luaK_jump(), luaK_patchtohere(), need_value(), NO_JUMP, OP_LFALSESKIP, OP_LOADTRUE, patchlistaux(), expdesc::t, expdesc::u, VJMP, and VNONRELOC.
Referenced by luaK_exp2anyreg(), luaK_exp2nextreg(), and luaK_storevar().
|
static |
Definition at line 1769 of file lua-5.4.3/src/lcode.c.
References GET_OPCODE, GETARG_sJ, and OP_JMP.
Referenced by luaK_finish().
|
static |
Definition at line 1398 of file lua-5.4.3/src/lcode.c.
References cast_int, Proto::code, FuncState::f, finishbinexpval(), fitsC(), int2sC, expdesc::ival, luaK_isKint(), OP_MMBINI, FuncState::pc, SETARG_B, and expdesc::u.
Referenced by luaK_posfix().
|
static |
Definition at line 1356 of file lua-5.4.3/src/lcode.c.
References freeexps(), expdesc::info, expdesc::k, luaK_codeABCk(), luaK_exp2anyreg(), luaK_fixline(), expdesc::u, and VRELOC.
Referenced by codearith(), codebinexpval(), codebini(), codebitwise(), and finishbinexpneg().
|
static |
Definition at line 649 of file lua-5.4.3/src/lcode.c.
References MAXARG_Bx, and OFFSET_sBx.
Referenced by luaK_float(), and luaK_int().
|
static |
Definition at line 641 of file lua-5.4.3/src/lcode.c.
References cast_uint, l_castS2U, MAXARG_C, and OFFSET_sC.
Referenced by finishbinexpneg(), isSCint(), and isSCnumber().
|
static |
Definition at line 166 of file lua-5.4.3/src/lcode.c.
References Proto::code, FuncState::f, GET_OPCODE, FuncState::ls, lua_assert, luaX_syntaxerror(), MAXARG_sJ, NO_JUMP, OFFSET_sJ, OP_JMP, and SETARG_sJ.
Referenced by luaK_concat(), luaK_finish(), and patchlistaux().
Definition at line 516 of file lua-5.4.3/src/lcode.c.
References freereg(), expdesc::info, expdesc::k, expdesc::u, and VNONRELOC.
Referenced by codeconcat(), codenot(), codeunexpval(), jumponcond(), luaK_exp2nextreg(), luaK_self(), and luaK_storevar().
Definition at line 526 of file lua-5.4.3/src/lcode.c.
References freeregs(), expdesc::info, expdesc::k, expdesc::u, and VNONRELOC.
Referenced by codeeq(), codeorder(), and finishbinexpval().
|
static |
Definition at line 490 of file lua-5.4.3/src/lcode.c.
References FuncState::freereg, lua_assert, and luaY_nvarstack().
Referenced by freeexp(), freeregs(), and luaK_dischargevars().
|
static |
Definition at line 501 of file lua-5.4.3/src/lcode.c.
References freereg().
Referenced by freeexps(), and luaK_dischargevars().
|
static |
Definition at line 153 of file lua-5.4.3/src/lcode.c.
References Proto::code, FuncState::f, GETARG_sJ, and NO_JUMP.
Referenced by luaK_concat(), need_value(), patchlistaux(), and removevalues().
|
static |
Definition at line 242 of file lua-5.4.3/src/lcode.c.
References Proto::code, FuncState::f, GET_OPCODE, and testTMode.
Referenced by need_value(), negatecondition(), and patchtestreg().
|
static |
Definition at line 1219 of file lua-5.4.3/src/lcode.c.
References expdesc::ival, l_castS2U, luaK_isKint(), MAXARG_C, and expdesc::u.
Referenced by luaK_indexed().
Definition at line 1202 of file lua-5.4.3/src/lcode.c.
References FuncState::f, hasjumps, expdesc::info, Proto::k, expdesc::k, MAXARG_B, ttisshrstring, expdesc::u, and VK.
Referenced by luaK_indexed().
|
static |
Definition at line 1228 of file lua-5.4.3/src/lcode.c.
References fitsC(), expdesc::ival, luaK_isKint(), and expdesc::u.
Referenced by codecommutative(), and luaK_posfix().
|
static |
Definition at line 1237 of file lua-5.4.3/src/lcode.c.
References cast_int, F2Ieq, fitsC(), hasjumps, int2sC, expdesc::ival, expdesc::k, luaV_flttointeger(), expdesc::nval, expdesc::u, VKFLT, and VKINT.
Referenced by codeeq(), codeorder(), and luaK_infix().
Definition at line 1097 of file lua-5.4.3/src/lcode.c.
References cond(), condjump(), discharge2anyreg(), freeexp(), GET_OPCODE, GETARG_B, getinstruction, expdesc::info, expdesc::k, NO_REG, OP_NOT, OP_TEST, OP_TESTSET, removelastinstruction(), expdesc::u, and VRELOC.
Referenced by luaK_goiffalse(), and luaK_goiftrue().
void luaK_checkstack | ( | FuncState * | fs, |
int | n ) |
Definition at line 465 of file lua-5.4.3/src/lcode.c.
References cast_byte, FuncState::f, FuncState::freereg, FuncState::ls, luaX_syntaxerror(), MAXREGS, and Proto::maxstacksize.
Referenced by luaK_reserveregs().
int luaK_code | ( | FuncState * | fs, |
Instruction | i ) |
Definition at line 381 of file lua-5.4.3/src/lcode.c.
References Proto::code, FuncState::f, LexState::L, LexState::lastline, FuncState::ls, luaM_growvector, MAX_INT, FuncState::pc, savelineinfo(), and Proto::sizecode.
Referenced by codeextraarg(), codesJ(), luaK_codeABCk(), luaK_codeABx(), and luaK_codeAsBx().
Definition at line 396 of file lua-5.4.3/src/lcode.c.
References CREATE_ABCk, getOpMode, iABC, lua_assert, luaK_code(), MAXARG_A, MAXARG_B, and MAXARG_C.
Referenced by codeABRK(), condjump(), finishbinexpval(), and luaK_setlist().
Definition at line 407 of file lua-5.4.3/src/lcode.c.
References CREATE_ABx, getOpMode, iABx, lua_assert, luaK_code(), MAXARG_A, and MAXARG_Bx.
Referenced by luaK_codek().
Definition at line 417 of file lua-5.4.3/src/lcode.c.
References CREATE_ABx, getOpMode, iAsBx, lua_assert, luaK_code(), MAXARG_A, MAXARG_Bx, and OFFSET_sBx.
|
static |
Definition at line 450 of file lua-5.4.3/src/lcode.c.
References codeextraarg(), luaK_codeABx(), MAXARG_Bx, OP_LOADK, and OP_LOADKX.
Referenced by discharge2reg(), luaK_float(), and luaK_int().
void luaK_concat | ( | FuncState * | fs, |
int * | l1, | ||
int | l2 ) |
Definition at line 180 of file lua-5.4.3/src/lcode.c.
References fixjump(), getjump(), next, and NO_JUMP.
Referenced by exp2reg(), luaK_goiffalse(), luaK_goiftrue(), and luaK_posfix().
Definition at line 754 of file lua-5.4.3/src/lcode.c.
References const2exp(), const2val(), freereg(), freeregs(), expdesc::idx, expdesc::ind, expdesc::info, expdesc::k, luaK_codeABC, luaK_setoneret(), OP_GETFIELD, OP_GETI, OP_GETTABLE, OP_GETTABUP, OP_GETUPVAL, expdesc::ridx, expdesc::t, expdesc::u, expdesc::var, VCALL, VCONST, VINDEXED, VINDEXI, VINDEXSTR, VINDEXUP, VLOCAL, VNONRELOC, VRELOC, VUPVAL, and VVARARG.
Referenced by discharge2reg(), luaK_exp2anyreg(), luaK_exp2nextreg(), luaK_exp2val(), luaK_goiffalse(), luaK_goiftrue(), luaK_infix(), luaK_posfix(), and luaK_prefix().
Definition at line 936 of file lua-5.4.3/src/lcode.c.
References exp2reg(), hasjumps, expdesc::info, expdesc::k, luaK_dischargevars(), luaK_exp2nextreg(), luaY_nvarstack(), expdesc::u, and VNONRELOC.
Referenced by codebinexpval(), codeeq(), codeorder(), codeunexpval(), finishbinexpval(), luaK_exp2anyregup(), luaK_exp2RK(), luaK_exp2val(), luaK_indexed(), luaK_infix(), luaK_self(), and luaK_storevar().
Definition at line 958 of file lua-5.4.3/src/lcode.c.
References hasjumps, expdesc::k, luaK_exp2anyreg(), and VUPVAL.
Definition at line 83 of file lua-5.4.3/src/lcode.c.
References const2val(), hasjumps, expdesc::k, LexState::L, FuncState::ls, setbfvalue, setbtvalue, setnilvalue, setobj, setsvalue, expdesc::strval, tonumeral(), expdesc::u, VCONST, VFALSE, VKSTR, VNIL, and VTRUE.
Referenced by localstat().
Definition at line 980 of file lua-5.4.3/src/lcode.c.
References boolF(), boolT(), hasjumps, expdesc::info, expdesc::ival, expdesc::k, luaK_intK(), luaK_numberK(), MAXINDEXRK, nilK(), expdesc::nval, stringK(), expdesc::strval, expdesc::u, VFALSE, VK, VKFLT, VKINT, VKSTR, VNIL, and VTRUE.
Referenced by codearith(), and luaK_exp2RK().
Definition at line 924 of file lua-5.4.3/src/lcode.c.
References exp2reg(), freeexp(), FuncState::freereg, luaK_dischargevars(), and luaK_reserveregs().
Referenced by luaK_exp2anyreg(), luaK_infix(), and luaK_posfix().
Definition at line 1010 of file lua-5.4.3/src/lcode.c.
References luaK_exp2anyreg(), and luaK_exp2K().
Referenced by codeABRK(), codebitwise(), codeeq(), and luaK_infix().
Definition at line 968 of file lua-5.4.3/src/lcode.c.
References hasjumps, luaK_dischargevars(), and luaK_exp2anyreg().
void luaK_finish | ( | FuncState * | fs | ) |
Definition at line 1786 of file lua-5.4.3/src/lcode.c.
References Proto::code, FuncState::f, finaltarget(), fixjump(), GET_OPCODE, Proto::is_vararg, isIT, isOT, lua_assert, FuncState::needclose, Proto::numparams, OP_JMP, OP_RETURN, OP_RETURN0, OP_RETURN1, OP_TAILCALL, FuncState::pc, SET_OPCODE, SETARG_C, and SETARG_k.
Referenced by close_func().
void luaK_fixline | ( | FuncState * | fs, |
int | line ) |
Definition at line 1726 of file lua-5.4.3/src/lcode.c.
References FuncState::f, removelastlineinfo(), and savelineinfo().
Referenced by codeconcat(), codeunexpval(), and finishbinexpval().
|
static |
Definition at line 662 of file lua-5.4.3/src/lcode.c.
References cast_int, F2Ieq, fitsBx(), luaK_codeAsBx, luaK_codek(), luaK_numberK(), luaV_flttointeger(), and OP_LOADF.
Referenced by discharge2reg().
int luaK_getlabel | ( | FuncState * | fs | ) |
Definition at line 231 of file lua-5.4.3/src/lcode.c.
References FuncState::lasttarget, and FuncState::pc.
Referenced by code_loadbool(), exp2reg(), and luaK_patchtohere().
Definition at line 1142 of file lua-5.4.3/src/lcode.c.
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().
Definition at line 1115 of file lua-5.4.3/src/lcode.c.
References expdesc::f, expdesc::info, jumponcond(), expdesc::k, luaK_concat(), luaK_dischargevars(), luaK_patchtohere(), negatecondition(), NO_JUMP, expdesc::t, expdesc::u, VJMP, VK, VKFLT, VKINT, VKSTR, and VTRUE.
Referenced by luaK_infix().
Definition at line 1260 of file lua-5.4.3/src/lcode.c.
References cast_int, hasjumps, expdesc::idx, expdesc::ind, expdesc::info, isCint(), isKstr(), expdesc::ival, expdesc::k, lua_assert, luaK_exp2anyreg(), expdesc::ridx, str2K(), expdesc::t, expdesc::u, expdesc::var, VINDEXED, VINDEXI, VINDEXSTR, VINDEXUP, VKSTR, VLOCAL, VNONRELOC, and VUPVAL.
Definition at line 1574 of file lua-5.4.3/src/lcode.c.
References dummy, isSCnumber(), lua_assert, luaK_dischargevars(), luaK_exp2anyreg(), luaK_exp2nextreg(), luaK_exp2RK(), luaK_goiffalse(), luaK_goiftrue(), NULL, OPR_ADD, OPR_AND, OPR_BAND, OPR_BOR, OPR_BXOR, OPR_CONCAT, OPR_DIV, OPR_EQ, OPR_GE, OPR_GT, OPR_IDIV, OPR_LE, OPR_LT, OPR_MOD, OPR_MUL, OPR_NE, OPR_OR, OPR_POW, OPR_SHL, OPR_SHR, OPR_SUB, and tonumeral().
void luaK_int | ( | FuncState * | fs, |
int | reg, | ||
lua_Integer | i ) |
Definition at line 654 of file lua-5.4.3/src/lcode.c.
References cast_int, fitsBx(), luaK_codeAsBx, luaK_codek(), luaK_intK(), and OP_LOADI.
Referenced by discharge2reg(), and fornum().
|
static |
Definition at line 587 of file lua-5.4.3/src/lcode.c.
References addk(), cast_sizet, cast_voidp, setivalue, and setpvalue.
Referenced by luaK_exp2K(), and luaK_int().
int luaK_isKint | ( | expdesc * | e | ) |
Definition at line 1210 of file lua-5.4.3/src/lcode.c.
References hasjumps, expdesc::k, and VKINT.
Referenced by finishbinexpneg(), isCint(), and isSCint().
int luaK_jump | ( | FuncState * | fs | ) |
Definition at line 198 of file lua-5.4.3/src/lcode.c.
References codesJ(), NO_JUMP, and OP_JMP.
Referenced by condjump(), and exp2reg().
void luaK_nil | ( | FuncState * | fs, |
int | from, | ||
int | n ) |
Definition at line 130 of file lua-5.4.3/src/lcode.c.
References GET_OPCODE, GETARG_A, GETARG_B, luaK_codeABC, OP_LOADNIL, previousinstruction(), SETARG_A, and SETARG_B.
Referenced by discharge2reg().
|
static |
Definition at line 597 of file lua-5.4.3/src/lcode.c.
References addk(), and setfltvalue.
Referenced by luaK_exp2K(), and luaK_float().
void luaK_patchlist | ( | FuncState * | fs, |
int | list, | ||
int | target ) |
Definition at line 305 of file lua-5.4.3/src/lcode.c.
References lua_assert, NO_REG, and patchlistaux().
Referenced by luaK_patchtohere().
void luaK_patchtohere | ( | FuncState * | fs, |
int | list ) |
Definition at line 311 of file lua-5.4.3/src/lcode.c.
References luaK_getlabel(), and luaK_patchlist().
Referenced by exp2reg(), luaK_goiffalse(), and luaK_goiftrue().
Definition at line 1642 of file lua-5.4.3/src/lcode.c.
References cast, codearith(), codebinexpval(), codebini(), codebitwise(), codecommutative(), codeconcat(), codeeq(), codeorder(), constfolding(), expdesc::f, finishbinexpneg(), foldbinop, isSCint(), lua_assert, LUA_OPADD, luaK_concat(), luaK_dischargevars(), luaK_exp2nextreg(), NO_JUMP, OP_ADDI, OP_EQ, OP_SHL, OP_SHLI, OP_SHR, OP_SHRI, OPR_ADD, OPR_AND, OPR_BAND, OPR_BOR, OPR_BXOR, OPR_CONCAT, OPR_DIV, OPR_EQ, OPR_GE, OPR_GT, OPR_IDIV, OPR_LE, OPR_LT, OPR_MOD, OPR_MUL, OPR_NE, OPR_OR, OPR_POW, OPR_SHL, OPR_SHR, OPR_SUB, swapexps(), expdesc::t, TM_SHL, TM_SHR, and TM_SUB.
Definition at line 1553 of file lua-5.4.3/src/lcode.c.
References cast, codenot(), codeunexpval(), constfolding(), lua_assert, LUA_OPUNM, luaK_dischargevars(), NO_JUMP, OP_UNM, OPR_BNOT, OPR_LEN, OPR_MINUS, OPR_NOT, and VKINT.
void luaK_reserveregs | ( | FuncState * | fs, |
int | n ) |
Definition at line 479 of file lua-5.4.3/src/lcode.c.
References FuncState::freereg, and luaK_checkstack().
Referenced by discharge2anyreg(), luaK_exp2nextreg(), luaK_self(), and luaK_setreturns().
void luaK_ret | ( | FuncState * | fs, |
int | first, | ||
int | nret ) |
Definition at line 206 of file lua-5.4.3/src/lcode.c.
References luaK_codeABC, OP_RETURN, OP_RETURN0, and OP_RETURN1.
Definition at line 1067 of file lua-5.4.3/src/lcode.c.
References codeABRK(), freeexp(), FuncState::freereg, expdesc::info, expdesc::k, luaK_exp2anyreg(), luaK_reserveregs(), OP_SELF, expdesc::u, and VNONRELOC.
Definition at line 45 of file lua-5.4.3/src/lcode.c.
References luaX_syntaxerror(), LexState::t, and Token::token.
Referenced by check_readonly(), checkrepeated(), getlocalattribute(), jumpscopeerror(), localstat(), and undefgoto().
void luaK_setlist | ( | FuncState * | fs, |
int | base, | ||
int | nelems, | ||
int | tostore ) |
Definition at line 1750 of file lua-5.4.3/src/lcode.c.
References codeextraarg(), FuncState::freereg, LFIELDS_PER_FLUSH, lua_assert, LUA_MULTRET, luaK_codeABC, luaK_codeABCk(), MAXARG_C, and OP_SETLIST.
Definition at line 736 of file lua-5.4.3/src/lcode.c.
References GETARG_A, GETARG_C, getinstruction, expdesc::info, expdesc::k, lua_assert, SETARG_C, expdesc::u, VCALL, VNONRELOC, VRELOC, and VVARARG.
Referenced by luaK_dischargevars().
Definition at line 703 of file lua-5.4.3/src/lcode.c.
References FuncState::freereg, getinstruction, expdesc::k, lua_assert, luaK_reserveregs(), SETARG_A, SETARG_C, VCALL, and VVARARG.
void luaK_settablesize | ( | FuncState * | fs, |
int | pc, | ||
int | ra, | ||
int | asize, | ||
int | hsize ) |
Definition at line 1732 of file lua-5.4.3/src/lcode.c.
References Proto::code, CREATE_ABCk, CREATE_Ax, FuncState::f, luaO_ceillog2(), MAXARG_C, OP_EXTRAARG, and OP_NEWTABLE.
Referenced by constructor().
Definition at line 1030 of file lua-5.4.3/src/lcode.c.
References codeABRK(), exp2reg(), freeexp(), expdesc::idx, expdesc::ind, expdesc::info, expdesc::k, lua_assert, luaK_codeABC, luaK_exp2anyreg(), OP_SETFIELD, OP_SETI, OP_SETTABLE, OP_SETTABUP, OP_SETUPVAL, expdesc::ridx, expdesc::t, expdesc::u, expdesc::var, VINDEXED, VINDEXI, VINDEXSTR, VINDEXUP, VLOCAL, and VUPVAL.
|
static |
Definition at line 880 of file lua-5.4.3/src/lcode.c.
References GET_OPCODE, getjump(), getjumpcontrol(), NO_JUMP, and OP_TESTSET.
Referenced by exp2reg().
Definition at line 1083 of file lua-5.4.3/src/lcode.c.
References GET_OPCODE, GETARG_k, getjumpcontrol(), expdesc::info, lua_assert, OP_TEST, OP_TESTSET, SETARG_k, testTMode, and expdesc::u.
Referenced by codenot(), and luaK_goiftrue().
|
static |
Definition at line 627 of file lua-5.4.3/src/lcode.c.
References addk(), LexState::h, LexState::L, FuncState::ls, sethvalue, and setnilvalue.
Referenced by luaK_exp2K().
|
static |
Definition at line 287 of file lua-5.4.3/src/lcode.c.
References fixjump(), getjump(), next, NO_JUMP, and patchtestreg().
Referenced by exp2reg(), and luaK_patchlist().
|
static |
Definition at line 258 of file lua-5.4.3/src/lcode.c.
References CREATE_ABCk, GET_OPCODE, GETARG_B, GETARG_k, getjumpcontrol(), NO_REG, OP_TEST, OP_TESTSET, and SETARG_A.
Referenced by patchlistaux(), and removevalues().
|
static |
Definition at line 115 of file lua-5.4.3/src/lcode.c.
References cast, Proto::code, FuncState::f, FuncState::lasttarget, and FuncState::pc.
Referenced by codeconcat(), and luaK_nil().
|
static |
Definition at line 371 of file lua-5.4.3/src/lcode.c.
References FuncState::pc, and removelastlineinfo().
Referenced by jumponcond().
|
static |
Definition at line 352 of file lua-5.4.3/src/lcode.c.
References ABSLINEINFO, Proto::abslineinfo, FuncState::f, FuncState::iwthabs, Proto::lineinfo, lua_assert, MAXIWTHABS, FuncState::nabslineinfo, FuncState::pc, AbsLineInfo::pc, and FuncState::previousline.
Referenced by luaK_fixline(), and removelastinstruction().
|
static |
Definition at line 276 of file lua-5.4.3/src/lcode.c.
References getjump(), NO_JUMP, NO_REG, and patchtestreg().
Referenced by codenot().
Definition at line 328 of file lua-5.4.3/src/lcode.c.
References ABSLINEINFO, Proto::abslineinfo, FuncState::iwthabs, LexState::L, LIMLINEDIFF, AbsLineInfo::line, Proto::lineinfo, FuncState::ls, luaM_growvector, MAX_INT, MAXIWTHABS, FuncState::nabslineinfo, FuncState::pc, AbsLineInfo::pc, FuncState::previousline, Proto::sizeabslineinfo, and Proto::sizelineinfo.
Referenced by luaK_code(), and luaK_fixline().
Definition at line 719 of file lua-5.4.3/src/lcode.c.
References expdesc::info, expdesc::k, lua_assert, stringK(), expdesc::strval, expdesc::u, VK, and VKSTR.
Referenced by discharge2reg(), and luaK_indexed().
Definition at line 574 of file lua-5.4.3/src/lcode.c.
References addk(), LexState::L, FuncState::ls, s, and setsvalue.
Referenced by luaK_exp2K(), and str2K().
Definition at line 1417 of file lua-5.4.3/src/lcode.c.
Referenced by codearith(), codebitwise(), codecommutative(), codeeq(), and luaK_posfix().
Definition at line 55 of file lua-5.4.3/src/lcode.c.
References hasjumps, expdesc::ival, expdesc::k, expdesc::nval, setfltvalue, setivalue, expdesc::u, VKFLT, and VKINT.
Referenced by codearith(), codecommutative(), constfolding(), luaK_exp2const(), and luaK_infix().
Definition at line 1296 of file lua-5.4.3/src/lcode.c.
References LUA_FLOORN2I, LUA_OPBAND, LUA_OPBNOT, LUA_OPBOR, LUA_OPBXOR, LUA_OPDIV, LUA_OPIDIV, LUA_OPMOD, LUA_OPSHL, LUA_OPSHR, luaV_tointegerns(), and nvalue.
Referenced by constfolding().