/* Create a new label with the given 'name' at the given 'line'. 'last' tells whether label is the last non-op statement in its block. Solves all pending goto's to this new label and adds a close instruction if necessary. Returns true iff it added a close instruction.  */
static int createlabel(LexState *ls, TString *name, int line, int last)
/* Create a new label with the given 'name' at the given 'line'. 'last' tells whether label is the last non-op statement in its block. Solves all pending goto's to this new label and adds a close instruction if necessary. Returns true iff it added a close instruction.  */
static int createlabel(LexState *ls, TString *name, int line, int last)
{
  FuncState *fs = ls->fs;
  Labellist *ll = &ls->dyd->label;
  int l = newlabelentry(ls, ll, name, line, luaK_getlabel(fs));
  if (last) {
    ll->arr[l].nactvar = fs->bl->nactvar;
  }
  if (solvegotos(ls, &ll->arr[l])) {
    luaK_codeABC(fs, OP_CLOSE, luaY_nvarstack(fs), 0, 0);
    return 1;
  }
  return 0;
}