** return the final target of a jump (skipping jumps to jumps) */
| 2124 | ** return the final target of a jump (skipping jumps to jumps) |
| 2125 | */ |
| 2126 | static int finaltarget (Instruction *code, int i) { |
| 2127 | int count; |
| 2128 | for (count = 0; count < 100; count++) { /* avoid infinite loops */ |
| 2129 | Instruction pc = code[i]; |
| 2130 | if (GET_OPCODE(pc) != OP_JMP) |
| 2131 | break; |
| 2132 | else |
| 2133 | i += GETARG_sJ(pc) + 1; |
| 2134 | } |
| 2135 | return i; |
| 2136 | } |
| 2137 | |
| 2138 | |
| 2139 | /* |