diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2001-06-26 10:20:45 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2001-06-26 10:20:45 -0300 |
commit | 37f3a1c0452439bce1f5c2069ca015af148bf62f (patch) | |
tree | 0ad887fb08400103904dab1954695d28aece0500 /lvm.c | |
parent | 9559c111a32479794acc59fba2cbeab365a567f3 (diff) | |
download | lua-37f3a1c0452439bce1f5c2069ca015af148bf62f.tar.gz lua-37f3a1c0452439bce1f5c2069ca015af148bf62f.tar.bz2 lua-37f3a1c0452439bce1f5c2069ca015af148bf62f.zip |
too much optimization to "break" keys in tables; keep them as TObjects...
Diffstat (limited to 'lvm.c')
-rw-r--r-- | lvm.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lvm.c,v 1.186 2001/06/15 20:36:57 roberto Exp roberto $ | 2 | ** $Id: lvm.c,v 1.187 2001/06/20 17:22:46 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 | */ |
@@ -41,7 +41,7 @@ static void luaV_checkGC (lua_State *L, StkId top) { | |||
41 | const TObject *luaV_tonumber (const TObject *obj, TObject *n) { | 41 | const TObject *luaV_tonumber (const TObject *obj, TObject *n) { |
42 | if (ttype(obj) == LUA_TNUMBER) return obj; | 42 | if (ttype(obj) == LUA_TNUMBER) return obj; |
43 | if (ttype(obj) == LUA_TSTRING && luaO_str2d(svalue(obj), &nvalue(n))) { | 43 | if (ttype(obj) == LUA_TSTRING && luaO_str2d(svalue(obj), &nvalue(n))) { |
44 | ttype(n) = LUA_TNUMBER; | 44 | setttype(n, LUA_TNUMBER); |
45 | return n; | 45 | return n; |
46 | } | 46 | } |
47 | else | 47 | else |
@@ -617,7 +617,7 @@ StkId luaV_execute (lua_State *L, const Closure *cl, StkId base) { | |||
617 | if (n != -1) { /* repeat loop? */ | 617 | if (n != -1) { /* repeat loop? */ |
618 | Node *node = node(t, n); | 618 | Node *node = node(t, n); |
619 | setnvalue(ra+1, n); /* index */ | 619 | setnvalue(ra+1, n); /* index */ |
620 | setkey2obj(ra+2, node); | 620 | setobj(ra+2, key(node)); |
621 | setobj(ra+3, val(node)); | 621 | setobj(ra+3, val(node)); |
622 | dojump(pc, i); /* repeat loop */ | 622 | dojump(pc, i); /* repeat loop */ |
623 | } | 623 | } |