MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / solvegotos

Function solvegotos

extlibs/lua/src/lparser.c:567–580  ·  view source on GitHub ↗

** 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. */

Source from the content-addressed store, hash-verified

565** if any of the goto's need to close upvalues.
566*/
567static int solvegotos (LexState *ls, Labeldesc *lb) {
568 Labellist *gl = &ls->dyd->gt;
569 int i = ls->fs->bl->firstgoto;
570 int needsclose = 0;
571 while (i < gl->n) {
572 if (eqstr(gl->arr[i].name, lb->name)) {
573 needsclose |= gl->arr[i].close;
574 solvegoto(ls, i, lb); /* will remove 'i' from the list */
575 }
576 else
577 i++;
578 }
579 return needsclose;
580}
581
582
583/*

Callers 1

createlabelFunction · 0.85

Calls 1

solvegotoFunction · 0.85

Tested by

no test coverage detected