MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / getjumpcontrol

Function getjumpcontrol

third-party/lua-5.5.0/src/lcode.c:245–251  ·  view source on GitHub ↗

** Returns the position of the instruction "controlling" a given ** jump (that is, its condition), or the jump itself if it is ** unconditional. */

Source from the content-addressed store, hash-verified

243** unconditional.
244*/
245static Instruction *getjumpcontrol (FuncState *fs, int pc) {
246 Instruction *pi = &fs->f->code[pc];
247 if (pc >= 1 && testTMode(GET_OPCODE(*(pi-1))))
248 return pi-1;
249 else
250 return pi;
251}
252
253
254/*

Callers 3

patchtestregFunction · 0.70
need_valueFunction · 0.70
negateconditionFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected