Emit runtime type checks in legalizer.rs (#112)

* Emit runtime type checks in legalizer.rs
This commit is contained in:
d1m0
2017-07-10 15:28:32 -07:00
committed by Jakob Stoklund Olesen
parent 464f2625d4
commit 98f822f347
9 changed files with 494 additions and 69 deletions

View File

@@ -41,6 +41,14 @@ class Rtl(object):
# type: (*DefApply) -> None
self.rtl = tuple(map(canonicalize_defapply, args))
def copy(self, m):
# type: (Dict[Var, Var]) -> Rtl
"""
Return a copy of this rtl with all Vars substituted with copies or
according to m. Update m as neccessary.
"""
return Rtl(*[d.copy(m) for d in self.rtl])
class XForm(object):
"""