nitc :: BasicBlock :: link
The two blocks are not linked if the current ends with a AReturnExpr
or ABreakExpr
i.e. self is the predecessor of successor
successor
The successor block
# Self is the old block to link to the new,
# The two blocks are not linked if the current ends with a `AReturnExpr` or `ABreakExpr`
# i.e. self is the predecessor of `successor`
# `successor` The successor block
fun link(successor: BasicBlock)
do
# Do not link the two blocks if the current block end with a return, break or continue
if last isa AReturnExpr or last isa ABreakExpr or last isa AContinueExpr then return
successors.add(successor)
successor.predecessors.add(self)
end
src/ssa.nit:51,2--62,4