** return the final target of a jump (skipping jumps to jumps) */
| 1785 | ** return the final target of a jump (skipping jumps to jumps) |
| 1786 | */ |
| 1787 | static 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 | /* |