Github User Fetcher 1.0.0
C Application with Server and GUI
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "lua.h"
#include "ldebug.h"
#include "ldo.h"
#include "lfunc.h"
#include "lgc.h"
#include "lobject.h"
#include "lopcodes.h"
#include "lstate.h"
#include "lstring.h"
#include "ltable.h"
#include "ltm.h"
#include "lvm.h"
Go to the source code of this file.
Macros | |
#define | lvm_c |
#define | LUA_CORE |
#define | MAXTAGLOOP 100 |
#define | luai_runtimecheck(L, c) /* void */ |
#define | RA(i) (base+GETARG_A(i)) |
#define | RB(i) check_exp(getBMode(GET_OPCODE(i)) == OpArgR, base+GETARG_B(i)) |
#define | RC(i) check_exp(getCMode(GET_OPCODE(i)) == OpArgR, base+GETARG_C(i)) |
#define | RKB(i) |
#define | RKC(i) |
#define | KBx(i) (k + (GETARG_Bx(i) != 0 ? GETARG_Bx(i) - 1 : GETARG_Ax(*ci->u.l.savedpc++))) |
#define | dojump(ci, i, e) |
#define | donextjump(ci) { i = *ci->u.l.savedpc; dojump(ci, i, 1); } |
#define | Protect(x) { {x;}; base = ci->u.l.base; } |
#define | checkGC(L, c) |
#define | arith_op(op, tm) |
#define | vmdispatch(o) switch(o) |
#define | vmcase(l, b) case l: {b} break; |
#define | vmcasenb(l, b) case l: {b} /* nb = no break */ |
Functions | |
const TValue * | luaV_tonumber (const TValue *obj, TValue *n) |
int | luaV_tostring (lua_State *L, StkId obj) |
static void | traceexec (lua_State *L) |
static void | callTM (lua_State *L, const TValue *f, const TValue *p1, const TValue *p2, TValue *p3, int hasres) |
void | luaV_gettable (lua_State *L, const TValue *t, TValue *key, StkId val) |
void | luaV_settable (lua_State *L, const TValue *t, TValue *key, StkId val) |
static int | call_binTM (lua_State *L, const TValue *p1, const TValue *p2, StkId res, TMS event) |
static const TValue * | get_equalTM (lua_State *L, Table *mt1, Table *mt2, TMS event) |
static int | call_orderTM (lua_State *L, const TValue *p1, const TValue *p2, TMS event) |
static int | l_strcmp (const TString *ls, const TString *rs) |
int | luaV_lessthan (lua_State *L, const TValue *l, const TValue *r) |
int | luaV_lessequal (lua_State *L, const TValue *l, const TValue *r) |
int | luaV_equalobj_ (lua_State *L, const TValue *t1, const TValue *t2) |
void | luaV_concat (lua_State *L, int total) |
void | luaV_objlen (lua_State *L, StkId ra, const TValue *rb) |
void | luaV_arith (lua_State *L, StkId ra, const TValue *rb, const TValue *rc, TMS op) |
static Closure * | getcached (Proto *p, UpVal **encup, StkId base) |
static void | pushclosure (lua_State *L, Proto *p, UpVal **encup, StkId base, StkId ra) |
void | luaV_finishOp (lua_State *L) |
void | luaV_execute (lua_State *L) |
#define arith_op | ( | op, | |
tm ) |
Definition at line 520 of file lua-5.2.4/src/lvm.c.
Referenced by luaV_execute().
#define checkGC | ( | L, | |
c ) |
Definition at line 513 of file lua-5.2.4/src/lvm.c.
Referenced by luaV_execute().
#define dojump | ( | ci, | |
i, | |||
e ) |
Definition at line 502 of file lua-5.2.4/src/lvm.c.
Referenced by luaV_execute().
#define donextjump | ( | ci | ) | { i = *ci->u.l.savedpc; dojump(ci, i, 1); } |
Definition at line 508 of file lua-5.2.4/src/lvm.c.
Referenced by luaV_execute().
Definition at line 497 of file lua-5.2.4/src/lvm.c.
#define LUA_CORE |
Definition at line 13 of file lua-5.2.4/src/lvm.c.
#define luai_runtimecheck | ( | L, | |
c ) /* void */ |
Definition at line 485 of file lua-5.2.4/src/lvm.c.
Referenced by luaV_execute().
#define lvm_c |
Definition at line 12 of file lua-5.2.4/src/lvm.c.
#define MAXTAGLOOP 100 |
Definition at line 32 of file lua-5.2.4/src/lvm.c.
Referenced by luaV_gettable(), and luaV_settable().
#define Protect | ( | x | ) | { {x;}; base = ci->u.l.base; } |
Definition at line 511 of file lua-5.2.4/src/lvm.c.
Referenced by luaV_execute().
#define RA | ( | i | ) | (base+GETARG_A(i)) |
Definition at line 489 of file lua-5.2.4/src/lvm.c.
Referenced by luaV_execute().
#define RB | ( | i | ) | check_exp(getBMode(GET_OPCODE(i)) == OpArgR, base+GETARG_B(i)) |
Definition at line 491 of file lua-5.2.4/src/lvm.c.
Referenced by luaV_execute().
#define RC | ( | i | ) | check_exp(getCMode(GET_OPCODE(i)) == OpArgR, base+GETARG_C(i)) |
Definition at line 492 of file lua-5.2.4/src/lvm.c.
#define RKB | ( | i | ) |
Definition at line 493 of file lua-5.2.4/src/lvm.c.
Referenced by luaV_execute().
#define RKC | ( | i | ) |
Definition at line 495 of file lua-5.2.4/src/lvm.c.
Referenced by luaV_execute().
#define vmcase | ( | l, | |
b ) case l: {b} break; |
Definition at line 531 of file lua-5.2.4/src/lvm.c.
Referenced by luaV_execute().
#define vmcasenb | ( | l, | |
b ) case l: {b} /* nb = no break */ |
Definition at line 532 of file lua-5.2.4/src/lvm.c.
Referenced by luaV_execute().
#define vmdispatch | ( | o | ) | switch(o) |
Definition at line 530 of file lua-5.2.4/src/lvm.c.
Referenced by luaV_execute().
|
static |
Definition at line 175 of file lua-5.2.4/src/lvm.c.
References callTM(), luaT_gettmbyobj(), and ttisnil.
Referenced by call_orderTM(), luaV_arith(), and luaV_concat().
Definition at line 200 of file lua-5.2.4/src/lvm.c.
References call_binTM(), l_isfalse, and lua_State::top.
Referenced by luaV_lessequal(), and luaV_lessthan().
|
static |
Definition at line 93 of file lua-5.2.4/src/lvm.c.
References lua_State::ci, isLua, luaD_call(), restorestack, savestack, setobj2s, setobjs2s, and lua_State::top.
Referenced by call_binTM(), luaV_equalobj_(), luaV_gettable(), luaV_objlen(), and luaV_settable().
Definition at line 186 of file lua-5.2.4/src/lvm.c.
References fasttm, luaV_rawequalobj, and NULL.
Referenced by luaV_equalobj_().
Definition at line 379 of file lua-5.2.4/src/lvm.c.
References Proto::cache, Upvaldesc::idx, Upvaldesc::instack, Closure::l, NULL, Proto::sizeupvalues, LClosure::upvals, Proto::upvalues, and UpVal::v.
Referenced by luaV_execute().
Definition at line 209 of file lua-5.2.4/src/lvm.c.
References getstr, TString::len, and TString::tsv.
Referenced by luaV_lessequal(), and luaV_lessthan().
Definition at line 360 of file lua-5.2.4/src/lvm.c.
References call_binTM(), LUA_OPADD, luaG_aritherror(), luaO_arith(), luaV_tonumber(), NULL, nvalue, setnvalue, and TM_ADD.
Referenced by lua_arith(), and luaV_execute().
void luaV_concat | ( | lua_State * | L, |
int | total ) |
Definition at line 293 of file lua-5.2.4/src/lvm.c.
References call_binTM(), G, lua_assert, luaG_concaterror(), luaG_runerror(), luaS_newlstr(), luaZ_openspace(), MAX_SIZET, setobjs2s, setsvalue2s, svalue, TM_CONCAT, lua_State::top, tostring, tsvalue, ttisnumber, and ttisstring.
Referenced by luaV_execute(), and luaV_finishOp().
Definition at line 260 of file lua-5.2.4/src/lvm.c.
References bvalue, callTM(), eqshrstr, fvalue, gcvalue, get_equalTM(), hvalue, iscollectable, l_isfalse, lua_assert, LUA_TBOOLEAN, LUA_TLCF, LUA_TLIGHTUSERDATA, LUA_TLNGSTR, LUA_TNIL, LUA_TNUMBER, LUA_TSHRSTR, LUA_TTABLE, LUA_TUSERDATA, luai_numeq, luaS_eqlngstr(), NULL, nvalue, pvalue, rawtsvalue, TM_EQ, lua_State::top, ttisequal, ttype, and uvalue.
void luaV_execute | ( | lua_State * | L | ) |
Definition at line 534 of file lua-5.2.4/src/lvm.c.
References arith_op, CallInfo::base, CallInfo::callstatus, cast_int, checkGC, lua_State::ci, CIST_REENTRY, CIST_TAIL, clLvalue, dojump, donextjump, equalobj, CallInfo::func, GET_OPCODE, GETARG_A, GETARG_Ax, GETARG_B, GETARG_Bx, GETARG_C, GETARG_sBx, getcached(), getproto, lua_State::hookcount, lua_State::hookmask, hvalue, isLua, Proto::k, CallInfo::l, l_isfalse, LFIELDS_PER_FLUSH, lua_assert, LUA_MASKCOUNT, LUA_MASKLINE, LUA_MULTRET, LUA_QL, luaC_barrier, luaC_barrierback, luaD_call(), luaD_checkstack, luaD_poscall(), luaD_precall(), luaF_close(), luaG_runerror(), luaH_new(), luaH_resize(), luaH_resizearray(), luaH_setint(), luai_numadd, luai_numdiv, luai_numle, luai_numlt, luai_nummod, luai_nummul, luai_numpow, luai_numsub, luai_numunm, luai_runtimecheck, luaO_fb2int(), luaV_arith(), luaV_concat(), luaV_gettable, luaV_lessequal(), luaV_lessthan(), luaV_objlen(), luaV_settable, NULL, Proto::numparams, nvalue, obj2gco, OP_ADD, OP_CALL, OP_CLOSURE, OP_CONCAT, OP_DIV, OP_EQ, OP_EXTRAARG, OP_FORLOOP, OP_FORPREP, OP_GETTABLE, OP_GETTABUP, OP_GETUPVAL, OP_JMP, OP_LE, OP_LEN, OP_LOADBOOL, OP_LOADK, OP_LOADKX, OP_LOADNIL, OP_LT, OP_MOD, OP_MOVE, OP_MUL, OP_NEWTABLE, OP_NOT, OP_POW, OP_RETURN, OP_SELF, OP_SETLIST, OP_SETTABLE, OP_SETTABUP, OP_SETUPVAL, OP_SUB, OP_TAILCALL, OP_TEST, OP_TESTSET, OP_TFORCALL, OP_TFORLOOP, OP_UNM, OP_VARARG, Proto::p, LClosure::p, CallInfo::previous, Protect, pushclosure(), RA, RB, RKB, RKC, CallInfo::savedpc, setbvalue, setclLvalue, sethvalue, setnilvalue, setnvalue, setobj, setobj2s, setobjs2s, Table::sizearray, Proto::sizep, lua_State::stack, lua_State::stacksize, TM_ADD, TM_DIV, TM_MOD, TM_MUL, TM_POW, TM_SUB, TM_UNM, tonumber, CallInfo::top, lua_State::top, traceexec(), ttisnil, ttisnumber, ttistable, CallInfo::u, LClosure::upvals, UpVal::v, vmcase, vmcasenb, and vmdispatch.
void luaV_finishOp | ( | lua_State * | L | ) |
Definition at line 423 of file lua-5.2.4/src/lvm.c.
References CallInfo::base, cast_int, lua_State::ci, GET_OPCODE, GETARG_A, GETARG_B, GETARG_C, ISK, CallInfo::l, l_isfalse, lua_assert, luaT_gettmbyobj(), luaV_concat(), OP_ADD, OP_CALL, OP_CONCAT, OP_DIV, OP_EQ, OP_GETTABLE, OP_GETTABUP, OP_JMP, OP_LE, OP_LEN, OP_LT, OP_MOD, OP_MUL, OP_POW, OP_SELF, OP_SETTABLE, OP_SETTABUP, OP_SUB, OP_TAILCALL, OP_TFORCALL, OP_TFORLOOP, OP_UNM, CallInfo::savedpc, setobj2s, setobjs2s, TM_LE, CallInfo::top, lua_State::top, ttisnil, and CallInfo::u.
Definition at line 110 of file lua-5.2.4/src/lvm.c.
References callTM(), fasttm, hvalue, luaG_runerror(), luaG_typeerror(), luaH_get(), luaT_gettmbyobj(), MAXTAGLOOP, Table::metatable, NULL, setobj2s, TM_INDEX, ttisfunction, ttisnil, and ttistable.
Definition at line 243 of file lua-5.2.4/src/lvm.c.
References call_orderTM(), l_strcmp(), luaG_ordererror(), luai_numle, nvalue, rawtsvalue, TM_LE, TM_LT, ttisnumber, and ttisstring.
Referenced by lua_compare(), and luaV_execute().
Definition at line 231 of file lua-5.2.4/src/lvm.c.
References call_orderTM(), l_strcmp(), luaG_ordererror(), luai_numlt, nvalue, rawtsvalue, TM_LT, ttisnumber, and ttisstring.
Referenced by luaV_execute().
Definition at line 335 of file lua-5.2.4/src/lvm.c.
References callTM(), cast_num, fasttm, hvalue, LUA_TSTRING, LUA_TTABLE, luaG_typeerror(), luaH_getn(), luaT_gettmbyobj(), Table::metatable, setnvalue, TM_LEN, tsvalue, ttisnil, and ttypenv.
Referenced by lua_len(), and luaV_execute().
Definition at line 136 of file lua-5.2.4/src/lvm.c.
References callTM(), cast, fasttm, hvalue, invalidateTMcache, luaC_barrierback, luaG_runerror(), luaG_typeerror(), luaH_get(), luaH_newkey(), luaO_nilobject, luaT_gettmbyobj(), MAXTAGLOOP, Table::metatable, NULL, obj2gco, setobj2t, TM_NEWINDEX, ttisfunction, ttisnil, and ttistable.
Definition at line 35 of file lua-5.2.4/src/lvm.c.
References luaO_str2d(), NULL, setnvalue, svalue, tsvalue, ttisnumber, and ttisstring.
Referenced by luaV_arith().
Definition at line 47 of file lua-5.2.4/src/lvm.c.
References lua_number2str, LUAI_MAXNUMBER2STR, luaS_newlstr(), nvalue, s, setsvalue2s, and ttisnumber.
Definition at line 401 of file lua-5.2.4/src/lvm.c.
References Proto::cache, Upvaldesc::idx, Closure::l, luaC_barrierproto, luaF_findupval(), luaF_newLclosure(), LClosure::p, setclLvalue, Proto::sizeupvalues, LClosure::upvals, and Proto::upvalues.
Referenced by luaV_execute().
|
static |
Definition at line 60 of file lua-5.2.4/src/lvm.c.
References CallInfo::callstatus, lua_State::ci, ci_func, CIST_HOOKYIELD, CallInfo::func, getfuncline, lua_State::hookcount, lua_State::hookmask, CallInfo::l, LUA_HOOKCOUNT, LUA_HOOKLINE, LUA_MASKCOUNT, LUA_MASKLINE, LUA_YIELD, luaD_hook(), luaD_throw(), mask, lua_State::oldpc, Proto::p, pcRel, resethookcount, CallInfo::savedpc, lua_State::status, lua_State::top, and CallInfo::u.
Referenced by luaV_execute().