Lines Matching refs:bl
258 BlockCnt *bl = fs->bl; in markupval() local
259 while (bl->nactvar > level) bl = bl->previous; in markupval()
260 bl->upval = 1; in markupval()
363 BlockCnt *bl = ls->fs->bl; in findlabel() local
367 for (i = bl->firstlabel; i < dyd->label.n; i++) { in findlabel()
371 (bl->upval || dyd->label.n > bl->firstlabel)) in findlabel()
401 int i = ls->fs->bl->firstgoto; in findgotos()
417 static void movegotosout (FuncState *fs, BlockCnt *bl) { in movegotosout() argument
418 int i = bl->firstgoto; in movegotosout()
424 if (gt->nactvar > bl->nactvar) { in movegotosout()
425 if (bl->upval) in movegotosout()
426 luaK_patchclose(fs, gt->pc, bl->nactvar); in movegotosout()
427 gt->nactvar = bl->nactvar; in movegotosout()
435 static void enterblock (FuncState *fs, BlockCnt *bl, lu_byte isloop) { in enterblock() argument
436 bl->isloop = isloop; in enterblock()
437 bl->nactvar = fs->nactvar; in enterblock()
438 bl->firstlabel = fs->ls->dyd->label.n; in enterblock()
439 bl->firstgoto = fs->ls->dyd->gt.n; in enterblock()
440 bl->upval = 0; in enterblock()
441 bl->previous = fs->bl; in enterblock()
442 fs->bl = bl; in enterblock()
470 BlockCnt *bl = fs->bl; in leaveblock() local
472 if (bl->previous && bl->upval) { in leaveblock()
475 luaK_patchclose(fs, j, bl->nactvar); in leaveblock()
478 if (bl->isloop) in leaveblock()
480 fs->bl = bl->previous; in leaveblock()
481 removevars(fs, bl->nactvar); in leaveblock()
482 lua_assert(bl->nactvar == fs->nactvar); in leaveblock()
484 ls->dyd->label.n = bl->firstlabel; /* remove local labels */ in leaveblock()
485 if (bl->previous) /* inner block? */ in leaveblock()
486 movegotosout(fs, bl); /* update pending gotos to outer block */ in leaveblock()
487 else if (bl->firstgoto < ls->dyd->gt.n) /* pending gotos in outer block? */ in leaveblock()
488 undefgoto(ls, &ls->dyd->gt.arr[bl->firstgoto]); /* error */ in leaveblock()
524 static void open_func (LexState *ls, FuncState *fs, BlockCnt *bl) { in open_func() argument
540 fs->bl = NULL; in open_func()
548 enterblock(fs, bl, 0); in open_func()
570 lua_assert(fs->bl == NULL); in close_func()
794 BlockCnt bl; in body() local
797 open_func(ls, &new_fs, &bl); in body()
1088 BlockCnt bl; in block() local
1089 enterblock(fs, &bl, 0); in block()
1200 for (i = fs->bl->firstlabel; i < ll->n; i++) { in checkrepeated()
1230 ll->arr[l].nactvar = fs->bl->nactvar; in labelstat()
1241 BlockCnt bl; in whilestat() local
1245 enterblock(fs, &bl, 1); in whilestat()
1288 BlockCnt bl; in forbody() local
1294 enterblock(fs, &bl, 0); /* scope for declared variables */ in forbody()
1363 BlockCnt bl; in forstat() local
1364 enterblock(fs, &bl, 1); /* scope for loop and control variables */ in forstat()
1380 BlockCnt bl; in test_then_block() local
1389 enterblock(fs, &bl, 0); /* must enter block before 'goto' */ in test_then_block()
1401 enterblock(fs, &bl, 0); in test_then_block()
1609 BlockCnt bl; in mainfunc() local
1611 open_func(ls, fs, &bl); in mainfunc()