continue;
}
visited[step.block] = true;
startLocations.set(step.block, step.startLocations);
BasicBlock block = program.basicBlockAt(step.block);
InstructionLocation location = step.location;
boolean started = false;
for (Instruction insn : block.getInstructions()) {
if (insn.getLocation() != null) {
if (!started) {
step.startLocations.add(insn.getLocation());
}
started = true;
if (blockLocations[step.block] == null) {
blockLocations[step.block] = insn.getLocation();
}
if (location != null && !Objects.equals(location, insn.getLocation())) {
addEdge(location, insn.getLocation());
}
location = insn.getLocation();
}
}
if (graph.outgoingEdgesCount(step.block) == 0) {
if (location != null) {
addEdge(location, new InstructionLocation(null, -1));
}
} else {
for (int next : graph.outgoingEdges(step.block)) {
stack.push(new Step(location, started ? new HashSet<InstructionLocation>() : step.startLocations,
next));