2
0
mirror of https://github.com/m-labs/artiq.git synced 2025-01-07 17:43:34 +08:00

ir: invoke is a valid delay decomposition.

Fixes #510.
This commit is contained in:
whitequark 2016-07-13 08:48:31 +00:00 committed by Sebastien Bourdeauducq
parent c27f157a27
commit 1d58e3cf95

View File

@ -1325,7 +1325,7 @@ class Delay(Terminator):
:param target: (:class:`BasicBlock`) branch target
"""
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")
assert isinstance(target, BasicBlock)
super().__init__([decomposition, target], builtins.TNone(), name)