…lines 1–163 unchanged (163 lines)
164 (n.getNext() == null || n.getNext().isFunction())) {
165
166 Preconditions.checkState(
167 outEdges.get(0).getValue() == Branch.UNCOND);
168 Node fallThrough = computeFollowing(n);
169 Node nextCfgNode = outEdges.get(0).getDestination().getValue();
170 if (nextCfgNode == fallThrough && !inFinally(n.getParent(), n)) {
171 removeNode(n);
172 }
173 }
174 }
175 }
176
177 private boolean inFinally(Node parent, Node child) {
178 if (parent == null || parent.isFunction()) {
179 return false;
180 } else if (NodeUtil.isTryFinallyNode(parent, child)) {
181 return true;
182 } else {
183 return inFinally(parent.getParent(), parent);
184 }
185 }
186
187 private Node computeFollowing(Node n) {
188 Node next = ControlFlowAnalysis.computeFollowNode(n);
189 while (next != null && next.isBlock()) {
190 if (next.hasChildren()) {
191 next = next.getFirstChild();
…lines 192–260 unchanged (69 lines)