diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2003-02-18 13:02:56 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2003-02-18 13:02:56 -0300 |
commit | 60c83ded3080a23bc661ab440c36d0a71b399e2e (patch) | |
tree | 0aa24b14c1215541b52e7885fd2f2c41aa128a06 /lvm.c | |
parent | 07948c3181702c55b7b36069ca519b54371a4ab7 (diff) | |
download | lua-60c83ded3080a23bc661ab440c36d0a71b399e2e.tar.gz lua-60c83ded3080a23bc661ab440c36d0a71b399e2e.tar.bz2 lua-60c83ded3080a23bc661ab440c36d0a71b399e2e.zip |
small optimization for sizes of array constructors
Diffstat (limited to 'lvm.c')
-rw-r--r-- | lvm.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lvm.c,v 1.274 2003/01/27 15:12:52 roberto Exp roberto $ | 2 | ** $Id: lvm.c,v 1.275 2003/02/11 10:46:24 roberto Exp roberto $ |
3 | ** Lua virtual machine | 3 | ** Lua virtual machine |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -495,7 +495,7 @@ StkId luaV_execute (lua_State *L) { | |||
495 | } | 495 | } |
496 | case OP_NEWTABLE: { | 496 | case OP_NEWTABLE: { |
497 | int b = GETARG_B(i); | 497 | int b = GETARG_B(i); |
498 | if (b > 0) b = twoto(b-1); | 498 | b = fb2int(b); |
499 | sethvalue(ra, luaH_new(L, b, GETARG_C(i))); | 499 | sethvalue(ra, luaH_new(L, b, GETARG_C(i))); |
500 | luaC_checkGC(L); | 500 | luaC_checkGC(L); |
501 | break; | 501 | break; |