[fix bug that would sometimes keep WRAPPERs from being inlined, dramatically speeds up some tests.
John Meacham <john@repetae.net>**20110126214144
 Ignore-this: aa74f39e44d03cdbd2d36a8e5b3eefa9
] hunk ./src/E/SSimplify.hs 312
-    initScope = fmap (\ c -> fixInline (so_finalPhase opts) (combHead c) $ isBoundTo noUseInfo (combBody c)) (so_boundVars opts)
+    initScope = fmap (\ c -> isBoundTo opts (combHead c) noUseInfo (combBody c)) (so_boundVars opts)
hunk ./src/E/SSimplify.hs 322
-    deriving(Eq,Ord)
+    deriving(Eq,Ord,Show)
hunk ./src/E/SSimplify.hs 324
-data Binding =
-    NotAmong [Name]
+data Binding
+    = NotAmong [Name]
hunk ./src/E/SSimplify.hs 334
-    deriving(Ord,Eq)
+    deriving(Ord,Eq,Show)
hunk ./src/E/SSimplify.hs 336
-isBoundTo o e = IsBoundTo {
+isBoundTo opt v o e = fixInline (so_finalPhase opt) v $ IsBoundTo {
hunk ./src/E/SSimplify.hs 362
+            (False,_,True) -> ForceInline
hunk ./src/E/SSimplify.hs 364
-            (False,False,True) -> ForceInline
hunk ./src/E/SSimplify.hs 577
-    nname tvr@(TVr { tvrIdent = n, tvrType =  t})  = do
+    nname tvr@(TVr { tvrIdent = n, tvrType = t}) = do
hunk ./src/E/SSimplify.hs 679
-                d' <- localEnv (insertDoneSubst b (EVar b') . (insertInScope (tvrIdent b') (fixInline finalPhase b' $ isBoundTo noUseInfo e))) $ f cont d
+                d' <- localEnv (insertDoneSubst b (EVar b') . (insertInScope (tvrIdent b') (isBoundTo sopts b' noUseInfo e))) $ f cont d
hunk ./src/E/SSimplify.hs 684
-                d' <- localEnv (insertDoneSubst b (EVar b') . (insertInScope (tvrIdent b') (fixInline finalPhase b' $ isBoundTo noUseInfo e))) $ f cont d
+                d' <- localEnv (insertDoneSubst b (EVar b') . (insertInScope (tvrIdent b') (isBoundTo sopts b' noUseInfo e))) $ f cont d
hunk ./src/E/SSimplify.hs 709
-                        return $ (insertInScope (tvrIdent v) (isBoundTo noUseInfo (EVar b')),b')
-                    (EVar v,_) -> return $ (insertDoneSubst b (EVar b') . insertInScope (tvrIdent v) (isBoundTo noUseInfo (EVar b')),b')
+                        return $ (insertInScope (tvrIdent v) (isBoundTo sopts v noUseInfo (EVar b')),b')
+                    (EVar v,_) -> return $ (insertDoneSubst b (EVar b') . insertInScope (tvrIdent v) (isBoundTo sopts v noUseInfo (EVar b')),b')
hunk ./src/E/SSimplify.hs 729
-                    mins _ e | emptyId `notMember` (freeVars e :: IdSet) = insertInScope (tvrIdent b') (isBoundTo noUseInfo e)
+                    mins _ e | emptyId `notMember` (freeVars e :: IdSet) = insertInScope (tvrIdent b') (isBoundTo sopts b' noUseInfo e)
hunk ./src/E/SSimplify.hs 764
-                e' <- localEnv (substAddList [ (n,Done $ EVar nt) | (_,TVr { tvrIdent = n },nt) <- binds] . extendScope (fromList [ (n,isBoundTo noUseInfo e) | (e,_,TVr { tvrIdent = n }) <- binds])) $ f StartContext e
+                e' <- localEnv (substAddList [ (n,Done $ EVar nt) | (_,TVr { tvrIdent = n },nt) <- binds] . extendScope (fromList [ (n,isBoundTo sopts t noUseInfo e) | (e,_,t@TVr { tvrIdent = n }) <- binds])) $ f StartContext e
hunk ./src/E/SSimplify.hs 822
-            (Just (x,xs)) -> didInline x xs  -- h x xs inb
+            (Just (x,xs)) -> didInline x xs
hunk ./src/E/SSimplify.hs 832
+--                Just ibt@IsBoundTo { bindingE = e } | False && someBenefit v e txs && getProperty prop_WRAPPER v -> do
+--                    mtick  (toAtom $ "E.Simplify.inline.Wrapper/{" ++ tvrShowName v  ++ "}")
+--                    trace (show (v,e,ibt,tvrInfo v)) didInline e xs'
hunk ./src/E/SSimplify.hs 906
-                let ibt = fixInline finalPhase t' $ isBoundTo n e'
+                let ibt = isBoundTo sopts t' n e'
hunk ./src/Grin/FromE.hs 362
+        when (getProperty prop_WRAPPER tvr) $
+            liftIO $ putErrLn $ "WARNING: Wrapper still exists at grin transformation time: " ++ show tvr