forked from M-Labs/artiq
1
0
Fork 0

ir: `invoke` is a valid `delay` decomposition.

Fixes #510.
This commit is contained in:
whitequark 2016-07-13 08:48:31 +00:00
parent 1c32d4fb71
commit c50d436f0b
1 changed files with 1 additions and 1 deletions

View File

@ -1325,7 +1325,7 @@ class Delay(Terminator):
:param target: (:class:`BasicBlock`) branch target :param target: (:class:`BasicBlock`) branch target
""" """
def __init__(self, interval, decomposition, target, name=""): def __init__(self, interval, decomposition, target, name=""):
assert isinstance(decomposition, Call) or \ assert isinstance(decomposition, Call) or isinstance(decomposition, Invoke) or \
isinstance(decomposition, Builtin) and decomposition.op in ("delay", "delay_mu") isinstance(decomposition, Builtin) and decomposition.op in ("delay", "delay_mu")
assert isinstance(target, BasicBlock) assert isinstance(target, BasicBlock)
super().__init__([decomposition, target], builtins.TNone(), name) super().__init__([decomposition, target], builtins.TNone(), name)