Home | History | Annotate | Download | only in src

Lines Matching defs:tm

136     const TValue *tm;
141 (tm = fasttm(L, h->metatable, TM_INDEX)) == NULL) { /* or no TM? */
147 else if (ttisnil(tm = luaT_gettmbyobj(L, t, TM_INDEX)))
149 if (ttisfunction(tm)) {
150 callTM(L, tm, t, key, val, 1);
153 t = tm; /* else repeat with 'tm' */
162 const TValue *tm;
170 ((tm = fasttm(L, h->metatable, TM_NEWINDEX)) == NULL &&
185 if (ttisnil(tm = luaT_gettmbyobj(L, t, TM_NEWINDEX)))
188 if (ttisfunction(tm)) {
189 callTM(L, tm, t, key, val, 0);
192 t = tm; /* else repeat with 'tm' */
200 const TValue *tm = luaT_gettmbyobj(L, p1, event); /* try first operand */
201 if (ttisnil(tm))
202 tm = luaT_gettmbyobj(L, p2, event); /* try second operand */
203 if (ttisnil(tm)) return 0;
204 callTM(L, tm, p1, p2, res, 1);
284 const TValue *tm;
297 tm = get_equalTM(L, uvalue(t1)->metatable, uvalue(t2)->metatable, TM_EQ);
298 break; /* will try TM */
303 tm = get_equalTM(L, hvalue(t1)->metatable, hvalue(t2)->metatable, TM_EQ);
304 break; /* will try TM */
310 if (tm == NULL) return 0; /* no TM? */
311 callTM(L, tm, t1, t2, L->top, 1); /* call TM */
359 const TValue *tm;
363 tm = fasttm(L, h->metatable, TM_LEN);
364 if (tm) break; /* metamethod? break switch to call it */
373 tm = luaT_gettmbyobj(L, rb, TM_LEN);
374 if (ttisnil(tm)) /* no metamethod? */
379 callTM(L, tm, rb, rb, ra, 1);
475 setobj2s(L, top - 2, top); /* put TM result in proper position */
543 #define arith_op(op,tm) { \
550 else { Protect(luaV_arith(L, ra, rb, rc, tm)); } }