compiler/inline: add microcycle_unit as reserved name

This commit is contained in:
Sebastien Bourdeauducq 2014-08-18 23:06:50 +08:00
parent 7ea28642e4
commit b1598ba659

View File

@ -26,15 +26,10 @@ class _ReferenceManager:
# reserved names # reserved names
for kg in core_language.kernel_globals: for kg in core_language.kernel_globals:
self.use_count[kg] = 1 self.use_count[kg] = 1
self.use_count["range"] = 1 for name in "int", "round", "int64", "round64", \
self.use_count["int"] = 1 "range", "Fraction", "Quantity", \
self.use_count["round"] = 1 "s_unit", "Hz_unit", "microcycle_unit":
self.use_count["int64"] = 1 self.use_count[name] = 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
def new_name(self, base_name): def new_name(self, base_name):
if base_name[-1].isdigit(): if base_name[-1].isdigit():