** 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.) */
| 274 | ** or were closing higher levels, from inner blocks.) |
| 275 | */ |
| 276 | void luaK_patchclose (FuncState *fs, int list, int level) { |
| 277 | level++; /* argument is +1 to reserve 0 as non-op */ |
| 278 | for (; list != NO_JUMP; list = getjump(fs, list)) { |
| 279 | lua_assert(GET_OPCODE(fs->f->code[list]) == OP_JMP && |
| 280 | (GETARG_A(fs->f->code[list]) == 0 || |
| 281 | GETARG_A(fs->f->code[list]) >= level)); |
| 282 | SETARG_A(fs->f->code[list], level); |
| 283 | } |
| 284 | } |
| 285 | |
| 286 | |
| 287 | /* |
no test coverage detected