** return the final target of a jump (skipping jumps to jumps) */
| 1827 | ** return the final target of a jump (skipping jumps to jumps) |
| 1828 | */ |
| 1829 | static int finaltarget (Instruction *code, int i) { |
| 1830 | int count; |
| 1831 | for (count = 0; count < 100; count++) { /* avoid infinite loops */ |
| 1832 | Instruction pc = code[i]; |
| 1833 | if (GET_OPCODE(pc) != OP_JMP) |
| 1834 | break; |
| 1835 | else |
| 1836 | i += GETARG_sJ(pc) + 1; |
| 1837 | } |
| 1838 | return i; |
| 1839 | } |
| 1840 | |
| 1841 | |
| 1842 | /* |