def interpret(self, fn, args): interp, graph = get_interpreter(fn, args, view=False, viewbefore=False, type_system=self.type_system) if option.view: interp.typer.annotator.translator.view() build_trees(graph) if option.view: interp.typer.annotator.translator.view() return interp.eval_graph(graph, args)
def check_trees(func, argtypes, backendopt=False): t = translate(func, argtypes, backendopt=backendopt) if option.view: t.view() graph = graphof(t, func) build_trees(graph) if option.view: t.view() interp = LLInterpreter(t.rtyper) def eval_func(*args): return interp.eval_graph(graph, args) return graph, eval_func
def stack_optimization(self): for graph in self.translator.graphs: SSI_to_SSA(graph) build_trees(graph)