diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2012-08-16 14:34:28 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2012-08-16 14:34:28 -0300 |
commit | a3e1c40d6d6fb81db9d8b58aee69466f715aab5c (patch) | |
tree | ea11a028d8d92772ad97879c7bc5bbe50318bbea /lcode.c | |
parent | c1a2a646c81000b03a243cbdeba9c4bd6dd7b474 (diff) | |
download | lua-a3e1c40d6d6fb81db9d8b58aee69466f715aab5c.tar.gz lua-a3e1c40d6d6fb81db9d8b58aee69466f715aab5c.tar.bz2 lua-a3e1c40d6d6fb81db9d8b58aee69466f715aab5c.zip |
remove of unecessary luaD_checkstack. (In some cases, C should
ensure stack space; in others, Lua can use the extra slots for
temporary values.)
Diffstat (limited to '')
-rw-r--r-- | lcode.c | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lcode.c,v 2.60 2011/08/30 16:26:41 roberto Exp roberto $ | 2 | ** $Id: lcode.c,v 2.61 2012/08/14 18:12:34 roberto Exp roberto $ |
3 | ** Code generator for Lua | 3 | ** Code generator for Lua |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -330,10 +330,9 @@ int luaK_numberK (FuncState *fs, lua_Number r) { | |||
330 | setnvalue(&o, r); | 330 | setnvalue(&o, r); |
331 | if (r == 0 || luai_numisnan(NULL, r)) { /* handle -0 and NaN */ | 331 | if (r == 0 || luai_numisnan(NULL, r)) { /* handle -0 and NaN */ |
332 | /* use raw representation as key to avoid numeric problems */ | 332 | /* use raw representation as key to avoid numeric problems */ |
333 | setsvalue(L, L->top, luaS_newlstr(L, (char *)&r, sizeof(r))); | 333 | setsvalue(L, L->top++, luaS_newlstr(L, (char *)&r, sizeof(r))); |
334 | incr_top(L); | 334 | n = addk(fs, L->top - 1, &o); |
335 | n = addk(fs, L->top - 1, &o); | 335 | L->top--; |
336 | L->top--; | ||
337 | } | 336 | } |
338 | else | 337 | else |
339 | n = addk(fs, &o, &o); /* regular case */ | 338 | n = addk(fs, &o, &o); /* regular case */ |