Home | History | Annotate | Download | only in src

Lines Matching refs:Table

14 ** Hash uses a mix of chained scatter table with Brent's variation.
80 static Node *hashnum (const Table *t, lua_Number n) {
94 ** returns the `main' position of an element in a table (that is, the index
97 static Node *mainposition (const Table *t, const TValue *key) {
125 ** the array part of the table, -1 otherwise.
140 ** returns the index of a `key' for table traversals. First goes all
144 static int findindex (lua_State *L, Table *t, StkId key) {
157 i = cast_int(n - gnode(t, 0)); /* key index in hash table */
169 int luaH_next (lua_State *L, Table *t, StkId key) {
229 static int numusearray (const Table *t, int *nums) {
254 static int numusehash (const Table *t, int *nums, int *pnasize) {
270 static void setarrayvector (lua_State *L, Table *t, int size) {
279 static void setnodevector (lua_State *L, Table *t, int size) {
289 luaG_runerror(L, "table overflow");
304 void luaH_resize (lua_State *L, Table *t, int nasize, int nhsize) {
328 already present in the table */
337 void luaH_resizearray (lua_State *L, Table *t, int nasize) {
343 static void rehash (lua_State *L, Table *t, const TValue *ek) {
357 /* resize the table to new computed sizes */
368 Table *luaH_new (lua_State *L) {
369 Table *t = &luaC_newobj(L, LUA_TTABLE, sizeof(Table), NULL, 0)->h;
379 void luaH_free (lua_State *L, Table *t) {
387 static Node *getfreepos (Table *t) {
399 ** inserts a new key into a hash table; first, check whether key's main
405 TValue *luaH_newkey (lua_State *L, Table *t, const TValue *key) {
407 if (ttisnil(key)) luaG_runerror(L, "table index is nil");
409 luaG_runerror(L, "table index is NaN");
415 rehash(L, t, key); /* grow table */
417 return luaH_set(L, t, key); /* insert key into grown table */
446 const TValue *luaH_getint (Table *t, int key) {
466 const TValue *luaH_getstr (Table *t, TString *key) {
481 const TValue *luaH_get (Table *t, const TValue *key) {
510 TValue *luaH_set (lua_State *L, Table *t, const TValue *key) {
518 void luaH_setint (lua_State *L, Table *t, int key, TValue *value) {
532 static int unbound_search (Table *t, unsigned int j) {
540 /* table was built with bad purposes: resort to linear search */
557 ** Try to find a boundary in table `t'. A `boundary' is an integer index
560 int luaH_getn (Table *t) {
582 Node *luaH_mainposition (const Table