** Concatenate jump-list 'l2' into jump-list 'l1' */
| 114 | ** Concatenate jump-list 'l2' into jump-list 'l1' |
| 115 | */ |
| 116 | void luaK_concat (FuncState *fs, int *l1, int l2) { |
| 117 | if (l2 == NO_JUMP) return; /* nothing to concatenate? */ |
| 118 | else if (*l1 == NO_JUMP) /* no original list? */ |
| 119 | *l1 = l2; /* 'l1' points to 'l2' */ |
| 120 | else { |
| 121 | int list = *l1; |
| 122 | int next; |
| 123 | while ((next = getjump(fs, list)) != NO_JUMP) /* find last element */ |
| 124 | list = next; |
| 125 | fixjump(fs, list, l2); /* last element links to 'l2' */ |
| 126 | } |
| 127 | } |
| 128 | |
| 129 | |
| 130 | /* |