diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2007-03-27 11:11:38 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2007-03-27 11:11:38 -0300 |
commit | 5f4f0d4a6371e950a9606ab16780a8933017e54b (patch) | |
tree | 669ea1f3c97950391f8a7d52d5015ea43e3b98c8 /ldo.c | |
parent | 8e36e1fe4928c60a09573a850e6807d922a56664 (diff) | |
download | lua-5f4f0d4a6371e950a9606ab16780a8933017e54b.tar.gz lua-5f4f0d4a6371e950a9606ab16780a8933017e54b.tar.bz2 lua-5f4f0d4a6371e950a9606ab16780a8933017e54b.zip |
no more optimization to avoid LOADNIL at function start
Diffstat (limited to 'ldo.c')
-rw-r--r-- | ldo.c | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ldo.c,v 2.43 2006/09/19 13:57:50 roberto Exp roberto $ | 2 | ** $Id: ldo.c,v 2.44 2006/10/10 17:40:17 roberto Exp roberto $ |
3 | ** Stack and Call structure of Lua | 3 | ** Stack and Call structure of Lua |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -278,11 +278,8 @@ int luaD_precall (lua_State *L, StkId func, int nresults) { | |||
278 | Proto *p = cl->p; | 278 | Proto *p = cl->p; |
279 | luaD_checkstack(L, p->maxstacksize); | 279 | luaD_checkstack(L, p->maxstacksize); |
280 | func = restorestack(L, funcr); | 280 | func = restorestack(L, funcr); |
281 | if (!p->is_vararg) { /* no varargs? */ | 281 | if (!p->is_vararg) /* no varargs? */ |
282 | base = func + 1; | 282 | base = func + 1; |
283 | if (L->top > base + p->numparams) | ||
284 | L->top = base + p->numparams; | ||
285 | } | ||
286 | else { /* vararg function */ | 283 | else { /* vararg function */ |
287 | int nargs = cast_int(L->top - func) - 1; | 284 | int nargs = cast_int(L->top - func) - 1; |
288 | base = adjust_varargs(L, p, nargs); | 285 | base = adjust_varargs(L, p, nargs); |