[Tarantool-patches] [PATCH luajit] Drop unused function wrapper.

Sergey Kaplun skaplun at tarantool.org
Thu Sep 19 14:19:47 MSK 2024


From: Mike Pall <mike>

(cherry picked from commit 87ae18af97fd4de790bb6c476b212e047689cc93)

This patch is a follow-up to the previous commit. Since the rehashing of
the finalizer table is gone, `lj_tab_rehash()` becomes unused and can be
dropped.

Sergey Kaplun:
* added the description for the patch

Part of tarantool/tarantool#10199
Follows up tarantool/tarantool#10290
---
 src/lj_tab.c | 7 -------
 src/lj_tab.h | 3 ---
 2 files changed, 10 deletions(-)

diff --git a/src/lj_tab.c b/src/lj_tab.c
index 1d6a4b7f..c99c6521 100644
--- a/src/lj_tab.c
+++ b/src/lj_tab.c
@@ -388,13 +388,6 @@ static void rehashtab(lua_State *L, GCtab *t, cTValue *ek)
   lj_tab_resize(L, t, asize, hsize2hbits(total));
 }
 
-#if LJ_HASFFI
-void lj_tab_rehash(lua_State *L, GCtab *t)
-{
-  rehashtab(L, t, niltv(L));
-}
-#endif
-
 void lj_tab_reasize(lua_State *L, GCtab *t, uint32_t nasize)
 {
   lj_tab_resize(L, t, nasize+1, t->hmask > 0 ? lj_fls(t->hmask)+1 : 0);
diff --git a/src/lj_tab.h b/src/lj_tab.h
index 71e34945..8575e7bd 100644
--- a/src/lj_tab.h
+++ b/src/lj_tab.h
@@ -41,9 +41,6 @@ LJ_FUNC GCtab * LJ_FASTCALL lj_tab_new1(lua_State *L, uint32_t ahsize);
 LJ_FUNCA GCtab * LJ_FASTCALL lj_tab_dup(lua_State *L, const GCtab *kt);
 LJ_FUNC void LJ_FASTCALL lj_tab_clear(GCtab *t);
 LJ_FUNC void LJ_FASTCALL lj_tab_free(global_State *g, GCtab *t);
-#if LJ_HASFFI
-LJ_FUNC void lj_tab_rehash(lua_State *L, GCtab *t);
-#endif
 LJ_FUNC void lj_tab_resize(lua_State *L, GCtab *t, uint32_t asize, uint32_t hbits);
 LJ_FUNCA void lj_tab_reasize(lua_State *L, GCtab *t, uint32_t nasize);
 
-- 
2.46.0



More information about the Tarantool-patches mailing list