RetroArch
Macros | Functions
lcode.c File Reference
#include "lprefix.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"
Include dependency graph for lcode.c:

Macros

#define lcode_c
 
#define LUA_CORE
 
#define MAXREGS   255
 
#define hasjumps(e)   ((e)->t != (e)->f)
 

Functions

static int tonumeral (const expdesc *e, TValue *v)
 
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 luaK_getlabel (FuncState *fs)
 
static Instructiongetjumpcontrol (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)
 
static void dischargejpc (FuncState *fs)
 
void luaK_patchtohere (FuncState *fs, int list)
 
void luaK_patchlist (FuncState *fs, int list, int target)
 
void luaK_patchclose (FuncState *fs, int list, int level)
 
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 void freeexps (FuncState *fs, expdesc *e1, expdesc *e2)
 
static int addk (FuncState *fs, TValue *key, TValue *v)
 
int luaK_stringK (FuncState *fs, TString *s)
 
int luaK_intK (FuncState *fs, lua_Integer n)
 
static 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_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, int b, int jump)
 
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)
 
int luaK_exp2RK (FuncState *fs, expdesc *e)
 
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)
 
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 codebinexpval (FuncState *fs, OpCode op, expdesc *e1, expdesc *e2, int line)
 
static void codecomp (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)
 
void luaK_posfix (FuncState *fs, BinOpr op, expdesc *e1, expdesc *e2, int line)
 
void luaK_fixline (FuncState *fs, int line)
 
void luaK_setlist (FuncState *fs, int base, int nelems, int tostore)
 

Macro Definition Documentation

◆ hasjumps

#define hasjumps (   e)    ((e)->t != (e)->f)

◆ lcode_c

#define lcode_c

◆ LUA_CORE

#define LUA_CORE

◆ MAXREGS

#define MAXREGS   255

Function Documentation

◆ addk()

