packages feed

csound-expression-dynamic 0.0.6 → 0.0.7

raw patch · 2 files changed

+10/−2 lines, 2 files

Files

csound-expression-dynamic.cabal view
@@ -1,5 +1,5 @@ Name:          csound-expression-dynamic-Version:       0.0.6+Version:       0.0.7 Cabal-Version: >= 1.6 License:       BSD3 License-file:  LICENSE
src/Csound/Dynamic/Tfm/Liveness.hs view
@@ -97,7 +97,7 @@  substLhs :: Var -> Memory s Var substLhs v = do-	v1 <- alloc $ varType v+	v1 <- allocAndSkipInits v 	saveSubst (varId v) (varId v1) 	return v1 @@ -108,6 +108,14 @@ 	b <- isAlive lineNum v 	unless b $ free v1 	return v1++allocAndSkipInits :: Var -> Memory s Var+allocAndSkipInits v +    | isInit r  = return v+    | otherwise = alloc r+    where +        r = varType v+        isInit x = x == Ir || x == Sr  alloc :: Rate -> Memory s Var alloc rate = state $ \mem ->