** Fix jump instruction at position 'pc' to jump to 'dest'. ** (Jump addresses are relative in Lua) */
| 108 | ** (Jump addresses are relative in Lua) |
| 109 | */ |
| 110 | static void fixjump (FuncState *fs, int pc, int dest) { |
| 111 | Instruction *jmp = &fs->f->code[pc]; |
| 112 | int offset = dest - (pc + 1); |
| 113 | lua_assert(dest != NO_JUMP); |
| 114 | if (abs(offset) > MAXARG_sBx) |
| 115 | luaX_syntaxerror(fs->ls, "control structure too long"); |
| 116 | SETARG_sBx(*jmp, offset); |
| 117 | } |
| 118 | |
| 119 | |
| 120 | /* |
no test coverage detected