static int addk ( FuncState fs,
TValue key,
TValue v 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ boolK()

static int boolK ( FuncState fs,
int  b 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ code_loadbool()

static int code_loadbool ( FuncState fs,
int  A,
int  b,
int  jump 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ codebinexpval()

static void codebinexpval ( FuncState fs,
OpCode  op,
expdesc e1,
expdesc e2,
int  line 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ codecomp()

static void codecomp ( FuncState fs,
BinOpr  opr,
expdesc e1,
expdesc e2 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ codeextraarg()

static int codeextraarg ( FuncState fs,
int  a 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ codenot()

static void codenot ( FuncState fs,
expdesc e 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ codeunexpval()

static void codeunexpval ( FuncState fs,
OpCode  op,
expdesc e,
int  line 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ condjump()

static int condjump ( FuncState fs,
OpCode  op,
int  A,
int  B,
int  C 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ constfolding()

static int constfolding ( FuncState fs,
int  op,
expdesc e1,
const expdesc e2 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ discharge2anyreg()

static void discharge2anyreg ( FuncState fs,
expdesc e 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ discharge2reg()

static void discharge2reg ( FuncState fs,
expdesc e,
int  reg 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ dischargejpc()

static void dischargejpc ( FuncState fs)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ exp2reg()

static void exp2reg ( FuncState fs,
expdesc e,
int  reg 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ fixjump()

static void fixjump ( FuncState fs,
int  pc,
int  dest 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ freeexp()

static void freeexp ( FuncState fs,
expdesc e 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ freeexps()

static void freeexps ( FuncState fs,
expdesc e1,
expdesc e2 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ freereg()

static void freereg ( FuncState fs,
int  reg 
)
static
Here is the caller graph for this function:

◆ getjump()

static int getjump ( FuncState fs,
int  pc 
)
static
Here is the caller graph for this function:

◆ getjumpcontrol()

static Instruction* getjumpcontrol ( FuncState fs,
int  pc 
)
static
Here is the caller graph for this function:

◆ jumponcond()

static int jumponcond ( FuncState fs,
expdesc e,
int  cond 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ luaK_checkstack()

void luaK_checkstack ( FuncState fs,
int  n 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ luaK_code()

static int luaK_code ( FuncState fs,
Instruction  i 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ luaK_codeABC()

int luaK_codeABC ( FuncState fs,
OpCode  o,
int  a,
int  b,
int  c 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ luaK_codeABx()

int luaK_codeABx ( FuncState fs,
OpCode  o,
int  a,
unsigned int  bc 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ luaK_codek()

int luaK_codek ( FuncState fs,
int  reg,
int  k 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ luaK_concat()

void luaK_concat ( FuncState fs,
int *  l1,
int  l2 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ luaK_dischargevars()

void luaK_dischargevars ( FuncState fs,
expdesc e 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ luaK_exp2anyreg()

int luaK_exp2anyreg ( FuncState fs,
expdesc e 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ luaK_exp2anyregup()

void luaK_exp2anyregup ( FuncState fs,
expdesc e 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ luaK_exp2nextreg()

void luaK_exp2nextreg ( FuncState fs,
expdesc e 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ luaK_exp2RK()

int luaK_exp2RK ( FuncState fs,
expdesc e 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ luaK_exp2val()

void luaK_exp2val ( FuncState fs,
expdesc e 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ luaK_fixline()

void luaK_fixline ( FuncState fs,
int  line 
)
Here is the caller graph for this function:

◆ luaK_getlabel()

int luaK_getlabel ( FuncState fs)
Here is the caller graph for this function:

◆ luaK_goiffalse()

void luaK_goiffalse ( FuncState fs,
expdesc e 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ luaK_goiftrue()

void luaK_goiftrue ( FuncState fs,
expdesc e 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ luaK_indexed()

void luaK_indexed ( FuncState fs,
expdesc t,
expdesc k 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ luaK_infix()

void luaK_infix ( FuncState fs,
BinOpr  op,
expdesc v 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ luaK_intK()

int luaK_intK ( FuncState fs,
lua_Integer  n 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ luaK_jump()

int luaK_jump ( FuncState fs)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ luaK_nil()

void luaK_nil ( FuncState fs,
int  from,
int  n 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ luaK_numberK()

static int luaK_numberK ( FuncState fs,
lua_Number  r 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ luaK_patchclose()

void luaK_patchclose ( FuncState fs,
int  list,
int  level 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ luaK_patchlist()

void luaK_patchlist ( FuncState fs,
int  list,
int  target 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ luaK_patchtohere()

void luaK_patchtohere ( FuncState fs,
int  list 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ luaK_posfix()

void luaK_posfix ( FuncState fs,
BinOpr  op,
expdesc e1,
expdesc e2,
int  line 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ luaK_prefix()

void luaK_prefix ( FuncState fs,
UnOpr  op,
expdesc e,
int  line 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ luaK_reserveregs()

void luaK_reserveregs ( FuncState fs,
int  n 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ luaK_ret()

void luaK_ret ( FuncState fs,
int  first,
int  nret 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ luaK_self()

void luaK_self ( FuncState fs,
expdesc e,
expdesc key 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ luaK_setlist()

void luaK_setlist ( FuncState fs,
int  base,
int  nelems,
int  tostore 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ luaK_setoneret()

void luaK_setoneret ( FuncState fs,
expdesc e 
)
Here is the caller graph for this function:

◆ luaK_setreturns()

void luaK_setreturns ( FuncState fs,
expdesc e,
int  nresults 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ luaK_storevar()

void luaK_storevar ( FuncState fs,
expdesc var,
expdesc ex 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ luaK_stringK()

int luaK_stringK ( FuncState fs,
TString s 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ need_value()

static int need_value ( FuncState fs,
int  list 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ negatecondition()

static void negatecondition ( FuncState fs,
expdesc e 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ nilK()

static int nilK ( FuncState fs)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ patchlistaux()

static void patchlistaux ( FuncState fs,
int  list,
int  vtarget,
int  reg,
int  dtarget 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ patchtestreg()

static int patchtestreg ( FuncState fs,
int  node,
int  reg 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ removevalues()

static void removevalues ( FuncState fs,
int  list 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ tonumeral()

static int tonumeral ( const expdesc e,
TValue v 
)
static
Here is the caller graph for this function:

◆ validop()

static int validop ( int  op,
TValue v1,
TValue v2 
)
static
Here is the caller graph for this function: