Ejemplo n.º 1
0
 def __init__(self):
     self.result = dict()
     self.result["bool"] = NamedType("bool")
     self.combiners = defaultdict(UserFunction)
     self.current_global_declarations = dict()
     self.max_recompute = 1  # max number of use to be lazy
     ModuleAnalysis.__init__(self, StrictAliases, LazynessAnalysis)
     self.curr_locals_declaration = None
Ejemplo n.º 2
0
 def __init__(self):
     self.result = dict()
     self.result["bool"] = NamedType("bool")
     self.combiners = defaultdict(UserFunction)
     self.current_global_declarations = dict()
     self.max_recompute = 1  # max number of use to be lazy
     ModuleAnalysis.__init__(self, StrictAliases, LazynessAnalysis)
     self.curr_locals_declaration = None
Ejemplo n.º 3
0
 def __init__(self):
     """ Create empty result graph and gather global declarations. """
     self.result = nx.DiGraph()
     self.current_function = None
     self.naming = dict()  # variable to dependencies for current function.
     # variable to dependencies for current conditional statement
     self.in_cond = dict()
     ModuleAnalysis.__init__(self, GlobalDeclarations)
Ejemplo n.º 4
0
 def __init__(self):
     """ Create empty result graph and gather global declarations. """
     self.result = nx.DiGraph()
     self.current_function = None
     self.naming = dict()  # variable to dependencies for current function.
     # variable to dependencies for current conditional statement
     self.in_cond = dict()
     ModuleAnalysis.__init__(self, GlobalDeclarations)
Ejemplo n.º 5
0
    def __init__(self):
        class TypeResult(dict):
            def __init__(self):
                self.builder = TypeBuilder()

            def copy(self):
                other = TypeResult()
                other.update(self.items())
                other.builder = self.builder
                return other

        self.result = TypeResult()
        self.builder = self.result.builder
        self.result["bool"] = self.builder.NamedType("bool")
        self.combiners = defaultdict(UserFunction)
        self.current_global_declarations = dict()
        self.max_recompute = 1  # max number of use to be lazy
        ModuleAnalysis.__init__(self, StrictAliases, LazynessAnalysis)
        self.curr_locals_declaration = None
Ejemplo n.º 6
0
    def __init__(self):

        class TypeResult(dict):
            def __init__(self):
                self.builder = TypeBuilder()

            def copy(self):
                other = TypeResult()
                other.update(self.items())
                other.builder = self.builder
                return other

        self.result = TypeResult()
        self.builder = self.result.builder
        self.result["bool"] = self.builder.NamedType("bool")
        self.combiners = defaultdict(UserFunction)
        self.current_global_declarations = dict()
        self.max_recompute = 1  # max number of use to be lazy
        ModuleAnalysis.__init__(self, Reorder, StrictAliases, LazynessAnalysis,
                                Immediates)
        self.curr_locals_declaration = None
Ejemplo n.º 7
0
 def __init__(self):
     self.result = None
     self.update = False
     self.functions = set()
     ModuleAnalysis.__init__(self, StrictAliases)
Ejemplo n.º 8
0
 def run(self, node, ctx):
     ModuleAnalysis.run(self, node, ctx)
     for fun in self.result:
         for i in xrange(len(fun.read_effects)):
             self.recursive_weight(fun, i, set())
     return {f.func: f.read_effects for f in self.result}
Ejemplo n.º 9
0
 def run(self, node, ctx):
     ModuleAnalysis.run(self, node, ctx)
     for fun in self.result:
         for i in range(len(fun.read_effects)):
             self.recursive_weight(fun, i, set())
     return {f.func: f.read_effects for f in self.result}
Ejemplo n.º 10
0
 def __init__(self):
     self.result = nx.DiGraph()
     self.current_function = None
     ModuleAnalysis.__init__(self, GlobalDeclarations)
Ejemplo n.º 11
0
 def __init__(self):
     self.result = None
     self.update = False
     self.functions = set()
     ModuleAnalysis.__init__(self, StrictAliases)
Ejemplo n.º 12
0
 def __init__(self):
     self.result = None
     self.update = False
     self.inassert = False
     self.functions = set()
     ModuleAnalysis.__init__(self, StrictAliases, ArgumentEffects)