forked from M-Labs/artiq
1
0
Fork 0

transforms.artiq_ir_generator: annotate embedded functions as internal.

This commit is contained in:
whitequark 2016-01-10 15:45:20 +00:00
parent 4198601abb
commit b298170973
1 changed files with 2 additions and 1 deletions

View File

@ -320,7 +320,8 @@ class ARTIQIRGenerator(algorithm.Visitor):
return self.append(ir.Closure(func, self.current_env))
def visit_FunctionDefT(self, node, in_class=None):
func = self.visit_function(node, is_lambda=False, is_internal=len(self.name) > 2)
func = self.visit_function(node, is_lambda=False,
is_internal=len(self.name) > 0 or '.' in node.name)
if in_class is None:
self._set_local(node.name, func)
else: