Lines Matching +full:- +full:p1

50     G(L)->tmname[i] = luaS_new(L, luaT_eventname[i]);  in luaT_init()
51 luaC_fix(L, obj2gco(G(L)->tmname[i])); /* never collect these names */ in luaT_init()
64 events->flags |= cast_byte(1u<<event); /* cache this fact */ in luaT_gettm()
75 mt = hvalue(o)->metatable; in luaT_gettmbyobj()
78 mt = uvalue(o)->metatable; in luaT_gettmbyobj()
81 mt = G(L)->mt[ttype(o)]; in luaT_gettmbyobj()
83 return (mt ? luaH_getshortstr(mt, G(L)->tmname[event]) : &G(L)->nilvalue); in luaT_gettmbyobj()
93 if ((ttistable(o) && (mt = hvalue(o)->metatable) != NULL) || in luaT_objtypename()
94 (ttisfulluserdata(o) && (mt = uvalue(o)->metatable) != NULL)) { in luaT_objtypename()
103 void luaT_callTM (lua_State *L, const TValue *f, const TValue *p1, in luaT_callTM() argument
105 StkId func = L->top.p; in luaT_callTM()
107 setobj2s(L, func + 1, p1); /* 1st argument */ in luaT_callTM()
110 L->top.p = func + 4; in luaT_callTM()
112 if (isLuacode(L->ci)) in luaT_callTM()
119 void luaT_callTMres (lua_State *L, const TValue *f, const TValue *p1, in luaT_callTMres() argument
122 StkId func = L->top.p; in luaT_callTMres()
124 setobj2s(L, func + 1, p1); /* 1st argument */ in luaT_callTMres()
126 L->top.p += 3; in luaT_callTMres()
128 if (isLuacode(L->ci)) in luaT_callTMres()
133 setobjs2s(L, res, --L->top.p); /* move result to its place */ in luaT_callTMres()
137 static int callbinTM (lua_State *L, const TValue *p1, const TValue *p2, in callbinTM() argument
139 const TValue *tm = luaT_gettmbyobj(L, p1, event); /* try first operand */ in callbinTM()
143 luaT_callTMres(L, tm, p1, p2, res); in callbinTM()
148 void luaT_trybinTM (lua_State *L, const TValue *p1, const TValue *p2, in luaT_trybinTM() argument
150 if (l_unlikely(!callbinTM(L, p1, p2, res, event))) { in luaT_trybinTM()
154 if (ttisnumber(p1) && ttisnumber(p2)) in luaT_trybinTM()
155 luaG_tointerror(L, p1, p2); in luaT_trybinTM()
157 luaG_opinterror(L, p1, p2, "perform bitwise operation on"); in luaT_trybinTM()
161 luaG_opinterror(L, p1, p2, "perform arithmetic on"); in luaT_trybinTM()
168 StkId top = L->top.p; in luaT_tryconcatTM()
169 if (l_unlikely(!callbinTM(L, s2v(top - 2), s2v(top - 1), top - 2, in luaT_tryconcatTM()
171 luaG_concaterror(L, s2v(top - 2), s2v(top - 1)); in luaT_tryconcatTM()
175 void luaT_trybinassocTM (lua_State *L, const TValue *p1, const TValue *p2, in luaT_trybinassocTM() argument
178 luaT_trybinTM(L, p2, p1, res, event); in luaT_trybinassocTM()
180 luaT_trybinTM(L, p1, p2, res, event); in luaT_trybinassocTM()
184 void luaT_trybiniTM (lua_State *L, const TValue *p1, lua_Integer i2, in luaT_trybiniTM() argument
188 luaT_trybinassocTM(L, p1, &aux, flip, res, event); in luaT_trybiniTM()
201 int luaT_callorderTM (lua_State *L, const TValue *p1, const TValue *p2, in luaT_callorderTM() argument
203 if (callbinTM(L, p1, p2, L->top.p, event)) /* try original event */ in luaT_callorderTM()
204 return !l_isfalse(s2v(L->top.p)); in luaT_callorderTM()
207 /* try '!(p2 < p1)' for '(p1 <= p2)' */ in luaT_callorderTM()
208 L->ci->callstatus |= CIST_LEQ; /* mark it is doing 'lt' for 'le' */ in luaT_callorderTM()
209 if (callbinTM(L, p2, p1, L->top.p, TM_LT)) { in luaT_callorderTM()
210 L->ci->callstatus ^= CIST_LEQ; /* clear mark */ in luaT_callorderTM()
211 return l_isfalse(s2v(L->top.p)); in luaT_callorderTM()
216 luaG_ordererror(L, p1, p2); /* no metamethod found */ in luaT_callorderTM()
221 int luaT_callorderiTM (lua_State *L, const TValue *p1, int v2, in luaT_callorderiTM() argument
230 p2 = p1; p1 = &aux; /* correct them */ in luaT_callorderiTM()
234 return luaT_callorderTM(L, p1, p2, event); in luaT_callorderiTM()
241 int actual = cast_int(L->top.p - ci->func.p) - 1; /* number of arguments */ in luaT_adjustvarargs()
242 int nextra = actual - nfixparams; /* number of extra arguments */ in luaT_adjustvarargs()
243 ci->u.l.nextraargs = nextra; in luaT_adjustvarargs()
244 luaD_checkstack(L, p->maxstacksize + 1); in luaT_adjustvarargs()
246 setobjs2s(L, L->top.p++, ci->func.p); in luaT_adjustvarargs()
249 setobjs2s(L, L->top.p++, ci->func.p + i); in luaT_adjustvarargs()
250 setnilvalue(s2v(ci->func.p + i)); /* erase original parameter (for GC) */ in luaT_adjustvarargs()
252 ci->func.p += actual + 1; in luaT_adjustvarargs()
253 ci->top.p += actual + 1; in luaT_adjustvarargs()
254 lua_assert(L->top.p <= ci->top.p && ci->top.p <= L->stack_last.p); in luaT_adjustvarargs()
260 int nextra = ci->u.l.nextraargs; in luaT_getvarargs()
264 L->top.p = where + nextra; /* next instruction will need top */ in luaT_getvarargs()
267 setobjs2s(L, where + i, ci->func.p - nextra + i); in luaT_getvarargs()