about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorCamille Mougey <commial@gmail.com>2016-12-28 15:12:44 +0100
committerGitHub <noreply@github.com>2016-12-28 15:12:44 +0100
commitb3146a420c32af65fafc2fd8ea4c5087efcf6f39 (patch)
tree482d22c3e93877ca34f2badab763e6610f6fde2d
parent08d16006d57b0a6b4c954adc5da05232bf61d336 (diff)
parentf4278972c879a61d5fddfcff726d10cc129bd2f3 (diff)
downloadmiasm-b3146a420c32af65fafc2fd8ea4c5087efcf6f39.tar.gz
miasm-b3146a420c32af65fafc2fd8ea4c5087efcf6f39.zip
Merge pull request #461 from serpilliere/clean_dg
DepGraph: clean step
-rw-r--r--miasm2/analysis/depgraph.py17
1 files changed, 3 insertions, 14 deletions
diff --git a/miasm2/analysis/depgraph.py b/miasm2/analysis/depgraph.py
index b574e421..9fc28fb8 100644
--- a/miasm2/analysis/depgraph.py
+++ b/miasm2/analysis/depgraph.py
@@ -24,8 +24,7 @@ class DependencyNode(object):
     line.
     """
 
-    __slots__ = ["_label", "_element", "_line_nb",
-                 "_step", "_nostep_repr", "_hash"]
+    __slots__ = ["_label", "_element", "_line_nb", "_hash"]
 
     def __init__(self, label, element, line_nb):
         """Create a dependency node with:
@@ -36,7 +35,6 @@ class DependencyNode(object):
         self._label = label
         self._element = element
         self._line_nb = line_nb
-        self._nostep_repr = (self._label, self._line_nb, self._element)
         self._hash = hash(
             (self._label, self._element, self._line_nb))
 
@@ -45,9 +43,7 @@ class DependencyNode(object):
         return self._hash
 
     def __eq__(self, depnode):
-        """Returns True if @self and @depnode are equals.
-        The attribute 'step' is not considered in the comparison.
-        """
+        """Returns True if @self and @depnode are equals."""
         if not isinstance(depnode, self.__class__):
             return False
         return (self.label == depnode.label and
@@ -55,9 +51,7 @@ class DependencyNode(object):
                 self.line_nb == depnode.line_nb)
 
     def __cmp__(self, node):
-        """Compares @self with @node. The step attribute is not taken into
-        account in the comparison.
-        """
+        """Compares @self with @node."""
         if not isinstance(node, self.__class__):
             raise ValueError("Compare error between %s, %s" % (self.__class__,
                                                                node.__class__))
@@ -75,11 +69,6 @@ class DependencyNode(object):
         return self.__str__()
 
     @property
-    def nostep_repr(self):
-        """Returns a representation of @self ignoring the step attribute"""
-        return self._nostep_repr
-
-    @property
     def label(self):
         "Name of the current IRBlock"
         return self._label