From b1598ba6591be9af3e092b0ee208a3529cde695c Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Mon, 18 Aug 2014 23:06:50 +0800 Subject: [PATCH] compiler/inline: add microcycle_unit as reserved name --- artiq/compiler/inline.py | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/artiq/compiler/inline.py b/artiq/compiler/inline.py index 0e5ed7838..7d674ac80 100644 --- a/artiq/compiler/inline.py +++ b/artiq/compiler/inline.py @@ -26,15 +26,10 @@ class _ReferenceManager: # reserved names for kg in core_language.kernel_globals: self.use_count[kg] = 1 - self.use_count["range"] = 1 - self.use_count["int"] = 1 - self.use_count["round"] = 1 - self.use_count["int64"] = 1 - self.use_count["round64"] = 1 - self.use_count["Fraction"] = 1 - self.use_count["Quantity"] = 1 - self.use_count["s_unit"] = 1 - self.use_count["Hz_unit"] = 1 + for name in "int", "round", "int64", "round64", \ + "range", "Fraction", "Quantity", \ + "s_unit", "Hz_unit", "microcycle_unit": + self.use_count[name] = 1 def new_name(self, base_name): if base_name[-1].isdigit():