Merge branch 'master' into v2.1

This commit is contained in:
Mike Pall 2013-10-15 22:47:42 +02:00
commit 570615300e

View File

@ -1525,7 +1525,9 @@ static void fs_fixup_ret(FuncState *fs)
switch (bc_op(ins)) {
case BC_CALLMT: case BC_CALLT:
case BC_RETM: case BC_RET: case BC_RET0: case BC_RET1:
offset = bcemit_INS(fs, ins)-(pc+1)+BCBIAS_J; /* Copy return ins. */
offset = bcemit_INS(fs, ins); /* Copy original instruction. */
fs->bcbase[offset].line = fs->bcbase[pc].line;
offset = offset-(pc+1)+BCBIAS_J;
if (offset > BCMAX_D)
err_syntax(fs->ls, LJ_ERR_XFIXUP);
/* Replace with UCLO plus branch. */