MCPcopy Create free account
hub / github.com/ArduPilot/ardupilot / luaK_patchlist

Function luaK_patchlist

libraries/AP_Scripting/lua/src/lcode.c:270–277  ·  view source on GitHub ↗

** Path all jumps in 'list' to jump to 'target'. ** (The assert means that we cannot fix a jump to a forward address ** because we only know addresses once code is generated.) */

Source from the content-addressed store, hash-verified

268** because we only know addresses once code is generated.)
269*/
270void luaK_patchlist (FuncState *fs, int list, int target) {
271 if (target == fs->pc) /* 'target' is current position? */
272 luaK_patchtohere(fs, list); /* add list to pending jumps */
273 else {
274 lua_assert(target < fs->pc);
275 patchlistaux(fs, list, target, NO_REG, target);
276 }
277}
278
279
280/*

Callers 3

closegotoFunction · 0.85
repeatstatFunction · 0.85
forbodyFunction · 0.85

Calls 2

luaK_patchtohereFunction · 0.85
patchlistauxFunction · 0.85

Tested by

no test coverage detected