mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-02-07 23:24:09 +00:00
Fix line number for relocated bytecode after closure fixup.
This commit is contained in:
parent
5d25645a21
commit
4fba08a9ac
@ -1555,7 +1555,9 @@ static void fs_fixup_ret(FuncState *fs)
|
|||||||
switch (bc_op(ins)) {
|
switch (bc_op(ins)) {
|
||||||
case BC_CALLMT: case BC_CALLT:
|
case BC_CALLMT: case BC_CALLT:
|
||||||
case BC_RETM: case BC_RET: case BC_RET0: case BC_RET1:
|
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)
|
if (offset > BCMAX_D)
|
||||||
err_syntax(fs->ls, LJ_ERR_XFIXUP);
|
err_syntax(fs->ls, LJ_ERR_XFIXUP);
|
||||||
/* Replace with UCLO plus branch. */
|
/* Replace with UCLO plus branch. */
|
||||||
|
Loading…
Reference in New Issue
Block a user