Lines Matching refs:tb

90   stringtable *tb = &G(L)->strt;  in luaS_resize()  local
91 int osize = tb->size; in luaS_resize()
94 tablerehash(tb->hash, osize, nsize); /* depopulate shrinking part */ in luaS_resize()
95 newvect = luaM_reallocvector(L, tb->hash, osize, nsize, TString*); in luaS_resize()
98 tablerehash(tb->hash, nsize, osize); /* restore to original size */ in luaS_resize()
102 tb->hash = newvect; in luaS_resize()
103 tb->size = nsize; in luaS_resize()
130 stringtable *tb = &G(L)->strt; in luaS_init() local
131 tb->hash = luaM_newvector(L, MINSTRTABSIZE, TString*); in luaS_init()
132 tablerehash(tb->hash, 0, MINSTRTABSIZE); /* clear array */ in luaS_init()
133 tb->size = MINSTRTABSIZE; in luaS_init()
169 stringtable *tb = &G(L)->strt; in luaS_remove() local
170 TString **p = &tb->hash[lmod(ts->hash, tb->size)]; in luaS_remove()
174 tb->nuse--; in luaS_remove()
178 static void growstrtab (lua_State *L, stringtable *tb) { in growstrtab() argument
179 if (l_unlikely(tb->nuse == MAX_INT)) { /* too many strings? */ in growstrtab()
181 if (tb->nuse == MAX_INT) /* still too many? */ in growstrtab()
184 if (tb->size <= MAXSTRTB / 2) /* can grow string table? */ in growstrtab()
185 luaS_resize(L, tb->size * 2); in growstrtab()
195 stringtable *tb = &g->strt; in internshrstr() local
197 TString **list = &tb->hash[lmod(h, tb->size)]; in internshrstr()
208 if (tb->nuse >= tb->size) { /* need to grow string table? */ in internshrstr()
209 growstrtab(L, tb); in internshrstr()
210 list = &tb->hash[lmod(h, tb->size)]; /* rehash with new size */ in internshrstr()
217 tb->nuse++; in internshrstr()