mirror of https://github.com/m-labs/artiq.git
transforms.artiq_ir_generator: annotate embedded functions as internal.
This commit is contained in:
parent
4198601abb
commit
b298170973
|
@ -320,7 +320,8 @@ class ARTIQIRGenerator(algorithm.Visitor):
|
||||||
return self.append(ir.Closure(func, self.current_env))
|
return self.append(ir.Closure(func, self.current_env))
|
||||||
|
|
||||||
def visit_FunctionDefT(self, node, in_class=None):
|
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:
|
if in_class is None:
|
||||||
self._set_local(node.name, func)
|
self._set_local(node.name, func)
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue