From 4eb4b8ab8471233d63ae9644cdf304b847b3bbdc Mon Sep 17 00:00:00 2001 From: Mike Pall Date: Thu, 31 Jan 2013 12:36:23 +0100 Subject: [PATCH] Keep line number for KPRI to KNIL optimization. --- src/lj_parse.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lj_parse.c b/src/lj_parse.c index 7268d176..de6672ba 100644 --- a/src/lj_parse.c +++ b/src/lj_parse.c @@ -481,8 +481,8 @@ static void bcemit_nil(FuncState *fs, BCReg from, BCReg n) } else { break; } - fs->pc--; /* Drop KPRI. */ - break; + *ip = BCINS_AD(BC_KNIL, from, from+n-1); /* Replace KPRI. */ + return; case BC_KNIL: pto = bc_d(*ip); if (pfrom <= from && from <= pto+1) { /* Can we connect both ranges? */ -- 2.11.4.GIT