Merge branch 'master' of http://darcs.haskell.org/ghc
authorSimon Peyton Jones <simonpj@microsoft.com>
Fri, 9 Sep 2011 08:12:48 +0000 (09:12 +0100)
committerSimon Peyton Jones <simonpj@microsoft.com>
Fri, 9 Sep 2011 08:12:48 +0000 (09:12 +0100)
compiler/codeGen/CgTicky.hs
compiler/simplCore/Simplify.lhs

index ef6d301..1e814fe 100644 (file)
@@ -245,12 +245,15 @@ tickyDynAlloc :: ClosureInfo -> Code
 -- Called when doing a dynamic heap allocation
 tickyDynAlloc cl_info
   = ifTicky $
-    case closureLFInfo cl_info of
+    case cl_info of {
+      ConInfo {} -> tick_alloc_con ;
+      ClosureInfo { closureLFInfo = lf_info } -> 
+    case lf_info of
        LFCon {}        -> tick_alloc_con
        LFReEntrant {}  -> tick_alloc_fun
        LFThunk {}      -> tick_alloc_thk
         -- black hole
-        _               -> return ()
+        _               -> return () }
   where
        -- will be needed when we fill in stubs
     _cl_size   = closureSize cl_info
index adcaf13..19742f3 100644 (file)
@@ -1051,23 +1051,6 @@ simplCast env body co0 cont0
            arg_ty' | isSimplified dup = arg_ty
                    | otherwise        = substTy (arg_se `setInScope` env) arg_ty
 
-{-
-       add_coerce co (Pair s1s2 _t1t2) (ApplyTo dup (Coercion arg_co) arg_se cont)
-                -- This implements the PushC rule from the paper
-         | Just (covar,_) <- splitForAllTy_maybe s1s2
-         = ASSERT( isCoVar covar )
-           ApplyTo Simplified (Coercion new_arg_co) (zapSubstEnv arg_se) (addCoerce co1 cont)
-         where
-           [co0, co1]   = decomposeCo 2 co
-           [co00, co01] = decomposeCo 2 co0
-
-           arg_co' | isSimplified dup = arg_co
-                   | otherwise        = substCo (arg_se `setInScope` env) arg_co
-           new_arg_co = co00    `mkTransCo`
-                        arg_co' `mkTransCo`
-                        mkSymCo co01
--}
-
        add_coerce co (Pair s1s2 t1t2) (ApplyTo dup arg arg_se cont)
          | isFunTy s1s2   -- This implements the Push rule from the paper
          , isFunTy t1t2   -- Check t1t2 to ensure 'arg' is a value arg