aboutsummaryrefslogtreecommitdiff
path: root/lcode.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2007-03-27 11:11:38 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2007-03-27 11:11:38 -0300
commit5f4f0d4a6371e950a9606ab16780a8933017e54b (patch)
tree669ea1f3c97950391f8a7d52d5015ea43e3b98c8 /lcode.c
parent8e36e1fe4928c60a09573a850e6807d922a56664 (diff)
downloadlua-5f4f0d4a6371e950a9606ab16780a8933017e54b.tar.gz
lua-5f4f0d4a6371e950a9606ab16780a8933017e54b.tar.bz2
lua-5f4f0d4a6371e950a9606ab16780a8933017e54b.zip
no more optimization to avoid LOADNIL at function start
Diffstat (limited to 'lcode.c')
-rw-r--r--lcode.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/lcode.c b/lcode.c
index d76f76ad..ca94ca43 100644
--- a/lcode.c
+++ b/lcode.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lcode.c,v 2.31 2006/10/10 17:39:00 roberto Exp roberto $ 2** $Id: lcode.c,v 2.32 2007/03/09 18:50:56 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*/
@@ -35,8 +35,6 @@ static int isnumeral(expdesc *e) {
35void luaK_nil (FuncState *fs, int from, int n) { 35void luaK_nil (FuncState *fs, int from, int n) {
36 Instruction *previous; 36 Instruction *previous;
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? */
39 return; /* positions are already clean */
40 previous = &fs->f->code[fs->pc-1]; 38 previous = &fs->f->code[fs->pc-1];
41 if (GET_OPCODE(*previous) == OP_LOADNIL) { 39 if (GET_OPCODE(*previous) == OP_LOADNIL) {
42 int pfrom = GETARG_A(*previous); 40 int pfrom = GETARG_A(*previous);