** Solves forward jumps. Check whether new label 'lb' matches any ** pending gotos in current block and solves them. Return true ** if any of the gotos need to close upvalues. */
| 583 | ** if any of the gotos need to close upvalues. |
| 584 | */ |
| 585 | static int solvegotos (LexState *ls, Labeldesc *lb) { |
| 586 | Labellist *gl = &ls->dyd->gt; |
| 587 | int i = ls->fs->bl->firstgoto; |
| 588 | int needsclose = 0; |
| 589 | while (i < gl->n) { |
| 590 | if (eqstr(gl->arr[i].name, lb->name)) { |
| 591 | needsclose |= gl->arr[i].close; |
| 592 | solvegoto(ls, i, lb); /* will remove 'i' from the list */ |
| 593 | } |
| 594 | else |
| 595 | i++; |
| 596 | } |
| 597 | return needsclose; |
| 598 | } |
| 599 | |
| 600 | |
| 601 | /* |
no test coverage detected