diff --git a/artiq/compiler/inline.py b/artiq/compiler/inline.py index 4b49176ce..7303e54be 100644 --- a/artiq/compiler/inline.py +++ b/artiq/compiler/inline.py @@ -1,7 +1,6 @@ from collections import namedtuple, defaultdict import inspect, textwrap, ast, builtins -from artiq.compiler import unparse from artiq.compiler.tools import eval_ast from artiq.language import experiment, units @@ -181,4 +180,4 @@ def inline(k_function, k_args, k_kwargs, rm=None): funcdef.body[0:0] = param_init - unparse.Unparser(funcdef.body) + return funcdef.body diff --git a/artiq/devices/core.py b/artiq/devices/core.py index 111692162..7b7e192f5 100644 --- a/artiq/devices/core.py +++ b/artiq/devices/core.py @@ -1,5 +1,7 @@ from artiq.compiler.inline import inline +from artiq.compiler.unparse import Unparser class Core: def run(self, k_function, k_args, k_kwargs): - inline(k_function, k_args, k_kwargs) + stmts = inline(k_function, k_args, k_kwargs) + Unparser(stmts)