MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / luaK_jump

Function luaK_jump

third-party/lua-5.3.5/src/lcode.c:136–143  ·  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

134** 'patchlistaux' will fix all them directly to the final destination.
135*/
136int luaK_jump (FuncState *fs) {
137 int jpc = fs->jpc; /* save list of jumps to here */
138 int j;
139 fs->jpc = NO_JUMP; /* no more jumps to here */
140 j = luaK_codeAsBx(fs, OP_JMP, 0, NO_JUMP);
141 luaK_concat(fs, &j, jpc); /* keep them on hold */
142 return j;
143}
144
145
146/*

Callers 6

leaveblockFunction · 0.70
forbodyFunction · 0.70
test_then_blockFunction · 0.70
statementFunction · 0.70
condjumpFunction · 0.70
exp2regFunction · 0.70

Calls 1

luaK_concatFunction · 0.70

Tested by 1

test_then_blockFunction · 0.56