2321 case Bytecodes::_if_acmpne: |
2321 case Bytecodes::_if_acmpne: |
2322 case Bytecodes::_ifnull: |
2322 case Bytecodes::_ifnull: |
2323 case Bytecodes::_ifnonnull: |
2323 case Bytecodes::_ifnonnull: |
2324 target = bcs.dest(); |
2324 target = bcs.dest(); |
2325 if (visited_branches->contains(bci)) { |
2325 if (visited_branches->contains(bci)) { |
2326 if (bci_stack->is_empty()) return true; |
2326 if (bci_stack->is_empty()) { |
2327 // Pop a bytecode starting offset and scan from there. |
2327 if (handler_stack->is_empty()) { |
2328 bcs.set_start(bci_stack->pop()); |
2328 return true; |
|
2329 } else { |
|
2330 // Parse the catch handlers for try blocks containing athrow. |
|
2331 bcs.set_start(handler_stack->pop()); |
|
2332 } |
|
2333 } else { |
|
2334 // Pop a bytecode starting offset and scan from there. |
|
2335 bcs.set_start(bci_stack->pop()); |
|
2336 } |
2329 } else { |
2337 } else { |
2330 if (target > bci) { // forward branch |
2338 if (target > bci) { // forward branch |
2331 if (target >= code_length) return false; |
2339 if (target >= code_length) return false; |
2332 // Push the branch target onto the stack. |
2340 // Push the branch target onto the stack. |
2333 bci_stack->push(target); |
2341 bci_stack->push(target); |
2346 |
2354 |
2347 case Bytecodes::_goto: |
2355 case Bytecodes::_goto: |
2348 case Bytecodes::_goto_w: |
2356 case Bytecodes::_goto_w: |
2349 target = (opcode == Bytecodes::_goto ? bcs.dest() : bcs.dest_w()); |
2357 target = (opcode == Bytecodes::_goto ? bcs.dest() : bcs.dest_w()); |
2350 if (visited_branches->contains(bci)) { |
2358 if (visited_branches->contains(bci)) { |
2351 if (bci_stack->is_empty()) return true; |
2359 if (bci_stack->is_empty()) { |
2352 // Been here before, pop new starting offset from stack. |
2360 if (handler_stack->is_empty()) { |
2353 bcs.set_start(bci_stack->pop()); |
2361 return true; |
|
2362 } else { |
|
2363 // Parse the catch handlers for try blocks containing athrow. |
|
2364 bcs.set_start(handler_stack->pop()); |
|
2365 } |
|
2366 } else { |
|
2367 // Been here before, pop new starting offset from stack. |
|
2368 bcs.set_start(bci_stack->pop()); |
|
2369 } |
2354 } else { |
2370 } else { |
2355 if (target >= code_length) return false; |
2371 if (target >= code_length) return false; |
2356 // Continue scanning from the target onward. |
2372 // Continue scanning from the target onward. |
2357 bcs.set_start(target); |
2373 bcs.set_start(target); |
2358 // Record target so we don't branch here again. |
2374 // Record target so we don't branch here again. |