]> git.ipfire.org Git - thirdparty/LuaJIT.git/commitdiff
Keep line number for KPRI to KNIL optimization.
authorMike Pall <mike>
Thu, 31 Jan 2013 11:36:23 +0000 (12:36 +0100)
committerMike Pall <mike>
Thu, 31 Jan 2013 11:36:23 +0000 (12:36 +0100)
src/lj_parse.c

index 7268d176dd64ee99f268a2c77e717b528fbd56d4..de6672bac72ae52fbd00f65bfc160a61c3a9fdef 100644 (file)
@@ -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? */