Lines Matching refs:tb
86 stringtable *tb = &G(L)->strt; in luaS_resize() local
87 int osize = tb->size; in luaS_resize()
90 tablerehash(tb->hash, osize, nsize); /* depopulate shrinking part */ in luaS_resize()
91 newvect = luaM_reallocvector(L, tb->hash, osize, nsize, TString*); in luaS_resize()
94 tablerehash(tb->hash, nsize, osize); /* restore to original size */ in luaS_resize()
98 tb->hash = newvect; in luaS_resize()
99 tb->size = nsize; in luaS_resize()
126 stringtable *tb = &G(L)->strt; in luaS_init() local
127 tb->hash = luaM_newvector(L, MINSTRTABSIZE, TString*); in luaS_init()
128 tablerehash(tb->hash, 0, MINSTRTABSIZE); /* clear array */ in luaS_init()
129 tb->size = MINSTRTABSIZE; in luaS_init()
165 stringtable *tb = &G(L)->strt; in luaS_remove() local
166 TString **p = &tb->hash[lmod(ts->hash, tb->size)]; in luaS_remove()
170 tb->nuse--; in luaS_remove()
174 static void growstrtab (lua_State *L, stringtable *tb) { in growstrtab() argument
175 if (l_unlikely(tb->nuse == MAX_INT)) { /* too many strings? */ in growstrtab()
177 if (tb->nuse == MAX_INT) /* still too many? */ in growstrtab()
180 if (tb->size <= MAXSTRTB / 2) /* can grow string table? */ in growstrtab()
181 luaS_resize(L, tb->size * 2); in growstrtab()
191 stringtable *tb = &g->strt; in internshrstr() local
193 TString **list = &tb->hash[lmod(h, tb->size)]; in internshrstr()
204 if (tb->nuse >= tb->size) { /* need to grow string table? */ in internshrstr()
205 growstrtab(L, tb); in internshrstr()
206 list = &tb->hash[lmod(h, tb->size)]; /* rehash with new size */ in internshrstr()
213 tb->nuse++; in internshrstr()