on master help sign in
Remove commented-out dead code.
commitca257e0e0b58ec8a69c004db9d3751bbf3ff4431 authorMatus Tejiscak <ziman@functor.sk> dateMon 10 Mar 2014, 15:37 (13 years ago) parent67b01ec
1 file changed−22
src/IRTS/Compiler.hs−22
src/IRTS/Compiler.hs−22
@@ -220,11 +220,6 @@ irTerm vs env tm@(App f a) = case unApply tm of
220220 (P _ (UN m) _, [_,size,t])
221221 | m == txt "malloc"
222222 -> irTerm vs env t
223−{-
224− = do size' <- ir' env size
225− t' <- ir' env t
226− return t' -- TODO $ malloc_ size' t'
227−-}
228223
229224 (P _ (UN tm) _, [_,t])
230225 | tm == txt "trace_malloc"
@@ -296,9 +291,6 @@ irTerm vs env tm@(App f a) = case unApply tm of
296291 used = maybe [] (map fst . usedpos) $ lookupCtxtExact n (idris_callgraph ist)
297292 fst4 (x,_,_,_) = x
298293
299−-- ir' env (P _ (NS (UN "Z") ["Nat", "Prelude"]) _)
300−-- = return $ LConst (BI 0)
301−
302294irTerm vs env (P _ n _) = return $ LV (Glob n)
303295irTerm vs env (V i)
304296 | i >= 0 && i < length env = return $ LV (Glob (env!!i))
@@ -476,20 +468,6 @@ irSC vs (Case n [alt]) = do
476468irSC vs (Case n alts) = LCase (LV (Glob n)) <$> mapM (irAlt vs (LV (Glob n))) alts
477469irSC vs ImpossibleCase = return LNothing
478470
479−-- zname = sNS (sUN "Z") ["Nat","Prelude"]
480−-- sname = sNS (sUN "S") ["Nat","Prelude"]
481−
482−-- special cases for Z and S
483−-- Needs rethink: projections make this fail
484−-- irAlt n (ConCase z _ [] rhs) | z == zname
485−-- = irAlt n (ConstCase (BI 0) rhs)
486−-- irAlt n (ConCase s _ [arg] rhs) | s == sname
487−-- = do n' <- ir n
488−-- rhs' <- ir rhs
489−-- return $ LDefaultCase
490−-- (LLet arg (LOp LBMinus [n', LConst (BI 1)])
491−-- rhs')
492−
493471irAlt :: Vars -> LExp -> CaseAlt -> Idris LAlt
494472
495473-- this leaves out all unused arguments of the constructor