forked from M-Labs/artiq
transforms.int_monomorphizer: also monomorphize round() calls (#198).
This commit is contained in:
parent
95af6daa28
commit
54aeb5030d
|
@ -26,3 +26,10 @@ class IntMonomorphizer(algorithm.Visitor):
|
|||
return
|
||||
|
||||
node.type["width"].unify(types.TValue(width))
|
||||
|
||||
def visit_CallT(self, node):
|
||||
if types.is_builtin(node.func.type, "int") or \
|
||||
types.is_builtin(node.func.type, "round"):
|
||||
typ = node.type.find()
|
||||
if types.is_var(typ["width"]):
|
||||
typ["width"].unify(types.TValue(32))
|
||||
|
|
Loading…
Reference in New Issue