MCPcopy Create free account
hub / github.com/SakuraEngine/SakuraEngine / finaltarget

Function finaltarget

xrepo/packages/l/lua/port/lua/src/lcode.c:1787–1797  ·  view source on GitHub ↗

** return the final target of a jump (skipping jumps to jumps) */

Source from the content-addressed store, hash-verified

1785** return the final target of a jump (skipping jumps to jumps)
1786*/
1787static int finaltarget (Instruction *code, int i) {
1788 int count;
1789 for (count = 0; count < 100; count++) { /* avoid infinite loops */
1790 Instruction pc = code[i];
1791 if (GET_OPCODE(pc) != OP_JMP)
1792 break;
1793 else
1794 i += GETARG_sJ(pc) + 1;
1795 }
1796 return i;
1797}
1798
1799
1800/*

Callers 1

luaK_finishFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected