aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/create_embedded_tools.py
diff options
context:
space:
mode:
authorGravatar brandjon <brandjon@google.com>2017-08-30 18:33:54 +0200
committerGravatar Vladimir Moskva <vladmos@google.com>2017-08-31 13:32:58 +0200
commitf12402b2627f8eeb70ee24f457efe007206f9b42 (patch)
tree4ac66f42135291fddb6dec449b8f33eca1eb3cd8 /src/create_embedded_tools.py
parent4a84bcc629c83c588e3d50b176f71357fd74b73f (diff)
Make ControlFlowChecker follow the dataflow analysis idiom more closely
This makes ControlFlowInfo an ADT handling its own join operation, and combines the list of return statements into that structure. This is less error-prone if a new field is added, and helps simplify the logic in visit(IfStatement). The invariants regarding the cf field are also clarified: It is "transferred" (in dataflow analysis terminology) from the point before the node to the point after the node by the visit() function. It is also undefined (null) outside of a function definition. There's a cost to this CL in terms of LOC and maybe even memory allocations, but I suspect that's outweighed by sticking to a known paradigm for flow analysis. RELNOTES: None PiperOrigin-RevId: 167005045
Diffstat (limited to 'src/create_embedded_tools.py')
0 files changed, 0 insertions, 0 deletions