MCPcopy Create free account
hub / github.com/DFHack/dfhack / patchlistaux

Function patchlistaux

depends/lua/src/lcode.c:224–234  ·  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

222** values in 'reg'), other tests jump to 'dtarget'.
223*/
224static void patchlistaux (FuncState *fs, int list, int vtarget, int reg,
225 int dtarget) {
226 while (list != NO_JUMP) {
227 int next = getjump(fs, list);
228 if (patchtestreg(fs, list, reg))
229 fixjump(fs, list, vtarget);
230 else
231 fixjump(fs, list, dtarget); /* jump to default target */
232 list = next;
233 }
234}
235
236
237/*

Callers 3

dischargejpcFunction · 0.85
luaK_patchlistFunction · 0.85
exp2regFunction · 0.85

Calls 3

getjumpFunction · 0.85
patchtestregFunction · 0.85
fixjumpFunction · 0.85

Tested by

no test coverage detected