Python: Write DataFlow::update more succinctly

This has no impact on performance, but it cleans up the code a bit,
and (hopefully) makes it more readable.
This commit is contained in:
Taus Brock-Nannestad
2020-11-05 16:47:41 +01:00
parent bae4acabb1
commit 7c58b28e36

View File

@@ -215,10 +215,7 @@ private predicate localEssaStep(EssaNode nodeFrom, EssaNode nodeTo) {
* Holds if `result` is either `node`, or the post-update node for `node`.
*/
private Node update(Node node) {
exists(PostUpdateNode pun |
node = pun.getPreUpdateNode() and
result = pun
)
node = result.(PostUpdateNode).getPreUpdateNode()
or
result = node
}