aboutsummaryrefslogtreecommitdiff
path: root/lcode.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2002-08-05 11:50:39 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2002-08-05 11:50:39 -0300
commit5037196f6fddb828056578b1c0d352cdef672d6a (patch)
treed1be52a5ad8fd5cebf30f7023a9c66b7bdc9563f /lcode.c
parent9fb80bde3c80557f8ad2d5642bcbeac343999994 (diff)
downloadlua-5037196f6fddb828056578b1c0d352cdef672d6a.tar.gz
lua-5037196f6fddb828056578b1c0d352cdef672d6a.tar.bz2
lua-5037196f6fddb828056578b1c0d352cdef672d6a.zip
new macros `ttis*'
Diffstat (limited to 'lcode.c')
-rw-r--r--lcode.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lcode.c b/lcode.c
index eadaef52..cd976cf0 100644
--- a/lcode.c
+++ b/lcode.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lcode.c,v 1.107 2002/06/12 14:51:31 roberto Exp roberto $ 2** $Id: lcode.c,v 1.108 2002/06/13 13:39:55 roberto Exp $
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*/
@@ -206,7 +206,7 @@ static void freeexp (FuncState *fs, expdesc *e) {
206 206
207static int addk (FuncState *fs, TObject *k, TObject *v) { 207static int addk (FuncState *fs, TObject *k, TObject *v) {
208 const TObject *index = luaH_get(fs->h, k); 208 const TObject *index = luaH_get(fs->h, k);
209 if (ttype(index) == LUA_TNUMBER) { 209 if (ttisnumber(index)) {
210 lua_assert(luaO_rawequalObj(&fs->f->k[cast(int, nvalue(index))], v)); 210 lua_assert(luaO_rawequalObj(&fs->f->k[cast(int, nvalue(index))], v));
211 return cast(int, nvalue(index)); 211 return cast(int, nvalue(index));
212 } 212 }
@@ -573,7 +573,7 @@ void luaK_indexed (FuncState *fs, expdesc *t, expdesc *k) {
573void luaK_prefix (FuncState *fs, UnOpr op, expdesc *e) { 573void luaK_prefix (FuncState *fs, UnOpr op, expdesc *e) {
574 if (op == OPR_MINUS) { 574 if (op == OPR_MINUS) {
575 luaK_exp2val(fs, e); 575 luaK_exp2val(fs, e);
576 if (e->k == VK && ttype(&fs->f->k[e->info]) == LUA_TNUMBER) 576 if (e->k == VK && ttisnumber(&fs->f->k[e->info]))
577 e->info = luaK_numberK(fs, -nvalue(&fs->f->k[e->info])); 577 e->info = luaK_numberK(fs, -nvalue(&fs->f->k[e->info]));
578 else { 578 else {
579 luaK_exp2anyreg(fs, e); 579 luaK_exp2anyreg(fs, e);