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

Function whilestat

app/redis-6.2.6/deps/lua/src/lparser.c:995–1011  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

993
994
995static void whilestat (LexState *ls, int line) {
996 /* whilestat -> WHILE cond DO block END */
997 FuncState *fs = ls->fs;
998 int whileinit;
999 int condexit;
1000 BlockCnt bl;
1001 luaX_next(ls); /* skip WHILE */
1002 whileinit = luaK_getlabel(fs);
1003 condexit = cond(ls);
1004 enterblock(fs, &bl, 1);
1005 checknext(ls, TK_DO);
1006 block(ls);
1007 luaK_patchlist(fs, luaK_jump(fs), whileinit);
1008 check_match(ls, TK_END, TK_WHILE, line);
1009 leaveblock(fs);
1010 luaK_patchtohere(fs, condexit); /* false conditions finish the loop */
1011}
1012
1013
1014static void repeatstat (LexState *ls, int line) {

Callers 1

statementFunction · 0.70

Calls 11

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

Tested by

no test coverage detected