new function 'luaT_trybiniTM'
to handle tag methods for instructions with immediate integer arguments
This commit is contained in:
13
lvm.c
13
lvm.c
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
** $Id: lvm.c,v 2.293 2017/09/19 18:38:14 roberto Exp roberto $
|
||||
** $Id: lvm.c,v 2.294 2017/09/26 18:14:45 roberto Exp roberto $
|
||||
** Lua virtual machine
|
||||
** See Copyright Notice in lua.h
|
||||
*/
|
||||
@@ -999,15 +999,8 @@ void luaV_execute (lua_State *L) {
|
||||
else if (tonumberns(rb, nb)) {
|
||||
setfltvalue(s2v(ra), luai_numadd(L, nb, cast_num(ic)));
|
||||
}
|
||||
else {
|
||||
TValue aux; TValue *rc;
|
||||
setivalue(&aux, ic);
|
||||
if (GETARG_Bk(i)) { /* arguments were exchanged? */
|
||||
rc = rb; rb = &aux; /* correct them */
|
||||
}
|
||||
else rc = &aux;
|
||||
Protect(luaT_trybinTM(L, rb, rc, ra, TM_ADD));
|
||||
}
|
||||
else
|
||||
Protect(luaT_trybiniTM(L, rb, ic, GETARG_Bk(i), ra, TM_ADD));
|
||||
vmbreak;
|
||||
}
|
||||
vmcase(OP_ADD) {
|
||||
|
||||
Reference in New Issue
Block a user