Macros | Functions
lcode.c File Reference
#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"
Include dependency graph for lcode.c:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define hasjumps(e)   ((e)->t != (e)->f)
 
#define lcode_c
 
#define LIMLINEDIFF   0x80
 
#define LUA_CORE
 
#define MAXIWTHABS   120
 
#define MAXREGS   255
 

Functions

static int addk (FuncState *fs, TValue *key, TValue *v)
 
static int boolF (FuncState *fs)
 
static int boolT (FuncState *fs)
 
static int code_loadbool (FuncState *fs, int A, OpCode op)
 
static void codeABRK (FuncState *fs, OpCode o, int a, int b, expdesc *ec)
 
static void codearith (FuncState *fs, BinOpr opr, expdesc *e1, expdesc *e2, int flip, int line)
 
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 void codebitwise (FuncState *fs, BinOpr opr, expdesc *e1, expdesc *e2, int line)
 
static void codecommutative (FuncState *fs, BinOpr op, expdesc *e1, expdesc *e2, int line)
 
static void codeconcat (FuncState *fs, expdesc *e1, expdesc *e2, int line)
 
static void codeeq (FuncState *fs, BinOpr opr, expdesc *e1, expdesc *e2)
 
static int codeextraarg (FuncState *fs, int a)
 
static void codenot (FuncState *fs, expdesc *e)
 
static void codeorder (FuncState *fs, OpCode op, expdesc *e1, expdesc *e2)
 
static int codesJ (FuncState *fs, OpCode o, int sj, int k)
 
static void codeunexpval (FuncState *fs, OpCode op, expdesc *e, int line)
 
static int condjump (FuncState *fs, OpCode op, int A, int B, int C, int k)
 
static void const2exp (TValue *v, expdesc *e)
 
static TValueconst2val (FuncState *fs, const expdesc *e)
 
static int constfolding (FuncState *fs, int op, expdesc *e1, const expdesc *e2)
 
static void discharge2anyreg (FuncState *fs, expdesc *e)
 
static void discharge2reg (FuncState *fs, expdesc *e, int reg)
 
static void exp2reg (FuncState *fs, expdesc *e, int reg)
 
static int finaltarget (Instruction *code, int i)
 
static int finishbinexpneg (FuncState *fs, expdesc *e1, expdesc *e2, OpCode op, int line, TMS event)
 
static void finishbinexpval (FuncState *fs, expdesc *e1, expdesc *e2, OpCode op, int v2, int flip, int line, OpCode mmop, TMS event)
 
static int fitsBx (lua_Integer i)
 
static int fitsC (lua_Integer i)
 
static void fixjump (FuncState *fs, int pc, int dest)
 
static void freeexp (FuncState *fs, expdesc *e)
 
static void freeexps (FuncState *fs, expdesc *e1, expdesc *e2)
 
static void freereg (FuncState *fs, int reg)
 
static void freeregs (FuncState *fs, int r1, int r2)
 
static int getjump (FuncState *fs, int pc)
 
static Instructiongetjumpcontrol (FuncState *fs, int pc)
 
static int isCint (expdesc *e)
 
static int isKstr (FuncState *fs, expdesc *e)
 
static int isSCint (expdesc *e)
 
static int isSCnumber (expdesc *e, int *pi, int *isfloat)
 
static int jumponcond (FuncState *fs, expdesc *e, int cond)
 
void luaK_checkstack (FuncState *fs, int n)
 
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 luaK_codek (FuncState *fs, int reg, int k)
 
void luaK_concat (FuncState *fs, int *l1, int l2)
 
void luaK_dischargevars (FuncState *fs, expdesc *e)
 
int luaK_exp2anyreg (FuncState *fs, expdesc *e)
 
void luaK_exp2anyregup (FuncState *fs, expdesc *e)
 
int luaK_exp2const (FuncState *fs, const expdesc *e, TValue *v)
 
static int luaK_exp2K (FuncState *fs, expdesc *e)
 
void luaK_exp2nextreg (FuncState *fs, expdesc *e)
 
