boolean (final Instruction[] flow, final int start, final Processor<? super Instruction> processor) { final int length = flow.length; boolean[] visited = new boolean[length]; Arrays.fill(visited, false); final IntStack stack = new IntArrayList(length); stack.push(start); while (!stack.isEmpty()) { ProgressManager.checkCanceled(); final int num = stack.popInt(); final Instruction instruction = flow[num]; if (!processor.process(instruction)){ return false; } for (Instruction succ : instruction.allSucc()) { final int succNum = succ.num(); if (!visited[succNum]) { visited[succNum] = true; stack.push(succNum); } } } return true; }