31 #define MAXTAGLOOP 100
73 int npc =
pcRel(ci->
u.
l.savedpc, p);
126 callTM(L, tm, t, key, val, 1);
165 callTM(L, tm, t, key, val, 0);
180 callTM(L, tm, p1, p2, res, 1);
189 if (tm1 == NULL)
return NULL;
190 if (mt1 == mt2)
return tm1;
191 tm2 =
fasttm(L, mt2, event);
192 if (tm2 == NULL)
return NULL;
215 int temp = strcmp(l, r);
216 if (temp != 0)
return temp;
218 size_t len = strlen(l);
220 return (len == ll) ? 0 : 1;
273 else if (L == NULL)
return 0;
279 else if (L == NULL)
return 0;
287 if (tm == NULL)
return 0;
309 size_t tl =
tsvalue(top-1)->len;
313 for (i = 1; i < total &&
tostring(L, top-i-1); i++) {
324 memcpy(buffer+tl,
svalue(top-i), l *
sizeof(
char));
356 callTM(L, tm, rb, rb, ra, 1);
385 for (i = 0; i < nup; i++) {
409 for (i = 0; i < nup; i++) {
451 int total =
cast_int(top - 1 - (base + b));
484 #if !defined luai_runtimecheck
485 #define luai_runtimecheck(L, c)
489 #define RA(i) (base+GETARG_A(i))
491 #define RB(i) check_exp(getBMode(GET_OPCODE(i)) == OpArgR, base+GETARG_B(i))
492 #define RC(i) check_exp(getCMode(GET_OPCODE(i)) == OpArgR, base+GETARG_C(i))
493 #define RKB(i) check_exp(getBMode(GET_OPCODE(i)) == OpArgK, \
494 ISK(GETARG_B(i)) ? k+INDEXK(GETARG_B(i)) : base+GETARG_B(i))
495 #define RKC(i) check_exp(getCMode(GET_OPCODE(i)) == OpArgK, \
496 ISK(GETARG_C(i)) ? k+INDEXK(GETARG_C(i)) : base+GETARG_C(i))
498 (k + (GETARG_Bx(i) != 0 ? GETARG_Bx(i) - 1 : GETARG_Ax(*ci->u.l.savedpc++)))
502 #define dojump(ci,i,e) \
503 { int a = GETARG_A(i); \
504 if (a > 0) luaF_close(L, ci->u.l.base + a - 1); \
505 ci->u.l.savedpc += GETARG_sBx(i) + e; }
508 #define donextjump(ci) { i = *ci->u.l.savedpc; dojump(ci, i, 1); }
511 #define Protect(x) { {x;}; base = ci->u.l.base; }
513 #define checkGC(L,c) \
514 Protect( luaC_condGC(L,{L->top = (c); \
516 L->top = ci->top;}) \
517 luai_threadyield(L); )
520 #define arith_op(op,tm) { \
521 TValue *rb = RKB(i); \
522 TValue *rc = RKC(i); \
523 if (ttisnumber(rb) && ttisnumber(rc)) { \
524 lua_Number nb = nvalue(rb), nc = nvalue(rc); \
525 setnvalue(ra, op(L, nb, nc)); \
527 else { Protect(luaV_arith(L, ra, rb, rc, tm)); } }
530 #define vmdispatch(o) switch(o)
531 #define vmcase(l,b) case l: {b} break;
532 #define vmcasenb(l,b) case l: {b}
608 if (
b != 0 || c != 0)
657 L->
top = base + c + 1;
662 checkGC(L, (ra >= rb ? ra + 1 : rb));
705 setobjs2s(L, ra, rb);
712 if (
b != 0) L->
top = ra+
b;
714 if (nresults >= 0) L->
top = ci->
top;
725 if (b != 0) L->
top = ra+
b;
741 for (aux = 0; nfunc + aux < lim; aux++)
743 oci->
u.
l.base = ofunc + (nci->
u.
l.base - nfunc);
744 oci->
top = L->
top = ofunc + (L->
top - nfunc);
745 oci->
u.
l.savedpc = nci->
u.
l.savedpc;
754 if (b != 0) L->
top = ra+b-1;
771 if (luai_numlt(L, 0, step) ? luai_numle(L, idx, limit)
772 : luai_numle(L, limit, idx)) {
780 const TValue *plimit = ra+1;
781 const TValue *pstep = ra+2;
799 i = *(ci->
u.
l.savedpc++);
852 for (j = 0; j <
b; j++) {
lua_Number luaO_arith(int op, lua_Number v1, lua_Number v2)
void luaV_concat(lua_State *L, int total)
l_noret luaG_runerror(lua_State *L, const char *fmt,...)
#define ttisequal(o1, o2)
void luaF_close(lua_State *L, StkId level)
#define equalobj(L, o1, o2)
GLvoid **typedef void(GLAPIENTRY *PFNGLGETVERTEXATTRIBDVPROC)(GLuint
const TValue * luaV_tonumber(const TValue *obj, TValue *n)
void luaH_resize(lua_State *L, Table *t, int nasize, int nhsize)
static void callTM(lua_State *L, const TValue *f, const TValue *p1, const TValue *p2, TValue *p3, int hasres)
#define setbvalue(obj, x)
Closure * luaF_newLclosure(lua_State *L, int n)
int luaD_poscall(lua_State *L, StkId firstResult)
#define invalidateTMcache(t)
#define getfuncline(f, pc)
static int l_strcmp(const TString *ls, const TString *rs)
const TValue * luaH_get(Table *t, const TValue *key)
#define setnvalue(obj, x)
GLuint const GLfloat * val
#define LUA_TLIGHTUSERDATA
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)
#define luaC_barrier(L, p, v)
void luaV_gettable(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)
UpVal * luaF_findupval(lua_State *L, StkId level)
#define luai_runtimecheck(L, c)
int luaO_str2d(const char *s, size_t len, lua_Number *result)
GLdouble GLdouble GLdouble b
l_noret luaG_typeerror(lua_State *L, const TValue *o, const char *op)
#define LUAI_MAXNUMBER2STR
static const TValue * get_equalTM(lua_State *L, Table *mt1, Table *mt2, TMS event)
#define sethvalue(L, obj, x)
#define restorestack(L, n)
#define lua_number2str(s, n)
static void traceexec(lua_State *L)
int luaD_precall(lua_State *L, StkId func, int nresults)
static int call_orderTM(lua_State *L, const TValue *p1, const TValue *p2, TMS event)
#define luaV_rawequalobj(o1, o2)
void luaH_resizearray(lua_State *L, Table *t, int nasize)
static void pushclosure(lua_State *L, Proto *p, UpVal **encup, StkId base, StkId ra)
GLboolean GLboolean GLboolean GLboolean a
#define LFIELDS_PER_FLUSH
#define luaD_checkstack(L, n)
int luaV_lessequal(lua_State *L, const TValue *l, const TValue *r)
void init()
Initializes the gui subsystems.
static Closure * getcached(Proto *p, UpVal **encup, StkId base)
#define resethookcount(L)
void luaD_hook(lua_State *L, int event, int line)
l_noret luaG_ordererror(lua_State *L, const TValue *p1, const TValue *p2)
Table * luaH_new(lua_State *L)
l_noret luaD_throw(lua_State *L, int errcode)
const TValue * luaT_gettmbyobj(lua_State *L, const TValue *o, TMS event)
#define luaC_barrierproto(L, p, c)
int luaV_lessthan(lua_State *L, const TValue *l, const TValue *r)
#define setobj(L, obj1, obj2)
#define setclLvalue(L, obj, x)
GLfloat GLfloat GLfloat GLfloat h
void luaH_setint(lua_State *L, Table *t, int key, TValue *value)
GLdouble GLdouble GLdouble r
#define luaC_barrierback(L, p, v)
void luaV_execute(lua_State *L)
struct CallInfo::@16::@17 l
struct CallInfo * previous
int luaV_tostring(lua_State *L, StkId obj)
void luaD_call(lua_State *L, StkId func, int nResults, int allowyield)
char * luaZ_openspace(lua_State *L, Mbuffer *buff, size_t n)
void luaV_settable(lua_State *L, const TValue *t, TValue *key, StkId val)
l_noret luaG_concaterror(lua_State *L, StkId p1, StkId p2)
TString * luaS_newlstr(lua_State *L, const char *str, size_t l)
const Instruction * oldpc
void luaV_finishOp(lua_State *L)
TValue * luaH_newkey(lua_State *L, Table *t, const TValue *key)
int luaS_eqlngstr(TString *a, TString *b)
int luaV_equalobj_(lua_State *L, const TValue *t1, const TValue *t2)
l_noret luaG_aritherror(lua_State *L, const TValue *p1, const TValue *p2)