From 5e76a4fd313a8690d300085c4e8fcb9dca50c01a Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Mon, 5 Nov 2018 16:10:42 -0200 Subject: New macros for arithmetic/bitwise operations in 'luaV_execute' The repetitive code of the arithmetic and bitwise operators in the main iterpreter loop was moved to appropriate macros. (As a detail, the function 'luaV_div' was renamed 'luaV_idiv', as it does an "integer division" (floor division). --- lobject.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lobject.c') diff --git a/lobject.c b/lobject.c index d011c85f..3ce052c2 100644 --- a/lobject.c +++ b/lobject.c @@ -83,7 +83,7 @@ static lua_Integer intarith (lua_State *L, int op, lua_Integer v1, case LUA_OPSUB:return intop(-, v1, v2); case LUA_OPMUL:return intop(*, v1, v2); case LUA_OPMOD: return luaV_mod(L, v1, v2); - case LUA_OPIDIV: return luaV_div(L, v1, v2); + case LUA_OPIDIV: return luaV_idiv(L, v1, v2); case LUA_OPBAND: return intop(&, v1, v2); case LUA_OPBOR: return intop(|, v1, v2); case LUA_OPBXOR: return intop(^, v1, v2); -- cgit v1.2.3-55-g6feb