MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / getjumpcontrol

Function getjumpcontrol

lib/lua/src/lcode.c:243–249  ·  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

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

Callers 3

patchtestregFunction · 0.85
need_valueFunction · 0.85
negateconditionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected