Lines Matching +defs:label +defs:offset

55   int firstlabel;  /* index of first label in this block */
527 ** Solves the goto at index 'g' to given 'label' and removes it
531 static void solvegoto (LexState *ls, int g, Labeldesc *label) {
535 lua_assert(eqstr(gt->name, label->name));
536 if (l_unlikely(gt->nactvar < label->nactvar)) /* enter some scope? */
538 luaK_patchlist(ls->fs, gt->pc, label->pc);
546 ** Search for an active label with the given name.
552 for (i = ls->fs->firstlabel; i < dyd->label.n; i++) {
553 Labeldesc *lb = &dyd->label.arr[i];
554 if (eqstr(lb->name, name)) /* correct label? */
557 return NULL; /* label not found */
562 ** Adds a new label/goto in the corresponding list.
585 ** Solves forward jumps. Check whether new label 'lb' matches any
606 ** Create a new label with the given 'name' at the given 'line'.
607 ** 'last' tells whether label is the last non-op statement in its
608 ** block. Solves all pending gotos to this new label and adds
615 Labellist *ll = &ls->dyd->label;
617 if (last) { /* label is last no-op statement in the block? */
649 bl->firstlabel = fs->ls->dyd->label.n;
669 msg = "no visible label '%s' for <goto> at line %d";
688 ls->dyd->label.n = bl->firstlabel; /* remove local labels */
751 fs->firstlabel = ls->dyd->label.n;
1433 TString *name = str_checkname(ls); /* label's name */
1435 if (lb == NULL) /* no label? */
1436 /* forward jump; will be resolved when the label is declared */
1438 else { /* found a label */
1440 int lblevel = reglevel(fs, lb->nactvar); /* label level */
1443 /* create jump and link it to the label */
1460 ** Check whether there is already a label with the given 'name'.
1465 const char *msg = "label '%s' already defined on line %d";
1473 /* label -> '::' NAME '::' */
1546 int offset = dest - (pc + 1);
1548 offset = -offset;
1549 if (l_unlikely(offset > MAXARG_Bx))
1551 SETARG_Bx(*jmp, offset);
1901 case TK_DBCOLON: { /* stat -> label */
1972 dyd->actvar.n = dyd->gt.n = dyd->label.n = 0;
1977 lua_assert(dyd->actvar.n == 0 && dyd->gt.n == 0 && dyd->label.n == 0);