Github User Fetcher 1.0.0
C Application with Server and GUI
|
#include "lprefix.h"
#include <math.h>
#include <limits.h>
#include "lua.h"
#include "ldebug.h"
#include "ldo.h"
#include "lgc.h"
#include "lmem.h"
#include "lobject.h"
#include "lstate.h"
#include "lstring.h"
#include "ltable.h"
#include "lvm.h"
Go to the source code of this file.
Data Structures | |
struct | AuxsetnodeT |
Macros | |
#define | ltable_c |
#define | LUA_CORE |
#define | MAXABITS cast_int(sizeof(int) * CHAR_BIT - 1) |
#define | MAXASIZE (1u << MAXABITS) |
#define | MAXHBITS (MAXABITS - 1) |
#define | hashpow2(t, n) (gnode(t, lmod((n), sizenode(t)))) |
#define | hashstr(t, str) hashpow2(t, (str)->hash) |
#define | hashboolean(t, p) hashpow2(t, p) |
#define | hashint(t, i) hashpow2(t, i) |
#define | hashmod(t, n) (gnode(t, ((n) % ((sizenode(t)-1)|1)))) |
#define | hashpointer(t, p) hashmod(t, point2uint(p)) |
#define | dummynode (&dummynode_) |
Functions | |
static int | l_hashfloat (lua_Number n) |
static Node * | mainposition (const Table *t, const TValue *key) |
static unsigned int | arrayindex (const TValue *key) |
static unsigned int | findindex (lua_State *L, Table *t, StkId key) |
int | luaH_next (lua_State *L, Table *t, StkId key) |
static unsigned int | computesizes (unsigned int nums[], unsigned int *pna) |
static int | countint (const TValue *key, unsigned int *nums) |
static unsigned int | numusearray (const Table *t, unsigned int *nums) |
static int | numusehash (const Table *t, unsigned int *nums, unsigned int *pna) |
static void | setarrayvector (lua_State *L, Table *t, unsigned int size) |
static void | setnodevector (lua_State *L, Table *t, unsigned int size) |
static void | auxsetnode (lua_State *L, void *ud) |
void | luaH_resize (lua_State *L, Table *t, unsigned int nasize, unsigned int nhsize) |
void | luaH_resizearray (lua_State *L, Table *t, unsigned int nasize) |
static void | rehash (lua_State *L, Table *t, const TValue *ek) |
Table * | luaH_new (lua_State *L) |
void | luaH_free (lua_State *L, Table *t) |
static Node * | getfreepos (Table *t) |
TValue * | luaH_newkey (lua_State *L, Table *t, const TValue *key) |
const TValue * | luaH_getint (Table *t, lua_Integer key) |
const TValue * | luaH_getshortstr (Table *t, TString *key) |
static const TValue * | getgeneric (Table *t, const TValue *key) |
const TValue * | luaH_getstr (Table *t, TString *key) |
const TValue * | luaH_get (Table *t, const TValue *key) |
TValue * | luaH_set (lua_State *L, Table *t, const TValue *key) |
void | luaH_setint (lua_State *L, Table *t, lua_Integer key, TValue *value) |
static lua_Unsigned | unbound_search (Table *t, lua_Unsigned j) |
lua_Unsigned | luaH_getn (Table *t) |
Variables | |
static const Node | dummynode_ |
#define dummynode (&dummynode_) |
Definition at line 75 of file lua-5.3.6/src/ltable.c.
Referenced by setnodevector().
#define hashboolean | ( | t, | |
p ) hashpow2(t, p) |
Definition at line 61 of file lua-5.3.6/src/ltable.c.
Referenced by mainposition().
#define hashint | ( | t, | |
i ) hashpow2(t, i) |
Definition at line 62 of file lua-5.3.6/src/ltable.c.
Referenced by luaH_getint(), and mainposition().
Definition at line 69 of file lua-5.3.6/src/ltable.c.
Referenced by mainposition().
#define hashpointer | ( | t, | |
p ) hashmod(t, point2uint(p)) |
Definition at line 72 of file lua-5.3.6/src/ltable.c.
Referenced by mainposition().
Definition at line 58 of file lua-5.3.6/src/ltable.c.
Referenced by mainposition().
#define hashstr | ( | t, | |
str ) hashpow2(t, (str)->hash) |
Definition at line 60 of file lua-5.3.6/src/ltable.c.
Referenced by luaH_getshortstr(), and mainposition().
#define ltable_c |
Definition at line 7 of file lua-5.3.6/src/ltable.c.
#define LUA_CORE |
Definition at line 8 of file lua-5.3.6/src/ltable.c.
#define MAXABITS cast_int(sizeof(int) * CHAR_BIT - 1) |
Definition at line 46 of file lua-5.3.6/src/ltable.c.
Referenced by numusearray(), and rehash().
#define MAXASIZE (1u << MAXABITS) |
Definition at line 47 of file lua-5.3.6/src/ltable.c.
Referenced by arrayindex().
#define MAXHBITS (MAXABITS - 1) |
Definition at line 55 of file lua-5.3.6/src/ltable.c.
Referenced by setnodevector().
|
static |
Definition at line 144 of file lua-5.3.6/src/ltable.c.
References cast, ivalue, MAXASIZE, and ttisinteger.
Referenced by countint(), and findindex().
|
static |
Definition at line 341 of file lua-5.3.6/src/ltable.c.
References cast, AuxsetnodeT::nhsize, setnodevector(), and AuxsetnodeT::t.
Referenced by luaH_resize().
|
static |
Definition at line 219 of file lua-5.3.6/src/ltable.c.
References lua_assert.
Referenced by rehash().
|
static |
Definition at line 243 of file lua-5.3.6/src/ltable.c.
References arrayindex(), and luaO_ceillog2().
Referenced by numusehash(), and rehash().
Definition at line 159 of file lua-5.3.6/src/ltable.c.
References arrayindex(), cast_int, deadvalue, gcvalue, gkey, gnext, gnode, iscollectable, luaG_runerror(), luaV_rawequalobj, mainposition(), Table::sizearray, ttisdeadkey, and ttisnil.
Referenced by luaH_next().
Definition at line 441 of file lua-5.3.6/src/ltable.c.
References gkey, isdummy, Table::lastfree, Table::node, NULL, and ttisnil.
Referenced by luaH_newkey().
Definition at line 560 of file lua-5.3.6/src/ltable.c.
References gkey, gnext, gval, luaO_nilobject, luaV_rawequalobj, and mainposition().
Referenced by luaH_get(), and luaH_getstr().
|
static |
Definition at line 97 of file lua-5.3.6/src/ltable.c.
References cast, cast_int, cast_num, l_mathop, lua_assert, lua_numbertointeger, and luai_numisnan.
Referenced by mainposition().
Definition at line 433 of file lua-5.3.6/src/ltable.c.
References Table::array, cast, isdummy, luaM_free, luaM_freearray, Table::node, Table::sizearray, and sizenode.
Definition at line 589 of file lua-5.3.6/src/ltable.c.
References getgeneric(), ivalue, LUA_TNIL, LUA_TNUMFLT, LUA_TNUMINT, LUA_TSHRSTR, luaH_getint(), luaH_getshortstr(), luaO_nilobject, luaV_tointeger(), tsvalue, and ttype.
Referenced by luaH_set().
const TValue * luaH_getint | ( | Table * | t, |
lua_Integer | key ) |
Definition at line 516 of file lua-5.3.6/src/ltable.c.
References Table::array, gkey, gnext, gval, hashint, ivalue, l_castS2U, luaO_nilobject, Table::sizearray, and ttisinteger.
Referenced by luaH_get(), luaH_setint(), and unbound_search().
lua_Unsigned luaH_getn | ( | Table * | t | ) |
Definition at line 660 of file lua-5.3.6/src/ltable.c.
References Table::array, isdummy, Table::sizearray, ttisnil, and unbound_search().
Definition at line 539 of file lua-5.3.6/src/ltable.c.
References eqshrstr, gkey, gnext, gval, hashstr, lua_assert, LUA_TSHRSTR, luaO_nilobject, tsvalue, and ttisshrstring.
Referenced by luaH_get(), luaH_getstr(), luaT_gettm(), luaT_gettmbyobj(), luaT_objtypename(), and luaV_execute().
Definition at line 575 of file lua-5.3.6/src/ltable.c.
References cast, getgeneric(), LUA_TSHRSTR, luaH_getshortstr(), NULL, and setsvalue.
Definition at line 421 of file lua-5.3.6/src/ltable.c.
References Table::array, cast_byte, Table::flags, gco2t, LUA_TTABLE, luaC_newobj(), Table::metatable, NULL, setnodevector(), and Table::sizearray.
Definition at line 461 of file lua-5.3.6/src/ltable.c.
References cast_int, fltvalue, getfreepos(), gkey, gnext, gval, Node::i_key, isdummy, lua_assert, luaC_barrierback, luaG_runerror(), luaH_set(), luai_numisnan, luaV_tointeger(), mainposition(), NULL, rehash(), setivalue, setnilvalue, setnodekey, ttisfloat, and ttisnil.
Referenced by luaH_set(), and luaH_setint().
Definition at line 186 of file lua-5.3.6/src/ltable.c.
References Table::array, cast_int, findindex(), gkey, gnode, gval, setivalue, setobj2s, Table::sizearray, sizenode, and ttisnil.
Definition at line 347 of file lua-5.3.6/src/ltable.c.
References allocsizenode, Table::array, auxsetnode(), cast, gkey, gval, LUA_ERRMEM, LUA_OK, luaD_rawrunprotected(), luaD_throw(), luaH_set(), luaH_setint(), luaM_freearray, luaM_reallocvector, AuxsetnodeT::nhsize, Table::node, setarrayvector(), setobjt2t, Table::sizearray, AuxsetnodeT::t, and ttisnil.
Referenced by luaH_resizearray(), and rehash().
Definition at line 387 of file lua-5.3.6/src/ltable.c.
References allocsizenode, and luaH_resize().
Definition at line 610 of file lua-5.3.6/src/ltable.c.
References cast, luaH_get(), luaH_newkey(), and luaO_nilobject.
Referenced by luaH_newkey(), and luaH_resize().
void luaH_setint | ( | lua_State * | L, |
Table * | t, | ||
lua_Integer | key, | ||
TValue * | value ) |
Definition at line 618 of file lua-5.3.6/src/ltable.c.
References cast, luaH_getint(), luaH_newkey(), luaO_nilobject, setivalue, setobj2t, and value.
Referenced by luaH_resize().
Definition at line 117 of file lua-5.3.6/src/ltable.c.
References bvalue, fltvalue, fvalue, gcvalue, hashboolean, hashint, hashmod, hashpointer, hashpow2, hashstr, ivalue, l_hashfloat(), lua_assert, LUA_TBOOLEAN, LUA_TLCF, LUA_TLIGHTUSERDATA, LUA_TLNGSTR, LUA_TNUMFLT, LUA_TNUMINT, LUA_TSHRSTR, luaS_hashlongstr(), pvalue, tsvalue, ttisdeadkey, and ttype.
Referenced by findindex(), getgeneric(), and luaH_newkey().
|
static |
Definition at line 259 of file lua-5.3.6/src/ltable.c.
References Table::array, MAXABITS, Table::sizearray, and ttisnil.
Referenced by rehash().
|
static |
Definition at line 285 of file lua-5.3.6/src/ltable.c.
References countint(), gkey, gval, Table::node, sizenode, and ttisnil.
Referenced by rehash().
Definition at line 395 of file lua-5.3.6/src/ltable.c.
References computesizes(), countint(), luaH_resize(), MAXABITS, numusearray(), and numusehash().
Referenced by luaH_newkey().
Definition at line 301 of file lua-5.3.6/src/ltable.c.
References Table::array, luaM_reallocvector, setnilvalue, and Table::sizearray.
Referenced by luaH_resize().
Definition at line 310 of file lua-5.3.6/src/ltable.c.
References cast, cast_byte, dummynode, gnext, gnode, gval, Table::lastfree, Table::lsizenode, luaG_runerror(), luaM_newvector, luaO_ceillog2(), MAXHBITS, Table::node, NULL, setnilvalue, twoto, and wgkey.
Referenced by auxsetnode(), and luaH_new().
|
static |
Definition at line 632 of file lua-5.3.6/src/ltable.c.
References l_castS2U, luaH_getint(), and ttisnil.
Referenced by luaH_getn().
|
static |
Definition at line 77 of file lua-5.3.6/src/ltable.c.