** Fix for instruction at position 'pc' to jump to 'dest'. ** (Jump addresses are relative in Lua). 'back' true means ** a back jump. */
| 1509 | ** a back jump. |
| 1510 | */ |
| 1511 | static void fixforjump (FuncState *fs, int pc, int dest, int back) { |
| 1512 | Instruction *jmp = &fs->f->code[pc]; |
| 1513 | int offset = dest - (pc + 1); |
| 1514 | if (back) |
| 1515 | offset = -offset; |
| 1516 | if (unlikely(offset > MAXARG_Bx)) |
| 1517 | luaX_syntaxerror(fs->ls, "control structure too long"); |
| 1518 | SETARG_Bx(*jmp, offset); |
| 1519 | } |
| 1520 | |
| 1521 | |
| 1522 | /* |
no test coverage detected