mirror of https://github.com/zachjs/sv2v.git
Revert "avoid unnecessary unased-unsized casts in assignments"
This reverts commit 51f2d2bb33.
This commit is contained in:
parent
cc9f7f4658
commit
e5e99b291b
|
|
@ -117,7 +117,8 @@ convertModuleItemM other = return $ convertModuleItem other
|
|||
convertModuleItem :: ModuleItem -> ModuleItem
|
||||
convertModuleItem =
|
||||
traverseExprs (convertExpr SelfDetermined) .
|
||||
traverseTypes (traverseNestedTypes convertType)
|
||||
traverseTypes (traverseNestedTypes convertType) .
|
||||
traverseAsgns convertAsgn
|
||||
|
||||
literalFor :: Char -> Expr
|
||||
literalFor 'Z' = literalFor 'z'
|
||||
|
|
@ -143,6 +144,11 @@ sizedLiteralFor expr ch =
|
|||
Cast (Right size) (literalFor ch)
|
||||
where size = DimsFn FnBits $ Right expr
|
||||
|
||||
convertAsgn :: (LHS, Expr) -> (LHS, Expr)
|
||||
convertAsgn (lhs, expr) =
|
||||
(lhs, convertExpr context expr)
|
||||
where context = ContextDetermined $ lhsToExpr lhs
|
||||
|
||||
convertExpr :: ExprContext -> Expr -> Expr
|
||||
convertExpr _ (DimsFn fn (Right e)) =
|
||||
DimsFn fn $ Right $ convertExpr SelfDetermined e
|
||||
|
|
|
|||
Loading…
Reference in New Issue