** Solves forward jumps. Check whether new label 'lb' matches any ** pending gotos in current block and solves them. Return true ** if any of the goto's need to close upvalues. */
| 571 | ** if any of the goto's need to close upvalues. |
| 572 | */ |
| 573 | static int solvegotos (LexState *ls, Labeldesc *lb) { |
| 574 | Labellist *gl = &ls->dyd->gt; |
| 575 | int i = ls->fs->bl->firstgoto; |
| 576 | int needsclose = 0; |
| 577 | while (i < gl->n) { |
| 578 | if (eqstr(gl->arr[i].name, lb->name)) { |
| 579 | needsclose |= gl->arr[i].close; |
| 580 | solvegoto(ls, i, lb); /* will remove 'i' from the list */ |
| 581 | } |
| 582 | else |
| 583 | i++; |
| 584 | } |
| 585 | return needsclose; |
| 586 | } |
| 587 | |
| 588 | |
| 589 | /* |
no test coverage detected