FuncState
static Instruction *getjumpcontrol (FuncState *fs, int pc) {
static int need_value (FuncState *fs, int list) {
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,
static void dischargejpc (FuncState *fs) {
void luaK_patchlist (FuncState *fs, int list, int target) {
LUAI_FUNC void luaK_patchclose (FuncState *fs, int list, int level) {
void luaK_patchtohere (FuncState *fs, int list) {
void luaK_concat (FuncState *fs, int *l1, int l2) {
static int luaK_code (FuncState *fs, Instruction i) {
int luaK_codeABC (FuncState *fs, OpCode o, int a, int b, int c) {
int luaK_codeABx (FuncState *fs, OpCode o, int a, unsigned int bc) {
static int codeextraarg (FuncState *fs, int a) {
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 freeexp (FuncState *fs, expdesc *e) {
static int addk (FuncState *fs, TValue *key, TValue *v) {
int luaK_stringK (FuncState *fs, TString *s) {
int luaK_numberK (FuncState *fs, lua_Number r) {
static int boolK (FuncState *fs, int b) {
static int nilK (FuncState *fs) {
void luaK_setreturns (FuncState *fs, expdesc *e, int nresults) {
void luaK_nil (FuncState *fs, int from, int n) {
void luaK_setoneret (FuncState *fs, expdesc *e) {
void luaK_dischargevars (FuncState *fs, expdesc *e) {
static int code_label (FuncState *fs, int A, int b, int jump) {
static void discharge2reg (FuncState *fs, expdesc *e, int reg) {
static void discharge2anyreg (FuncState *fs, expdesc *e) {
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) {
int luaK_exp2RK (FuncState *fs, expdesc *e) {
void luaK_storevar (FuncState *fs, expdesc *var, expdesc *ex) {
int luaK_jump (FuncState *fs) {
void luaK_self (FuncState *fs, expdesc *e, expdesc *key) {
static void invertjump (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) {
void luaK_ret (FuncState *fs, int first, int nret) {
void luaK_indexed (FuncState *fs, expdesc *t, expdesc *k) {
static void codearith (FuncState *fs, OpCode op,
static int condjump (FuncState *fs, OpCode op, int A, int B, int C) {
static void codecomp (FuncState *fs, OpCode op, int cond, expdesc *e1,
void luaK_prefix (FuncState *fs, UnOpr op, expdesc *e, int line) {
static void fixjump (FuncState *fs, int pc, int dest) {
void luaK_infix (FuncState *fs, BinOpr op, expdesc *v) {
void luaK_posfix (FuncState *fs, BinOpr op,
void luaK_fixline (FuncState *fs, int line) {
void luaK_setlist (FuncState *fs, int base, int nelems, int tostore) {
int luaK_getlabel (FuncState *fs) {
static int getjump (FuncState *fs, int pc) {
LUAI_FUNC int luaK_codeABx (FuncState *fs, OpCode o, int A, unsigned int Bx);
LUAI_FUNC int luaK_codeABC (FuncState *fs, OpCode o, int A, int B, int C);
LUAI_FUNC int luaK_codek (FuncState *fs, int reg, int k);
LUAI_FUNC void luaK_fixline (FuncState *fs, int line);
LUAI_FUNC void luaK_nil (FuncState *fs, int from, int n);
LUAI_FUNC void luaK_reserveregs (FuncState *fs, int n);
LUAI_FUNC void luaK_checkstack (FuncState *fs, int n);
LUAI_FUNC int luaK_stringK (FuncState *fs, TString *s);
LUAI_FUNC int luaK_numberK (FuncState *fs, lua_Number r);
LUAI_FUNC void luaK_dischargevars (FuncState *fs, expdesc *e);
LUAI_FUNC int luaK_exp2anyreg (FuncState *fs, expdesc *e);
LUAI_FUNC void luaK_exp2anyregup (FuncState *fs, expdesc *e);
LUAI_FUNC void luaK_exp2nextreg (FuncState *fs, expdesc *e);
LUAI_FUNC void luaK_exp2val (FuncState *fs, expdesc *e);
LUAI_FUNC int luaK_exp2RK (FuncState *fs, expdesc *e);
LUAI_FUNC void luaK_self (FuncState *fs, expdesc *e, expdesc *key);
LUAI_FUNC void luaK_indexed (FuncState *fs, expdesc *t, expdesc *k);
LUAI_FUNC void luaK_goiftrue (FuncState *fs, expdesc *e);
LUAI_FUNC void luaK_goiffalse (FuncState *fs, expdesc *e);
LUAI_FUNC void luaK_storevar (FuncState *fs, expdesc *var, expdesc *e);
LUAI_FUNC void luaK_setreturns (FuncState *fs, expdesc *e, int nresults);
LUAI_FUNC void luaK_setoneret (FuncState *fs, expdesc *e);
LUAI_FUNC int luaK_jump (FuncState *fs);
LUAI_FUNC void luaK_ret (FuncState *fs, int first, int nret);
LUAI_FUNC void luaK_patchlist (FuncState *fs, int list, int target);
LUAI_FUNC void luaK_patchtohere (FuncState *fs, int list);
LUAI_FUNC void luaK_patchclose (FuncState *fs, int list, int level);
LUAI_FUNC void luaK_concat (FuncState *fs, int *l1, int l2);
LUAI_FUNC int luaK_getlabel (FuncState *fs);
LUAI_FUNC void luaK_prefix (FuncState *fs, UnOpr op, expdesc *v, int line);
LUAI_FUNC void luaK_infix (FuncState *fs, BinOpr op, expdesc *v);
LUAI_FUNC void luaK_posfix (FuncState *fs, BinOpr op, expdesc *v1,
LUAI_FUNC void luaK_setlist (FuncState *fs, int base, int nelems, int tostore);
struct FuncState *fs; /* current function (parser) */
FuncState *fs = ls->fs;
FuncState *fs = ls->fs;
static void checkrepeated (FuncState *fs, Labellist *ll, TString *label) {
FuncState *fs = ls->fs;
FuncState *fs = ls->fs;
FuncState *fs = ls->fs;
FuncState *fs = ls->fs;
FuncState *fs = ls->fs;
FuncState *fs = ls->fs;
FuncState *fs = ls->fs;
FuncState *fs = ls->fs;
FuncState *fs = ls->fs;
FuncState *fs = ls->fs;
FuncState *fs = ls->fs;
FuncState *fs = ls->fs;
static void mainfunc (LexState *ls, FuncState *fs) {
FuncState funcstate;
FuncState *fs = ls->fs;
FuncState *fs = ls->fs;
static LocVar *getlocvar (FuncState *fs, int i) {
FuncState *fs = ls->fs;
static void removevars (FuncState *fs, int tolevel) {
static int searchupvalue (FuncState *fs, TString *name) {
static int newupvalue (FuncState *fs, TString *name, expdesc *v) {
static int searchvar (FuncState *fs, TString *n) {
static void markupval (FuncState *fs, int level) {
static int singlevaraux (FuncState *fs, TString *n, expdesc *var, int base) {
FuncState *fs = ls->fs;
FuncState *fs = ls->fs;
FuncState *fs = ls->fs;
static void movegotosout (FuncState *fs, BlockCnt *bl) {
static void enterblock (FuncState *fs, BlockCnt *bl, lu_byte isloop) {
static void leaveblock (FuncState *fs) {
FuncState *fs = ls->fs;
FuncState *fs = ls->fs->prev;
static void open_func (LexState *ls, FuncState *fs, BlockCnt *bl) {
FuncState *fs = ls->fs;
FuncState *fs = ls->fs;
FuncState *fs = ls->fs;
static void closelistfield (FuncState *fs, struct ConsControl *cc) {
static void lastlistfield (FuncState *fs, struct ConsControl *cc) {
FuncState *fs = ls->fs;
FuncState *fs = ls->fs;
FuncState new_fs;
static l_noret errorlimit (FuncState *fs, int limit, const char *what) {
FuncState *fs = ls->fs;
FuncState *fs = ls->fs;
static void checklimit (FuncState *fs, int v, int l, const char *what) {
FuncState *fs = ls->fs;
struct FuncState *prev; /* enclosing function */