** return the final target of a jump (skipping jumps to jumps) */
| 1909 | ** return the final target of a jump (skipping jumps to jumps) |
| 1910 | */ |
| 1911 | static int finaltarget (Instruction *code, int i) { |
| 1912 | int count; |
| 1913 | for (count = 0; count < 100; count++) { /* avoid infinite loops */ |
| 1914 | Instruction pc = code[i]; |
| 1915 | if (GET_OPCODE(pc) != OP_JMP) |
| 1916 | break; |
| 1917 | else |
| 1918 | i += GETARG_sJ(pc) + 1; |
| 1919 | } |
| 1920 | return i; |
| 1921 | } |
| 1922 | |
| 1923 | |
| 1924 | /* |