Skip to content

Commit

Permalink
Remove dead code in type propagation (#414)
Browse files Browse the repository at this point in the history
  • Loading branch information
rihi authored Jun 26, 2024
1 parent 749e702 commit c7098e4
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions decompiler/pipeline/dataflowanalysis/type_propagation.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

from __future__ import annotations

from collections import Counter, defaultdict
from collections import Counter
from enum import Enum
from itertools import chain
from logging import info
from typing import DefaultDict, Iterator, List, Set, Tuple
from typing import Iterator, List, Tuple

from decompiler.pipeline.stage import PipelineStage
from decompiler.structures.graphs.cfg import ControlFlowGraph
Expand All @@ -29,7 +29,6 @@ class EdgeType(Enum):
def __init__(self, **attr):
"""Generate a new TypeGraph, appending a dict for usage tracking."""
super().__init__(**attr)
self._usages: DefaultDict[Expression, Set] = defaultdict(set)

@classmethod
def from_cfg(cls, cfg: ControlFlowGraph) -> TypeGraph:
Expand Down Expand Up @@ -57,7 +56,6 @@ def add_expression(self, expression: Expression, parent: Instruction):
while todo:
head = todo.pop()
self.add_node(self._make_node(head), **{str(id(head)): head})
self._usages[self._make_node(head)].add(parent)
children = list(head)
todo.extend(children)
for sub_expression in children:
Expand Down

0 comments on commit c7098e4

Please sign in to comment.