** Path all jumps in 'list' to close upvalues up to given 'level' ** (The assertion checks that jumps either were closing nothing ** or were closing higher levels, from inner blocks.) */
| 276 | ** or were closing higher levels, from inner blocks.) |
| 277 | */ |
| 278 | void luaK_patchclose (FuncState *fs, int list, int level) { |
| 279 | level++; /* argument is +1 to reserve 0 as non-op */ |
| 280 | for (; list != NO_JUMP; list = getjump(fs, list)) { |
| 281 | lua_assert(GET_OPCODE(fs->f->code[list]) == OP_JMP && |
| 282 | (GETARG_A(fs->f->code[list]) == 0 || |
| 283 | GETARG_A(fs->f->code[list]) >= level)); |
| 284 | SETARG_A(fs->f->code[list], level); |
| 285 | } |
| 286 | } |
| 287 | |
| 288 | |
| 289 | /* |
no test coverage detected