/* 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.)  */
void luaK_patchclose(FuncState *fs, int list, int level)
/* 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.)  */
void luaK_patchclose(FuncState *fs, int list, int level)
{
    lua_assert(GET_OPCODE(fs->f->code[list]) == OP_JMP &&
                (GETARG_A(fs->f->code[list]) == 0 ||
                 GETARG_A(fs->f->code[list]) >= level));
    SETARG_A(fs->f->code[list], level);
  }
}