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). --- lvm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lvm.h') diff --git a/lvm.h b/lvm.h index 8ead0c50..7e8ec715 100644 --- a/lvm.h +++ b/lvm.h @@ -114,7 +114,7 @@ LUAI_FUNC void luaV_finishset (lua_State *L, const TValue *t, TValue *key, LUAI_FUNC void luaV_finishOp (lua_State *L); LUAI_FUNC void luaV_execute (lua_State *L, CallInfo *ci); LUAI_FUNC void luaV_concat (lua_State *L, int total); -LUAI_FUNC lua_Integer luaV_div (lua_State *L, lua_Integer x, lua_Integer y); +LUAI_FUNC lua_Integer luaV_idiv (lua_State *L, lua_Integer x, lua_Integer y); LUAI_FUNC lua_Integer luaV_mod (lua_State *L, lua_Integer x, lua_Integer y); LUAI_FUNC lua_Number luaV_modf (lua_State *L, lua_Number x, lua_Number y); LUAI_FUNC lua_Integer luaV_shiftl (lua_Integer x, lua_Integer y); -- cgit v1.2.3-55-g6feb