** Concatenate jump-list 'l2' into jump-list 'l1' */
| 178 | ** Concatenate jump-list 'l2' into jump-list 'l1' |
| 179 | */ |
| 180 | void luaK_concat (FuncState *fs, int *l1, int l2) { |
| 181 | if (l2 == NO_JUMP) return; /* nothing to concatenate? */ |
| 182 | else if (*l1 == NO_JUMP) /* no original list? */ |
| 183 | *l1 = l2; /* 'l1' points to 'l2' */ |
| 184 | else { |
| 185 | int list = *l1; |
| 186 | int next; |
| 187 | while ((next = getjump(fs, list)) != NO_JUMP) /* find last element */ |
| 188 | list = next; |
| 189 | fixjump(fs, list, l2); /* last element links to 'l2' */ |
| 190 | } |
| 191 | } |
| 192 | |
| 193 | |
| 194 | /* |