diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2005-05-20 12:53:42 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2005-05-20 12:53:42 -0300 |
commit | f21e9c172f9f15d8d7501e35635e78dc11f5ff58 (patch) | |
tree | cb50795d8bceff944dd8f7d75626069491d5e8d0 /lcode.c | |
parent | 67578ec51f1a3ec2c967f15d370067caf9e0b87b (diff) | |
download | lua-f21e9c172f9f15d8d7501e35635e78dc11f5ff58.tar.gz lua-f21e9c172f9f15d8d7501e35635e78dc11f5ff58.tar.bz2 lua-f21e9c172f9f15d8d7501e35635e78dc11f5ff58.zip |
details
Diffstat (limited to 'lcode.c')
-rw-r--r-- | lcode.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lcode.c,v 2.11 2005/03/09 16:28:07 roberto Exp roberto $ | 2 | ** $Id: lcode.c,v 2.12 2005/03/16 16:59:21 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 | */ |
@@ -607,7 +607,7 @@ void luaK_prefix (FuncState *fs, UnOpr op, expdesc *e) { | |||
607 | case OPR_MINUS: { | 607 | case OPR_MINUS: { |
608 | luaK_exp2val(fs, e); | 608 | luaK_exp2val(fs, e); |
609 | if (e->k == VK && ttisnumber(&fs->f->k[e->info])) | 609 | if (e->k == VK && ttisnumber(&fs->f->k[e->info])) |
610 | e->info = luaK_numberK(fs, luai_numunm(nvalue(&fs->f->k[e->info]))); | 610 | e->info = luaK_numberK(fs, luai_numunm(L, nvalue(&fs->f->k[e->info]))); |
611 | else { | 611 | else { |
612 | luaK_exp2anyreg(fs, e); | 612 | luaK_exp2anyreg(fs, e); |
613 | freeexp(fs, e); | 613 | freeexp(fs, e); |
@@ -620,10 +620,10 @@ void luaK_prefix (FuncState *fs, UnOpr op, expdesc *e) { | |||
620 | codenot(fs, e); | 620 | codenot(fs, e); |
621 | break; | 621 | break; |
622 | } | 622 | } |
623 | case OPR_SIZE: { | 623 | case OPR_LEN: { |
624 | luaK_exp2anyreg(fs, e); | 624 | luaK_exp2anyreg(fs, e); |
625 | freeexp(fs, e); | 625 | freeexp(fs, e); |
626 | e->info = luaK_codeABC(fs, OP_SIZ, 0, e->info, 0); | 626 | e->info = luaK_codeABC(fs, OP_LEN, 0, e->info, 0); |
627 | e->k = VRELOCABLE; | 627 | e->k = VRELOCABLE; |
628 | break; | 628 | break; |
629 | } | 629 | } |