예제 #1
0
 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)
예제 #2
0
 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)
예제 #3
0
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
예제 #4
0
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
예제 #5
0
파일: genoo.py 프로젝트: sota/pypy-old
 def stack_optimization(self):
     for graph in self.translator.graphs:
         SSI_to_SSA(graph)
         build_trees(graph)