(self, cfgnode_0, cfgnode_1)
Merge two adjacent CFGNodes into one.

        :param CFGNode cfgnode_0:   The first CFGNode.
        :param CFGNode cfgnode_1:   The second CFGNode.
        :return:                    None
Merge two adjacent CFGNodes into one.
Merge two adjacent CFGNodes into one .
def _merge_cfgnodes(self, cfgnode_0, cfgnode_1):
        """
        Merge two adjacent CFGNodes into one.

        :param CFGNode cfgnode_0:   The first CFGNode.
        :param CFGNode cfgnode_1:   The second CFGNode.
        :return:                    None
        """

        assert cfgnode_0.addr + cfgnode_0.size == cfgnode_1.addr
        new_node = cfgnode_0.merge(cfgnode_1)

        # Update the graph and the nodes dict accordingly
        self._model.remove_node(cfgnode_1.block_id, cfgnode_1)
        self._model.remove_node(cfgnode_0.block_id, cfgnode_0)

        in_edges = list(self.graph.in_edges(cfgnode_0, data=True))
        out_edges = list(self.graph.out_edges(cfgnode_1, data=True))

        self.graph.remove_node(cfgnode_0)
        self.graph.remove_node(cfgnode_1)

        self.graph.add_node(new_node)
        for src, _, data in in_edges:
            self.graph.add_edge(src, new_node, **data)
        for _, dst, data in out_edges:
            self.graph.add_edge(new_node, dst, **data)

        # Put the new node into node dicts
        self._model.add_node(new_node.block_id, new_node)
def _merge_cfgnodes ( self , cfgnode_0 , cfgnode_1 ) : assert cfgnode_0 . addr + cfgnode_0 . size == cfgnode_1 . addr new_node = cfgnode_0 . merge ( cfgnode_1 ) # Update the graph and the nodes dict accordingly self . _model . remove_node ( cfgnode_1 . block_id , cfgnode_1 ) self . _model . remove_node ( cfgnode_0 . block_id , cfgnode_0 ) in_edges = list ( self . graph . in_edges ( cfgnode_0 , data = True ) ) out_edges = list ( self . graph . out_edges ( cfgnode_1 , data = True ) ) self . graph . remove_node ( cfgnode_0 ) self . graph . remove_node ( cfgnode_1 ) self . graph . add_node ( new_node ) for src , _ , data in in_edges : self . graph . add_edge ( src , new_node , * * data ) for _ , dst , data in out_edges : self . graph . add_edge ( new_node , dst , * * data ) # Put the new node into node dicts self . _model . add_node ( new_node . block_id , new_node )