diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2006-09-22 17:24:38 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2006-09-22 17:24:38 -0300 |
commit | 3c8865cf66db165e0266b642a1fdcff6c72a9e24 (patch) | |
tree | 431ae0414fec7fa87d92ed7f9c03dca49bc9929c /lcode.c | |
parent | 569a3269311f1554be345fefdeffe6f7b374a56f (diff) | |
download | lua-3c8865cf66db165e0266b642a1fdcff6c72a9e24.tar.gz lua-3c8865cf66db165e0266b642a1fdcff6c72a9e24.tar.bz2 lua-3c8865cf66db165e0266b642a1fdcff6c72a9e24.zip |
detail
Diffstat (limited to 'lcode.c')
-rw-r--r-- | lcode.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lcode.c,v 2.28 2006/09/14 12:59:06 roberto Exp roberto $ | 2 | ** $Id: lcode.c,v 2.29 2006/09/14 18:42:28 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 | */ |
@@ -37,7 +37,8 @@ void luaK_nil (FuncState *fs, int from, int n) { | |||
37 | if (fs->pc > fs->lasttarget) { /* no jumps to current position? */ | 37 | if (fs->pc > fs->lasttarget) { /* no jumps to current position? */ |
38 | if (fs->pc == 0) /* function start? */ | 38 | if (fs->pc == 0) /* function start? */ |
39 | return; /* positions are already clean */ | 39 | return; /* positions are already clean */ |
40 | if (GET_OPCODE(*(previous = &fs->f->code[fs->pc-1])) == OP_LOADNIL) { | 40 | previous = &fs->f->code[fs->pc-1]; |
41 | if (GET_OPCODE(*previous) == OP_LOADNIL) { | ||
41 | int pfrom = GETARG_A(*previous); | 42 | int pfrom = GETARG_A(*previous); |
42 | int pto = GETARG_B(*previous); | 43 | int pto = GETARG_B(*previous); |
43 | if (pfrom <= from && from <= pto+1) { /* can connect both? */ | 44 | if (pfrom <= from && from <= pto+1) { /* can connect both? */ |