From 8e46c3c1fd8b9332da8e7ac995eaff376baa6ca9 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Sun, 22 Nov 2020 11:57:21 +0800 Subject: [PATCH] Revert "compiler: fix incorrect with behavior" This reverts commit fe6115bcbbeb3caca596b904231851e24c18afb1. --- 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 14a45a0e4..068d75cdd 100644 --- a/artiq/compiler/transforms/artiq_ir_generator.py +++ b/artiq/compiler/transforms/artiq_ir_generator.py @@ -878,7 +878,8 @@ class ARTIQIRGenerator(algorithm.Visitor): self.current_assign = None none = self.append(ir.Alloc([], builtins.TNone())) - cleanup.append(lambda fn=exit_fn: self._user_call(fn, [none, none, none], {})) + call = self._user_call(exit_fn, [none, none, none], {}) + cleanup.append(lambda: call) self._try_finally( body_gen=lambda: self.visit(node.body),