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

Function whilestat

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

Source from the content-addressed store, hash-verified

1235
1236
1237static void whilestat (LexState *ls, int line) {
1238 /* whilestat -> WHILE cond DO block END */
1239 FuncState *fs = ls->fs;
1240 int whileinit;
1241 int condexit;
1242 BlockCnt bl;
1243 luaX_next(ls); /* skip WHILE */
1244 whileinit = luaK_getlabel(fs);
1245 condexit = cond(ls);
1246 enterblock(fs, &bl, 1);
1247 checknext(ls, TK_DO);
1248 block(ls);
1249 luaK_jumpto(fs, whileinit);
1250 check_match(ls, TK_END, TK_WHILE, line);
1251 leaveblock(fs);
1252 luaK_patchtohere(fs, condexit); /* false conditions finish the loop */
1253}
1254
1255
1256static void repeatstat (LexState *ls, int line) {

Callers 1

statementFunction · 0.70

Calls 9

luaX_nextFunction · 0.70
luaK_getlabelFunction · 0.70
condFunction · 0.70
enterblockFunction · 0.70
checknextFunction · 0.70
blockFunction · 0.70
check_matchFunction · 0.70
leaveblockFunction · 0.70
luaK_patchtohereFunction · 0.70

Tested by

no test coverage detected