forked from M-Labs/artiq
1
0
Fork 0

inline: return statements

This commit is contained in:
Sebastien Bourdeauducq 2014-06-16 22:01:20 +02:00
parent c021b2ef41
commit 792ac44245
2 changed files with 4 additions and 3 deletions

View File

@ -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

View File

@ -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)