int luaK_exp2RK (FuncState *fs, expdesc *e)
 
void luaK_exp2val (FuncState *fs, expdesc *e)
 
void luaK_finish (FuncState *fs)
 
void luaK_fixline (FuncState *fs, int line)
 
static void luaK_float (FuncState *fs, int reg, lua_Number f)
 
int luaK_getlabel (FuncState *fs)
 
void luaK_goiffalse (FuncState *fs, expdesc *e)
 
void luaK_goiftrue (FuncState *fs, expdesc *e)
 
void luaK_indexed (FuncState *fs, expdesc *t, expdesc *k)
 
void luaK_infix (FuncState *fs, BinOpr op, expdesc *v)
 
void luaK_int (FuncState *fs, int reg, lua_Integer i)
 
static int luaK_intK (FuncState *fs, lua_Integer n)
 
int luaK_isKint (expdesc *e)
 
int luaK_jump (FuncState *fs)
 
void luaK_nil (FuncState *fs, int from, int n)
 
static int luaK_numberK (FuncState *fs, lua_Number r)
 
void luaK_patchlist (FuncState *fs, int list, int target)
 
void luaK_patchtohere (FuncState *fs, int list)
 
void luaK_posfix (FuncState *fs, BinOpr opr, expdesc *e1, expdesc *e2, int line)
 
void luaK_prefix (FuncState *fs, UnOpr op, expdesc *e, int line)
 
void luaK_reserveregs (FuncState *fs, int n)
 
void luaK_ret (FuncState *fs, int first, int nret)
 
void luaK_self (FuncState *fs, expdesc *e, expdesc *key)
 
l_noret luaK_semerror (LexState *ls, const char *msg)
 
void luaK_setlist (FuncState *fs, int base, int nelems, int tostore)
 
void luaK_setoneret (FuncState *fs, expdesc *e)
 
void luaK_setreturns (FuncState *fs, expdesc *e, int nresults)
 
void luaK_settablesize (FuncState *fs, int pc, int ra, int asize, int hsize)
 
void luaK_storevar (FuncState *fs, expdesc *var, expdesc *ex)
 
static int need_value (FuncState *fs, int list)
 
static void negatecondition (FuncState *fs, expdesc *e)
 
static int nilK (FuncState *fs)
 
static void patchlistaux (FuncState *fs, int list, int vtarget, int reg, int dtarget)
 
static int patchtestreg (FuncState *fs, int node, int reg)
 
static Instructionpreviousinstruction (FuncState *fs)
 
static void removelastinstruction (FuncState *fs)
 
static void removelastlineinfo (FuncState *fs)
 
static void removevalues (FuncState *fs, int list)
 
static void savelineinfo (FuncState *fs, Proto *f, int line)
 
static void str2K (FuncState *fs, expdesc *e)
 
static int stringK (FuncState *fs, TString *s)
 
static void swapexps (expdesc *e1, expdesc *e2)
 
static int tonumeral (const expdesc *e, TValue *v)
 
static int validop (int op, TValue *v1, TValue *v2)
 

Macro Definition Documentation

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

Definition at line 37 of file lcode.c.

#define lcode_c

Definition at line 7 of file lcode.c.

#define LIMLINEDIFF   0x80

Definition at line 327 of file lcode.c.

#define LUA_CORE

Definition at line 8 of file lcode.c.

#define MAXIWTHABS   120

Definition at line 322 of file lcode.c.

#define MAXREGS   255

Definition at line 34 of file lcode.c.

Function Documentation

static int addk ( FuncState fs,
TValue key,
TValue v 
)
static

Definition at line 549 of file lcode.c.

static int boolF ( FuncState fs)
static

Definition at line 612 of file lcode.c.

static int boolT ( FuncState fs)
static

Definition at line 622 of file lcode.c.

static int code_loadbool ( FuncState fs,
int  A,
OpCode  op 
)
static

Definition at line 874 of file lcode.c.

static void codeABRK ( FuncState fs,
OpCode  o,
int  a,
int  b,
expdesc ec 
)
static

