From b91ffa1b384817ef1db98194bc55a088ca0472f9 Mon Sep 17 00:00:00 2001 From: whitequark Date: Wed, 14 Oct 2015 17:02:59 +0300 Subject: [PATCH] ir: fix default argument fiasco. --- artiq/compiler/ir.py | 2 +- artiq/compiler/transforms/artiq_ir_generator.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/artiq/compiler/ir.py b/artiq/compiler/ir.py index cae1985d4..bf487960d 100644 --- a/artiq/compiler/ir.py +++ b/artiq/compiler/ir.py @@ -1184,7 +1184,7 @@ class Parallel(Terminator): in parallel. """ - def __init__(self, destinations=[], name=""): + def __init__(self, destinations, name=""): super().__init__(destinations, builtins.TNone(), name) def opcode(self): diff --git a/artiq/compiler/transforms/artiq_ir_generator.py b/artiq/compiler/transforms/artiq_ir_generator.py index b39e464d6..f73295d20 100644 --- a/artiq/compiler/transforms/artiq_ir_generator.py +++ b/artiq/compiler/transforms/artiq_ir_generator.py @@ -687,7 +687,7 @@ class ARTIQIRGenerator(algorithm.Visitor): if types.is_builtin(context_expr_node.type, "sequential"): self.visit(node.body) elif types.is_builtin(context_expr_node.type, "parallel"): - parallel = self.append(ir.Parallel()) + parallel = self.append(ir.Parallel([])) heads, tails = [], [] for stmt in node.body: