MCPcopy Create free account
hub / github.com/Cubitect/cubiomes-viewer / patchlistaux

Function patchlistaux

lua/src/lcode.c:288–298  ·  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

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

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