Lines Matching defs:tm
114 const TValue *tm;
119 (tm = fasttm(L, h->metatable, TM_INDEX)) == NULL) { /* or no TM? */
125 else if (ttisnil(tm = luaT_gettmbyobj(L, t, TM_INDEX)))
127 if (ttisfunction(tm)) {
128 callTM(L, tm, t, key, val, 1);
131 t = tm; /* else repeat with 'tm' */
140 const TValue *tm;
148 ((tm = fasttm(L, h->metatable, TM_NEWINDEX)) == NULL &&
163 if (ttisnil(tm = luaT_gettmbyobj(L, t, TM_NEWINDEX)))
166 if (ttisfunction(tm)) {
167 callTM(L, tm, t, key, val, 0);
170 t = tm; /* else repeat with 'tm' */
178 const TValue *tm = luaT_gettmbyobj(L, p1, event); /* try first operand */
179 if (ttisnil(tm))
180 tm = luaT_gettmbyobj(L, p2, event); /* try second operand */
181 if (ttisnil(tm)) return 0;
182 callTM(L, tm, p1, p2, res, 1);
262 const TValue *tm;
275 tm = get_equalTM(L, uvalue(t1)->metatable, uvalue(t2)->metatable, TM_EQ);
281 tm = get_equalTM(L, hvalue(t1)->metatable, hvalue(t2)->metatable, TM_EQ);
288 if (tm == NULL || L == NULL) return 0; /* no TM? */
289 callTM(L, tm, t1, t2, L->top, 1); /* call TM */
337 const TValue *tm;
341 tm = fasttm(L, h->metatable, TM_LEN);
342 if (tm) break; /* metamethod? break switch to call it */
351 tm = luaT_gettmbyobj(L, rb, TM_LEN);
352 if (ttisnil(tm)) /* no metamethod? */
357 callTM(L, tm, rb, rb, ra, 1);
581 #define arith_op(op,tm) { \
588 else { Protect(luaV_arith(L, ra, rb, rc, tm)); } }