MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / patchlistaux

Function patchlistaux

extlibs/lua/src/lcode.c:287–297  ·  view source on GitHub ↗

** Traverse a list of tests, patching their destination address and ** registers: tests producing values jump to 'vtarget' (and put their ** values in 'reg'), other tests jump to 'dtarget'. */

Source from the content-addressed store, hash-verified

285** values in 'reg'), other tests jump to 'dtarget'.
286*/
287static void patchlistaux (FuncState *fs, int list, int vtarget, int reg,
288 int dtarget) {
289 while (list != NO_JUMP) {
290 int next = getjump(fs, list);
291 if (patchtestreg(fs, list, reg))
292 fixjump(fs, list, vtarget);
293 else
294 fixjump(fs, list, dtarget); /* jump to default target */
295 list = next;
296 }
297}
298
299
300/*

Callers 2

luaK_patchlistFunction · 0.85
exp2regFunction · 0.85

Calls 3

getjumpFunction · 0.85
patchtestregFunction · 0.85
fixjumpFunction · 0.85

Tested by

no test coverage detected