Definition at line 1021 of file lcode.c.

static void codearith ( FuncState fs,
BinOpr  opr,
expdesc e1,
expdesc e2,
int  flip,
int  line 
)
static

Definition at line 1426 of file lcode.c.

static void codebinexpval ( FuncState fs,
OpCode  op,
expdesc e1,
expdesc e2,
int  line 
)
static

Definition at line 1374 of file lcode.c.

static void codebini ( FuncState fs,
OpCode  op,
expdesc e1,
expdesc e2,
int  flip,
int  line,
TMS  event 
)
static

Definition at line 1386 of file lcode.c.

static void codebitwise ( FuncState fs,
BinOpr  opr,
expdesc e1,
expdesc e2,
int  line 
)
static

Definition at line 1466 of file lcode.c.

static void codecommutative ( FuncState fs,
BinOpr  op,
expdesc e1,
expdesc e2,
int  line 
)
static

Definition at line 1448 of file lcode.c.

static void codeconcat ( FuncState fs,
expdesc e1,
expdesc e2,
int  line 
)
static

Definition at line 1622 of file lcode.c.

static void codeeq ( FuncState fs,
BinOpr  opr,
expdesc e1,
expdesc e2 
)
static

Definition at line 1522 of file lcode.c.

static int codeextraarg ( FuncState fs,
int  a 
)
static

Definition at line 448 of file lcode.c.

static void codenot ( FuncState fs,
expdesc e 
)
static

Definition at line 1169 of file lcode.c.

static void codeorder ( FuncState fs,
OpCode  op,
expdesc e1,
expdesc e2 
)
static

Definition at line 1492 of file lcode.c.

static int codesJ ( FuncState fs,
OpCode  o,
int  sj,
int  k 
)
static

Definition at line 437 of file lcode.c.

static void codeunexpval ( FuncState fs,
OpCode  op,
expdesc e,
int  line 
)
static

Definition at line 1341 of file lcode.c.

static int condjump ( FuncState fs,
OpCode  op,
int  A,
int  B,
int  C,
int  k 
)
static

Definition at line 221 of file lcode.c.

static void const2exp ( TValue v,
expdesc e 
)
static

Definition at line 679 of file lcode.c.

static TValue* const2val ( FuncState fs,
const expdesc e 
)
static

Definition at line 73 of file lcode.c.

static int constfolding ( FuncState fs,
int  op,
expdesc e1,
const expdesc e2 
)
static

Definition at line 1315 of file lcode.c.

static void discharge2anyreg ( FuncState fs,
expdesc e 
)
static

Definition at line 866 of file lcode.c.

static void discharge2reg ( FuncState fs,
expdesc e,
int  reg 
)
static

Definition at line 812 of file lcode.c.

static void exp2reg ( FuncState fs,
expdesc e,
int  reg 
)
static

Definition at line 900 of file lcode.c.

static int finaltarget ( Instruction code,
int  i 
)
static

Definition at line 1769 of file lcode.c.

static int finishbinexpneg ( FuncState fs,
expdesc e1,
expdesc e2,
OpCode  op,
int  line,
TMS  event 
)
static

Definition at line 1398 of file lcode.c.

static void finishbinexpval ( FuncState fs,
expdesc e1,
expdesc e2,
OpCode  op,
int  v2,
int  flip,
int  line,
OpCode  mmop,
TMS  event 
)
static

Definition at line 1356 of file lcode.c.

static int fitsBx ( lua_Integer  i)
static

Definition at line 654 of file lcode.c.

static int fitsC ( lua_Integer  i)
static

Definition at line 646 of file lcode.c.

static void fixjump ( FuncState fs,
int  pc,
int  dest 
)
static

Definition at line 166 of file lcode.c.

static void freeexp ( FuncState fs,
expdesc e 
)
static

Definition at line 525 of file lcode.c.

static void freeexps ( FuncState fs,
expdesc e1,
expdesc e2 
)
static

Definition at line 535 of file lcode.c.

static void freereg ( FuncState fs,
int  reg 
)
static

Definition at line 499 of file lcode.c.

static void freeregs ( FuncState fs,
int  r1,
int  r2 
)
static

Definition at line 510 of file lcode.c.

static int getjump ( FuncState fs,
int  pc 
)
static

Definition at line 153 of file lcode.c.

static Instruction* getjumpcontrol ( FuncState fs,
int  pc 
)
static

Definition at line 242 of file lcode.c.

static int isCint ( expdesc e)
static

Definition at line 1220 of file lcode.c.

static int isKstr ( FuncState fs,
expdesc e 
)
static

Definition at line 1203 of file lcode.c.

static int isSCint ( expdesc e)
static

Definition at line 1229 of file lcode.c.

static int isSCnumber ( expdesc e,
int *  pi,
int *  isfloat 
)
static

Definition at line 1238 of file lcode.c.

static int jumponcond ( FuncState fs,
expdesc e,
int  cond 
)
static

Definition at line 1098 of file lcode.c.

void luaK_checkstack ( FuncState fs,
int  n 
)

Definition at line 474 of file lcode.c.

int luaK_code ( FuncState fs,
Instruction  i 
)

Definition at line 390 of file lcode.c.

int luaK_codeABCk ( FuncState fs,
OpCode  o,
int  a,
int  b,
int  c,
int  k 
)

Definition at line 405 of file lcode.c.

int luaK_codeABx ( FuncState fs,
OpCode  o,
int  a,
unsigned int  bc 
)

Definition at line 416 of file lcode.c.

int luaK_codeAsBx ( FuncState fs,
OpCode  o,
int  a,
int  bc 
)

Definition at line 426 of file lcode.c.

static int luaK_codek ( FuncState fs,
int  reg,
int  k 
)
static

Definition at line 459 of file lcode.c.

void luaK_concat ( FuncState fs,
int *  l1,
int  l2 
)

Definition at line 180 of file lcode.c.

void luaK_dischargevars ( FuncState fs,
expdesc e 
)

Definition at line 759 of file lcode.c.

int luaK_exp2anyreg ( FuncState fs,
expdesc e 
)

Definition at line 940 of file lcode.c.

void luaK_exp2anyregup ( FuncState fs,
expdesc e 
)

Definition at line 959 of file lcode.c.

int luaK_exp2const ( FuncState fs,
const expdesc e,
TValue v 
)

Definition at line 83 of file lcode.c.

static int luaK_exp2K ( FuncState fs,
expdesc e 
)
static

Definition at line 981 of file lcode.c.

void luaK_exp2nextreg ( FuncState fs,
expdesc e 
)

Definition at line 928 of file lcode.c.

int luaK_exp2RK ( FuncState fs,
expdesc e 
)

Definition at line 1011 of file lcode.c.

void luaK_exp2val ( FuncState fs,
expdesc e 
)

Definition at line 969 of file lcode.c.

void luaK_finish ( FuncState fs)

Definition at line 1786 of file lcode.c.

void luaK_fixline ( FuncState fs,
int  line 
)

Definition at line 1726 of file lcode.c.

static void luaK_float ( FuncState fs,
int  reg,
lua_Number  f 
)
static

Definition at line 667 of file lcode.c.

int luaK_getlabel ( FuncState fs)

Definition at line 231 of file lcode.c.

void luaK_goiffalse ( FuncState fs,
expdesc e 
)

Definition at line 1143 of file lcode.c.

void luaK_goiftrue ( FuncState fs,
expdesc e 
)

Definition at line 1116 of file lcode.c.

void luaK_indexed ( FuncState fs,
expdesc t,
expdesc k 
)

Definition at line 1261 of file lcode.c.

void luaK_infix ( FuncState fs,
BinOpr  op,
expdesc v 
)

Definition at line 1574 of file lcode.c.

void luaK_int ( FuncState fs,
int  reg,
lua_Integer  i 
)

Definition at line 659 of file lcode.c.

static int luaK_intK ( FuncState fs,
lua_Integer  n 
)
static

Definition at line 592 of file lcode.c.

int luaK_isKint ( expdesc e)

Definition at line 1211 of file lcode.c.

int luaK_jump ( FuncState fs)

Definition at line 198 of file lcode.c.

void luaK_nil ( FuncState fs,
int  from,
int  n 
)

Definition at line 130 of file lcode.c.

static int luaK_numberK ( FuncState fs,
lua_Number  r 
)
static

Definition at line 602 of file lcode.c.

void luaK_patchlist ( FuncState fs,
int  list,
int  target 
)

Definition at line 305 of file lcode.c.

void luaK_patchtohere ( FuncState fs,
int  list 
)

Definition at line 311 of file lcode.c.

void luaK_posfix ( FuncState fs,
BinOpr  opr,
expdesc e1,
expdesc e2,
int  line 
)

Definition at line 1642 of file lcode.c.

void luaK_prefix ( FuncState fs,
UnOpr  op,
expdesc e,
int  line 
)

Definition at line 1553 of file lcode.c.

void luaK_reserveregs ( FuncState fs,
int  n 
)

Definition at line 488 of file lcode.c.

void luaK_ret ( FuncState fs,
int  first,
int  nret 
)

Definition at line 206 of file lcode.c.

void luaK_self ( FuncState fs,
expdesc e,
expdesc key 
)

Definition at line 1068 of file lcode.c.

l_noret luaK_semerror ( LexState ls,
const char *  msg 
)

Definition at line 45 of file lcode.c.

void luaK_setlist ( FuncState fs,
int  base,
int  nelems,
int  tostore 
)

Definition at line 1750 of file lcode.c.

void luaK_setoneret ( FuncState fs,
expdesc e 
)

Definition at line 741 of file lcode.c.

void luaK_setreturns ( FuncState fs,
expdesc e,
int  nresults 
)

Definition at line 708 of file lcode.c.

void luaK_settablesize ( FuncState fs,
int  pc,
int  ra,
int  asize,
int  hsize 
)

Definition at line 1732 of file lcode.c.

void luaK_storevar ( FuncState fs,
expdesc var,
expdesc ex 
)

Definition at line 1031 of file lcode.c.

static int need_value ( FuncState fs,
int  list 
)
static

Definition at line 884 of file lcode.c.

static void negatecondition ( FuncState fs,
expdesc e 
)
static

Definition at line 1084 of file lcode.c.

static int nilK ( FuncState fs)
static

Definition at line 632 of file lcode.c.

static void patchlistaux ( FuncState fs,
int  list,
int  vtarget,
int  reg,
int  dtarget 
)
static

Definition at line 287 of file lcode.c.

static int patchtestreg ( FuncState fs,
int  node,
int  reg 
)
static

Definition at line 258 of file lcode.c.

static Instruction* previousinstruction ( FuncState fs)
static

Definition at line 115 of file lcode.c.

static void removelastinstruction ( FuncState fs)
static

Definition at line 380 of file lcode.c.

static void removelastlineinfo ( FuncState fs)
static

Definition at line 361 of file lcode.c.

static void removevalues ( FuncState fs,
int  list 
)
static

Definition at line 276 of file lcode.c.

static void savelineinfo ( FuncState fs,
Proto f,
int  line 
)
static

Definition at line 337 of file lcode.c.

static void str2K ( FuncState fs,
expdesc e 
)
static

Definition at line 724 of file lcode.c.

static int stringK ( FuncState fs,
TString s 
)
static

Definition at line 579 of file lcode.c.

static void swapexps ( expdesc e1,
expdesc e2 
)
static

Definition at line 1417 of file lcode.c.

static int tonumeral ( const expdesc e,
TValue v 
)
static

Definition at line 55 of file lcode.c.

static int validop ( int  op,
TValue v1,
TValue v2 
)
static

Definition at line 1297 of file lcode.c.



plotjuggler
Author(s): Davide Faconti
autogenerated on Sun Dec 6 2020 04:02:48