From b29817097335a9e9c4ccebad113a6a2b0e03684c Mon Sep 17 00:00:00 2001 From: whitequark Date: Sun, 10 Jan 2016 15:45:20 +0000 Subject: [PATCH] transforms.artiq_ir_generator: annotate embedded functions as internal. --- artiq/compiler/transforms/artiq_ir_generator.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/artiq/compiler/transforms/artiq_ir_generator.py b/artiq/compiler/transforms/artiq_ir_generator.py index eb80f14fc..49826b11c 100644 --- a/artiq/compiler/transforms/artiq_ir_generator.py +++ b/artiq/compiler/transforms/artiq_ir_generator.py @@ -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: