boolean (ExprentIterator iter) { CancellationManager cancellationManager = DecompilerContext.getCancellationManager(); LinkedList<DirectNode> stack = new LinkedList<>(); stack.add(first); HashSet<DirectNode> setVisited = new HashSet<>(); while (!stack.isEmpty()) { DirectNode node = stack.removeFirst(); if (setVisited.contains(node)) { continue; } setVisited.add(node); for (int i = 0; i < node.exprents.size(); i++) { cancellationManager.checkCanceled(); int res = iter.processExprent(node.exprents.get(i)); if (res == 1) { return false; } if (res == 2) { node.exprents.remove(i); i--; } } stack.addAll(node.successors); } return true; }