From c0c0137d9a4858538eb2b7cf451a0c9337f3107a Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Thu, 29 Jan 2015 23:48:03 +0800 Subject: [PATCH] transforms/inline: support skipping of attr init --- artiq/transforms/inline.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/artiq/transforms/inline.py b/artiq/transforms/inline.py index 40d82163d..24924a773 100644 --- a/artiq/transforms/inline.py +++ b/artiq/transforms/inline.py @@ -433,6 +433,9 @@ def get_attr_init(attribute_namespace, loc_node): for (_, attr), attr_info in attribute_namespace.items(): if hasattr(attr_info.obj, attr): value = getattr(attr_info.obj, attr) + if (hasattr(value, "kernel_attr_init") + and not value.kernel_attr_init): + continue value = ast.copy_location(value_to_ast(value), loc_node) target = ast.copy_location(ast.Name(attr_info.mangled_name, ast.Store()),