MCPcopy Create free account
hub / github.com/CppCXY/EmmyLuaCodeStyle / need_value

Function need_value

3rd/lua-5.4.3/src/lcode.c:880–886  ·  view source on GitHub ↗

** check whether list has any jump that do not produce a value ** or produce an inverted value */

Source from the content-addressed store, hash-verified

878** or produce an inverted value
879*/
880static int need_value (FuncState *fs, int list) {
881 for (; list != NO_JUMP; list = getjump(fs, list)) {
882 Instruction i = *getjumpcontrol(fs, list);
883 if (GET_OPCODE(i) != OP_TESTSET) return 1;
884 }
885 return 0; /* not found */
886}
887
888
889/*

Callers 1

exp2regFunction · 0.85

Calls 2

getjumpFunction · 0.85
getjumpcontrolFunction · 0.85

Tested by

no test coverage detected