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

Function luaK_jump

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

** Create a jump instruction and return its position, so its destination ** can be fixed later (with 'fixjump'). If there are jumps to ** this position (kept in 'jpc'), link them all together so that ** 'patchlistaux' will fix all them directly to the final destination. */

Source from the content-addressed store, hash-verified

141** 'patchlistaux' will fix all them directly to the final destination.
142*/
143int luaK_jump (FuncState *fs) {
144 int jpc = fs->jpc; /* save list of jumps to here */
145 int j;
146 fs->jpc = NO_JUMP; /* no more jumps to here */
147 j = luaK_codeAsBx(fs, OP_JMP, 0, NO_JUMP);
148 luaK_concat(fs, &j, jpc); /* keep them on hold */
149 return j;
150}
151
152
153/*

Callers 6

leaveblockFunction · 0.85
forbodyFunction · 0.85
test_then_blockFunction · 0.85
statementFunction · 0.85
condjumpFunction · 0.85
exp2regFunction · 0.85

Calls 1

luaK_concatFunction · 0.85

Tested by 1

test_then_blockFunction · 0.68