aboutsummaryrefslogtreecommitdiff
path: root/lcode.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2006-09-22 17:24:38 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2006-09-22 17:24:38 -0300
commit3c8865cf66db165e0266b642a1fdcff6c72a9e24 (patch)
tree431ae0414fec7fa87d92ed7f9c03dca49bc9929c /lcode.c
parent569a3269311f1554be345fefdeffe6f7b374a56f (diff)
downloadlua-3c8865cf66db165e0266b642a1fdcff6c72a9e24.tar.gz
lua-3c8865cf66db165e0266b642a1fdcff6c72a9e24.tar.bz2
lua-3c8865cf66db165e0266b642a1fdcff6c72a9e24.zip
detail
Diffstat (limited to 'lcode.c')
-rw-r--r--lcode.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lcode.c b/lcode.c
index 450b2eeb..490c7232 100644
--- a/lcode.c
+++ b/lcode.c
@@ -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? */