def step_cconv(resources, graph, use_llift): if use_llift: graph.manager.keep_roots(graph) llift = LambdaLiftRewriter(resources.opt_manager) llift.run() closure_convert(graph) return {"graph": graph}
def test_return_closure_partial(): """Return a closure (after closure conversion).""" @parse def f(x, y): def g(): return x + y return g f = clone(closure_convert(f)) f = compile(f) g = f(4, 5) assert g() == 9
def step_cconv(graph): closure_convert(graph) return {"graph": graph}
def step_cconv(graph): closure_convert(graph) return {'graph': graph}