From 218720cfa7a754c065d505cc3bd7cdc8260d82cf Mon Sep 17 00:00:00 2001 From: whitequark Date: Mon, 5 Dec 2016 05:04:26 +0000 Subject: [PATCH] Revert "compiler: rein in overzealous cast monomorphization." This reverts commit 4305903ddeccfb5456b21433a0e57588ab421a92. This broke the monomorphizer/round.py test. --- artiq/compiler/transforms/cast_monomorphizer.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/artiq/compiler/transforms/cast_monomorphizer.py b/artiq/compiler/transforms/cast_monomorphizer.py index bed905c5a..c12eb9663 100644 --- a/artiq/compiler/transforms/cast_monomorphizer.py +++ b/artiq/compiler/transforms/cast_monomorphizer.py @@ -13,10 +13,9 @@ class CastMonomorphizer(algorithm.Visitor): def visit_CallT(self, node): self.generic_visit(node) - if ((types.is_builtin(node.func.type, "int") or - types.is_builtin(node.func.type, "int32") or - types.is_builtin(node.func.type, "int64")) and - types.is_var(node.type)): + if (types.is_builtin(node.func.type, "int") or + types.is_builtin(node.func.type, "int32") or + types.is_builtin(node.func.type, "int64")): typ = node.type.find() if (not types.is_var(typ["width"]) and builtins.is_int(node.args[0].type) and