Ticket #3693: StackTraces.3.dpatch

File StackTraces.3.dpatch, 149.7 KB (added by batterseapower, 5 years ago)
Line 
1Thu Apr 22 18:27:07 BST 2010  Max Bolingbroke <[email protected]>
2  * Determine referrers for internal names while tidying, so System Names get better tidied OccNames
3
4Thu Apr 22 18:28:18 BST 2010  Max Bolingbroke <[email protected]>
5  * STG stack traces
6
7New patches:
8
9[Determine referrers for internal names while tidying, so System Names get better tidied OccNames
10Max Bolingbroke <[email protected]>**20100422172707
11 Ignore-this: c9a2fc3398ebfa023e1deda1452ba21c
12] {
13hunk ./compiler/main/TidyPgm.lhs 48
14 import Util
15 import FastString
16 
17+import Data.Either      ( partitionEithers )
18 import Data.List       ( sortBy )
19 import Data.IORef      ( IORef, readIORef, writeIORef )
20 \end{code}
21hunk ./compiler/main/TidyPgm.lhs 600
22 chooseExternalIds hsc_env mod omit_prags expose_all binds implicit_binds imp_id_rules
23   = do { (unfold_env1,occ_env1) <- search init_work_list emptyVarEnv init_occ_env
24        ; let internal_ids = filter (not . (`elemVarEnv` unfold_env1)) binders
25-       ; tidy_internal internal_ids unfold_env1 occ_env1 }
26+             internal_referrers = find_int_referrers (mkVarEnv (all_external_binders `zip` all_external_binders))
27+                                                     [] (flattenBinds $ binds ++ implicit_binds)
28+       ; tidy_internal (map (\x -> (x, lookupVarEnv internal_referrers x)) internal_ids) unfold_env1 occ_env1 }
29  where
30   nc_var = hsc_NC hsc_env
31 
32hunk ./compiler/main/TidyPgm.lhs 628
33   implicit_binders = bindersOfBinds implicit_binds
34   binder_set       = mkVarSet binders
35 
36-  avoids   = [getOccName name | bndr <- binders ++ implicit_binders,
37-                                let name = idName bndr,
38-                                isExternalName name ]
39+  all_external_binders = filter (isExternalName . idName) binders ++ implicit_binders
40+  avoids               = map (getOccName . idName) all_external_binders
41                -- In computing our "avoids" list, we must include
42                --      all implicit Ids
43                --      all things with global names (assigned once and for
44hunk ./compiler/main/TidyPgm.lhs 665
45   search ((idocc,referrer) : rest) unfold_env occ_env
46     | idocc `elemVarEnv` unfold_env = search rest unfold_env occ_env
47     | otherwise = do
48-      (occ_env', name') <- tidyTopName mod nc_var (Just referrer) occ_env idocc
49+      (occ_env', name') <- tidyTopName mod nc_var True (Just referrer) occ_env idocc
50       let
51           (new_ids, show_unfold)
52                 | omit_prags = ([], False)
53hunk ./compiler/main/TidyPgm.lhs 683
54       --
55       search (zip new_ids (repeat referrer') ++ rest) unfold_env' occ_env'
56 
57-  tidy_internal :: [Id] -> UnfoldEnv -> TidyOccEnv
58+  -- We want to find good referrer information even for internal binders that never got externalised.
59+  -- The only reason for this is that they might show up in STG stack traces, in which case we want their
60+  -- OccNames to be at least somewhat close to where they might have originated from in the user's input program.
61+  find_int_referrers internal_referrers [] internalish
62+    | null externalish' = internal_referrers
63+    | otherwise         = find_int_referrers internal_referrers externalish' internalish'
64+    where split_one (x, e) = case lookupVarEnv internal_referrers x of Just referrer -> Left (referrer, e); Nothing -> Right (x, e)
65+          (externalish', internalish') = partitionEithers $ map split_one internalish
66+  find_int_referrers internal_referrers ((referrer, e):externalish) internalish
67+    = find_int_referrers internal_referrers' externalish internalish
68+    where internal_referrers' = foldr (\x m -> extendVarEnv m x referrer) internal_referrers $
69+                                    filter (\v -> not $ elemVarEnv v internal_referrers) $ snd (exprFvsInOrder e)
70+
71+  tidy_internal :: [(Id, Maybe Id)] -> UnfoldEnv -> TidyOccEnv
72                 -> IO (UnfoldEnv, TidyOccEnv)
73   tidy_internal []       unfold_env occ_env = return (unfold_env,occ_env)
74hunk ./compiler/main/TidyPgm.lhs 699
75-  tidy_internal (id:ids) unfold_env occ_env = do
76-      (occ_env', name') <- tidyTopName mod nc_var Nothing occ_env id
77+  tidy_internal ((id, mb_referrer):ids) unfold_env occ_env = do
78+      (occ_env', name') <- tidyTopName mod nc_var False mb_referrer occ_env id
79       let unfold_env' = extendVarEnv unfold_env id (name',False)
80       tidy_internal ids unfold_env' occ_env'
81 
82hunk ./compiler/main/TidyPgm.lhs 804
83 -- we intend to externalise it.
84 
85 \begin{code}
86-tidyTopName :: Module -> IORef NameCache -> Maybe Id -> TidyOccEnv
87+tidyTopName :: Module -> IORef NameCache -> Bool -> Maybe Id -> TidyOccEnv
88            -> Id -> IO (TidyOccEnv, Name)
89hunk ./compiler/main/TidyPgm.lhs 806
90-tidyTopName mod nc_var maybe_ref occ_env id
91+tidyTopName mod nc_var external maybe_ref occ_env id
92   | global && internal = return (occ_env, localiseName name)
93 
94   | global && external = return (occ_env, name)
95hunk ./compiler/main/TidyPgm.lhs 835
96   | otherwise = panic "tidyTopName"
97   where
98     name       = idName id
99-    external    = isJust maybe_ref
100     global     = isExternalName name
101     local      = not global
102     internal   = not external
103hunk ./compiler/main/TidyPgm.lhs 838
104-    loc                = nameSrcSpan name
105+    loc         = nameSrcSpan (if isSystemName name then maybe name idName maybe_ref else name)
106+     -- Using the SrcLoc from the referrer for system names gives us better
107+     -- information for use in stack traces
108 
109     old_occ     = nameOccName name
110     new_occ
111}
112[STG stack traces
113Max Bolingbroke <[email protected]>**20100422172818
114 Ignore-this: 7c2a609434205b7d86703323a2767818
115] {
116hunk ./compiler/cmm/Cmm.hs 181
117                         --               Nothing: a 1-word gap
118                        -- Start of list is the *young* end
119       C_SRT
120+      (Maybe RetDescription)
121 
122 data CmmReturnInfo = CmmMayReturn
123                    | CmmNeverReturns
124hunk ./compiler/cmm/Cmm.hs 192
125 type ClosureLayout = (StgHalfWord, StgHalfWord) -- ptrs, nptrs
126 type ConstrTag = StgHalfWord
127 type ConstrDescription = CmmLit
128+type RetDescription = CmmLit -- Description of return point, for use in user-visible stack traces
129 type FunArity = StgHalfWord
130 type SlowEntry = CmmLit
131   -- We would like this to be a CLabel but
132hunk ./compiler/cmm/CmmBuildInfoTables.hs 425
133             (FunInfo    c s a d e)  -> FunInfo c (toSrt s) a d e
134             (ThunkInfo  c s)        -> ThunkInfo c (toSrt s)
135             (ThunkSelectorInfo x s) -> ThunkSelectorInfo x (toSrt s)
136-            (ContInfo v s)          -> ContInfo (toVars v) (toSrt s)
137+            (ContInfo v s d)        -> ContInfo (toVars v) (toSrt s) d
138 updInfoTbl _ _ t@(CmmInfo _ _ CmmNonInfoTable) = t
139   
140 -- Lower the CmmTopForInfoTables type down to good old CmmTopZ
141hunk ./compiler/cmm/CmmCPS.hs 277
142     where
143       -- User written continuations
144       selectContinuationFormat' (Continuation
145-                          (Right (CmmInfo _ _ (CmmInfoTable _ _ _ (ContInfo format _))))
146+                          (Right (CmmInfo _ _ (CmmInfoTable _ _ _ (ContInfo format _ _))))
147                           label formals _ _) =
148           (formals, Just label, format)
149       -- Either user written non-continuation code
150hunk ./compiler/cmm/CmmCPS.hs 385
151 -- User written continuations
152 applyContinuationFormat formats
153    (Continuation (Right (CmmInfo gc update_frame
154-                             (CmmInfoTable clos prof tag (ContInfo _ srt))))
155+                             (CmmInfoTable clos prof tag (ContInfo _ srt descr))))
156                  label formals is_gc blocks) =
157hunk ./compiler/cmm/CmmCPS.hs 387
158-    Continuation (CmmInfo gc update_frame (CmmInfoTable clos prof tag (ContInfo format srt)))
159+    Continuation (CmmInfo gc update_frame (CmmInfoTable clos prof tag (ContInfo format srt descr)))
160                  label formals is_gc blocks
161     where
162       format = continuation_stack $ maybe unknown_block id $ lookup label formats
163hunk ./compiler/cmm/CmmCPS.hs 401
164 -- CPS generated continuations
165 applyContinuationFormat formats (Continuation
166                           (Left srt) label formals is_gc blocks) =
167-    Continuation (CmmInfo gc Nothing (CmmInfoTable undefined prof tag (ContInfo (continuation_stack $ format) srt)))
168+    Continuation (CmmInfo gc Nothing (CmmInfoTable undefined prof tag (ContInfo (continuation_stack $ format) srt Nothing)))
169                  label formals is_gc blocks
170     where
171       gc = Nothing -- Generated continuations never need a stack check
172hunk ./compiler/cmm/CmmInfo.hs 35
173 emptyContInfoTable :: CmmInfo
174 emptyContInfoTable =
175   CmmInfo Nothing Nothing (CmmInfoTable False (ProfilingInfo zero zero) rET_SMALL
176-                                              (ContInfo [] NoC_SRT))
177+                                              (ContInfo [] NoC_SRT Nothing))
178     where zero = CmmInt 0 wordWidth
179 
180 cmmToRawCmm :: [Cmm] -> IO [RawCmm]
181hunk ./compiler/cmm/CmmInfo.hs 135
182                 std_info = mkStdInfoTable ty_prof' cl_prof' type_tag 0 (mkWordCLit offset)
183 
184           -- A continuation/return-point.
185-          ContInfo stack_layout srt ->
186+          ContInfo stack_layout srt mb_descr ->
187               liveness_data ++
188hunk ./compiler/cmm/CmmInfo.hs 137
189-              mkInfoTableAndCode info_label std_info srt_label entry_label
190+              mkInfoTableAndCode info_label std_info (descr_lit : srt_label) entry_label
191                                  arguments blocks
192               where
193                 std_info = mkStdInfoTable ty_prof' cl_prof' maybe_big_type_tag srt_bitmap
194hunk ./compiler/cmm/CmmInfo.hs 148
195                                      then liveness_tag
196                                      else type_tag
197                 (srt_label, srt_bitmap) = mkSRTLit info_label srt
198+                dummy_relative_ref = CmmLabelDiffOff info_label info_label 0 -- Value of the right width, with sentinel value 0
199+                descr_lit = maybe dummy_relative_ref (makeRelativeRefTo info_label) mb_descr
200 
201 -- Generate a bare info table, not attached to any procedure.
202 mkBareInfoTable :: CLabel -> Unique -> CmmInfoTable -> [CmmTopZ]
203hunk ./compiler/cmm/CmmParse.y 322
204                -- closure type (no live regs)
205                {% withThisPackage $ \pkg ->
206                   do let infoLabel = mkCmmInfoLabel pkg $3
207+                     stk_lit <- code $ emitStackLabel $3
208                      return (mkCmmRetLabel pkg $3,
209                        CmmInfoTable False (ProfilingInfo zeroCLit zeroCLit) (fromIntegral $5)
210hunk ./compiler/cmm/CmmParse.y 325
211-                                    (ContInfo [] NoC_SRT),
212+                                    (ContInfo [] NoC_SRT (Just stk_lit)),
213                        []) }
214 
215        | 'INFO_TABLE_RET' '(' NAME ',' INT ',' formals_without_hints0 ')'
216hunk ./compiler/cmm/CmmParse.y 332
217                -- closure type, live regs
218                {% withThisPackage $ \pkg ->
219                   do live <- sequence (map (liftM Just) $7)
220+                     stk_lit <- code $ emitStackLabel $3
221                      return (mkCmmRetLabel pkg $3,
222                        CmmInfoTable False (ProfilingInfo zeroCLit zeroCLit) (fromIntegral $5)
223hunk ./compiler/cmm/CmmParse.y 335
224-                                    (ContInfo live NoC_SRT),
225+                                    (ContInfo live NoC_SRT (Just stk_lit)),
226                        live) }
227 
228 body   :: { ExtCode }
229hunk ./compiler/cmm/PprCmm.hs 196
230 pprTypeInfo (ThunkSelectorInfo offset srt) =
231     vcat [ptext (sLit "ptrs: ") <> integer (toInteger offset),
232           ptext (sLit "srt: ") <> ppr srt]
233-pprTypeInfo (ContInfo stack srt) =
234+pprTypeInfo (ContInfo stack srt mb_descr) =
235     vcat [ptext (sLit "stack: ") <> ppr stack,
236hunk ./compiler/cmm/PprCmm.hs 198
237-          ptext (sLit "srt: ") <> ppr srt]
238+          ptext (sLit "srt: ") <> ppr srt,
239+          ptext (sLit "descr: ") <> maybe (ptext (sLit "<none>")) pprLit mb_descr]
240 
241 -- Temp Jan08
242 argDescrType :: ArgDescr -> StgHalfWord
243hunk ./compiler/codeGen/CgInfoTbls.hs 43
244 import StaticFlags
245 
246 import Constants
247+import FastString
248 import Util
249 import Outputable
250 
251hunk ./compiler/codeGen/CgInfoTbls.hs 142
252 emitReturnTarget name stmts
253   = do { srt_info   <- getSRTInfo
254        ; blks <- cgStmtsToBlocks stmts
255+        ; stk_lit <- emitStackLabel =<< getStackLabel -- TODO: decorate with ReturnTarget-specifiec info
256         ; frame <- mkStackLayout
257hunk ./compiler/codeGen/CgInfoTbls.hs 144
258-        ; let info = CmmInfo
259+        ; let ret_descr = makeRelativeRefTo info_lbl stk_lit
260+              info = CmmInfo
261                        gc_target
262                        Nothing
263                        (CmmInfoTable False
264hunk ./compiler/codeGen/CgInfoTbls.hs 151
265                         (ProfilingInfo zeroCLit zeroCLit)
266                         rET_SMALL -- cmmToRawCmm may convert it to rET_BIG
267-                        (ContInfo frame srt_info))
268+                        (ContInfo frame srt_info (Just ret_descr)))
269         ; emitInfoTableAndCode (infoLblToEntryLbl info_lbl) info args blks
270        ; return info_lbl }
271   where
272hunk ./compiler/codeGen/CgMonad.lhs 25
273        noCgStmts, oneCgStmt, consCgStmt,
274 
275        getCmm,
276-       emitData, emitProc, emitSimpleProc,
277+       emitData, emitProc, emitSimpleProc, emitStackLabel,
278 
279        forkLabelledCode,
280        forkClosureBody, forkStatics, forkAlts, forkEval,
281hunk ./compiler/codeGen/CgMonad.lhs 35
282        EndOfBlockInfo(..),
283        setEndOfBlockInfo, getEndOfBlockInfo,
284 
285+       setStackLabel, getStackLabel,
286        setSRT, getSRT,
287        setSRTLabel, getSRTLabel,
288        setTickyCtrLabel, getTickyCtrLabel,
289hunk ./compiler/codeGen/CgMonad.lhs 76
290 import Id
291 import VarEnv
292 import OrdList
293+import FiniteMap
294 import Unique
295 import Util()
296 import UniqSupply
297hunk ./compiler/codeGen/CgMonad.lhs 80
298-import FastString()
299+import FastString
300 import Outputable
301 
302 import Control.Monad
303hunk ./compiler/codeGen/CgMonad.lhs 103
304 \begin{code}
305 data CgInfoDownwards   -- information only passed *downwards* by the monad
306   = MkCgInfoDown {
307-       cgd_dflags  :: DynFlags,
308-       cgd_mod     :: Module,          -- Module being compiled
309-       cgd_statics :: CgBindings,      -- [Id -> info] : static environment
310-       cgd_srt_lbl :: CLabel,          -- label of the current SRT
311-        cgd_srt     :: SRT,            -- the current SRT
312-       cgd_ticky   :: CLabel,          -- current destination for ticky counts
313-       cgd_eob     :: EndOfBlockInfo   -- Info for stuff to do at end of basic block:
314+       cgd_dflags    :: DynFlags,
315+       cgd_mod       :: Module,                -- Module being compiled
316+       cgd_stack_lbl :: FastString,            -- Human-readable label derived from enclosing binder, for insertion into backtraces
317+       cgd_statics   :: CgBindings,    -- [Id -> info] : static environment
318+       cgd_srt_lbl   :: CLabel,                -- label of the current SRT
319+        cgd_srt       :: SRT,          -- the current SRT
320+       cgd_ticky     :: CLabel,                -- current destination for ticky counts
321+       cgd_eob       :: EndOfBlockInfo -- Info for stuff to do at end of basic block:
322   }
323 
324 initCgInfoDown :: DynFlags -> Module -> CgInfoDownwards
325hunk ./compiler/codeGen/CgMonad.lhs 115
326 initCgInfoDown dflags mod
327-  = MkCgInfoDown {     cgd_dflags  = dflags,
328-                       cgd_mod     = mod,
329-                       cgd_statics = emptyVarEnv,
330-                       cgd_srt_lbl = error "initC: srt_lbl",
331-                       cgd_srt     = error "initC: srt",
332-                       cgd_ticky   = mkTopTickyCtrLabel,
333-                       cgd_eob     = initEobInfo }
334+  = MkCgInfoDown {     cgd_dflags    = dflags,
335+                       cgd_mod       = mod,
336+                       cgd_stack_lbl = error "initC: cgd_stack_lbl",
337+                       cgd_statics   = emptyVarEnv,
338+                       cgd_srt_lbl   = error "initC: srt_lbl",
339+                       cgd_srt       = error "initC: srt",
340+                       cgd_ticky     = mkTopTickyCtrLabel,
341+                       cgd_eob       = initEobInfo }
342 
343 data CgState
344   = MkCgState {
345hunk ./compiler/codeGen/CgMonad.lhs 132
346        -- Both the latter two are ordered only so that we can
347        -- reduce forward references, when it's easy to do so
348     
349+     cgs_stack_lbls :: FiniteMap FastString [CLabel],
350+        -- Labels given to any emitted stack label information. By gathering it all up
351+        -- as we go and then emitting it in one chunk, we:
352+        --  * Common up strings that are emitted several times
353+        --  * Ensure we only emit strings that are actually used
354+        --  * Get better assurance that the stack strings will occupy consecutive
355+        --    memory locations in the final binary. This is important because we can
356+        --    reduce physical memory usage by delaying the paging in of these locations
357+        --    until we actually need to refer to them
358+        --  * Can in the future potentially apply techniques such as LZW compression to
359+        --    reduce the total size of the strings :-)
360+     
361      cgs_binds :: CgBindings,  -- [Id -> info] : *local* bindings environment
362                                -- Bindings for top-level things are given in
363                                -- the info-down part
364hunk ./compiler/codeGen/CgMonad.lhs 157
365 initCgState uniqs
366   = MkCgState { cgs_stmts = nilOL, cgs_tops = nilOL,
367                cgs_binds = emptyVarEnv,
368+               cgs_stack_lbls = emptyFM,
369                cgs_stk_usg = initStkUsage,
370                cgs_hp_usg = initHpUsage,
371                cgs_uniqs = uniqs }
372hunk ./compiler/codeGen/CgMonad.lhs 373
373 -- Add code blocks from the latter to the former
374 -- (The cgs_stmts will often be empty, but not always; see codeOnly)
375 s1 `addCodeBlocksFrom` s2
376-  = s1 { cgs_stmts = cgs_stmts s1 `appOL` cgs_stmts s2,
377-        cgs_tops  = cgs_tops  s1 `appOL` cgs_tops  s2 }
378+  = s1 { cgs_stmts      = cgs_stmts s1 `appOL` cgs_stmts s2,
379+        cgs_tops       = cgs_tops  s1 `appOL` cgs_tops  s2,
380+        cgs_stack_lbls = plusFM_C (++) (cgs_stack_lbls s1) (cgs_stack_lbls s2) }
381 
382 maxHpHw :: HeapUsage -> VirtualHpOffset -> HeapUsage
383 hp_usg `maxHpHw` hw = hp_usg { virtHp = virtHp hp_usg `max` hw }
384hunk ./compiler/codeGen/CgMonad.lhs 407
385 \begin{code}
386 initC :: DynFlags -> Module -> FCode a -> IO a
387 
388-initC dflags mod (FCode code)
389-  = do { uniqs <- mkSplitUniqSupply 'c'
390-       ; case code (initCgInfoDown dflags mod) (initCgState uniqs) of
391+initC dflags mod (FCode m)
392+  = do  { uniqs <- mkSplitUniqSupply 'c'
393+       ; case m (initCgInfoDown dflags mod) (initCgState uniqs) of
394              (res, _) -> return res
395        }
396 
397hunk ./compiler/codeGen/CgMonad.lhs 777
398        ; blks <- cgStmtsToBlocks stmts
399        ; emitProc (CmmInfo Nothing Nothing CmmNonInfoTable) lbl [] blks }
400 
401+emitStackLabel :: FastString -> FCode CmmLit
402+emitStackLabel fs = do
403+   s <- getState
404+   liftM CmmLabel $ case lookupFM (cgs_stack_lbls s) fs of
405+       Just clabels -> return (head clabels)
406+       Nothing -> do
407+           clabel <- liftM mkStringLitLabel newUnique
408+           setState $ s { cgs_stack_lbls = addToFM (cgs_stack_lbls s) fs [clabel] }
409+           return clabel
410+
411+
412+
413 getCmm :: Code -> FCode Cmm
414 -- Get all the CmmTops (there should be no stmts)
415 -- Return a single Cmm which may be split from other Cmms by
416hunk ./compiler/codeGen/CgMonad.lhs 795
417 -- object splitting (at a later stage)
418 getCmm code
419   = do { state1 <- getState
420-       ; ((), state2) <- withState code (state1 { cgs_tops  = nilOL })
421-       ; setState $ state2 { cgs_tops = cgs_tops state1 }
422-       ; return (Cmm (fromOL (cgs_tops state2)))
423+       ; ((), state2) <- withState code (state1 { cgs_tops  = nilOL, cgs_stack_lbls = emptyFM })
424+       ; setState $ state2 { cgs_tops = cgs_tops state1, cgs_stack_lbls = cgs_stack_lbls state1 }
425+       ; let -- There may be more than one CLabel for one string if we have used addCodeBlocksFrom
426+             final_data (fs, clabels) = map CmmDataLabel clabels ++ [CmmString (bytesFS fs)]
427+             stack_labels = CmmData RelocatableReadOnlyData $ concatMap final_data (fmToList (cgs_stack_lbls state2))
428+       ; return (Cmm (stack_labels : fromOL (cgs_tops state2)))
429         }
430 
431hunk ./compiler/codeGen/CgMonad.lhs 803
432+
433 -- ----------------------------------------------------------------------------
434 -- CgStmts
435 
436hunk ./compiler/codeGen/CgMonad.lhs 872
437        info <- getInfoDown
438        return (cgd_eob info)
439 
440+-- ----------------------------------------------------------------------------
441+-- Get/set the binder used for stack traces
442+
443+getStackLabel :: FCode FastString
444+getStackLabel = liftM cgd_stack_lbl getInfoDown
445+
446+setStackLabel :: FastString -> FCode a -> FCode a
447+setStackLabel stack_lbl code
448+  = do info <- getInfoDown
449+       withInfoDown code (info { cgd_stack_lbl = stack_lbl })
450+
451 -- ----------------------------------------------------------------------------
452 -- Get/set the current SRT label
453 
454hunk ./compiler/codeGen/CodeGen.lhs 47
455 import TyCon
456 import Module
457 import ErrUtils
458+import FastString
459 import Panic
460hunk ./compiler/codeGen/CodeGen.lhs 49
461+import Outputable
462+import SrcLoc
463 \end{code}
464 
465 \begin{code}
466hunk ./compiler/codeGen/CodeGen.lhs 320
467 cgTopRhs bndr (StgRhsCon _cc con args)
468   = forkStatics (cgTopRhsCon bndr con args)
469 
470-cgTopRhs bndr (StgRhsClosure cc bi fvs upd_flag srt args body)
471-  = ASSERT(null fvs)    -- There should be no free variables
472-    setSRTLabel (mkSRTLabel (idName bndr) (idCafInfo bndr)) $
473-    setSRT srt $
474-    forkStatics (cgTopRhsClosure bndr cc bi upd_flag args body)
475+cgTopRhs bndr (StgRhsClosure cc bi fvs upd_flag srt args body) = do
476+    -- pkg <- getThisPackage -- :: PackageId
477+   
478+    -- Construct a monadic action which is able to build a label for the
479+    -- stack-trace functionality.
480+    -- TODO: thread more useful information through to this string?
481+    -- TODO: common up the strings if it is needed in several places?
482+    md <- getModuleName
483+    let name = getName bndr
484+        name_span = nameSrcSpan name
485+        name_doc = ppr (getOccName bndr) <> (if isSystemName name then char '_' <> ppr (nameUnique name) else empty)
486+        loc_doc = if isGoodSrcSpan name_span then parens (ppr name_span) else empty
487+        stack_str = showSDoc $ pprModule md <> char '.' <> name_doc <+> loc_doc
488+   
489+    ASSERT(null fvs)    -- There should be no free variables
490+      setSRTLabel (mkSRTLabel (idName bndr) (idCafInfo bndr)) $
491+      setSRT srt $
492+      setStackLabel (mkFastString stack_str) $
493+      forkStatics (cgTopRhsClosure bndr cc bi upd_flag args body)
494 \end{code}
495 
496 
497hunk ./compiler/prelude/primops.txt.pp 1135
498 
499 primop  CatchOp "catch#" GenPrimOp
500           (State# RealWorld -> (# State# RealWorld, a #) )
501-       -> (b -> State# RealWorld -> (# State# RealWorld, a #) )
502+       -> (b -> ByteArray# -> State# RealWorld -> (# State# RealWorld, a #) )
503        -> State# RealWorld
504        -> (# State# RealWorld, a #)
505    with
506hunk ./compiler/prelude/primops.txt.pp 1153
507       -- NB: result is bottom
508    out_of_line = True
509 
510+primop  RaiseWithStackOp "raiseWithStack#" GenPrimOp
511+   a -> ByteArray# -> b
512+   with
513+   strictness  = { \ _arity -> mkStrictSig (mkTopDmdType [lazyDmd, lazyDmd] BotRes) }
514+      -- NB: result is bottom
515+   out_of_line = True
516+
517 -- raiseIO# needs to be a primop, because exceptions in the IO monad
518 -- must be *precise* - we don't want the strictness analyser turning
519 -- one kind of bottom into another, as it is allowed to do in pure code.
520hunk ./includes/Cmm.h 525
521 #define TICK_SLOW_CALL_p()             TICK_BUMP(SLOW_CALL_p_ctr)
522 #define TICK_SLOW_CALL_pv()            TICK_BUMP(SLOW_CALL_pv_ctr)
523 #define TICK_SLOW_CALL_pp()            TICK_BUMP(SLOW_CALL_pp_ctr)
524+#define TICK_SLOW_CALL_ppv()           TICK_BUMP(SLOW_CALL_ppv_ctr)
525 #define TICK_SLOW_CALL_ppp()           TICK_BUMP(SLOW_CALL_ppp_ctr)
526 #define TICK_SLOW_CALL_pppp()                  TICK_BUMP(SLOW_CALL_pppp_ctr)
527 #define TICK_SLOW_CALL_ppppp()         TICK_BUMP(SLOW_CALL_ppppp_ctr)
528hunk ./includes/rts/storage/InfoTables.h 304
529 
530 typedef struct {
531 #if defined(TABLES_NEXT_TO_CODE)
532-    OFFSET_FIELD( srt_offset );        /* offset to the SRT table */
533+    OFFSET_FIELD( srt_offset );         /* offset to the SRT table */
534+    OFFSET_FIELD( ret_desc_offset );    /* offset to the name of the return point as: Package:Module.Name */
535     StgInfoTable i;
536 #else
537     StgInfoTable i;
538hunk ./includes/rts/storage/InfoTables.h 309
539-    StgSRT      *srt;  /* pointer to the SRT table */
540+    char        *ret_desc;  /* pointer to the name of the return point as: Package:Module.Name */
541+    StgSRT      *srt;       /* pointer to the SRT table */
542 #endif
543 } StgRetInfoTable;
544 
545hunk ./includes/rts/storage/InfoTables.h 373
546 #define GET_SRT(info) ((info)->srt)
547 #endif
548 
549+/*
550+ * GET_RET_DESC(info)
551+ * info must be a StgRetInfoTable*.
552+ */
553+#ifdef TABLES_NEXT_TO_CODE
554+#define GET_RET_DESC(info) (((info)->ret_desc_offset != 0) ? (char *)((StgWord)((info)+1) + (info->ret_desc_offset)) : 0)
555+#else
556+#define GET_RET_DESC(info) ((info)->ret_desc)
557+#endif
558+
559 /*
560  * GET_CON_DESC(info)
561  * info must be a StgConInfoTable*.
562hunk ./rts/Adjustor.c 220
563 stgAllocStable(size_t size_in_bytes, StgStablePtr *stable)
564 {
565   StgArrWords* arr;
566-  nat data_size_in_words, total_size_in_words;
567   
568hunk ./rts/Adjustor.c 221
569-  /* round up to a whole number of words */
570-  data_size_in_words  = (size_in_bytes + sizeof(W_) + 1) / sizeof(W_);
571-  total_size_in_words = sizeofW(StgArrWords) + data_size_in_words;
572
573-  /* allocate and fill it in */
574-  arr = (StgArrWords *)allocate(total_size_in_words);
575-  SET_ARR_HDR(arr, &stg_ARR_WORDS_info, CCCS, data_size_in_words);
576+  /* allocate unfilled array */
577+  arr = stgAllocArrWords(size_in_bytes);
578 
579   /* obtain a stable ptr */
580   *stable = getStablePtr((StgPtr)arr);
581hunk ./rts/Exception.cmm 359
582   jump stg_raisezh;
583 }
584 
585+INFO_TABLE_RET(stg_raiseWithStack_ret, RET_SMALL, P_ arg1, P_ arg2)
586+{
587+  R1 = Sp(1);
588+  R2 = Sp(2);
589+  Sp = Sp + WDS(3);
590+  W_[no_break_on_exception] = 1; 
591+  jump stg_raiseWithStackzh;
592+}
593+
594 stg_raisezh
595 {
596hunk ./rts/Exception.cmm 370
597+    W_ reified_stack;
598+    /* args : R1 :: Exception */
599+   
600+    ("ptr" reified_stack) = foreign "C" reifyStack (MyCapability() "ptr", Sp "ptr") [];
601+    R2 = reified_stack;
602+    jump stg_raiseWithStackzh;
603+}
604+
605+stg_raiseWithStackzh
606+{
607     W_ handler;
608     W_ frame_type;
609     W_ exception;
610hunk ./rts/Exception.cmm 383
611-    /* args : R1 :: Exception */
612+    W_ reified_stack;
613+    /* args : R1 :: Exception, R2 :: stack */
614 
615    exception = R1;
616hunk ./rts/Exception.cmm 387
617+   reified_stack = R2;
618 
619 #if defined(PROFILING)
620     /* Debugging tool: on raising an  exception, show where we are. */
621hunk ./rts/Exception.cmm 459
622             // be per-thread.
623             CInt[rts_stop_on_exception] = 0;
624             ("ptr" ioAction) = foreign "C" deRefStablePtr (W_[rts_breakpoint_io_action] "ptr") [];
625-            Sp = Sp - WDS(7);
626+            Sp = Sp - WDS(8);
627+            Sp(7) = reified_stack;
628             Sp(6) = exception;
629hunk ./rts/Exception.cmm 462
630-            Sp(5) = stg_raise_ret_info;
631+            Sp(5) = stg_raiseWithStack_ret_info;
632             Sp(4) = stg_noforceIO_info;    // required for unregisterised
633             Sp(3) = exception;             // the AP_STACK
634             Sp(2) = ghczmprim_GHCziBool_True_closure; // dummy breakpoint info
635hunk ./rts/Exception.cmm 478
636         * We will leave the stack in a GC'able state, see the stg_stop_thread
637         * entry code in StgStartup.cmm.
638         */
639+       
640+        /* TODO: print the reified_stack, since we've run out of catch frames */
641+       
642        Sp = CurrentTSO + TSO_OFFSET_StgTSO_stack
643                + WDS(TO_W_(StgTSO_stack_size(CurrentTSO))) - WDS(2);
644        Sp(1) = exception;      /* save the exception */
645hunk ./rts/Exception.cmm 533
646     StgTSO_flags(CurrentTSO) = %lobits32(
647        TO_W_(StgTSO_flags(CurrentTSO)) | TSO_BLOCKEX | TSO_INTERRUPTIBLE);
648 
649-    /* Call the handler, passing the exception value and a realworld
650+    /* Call the handler, passing the exception value, stack, and a realworld
651      * token as arguments.
652      */
653hunk ./rts/Exception.cmm 536
654-    Sp_adj(-1);
655+    Sp_adj(-2);
656+    Sp(1) = reified_stack;
657     Sp(0) = exception;
658     R1 = handler;
659     Sp_adj(-1);
660hunk ./rts/Exception.cmm 542
661     TICK_UNKNOWN_CALL();
662-    TICK_SLOW_CALL_pv();
663-    jump RET_LBL(stg_ap_pv);
664+    TICK_SLOW_CALL_ppv();
665+    jump RET_LBL(stg_ap_ppv);
666 }
667 
668 stg_raiseIOzh
669hunk ./rts/RtsUtils.c 257
670 }
671 
672 /* -----------------------------------------------------------------------------
673+   Allocating simple arrays.
674+   -------------------------------------------------------------------------- */
675+
676+StgArrWords *
677+stgAllocArrWords(Capability *cap, size_t size_in_bytes)
678+{
679+    StgArrWords* arr;
680+    nat data_size_in_words, total_size_in_words;
681+
682+    /* round up to a whole number of words */
683+    data_size_in_words  = (size_in_bytes + sizeof(W_) - 1) / sizeof(W_);
684+    total_size_in_words = sizeofW(StgArrWords) + data_size_in_words;
685+
686+    /* allocate and fill it in */
687+    arr = (StgArrWords *)allocate(cap, total_size_in_words);
688+    SET_ARR_HDR(arr, &stg_ARR_WORDS_info, CCCS, data_size_in_words);
689+   
690+    return arr;
691+}
692+
693+/* -----------------------------------------------------------------------------
694    Stack overflow
695   
696    Not sure if this belongs here.
697hunk ./rts/RtsUtils.h 35
698  * Misc other utilities
699  * -------------------------------------------------------------------------- */
700 
701+StgArrWords *stgAllocArrWords(Capability *cap, size_t size_in_bytes);
702+
703 void heapOverflow(void);
704 
705 char *time_str(void);
706hunk ./rts/Schedule.c 2440
707     }
708 }
709 
710+/* -----------------------------------------------------------------------------
711+   reifyStack
712+   
713+   This function is called by the raise# primitve, to reify the STG stack as a
714+   null-termiante array of pointers to C strings.
715+   -------------------------------------------------------------------------- */
716+
717+
718+StgArrWords *
719+reifyStack( Capability *cap, StgPtr sp )
720+{
721+    const StgRetInfoTable* ret_info;
722+    nat framecount;
723+    StgArrWords* reified;
724+    char **reified_payload;
725+    StgPtr orig_sp;
726+   
727+    framecount = 0;
728+    orig_sp = sp;
729+   
730+    // 1) Determine the length of the array we need to allocate to store the stack frame pointer array
731+    for (; ret_info = get_ret_itbl((StgClosure *)sp), ret_info->i.type != STOP_FRAME; sp += stack_frame_sizeW((StgClosure *)sp)) {
732+        if (GET_RET_DESC(ret_info)) {
733+            framecount++;
734+        }
735+    }
736+   
737+    // 2) Allocate array of that size. The length will be stored in the StgArrWords, so we don't need any terminators
738+    reified = stgAllocArrWords(cap, framecount * sizeof(char *));
739+    reified_payload = (char**)(&(reified->payload));
740+   
741+    // 3) Crawl the stack again, but this time filling in the newly-allocated array
742+    for (sp = orig_sp; ret_info = get_ret_itbl((StgClosure *)sp), ret_info->i.type != STOP_FRAME; sp += stack_frame_sizeW((StgClosure *)sp)) {
743+        if (GET_RET_DESC(ret_info)) {
744+            *reified_payload = GET_RET_DESC(ret_info);
745+            reified_payload++;
746+        }
747+    }
748+   
749+    // 4) Return
750+    return reified;
751+}
752+
753 
754 /* -----------------------------------------------------------------------------
755    findRetryFrameHelper
756hunk ./rts/Schedule.h 46
757 /* raiseExceptionHelper */
758 StgWord raiseExceptionHelper (StgRegTable *reg, StgTSO *tso, StgClosure *exception);
759 
760+/* reifyStack */
761+StgArrWords *reifyStack( Capability* cap, StgPtr sp );
762+
763 /* findRetryFrameHelper */
764 StgWord findRetryFrameHelper (StgTSO *tso);
765 
766}
767
768Context:
769
770[Handle IND_STATIC in isRetainer
771Ian Lynagh <[email protected]>**20100409104207
772 IND_STATIC used to be an error, but at the moment it can happen
773 as isAlive doesn't look through IND_STATIC as it ignores static
774 closures. See trac #3956 for a program that hit this error.
775]
776[Add Data and Typeable instances to HsSyn
777David Waern <[email protected]>**20100330011020
778 Ignore-this: c3f2717207b15539fea267c36b686e6a
779 
780 The instances (and deriving declarations) have been taken from the ghc-syb
781 package.
782]
783[Fix for derefing ThreadRelocated TSOs in MVar operations
784Simon Marlow <[email protected]>**20100407092824
785 Ignore-this: 94dd7c68a6094eda667e2375921a8b78
786]
787[sanity check fix
788Simon Marlow <[email protected]>**20100407092746
789 Ignore-this: 9c18cd5f5393e5049015ca52e62a1269
790]
791[get the reg liveness right in the putMVar# heap check
792Simon Marlow <[email protected]>**20100407092724
793 Ignore-this: b1ba07a59ecfae00e9a1f8391741abc
794]
795[initialise the headers of MSG_BLACKHOLE objects properly
796Simon Marlow <[email protected]>**20100407081712
797 Ignore-this: 183dcd0ca6a395d08db2be12b02bdd79
798]
799[initialise the headers of MVAR_TSO_QUEUE objects properly
800Simon Marlow <[email protected]>**20100407081514
801 Ignore-this: 4b4a2f30cf2fb69ca4128c41744687bb
802]
803[undo debugging code
804Simon Marlow <[email protected]>**20100406142740
805 Ignore-this: 323c2248f817b6717c19180482fc4b00
806]
807[putMVar#: fix reg liveness in the heap check
808Simon Marlow <[email protected]>**20100406135832
809 Ignore-this: cddd2c7807ac7612c9b2c4c0d384d284
810]
811[account for the new BLACKHOLEs in the GHCi debugger
812Simon Marlow <[email protected]>**20100406133406
813 Ignore-this: 4d4aeb4bbada3f50dc1fb0123f565e8f
814]
815[don't forget to deRefTSO() in tryWakeupThread()
816Simon Marlow <[email protected]>**20100406130411
817 Ignore-this: 171d57c4f8653835dec0b69f9be9881c
818]
819[Fix bug in popRunQueue
820Simon Marlow <[email protected]>**20100406091453
821 Ignore-this: 9d3cec8f18f5c5cbd51751797386eb6f
822]
823[fix bug in migrateThread()
824Simon Marlow <[email protected]>**20100401105840
825 Ignore-this: 299bcf0d1ea0f8865f3e845eb93d2ad3
826]
827[Remove the IND_OLDGEN and IND_OLDGEN_PERM closure types
828Simon Marlow <[email protected]>**20100401093519
829 Ignore-this: 95f2480c8a45139835eaf5610217780b
830 These are no longer used: once upon a time they used to have different
831 layout from IND and IND_PERM respectively, but that is no longer the
832 case since we changed the remembered set to be an array of addresses
833 instead of a linked list of closures.
834]
835[Change the representation of the MVar blocked queue
836Simon Marlow <[email protected]>**20100401091605
837 Ignore-this: 20a35bfabacef2674df362905d7834fa
838 
839 The list of threads blocked on an MVar is now represented as a list of
840 separately allocated objects rather than being linked through the TSOs
841 themselves.  This lets us remove a TSO from the list in O(1) time
842 rather than O(n) time, by marking the list object.  Removing this
843 linear component fixes some pathalogical performance cases where many
844 threads were blocked on an MVar and became unreachable simultaneously
845 (nofib/smp/threads007), or when sending an asynchronous exception to a
846 TSO in a long list of thread blocked on an MVar.
847 
848 MVar performance has actually improved by a few percent as a result of
849 this change, slightly to my surprise.
850 
851 This is the final cleanup in the sequence, which let me remove the old
852 way of waking up threads (unblockOne(), MSG_WAKEUP) in favour of the
853 new way (tryWakeupThread and MSG_TRY_WAKEUP, which is idempotent).  It
854 is now the case that only the Capability that owns a TSO may modify
855 its state (well, almost), and this simplifies various things.  More of
856 the RTS is based on message-passing between Capabilities now.
857]
858[eliminate some duplication with a bit of CPP
859Simon Marlow <[email protected]>**20100330154355
860 Ignore-this: 838f7d341f096ca14c86ab9c81193e36
861]
862[Make ioManagerDie() idempotent
863Simon Marlow <[email protected]>**20100401100705
864 Ignore-this: a5996b43cdb2e2d72e6e971d7ea925fb
865 Avoids screeds of "event buffer overflowed; event dropped" in
866 conc059(threaded1).
867]
868[Move a thread to the front of the run queue when another thread blocks on it
869Simon Marlow <[email protected]>**20100329144521
870 Ignore-this: c518ff0d41154680edc811d891826a29
871 This fixes #3838, and was made possible by the new BLACKHOLE
872 infrastructure.  To allow reording of the run queue I had to make it
873 doubly-linked, which entails some extra trickiness with regard to
874 GC write barriers and suchlike.
875]
876[remove non-existent MUT_CONS symbols
877Simon Marlow <[email protected]>**20100330152600
878 Ignore-this: 885628257a9d03f2ece2a754d993014a
879]
880[change throwTo to use tryWakeupThread rather than unblockOne
881Simon Marlow <[email protected]>**20100329144613
882 Ignore-this: 10ad4965e6c940db71253f1c72218bbb
883]
884[tiny GC optimisation
885Simon Marlow <[email protected]>**20100329144551
886 Ignore-this: 9e095b9b73fff0aae726f9937846ba92
887]
888[New implementation of BLACKHOLEs
889Simon Marlow <[email protected]>**20100329144456
890 Ignore-this: 96cd26793b4e6ab9ddd0d59aae5c2f1d
891 
892 This replaces the global blackhole_queue with a clever scheme that
893 enables us to queue up blocked threads on the closure that they are
894 blocked on, while still avoiding atomic instructions in the common
895 case.
896 
897 Advantages:
898 
899  - gets rid of a locked global data structure and some tricky GC code
900    (replacing it with some per-thread data structures and different
901    tricky GC code :)
902 
903  - wakeups are more prompt: parallel/concurrent performance should
904    benefit.  I haven't seen anything dramatic in the parallel
905    benchmarks so far, but a couple of threading benchmarks do improve
906    a bit.
907 
908  - waking up a thread blocked on a blackhole is now O(1) (e.g. if
909    it is the target of throwTo).
910 
911  - less sharing and better separation of Capabilities: communication
912    is done with messages, the data structures are strictly owned by a
913    Capability and cannot be modified except by sending messages.
914 
915  - this change will utlimately enable us to do more intelligent
916    scheduling when threads block on each other.  This is what started
917    off the whole thing, but it isn't done yet (#3838).
918 
919 I'll be documenting all this on the wiki in due course.
920 
921]
922[Fix warnings (allow pushOnRunQueue() to not be inlined)
923Simon Marlow <[email protected]>**20100401114559
924 Ignore-this: f40bfbfad70a5165a946d11371605b7d
925]
926[remove out of date comment
927Simon Marlow <[email protected]>**20100401105853
928 Ignore-this: 26af88dd418ee0bcda7223b3b7e4e8d2
929]
930[tidy up spacing in stderr traces
931Simon Marlow <[email protected]>**20100326163122
932 Ignore-this: 16558b0433a274be217d4bf39aa4946
933]
934[Fix an assertion that was not safe when running in parallel
935Simon Marlow <[email protected]>**20100325143656
936 Ignore-this: cad08fb8900eb3a475547af0189fcc47
937]
938[Never jump directly to a thunk's entry code, even if it is single-entry
939Simon Marlow <[email protected]>**20100325114847
940 Ignore-this: 938da172c06a97762ef605c8fccfedf1
941 I don't think this fixes any bugs as we don't have single-entry thunks
942 at the moment, but it could cause problems for parallel execution if
943 we ever did re-introduce update avoidance.
944]
945[Rename forgotten -dverbose-simpl to -dverbose-core2core in the docs.
946Milan Straka <[email protected]>**20100331153626
947 Ignore-this: 2da58477fb96e1cfb80f37dddd7c422c
948]
949[Add -pa and -V to the documentation of time profiling options.
950Milan Straka <[email protected]>**20100329191121
951 Ignore-this: be74d216481ec5a19e5f40f85e6e3d65
952]
953[Keep gcc 4.5 happy
954Simon Marlow <[email protected]>**20100330120425
955 Ignore-this: 7811878cc2bd1ce9cfbb5bf102fe3454
956]
957[Fix warning compiling Linker.c for PPC Mac
958[email protected]**20100403182355
959 Ignore-this: e2d2448770c9714ce17dd6cf3e297063
960 The warning message eliminated is:
961 > rts/Linker.c:4756:0:
962 >      warning: nested extern declaration of 'symbolsWithoutUnderscore'
963]
964[Fix error compiling AsmCodeGen.lhs for PPC Mac (mkRtsCodeLabel)
965[email protected]**20100403181656
966 Ignore-this: deb7524ea7852a15a2ac0849c8c82f74
967 The error messages eliminated are:
968 > compiler/nativeGen/AsmCodeGen.lhs:875:31:
969 >     Not in scope: `mkRtsCodeLabel'
970 > compiler/nativeGen/AsmCodeGen.lhs:879:31:
971 >     Not in scope: `mkRtsCodeLabel'
972 > compiler/nativeGen/AsmCodeGen.lhs:883:31:
973 >     Not in scope: `mkRtsCodeLabel'
974]
975[Fix error compiling AsmCodeGen.lhs for PPC Mac (DestBlockId)
976[email protected]**20100403180643
977 Ignore-this: 71e833e94ed8371b2ffabc2cf80bf585
978 The error message eliminated is:
979 > compiler/nativeGen/AsmCodeGen.lhs:637:16:
980 >     Not in scope: data constructor `DestBlockId'
981]
982[Fix boot-pkgs's sed usage to work with Solaris's sed
983Ian Lynagh <[email protected]>**20100401153441]
984[Pass "-i org.haskell.GHC" to packagemaker when building the OS X installer
985Ian Lynagh <[email protected]>**20100331144707
986 This seems to fix this failure:
987 [...]
988 ** BUILD SUCCEEDED **
989 rm -f -f GHC-system.pmdoc/*-contents.xml
990 /Developer/usr/bin/packagemaker -v --doc GHC-system.pmdoc\
991              -o /Users/ian/to_release/ghc-6.12.1.20100330/GHC-6.12.1.20100330-i386.pkg
992 2010-03-31 15:08:15.695 packagemaker[13909:807] Setting to : 0 (null)
993 2010-03-31 15:08:15.709 packagemaker[13909:807] Setting to : 0 org.haskell.glasgowHaskellCompiler.ghc.pkg
994 2010-03-31 15:08:15.739 packagemaker[13909:807] relocate: (null) 0
995 2010-03-31 15:08:15.740 packagemaker[13909:807] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSXMLDocument initWithXMLString:options:error:]: nil argument'
996 2010-03-31 15:08:15.741 packagemaker[13909:807] Stack: (
997     2511962091,
998     2447007291,
999     2511961547,
1000     2511961610,
1001     2432803204,
1002     453371,
1003     447720,
1004     436209,
1005     435510,
1006     9986,
1007     9918
1008 )
1009 make[1]: *** [framework-pkg] Trace/BPT trap
1010 make: *** [framework-pkg] Error 2
1011]
1012[Use machdepCCOpts when compiling the file to toggle -(no-)rtsopts
1013Ian Lynagh <[email protected]>**20100331161302
1014 Should fix toggling on OS X "Snow Leopard". Diagnosed by Roman Leshchinskiy.
1015]
1016[Avoid a non-portable use of tar reported by Roman Leshchinskiy
1017Ian Lynagh <[email protected]>**20100330145802]
1018[Don't install EXTRA_PACKAGES by default
1019Simon Marlow <[email protected]>**20100330142714
1020 Ignore-this: d4cc8f87a6de8d9d1d6dc9b77130b3
1021]
1022[fix a non-portable printf format
1023Simon Marlow <[email protected]>**20100330134437
1024 Ignore-this: d41c23c54ec29654cb2049de1e588570
1025]
1026[avoid single quote in #error
1027Simon Marlow <[email protected]>**20100330120346
1028 Ignore-this: 663f39e7a27fead2f648fbf22d345bb4
1029]
1030[use FMT_Word64 instead of locally-defined version
1031Simon Marlow <[email protected]>**20100330114650
1032 Ignore-this: 82697b8095dffb3a8e196c687006ece0
1033]
1034[remove old/unused DotnetSupport and GhcLibsWithUnix
1035Simon Marlow <[email protected]>**20100330123732
1036 Ignore-this: c68814868b3671abdc369105bbeafe6c
1037]
1038[fix return type cast in f.i.wrapper when using libffi (#3516)
1039Simon Marlow <[email protected]>**20100329154220
1040 Ignore-this: f898eb8c9ae2ca2009e539735b92c438
1041 
1042 Original fix submitted by
1043   Sergei Trofimovich <[email protected]>
1044 modified by me:
1045  - exclude 64-bit types
1046  - compare uniques, not strings
1047  - #include "ffi.h" is conditional
1048]
1049[libffi: install 'ffitarget.h' header as sole 'ffi.h' is unusable
1050Simon Marlow <[email protected]>**20100329135734
1051 Ignore-this: f9b555ea289d8df1aa22cb6faa219a39
1052 Submitted by: Sergei Trofimovich <[email protected]>
1053 Re-recorded against HEAD.
1054]
1055[avoid a fork deadlock (see comments)
1056Simon Marlow <[email protected]>**20100329132329
1057 Ignore-this: 3377f88b83bb3b21e42d7fc5f0d866f
1058]
1059[tidy up the end of the all_tasks list after forking
1060Simon Marlow <[email protected]>**20100329132253
1061 Ignore-this: 819d679875be5f344e816210274d1c29
1062]
1063[Add a 'setKeepCAFs' external function (#3900)
1064Simon Marlow <[email protected]>**20100329110036
1065 Ignore-this: ec532a18cad4259a09847b0b9ae2e1d2
1066]
1067[Explicitly check whether ar supports the @file syntax
1068Ian Lynagh <[email protected]>**20100329123325
1069 rather than assuming that all GNU ar's do.
1070 Apparently OpenBSD's older version doesn't.
1071]
1072[Fix the format specifier for Int64/Word64 on Windows
1073Ian Lynagh <[email protected]>**20100327182126
1074 mingw doesn't understand %llu/%lld - it treats them as 32-bit rather
1075 than 64-bit. We use %I64u/%I64d instead.
1076]
1077[Fix the ghci startmenu item
1078Ian Lynagh <[email protected]>**20100326235934
1079 I'm not sure what changed, but it now doesn't work for me without
1080 the "Start in" field being set.
1081]
1082[Fix paths to docs in "Start Menu" entries in Windows installer; fixes #3847
1083Ian Lynagh <[email protected]>**20100326155917]
1084[Add a licence file for the Windows installer to use
1085Ian Lynagh <[email protected]>**20100326155130]
1086[Add gcc-g++ to the inplace mingw installation; fixes #3893
1087Ian Lynagh <[email protected]>**20100326154714]
1088[Add the licence file to the Windows installer. Fixes #3934
1089Ian Lynagh <[email protected]>**20100326152449]
1090[Quote the paths to alex and happy in configure
1091Ian Lynagh <[email protected]>**20100325143449
1092 Ignore-this: d6d6e1a250f88985bbeea760e63a79db
1093]
1094[Use </> rather than ++ "/"
1095Ian Lynagh <[email protected]>**20100325133237
1096 This stops us generating paths like
1097     c:\foo\/ghc460_0/ghc460_0.o
1098 which windres doesn't understand.
1099]
1100[Append $(exeext) to utils/ghc-pkg_dist_PROG
1101Ian Lynagh <[email protected]>**20100324233447
1102 Fixes bindist creation
1103]
1104[A sanity check
1105Simon Marlow <[email protected]>**20100325110500
1106 Ignore-this: 3b3b76d898c822456857e506b7531e65
1107]
1108[do_checks: do not set HpAlloc if the stack check fails
1109Simon Marlow <[email protected]>**20100325110328
1110 Ignore-this: 899ac8c29ca975d03952dbf4608d758
1111 
1112 This fixes a very rare heap corruption bug, whereby
1113 
1114  - a context switch is requested, which sets HpLim to zero
1115    (contextSwitchCapability(), called by the timer signal or
1116    another Capability).
1117 
1118  - simultaneously a stack check fails, in a code fragment that has
1119    both a stack and a heap check.
1120 
1121 The RTS then assumes that a heap-check failure has occurred and
1122 subtracts HpAlloc from Hp, although in fact it was a stack-check
1123 failure and retreating Hp will overwrite valid heap objects.  The bug
1124 is that HpAlloc should only be set when Hp has been incremented by the
1125 heap check.  See comments in rts/HeapStackCheck.cmm for more details.
1126 
1127 This bug is probably incredibly rare in practice, but I happened to be
1128 working on a test that triggers it reliably:
1129 concurrent/should_run/throwto001, compiled with -O -threaded, args 30
1130 300 +RTS -N2, run repeatedly in a loop.
1131]
1132[comments and formatting only
1133Simon Marlow <[email protected]>**20100325104617
1134 Ignore-this: c0a211e15b5953bb4a84771bcddd1d06
1135]
1136[Change how perl scripts get installed; partially fixes #3863
1137Ian Lynagh <[email protected]>**20100324171422
1138 We now regenerate them when installing, which means the path for perl
1139 doesn't get baked in
1140]
1141[Pass the location of gcc in the ghc wrapper script; partially fixes #3863
1142Ian Lynagh <[email protected]>**20100324171408
1143 This means we don't rely on baking a path to gcc into the executable
1144]
1145[Quote the ar path in configure
1146Ian Lynagh <[email protected]>**20100324162043]
1147[Remove unused cUSER_WAY_NAMES cUSER_WAY_OPTS
1148Ian Lynagh <[email protected]>**20100324145048]
1149[Remove unused cCONTEXT_DIFF
1150Ian Lynagh <[email protected]>**20100324145013]
1151[Remove unused cEnableWin32DLLs
1152Ian Lynagh <[email protected]>**20100324144841]
1153[Remove unused cGHC_CP
1154Ian Lynagh <[email protected]>**20100324144656]
1155[Fix the build for non-GNU-ar
1156Ian Lynagh <[email protected]>**20100324132907]
1157[Tweak the Makefile code for making .a libs; fixes trac #3642
1158Ian Lynagh <[email protected]>**20100323221325
1159 The main change is that, rather than using "xargs ar" we now put
1160 all the filenames into a file, and do "ar @file". This means that
1161 ar adds all the files at once, which works around a problem where
1162 files with the same basename in a later invocation were overwriting
1163 the existing file in the .a archive.
1164]
1165[Enable shared libraries on Windows; fixes trac #3879
1166Ian Lynagh <[email protected]>**20100320231414
1167 Ignore-this: c93b35ec5b7a7fa6ddb286d17a616216
1168]
1169[Add the external core PDF to the new build system
1170Ian Lynagh <[email protected]>**20100321161909]
1171[Allow specifying $threads directly when validating
1172Ian Lynagh <[email protected]>**20100321112835]
1173[Remove LazyUniqFM; fixes trac #3880
1174Ian Lynagh <[email protected]>**20100320213837]
1175[UNDO: slight improvement to scavenging ...
1176Simon Marlow <[email protected]>**20100319153413
1177 Ignore-this: f0ab581c07361f7b57eae02dd6ec893c
1178 
1179 Accidnetally pushed this patch which, while it validates, isn't
1180 correct.
1181 
1182 rolling back:
1183 
1184 Fri Mar 19 11:21:27 GMT 2010  Simon Marlow <[email protected]>
1185   * slight improvement to scavenging of update frames when a collision has occurred
1186 
1187     M ./rts/sm/Scav.c -19 +15
1188]
1189[slight improvement to scavenging of update frames when a collision has occurred
1190Simon Marlow <[email protected]>**20100319112127
1191 Ignore-this: 6de2bb9614978975f17764a0f259d9bf
1192]
1193[Don't install the utf8-string package
1194Ian Lynagh <[email protected]>**20100317212709]
1195[Don't use -Bsymbolic when linking the RTS
1196Ian Lynagh <[email protected]>**20100316233357
1197 This makes the RTS hooks work when doing dynamic linking
1198]
1199[Fix Trac #3920: Template Haskell kinds
1200[email protected]**20100317123519
1201 Ignore-this: 426cac7920446e04f3cc30bd1d9f76e2
1202 
1203 Fix two places where we were doing foldl instead of foldr
1204 after decomposing a Kind.  Strange that the same bug appears
1205 in two quite different places!
1206]
1207[copy_tag_nolock(): fix write ordering and add a write_barrier()
1208Simon Marlow <[email protected]>**20100316143103
1209 Ignore-this: ab7ca42904f59a0381ca24f3eb38d314
1210 
1211 Fixes a rare crash in the parallel GC.
1212 
1213 If we copy a closure non-atomically during GC, as we do for all
1214 immutable values, then before writing the forwarding pointer we better
1215 make sure that the closure itself is visible to other threads that
1216 might follow the forwarding pointer.  I imagine this doesn't happen
1217 very often, but I just found one case of it: in scavenge_stack, the
1218 RET_FUN case, after evacuating ret_fun->fun we then follow it and look
1219 up the info pointer.
1220]
1221[Add sliceP mapping to vectoriser builtins
1222[email protected]**20100316060517
1223 Ignore-this: 54c3cafff584006b6fbfd98124330aa3
1224]
1225[Comments only
1226[email protected]**20100311064518
1227 Ignore-this: d7dc718cc437d62aa5b1b673059a9b22
1228]
1229[TAG 2010-03-16
1230Ian Lynagh <[email protected]>**20100316005137
1231 Ignore-this: 234e3bc29e2f26cc59d7b03d780cc352
1232]
1233[When saying RTS options are disabled, also say how to enable them
1234Ian Lynagh <[email protected]>**20100315173541]
1235[Fix profiling build following removal of specific STM object types
1236Simon Marlow <[email protected]>**20100315093256
1237 Ignore-this: b04fd7f984cc0cc38bcf291e400489fd
1238]
1239[When compiling with GHC >= 6.13, use -rtsopts
1240Ian Lynagh <[email protected]>**20100314172018]
1241[Document the new RTS linker flags
1242Ian Lynagh <[email protected]>**20100314140847]
1243[Don't enable RTS options by default
1244Ian Lynagh <[email protected]>**20100314133648]
1245[Add a -with-rtsopts link-time flag
1246Ian Lynagh <[email protected]>**20100313231342
1247 You can now link with
1248     -with-rtsopts="-H128m -K1m"
1249]
1250[Rename a variable
1251Ian Lynagh <[email protected]>**20100313224852]
1252[Add a link-time flag to en/disable the RTS options
1253Ian Lynagh <[email protected]>**20100313154555
1254 If RTS options are disabled then:
1255 * The ghc_rts_opts C code variable is processed as normal
1256 * The GHCRTS environment variable is ignored and, if it is defined, a
1257   warning is emitted
1258 * The +RTS flag gives an error and terminates the program
1259]
1260[Fix a couple of bugs in the throwTo handling, exposed by conc016(threaded2)
1261Simon Marlow <[email protected]>**20100311123705
1262 Ignore-this: 80110295e50fcb71d4137c60c2451acd
1263]
1264[Use message-passing to implement throwTo in the RTS
1265Simon Marlow <[email protected]>**20100311095744
1266 Ignore-this: 2aeec25282b7a7dfe1132573a8170e2a
1267 
1268 This replaces some complicated locking schemes with message-passing
1269 in the implementation of throwTo. The benefits are
1270 
1271  - previously it was impossible to guarantee that a throwTo from
1272    a thread running on one CPU to a thread running on another CPU
1273    would be noticed, and we had to rely on the GC to pick up these
1274    forgotten exceptions. This no longer happens.
1275 
1276  - the locking regime is simpler (though the code is about the same
1277    size)
1278 
1279  - threads can be unblocked from a blocked_exceptions queue without
1280    having to traverse the whole queue now.  It's a rare case, but
1281    replaces an O(n) operation with an O(1).
1282 
1283  - generally we move in the direction of sharing less between
1284    Capabilities (aka HECs), which will become important with other
1285    changes we have planned.
1286 
1287 Also in this patch I replaced several STM-specific closure types with
1288 a generic MUT_PRIM closure type, which allowed a lot of code in the GC
1289 and other places to go away, hence the line-count reduction.  The
1290 message-passing changes resulted in about a net zero line-count
1291 difference.
1292 
1293]
1294[fix bug in discardTasksExcept() that broke forkProcess
1295Simon Marlow <[email protected]>**20100311093632
1296 Ignore-this: a38d49b177c4f14ca15a50702c41ae9c
1297]
1298[disable a false assertion, add a comment to explain why
1299Simon Marlow <marlowsd@gmail.com>**20091123110416
1300 Ignore-this: 30f45e1cae917259248a2253630e2871
1301]
1302[Fix Trac #1954: newtype deriving caused 'defined but not used' error
1303simonpj@microsoft.com**20100309173555
1304 Ignore-this: d403d3c8ae585f604c139d42d43270d
1305 
1306 We were getting a bogus claim that a newtype "data constructor" was
1307 unused.  The fix is easy, although I had to add a field to the constructor
1308 TcEnv.NewTypeDerived
1309 
1310 See Note [Newtype deriving and unused constructors] in TcDeriv
1311]
1312[Rule binders shouldn't have IdInfo
1313simonpj@microsoft.com**20100309173327
1314 Ignore-this: 4f788da0258235cc872a4645de0f969e
1315 
1316 While I was looking at the rule binders generated in DsBinds for specialise pragmas,
1317 I also looked at Specialise.  It too was "cloning" the dictionary binders including
1318 their IdInfo. In this case they should not have any, but its seems better to make
1319 them completely fresh rather than substitute in existing (albeit non-existent) IdInfo.
1320]
1321[Add comment
1322simonpj@microsoft.com**20100309173120
1323 Ignore-this: c04217e40c2eade3e2b28d7919e11de6
1324]
1325[Rule binders shouldn't have DFun pragmas
1326simonpj@microsoft.com**20100309173100
1327 Ignore-this: 3298919f2fc8502e367113326f0848
1328 
1329 When DsBinds deals with a SPECIALISE pragma, it makes up the binders
1330 for a RULE. These binders should be very vanilla: no IdInfo of any sort.
1331 But the way it was before they could have DFun pragmas, which led to
1332 Bad Joss downstream.  (Actually to cause a downstream *error* was itself
1333 a bug, which I've fixed, but it's clearly wrong for them to be DFuns!)
1334]
1335[A bug in isClosedUnfolding
1336simonpj@microsoft.com**20100309172842
1337 Ignore-this: e030b521cd58f0bfa52c56dd56f12fb5
1338 
1339 isClosedUnfolding should say False for DFUnUnfolding!
1340]
1341[Comments only
1342simonpj@microsoft.com**20100309172814
1343 Ignore-this: 426455ef147c0b3640ce22ec6c74d8dd
1344]
1345[Comments and type signatures only
1346simonpj@microsoft.com**20100309172756
1347 Ignore-this: c31538dd34b35a947a95d2b7258eb3aa
1348]
1349[Comments only
1350simonpj@microsoft.com**20100309172743
1351 Ignore-this: 3679f154d68dbb48076d9f5b9b9b7712
1352]
1353[Tidy up pretty-printing of InlinePragma
1354simonpj@microsoft.com**20100309172730
1355 Ignore-this: aa75135296ba4de96a704dd41b1ff4d0
1356 
1357 We were getting "INLINEALWAYS" printed out here and there.
1358 Now there are always brackets around the activation, thus "INLINE[ALWAYS]"
1359]
1360[Split part of the Task struct into a separate struct InCall
1361Simon Marlow <marlowsd@gmail.com>**20100309143111
1362 Ignore-this: 5dc47acc7b8180ff49fab14de64c99c4
1363 
1364 The idea is that this leaves Tasks and OSThread in one-to-one
1365 correspondence.  The part of a Task that represents a call into
1366 Haskell from C is split into a separate struct InCall, pointed to by
1367 the Task and the TSO bound to it.  A given OSThread/Task thus always
1368 uses the same mutex and condition variable, rather than getting a new
1369 one for each callback.  Conceptually it is simpler, although there are
1370 more types and indirections in a few places now.
1371 
1372 This improves callback performance by removing some of the locks that
1373 we had to take when making in-calls.  Now we also keep the current Task
1374 in a thread-local variable if supported by the OS and gcc (currently
1375 only Linux).
1376]
1377[add a note
1378Simon Marlow <marlowsd@gmail.com>**20100309133721
1379 Ignore-this: e25f24904066dfcdc42a289a830ff67a
1380]
1381[Fix a rare deadlock when the IO manager thread is slow to start up
1382Simon Marlow <marlowsd@gmail.com>**20100309095831
1383 Ignore-this: dc2377d587ac681b213fc3b26831958e
1384 This fixes occasional failures of ffi002(threaded1) on a loaded
1385 machine.
1386]
1387[When BUILD_DOCBOOK_HTML is NO, keep the rules, just omit the target
1388simonpj@microsoft.com**20100305173004
1389 Ignore-this: bbef93db58c56b62ccff0f21bf6fc57f
1390 
1391   (and similarly for PS and PDF)
1392 
1393 The previous setup nuked the rules for making the documentation when
1394 BUILD_DOCBOOK_HTML=NO.  This meant that "make html" didn't work.
1395 
1396 There isn't any reason to nuke the rules (so far as Simon and I know).
1397]
1398[Fix Trac #3736: do not preInlineUnconditionally with INLINE
1399simonpj@microsoft.com**20100305172759
1400 Ignore-this: 29ea0f14333604e5e21eeef95cc46d9e
1401 
1402 preInlineUnconditionally was, in effect, nuking an INLINE pragma, with
1403 very bad effect on runtime in this program.  Fortunately the fix is
1404 very simple.
1405 
1406 See Note [InlineRule and preInlineUnconditionally] in SimplUtils.
1407]
1408[Comments only
1409simonpj@microsoft.com**20100304125930
1410 Ignore-this: 79ef68388f9b3b4b25bb7744a69e511e
1411]
1412[Comments only
1413simonpj@microsoft.com**20100304125402
1414 Ignore-this: 2c0006e7d26fd7c1f6a89d029eb0e23b
1415]
1416[Refactor part of the renamer to fix Trac #3901
1417simonpj@microsoft.com**20100304125337
1418 Ignore-this: 345833048844421020d0a178acee54d9
1419 
1420 This one was bigger than I anticipated!  The problem was that were
1421 were gathering the binders from a pattern before renaming -- but with
1422 record wild-cards we don't know what variables are bound by C {..}
1423 until after the renamer has filled in the "..".
1424 
1425 So this patch does the following
1426 
1427 * Change all the collect-X-Binders functions in HsUtils so that
1428   they expect to only be called *after* renaming.  That means they
1429   don't need to return [Located id] but just [id].  Which turned out
1430   to be a very worthwhile simplification all by itself.
1431 
1432 * Refactor the renamer, and in ptic RnExpr.rnStmt, so that it
1433   doesn't need to use collectLStmtsBinders on pre-renamed Stmts.
1434 
1435 * This in turn required me to understand how GroupStmt and
1436   TransformStmts were renamed.  Quite fiddly. I rewrote most of it;
1437   result is much shorter.
1438 
1439 * In doing so I flattened HsExpr.GroupByClause into its parent
1440   GroupStmt, with trivial knock-on effects in other files.
1441 
1442 Blargh.
1443]
1444[Minor refactoring of placeHolderPunRhs
1445simonpj@microsoft.com**20100304124113
1446 Ignore-this: 717a7b412946f4eda5ec56aa72459bd4
1447]
1448[Make `mkFunTy` associate to the right, as it should
1449simonpj@microsoft.com**20100304124029
1450 Ignore-this: 3df1f02c28272c5da37836161f8538a9
1451]
1452[Add fmapMaybeM and fmapEitherM
1453simonpj@microsoft.com**20100304124004
1454 Ignore-this: ba780d5d14a6766378502e58c4d7ae0f
1455]
1456[Comments only
1457simonpj@microsoft.com**20100304123939
1458 Ignore-this: b2c75384418e49bfeb847c089b8639e2
1459]
1460[Two things to do with -dsuppress-uniques
1461simonpj@microsoft.com**20100304123822
1462 Ignore-this: ebe626cb50230f6d2da165dea7f4a1b3
1463 
1464 a) Even with -dsuppress-uniques, don't suppress them when outputing
1465    code, else the assembler falls over bleating
1466 
1467 b) Do suppress uniques in names generated by TH.  It's a bit grungy
1468    to do this: see Note [Suppressing uniques in OccNames].  But
1469    it's only needed for test de-wobblification so the grunge isn't
1470    really important.
1471]
1472[fix the Windows build some more
1473Simon Marlow <marlowsd@gmail.com>**20100304092119
1474 Ignore-this: b6f0ef572f6c8f263a02bc802c9ff328
1475]
1476[Add comments to darcs-all and packages
1477simonpj@microsoft.com**20100303215948
1478 Ignore-this: c84876f3bdf976a4d8716451c3ea49c7
1479]
1480[Add the implicit 'import Prelude' in getImports
1481Simon Marlow <marlowsd@gmail.com>**20100303112242
1482 Ignore-this: 6c5e7ed21c29e9ffb362db63f8c69e2f
1483 This makes things more consistent, and avoids a strange "Prelude is
1484 not loaded" error when there is a Prelude.hs on the search path.
1485]
1486[fix Windows build
1487Simon Marlow <marlowsd@gmail.com>**20100302144719
1488 Ignore-this: fac21f11a8bd010f7e3cb242b908146f
1489]
1490[sdist: Haddock.Interface.{Lex,Parse} moved to Haddock.{Lex,Parse}
1491Simon Marlow <marlowsd@gmail.com>**20100302094338
1492 Ignore-this: beeb4887522e051d178774af20c6a7e8
1493]
1494[Add handling for | to the transitional alternative layout rule
1495Ian Lynagh <igloo@earth.li>**20100302205815]
1496[Tweak alternative layout rule
1497Ian Lynagh <igloo@earth.li>**20100302205105
1498 Now not only is if/then a bracketting pair, but then/else is too
1499]
1500[Add transitional rules for the alternative layout rule
1501Ian Lynagh <igloo@earth.li>**20100302202035
1502 If enabled, these accept more layout, but give warnings
1503]
1504[Fix the alternative layout rule to handle explicit let/in
1505Ian Lynagh <igloo@earth.li>**20100302165119
1506 It used to break on
1507     let {x = 'a'} in x
1508 as the 'in' token would keep closing contexts looking for an implicit
1509 'let' layout.
1510]
1511[expand comments for #2578 fix
1512Simon Marlow <marlowsd@gmail.com>**20100301095525
1513 Ignore-this: 720ce0cafd155bfdef0516900568276
1514]
1515[a faster appendFS
1516ich@christoph-bauer.net**20100227211659
1517 Ignore-this: e0e45620b3a901291621e34953384a27
1518]
1519[Implement a smart constructor mkUnsafeCoercion, and use it
1520simonpj@microsoft.com**20100301111744
1521 Ignore-this: 88906e30bf14b025ffa2fa9a4355e436
1522 
1523 This just ensures that an unsafe coercion is as localised as possible.
1524 For example, instead of
1525     UnsafeCo (Int -> t1) (Int -> t2)
1526 use
1527     Int -> UnsafeCo t1 t2
1528]
1529[Suggest -XGeneralizedNewtypeDeriving (fix Trac #3888)
1530simonpj@microsoft.com**20100301111555
1531 Ignore-this: 9edbf63ef5506aba2fafb83c1c365d4b
1532 
1533 If we can't derive a type, but it's a reasonable possibility that
1534 newtype deriving would do the job, suggest it.
1535 
1536 A little refactoring too, moving non_iso_class to top level,
1537 and putting it with std_class_via_iso.
1538]
1539[Tidy up AnyTyCon stuff
1540simonpj@microsoft.com**20100301111401
1541 Ignore-this: 6ea0a0c793f9c6b812bc5c6fb0d392a1
1542 
1543 If we find ourselves making up an AnyTyCon of kind '??', say,
1544 then default it to liftedTypeKind.  And similarly for any sub-kind
1545 of LiftedTypeKind.
1546 
1547 This is just a tidy-up.
1548]
1549[Fix pretty-printing of IfaceAnyTc (fixes Trac #3883)
1550simonpj@microsoft.com**20100301111040
1551 Ignore-this: 6a059d5f9b895a0b709837c2584742be
1552 
1553 The panic message in ifaceTyConName on IfaceAnyTc
1554 called the pretty-printer, called ifaceTyConName again,
1555 which caused an infinite regress.  Stupid.
1556 
1557 See
1558  * Note [The Name of an IfaceAnyTc], and
1559  * The Outputable instance for IfaceTyCon
1560]
1561[Omit unnecessary parens when pretty-printing IfaceExpr
1562simonpj@microsoft.com**20100301110748
1563 Ignore-this: ccb00190892a4b2ff62c45d583018a70
1564]
1565[Comments only
1566simonpj@microsoft.com**20100225174112
1567 Ignore-this: d0fc0ca9dbeca3c17b11733d6e8cb022
1568]
1569[Add comment
1570simonpj@microsoft.com**20100225174048
1571 Ignore-this: 9e93edacc2424ca0e8a0f0a7d1992736
1572]
1573[Change pretty printing of InlinePrag slightly
1574simonpj@microsoft.com**20100225174028
1575 Ignore-this: 7348baeb43926d3c746a39cb4e67f1a3
1576]
1577[Add -no-auto-link-packages docs to the user guide; fixes trac #3759
1578Ian Lynagh <igloo@earth.li>**20100228191837]
1579[Whitespace only in docs/users_guide/packages.xml
1580Ian Lynagh <igloo@earth.li>**20100228182945]
1581[Add a LICENSE file to libraries/bin-package-db
1582Ian Lynagh <igloo@earth.li>**20100227205626
1583 Silences a (harmless) error from tar when making bindists
1584]
1585[Have separate rules to generate tags and TAGS
1586Ian Lynagh <igloo@earth.li>**20100227202517
1587 This works around the two filenames being the same on case-insensitive
1588 file systems.
1589]
1590[Fix trac #2578
1591Ian Lynagh <igloo@earth.li>**20100227173951
1592 We define empty datatypes as not being enumerations, which means the
1593 empty blocks aren't generated.
1594]
1595[Fix the build with GHC < 6.12
1596Ian Lynagh <igloo@earth.li>**20100226223931]
1597[update the docs to reflect changes in the tracing flags
1598Simon Marlow <marlowsd@gmail.com>**20100226111205
1599 Ignore-this: 3396e95f52abbb4a022391ca8709085b
1600]
1601[Tweak the tracing flags slightly, and clean up error handling and diagnostics
1602Simon Marlow <marlowsd@gmail.com>**20100226110608
1603 Ignore-this: c227b6b8d65c06f299c5588c84e0eef9
1604 
1605 Tracing flags are now:
1606 
1607    -l[flags]  Log events in binary format to the file <program>.eventlog
1608    -v[flags]  Log events to stderr
1609               where [flags] can contain:
1610                  s    scheduler events
1611                  t    add time stamps (only useful with -v)
1612 
1613 and there are more helpful error messages when using flags that are
1614 only available in particular variants of the RTS:
1615 
1616  the flag -v requires the program to be built with -debug
1617  the flag -Ds requires the program to be built with -debug
1618  the flag -p requires the program to be built with -prof
1619  the flag -N requires the program to be built with -threaded
1620  the flag -v requires the program to be built with -debug
1621 
1622 Also, I fixed the crash reported in #3874, with +RTS -ls -v.
1623]
1624[Fix crash when using printf format specifiers in traceEvent (#3874)
1625Simon Marlow <marlowsd@gmail.com>**20100226093215
1626 Ignore-this: d21701cec90e9f5f2d9e7148490b9ced
1627]
1628[hack to make the docs build again in a lndir build tree (see comments)
1629Simon Marlow <marlowsd@gmail.com>**20100225131616
1630 Ignore-this: 4d9a66364222b51a750d33fbce5f8f36
1631]
1632[Force encoding to UTF-8 when writing individual .conf files
1633Simon Marlow <marlowsd@gmail.com>**20100224152519
1634 Ignore-this: 8707c55c74108570cd9d60a4cb43c561
1635]
1636[Fix build for non-x86 arches again.
1637Ben.Lippmeier@anu.edu.au**20100222075144]
1638[Fix the link to the ghc docs in libraries/prologue.txt
1639Ian Lynagh <igloo@earth.li>**20100223181644]
1640[Fix more library links in the user guide
1641Ian Lynagh <igloo@earth.li>**20100223164551]
1642[Fix the links to the base docs from the user guide
1643Ian Lynagh <igloo@earth.li>**20100223150522]
1644[Remove old, unused release notes
1645Ian Lynagh <igloo@earth.li>**20100223150327]
1646[Fix #3875: Crash in parallel GC, wrong pointer was being tested.
1647Ben.Lippmeier@anu.edu.au**20100222031627]
1648[Add utils/ghctags/ghc.mk
1649Ian Lynagh <igloo@earth.li>**20100221185200]
1650[Make "make tags" work in the new build system
1651Ian Lynagh <igloo@earth.li>**20100221164432]
1652[Remove the old hstags util
1653Ian Lynagh <igloo@earth.li>**20100220235909]
1654[Check for suitable versions of make in bindists; fixes trac #3860
1655Ian Lynagh <igloo@earth.li>**20100220211157
1656 We already had a check in configure of the actual build. This patch
1657 adds it to the configure of the bindists too.
1658]
1659[Fix build on Windows
1660Ian Lynagh <igloo@earth.li>**20100219134222]
1661[Use the shared C wrapper code in ghci.c too
1662Ian Lynagh <igloo@earth.li>**20100218171716]
1663[Refactor gcc.c, pulling out the reusable code
1664Ian Lynagh <igloo@earth.li>**20100218170931]
1665[Fix a recompilation checking bug when a package dependency changes
1666Simon Marlow <marlowsd@gmail.com>**20100217133250
1667 Ignore-this: afea726c69145f08ea66053230a85bff
1668 
1669 We weren't forcing enough recompilationg when package dependencies
1670 changed, with the result that bumping a package version could lead to
1671 linking failures or other problems later.
1672 
1673 The problem/solutation are described on the wiki:
1674 
1675 http://hackage.haskell.org/trac/ghc/wiki/Commentary/Compiler/RecompilationAvoidance#Packageversionchanges
1676]
1677[darcs-all --extra get: gets a few extra packages
1678Simon Marlow <marlowsd@gmail.com>**20100217104634
1679 Ignore-this: 9a025b387e5a09b4cde7ac5a52c95268
1680 currently deepseq, parallel, stm.
1681]
1682[Allow extra packages to be added to the build, by setting $(EXTRA_PACKAGES)
1683Simon Marlow <marlowsd@gmail.com>**20100217103134
1684 Ignore-this: 434abc03d82316e8248a76ae23f673b8
1685]
1686[Beef up cmmMiniInline a tiny bit
1687Simon Marlow <marlowsd@gmail.com>**20100216150506
1688 Ignore-this: 94513491cd20d21e3a6b0b6f9c579ca4
1689 Allow a temporary assignment to be pushed past an assignment to a
1690 global if the global is not mentioned in the rhs of the assignment we
1691 are inlining.
1692 
1693 This fixes up some bad code.  We should make sure we're doing
1694 something equivalent in the new backend in due course.
1695]
1696[Write the binary cache file atomically
1697Simon Marlow <marlowsd@gmail.com>**20100216134841
1698 Ignore-this: 8b1a26beb04dbfcb15786461c8f35f12
1699 Should fix an occasional build error of the form
1700  ghc-pkg: too few bytes. Failed reading at byte position 8
1701]
1702[disable a false assertion, with a comment to explain why
1703Simon Marlow <marlowsd@gmail.com>**20100216123544
1704 Ignore-this: 2be07076eed3c203543025e61ec69838
1705]
1706[Fix a bug that can lead to noDuplicate# not working sometimes.
1707Simon Marlow <marlowsd@gmail.com>**20100216123411
1708 Ignore-this: 1ff0b235d915ca4d0531df6326828901
1709 
1710 The symptom is that under some rare conditions when running in
1711 parallel, an unsafePerformIO or unsafeInterleaveIO computation might
1712 be duplicated, so e.g. lazy I/O might give the wrong answer (the
1713 stream might appear to have duplicate parts or parts missing).
1714 
1715 I have a program that demonstrates it -N3 or more, some lazy I/O, and
1716 a lot of shared mutable state.  See the comment with stg_noDuplicatezh
1717 in PrimOps.cmm that explains the problem and the fix.  This took me
1718 about a day to find :-(
1719]
1720[Represent the free register set using Word64 on x86-64 (fixes ffi009)
1721Simon Marlow <marlowsd@gmail.com>**20100215130102
1722 Ignore-this: b75fe873a9d32c56dc43b2f30d3382fb
1723 Following recent changes to the numbering of registers, we overflowed
1724 Word32 on x86-64, with the result that xmm8 and later we not being
1725 allocated.
1726]
1727[fix lost context switches in GHCi (fixes test 3429(ghci))
1728Simon Marlow <marlowsd@gmail.com>**20100215093205
1729 Ignore-this: 5a2cf725a83da1067a299fccc63aeb9f
1730]
1731[Fix build for non-x86 architectures
1732Ben.Lippmeier@anu.edu.au**20100215014719]
1733[Add comments about the ForceSpecConstr mechanism
1734Roman Leshchinskiy <rl@cse.unsw.edu.au>**20100215030103
1735 Ignore-this: 8f0c3c4e65ce22b04e511d51d7795896
1736]
1737[Spot ForceSpecConstr arguments in polymorphic loops
1738Roman Leshchinskiy <rl@cse.unsw.edu.au>**20100215025308
1739 Ignore-this: c3160d51fdb44bfaa600491423257d0b
1740]
1741[Don't rely on tar supporting -z; trac #3841
1742Ian Lynagh <igloo@earth.li>**20100214220450]
1743[don't constant fold division that would result in negative zero (#3676)
1744Simon Marlow <marlowsd@gmail.com>**20100211131543
1745 Ignore-this: 9ccba7389ec0de33ec7f376ae39f34fb
1746]
1747[Improve error dump in TcEnv
1748simonpj@microsoft.com**20100210145210
1749 Ignore-this: 97c0390699f8ec70e8904e86730a1d5c
1750]
1751[Keep track of explicit kinding in HsTyVarBndr; plus fix Trac #3845
1752simonpj@microsoft.com**20100210145155
1753 Ignore-this: ff7e42280909d340dd3d043d89c702ba
1754 
1755 To print HsTypes correctly we should remember whether the Kind on
1756 a HsTyVarBndr came from type inference, or was put there by the
1757 user.  See Note [Printing KindedTyVars] in HsTypes.  So instead of
1758 changing a UserTyVar to a KindedTyVar during kind checking, we
1759 simply add a PostTcKind to the UserTyVar.
1760 
1761 The change was provoked by Trac #3830, although other changes
1762 mean that #3830 gets a diferent and better error message now.
1763 So this patch is simply doing the Right Thing for the future.
1764 
1765 This patch also fixes Trac #3845, which was caused by a *type splice*
1766 not remembering the free *term variables* mentioned in it.  Result
1767 was that we build a 'let' when it should have been 'letrec'.
1768 Hence a new FreeVars field in HsSpliceTy.
1769 
1770 While I was at it, I got rid of HsSpliceTyOut and use a PostTcKind
1771 on HsSpliceTy instead, just like on the UserTyVar.
1772]
1773[Documentation for changes to Template Haskell and quasi-quotation
1774simonpj@microsoft.com**20100210114213
1775 Ignore-this: 24684cbf43c50eecc36f3e98882df1e4
1776]
1777[Remove redundant import
1778simonpj@microsoft.com**20100208165756
1779 Ignore-this: f1cc1331507452422e0db8f8f5f80ad
1780]
1781[Stop fruitless ANF-ing
1782simonpj@microsoft.com**20100210094733
1783 Ignore-this: 1c1251c462f3fd8ae7665a1869c0e18a
1784 
1785 The simplifier is taking more iterations than it should, because we
1786 were fruitlessly ANF-ing a top-level declaration of form
1787 
1788    x = Ptr "foo"#
1789 
1790 to get
1791 
1792    x = let v = "foo"# in Ptr v
1793 
1794 and then inlining v again.  This patch makes Simplify.makeTrivial
1795 top-level aware, so that it doesn't ANF if it's going to be undone.
1796]
1797[Comments only
1798simonpj@microsoft.com**20100210094537
1799 Ignore-this: dab7a4e7fad9f424d3ab2590c3eeef3f
1800]
1801[Simplify syntax for quasi-quotation
1802simonpj@microsoft.com**20100210094419
1803 Ignore-this: ffc1e483942a7506d4a541300908bcd
1804 
1805 After some discussion we decided to make a quasi-quote look like
1806 
1807    [pads| ...blah... |]
1808 
1809 rather than
1810 
1811    [$pads| ...blah... |]
1812 
1813 as before. The new syntax is quieter, although it does not signal
1814 quite as clearly that there is a splice going on.
1815]
1816[Several TH/quasiquote changes
1817simonpj@microsoft.com**20100210093910
1818 Ignore-this: f12d3703f10a377e57f1af854905c6aa
1819 
1820 a) Added quasi-quote forms for
1821       declarations
1822       types
1823    e.g.   f :: [$qq| ... |]
1824 
1825 b) Allow Template Haskell pattern quotes (but not splices)
1826    e.g.  f x = [p| Int -> $x |]
1827 
1828 c) Improve pretty-printing for HsPat to remove superfluous
1829    parens.  (This isn't TH related really, but it affects
1830    some of the same code.)
1831 
1832 
1833 A consequence of (a) is that when gathering and grouping declarations
1834 in RnSource.findSplice, we must expand quasiquotes as we do so.
1835 Otherwise it's all fairly straightforward.  I did a little bit of
1836 refactoring in TcSplice.
1837 
1838 User-manual changes still to come.
1839]
1840[generate slightly better code for ccall argument-pushing on x86
1841Simon Marlow <marlowsd@gmail.com>**20100209101114
1842 Ignore-this: a41b366d7266b8fc31a099308c318597
1843]
1844[--lazy overrides --partial too
1845Simon Marlow <marlowsd@gmail.com>**20100209093927
1846 Ignore-this: 5d67c45af67f0122d93965ea9d0cbb12
1847 At least until we switch to --lazy being the default
1848]
1849[Fix Trac #3850
1850simonpj@microsoft.com**20100208163751
1851 Ignore-this: ed77f179dafe3f2d32971364e604e518
1852 
1853 This patch simply avoids a needless difference in behaviour from
1854 6.10, and one that happens to affect HList. See Note [Stupid theta].
1855]
1856[Fix a bug introduced in the SSE2 support: callClobberedRegs was wrong
1857Simon Marlow <marlowsd@gmail.com>**20100205112938
1858 Ignore-this: 4a7989284af27a607aae08f27c222515
1859]
1860[Implement SSE2 floating-point support in the x86 native code generator (#594)
1861Simon Marlow <marlowsd@gmail.com>**20100204104849
1862 Ignore-this: 7290454bf6b2f3612b933c4f23e8a471
1863 
1864 The new flag -msse2 enables code generation for SSE2 on x86.  It
1865 results in substantially faster floating-point performance; the main
1866 reason for doing this was that our x87 code generation is appallingly
1867 bad, and since we plan to drop -fvia-C soon, we need a way to generate
1868 half-decent floating-point code.
1869 
1870 The catch is that SSE2 is only available on CPUs that support it (P4+,
1871 AMD K8+).  We'll have to think hard about whether we should enable it
1872 by default for the libraries we ship.  In the meantime, at least
1873 -msse2 should be an acceptable replacement for "-fvia-C
1874 -optc-ffast-math -fexcess-precision".
1875 
1876 SSE2 also has the advantage of performing all operations at the
1877 correct precision, so floating-point results are consistent with other
1878 platforms.
1879 
1880 I also tweaked the x87 code generation a bit while I was here, now
1881 it's slighlty less bad than before.
1882]
1883[add libraries/binary
1884Simon Marlow <marlowsd@gmail.com>**20100203135421
1885 Ignore-this: b9249fd05feb6b29fa7729edcdc2472
1886]
1887[add comment for srt_bitmap field
1888Simon Marlow <marlowsd@gmail.com>**20100203103431
1889 Ignore-this: 1b76ed3dceed40c3fc6040c90f577997
1890]
1891[Use bash to run boot-pkgs, the default Solaris shell doesn't support the -ot test flag
1892benl@cse.unsw.edu.au**20100203030748]
1893[Disable -Wcast-align when building the rts
1894benl@cse.unsw.edu.au**20100203024605
1895 This flag seems buggy on GCC 4.1.2, which is the only GCC version we
1896 have that can bootstrap the SPARC build. We end up with lots of supurious
1897 warnings of the form "cast increases required alignment of target type".
1898 Some legitimate warnings can be fixed by adding an intermediate cast to
1899 (void*), but we get others in rts/sm/GCUtils.c concerning the gct var
1900 that look innocuous to me. We could enable this again once we deprecate
1901 support for registerised builds on this arch.
1902]
1903[Stifle warning about printf format strings
1904benl@cse.unsw.edu.au**20100203023124]
1905[Cast to (void*) to stifle warning about signedness
1906benl@cse.unsw.edu.au**20100203023029]
1907[Add missing import sm_mutex, which fixes the -fvia-c build
1908benl@cse.unsw.edu.au**20100202051451]
1909[Fix typo in error message (#3848)
1910Simon Marlow <marlowsd@gmail.com>**20100130094628
1911 Ignore-this: f0713035828123805b2a237e8896315b
1912]
1913[Fix Trac #3831: blowup in SpecConstr
1914simonpj@microsoft.com**20100201002420
1915 Ignore-this: adbf1e249f472cbc8d2d7cc1f70ae1fd
1916 
1917 It turned out that there were two bugs.  First, we were getting an
1918 exponential number of specialisations when we had a deep nest of
1919 join points.  See Note [Avoiding exponential blowup]. I fixed this
1920 by dividing sc_count (in ScEnv) by the number of specialisations
1921 when recursing.  Crude but effective.
1922 
1923 Second, when making specialisations I was looking at the result of
1924 applying specExpr to the RHS of the function, whereas I should have
1925 been looking at the original RHS.  See Note [Specialise original
1926 body].
1927 
1928 
1929 There's a tantalising missed opportunity here, though.  In this
1930 example (recorded as a test simplCore/should_compile/T3831), each join
1931 point has *exactly one* call pattern, so we should really just
1932 specialise for that alone, in which case there's zero code-blow-up.
1933 In particular, we don't need the *original* RHS at all.  I need to think
1934 more about how to exploit this.
1935 
1936 But the blowup is now limited, so compiling terminfo with -O2 works again.
1937]
1938[Re-read pragmas after preprocessing (#2464, #3674, #3457)
1939Simon Marlow <marlowsd@gmail.com>**20100129114050
1940 Ignore-this: 1acf43a0bd924f9cc89f98b291569517
1941 This was a lot easier than I imagined.
1942]
1943[tweak the totally-bogus arbitrary stack-squeezing heuristic to fix #2797
1944Simon Marlow <marlowsd@gmail.com>**20100128124454
1945 Ignore-this: 330f39d1fc17280c6264443cba35538b
1946 In #2797, a program that ran in constant stack space when compiled
1947 needed linear stack space when interpreted.  It turned out to be
1948 nothing more than stack-squeezing not happening.  We have a heuristic
1949 to avoid stack-squeezing when it would be too expensive (shuffling a
1950 large amount of memory to save a few words), but in some cases even
1951 expensive stack-squeezing is necessary to avoid linear stack usage.
1952 One day we should implement stack chunks, which would make this less
1953 expensive.
1954]
1955[fix warning on Windows
1956Simon Marlow <marlowsd@gmail.com>**20100127162954
1957 Ignore-this: 9aeca7b0d6bfdf758ab9b2004c998b2b
1958]
1959[fix Windows build (GHC.Conc.runHandlers is Unix-only)
1960Simon Marlow <marlowsd@gmail.com>**20100127145718
1961 Ignore-this: 9e683bfbc236beb7aa6fc29cddea4e46
1962]
1963[Don't Terminate the ticker thread (#3748)
1964Simon Marlow <marlowsd@gmail.com>**20100127135430
1965 Ignore-this: c4834d02397eb3404818142964f296e4
1966]
1967[Win32 yieldThread(): use SwitchToThread() instead of Sleep(0)
1968Simon Marlow <marlowsd@gmail.com>**20100127133106
1969 Ignore-this: cbc8c00fd4b7de7d191dae8f21f4f012
1970]
1971[fix warnings
1972Simon Marlow <marlowsd@gmail.com>**20100127133040
1973 Ignore-this: 1038f5f85bd3f795ad10380d7b78457f
1974]
1975[catch SIGHUP and SIGTERM and raise an exception (#3656)
1976Simon Marlow <marlowsd@gmail.com>**20100127140438
1977 Ignore-this: a6163c4563d67daab632db2ab2cc7155
1978]
1979[define INFINITY and NAN if they don't exist (#2929)
1980Simon Marlow <marlowsd@gmail.com>**20100127133632
1981 Ignore-this: 488fa62a65c0d8a2e0b9ca4c6dd844a
1982]
1983[remove suspicious whitespace-only lines
1984Simon Marlow <marlowsd@gmail.com>**20100127133008
1985 Ignore-this: dc99b80bca5d9510d651c9afb0cd4fda
1986]
1987[addCoverageTicksToBinds: tolerate a non-existent .hs file (#3803)
1988Simon Marlow <marlowsd@gmail.com>**20100127113205
1989 Ignore-this: c65cd3962a1e1bba7b7a5b6ff723dc9c
1990]
1991[avoid using non-standard %zd format specifier (#3804)
1992Simon Marlow <marlowsd@gmail.com>**20100126163322
1993 Ignore-this: fc5f69ec8af42138f930177f8c48d3e6
1994]
1995[Fix signal segfaults on Solaris (#3790)
1996Simon Marlow <marlowsd@gmail.com>**20100126155449]
1997[comment-out an incorrect assertion
1998Simon Marlow <marlowsd@gmail.com>**20100126150103
1999 Ignore-this: d4dcb06f5c4cbfd826033cd7f7170fc6
2000]
2001[Fix a deadlock, and possibly other problems
2002Simon Marlow <marlowsd@gmail.com>**20100126150037
2003 Ignore-this: e461e2a5495850cb0a43544004bbe994
2004 After a bound thread had completed, its TSO remains in the heap until
2005 it has been GC'd, although the associated Task is returned to the
2006 caller where it is freed and possibly re-used. 
2007 
2008 The bug was that GC was following the pointer to the Task and updating
2009 the TSO field, meanwhile the Task had already been recycled (it was
2010 being used by exitScheduler()). Confusion ensued, leading to a very
2011 occasional deadlock at shutdown, but in principle it could result in
2012 other crashes too.
2013 
2014 The fix is to remove the link between the TSO and the Task when the
2015 TSO has completed and the call to schedule() has returned; see
2016 comments in Schedule.c.
2017]
2018[When acquiring a spinlock, yieldThread() every 1000 spins (#3553, #3758)
2019Simon Marlow <marlowsd@gmail.com>**20100122164911
2020 Ignore-this: 2dc6a7affdb5081a4dc649bcac95c31d
2021 
2022 This helps when the thread holding the lock has been descheduled,
2023 which is the main cause of the "last-core slowdown" problem.  With
2024 this patch, I get much better results with -N8 on an 8-core box,
2025 although some benchmarks are still worse than with 7 cores.
2026 
2027 I also added a yieldThread() into the any_work() loop of the parallel
2028 GC when it has no work to do. Oddly, this seems to improve performance
2029 on the parallel GC benchmarks even when all the cores are busy.
2030 Perhaps it is due to reducing contention on the memory bus.
2031]
2032['store' should be static (#3835)
2033Simon Marlow <marlowsd@gmail.com>**20100122164834
2034 Ignore-this: 65fab4644badc58ce284c3ca5c29f88a
2035]
2036[Add some missing getStablePtr()s for CAFs that the RTS refers to
2037Simon Marlow <marlowsd@gmail.com>**20100122143658
2038 Ignore-this: 7bf37917d5052a6feb3b8ffeaad0ab4c
2039 
2040 A recent patch ("Refactor CoreArity a bit") changed the arity of
2041 GHC.Conc.runSparks such that it became a CAF, and the RTS was not
2042 explicitly retaining it, which led to a crash when the CAF got GC'd.
2043 While fixing this I found a couple of other closures that the RTS
2044 refers to which weren't getting the correct CAF treatment.
2045]
2046[Remove an out-of-date comment
2047Ian Lynagh <igloo@earth.li>**20100122130853]
2048[fix build on Windows
2049Simon Marlow <marlowsd@gmail.com>**20100122121016
2050 Ignore-this: cd690a8eff71ca4f87fe67a41a20f493
2051]
2052[fix warning on Windows
2053Simon Marlow <marlowsd@gmail.com>**20100122120328
2054 Ignore-this: 507a91e356a667dcecf8bec621fd2b95
2055]
2056[Fix docs for sizeofByteArray#/sizeofMutableByteArray# (#3800)
2057Simon Marlow <marlowsd@gmail.com>**20100119103825
2058 Ignore-this: c5b7c2edb30fb0917ec08e74f26e9b9e
2059 In 6.14.1 we'll switch these primops to return the exact byte size,
2060 but for 6.12.2 we need to fix the docs.
2061]
2062[Include regex.h in Linker.c on OS X too
2063Ian Lynagh <igloo@earth.li>**20100120201958]
2064[We no longer need a prototype for __eprintf
2065Ian Lynagh <igloo@earth.li>**20100120195024
2066 It looks like it was only needed on OSX, but it has a prototype in
2067 assert.h which now gets #included.
2068]
2069[Fix build
2070Ian Lynagh <igloo@earth.li>**20100120163101
2071 Remove a prototype of a function that wasn't defined
2072]
2073[FIX #2615 (linker scripts in .so files)
2074howard_b_golden@yahoo.com**20091216185155
2075 Ignore-this: e470cb78dc7cc9f39cba209e594c6283
2076 This patch does not apply to Windows. It only applies to systems with
2077 ELF binaries.
2078 
2079 This is a patch to rts/Linker.c to recognize linker scripts in .so
2080 files and find the real target .so shared library for loading.
2081]
2082[Fix Trac #3813: unused variables in GHCi bindings
2083simonpj@microsoft.com**20100120094533
2084 Ignore-this: 22da9bc22ecde0056f7235b3cf86ba8e
2085 
2086 In a GHCi stmt we don't want to report unused variables,
2087 because we don't know the scope of the binding, eg
2088 
2089        Prelude> x <- blah
2090 
2091 Fixing this needed a little more info about the context of the stmt,
2092 thus the new constructor GhciStmt in the HsStmtContext type.
2093]
2094[Fix Trac #3823, plus warning police in TcRnDriver
2095simonpj@microsoft.com**20100120094221
2096 Ignore-this: 8856cf1ab48733180d0cfa800b535317
2097 
2098 The immediate reason for this patch is to fix #3823. This was
2099 rather easy: all the work was being done but I was returning
2100 type_env2 rather than type_env3. 
2101 
2102 An unused-veriable warning would have shown this up, so I fixed all
2103 the other warnings in TcRnDriver.  Doing so showed up at least two
2104 genuine lurking bugs.  Hurrah.
2105]
2106[Change how RTS libraries get installed; fixes trac #3794
2107Ian Lynagh <igloo@earth.li>**20100119232623]
2108[Escape some more $s in makefiles, for consistency
2109Ian Lynagh <igloo@earth.li>**20100119225533]
2110[Escape some $s in makefiles for consistency
2111Ian Lynagh <igloo@earth.li>**20100119221440]
2112[Allow GNU-standard --host, --build, --target configure options (#3637)
2113Simon Marlow <marlowsd@gmail.com>**20100119102819
2114 Ignore-this: 3fd7c644658321f97c34e20305e9b458
2115 Patch contributed by asuffield@suffields.me.uk
2116]
2117[Update some comments about how autoconf/configure works
2118Ian Lynagh <igloo@earth.li>**20100118145959]
2119[Fix a warning message
2120Ian Lynagh <igloo@earth.li>**20100118142020
2121 We were printing the wrong value, so getting confusing messages like:
2122     Function `$wa{v s17LO} [lid]'
2123         has 2 call pattterns, but the limit is 3
2124]
2125[Teach the alternative layout rule about mdo and rec
2126Ian Lynagh <igloo@earth.li>**20100116215545]
2127[Teach the alternative layout rule about $( ... )
2128Ian Lynagh <igloo@earth.li>**20100116213941
2129 It thought the ) needed to close something, but the $( hadn't
2130 opened anything.
2131]
2132[Fix typo
2133Ian Lynagh <igloo@earth.li>**20100116134915]
2134[Remove declaration of non-existent mark_splim
2135Simon Marlow <marlowsd@gmail.com>**20091231104241
2136 Ignore-this: 33ad68a3f12360a51d60df47d748f31e
2137]
2138[fix a comment
2139Simon Marlow <marlowsd@gmail.com>**20091230150852
2140 Ignore-this: 776891008d34de6bf1f89d74d516bce0
2141]
2142[remove an unnecessary debug trace, duplicated by a traceSchedEvent
2143Simon Marlow <marlowsd@gmail.com>**20091230150832
2144 Ignore-this: 2768ab3555fee6dbe2a0ac2c0349f83d
2145]
2146[hide modules properly with haddock
2147Simon Marlow <marlowsd@gmail.com>**20100113210311
2148 Ignore-this: e928241534a934008d050b387cb1cfe4
2149]
2150[fix for HSCOLOUR_SRCS=NO
2151Simon Marlow <marlowsd@gmail.com>**20100113191555
2152 Ignore-this: d952b550d8597a4029e674da24cbaef3
2153]
2154[Do some recompilation avoidance in GHC.loadModule
2155Simon Marlow <marlowsd@gmail.com>**20100112225853
2156 Ignore-this: d5f04baa437a307544c4a7cf87931e92
2157 GHC.loadModule compiles a module after it has been parsed and
2158 typechecked explicity. If we are compiling to object code and there is
2159 a valid object file already on disk, then we can skip the compilation
2160 step. This is useful in Haddock, when processing a package that uses
2161 Template Haskell and hence needs actual compilation, and the package
2162 has already been compiled.
2163 
2164 As usual, the recomp avoidance can be disabled with -fforce-recomp.
2165]
2166[Invoke Haddock directly from the build system, instead of via Cabal
2167Simon Marlow <marlowsd@gmail.com>**20100112225548
2168 Ignore-this: 1d30babfb13c2d110f79ce6c98cd2142
2169 
2170 Partly this is cleaner as we only have to preprocess the source files
2171 once, but also it is necessary to avoid Haddock recompiling source
2172 files when Template Haskell is in use, saving some time in validate
2173 and fixing a problem whereby when HADDOCK_DOCS=YES, make always
2174 re-haddocks the DPH packages.  This also needs an additional fix to
2175 GHC.
2176 
2177 HsColour support still uses Cabal, and hence preprocesses the source
2178 files again. We could move this into the build system too, but there
2179 is a version dependency that would mean adding extra autoconf stuff.
2180]
2181[refactoring while I try to make sense of the hsc interface
2182Simon Marlow <marlowsd@gmail.com>**20100104112833
2183 Ignore-this: 2504fbfa92a7bfa393a62cb40782d288
2184]
2185[Fix running in-place gen_contents_index; trac #3716
2186Ian Lynagh <igloo@earth.li>**20100108133416
2187 It was making incorrect URLs due to a shell script error.
2188]
2189[Respect SPECIALISE pragmas even for apparently-non-overloaded things
2190simonpj@microsoft.com**20100108084547
2191 Ignore-this: 206abe8175904a9512198f34e8aa81e
2192 
2193 This is an implementation matter really (the key word is "apparently"!). 
2194 See Note [Specialising in no-dict case] in DsBinds.
2195 
2196 It showed up when compiling GHC.Float.
2197]
2198[Comment out debug warnings; they are fine
2199simonpj@microsoft.com**20100108084428
2200 Ignore-this: 4d0901ca3bd903f07578183cc3b0b69d
2201]
2202[Improve error locations
2203simonpj@microsoft.com**20100107153234
2204 Ignore-this: 505f3d32355c68841c3d8118863997b
2205 
2206 More on Trac #597
2207]
2208[Spelling error in comment
2209simonpj@microsoft.com**20100107151127
2210 Ignore-this: bcc83729352bb1636727207abdd21335
2211]
2212[A little refactoring, plus improve error locations
2213simonpj@microsoft.com**20100107151113
2214 Ignore-this: c7da9f3df315a580d3e5ac2b412307ba
2215 
2216 Fixes some sub-items of Trac #597
2217]
2218[Clarify error message (Trac #3805)
2219simonpj@microsoft.com**20100107151002
2220 Ignore-this: f5300f64a6e01764d1a671c6bfe13704
2221]
2222[Comments only
2223simonpj@microsoft.com**20100107150939
2224 Ignore-this: d1760073cbd91798e1e5f2941bfd21aa
2225]
2226[SpecConstr: Remove -fspec-inline-join-points, and add let-binding specialisation
2227simonpj@microsoft.com**20100106165251
2228 Ignore-this: afdc78550d4a20f0a41807970e2c9a8b
2229 
2230 The -fspec-inline-join-point thing was a gross hack intended to help
2231 Roman play around, but he's not using it and it was a terribly blunt
2232 instrument so I've nuked it. 
2233 
2234 Instead I've re-instated the let-binding specialiser.
2235 See Note [Local let bindings]
2236]
2237[Make SpecConstr more informative output when there are too many specialisations
2238simonpj@microsoft.com**20100106161026
2239 Ignore-this: 9526c38858763f2378a5184ed73df32f
2240 
2241 It now says something like
2242 
2243   SpecConstr
2244     Function `happyDoAction'
2245       has 17 call pattterns, but the limit is 3
2246     Use -fspec-constr-count=n to set the bound
2247     Use -dppr-debug to see specialisations
2248 
2249 Previously it just silently did no specialisation
2250]
2251[Make view patterns right-associate
2252simonpj@microsoft.com**20100106160642
2253 Ignore-this: c91c4041cfb5da190fca17ef3c131584
2254 
2255 So that you can write
2256 
2257    f (v1 -> v2 -> pat)
2258]
2259[Improve the handling of default methods
2260simonpj@microsoft.com**20100106160603
2261 Ignore-this: e7f7534579e2329616f6efe67777e91
2262 
2263 See the long Note [INLINE and default methods]. 
2264 
2265 This patch changes a couple of data types, with a knock-on effect on
2266 the format of interface files.  A lot of files get touched, but is a
2267 relatively minor change.  The main tiresome bit is the extra plumbing
2268 to communicate default methods between the type checker and the
2269 desugarer.
2270]
2271[Patch for shared libraries support on FreeBSD
2272Ian Lynagh <igloo@earth.li>**20100106185321
2273 From Maxime Henrion <mhenrion@gmail.com>
2274]
2275[Following Simon M's "take newCAF() out from sm_mutex" patch
2276dias@cs.tufts.edu**20100105211543
2277 Ignore-this: 9a94ac919479160167724f717813532c
2278]
2279[Very minor refactoring
2280simonpj@microsoft.com**20100105101833
2281 Ignore-this: f09724cc01e64968a35be6685eaa0ec2
2282]
2283[Undo the fix for Trac #3772 and do it a new way
2284simonpj@microsoft.com**20100105101600
2285 Ignore-this: 4495159621267e7b95e2c2ea54cb11e3
2286 
2287 The main idea is that I'm now treating a single-method dictionary very
2288 much like a multi-method dictionary.  In particular, it respond to
2289 exprIsConApp_maybe, even though newtypes aren't *really* proper
2290 constructors.
2291 
2292 See long comments with Note [Single-method classes] for why
2293 this slight hack is justified.
2294]
2295[Fix warnings
2296simonpj@microsoft.com**20100105100945
2297 Ignore-this: 23123788ec2b782c4491c0687bc51bf1
2298]
2299[Improve error message (idea in Trac #3805)
2300simonpj@microsoft.com**20100105095532
2301 Ignore-this: 109f041bb2a3be3beafc536aa5b8d9f
2302 
2303 If we see
2304 
2305    foreign export ccall foo :: ...blah...
2306 
2307 we now use the "foreign" to suggest -XForeignFunctionInterface
2308]
2309[Comments only
2310simonpj@microsoft.com**20100105095356
2311 Ignore-this: f61734a530c6c2cdd38643829a918f23
2312]
2313[Continue refactoring the core-to-core pipeline
2314simonpj@microsoft.com**20091224154643
2315 Ignore-this: 23451f6ec98081c82197b20486d8e47d
2316 
2317 This patch mainly concerns the plumbing for running
2318 the passes and printing intermediate output
2319]
2320[A bunch of stuff relating to substitutions on core
2321simonpj@microsoft.com**20091224153949
2322 Ignore-this: aff1cc9ef94a41b334a3493bfd894292
2323 
2324 * I was debugging so I added some call-site info
2325   (that touches a lot of code)
2326 
2327 * I used substExpr a bit less in Simplify, hoping to
2328   make the simplifier a little faster and cleaner
2329]
2330[Refactor CoreArity a bit
2331simonpj@microsoft.com**20091224153448
2332 Ignore-this: 70acb5f535ffdc1a82bc18214bb3a6e8
2333 
2334 I was experimenting with making coercions opaque to
2335 arity.  I think this is ultimately the right thing to do
2336 but I've left the functionality unchanged for now.
2337]
2338[Wibbles to inlining for small functions
2339simonpj@microsoft.com**20091222162731
2340 Ignore-this: a4de5d1dfb414cab4d16df59a2248701
2341 
2342 See Note [INLINE for small functions]
2343]
2344[Print out a bit more info with the "arity decrease" waring
2345simonpj@microsoft.com**20091222162606
2346 Ignore-this: 26eb76dfafe51ff74d5f7799069b4ed0
2347]
2348[Move isDictTy from TcType to Type
2349simonpj@microsoft.com**20091222162550
2350 Ignore-this: 85ed4466f1e3d296845f914be79c7a54
2351]
2352[Allow instance heads to use infix syntax
2353simonpj@microsoft.com**20091222162325
2354 Ignore-this: 54da2aa4208ee6757a80fa916c4afd6c
2355 
2356   class C a b
2357   instance Int `C` Bool
2358 
2359 This was accidentally disallowed before.
2360]
2361[Fix pretty-printer
2362simonpj@microsoft.com**20091222162130
2363 Ignore-this: 64957ca5ae58ddade799355dd14f30e1
2364]
2365[Fix Trac #3792: check for qualified names in import items
2366simonpj@microsoft.com**20100104215950
2367 Ignore-this: 12ff8d232e1ecf02b56bb8c03265bc53
2368]
2369[Fix bugs in STG Lint
2370simonpj@microsoft.com**20100104214659
2371 Ignore-this: c10cbfdbbb9ea44d408cd5d2237b46b1
2372 
2373 The Stg Lint failure reported in Trac #3789 were bogus.
2374 This patch fixes STG Lint, which must have been unused
2375 for ages.
2376]
2377[Refactor PackageTarget back into StaticTarget
2378Ben.Lippmeier@anu.edu.au**20100104031506
2379 Ignore-this: 14de03e800ae6e16ac952656817dce1c
2380]
2381[Follow PackageTarget changes in pprCEntity
2382Ben.Lippmeier@anu.edu.au**20100102235053
2383 Ignore-this: db33b178fa1488a6132d9074abb91a50
2384]
2385[Assume CmmLabels have dynamic linkage on non-Windows
2386Ben.Lippmeier.anu.edu.au**20100102100334
2387 Ignore-this: ed53fac02ebdd83e0e1b80fd8c211f19
2388]
2389[Follow PackageTarget change in byte code generator
2390Ben.Lippmeier@anu.edu.au**20100102093046
2391 Ignore-this: ca6311be11ad22bdecb567cec4f395d8
2392]
2393[When compiling viac, don't need to emit prototypes for symbols in the RTS
2394Ben.Lippmeier@anu.edu.au**20100102092957
2395 Ignore-this: 666616c2094070705dfb8d982f8ddfd8
2396]
2397[Follow ForeignLabel changes in PPC NCG
2398Ben.Lippmeier@anu.edu.au**20100102062315
2399 Ignore-this: fdc42b45d134c542c5df0a86c660fd0d
2400]
2401[Tag ForeignCalls with the package they correspond to
2402Ben.Lippmeier@anu.edu.au**20100102053754]
2403[Nicer panic message
2404Ben.Lippmeier@anu.edu.au**20091229103518]
2405[Typo in comment
2406Ben.Lippmeier@anu.edu.au**20091229051858]
2407[Windows DLLs: use DLL aware runSparks_closure instead of base_GHCziConc_runSparks_closure directly
2408Ben.Lippmeier@anu.edu.au**20091123051510]
2409[locateOneObj: don't look for dynamic libs in static mode
2410Simon Marlow <marlowsd@gmail.com>**20100103223637
2411 Ignore-this: 47e5d5eb1b27073b9afa1d804c83c7cd
2412 also replace picIsOn with isDynamicGhcLib, as __PIC__ is not the
2413 correct test for whether the GHC library is dynamically linked.
2414]
2415[Substantial improvements to coercion optimisation
2416simonpj@microsoft.com**20100104082155
2417 Ignore-this: 376f5cc54c399c4910c21ba2be353655
2418 
2419 The main purpose of this patch is to add a bunch of new rules
2420 to the coercion optimiser.  They are documented in the (revised)
2421 Appendix of the System FC paper. 
2422 
2423 Some code has moved about:
2424 
2425 - OptCoercion is now a separate module, mainly because it
2426   now uses tcMatchTy, which is defined in Unify, so OptCoercion
2427   must live higehr up in the hierarchy
2428 
2429 - Functions that manipulate Kinds has moved from
2430   Type.lhs to Coercion.lhs.  Reason: the function typeKind
2431   now needs to call coercionKind.  And in any case, a Kind is
2432   a flavour of Type, so it builds on top of Type; indeed Coercions
2433   and Kinds are both flavours of Type.
2434 
2435   This change required fiddling with a number of imports, hence
2436   the one-line changes to otherwise-unrelated modules
2437 
2438 - The representation of CoTyCons in TyCon has changed.   Instead of
2439   an extensional representation (a kind checker) there is now an
2440   intensional representation (namely TyCon.CoTyConDesc).  This was
2441   needed for one of the new coercion optimisations.
2442]
2443[Whitespace only
2444Ian Lynagh <igloo@earth.li>**20100102220556]
2445[Use a shell script, rather than perl script, to make flags.xsl
2446Ian Lynagh <igloo@earth.li>**20091231155004]
2447[Rolling back: Make FastString thread-safe.
2448Simon Marlow <marlowsd@gmail.com>**20091231164651
2449 Ignore-this: 8f21b256b0c86d167f8f6984d2b27a87
2450     
2451 This patch was the cause of the compile-time performance regression in
2452 #3796.  My guess is that it is due to the use of unsafePerformIO which
2453 traverses the stack up to the first update frame, and perhaps we have
2454 a deep stack when reading the dictionary from a .hi file.  In any
2455 case, since we're not relying on thread safety for FastStrings, I
2456 think the safest thing to do is back this out until we can investigate
2457 further.
2458]
2459[take newCAF() out from sm_mutex; use the capability-local mut list instead
2460Simon Marlow <marlowsd@gmail.com>**20091231160223
2461 Ignore-this: 81a9a0a1e279dea805a4ffd9cf124c90
2462]
2463[Use local mut lists in UPD_IND(), also clean up Updates.h
2464Simon Marlow <marlowsd@gmail.com>**20091231113435
2465 Ignore-this: a4659d4d24f8c6626fa8403314c6a2e4
2466]
2467[use local mut lists rather than global mut lists in sequential GC
2468Simon Marlow <marlowsd@gmail.com>**20091231113118
2469 Ignore-this: 782239ddca2a0ec5c928c310b1fad4e9
2470]
2471[Allow throwTo() to be called without a source thread
2472Simon Marlow <marlowsd@gmail.com>**20091218163200
2473 Ignore-this: cb7265bc6c1c75f0dd49501c1bb74f64
2474 Returns false if the exception could not be thrown becuase the tartget
2475 thread was running.  Not used yet, but might come in handy later.
2476]
2477[If ACTIVITY_INACTIVE is set, wait for GC before resetting it
2478Simon Marlow <marlowsd@gmail.com>**20091213201246
2479 Ignore-this: a3cd1a3aacbd68789ccc191e3b8d7778
2480 I don't think this fixes any real bugs, but there's a small
2481 possibility that when the RTS is woken up for an idle-time GC, the IO
2482 manager thread might be pre-empted which would prevent the idle GC
2483 from happening; this change ensures that the idle GC happens anyway.
2484]
2485[Fix rules/build-dependencies.mk on OS X
2486Ian Lynagh <igloo@earth.li>**20091230185239
2487 Also more comments on why we have the sed rules that we do.
2488]
2489[Copying Simon M's fix for 650 to the new codegen
2490dias@cs.tufts.edu**20091222222017
2491 Ignore-this: 4bd46e6ef23debc39c7c10aea3dfdf5c
2492]
2493[Better error checking and code cleanup
2494dias@cs.tufts.edu**20091222221946
2495 Ignore-this: 16e89f4115cb392ebbb0899c081157ed
2496]
2497[Add comments to darcs-all
2498simonpj@microsoft.com**20091221160511
2499 Ignore-this: 5a369a030785aec6ef0169e36757bba4
2500 
2501 The comments explain how darcs-all decides what repo to use
2502]
2503[Fix Trac #3772: dict funs for single-field classes
2504simonpj@microsoft.com**20091221160431
2505 Ignore-this: 808f1a0633c600689653ab4763dc8628
2506 
2507 This patch fixes a bug that meant that INLINE pragamas on
2508 a method of a single-field class didn't work properly.
2509 
2510 See Note [Single-method classes] in TcInstDcls, and Trac #3772
2511]
2512[Comments only (about implementing SPECIALISE pragmas)
2513simonpj@microsoft.com**20091221155745
2514 Ignore-this: c8c98b061c162a4585ff1141b65ea91a
2515]
2516[A bit of refactoring, plus a sanity check
2517simonpj@microsoft.com**20091221155632
2518 Ignore-this: ba3efed78ce0b752f26891179d6b3987
2519 
2520 Check that a bottoming rhs does indeed get exposed with bottoming strictness
2521 Almost all the changed lines reflect some refactoring of tidyTopIdInfo.
2522]
2523[Fix Trac #3776
2524simonpj@microsoft.com**20091221155509
2525 Ignore-this: 69607bdc7208775a305a5f39a575f0e2
2526 
2527 An easy fix.  See Note [Usage for sub-bndrs] in RnEnv.
2528]
2529[Move all the CoreToDo stuff into CoreMonad
2530simonpj@microsoft.com**20091218164521
2531 Ignore-this: 57b3f63c1faa82f7246ca46e4c9a4412
2532 
2533 This patch moves a lot of code around, but has zero functionality change.
2534 The idea is that the types
2535 
2536     CoreToDo
2537     SimplifierSwitch   
2538     SimplifierMode
2539     FloatOutSwitches
2540 
2541 and
2542 
2543     the main core-to-core pipeline construction
2544 
2545 belong in simplCore/, and *not* in DynFlags.
2546]
2547[Always expose the unfolding of something with an InlineRule
2548simonpj@microsoft.com**20091218164316
2549 Ignore-this: 4f952f423848b8840fab69d63ee81d8f
2550 
2551 Previously a bottoming function with a strictness wrapper
2552 had a hidden inlining, and that was Very Bad, because in
2553     f x = if ... then bot_fun x else x+1
2554 we really want to pass the *unboxed* x to bot_fun. This
2555 happens quite a bit in error handling code, eg for array
2556 indexing.
2557]
2558[Comments only
2559simonpj@microsoft.com**20091218164119
2560 Ignore-this: b4731841b036e614385cadbdfeda70b0
2561]
2562[Move loop-breaker info from original function to worker in work/wrap
2563simonpj@microsoft.com**20091218164107
2564 Ignore-this: cc5c062f02577834baa5031e25497c57
2565 
2566 When doing a w/w split, if the original function is a loop breaker
2567 then the worker (not the wrapper) becomes one instead.
2568 
2569 This isn't very important, because loop breaker information is
2570 recalculated afresh by the occurrence analyser, but it seems more
2571 kosher.  And Lint was bleating piteously about things with InlineRules
2572 that were loop breakers.
2573]
2574[Make -ddump-inlinings and -ddump-rule-firings less noisy
2575simonpj@microsoft.com**20091218163742
2576 Ignore-this: aea0634c569afd5486de9c6e7dad2ae2
2577 
2578 By default, these two now print *one line* per inlining or rule-firing.
2579 
2580 If you want the previous (voluminous) behaviour, use -dverbose-core2core.
2581]
2582[Make warning printing a bit less noisy
2583simonpj@microsoft.com**20091218163549
2584 Ignore-this: 86bc5d020b077b6c9d666d3e4d93bd1e
2585 
2586 Use -dppr-debug to make it noisy again
2587]
2588[Set fixity (left-assoc) for setIdOccInfo
2589simonpj@microsoft.com**20091218163513
2590 Ignore-this: 6de9c34824e7713d120c889fc019a72a
2591]
2592[Comments only
2593simonpj@microsoft.com**20091218105434
2594 Ignore-this: 48a8ed9e9703b412a7dd3201f22cf92d
2595]
2596[Add an extra heading in the output for count_lines
2597simonpj@microsoft.com**20091218105403
2598 Ignore-this: 9e4e91930aba49ad6a247aa1d38297cd
2599]
2600[Fixes to account for the new layout of MUT_ARR_PTRS (see #650)
2601Simon Marlow <marlowsd@gmail.com>**20091221115249
2602 Ignore-this: ca4a58628707b362dccedb74e81ef052
2603]
2604[Partial support for Haiku (#3727)
2605Simon Marlow <marlowsd@gmail.com>**20091221110250
2606 Ignore-this: 5d4a3104c1bd50b7eae64780cb73071d
2607]
2608[Fix #3751, also fix some lexical error SrcLocs
2609Simon Marlow <marlowsd@gmail.com>**20091217132658
2610 Ignore-this: 63e11a7a64bb0c98e793e4cc883f051d
2611]
2612[kill some old GRAN/PARALLEL_HASKELL code
2613Simon Marlow <marlowsd@gmail.com>**20091217103816
2614 Ignore-this: 9bcfe3e62c556074a6f9396385ba1cf4
2615]
2616[improve panic messages for srcLocLine, srcLocCol
2617Simon Marlow <marlowsd@gmail.com>**20091217103801
2618 Ignore-this: f58623a39bcc65201f150ce9560739d1
2619]
2620[Tweak the build-dependencies rule, and add comments for it
2621Ian Lynagh <igloo@earth.li>**20091219145808]
2622[When removing $(TOP) with sed, do so case insensitively
2623Ian Lynagh <igloo@earth.li>**20091219135339
2624 This avoids problems on Windows, where drive letters may not be the
2625 case we expect.
2626]
2627[Fix a braino in a comment
2628Ian Lynagh <igloo@earth.li>**20091218213541]
2629[Avoid a failing shell command when cleaning
2630Ian Lynagh <igloo@earth.li>**20091218201146
2631 It wasn't fatal, but better to avoid it anyway
2632]
2633[Fix another sed problem on Solaris
2634Ian Lynagh <igloo@earth.li>**20091217000421]
2635[unused named variables
2636dias@cs.tufts.edu**20091218195430
2637 Ignore-this: c2d56a21a039bb73023c54883a8c1fa3
2638]
2639[missed a case in a previous fix
2640dias@cs.tufts.edu**20091217210443
2641 Ignore-this: ff40b8516a3de3fc36a55534620e4f50
2642 
2643 Here's the obscure problem:
2644 -- However, we also want to allow an assignment to be generated
2645 -- in the case when the types are compatible, because this allows
2646 -- some slightly-dodgy but occasionally-useful casts to be used,
2647 -- such as in RtClosureInspect where we cast an HValue to a MutVar#
2648 -- so we can print out the contents of the MutVar#.  If we generate
2649 -- code that enters the HValue, then we'll get a runtime panic, because
2650 -- the HValue really is a MutVar#.  The types are compatible though,
2651 -- so we can just generate an assignment.
2652 
2653]
2654[Fix #650: use a card table to mark dirty sections of mutable arrays
2655Simon Marlow <marlowsd@gmail.com>**20091217224228
2656 Ignore-this: 75c354682c9ad1b71b68b5bc4cedd6de
2657 The card table is an array of bytes, placed directly following the
2658 actual array data.  This means that array reading is unaffected, but
2659 array writing needs to read the array size from the header in order to
2660 find the card table.
2661 
2662 We use a bytemap rather than a bitmap, because updating the card table
2663 must be multi-thread safe.  Each byte refers to 128 entries of the
2664 array, but this is tunable by changing the constant
2665 MUT_ARR_PTRS_CARD_BITS in includes/Constants.h.
2666]
2667[Fix build with Solaris sed
2668Ian Lynagh <igloo@earth.li>**20091216204354
2669 Rather than trying to handle tabs with sed portably, we just use tr to
2670 remove them before we start.
2671]
2672[Build and install inplace the count_lines and compareSizes utils
2673Ian Lynagh <igloo@earth.li>**20091216165608]
2674[Adjust Activations for specialise and work/wrap, and better simplify in InlineRules
2675simonpj@microsoft.com**20091216145205
2676 Ignore-this: 2606cf9b00f2172097332b8b25b0553c
2677 
2678 This patch does two main things:
2679 
2680 1. Adjusts the way we set the Activation for
2681 
2682    a) The wrappers generated by the strictness analyser
2683       See Note [Wrapper activation] in WorkWrap
2684 
2685    b) The RULEs generated by Specialise and SpecConstr
2686       See Note [Auto-specialisation and RULES] in Specialise
2687           Note [Transfer activation] in SpecConstr
2688 
2689 2. Refines how we set the phase when simplifying the right
2690    hand side of an InlineRule.  See
2691    Note [Simplifying inside InlineRules] in SimplUtils.
2692 
2693 Most of the extra lines are comments! 
2694 
2695 The merit of (2) is that a bit more stuff happens inside InlineRules,
2696 and that in turn allows better dead-code elimination.
2697]
2698[Comments only
2699simonpj@microsoft.com**20091216144908
2700 Ignore-this: 3dae7793802ded696b01f891a77aaf8
2701]
2702[fix up libm detection and use (#3724)
2703Simon Marlow <marlowsd@gmail.com>**20091216113652
2704 Ignore-this: 6bbdd7302b262ac3b8ddc5c852dc538
2705]
2706[configure.ac: fix libm checks (Trac #3730)
2707Sergei Trofimovich <slyfox@inbox.ru>**20091204214012
2708 Ignore-this: f3372535a68f3833247f679b023745c8
2709 
2710 libbfd pulled libm as dependency and broke LIBM= detection.
2711 
2712 Patch moves libm in library tests as early as possible.
2713 Thanks to asuffield for suggesting such a simple fix.
2714 Thanks to Roie Kerstein and Renato Gallo for finding
2715 and tracking down the issue.
2716]
2717[#include <sys/select.h> if we have it (#3760)
2718Simon Marlow <marlowsd@gmail.com>**20091216095501
2719 Ignore-this: 7c00991a67ae6715e16c6458bf0b78af
2720]
2721[add a couple of assertions
2722Simon Marlow <marlowsd@gmail.com>**20091123101918
2723 Ignore-this: e631da990055fd28156a6c887e1468ca
2724]
2725[Add comments
2726simonpj@microsoft.com**20091216090344
2727 Ignore-this: 6468afc939ab795d5a0eb9fd5dc08a48
2728]
2729[Refactor to combine two eqExpr functions
2730simonpj@microsoft.com**20091216085033
2731 Ignore-this: 925dec0fc9af1e0a9359226359627ae7
2732 
2733 I'd forgotten that Rules.lhs already has an eqExpr function.  This
2734 patch combines Rules.eqExpr with the (recent) CoreUtils.eqExpr.
2735 
2736 I also did a little refactoring by defining CoreSyn.expandUnfolding_maybe
2737 (see Note [Expanding variables] in Rules.lhs), and using it in
2738      a) CoreUnfold.exprIsConApp_maybe
2739      b) Rule matching
2740]
2741[Two improvements to optCoercion
2742simonpj@microsoft.com**20091216084706
2743 Ignore-this: 699d2deb1b1bf0c7bd7afb809bee26d2
2744 
2745 * Fix a bug that meant that
2746      (right (inst (forall tv.co) ty))
2747   wasn't getting optimised.  This showed up in the
2748   compiled code for ByteCodeItbls
2749 
2750 * Add a substitution to optCoercion, so that it simultaneously
2751   substitutes and optimises.  Both call sites wanted this, and
2752   optCoercion itself can use it, so it seems a win all round.
2753]
2754[Comments only
2755simonpj@microsoft.com**20091216084558
2756 Ignore-this: e5fc7949893dbbdc756d0616647a999b
2757]
2758[Make setInlineActivation left-associative
2759simonpj@microsoft.com**20091216084536
2760 Ignore-this: 4d166f158c79c819ac73a0368e52473c
2761]
2762[Fix a long-standing infelicity in the type pretty printer
2763simonpj@microsoft.com**20091216084513
2764 Ignore-this: 2d99f8733f6642671fcb88f2179e91e9
2765 
2766 We weren't parenthesising
2767    List (C Int)
2768 correctly, when (C Int) is a PredTy
2769]
2770[Deal with warnings in Coercion.lhs
2771simonpj@microsoft.com**20091216084053
2772 Ignore-this: 8f5a0537c76ed366003253e1f550d4f5
2773]
2774[Fix a bug in the in-scope set that led to some lookupIdSubst errors
2775simonpj@microsoft.com**20091215160216
2776 Ignore-this: ed89f1bf6ece2c1e1cd135f11b130786
2777]
2778[Fix Trac #3717: exprOkForSpeculation should look through case expressions
2779simonpj@microsoft.com**20091215160124
2780 Ignore-this: 1b848137f7fb81b2c1f72cc903f1c008
2781 
2782 See Note [exprOkForSpeculation: case expressions] in CoreUtils
2783]
2784[Add a size-comparison util
2785Ian Lynagh <igloo@earth.li>**20091215202636]
2786[Just make C dependencies once, rather than each way
2787Ian Lynagh <igloo@earth.li>**20091215135350
2788 This makes generating C dependencies for the RTS take 3 seconds, rather
2789 than 30.
2790]
2791[Make addCFileDeps quieter
2792Ian Lynagh <igloo@earth.li>**20091215134033
2793 Move a comment out of the definition, so it doesn't get printed as
2794 a shell command every time we call the definition
2795]
2796[Don't make C deps for compiler/parser/cutils.c in stage1
2797Ian Lynagh <igloo@earth.li>**20091215123757
2798 CPP finds the Rts.h, RtsFlags.h etc from the tree, rather than the
2799 bootstrapping compiler, and then fails because it doesn't think
2800 RtsFlags.h should be used any more.
2801]
2802[Tidy up computation of result discounts in CoreUnfold
2803simonpj@microsoft.com**20091214134647
2804 Ignore-this: 351076027f8e9cb8aa44db6d60798c47
2805 
2806 Mostly this patch is a tidy-up, but it did reveal one inconsistency
2807 that I fixed.  When computing result discounts for case expressions,
2808 we were *adding* result-discounts for cases on non-arguments, but
2809 *picking the one for the max-size branch* for arguments. I think you
2810 could argue the toss, but it seems neater (and the code is nicer)
2811 to be consistent (ie always add).  See Note [addAltSize result discounts].
2812 
2813 The nofib results seem fine
2814 
2815         Program           Size    Allocs   Runtime   Elapsed
2816 --------------------------------------------------------------------------------
2817           boyer          -0.8%     -4.8%      0.06      0.07
2818          sphere          -0.7%     -2.5%      0.15      0.16
2819 --------------------------------------------------------------------------------
2820             Min          -0.8%     -4.8%    -19.1%    -24.8%
2821             Max          -0.5%     +0.0%     +3.4%   +127.1%
2822  Geometric Mean          -0.7%     -0.1%     -4.3%     -1.3%
2823 
2824 The +127% elapsed is a timing error; I re-ran the same binary and it's
2825 unchanged from the baseline.
2826]
2827[Use full equality for CSE
2828simonpj@microsoft.com**20091211173920
2829 Ignore-this: c6d73febf652aa34dc1197a49e599ee
2830 
2831 In CSE we were getting lots of apprarently-unequal expressions with
2832 the same hash code.  In fact they were perfectly equal -- but we were
2833 using a cheap-and-cheerful equality tests for CoreExpr that said False
2834 for any lambda expression!
2835 
2836 This patch adds a proper equality test for Core, with alpha-renaming.
2837 It's easy to do, and will avoid silly cases of CSE failing to fire.
2838 
2839 We should get less of this:
2840   WARNING: file compiler/simplCore/CSE.lhs line 326
2841   extendCSEnv: long list, length 18
2842 from a compiler built with -DDEBUG
2843]
2844[Improve strictness analysis for bottoming functions
2845simonpj@microsoft.com**20091211162324
2846 Ignore-this: dd5ef03a1b4728c25a2333f59024dc9c
2847 
2848 I found the following results from strictness analyis:
2849   f x = error (fst x)      -- Strictness U(SA)b
2850   g x = error ('y':fst x)  -- Strictness Tb
2851 
2852 Surely 'g' is no less strict on 'x' than 'f' is!  The fix turned out
2853 be to very nice and simple.  See Note [Bottom demands] in DmdAnal.
2854]
2855[Bottom extraction: float out bottoming expressions to top level
2856simonpj@microsoft.com**20091211161928
2857 Ignore-this: a1a96b36dc982d83f5c01a4259518b
2858   
2859 The idea is to float out bottoming expressions to top level,
2860 abstracting them over any variables they mention, if necessary.  This
2861 is good because it makes functions smaller (and more likely to
2862 inline), by keeping error code out of line.
2863 
2864 See Note [Bottoming floats] in SetLevels.
2865 
2866 On the way, this fixes the HPC failures for cg059 and friends.
2867 
2868 I've been meaning to do this for some time.  See Maessen's paper 1999
2869 "Bottom extraction: factoring error handling out of functional
2870 programs" (unpublished I think).
2871 
2872 Here are the nofib results:
2873 
2874 
2875         Program           Size    Allocs   Runtime   Elapsed
2876 --------------------------------------------------------------------------------
2877             Min          +0.1%     -7.8%    -14.4%    -32.5%
2878             Max          +0.5%     +0.2%     +1.6%    +13.8%
2879  Geometric Mean          +0.4%     -0.2%     -4.9%     -6.7%
2880 
2881 Module sizes
2882         -1 s.d.                -----           -2.6%
2883         +1 s.d.                -----           +2.3%
2884         Average                -----           -0.2%
2885 
2886 Compile times:
2887         -1 s.d.                -----          -11.4%
2888         +1 s.d.                -----           +4.3%
2889         Average                -----           -3.8%
2890 
2891 I'm think program sizes have crept up because the base library
2892 is bigger -- module sizes in nofib decrease very slightly.  In turn
2893 I think that may be because the floating generates a call where
2894 there was no call before.  Anyway I think it's acceptable.
2895 
2896 
2897 The main changes are:
2898 
2899 * SetLevels floats out things that exprBotStrictness_maybe
2900   identifies as bottom.  Make sure to pin on the right
2901   strictness info to the newly created Ids, so that the
2902   info ends up in interface files.
2903 
2904   Since FloatOut is run twice, we have to be careful that we
2905   don't treat the function created by the first float-out as
2906   a candidate for the second; this is what worthFloating does.
2907 
2908   See SetLevels Note [Bottoming floats]
2909                 Note [Bottoming floats: eta expansion]
2910 
2911 * Be careful not to inline top-level bottoming functions; this
2912   would just undo what the floating transformation achieves.
2913   See CoreUnfold Note [Do not inline top-level bottoming functions
2914 
2915   Ensuring this requires a bit of extra plumbing, but nothing drastic..
2916 
2917 * Similarly pre/postInlineUnconditionally should be
2918   careful not to re-inline top-level bottoming things!
2919   See SimplUtils Note [Top-level botomming Ids]
2920                  Note [Top level and postInlineUnconditionally]
2921]
2922[Expose all EventLog events as DTrace probes
2923Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20091212100809
2924 Ignore-this: 2c5ef30b1ff7fb2ea5fba8cf0a187d45
2925 - Defines a DTrace provider, called 'HaskellEvent', that provides a probe
2926   for every event of the eventlog framework.
2927 - In contrast to the original eventlog, the DTrace probes are available in
2928   all flavours of the runtime system (DTrace probes have virtually no
2929   overhead if not enabled); when -DTRACING is defined both the regular
2930   event log as well as DTrace probes can be used.
2931 - Currently, Mac OS X only.  User-space DTrace probes are implemented
2932   differently on Mac OS X than in the original DTrace implementation.
2933   Nevertheless, it shouldn't be too hard to enable these probes on other
2934   platforms, too.
2935 - Documentation is at http://hackage.haskell.org/trac/ghc/wiki/DTrace
2936]
2937[Fix two related bugs in u_tys
2938simonpj@microsoft.com**20091211120122
2939 Ignore-this: 25e826e0915c6f6267cadff96f1d7ca6
2940 
2941 When we normalise a type family application we must recursively call
2942 uTys, *not* 'go', because the latter loop is only there to look
2943 through type synonyms.  This bug made the type checker generate
2944 ill-typed coercions, which were rejected by Core Lint.
2945 
2946 A related bug only affects the size of coercions.  If faced with
2947   (m a) ~ (F b c)
2948 where F has arity 1, we want to decompose to
2949    m ~ F Int,  a ~ c
2950 rather than deferring.  The application decomposition was being
2951 tried last, so we were missing this opportunity.
2952 
2953 Thanks to Roman for an example that showed all this up.
2954]
2955[Fix spelling in comment
2956simonpj@microsoft.com**20091211115744
2957 Ignore-this: bd02fc0eb67efc7404536f1ee96d4d1f
2958]
2959[Make -ddump-simpl-stats a bit more informative by default
2960simonpj@microsoft.com**20091208175445
2961 Ignore-this: 1bbe3f4c4b727a3b1580236c1f9c2583
2962 
2963 This mades -ddump-simpl-stats print out per-rule and per-id
2964 information by default, rather than requiring -dppr-debug.
2965 On the whole that is what you want.  The -dppr-debug flag
2966 now just controls printing of the log.
2967]
2968[Improve dumping for rules, and documentation of same
2969simonpj@microsoft.com**20091208105556
2970 Ignore-this: 4b09e56f953d130d5cb2807cf9da7303
2971 
2972 Inspired by Trac #3703
2973]
2974[Fix #3741, simplifying things in the process
2975Simon Marlow <marlowsd@gmail.com>**20091210160909
2976 Ignore-this: 8a668af4eb9e1aa71b4764b84f148dac
2977 The problem in #3741 was that we had confused column numbers with byte
2978 offsets, which fails in the case of UTF-8 (amongst other things).
2979 Fortunately we're tracking correct column offsets now, so we didn't
2980 have to make a calculation based on a byte offset.  I got rid of two
2981 fields from the PState (last_line_len and last_offs).and one field
2982 from the AI (alex input) constructor.
2983]
2984[Allow spaces at either end of the C import spec (#3742)
2985Simon Marlow <marlowsd@gmail.com>**20091210124537
2986 Ignore-this: 840424ea49d5e81ab8f8ce3209d5eedf
2987]
2988[Put README and INSTALL into bindists
2989Ian Lynagh <igloo@earth.li>**20091209174305
2990 Also tidied up the way configure.ac gets into bindists
2991]
2992[Fix typo
2993Ian Lynagh <igloo@earth.li>**20091209152223]
2994[Fix the stage1 version number munging
2995Ian Lynagh <igloo@earth.li>**20091209151715
2996 It was munging 6.12.1 into 62
2997]
2998[Add a comment about why $(CPP) is defined the way it is in config.mk.in
2999Ian Lynagh <igloo@earth.li>**20091209131917]
3000[add a missing unlockTSO()
3001Simon Marlow <marlowsd@gmail.com>**20091209124113
3002 Ignore-this: 9ff0aedcb6d62e5b4bd2fab30bfce105
3003]
3004[Eliminate mkdependC
3005Ian Lynagh <igloo@earth.li>**20091209123929
3006 We now just call gcc to get the dependencies directly
3007]
3008[Change some HC_OPTS to CC_OPTS, so they are used when making dependencies
3009Ian Lynagh <igloo@earth.li>**20091208200315]
3010[Add -Iincludes to hp2ps's CC_OPTS
3011Ian Lynagh <igloo@earth.li>**20091208175718
3012 Making C deps for hp2ps always failed, but we used to carry on regardless
3013]
3014[add locking in mkWeakForeignEnv#
3015Simon Marlow <marlowsd@gmail.com>**20091208101229
3016 Ignore-this: 3902631687fc252c0e6794d58641371b
3017]
3018[declare g0 (fixes compilation failure with -fvia-C)
3019Simon Marlow <marlowsd@gmail.com>**20091208100925]
3020[simplify weak pointer processing
3021Simon Marlow <marlowsd@gmail.com>**20091208094822
3022 Ignore-this: d88091b23860eeba6cd971282b05c2e6
3023]
3024[simplification/optimisation: update tso->bound->tso when scavenging the TSO
3025Simon Marlow <marlowsd@gmail.com>**20091208085739
3026 Ignore-this: 401e2c67e42de9671191ba9d18c3fcf7
3027]
3028[threadStackUnderflow: fix recently introduced bug (conc068(threaded1) failure)
3029Simon Marlow <marlowsd@gmail.com>**20091207170127
3030 Ignore-this: cab7b66b3b1478d44ad5272eeec84004
3031 
3032 bug introduced by "threadStackUnderflow: put the new TSO on the mut
3033 list if necessary"
3034]
3035[need locking around use of weak_ptr_list in mkWeak#
3036Simon Marlow <marlowsd@gmail.com>**20091207145213
3037 Ignore-this: 9c7d506c30652de4dd5c47d1989022c1
3038]
3039[remove global 'total_allocated', seems to be the same as 'GC_tot_alloc'
3040Simon Marlow <marlowsd@gmail.com>**20091207115359
3041 Ignore-this: d174f167a2be6864bbab672f3d5b7c5
3042]
3043[Add some explanation about overlapping instances
3044simonpj@microsoft.com**20091207153915
3045 Ignore-this: 627db39187f0ed8a10fe46e667a849a
3046 
3047 Trac #3734 suggested addding some extra guidance about
3048 incoherence and overlap; now done
3049]
3050[Tidy up deriving error messages
3051simonpj@microsoft.com**20091207130850
3052 Ignore-this: 4e134f6b62814ea6f361df7525c25a2d
3053 
3054 I did this in response to a suggestion in Trac #3702
3055]
3056[Fix profiling build
3057Simon Marlow <marlowsd@gmail.com>**20091207092314
3058 Ignore-this: eb397ec713cb7a8f6e56f409e0663ffe
3059]
3060[Minor refactoring to remove redundant code
3061simonpj@microsoft.com**20091207083312
3062 Ignore-this: 3203447fa823823ae27565f53d39bd10
3063]
3064[Fix a nasty (and long-standing) FloatOut performance bug
3065simonpj@microsoft.com**20091207083246
3066 Ignore-this: a64b98992fa4ced434d1edf0b89842ec
3067 
3068 The effect was that, in deeply-nested applications, FloatOut would
3069 take quadratic time.  A good example was compiling
3070     programs/barton-mangler-bug/Expected.hs
3071 in which FloatOut had a visible pause of a couple of seconds!
3072 Profiling showed that 40% of the entire compile time was being
3073 consumbed by the single function partitionByMajorLevel.
3074 
3075 The bug was that the floating bindings (type FloatBinds) was kept
3076 as a list, which was partitioned at each binding site.  In programs
3077 with deeply nested lists, such as
3078        e1 : e2 : e3 : .... : e5000 : []
3079 this led to quadratic behaviour.
3080 
3081 The solution is to use a proper finite-map representation;
3082 see the new definition of FloatBinds near the bottom of FloatOut.
3083]
3084[Add a new to-do to cmm-notes
3085simonpj@microsoft.com**20091207081130
3086 Ignore-this: fc835da15dd8a206c2c1bdc6c7053c5b
3087]
3088[Comments only, principally about IfaceDeclExtras
3089simonpj@microsoft.com**20091207081108
3090 Ignore-this: 1004303ab0df7802295d67c613c4ab24
3091]
3092[Comments only, about RULE plumbing
3093simonpj@microsoft.com**20091207080442
3094 Ignore-this: 1a559744f6ad75e151afbfb2281bceb4
3095]
3096[Add splitUFM to UniqFM (used in a forthcoming patch)
3097simonpj@microsoft.com**20091204160820
3098 Ignore-this: 332aa029f25ec3f22e4f195ecd44b40b
3099 
3100 splitUFM :: Uniquable key => UniqFM elt -> key -> (UniqFM elt, Maybe elt, UniqFM elt)
3101    -- Splits a UFM into things less than, equal to, and greater than the key
3102]
3103[Add lengthBag to Bag (using in forthcoming patch)
3104simonpj@microsoft.com**20091204155055
3105 Ignore-this: 5af0f45d6b51bc77e54c5cb0e2b1e607
3106]
3107[Use addToUFM_Acc where appropriate
3108simonpj@microsoft.com**20091204155036
3109 Ignore-this: 38e768c4a9f00d7870a631a9472e6edc
3110 
3111 This way of extending a UniqFM has existed for some time, but
3112 we weren't really using it.
3113 
3114 addToUFM_Acc   :: Uniquable key =>
3115                              (elt -> elts -> elts)     -- Add to existing
3116                           -> (elt -> elts)             -- New element
3117                           -> UniqFM elts               -- old
3118                           -> key -> elt                -- new
3119                           -> UniqFM elts               -- result
3120]
3121[Add comments to "OPTIONS_GHC -fno-warn-orphans" pragmas
3122Ian Lynagh <igloo@earth.li>**20091205165721]
3123[Add some missing exports back for GHC package users; fixes trac #3715
3124Ian Lynagh <igloo@earth.li>**20091205153532]
3125[Add some comments on the alternative layout rule state
3126Ian Lynagh <igloo@earth.li>**20091205152039]
3127[Tweak layout for alternative layout rule
3128Ian Lynagh <igloo@earth.li>**20091203164424]
3129[Link all dynamic libraries with the correct install_name on Mac OS/X.
3130Ian Lynagh <igloo@earth.li>**20091204143614
3131 This is a rerecord of
3132     Stephen Blackheath <oversensitive.pastors.stephen@blacksapphire.com>**20090930222855
3133 to avoid conflicts.
3134]
3135[Document the new -dylib-install-name option in the user's guide.
3136Stephen Blackheath <oversensitive.pastors.stephen@blacksapphire.com>**20091001051637
3137 Ignore-this: 568f6ad423f737ccda3a79f2d8efdb97
3138]
3139[Add -dylib-install-name option to GHC so the install name can be set for dynamic libs on Mac OS/X.
3140Stephen Blackheath <oversensitive.pastors.stephen@blacksapphire.com>**20090930223708
3141 Ignore-this: 2323929595c0dc03a2e2ea802477a930
3142]
3143[Force -fPIC when linking against dynamic libraries on Mac OS/X.
3144Stephen Blackheath <oversensitive.pastors.stephen@blacksapphire.com>**20090928203800
3145 Ignore-this: 465433af2349779b510f500dc79768f3
3146 Otherwise you get
3147 /tmp/ghc7602_0/ghc7602_0.s:207:0:
3148    non-relocatable subtraction expression, "___stginit_Lib_dyn" minus "L1x2;4"
3149 /tmp/ghc7602_0/ghc7602_0.s:207:0:
3150    symbol: "___stginit_Lib_dyn" can't be undefined in a subtraction expression
3151]
3152[evaluate_large: evaluate large objects to bd->dest rather than gen->to
3153Simon Marlow <marlowsd@gmail.com>**20091204111037
3154 Ignore-this: 6c77407750d4a6178851aeb79ded20d1
3155 This fixes aging of large objects in the new scheme.  Bug found by
3156 perf/space_leaks/space_leak_001.  Yay perf regressions tests.
3157]
3158[Correction to the allocation stats following earlier refactoring
3159Simon Marlow <marlowsd@gmail.com>**20091204110839
3160 Ignore-this: 7ac497c67706bedd29c79091c100d22f
3161]
3162[export g0
3163Simon Marlow <marlowsd@gmail.com>**20091203165209
3164 Ignore-this: 69b5445beb91ac99bb018b9806de90a
3165]
3166[GC refactoring, remove "steps"
3167Simon Marlow <marlowsd@gmail.com>**20091203150728
3168 Ignore-this: 5360b8bf30c6847ccb7ffa8c431e81ff
3169 
3170 The GC had a two-level structure, G generations each of T steps.
3171 Steps are for aging within a generation, mostly to avoid premature
3172 promotion. 
3173 
3174 Measurements show that more than 2 steps is almost never worthwhile,
3175 and 1 step is usually worse than 2.  In theory fractional steps are
3176 possible, so the ideal number of steps is somewhere between 1 and 3.
3177 GHC's default has always been 2.
3178 
3179 We can implement 2 steps quite straightforwardly by having each block
3180 point to the generation to which objects in that block should be
3181 promoted, so blocks in the nursery point to generation 0, and blocks
3182 in gen 0 point to gen 1, and so on.
3183 
3184 This commit removes the explicit step structures, merging generations
3185 with steps, thus simplifying a lot of code.  Performance is
3186 unaffected.  The tunable number of steps is now gone, although it may
3187 be replaced in the future by a way to tune the aging in generation 0.
3188]
3189[fix error message on Windows (fixes rtsflags001)
3190Simon Marlow <marlowsd@gmail.com>**20091202141135
3191 Ignore-this: 239fed52f7f5358b034acd6512d26ef4
3192]
3193[Fix loading of annotations
3194Roman Leshchinskiy <rl@cse.unsw.edu.au>**20091204024259
3195 Ignore-this: 5750856feecbf9c6aeebfec012b1a1fd
3196 
3197 The problem was that we collected all annotations we knew about once when the
3198 simplifier started and threaded them through the CoreM monad. If new interface
3199 files were loaded during simplification, their annotations would not be
3200 visible to the simplifier.
3201 
3202 Now, we rebuild the annotation list at the start of every simplifier pass that
3203 needs it (which is only SpecConstr at the moment). This ensures that we see
3204 all annotations that have been loaded so far. This is somewhat similar to how
3205 RULES are handled.
3206]
3207[Add new ForceSpecConstr annotation
3208Roman Leshchinskiy <rl@cse.unsw.edu.au>**20091203065455
3209 Ignore-this: ca5327f85d9d40c78d95e8bfe3e7fab1
3210 
3211 Annotating a type with {-# ANN type T ForceSpecConstr #-} makes SpecConstr
3212 ignore -fspec-constr-threshold and -fspec-constr-count for recursive functions
3213 that have arguments of type T. Such functions will be specialised regardless
3214 of their size and there is no upper bound on the number of specialisations
3215 that can be generated. This also works if T is embedded in other types such as
3216 Maybe T (but not T -> T).
3217 
3218 T should not be a product type because it could be eliminated by the
3219 worker/wrapper transformation. For instance, in
3220 
3221 data T = T Int Int
3222 
3223 foo :: T -> Int
3224 foo (T m n) = ... foo (T m' n') ...
3225 
3226 SpecConstr will never see the T because w/w will get rid of it. I'm still
3227 thinking about whether fixing this is worthwhile.
3228]
3229[Generate INLINE pragmas for PA methods
3230Roman Leshchinskiy <rl@cse.unsw.edu.au>**20091203031452
3231 Ignore-this: 3435044aec2737ba58d269aeff915fbd
3232]
3233[Add a GHC layout extension to the alternative layout rule
3234Ian Lynagh <igloo@earth.li>**20091203155708]
3235[Fix HPC column numbers, following the column number changes in GHC
3236Ian Lynagh <igloo@earth.li>**20091203135520]
3237[Whitespace only
3238Ian Lynagh <igloo@earth.li>**20091203132259]
3239[Fix column numbers used when highlighting :list output
3240Ian Lynagh <igloo@earth.li>**20091203130328]
3241[add a missing lock around allocGroup()
3242Simon Marlow <marlowsd@gmail.com>**20091203110209
3243 Ignore-this: 5898b3de4010e16789b628b004aa77db
3244]
3245[remove unused cap->in_gc flag
3246Simon Marlow <marlowsd@gmail.com>**20091202154240
3247 Ignore-this: db2ef6c957c8d32233bbcc344e3c06b6
3248]
3249[Refactoring only
3250Simon Marlow <marlowsd@gmail.com>**20091202123806
3251 Ignore-this: 95a93f6e330f2c609c197194412cac75
3252]
3253[move sanity checking code from Storage.c to Sanity.c
3254Simon Marlow <marlowsd@gmail.com>**20091202121141
3255 Ignore-this: 216d434c3c3d2250effac22b37bc2b4d
3256]
3257[stg_ap_0_fast: sanity-check only the topmost frame, not the whole stack
3258Simon Marlow <marlowsd@gmail.com>**20091202115109
3259 Ignore-this: ad45e07c26aa961913d367d7c53efb75
3260 Sanity checking was getting too slow in some cases, this returns it to
3261 a constant-factor overhead.
3262]
3263[Fix profiling build
3264Simon Marlow <marlowsd@gmail.com>**20091203085930
3265 Ignore-this: ff3de527cbf7703e8bac4a48933cd8ba
3266]
3267[More work on the simplifier's inlining strategies
3268simonpj@microsoft.com**20091202174256
3269 Ignore-this: 5840392a95d9a47f37c3074f7394f2c2
3270 
3271 This patch collects a small raft of related changes
3272 
3273 * Arrange that during
3274      (a) rule matching and
3275      (b) uses of exprIsConApp_maybe
3276   we "look through" unfoldings only if they are active
3277   in the phase. Doing this for (a) required a bit of
3278   extra plumbing in the rule matching code, but I think
3279   it's worth it.
3280 
3281   One wrinkle is that even if inlining is off (in the 'gentle'
3282   phase of simplification) during rule matching we want to
3283   "look through" things with inlinings. 
3284    See SimplUtils.activeUnfInRule.
3285 
3286   This fixes a long-standing bug, where things that were
3287   supposed to be (say) NOINLINE, could still be poked into
3288   via exprIsConApp_maybe.
3289 
3290 * In the above cases, also check for (non-rule) loop breakers;
3291   we never look through these.  This fixes a bug that could make
3292   the simplifier diverge (and did for Roman). 
3293   Test = simplCore/should_compile/dfun-loop
3294 
3295 * Try harder not to choose a DFun as a loop breaker. This is
3296   just a small adjustment in the OccurAnal scoring function
3297 
3298 * In the scoring function in OccurAnal, look at the InlineRule
3299   unfolding (if there is one) not the actual RHS, beause the
3300   former is what'll be inlined. 
3301 
3302 * Make the application of any function to dictionary arguments
3303   CONLIKE.  Thus (f d1 d2) is CONLIKE. 
3304   Encapsulated in CoreUtils.isExpandableApp
3305   Reason: see Note [Expandable overloadings] in CoreUtils
3306 
3307 * Make case expressions seem slightly smaller in CoreUnfold.
3308   This reverses an unexpected consequences of charging for
3309   alternatives.
3310 
3311 Refactorings
3312 ~~~~~~~~~~~~
3313 * Signficantly refactor the data type for Unfolding (again).
3314   The result is much nicer. 
3315 
3316 * Add type synonym BasicTypes.CompilerPhase = Int
3317   and use it
3318 
3319 Many of the files touched by this patch are simply knock-on
3320 consequences of these two refactorings.
3321]
3322[Fix Trac #3100: reifyType
3323simonpj@microsoft.com**20091130175204
3324 Ignore-this: ad1578c3d2e3da6128cd5052c8b64dc
3325 
3326 A type without any leading foralls may still have constraints
3327    eg:  ?x::Int => Int -> Int
3328 
3329 But reifyType was failing in this case.
3330 
3331 Merge to 6.12.
3332]
3333[Fix Trac #3102: pre-matching polytypes
3334simonpj@microsoft.com**20091130174441
3335 Ignore-this: 3e3fa97e0de28b005a1aabe9e5542b32
3336 
3337 When *pre-matching* two types
3338      forall a. C1 => t1  ~  forall a. C2 => t2
3339 we were matching t1~t2, but totally ignoring C1,C2
3340 That's utterly wrong when pre-matching
3341        (?p::Int) => String  ~  a
3342 because we emerge with a:=String!
3343 
3344 All this is part of the impredicative story, which is about
3345 to go away, but still.
3346 
3347 Worth merging this to 6.12
3348]
3349[threadStackUnderflow: put the new TSO on the mut list if necessary
3350Simon Marlow <marlowsd@gmail.com>**20091202144549
3351 Ignore-this: 839e7ad7893b3d7ea6481030ce7c6fe6
3352]
3353[don't sanity check the whole stack when switching interp<->compiled
3354Simon Marlow <marlowsd@gmail.com>**20091202134121
3355 Ignore-this: 999b44d4dd096eceda81dda65f65a2df
3356]
3357[fix to sanity checking for ThreadRelocated TSOs
3358Simon Marlow <marlowsd@gmail.com>**20091202134041
3359 Ignore-this: 52364f29041e6909b550956087649220
3360]
3361[sanity check the top stack frame, not the whole stack
3362Simon Marlow <marlowsd@gmail.com>**20091202134020
3363 Ignore-this: c4c9b58c13299eecf7ec8cb79e34dc1f
3364]
3365[Make allocatePinned use local storage, and other refactorings
3366Simon Marlow <marlowsd@gmail.com>**20091201160321
3367 Ignore-this: ec1334a9a5ec0de2567aa81d74b715ba
3368 
3369 This is a batch of refactoring to remove some of the GC's global
3370 state, as we move towards CPU-local GC. 
3371 
3372   - allocateLocal() now allocates large objects into the local
3373     nursery, rather than taking a global lock and allocating
3374     then in gen 0 step 0.
3375 
3376   - allocatePinned() was still allocating from global storage and
3377     taking a lock each time, now it uses local storage.
3378     (mallocForeignPtrBytes should be faster with -threaded).
3379     
3380   - We had a gen 0 step 0, distinct from the nurseries, which are
3381     stored in a separate nurseries[] array.  This is slightly strange.
3382     I removed the g0s0 global that pointed to gen 0 step 0, and
3383     removed all uses of it.  I think now we don't use gen 0 step 0 at
3384     all, except possibly when there is only one generation.  Possibly
3385     more tidying up is needed here.
3386 
3387   - I removed the global allocate() function, and renamed
3388     allocateLocal() to allocate().
3389 
3390   - the alloc_blocks global is gone.  MAYBE_GC() and
3391     doYouWantToGC() now check the local nursery only.
3392]
3393[Free full_prog_argv at exit, closing a memory leak
3394Simon Marlow <marlowsd@gmail.com>**20091201122801
3395 Ignore-this: 8fdb41e09bfc318821c427d2f22af737
3396]
3397[free cap->saved_mut_lists too
3398Simon Marlow <marlowsd@gmail.com>**20091201113448
3399 Ignore-this: 973e1de140e104c126fe4a213791ba86
3400 fixes some memory leakage at shutdown
3401]
3402[exitScheduler: move boundTaskExiting call outside #ifdef THREADED_RTS
3403Simon Marlow <marlowsd@gmail.com>**20091201113352
3404 Ignore-this: d913df43b14054f73c0fa06d0205952c
3405 Fixes a little leaked memory at shutdown in non-threaded RTS
3406]
3407[Use dlltool from the in-tree mingw installation
3408Ian Lynagh <igloo@earth.li>**20091201190544
3409 We only use dlltool on Windows, and this way we don't require that
3410 the user has it installed.
3411]
3412[Fix Commentary link in the HACKING file; trac #3706
3413Ian Lynagh <igloo@earth.li>**20091201150149]
3414[Add an entry fo the ghci command :run to the user guide
3415Ian Lynagh <igloo@earth.li>**20091201173339]
3416[Fix typo in docs
3417Ian Lynagh <igloo@earth.li>**20091201170550]
3418[Delay expansion of some makefile variables until they are available
3419Ian Lynagh <igloo@earth.li>**20091201133609]
3420[Call $(SED) rather than sed
3421Ian Lynagh <igloo@earth.li>**20091201131123]
3422[Look for sed as gsed first
3423Ian Lynagh <igloo@earth.li>**20091201130741
3424 Solaris's sed apparently doesn't understand [:space:]
3425]
3426[Avoid running empty for loops; fixes trac #3683
3427Ian Lynagh <igloo@earth.li>**20091201125927
3428 Solaris's sh gives
3429     /bin/sh: syntax error at line 1: `;' unexpected
3430 when faced with something like
3431     for x in ; do ...; done
3432 Patch from Christian Maeder.
3433]
3434[Fix PS file generation
3435Simon Marlow <marlowsd@gmail.com>**20091201154254
3436 Ignore-this: 7b7122208e845b029a8b7215149fd203
3437 (the image doesn't work, but at least db2latex doesn't fall over)
3438]
3439[Implement a new heap-tuning option: -H
3440Simon Marlow <marlowsd@gmail.com>**20091130151836
3441 Ignore-this: 2089b9dfaf6c095dc0460cef39e9d586
3442 
3443 -H alone causes the RTS to use a larger nursery, but without exceeding
3444 the amount of memory that the application is already using.  It trades
3445 off GC time against locality: the default setting is to use a
3446 fixed-size 512k nursery, but this is sometimes worse than using a very
3447 large nursery despite the worse locality.
3448 
3449 Not all programs get faster, but some programs that use large heaps do
3450 much better with -H.  e.g. this helps a lot with #3061 (binary-trees),
3451 though not as much as specifying -H<large>.  Typically using -H<large>
3452 is better than plain -H, because the runtime doesn't know ahead of
3453 time how much memory you want to use.
3454 
3455 Should -H be on by default?  I'm not sure, it makes some programs go
3456 slower, but others go faster.
3457]
3458[Store a destination step in the block descriptor
3459Simon Marlow <marlowsd@gmail.com>**20091129164251
3460 Ignore-this: c406550acfe10141fcc38d3949d67490
3461 At the moment, this just saves a memory reference in the GC inner loop
3462 (worth a percent or two of GC time).  Later, it will hopefully let me
3463 experiment with partial steps, and simplifying the generation/step
3464 infrastructure.
3465]
3466[Fix the prof_scc.png image in the profiling section (#3694)
3467Simon Marlow <marlowsd@gmail.com>**20091130132703
3468 Ignore-this: 9774bad70187274e3dd283d66703004
3469]
3470[document 'recache' command in the help output (#3684)
3471Simon Marlow <marlowsd@gmail.com>**20091130122040
3472 Ignore-this: 95a51f76e66055af27cdfc7b5ad7deb3
3473]
3474[Check whether the main function is actually exported (#414)
3475Simon Marlow <marlowsd@gmail.com>**20091130112327
3476 Ignore-this: 1afaa18d8c0c9e1d029531ac9d4865bb
3477]
3478[Avoid using non-standard GNU tar option --force-local
3479Simon Marlow <marlowsd@gmail.com>**20091130112605
3480 Ignore-this: ac066722b15eb93e752d4f63391c9e3c
3481]
3482[Reorder ALL_RTS_LIBS
3483Matthias Kilian <kili@outback.escape.de>**20091115175405
3484 Ignore-this: 795cfd5215ec73eea729aa2b3097817e
3485 
3486 ALL_RTS_LIBS is (ab)used for linking ghc when BootingFromHc=Yes,
3487 which needs libHSrtsmain.a before libHSrts.a.
3488 
3489]
3490[Update dependencies
3491Ian Lynagh <igloo@earth.li>**20091129165534]
3492[Follow Cabal changes
3493Ian Lynagh <igloo@earth.li>**20091129165141]
3494[Tweak layout to work with alternative layout rule
3495Ian Lynagh <igloo@earth.li>**20091129163044]
3496[Tweak the alternative layout rule: {} contains commas
3497Ian Lynagh <igloo@earth.li>**20091129155454]
3498[Correct the advanceSrcLoc calculation for tabs
3499Ian Lynagh <igloo@earth.li>**20091129153933
3500 It was off-by-one
3501]
3502[Tweak alternative layout rule
3503Ian Lynagh <igloo@earth.li>**20091129152323]
3504[Make the alternative layout rule cope with file pragmas
3505Ian Lynagh <igloo@earth.li>**20091129145840]
3506[Give more informative error messages
3507Ian Lynagh <igloo@earth.li>**20091129031029
3508 We used to just get
3509     ghc: panic! (the 'impossible' happened)
3510       (GHC version 6.13.20091128 for x86_64-unknown-linux):
3511         too few bytes. Failed reading at byte position 32753
3512 with no indication of what was being parsed.
3513]
3514[Teach advanceSrcLoc about tab characters
3515Ian Lynagh <igloo@earth.li>**20091128151204]
3516[Whitespace only
3517Ian Lynagh <igloo@earth.li>**20091128150731]
3518[Columns now start at 1, as lines already did
3519Ian Lynagh <igloo@earth.li>**20091127224050
3520 Also corrected a couple of line 0's to line 1
3521]
3522[Remove configure tests on tarballs that no longer exist
3523Ian Lynagh <igloo@earth.li>**20091127150101]
3524[Implement non-decreasing do indentation in the alternative layout rule
3525Ian Lynagh <igloo@earth.li>**20091127011932]
3526[add docs for Unicode entities in #2978
3527Simon Marlow <marlowsd@gmail.com>**20091125153649
3528 Ignore-this: f3d1561ef8f55606d9022ab7243e3800
3529]
3530[Apply patch from #2978: add more Unicode syntax
3531Simon Marlow <marlowsd@gmail.com>**20090918130333
3532 Ignore-this: 1393009fdf2383ca43046ba0767a51e0
3533]
3534[Use UTF-8 explicitly for InstalledPackageInfo
3535Simon Marlow <marlowsd@gmail.com>**20091125141730
3536 Ignore-this: 45be1506dd5c3339fb229a44aa958235
3537 So ghc-pkg register/update takes input in UTF-8, and ghc-pkg dump
3538 outputs in UTF-8.  Textual package config files in the package DB are
3539 assumed to be in UTF-8.
3540]
3541[Comments only, esp about RecStmts
3542simonpj@microsoft.com**20091126163241
3543 Ignore-this: 6fb05bd70b1d0cbb55fb01cf1f17ea77
3544]
3545[Fix a bug in alternative layout rule
3546Ian Lynagh <igloo@earth.li>**20091125231901]
3547[Fix a bug in alternative layout
3548Ian Lynagh <igloo@earth.li>**20091125230616
3549 And make the code simpler in the process!
3550]
3551[Bug fix for alternative layout rule
3552Ian Lynagh <igloo@earth.li>**20091125205809]
3553[Tweak alternative layout rule
3554Ian Lynagh <igloo@earth.li>**20091125193854]
3555[Add unboxed parentheses to the alternative layout rule
3556Ian Lynagh <igloo@earth.li>**20091125182421]
3557[Tweak the warning suppression flags used in Lexer
3558Ian Lynagh <igloo@earth.li>**20091125171815]
3559[Implement the alternative layout rule
3560Ian Lynagh <igloo@earth.li>**20091125171656
3561 Caution: Largely untested
3562]
3563[Fix some warning in Lexer
3564Ian Lynagh <igloo@earth.li>**20091124233726]
3565[threadStackOverflow: check whether stack squeezing released some stack (#3677)
3566Simon Marlow <marlowsd@gmail.com>**20091125125917
3567 Ignore-this: d35089eb93f5b367b7d1c445bda79232
3568 
3569 In a stack overflow situation, stack squeezing may reduce the stack
3570 size, but we don't know whether it has been reduced enough for the
3571 stack check to succeed if we try again.  Fortunately stack squeezing
3572 is idempotent, so all we need to do is record whether *any* squeezing
3573 happened.  If we are at the stack's absolute -K limit, and stack
3574 squeezing happened, then we try running the thread again.
3575 
3576 We also want to avoid enlarging the stack if squeezing has already
3577 released some of it.  However, we don't want to get into a
3578 pathalogical situation where a thread has a nearly full stack (near
3579 its current limit, but not near the absolute -K limit), keeps
3580 allocating a little bit, squeezing removes a little bit, and then it
3581 runs again.  So to avoid this, if we squeezed *and* there is still
3582 less than BLOCK_SIZE_W words free, then we enlarge the stack anyway.
3583]
3584[add a comment to TSO_MARKED
3585Simon Marlow <marlowsd@gmail.com>**20091125104954
3586 Ignore-this: 7111281a443533dc453dbf9481dba519
3587]
3588[Pass --no-user-package-conf to ghc-pkg in bindisttest
3589Roman Leshchinskiy <rl@cse.unsw.edu.au>**20091125115953]
3590[Add a note saying what Haddock relies on about Instance.is_dfun
3591David Waern <david.waern@gmail.com>**20091124210308]
3592[Treat () as an enumeration tycon
3593Ian Lynagh <igloo@earth.li>**20091124011313
3594 This fixes deriving Ord (), which previously failed with
3595   ghc-stage1: panic! (the 'impossible' happened)
3596     (GHC version 6.13.20091123 for x86_64-unknown-linux):
3597           TcGenDeriv:mk_FunBind
3598]
3599[Whitespace only
3600Ian Lynagh <igloo@earth.li>**20091124003221]
3601[inline has moved to GHC.Magic
3602Ian Lynagh <igloo@earth.li>**20091123200308]
3603[Use the ghc-perl tarball on Windows, instead of the msys one
3604Ian Lynagh <igloo@earth.li>**20091120153953]
3605[Install perl on Windows
3606Ian Lynagh <igloo@earth.li>**20091120223830]
3607[Remove cprAnalysis directory from hs-source-dirs
3608simonpj@microsoft.com**20091120161911
3609 Ignore-this: e7d3707794979e45b43136137c939af1
3610]
3611[Remove -fasm from mk/validate-settings.mk
3612Ian Lynagh <igloo@earth.li>**20091120125656
3613 Makes it easier to do unregisterised validate runs
3614]
3615[Fix some dependencies in bindists
3616Ian Lynagh <igloo@earth.li>**20091120125342
3617 We can't depend on sources in a bindist, because we don't have the sources.
3618]
3619[Add a rule to allow us to sdist libraries easily
3620Ian Lynagh <igloo@earth.li>**20091119160527]
3621[Check upper/lower bounds on various RTS flags (#3633)
3622Simon Marlow <marlowsd@gmail.com>**20091119142422
3623 Ignore-this: 8cbbb3f0f2c46711967491d5c028a410
3624 
3625 Also, make K mean 1024 rather than 1000, in RTS flags (similarly for M
3626 and G).  The main reason I want to change it is that otherwise this
3627 might be confusing:
3628   
3629 exp3_8: error in RTS option -H4k: size outside allowed range (4096 - 18446744073709551615)
3630 
3631 And I think the original reason for using 1000 instead of 1024,
3632 worries about direct-mapped caches, is not an issue in this context
3633 (even if you can find a direct-mapped cache these days).
3634]
3635[define HS_WORD_MAX
3636Simon Marlow <marlowsd@gmail.com>**20091119140143
3637 Ignore-this: ed27e7c7ac0bd03cddcd745ae7053a74
3638]
3639[Print the prog name in errorBelch() even if prog_argv is not set yet
3640Simon Marlow <marlowsd@gmail.com>**20091119135230
3641 Ignore-this: ec42e7a4f344ebc34befddfc3d74a946
3642 This means we get the prog name in error messages from the flag parser
3643]
3644[Remove dead code
3645Roman Leshchinskiy <rl@cse.unsw.edu.au>**20091112070455
3646 Ignore-this: d30b668cb3c396fe21e5e4cd9b8be151
3647]
3648[Remove the (very) old strictness analyser
3649simonpj@microsoft.com**20091119154347
3650 Ignore-this: 5d49f66b0baad989ca66c53fde8f2d23
3651 
3652 I finally got tired of the #ifdef OLD_STRICTNESS stuff.  I had been
3653 keeping it around in the hope of doing old-to-new comparisions, but
3654 have failed to do so for many years, so I don't think it's going to
3655 happen.  This patch deletes the clutter.
3656]
3657[Make INLINE warning more precise
3658simonpj@microsoft.com**20091119132711
3659 Ignore-this: f1494494f37c5e618e639912ff82a7f5
3660]
3661[Implement -fexpose-all-unfoldings, and fix a non-termination bug
3662simonpj@microsoft.com**20091119125711
3663 Ignore-this: 54d029014659959151d1681842210cde
3664 
3665 The -fexpose-all-unfoldings flag arranges to put unfoldings for *everything*
3666 in the interface file.  Of course,  this makes the file a lot bigger, but
3667 it also makes it complete, and that's great for supercompilation; or indeed
3668 any whole-program work.
3669 
3670 Consequences:
3671   * Interface files need to record loop-breaker-hood.  (Previously,
3672     loop breakers were never exposed, so that info wasn't necessary.)
3673     Hence a small interface file format change.
3674 
3675   * When inlining, must check loop-breaker-hood. (Previously, loop
3676     breakers didn't have an unfolding at all, so no need to check.)
3677 
3678   * Ditto in exprIsConApp_maybe.  Roman actually tripped this bug,
3679     because a DFun, which had an unfolding, was also a loop breaker
3680 
3681   * TidyPgm.tidyIdInfo must be careful to preserve loop-breaker-hood
3682 
3683 So Id.idUnfolding checks for loop-breaker-hood and returns NoUnfolding
3684 if so. When you want the unfolding regardless of loop-breaker-hood,
3685 use Id.realIdUnfolding.
3686 
3687 I have not documented the flag yet, because it's experimental.  Nor
3688 have I tested it thoroughly.  But with the flag off (the normal case)
3689 everything should work.
3690]
3691[Re-implement the binder-swap stuff in OccurAnal
3692simonpj@microsoft.com**20091119124524
3693 Ignore-this: 662ed559e161be958b1eff1a49d750a3
3694 
3695 This is a pretty big patch, but it has a very local effect.
3696 It affects only the binder-swap mechanism in OccurAnal, which
3697 was not working well becuase it's more subtle than I'd realised
3698 (See Note [getProxies is subtle]).  I think this does a much
3699 better job.
3700]
3701[Try harder not to make DFuns into loop breakers
3702simonpj@microsoft.com**20091119124127
3703 Ignore-this: 922d9a2b3406a3dbbfc5a42d1a286e2a
3704 
3705 See Note [DFuns should not be loop breakers]
3706]
3707[Extend the GHCi FAQ slightly
3708simonpj@microsoft.com**20091117132308
3709 Ignore-this: 8257aaf06ff32904a91121a0734d1c4
3710]
3711[Add gnutar to the list of names we use when looking for GNU tar
3712Ian Lynagh <igloo@earth.li>**20091119144927]
3713[Add support for the man page to the new build system
3714Ian Lynagh <igloo@earth.li>**20091119140811]
3715[Refactor case-merging and identical-alternative optimisations
3716simonpj@microsoft.com**20091119123704
3717 Ignore-this: db12d31395ed99c2341cc4d7d5dca1e
3718 
3719 These two optimisations were originally done by SimplUtils.mkCase
3720 *after* all the pieces have been simplified.  Some while ago I
3721 moved them *before*, so they were done by SimplUtils.prepareAlts.
3722 It think the reason was that I couldn't rely on the dead-binder
3723 information on OutIds, and that info is useful in these optimisations.
3724 
3725 However,
3726  (a) Other changes (notably moving case-binder-swap to OccurAnal)
3727      have meant that dead-binder information is accurate in
3728      OutIds
3729 
3730  (b) When there is a cascade of case-merges, they happen in
3731      one sweep if you do it after, but in many sweeps if you
3732      do it before.  Reason: doing it after means you are looking
3733      at nice simplified Core.
3734]
3735[Fix a nasty infelicity in the size computation of CoreUnfold
3736simonpj@microsoft.com**20091119115736
3737 Ignore-this: ecff5289ab14c0df572135bf0b5179d6
3738 
3739 The size computation was treating gigantic case expressions as
3740 practically free, which they really aren't.  It was exacerbated by
3741 recent decisions to charge 0 for naked variables and constructors, so
3742 the RHS of the case might look free too.  A good example was
3743 Foreign.C.Error.errnoToIOError, which hsa lots of join points
3744 that were getting inlined way to vigorously, so we had:
3745 
3746   *** Simplifier Phase 2 [main]:
3747       Result size = 2983
3748   *** Core Linted result of Simplifier mode 2 [main], iteration 1 out of 4:
3749       Result size = 640327
3750   *** Core Linted result of Simplifier mode 2 [main], iteration 2 out of 4:
3751       Result size = 1659
3752 
3753 Notice that gigantic intermediate!
3754 
3755 This patch adds a small charge for each *alternative*.  Of course,
3756 that'll also mean that there's a bit less inling of things involving
3757 case expressions.
3758]
3759[Comments and white space only
3760simonpj@microsoft.com**20091119115122
3761 Ignore-this: dc8f9a72d6d57378d83154877b1d1126
3762]
3763[Fix splitAppTys
3764Roman Leshchinskiy <rl@cse.unsw.edu.au>**20091119102639
3765 Ignore-this: e669950c7d151c8a67910cd4bbac9cd6
3766]
3767[Windows DLLs: Slurp across the actually static version of libffi
3768Ben.Lippmeier@anu.edu.au**20091119000239]
3769[Windows DLLs: Don't rely on stg/DLL.h being included in RtsAPI.h
3770Ben.Lippmeier@anu.edu.au**20091118110548
3771 Ignore-this: 7dce0ede283974d7834fe12af3f71bd5
3772]
3773[Fix warnings about unused imports
3774Ben.Lippmeier@anu.edu.au**20091118110525
3775 Ignore-this: 93841770eadabf5bd3b9f859ca2de7eb
3776]
3777[Windows DLLs: stifle more warnings about auto imported symbols
3778Ben.Lippmeier@anu.edu.au**20091118090105]
3779[Windows DLLs: stifle warnings about symbols being auto imported from DLLs
3780Ben.Lippmeier@anu.edu.au**20091118051526]
3781[Windows DLLs: add #ifdefery to turn off DLL import of libffi when building statically.
3782Ben.Lippmeier@anu.edu.au**20091118043901]
3783[Windows DLLs: disable extra shutdownHaskell() when unloading the RTS DLL
3784Ben.Lippmeier@anu.edu.au**20091117050648]
3785[Windows DLLs: remove dup symbol from def file
3786Ben.Lippmeier@anu.edu.au**20091117043851]
3787[Use opt_PIC not #defined __PIC__ in compiler source.
3788Ben.Lippmeier@anu.edu.au**20091117043716]
3789[Windows DLLs: CHARLIKE_closure and INTLIKE_closure aren't defined in this way.
3790Ben.Lippmeier@anu.edu.au**20091114063240]
3791[If a comment says "Is this correct?", it's not.
3792Ben.Lippmeier@anu.edu.au**20091114063157]
3793[Windows DLLs: gmp is in the integer-gmp package now.
3794Ben.Lippmeier@anu.edu.au**20091114063046]
3795[Use DLL aware runIO_closure instead of base_GHCziTopHandler_runIO_closure directly
3796Ben.Lippmeier@anu.edu.au**20091114061559]
3797[RTS also uses runSparks_closure from base
3798Ben.Lippmeier@anu.edu.au**20091114061445]
3799[Provide extralibs when linking Windows DLLs
3800Ben.Lippmeier@anu.edu.au**20091114061109]
3801[Don't share low valued Int and Char closures with Windows DLLs
3802Ben.Lippmeier@anu.edu.au**20091114060455]
3803[Windows DLLs: use one import lib for each DLL the RTS needs.
3804Ben.Lippmeier@anu.edu.au**20091111014821]
3805[Add autoconf code to locate dlltool on Windows
3806Ben.Lippmeier@anu.edu.au**20091110051257]
3807[Break recursive imports between the RTS and base library on Windows.
3808Ben.Lippmeier@anu.edu.au**20091106062732
3809 
3810 The file rts/win32/libHSbase.def contains a list of all the
3811 symbols from the base library that the RTS needs.
3812 
3813 When building the RTS into a DLL on Windows, we want to link the DLL
3814 for the RTS before we link the DLL for the base library. We use
3815 libHSbase.def to make the "import library" libHSbase.so.a, which
3816 contains stubs for each of the symbols from the base library that
3817 the RTS needs.
3818]
3819[Add the msysCORE*.tar.gz tarball to the list of tarballs we unpack
3820Ian Lynagh <igloo@earth.li>**20091118195523]
3821[Put the libffi files to be installed into a dist directory
3822Ian Lynagh <igloo@earth.li>**20091118150508
3823 This meakes it easier to correctly clean libffi
3824]
3825[Add ghc-tarballs to the list of directories that go into an sdist
3826Ian Lynagh <igloo@earth.li>**20091118131047]
3827[Remove redundant libffi/tarball directory
3828Ian Lynagh <igloo@earth.li>**20091118124102
3829 We now use the tarball in the ghc-tarballs repo
3830]
3831[Fix gen_contents_index on MSYS
3832Ian Lynagh <igloo@earth.li>**20091117223556
3833 On MSYS
3834     sed 's/.*[ \t]//'
3835 wasn't matching
3836     version:<tab>1.0
3837 so I've switched to
3838     's/.*[[:space:]]//'
3839 which works on Linux, cygwin and MSYS.
3840]
3841[include the GHC package docs in a bindist
3842Simon Marlow <marlowsd@gmail.com>**20091117151133
3843 Ignore-this: c4a10221b1a2a4778494018bca7d2169
3844]
3845[exclude some haddock-related rules during BINDIST
3846Simon Marlow <marlowsd@gmail.com>**20091117151123
3847 Ignore-this: 20b4194b26766d6ab701683af520a7d4
3848]
3849[Add an install-docs target that emits a helpful diagnostic (#3662)
3850Simon Marlow <marlowsd@gmail.com>**20091116120137
3851 Ignore-this: 1c5414730614b205c67919f3ea363c00
3852]
3853[fix install_docs dependencies, and add a missing $(INSTALL_DIR)
3854Simon Marlow <marlowsd@gmail.com>**20091116115630
3855 Ignore-this: 21230df54e79f12f61e9c82a0ae02fad
3856]
3857[Tweak to the directory-building rule
3858Simon Marlow <marlowsd@gmail.com>**20091113125719
3859 Ignore-this: b9e1fe6bcbfd4ff56905517f32b646f7
3860 So we don't try to recreate directories just because they are older
3861 than mkdirhier, since mkdirhier won't touch them.
3862]
3863[exprIsHNF should "look through" lets
3864simonpj@microsoft.com**20091117125526
3865 Ignore-this: 3e77d029c0f314c53171f0378939b496
3866 
3867 I can't quite remember when I spotted this, but exprIsHNF (and
3868 similarly exprIsConLike) should ignore enclosing let-bindings,
3869 since they don't affect termination.
3870]
3871[Improvement to typecheck higher-rank rules better
3872simonpj@microsoft.com**20091117125417
3873 Ignore-this: c5791cbe9540376b9ff46e2a6563bcc2
3874 
3875 See Note [Typechecking rules] in TcRules. 
3876 Suggested by Roman
3877]
3878[Apply RULES to simplified arguments
3879simonpj@microsoft.com**20091117104437
3880 Ignore-this: 9a3475a9871f45ffa115dec44e376e3c
3881 
3882 See Note [RULEs apply to simplified arguments] in Simplify.lhs
3883 A knock-on effect is that rules apply *after* we try inlining
3884 (which uses un-simplified arguments), but that seems fine.
3885]
3886[Improvements to pretty-printing of Core
3887simonpj@microsoft.com**20091117103626
3888 Ignore-this: ad386865644b4dbcd98adab409d7c523
3889]
3890[Fix formatting of module deprecation/warning messages
3891Duncan Coutts <duncan@well-typed.com>**20091115155617
3892 Ignore-this: a41444bdda003aee4412eb56a0e7d052
3893 It was accidentally using list syntax. Fixes #3303 again.
3894]
3895[Wibble to comment
3896simonpj@microsoft.com**20091113145944
3897 Ignore-this: 730f7cad452ac96d59ee2e74a855c19d
3898]
3899[TAG 2009-11-15
3900Ian Lynagh <igloo@earth.li>**20091115155059]
3901Patch bundle hash:
3902d6ba8ccb4d5d5c6706d20bfb04d99e26a0713d87