diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2001-10-25 17:14:14 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2001-10-25 17:14:14 -0200 |
commit | 21aa7e55f2333e57b972aa4ef2c5e2785d609578 (patch) | |
tree | bdd6119f0fab0178979202bc5d0afbd6f4410469 /lstate.c | |
parent | fffb6f3814084cddd8a58e81ae1b73ed78ea0953 (diff) | |
download | lua-21aa7e55f2333e57b972aa4ef2c5e2785d609578.tar.gz lua-21aa7e55f2333e57b972aa4ef2c5e2785d609578.tar.bz2 lua-21aa7e55f2333e57b972aa4ef2c5e2785d609578.zip |
optimization for array part of a Table
Diffstat (limited to 'lstate.c')
-rw-r--r-- | lstate.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lstate.c,v 1.68 2001/09/07 17:39:10 roberto Exp $ | 2 | ** $Id: lstate.c,v 1.69 2001/10/17 21:12:57 roberto Exp $ |
3 | ** Global State | 3 | ** Global State |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -64,10 +64,10 @@ static void f_luaopen (lua_State *L, void *ud) { | |||
64 | G(L)->ntag = 0; | 64 | G(L)->ntag = 0; |
65 | G(L)->nblocks = sizeof(lua_State) + sizeof(global_State); | 65 | G(L)->nblocks = sizeof(lua_State) + sizeof(global_State); |
66 | luaD_init(L, so->stacksize); /* init stack */ | 66 | luaD_init(L, so->stacksize); /* init stack */ |
67 | L->gt = luaH_new(L, 10); /* table of globals */ | 67 | L->gt = luaH_new(L, 0, 4); /* table of globals */ |
68 | G(L)->type2tag = luaH_new(L, 10); | 68 | G(L)->type2tag = luaH_new(L, 0, 3); |
69 | sethvalue(&G(L)->registry, luaH_new(L, 0)); | 69 | sethvalue(&G(L)->registry, luaH_new(L, 0, 0)); |
70 | luaS_resize(L, MINPOWER2); | 70 | luaS_resize(L, 4); /* initial size of string table */ |
71 | luaX_init(L); | 71 | luaX_init(L); |
72 | luaT_init(L); | 72 | luaT_init(L); |
73 | G(L)->GCthreshold = 4*G(L)->nblocks; | 73 | G(L)->GCthreshold = 4*G(L)->nblocks; |