MCPcopy Create free account
hub / github.com/F-Stack/f-stack / repeatstat

Function repeatstat

freebsd/contrib/openzfs/module/lua/lparser.c:1256–1273  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1254
1255
1256static void repeatstat (LexState *ls, int line) {
1257 /* repeatstat -> REPEAT block UNTIL cond */
1258 int condexit;
1259 FuncState *fs = ls->fs;
1260 int repeat_init = luaK_getlabel(fs);
1261 BlockCnt bl1, bl2;
1262 enterblock(fs, &bl1, 1); /* loop block */
1263 enterblock(fs, &bl2, 0); /* scope block */
1264 luaX_next(ls); /* skip REPEAT */
1265 statlist(ls);
1266 check_match(ls, TK_UNTIL, TK_REPEAT, line);
1267 condexit = cond(ls); /* read condition (inside scope block) */
1268 if (bl2.upval) /* upvalues? */
1269 luaK_patchclose(fs, condexit, bl2.nactvar);
1270 leaveblock(fs); /* finish scope */
1271 luaK_patchlist(fs, condexit, repeat_init); /* close the loop */
1272 leaveblock(fs); /* finish loop */
1273}
1274
1275
1276static int exp1 (LexState *ls) {

Callers 1

statementFunction · 0.70

Calls 9

statlistFunction · 0.85
luaK_patchcloseFunction · 0.85
luaK_getlabelFunction · 0.70
enterblockFunction · 0.70
luaX_nextFunction · 0.70
check_matchFunction · 0.70
condFunction · 0.70
leaveblockFunction · 0.70
luaK_patchlistFunction · 0.70

Tested by

no test coverage detected