The ID of the entry node.
Normal exit node, if exists.
This would be the next statement after the current one in the source code.
For control-flow statements (like return, break, etc.) we won't have
an exit, as the control-flow doesn't reach it.
Similarly, blocks ending with a flow-altering statement won't have an exit.
OptionalcontinuesThe active continue nodes within this block.
A continue is active if it's target is outside the current block.
OptionalbreaksThe active break nodes within this block.
OptionallabelsAll the labels within this block.
The mapping is from the label's name to the labeled node.
OptionalgotosAll the active gotos within this block.
Active gotos are one that were not yet resolved.
OptionalfunctionAll the function-exit statements within the block.
As the CFG is a single-function graph, function-exit statements are never
resolved within it.
This includes things like return and throw and raise.
The
BasicBlockis used in the process of building a CFG. It is meant to represent a "statement" or "block" of source-code.It allows us to abstract over individual CFG nodes and work with something that's closer to the source code.
BasicBlockss can be nested, just like code structures. If we have aBasicBlockrepresenting anifstatement, it will haveBasicBlocks for the individual statements nested within it.Each
BasicBlockcan span many CFG nodes.