#include <string.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.
Macros | |
#define | ltable_c |
#define | LUA_CORE |
#define | MAXBITS (LUAI_BITSINT-2) |
#define | MAXASIZE (1 << MAXBITS) |
#define | hashpow2(t, n) (gnode(t, lmod((n), sizenode(t)))) |
#define | hashstr(t, str) hashpow2(t, (str)->tsv.hash) |
#define | hashboolean(t, p) hashpow2(t, p) |
#define | hashmod(t, n) (gnode(t, ((n) % ((sizenode(t)-1)|1)))) |
#define | hashpointer(t, p) hashmod(t, IntPoint(p)) |
#define | dummynode (&dummynode_) |
#define | isdummy(n) ((n) == dummynode) |
Variables | |
static const Node | dummynode_ |
#define dummynode (&dummynode_) |
Definition at line 66 of file ltable.cpp.
Referenced by setnodevector().
Definition at line 53 of file ltable.cpp.
Referenced by mainposition().
Definition at line 60 of file ltable.cpp.
Referenced by hashnum().
Definition at line 63 of file ltable.cpp.
Referenced by mainposition().
Definition at line 50 of file ltable.cpp.
Definition at line 52 of file ltable.cpp.
Referenced by luaH_getstr(), and mainposition().
Definition at line 68 of file ltable.cpp.
Referenced by luaH_free(), luaH_getn(), luaH_newkey(), luaH_resize(), and luaH_resizearray().
#define ltable_c |
Definition at line 22 of file ltable.cpp.
#define LUA_CORE |
Definition at line 23 of file ltable.cpp.
#define MAXASIZE (1 << MAXBITS) |
Definition at line 47 of file ltable.cpp.
Referenced by countint().
#define MAXBITS (LUAI_BITSINT-2) |
Definition at line 44 of file ltable.cpp.
Referenced by numusearray(), rehash(), and setnodevector().
Definition at line 126 of file ltable.cpp.
References cast_num, lua_number2int, nvalue, and ttisnumber.
Referenced by countint(), and findindex().
Definition at line 217 of file ltable.cpp.
References arrayindex(), luaO_ceillog2(), and MAXASIZE.
Referenced by numusehash(), and rehash().
Definition at line 143 of file ltable.cpp.
References arrayindex(), cast_int, deadvalue, gcvalue, gkey, gnext, gnode, i, iscollectable, LUA_QL, luaG_runerror(), luaV_rawequalobj, mainposition(), Table::sizearray, ttisdeadkey, and ttisnil.
Referenced by luaH_next().
Definition at line 386 of file ltable.cpp.
References gkey, Table::lastfree, Table::node, and ttisnil.
Referenced by luaH_newkey().
|
static |
Definition at line 79 of file ltable.cpp.
References cast, hashmod, i, and luai_hashnum.
Referenced by luaH_getint(), and mainposition().
Definition at line 378 of file ltable.cpp.
References Table::array, cast, isdummy, luaM_free, luaM_freearray, Table::node, Table::sizearray, and sizenode.
Referenced by freeobj().
Definition at line 480 of file ltable.cpp.
References cast_num, gkey, gnext, gval, lua_number2int, LUA_TNIL, LUA_TNUMBER, LUA_TSHRSTR, luaH_getint(), luaH_getstr(), luaO_nilobject, luaV_rawequalobj, mainposition(), nvalue, rawtsvalue, and ttype.
Referenced by lua_rawget(), lua_rawgetp(), luaH_set(), luaV_gettable(), and luaV_settable().
Definition at line 445 of file ltable.cpp.
References Table::array, cast, cast_num, gkey, gnext, gval, hashnum(), luaO_nilobject, nvalue, Table::sizearray, and ttisnumber.
Referenced by lua_getglobal(), lua_load(), lua_rawgeti(), lua_setglobal(), luaH_get(), luaH_setint(), and unbound_search().
Definition at line 559 of file ltable.cpp.
References Table::array, i, isdummy, Table::node, Table::sizearray, ttisnil, and unbound_search().
Referenced by lua_rawlen(), and luaV_objlen().
Definition at line 465 of file ltable.cpp.
References eqshrstr, gkey, gnext, gval, hashstr, lua_assert, LUA_TSHRSTR, luaO_nilobject, rawtsvalue, TString::tsv, and ttisshrstring.
Referenced by luaH_get(), luaT_gettm(), and luaT_gettmbyobj().
Definition at line 367 of file ltable.cpp.
References Table::array, cast_byte, Table::flags, GCObject::h, LUA_TTABLE, luaC_newobj(), Table::metatable, setnodevector(), and Table::sizearray.
Referenced by collectvalidlines(), init_registry(), lua_createtable(), luaV_execute(), and open_func().
Definition at line 404 of file ltable.cpp.
References getfreepos(), gkey, gnext, gval, isdummy, lua_assert, luaC_barrierback, luaG_runerror(), luaH_set(), mainposition(), nvalue, obj2gco, rehash(), setnilvalue, setobj2t, ttisnil, and ttisnumber.
Referenced by luaH_set(), luaH_setint(), and luaV_settable().
Definition at line 168 of file ltable.cpp.
References Table::array, cast_num, findindex(), gkey, gnode, gval, i, setnvalue, setobj2s, Table::sizearray, sizenode, and ttisnil.
Referenced by lua_next().
Definition at line 303 of file ltable.cpp.
References Table::array, cast, gkey, gval, i, isdummy, Table::lsizenode, luaH_set(), luaH_setint(), luaM_freearray, luaM_reallocvector, Table::node, setarrayvector(), setnodevector(), setobjt2t, Table::sizearray, ttisnil, and twoto.
Referenced by init_registry(), lua_createtable(), luaH_resizearray(), luaV_execute(), and rehash().
Definition at line 336 of file ltable.cpp.
References isdummy, luaH_resize(), Table::node, and sizenode.
Referenced by luaV_execute().
Definition at line 509 of file ltable.cpp.
References cast, luaH_get(), luaH_newkey(), and luaO_nilobject.
Referenced by addk(), lua_rawset(), lua_rawsetp(), luaH_newkey(), luaH_resize(), and luaX_newstring().
Definition at line 517 of file ltable.cpp.
References cast, cast_num, luaH_getint(), luaH_newkey(), luaO_nilobject, setnvalue, and setobj2t.
Referenced by collectvalidlines(), init_registry(), lua_rawseti(), luaH_resize(), and luaV_execute().
Definition at line 96 of file ltable.cpp.
References bvalue, TString::extra, fvalue, gcvalue, getstr, TString::hash, hashboolean, hashnum(), hashpointer, hashstr, TString::len, LUA_TBOOLEAN, LUA_TLCF, LUA_TLIGHTUSERDATA, LUA_TLNGSTR, LUA_TNUMBER, LUA_TSHRSTR, luaS_hash(), nvalue, pvalue, rawtsvalue, TString::tsv, and ttype.
Referenced by findindex(), luaH_get(), and luaH_newkey().
Definition at line 228 of file ltable.cpp.
References Table::array, i, MAXBITS, Table::sizearray, and ttisnil.
Referenced by rehash().
Definition at line 253 of file ltable.cpp.
References countint(), gkey, gval, i, Table::node, sizenode, and ttisnil.
Referenced by rehash().
Definition at line 342 of file ltable.cpp.
References computesizes(), countint(), i, luaH_resize(), MAXBITS, numusearray(), and numusehash().
Referenced by luaH_newkey().
Definition at line 269 of file ltable.cpp.
References Table::array, i, luaM_reallocvector, setnilvalue, and Table::sizearray.
Referenced by luaH_resize().
Definition at line 278 of file ltable.cpp.
References cast, cast_byte, dummynode, gkey, gnext, gnode, gval, i, Table::lastfree, Table::lsizenode, luaG_runerror(), luaM_newvector, luaO_ceillog2(), MAXBITS, Table::node, setnilvalue, and twoto.
Referenced by luaH_new(), and luaH_resize().
Definition at line 531 of file ltable.cpp.
References cast, i, luaH_getint(), MAX_INT, and ttisnil.
Referenced by luaH_getn().
|
static |
Definition at line 70 of file ltable.cpp.