[Git][ghc/ghc][wip/marge_bot_batch_merge_job] 6 commits: Revert "AArch32 symbols only on aarch32."

Marge Bot gitlab at gitlab.haskell.org
Tue Jul 21 10:39:40 UTC 2020



 Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC


Commits:
868e4523 by Moritz Angermann at 2020-07-20T04:30:38-04:00
Revert "AArch32 symbols only on aarch32."

This reverts commit cdfeb3f24f76e8fd30452016676e56fbc827789a.

Signed-off-by: Moritz Angermann <moritz.angermann at gmail.com>

- - - - -
c915ba84 by Moritz Angermann at 2020-07-20T04:30:38-04:00
Revert "Fix (1)"

This reverts commit 7abffced01f5680efafe44f6be2733eab321b039.

Signed-off-by: Moritz Angermann <moritz.angermann at gmail.com>

- - - - -
777c452a by Moritz Angermann at 2020-07-20T04:30:38-04:00
Revert "better if guards."

This reverts commit 3f60b94de1f460ca3f689152860b108a19ce193e.

Signed-off-by: Moritz Angermann <moritz.angermann at gmail.com>

- - - - -
0dd40552 by Moritz Angermann at 2020-07-20T04:30:38-04:00
Revert "[linker/rtsSymbols] More linker symbols"

This reverts commit 686e72253aed3880268dd6858eadd8c320f09e97.

Signed-off-by: Moritz Angermann <moritz.angermann at gmail.com>

- - - - -
30caeee7 by Sylvain Henry at 2020-07-21T06:39:33-04:00
DynFlags: remove use of sdocWithDynFlags from GHC.Stg.* (#17957)

* add StgPprOpts datatype
* remove Outputable instances for types that need `StgPprOpts` to be
  pretty-printed and explicitly call type specific ppr functions
* add default `panicStgPprOpts` for panic messages (when it's not
  convenient to thread StgPprOpts or DynFlags down to the ppr function
  call)

- - - - -
863c544c by Mark at 2020-07-21T06:39:34-04:00
Fix a typo in existential_quantification.rst
- - - - -


10 changed files:

- compiler/GHC/CoreToStg.hs
- compiler/GHC/Driver/Main.hs
- compiler/GHC/Stg/DepAnal.hs
- compiler/GHC/Stg/Lift.hs
- compiler/GHC/Stg/Lint.hs
- compiler/GHC/Stg/Pipeline.hs
- compiler/GHC/Stg/Syntax.hs
- compiler/GHC/Stg/Unarise.hs
- docs/users_guide/exts/existential_quantification.rst
- rts/RtsSymbols.c


Changes:

=====================================
compiler/GHC/CoreToStg.hs
=====================================
@@ -445,7 +445,7 @@ coreToStgExpr e0@(Case scrut bndr _ alts) = do
           _ ->
             pprPanic "coreToStgExpr" $
               text "Unexpected unsafe equality case expression:" $$ ppr e0 $$
-              text "STG:" $$ ppr stg
+              text "STG:" $$ pprStgExpr panicStgPprOpts stg
       _ -> return stg
   where
     vars_alt :: (AltCon, [Var], CoreExpr) -> CtsM (AltCon, [Var], StgExpr)


=====================================
compiler/GHC/Driver/Main.hs
=====================================
@@ -1551,7 +1551,7 @@ doCodeGen hsc_env this_mod data_tycons
 
     let stg_binds_w_fvs = annTopBindingsFreeVars stg_binds
 
-    dumpIfSet_dyn dflags Opt_D_dump_stg_final "Final STG:" FormatSTG (pprGenStgTopBindings stg_binds_w_fvs)
+    dumpIfSet_dyn dflags Opt_D_dump_stg_final "Final STG:" FormatSTG (pprGenStgTopBindings (initStgPprOpts dflags) stg_binds_w_fvs)
 
     let cmm_stream :: Stream IO CmmGroup ModuleLFInfos
         -- See Note [Forcing of stg_binds]


=====================================
compiler/GHC/Stg/DepAnal.hs
=====================================
@@ -14,6 +14,7 @@ import GHC.Types.Var.Set
 import GHC.Unit.Module (Module)
 
 import Data.Graph (SCC (..))
+import Data.Bifunctor (first)
 
 --------------------------------------------------------------------------------
 -- * Dependency analysis
@@ -90,7 +91,7 @@ annTopBindingsDeps this_mod bs = zip bs (map top_bind bs)
     expr bounds (StgOpApp _ as _) =
       args bounds as
     expr _ lam at StgLam{} =
-      pprPanic "annTopBindingsDeps" (text "Found lambda:" $$ ppr lam)
+      pprPanic "annTopBindingsDeps" (text "Found lambda:" $$ pprStgExpr panicStgPprOpts lam)
     expr bounds (StgCase scrut scrut_bndr _ as) =
       expr bounds scrut `unionVarSet`
         alts (extendVarSet bounds scrut_bndr) as
@@ -141,4 +142,6 @@ depSort = concatMap get_binds . depAnal defs uses
     get_binds (AcyclicSCC bind) =
       [bind]
     get_binds (CyclicSCC binds) =
-      pprPanic "depSortStgBinds" (text "Found cyclic SCC:" $$ ppr binds)
+      pprPanic "depSortStgBinds"
+               (text "Found cyclic SCC:"
+               $$ ppr (map (first (pprStgTopBinding panicStgPprOpts)) binds))


=====================================
compiler/GHC/Stg/Lift.hs
=====================================
@@ -199,7 +199,7 @@ liftRhs
   -> LlStgRhs
   -> LiftM OutStgRhs
 liftRhs mb_former_fvs rhs@(StgRhsCon ccs con args)
-  = ASSERT2(isNothing mb_former_fvs, text "Should never lift a constructor" $$ ppr rhs)
+  = ASSERT2(isNothing mb_former_fvs, text "Should never lift a constructor" $$ pprStgRhs panicStgPprOpts rhs)
     StgRhsCon ccs con <$> traverse liftArgs args
 liftRhs Nothing (StgRhsClosure _ ccs upd infos body) = do
   -- This RHS wasn't lifted.


=====================================
compiler/GHC/Stg/Lint.hs
=====================================
@@ -70,7 +70,7 @@ lintStgTopBindings :: forall a . (OutputablePass a, BinderP a ~ Id)
 
 lintStgTopBindings dflags this_mod unarised whodunnit binds
   = {-# SCC "StgLint" #-}
-    case initL this_mod unarised top_level_binds (lint_binds binds) of
+    case initL this_mod unarised opts top_level_binds (lint_binds binds) of
       Nothing  ->
         return ()
       Just msg -> do
@@ -80,10 +80,11 @@ lintStgTopBindings dflags this_mod unarised whodunnit binds
                         text whodunnit <+> text "***",
                   msg,
                   text "*** Offending Program ***",
-                  pprGenStgTopBindings binds,
+                  pprGenStgTopBindings opts binds,
                   text "*** End of Offense ***"])
         Err.ghcExit dflags 1
   where
+    opts = initStgPprOpts dflags
     -- Bring all top-level binds into scope because CoreToStg does not generate
     -- bindings in dependency order (so we may see a use before its definition).
     top_level_binds = mkVarSet (bindersOfTopBinds binds)
@@ -129,9 +130,10 @@ lint_binds_help top_lvl (binder, rhs)
   = addLoc (RhsOf binder) $ do
         when (isTopLevel top_lvl) (checkNoCurrentCCS rhs)
         lintStgRhs rhs
+        opts <- getStgPprOpts
         -- Check binder doesn't have unlifted type or it's a join point
         checkL (isJoinId binder || not (isUnliftedType (idType binder)))
-               (mkUnliftedTyMsg binder rhs)
+               (mkUnliftedTyMsg opts binder rhs)
 
 -- | Top-level bindings can't inherit the cost centre stack from their
 -- (static) allocation site.
@@ -139,14 +141,17 @@ checkNoCurrentCCS
     :: (OutputablePass a, BinderP a ~ Id)
     => GenStgRhs a
     -> LintM ()
-checkNoCurrentCCS rhs@(StgRhsClosure _ ccs _ _ _)
-  | isCurrentCCS ccs
-  = addErrL (text "Top-level StgRhsClosure with CurrentCCS" $$ ppr rhs)
-checkNoCurrentCCS rhs@(StgRhsCon ccs _ _)
-  | isCurrentCCS ccs
-  = addErrL (text "Top-level StgRhsCon with CurrentCCS" $$ ppr rhs)
-checkNoCurrentCCS _
-  = return ()
+checkNoCurrentCCS rhs = do
+   opts <- getStgPprOpts
+   let rhs' = pprStgRhs opts rhs
+   case rhs of
+      StgRhsClosure _ ccs _ _ _
+         | isCurrentCCS ccs
+         -> addErrL (text "Top-level StgRhsClosure with CurrentCCS" $$ rhs')
+      StgRhsCon ccs _ _
+         | isCurrentCCS ccs
+         -> addErrL (text "Top-level StgRhsCon with CurrentCCS" $$ rhs')
+      _ -> return ()
 
 lintStgRhs :: (OutputablePass a, BinderP a ~ Id) => GenStgRhs a -> LintM ()
 
@@ -159,9 +164,10 @@ lintStgRhs (StgRhsClosure _ _ _ binders expr)
         lintStgExpr expr
 
 lintStgRhs rhs@(StgRhsCon _ con args) = do
-    when (isUnboxedTupleCon con || isUnboxedSumCon con) $
+    when (isUnboxedTupleCon con || isUnboxedSumCon con) $ do
+      opts <- getStgPprOpts
       addErrL (text "StgRhsCon is an unboxed tuple or sum application" $$
-               ppr rhs)
+               pprStgRhs opts rhs)
     mapM_ lintStgArg args
     mapM_ checkPostUnariseConArg args
 
@@ -176,17 +182,19 @@ lintStgExpr (StgApp fun args) = do
 lintStgExpr app@(StgConApp con args _arg_tys) = do
     -- unboxed sums should vanish during unarise
     lf <- getLintFlags
-    when (lf_unarised lf && isUnboxedSumCon con) $
+    when (lf_unarised lf && isUnboxedSumCon con) $ do
+      opts <- getStgPprOpts
       addErrL (text "Unboxed sum after unarise:" $$
-               ppr app)
+               pprStgExpr opts app)
     mapM_ lintStgArg args
     mapM_ checkPostUnariseConArg args
 
 lintStgExpr (StgOpApp _ args _) =
     mapM_ lintStgArg args
 
-lintStgExpr lam@(StgLam _ _) =
-    addErrL (text "Unexpected StgLam" <+> ppr lam)
+lintStgExpr lam@(StgLam _ _) = do
+    opts <- getStgPprOpts
+    addErrL (text "Unexpected StgLam" <+> pprStgExpr opts lam)
 
 lintStgExpr (StgLet _ binds body) = do
     binders <- lintStgBinds NotTopLevel binds
@@ -235,6 +243,7 @@ The Lint monad
 newtype LintM a = LintM
     { unLintM :: Module
               -> LintFlags
+              -> StgPprOpts        -- Pretty-printing options
               -> [LintLocInfo]     -- Locations
               -> IdSet             -- Local vars in scope
               -> Bag MsgDoc        -- Error messages so far
@@ -268,16 +277,16 @@ pp_binders bs
     pp_binder b
       = hsep [ppr b, dcolon, ppr (idType b)]
 
-initL :: Module -> Bool -> IdSet -> LintM a -> Maybe MsgDoc
-initL this_mod unarised locals (LintM m) = do
-  let (_, errs) = m this_mod (LintFlags unarised) [] locals emptyBag
+initL :: Module -> Bool -> StgPprOpts -> IdSet -> LintM a -> Maybe MsgDoc
+initL this_mod unarised opts locals (LintM m) = do
+  let (_, errs) = m this_mod (LintFlags unarised) opts [] locals emptyBag
   if isEmptyBag errs then
       Nothing
   else
       Just (vcat (punctuate blankLine (bagToList errs)))
 
 instance Applicative LintM where
-      pure a = LintM $ \_mod _lf _loc _scope errs -> (a, errs)
+      pure a = LintM $ \_mod _lf _opts _loc _scope errs -> (a, errs)
       (<*>) = ap
       (*>)  = thenL_
 
@@ -286,14 +295,14 @@ instance Monad LintM where
     (>>)  = (*>)
 
 thenL :: LintM a -> (a -> LintM b) -> LintM b
-thenL m k = LintM $ \mod lf loc scope errs
-  -> case unLintM m mod lf loc scope errs of
-      (r, errs') -> unLintM (k r) mod lf loc scope errs'
+thenL m k = LintM $ \mod lf opts loc scope errs
+  -> case unLintM m mod lf opts loc scope errs of
+      (r, errs') -> unLintM (k r) mod lf opts loc scope errs'
 
 thenL_ :: LintM a -> LintM b -> LintM b
-thenL_ m k = LintM $ \mod lf loc scope errs
-  -> case unLintM m mod lf loc scope errs of
-      (_, errs') -> unLintM k mod lf loc scope errs'
+thenL_ m k = LintM $ \mod lf opts loc scope errs
+  -> case unLintM m mod lf opts loc scope errs of
+      (_, errs') -> unLintM k mod lf opts loc scope errs'
 
 checkL :: Bool -> MsgDoc -> LintM ()
 checkL True  _   = return ()
@@ -338,7 +347,7 @@ checkPostUnariseId id =
       is_sum <|> is_tuple <|> is_void
 
 addErrL :: MsgDoc -> LintM ()
-addErrL msg = LintM $ \_mod _lf loc _scope errs -> ((), addErr errs msg loc)
+addErrL msg = LintM $ \_mod _lf _opts loc _scope errs -> ((), addErr errs msg loc)
 
 addErr :: Bag MsgDoc -> MsgDoc -> [LintLocInfo] -> Bag MsgDoc
 addErr errs_so_far msg locs
@@ -349,29 +358,32 @@ addErr errs_so_far msg locs
     mk_msg []      = msg
 
 addLoc :: LintLocInfo -> LintM a -> LintM a
-addLoc extra_loc m = LintM $ \mod lf loc scope errs
-   -> unLintM m mod lf (extra_loc:loc) scope errs
+addLoc extra_loc m = LintM $ \mod lf opts loc scope errs
+   -> unLintM m mod lf opts (extra_loc:loc) scope errs
 
 addInScopeVars :: [Id] -> LintM a -> LintM a
-addInScopeVars ids m = LintM $ \mod lf loc scope errs
+addInScopeVars ids m = LintM $ \mod lf opts loc scope errs
  -> let
         new_set = mkVarSet ids
-    in unLintM m mod lf loc (scope `unionVarSet` new_set) errs
+    in unLintM m mod lf opts loc (scope `unionVarSet` new_set) errs
 
 getLintFlags :: LintM LintFlags
-getLintFlags = LintM $ \_mod lf _loc _scope errs -> (lf, errs)
+getLintFlags = LintM $ \_mod lf _opts _loc _scope errs -> (lf, errs)
+
+getStgPprOpts :: LintM StgPprOpts
+getStgPprOpts = LintM $ \_mod _lf opts _loc _scope errs -> (opts, errs)
 
 checkInScope :: Id -> LintM ()
-checkInScope id = LintM $ \mod _lf loc scope errs
+checkInScope id = LintM $ \mod _lf _opts loc scope errs
  -> if nameIsLocalOrFrom mod (idName id) && not (id `elemVarSet` scope) then
         ((), addErr errs (hsep [ppr id, dcolon, ppr (idType id),
                                 text "is out of scope"]) loc)
     else
         ((), errs)
 
-mkUnliftedTyMsg :: OutputablePass a => Id -> GenStgRhs a -> SDoc
-mkUnliftedTyMsg binder rhs
+mkUnliftedTyMsg :: OutputablePass a => StgPprOpts -> Id -> GenStgRhs a -> SDoc
+mkUnliftedTyMsg opts binder rhs
   = (text "Let(rec) binder" <+> quotes (ppr binder) <+>
      text "has unlifted type" <+> quotes (ppr (idType binder)))
     $$
-    (text "RHS:" <+> ppr rhs)
+    (text "RHS:" <+> pprStgRhs opts rhs)


=====================================
compiler/GHC/Stg/Pipeline.hs
=====================================
@@ -103,13 +103,14 @@ stg2stg dflags this_mod binds
             liftIO (stg_linter True "Unarise" binds')
             return binds'
 
+    opts = initStgPprOpts dflags
     dump_when flag header binds
-      = dumpIfSet_dyn dflags flag header FormatSTG (pprStgTopBindings binds)
+      = dumpIfSet_dyn dflags flag header FormatSTG (pprStgTopBindings opts binds)
 
     end_pass what binds2
       = liftIO $ do -- report verbosely, if required
           dumpIfSet_dyn dflags Opt_D_verbose_stg2stg what
-            FormatSTG (vcat (map ppr binds2))
+            FormatSTG (vcat (map (pprStgTopBinding opts) binds2))
           stg_linter False what binds2
           return binds2
 


=====================================
compiler/GHC/Stg/Syntax.hs
=====================================
@@ -56,7 +56,11 @@ module GHC.Stg.Syntax (
         stgCaseBndrInScope,
         bindersOf, bindersOfTop, bindersOfTopBinds,
 
-        pprStgBinding, pprGenStgTopBindings, pprStgTopBindings
+        -- ppr
+        StgPprOpts(..), initStgPprOpts, panicStgPprOpts,
+        pprStgArg, pprStgExpr, pprStgRhs, pprStgBinding,
+        pprGenStgTopBinding, pprStgTopBinding,
+        pprGenStgTopBindings, pprStgTopBindings
     ) where
 
 #include "HsVersions.h"
@@ -643,79 +647,73 @@ type OutputablePass pass =
   , OutputableBndr (BinderP pass)
   )
 
-pprGenStgTopBinding
-  :: OutputablePass pass => GenStgTopBinding pass -> SDoc
-pprGenStgTopBinding (StgTopStringLit bndr str)
-  = hang (hsep [pprBndr LetBind bndr, equals])
-        4 (pprHsBytes str <> semi)
-pprGenStgTopBinding (StgTopLifted bind)
-  = pprGenStgBinding bind
-
-pprGenStgBinding
-  :: OutputablePass pass => GenStgBinding pass -> SDoc
-
-pprGenStgBinding (StgNonRec bndr rhs)
-  = hang (hsep [pprBndr LetBind bndr, equals])
-        4 (ppr rhs <> semi)
-
-pprGenStgBinding (StgRec pairs)
-  = vcat [ text "Rec {"
-         , vcat (intersperse blankLine (map ppr_bind pairs))
-         , text "end Rec }" ]
-  where
-    ppr_bind (bndr, expr)
-      = hang (hsep [pprBndr LetBind bndr, equals])
-             4 (ppr expr <> semi)
+-- | STG pretty-printing options
+data StgPprOpts = StgPprOpts
+   { stgSccEnabled :: !Bool -- ^ Enable cost-centres
+   }
+
+-- | Initialize STG pretty-printing options from DynFlags
+initStgPprOpts :: DynFlags -> StgPprOpts
+initStgPprOpts dflags = StgPprOpts
+   { stgSccEnabled = sccProfilingEnabled dflags
+   }
 
-pprGenStgTopBindings
-  :: (OutputablePass pass) => [GenStgTopBinding pass] -> SDoc
-pprGenStgTopBindings binds
-  = vcat $ intersperse blankLine (map pprGenStgTopBinding binds)
+-- | STG pretty-printing options used for panic messages
+panicStgPprOpts :: StgPprOpts
+panicStgPprOpts = StgPprOpts
+   { stgSccEnabled = True
+   }
 
-pprStgBinding :: StgBinding -> SDoc
+pprGenStgTopBinding
+  :: OutputablePass pass => StgPprOpts -> GenStgTopBinding pass -> SDoc
+pprGenStgTopBinding opts b = case b of
+   StgTopStringLit bndr str -> hang (hsep [pprBndr LetBind bndr, equals]) 4 (pprHsBytes str <> semi)
+   StgTopLifted bind        -> pprGenStgBinding opts bind
+
+pprGenStgBinding :: OutputablePass pass => StgPprOpts -> GenStgBinding pass -> SDoc
+pprGenStgBinding opts b = case b of
+   StgNonRec bndr rhs -> hang (hsep [pprBndr LetBind bndr, equals]) 4 (pprStgRhs opts rhs <> semi)
+   StgRec pairs       -> vcat [ text "Rec {"
+                              , vcat (intersperse blankLine (map ppr_bind pairs))
+                              , text "end Rec }" ]
+                         where
+                           ppr_bind (bndr, expr)
+                             = hang (hsep [pprBndr LetBind bndr, equals])
+                                    4 (pprStgRhs opts expr <> semi)
+
+pprGenStgTopBindings :: (OutputablePass pass) => StgPprOpts -> [GenStgTopBinding pass] -> SDoc
+pprGenStgTopBindings opts binds
+  = vcat $ intersperse blankLine (map (pprGenStgTopBinding opts) binds)
+
+pprStgBinding :: StgPprOpts -> StgBinding -> SDoc
 pprStgBinding = pprGenStgBinding
 
-pprStgTopBindings :: [StgTopBinding] -> SDoc
+pprStgTopBinding :: StgPprOpts -> StgTopBinding -> SDoc
+pprStgTopBinding = pprGenStgTopBinding
+
+pprStgTopBindings :: StgPprOpts -> [StgTopBinding] -> SDoc
 pprStgTopBindings = pprGenStgTopBindings
 
 instance Outputable StgArg where
-    ppr = pprStgArg
-
-instance OutputablePass pass => Outputable (GenStgTopBinding pass) where
-    ppr = pprGenStgTopBinding
-
-instance OutputablePass pass => Outputable (GenStgBinding pass) where
-    ppr = pprGenStgBinding
-
-instance OutputablePass pass => Outputable (GenStgExpr pass) where
-    ppr = pprStgExpr
-
-instance OutputablePass pass => Outputable (GenStgRhs pass) where
-    ppr rhs = pprStgRhs rhs
+  ppr = pprStgArg
 
 pprStgArg :: StgArg -> SDoc
 pprStgArg (StgVarArg var) = ppr var
 pprStgArg (StgLitArg con) = ppr con
 
-pprStgExpr :: OutputablePass pass => GenStgExpr pass -> SDoc
--- special case
-pprStgExpr (StgLit lit)     = ppr lit
-
--- general case
-pprStgExpr (StgApp func args)
-  = hang (ppr func) 4 (sep (map (ppr) args))
-
-pprStgExpr (StgConApp con args _)
-  = hsep [ ppr con, brackets (interppSP args) ]
-
-pprStgExpr (StgOpApp op args _)
-  = hsep [ pprStgOp op, brackets (interppSP args)]
-
-pprStgExpr (StgLam bndrs body)
-  = sep [ char '\\' <+> ppr_list (map (pprBndr LambdaBind) (toList bndrs))
-            <+> text "->",
-         pprStgExpr body ]
-  where ppr_list = brackets . fsep . punctuate comma
+pprStgExpr :: OutputablePass pass => StgPprOpts -> GenStgExpr pass -> SDoc
+pprStgExpr opts e = case e of
+                           -- special case
+   StgLit lit           -> ppr lit
+                           -- general case
+   StgApp func args     -> hang (ppr func) 4 (interppSP args)
+   StgConApp con args _ -> hsep [ ppr con, brackets (interppSP args) ]
+   StgOpApp op args _   -> hsep [ pprStgOp op, brackets (interppSP args)]
+   StgLam bndrs body    -> let ppr_list = brackets . fsep . punctuate comma
+                           in sep [ char '\\' <+> ppr_list (map (pprBndr LambdaBind) (toList bndrs))
+                                      <+> text "->"
+                                  , pprStgExpr opts body
+                                  ]
 
 -- special case: let v = <very specific thing>
 --               in
@@ -726,9 +724,9 @@ pprStgExpr (StgLam bndrs body)
 -- Very special!  Suspicious! (SLPJ)
 
 {-
-pprStgExpr (StgLet srt (StgNonRec bndr (StgRhsClosure cc bi free_vars upd_flag args rhs))
+   StgLet srt (StgNonRec bndr (StgRhsClosure cc bi free_vars upd_flag args rhs))
                         expr@(StgLet _ _))
-  = ($$)
+   -> ($$)
       (hang (hcat [text "let { ", ppr bndr, ptext (sLit " = "),
                           ppr cc,
                           pp_binder_info bi,
@@ -739,53 +737,60 @@ pprStgExpr (StgLet srt (StgNonRec bndr (StgRhsClosure cc bi free_vars upd_flag a
       (ppr expr)
 -}
 
--- special case: let ... in let ...
-
-pprStgExpr (StgLet ext bind expr at StgLet{})
-  = ($$)
+   -- special case: let ... in let ...
+   StgLet ext bind expr at StgLet{} -> ($$)
       (sep [hang (text "let" <+> ppr ext <+> text "{")
-                2 (hsep [pprGenStgBinding bind, text "} in"])])
-      (ppr expr)
-
--- general case
-pprStgExpr (StgLet ext bind expr)
-  = sep [hang (text "let" <+> ppr ext <+> text "{") 2 (pprGenStgBinding bind),
-           hang (text "} in ") 2 (ppr expr)]
-
-pprStgExpr (StgLetNoEscape ext bind expr)
-  = sep [hang (text "let-no-escape" <+> ppr ext <+> text "{")
-                2 (pprGenStgBinding bind),
-           hang (text "} in ")
-                2 (ppr expr)]
-
-pprStgExpr (StgTick tickish expr)
-  = sdocOption sdocSuppressTicks $ \case
-      True  -> pprStgExpr expr
-      False -> sep [ ppr tickish, pprStgExpr expr ]
-
-
--- Don't indent for a single case alternative.
-pprStgExpr (StgCase expr bndr alt_type [alt])
-  = sep [sep [text "case",
-           nest 4 (hsep [pprStgExpr expr,
-             whenPprDebug (dcolon <+> ppr alt_type)]),
-           text "of", pprBndr CaseBind bndr, char '{'],
-           pprStgAlt False alt,
-           char '}']
-
-pprStgExpr (StgCase expr bndr alt_type alts)
-  = sep [sep [text "case",
-           nest 4 (hsep [pprStgExpr expr,
-             whenPprDebug (dcolon <+> ppr alt_type)]),
-           text "of", pprBndr CaseBind bndr, char '{'],
-           nest 2 (vcat (map (pprStgAlt True) alts)),
-           char '}']
-
-
-pprStgAlt :: OutputablePass pass => Bool -> GenStgAlt pass -> SDoc
-pprStgAlt indent (con, params, expr)
-  | indent    = hang altPattern 4 (ppr expr <> semi)
-  | otherwise = sep [altPattern, ppr expr <> semi]
+                2 (hsep [pprGenStgBinding opts bind, text "} in"])])
+      (pprStgExpr opts expr)
+
+   -- general case
+   StgLet ext bind expr
+      -> sep [ hang (text "let" <+> ppr ext <+> text "{")
+                    2 (pprGenStgBinding opts bind)
+             , hang (text "} in ") 2 (pprStgExpr opts expr)
+             ]
+
+   StgLetNoEscape ext bind expr
+      -> sep [ hang (text "let-no-escape" <+> ppr ext <+> text "{")
+                    2 (pprGenStgBinding opts bind)
+             , hang (text "} in ") 2 (pprStgExpr opts expr)
+             ]
+
+   StgTick tickish expr -> sdocOption sdocSuppressTicks $ \case
+      True  -> pprStgExpr opts expr
+      False -> sep [ ppr tickish, pprStgExpr opts expr ]
+
+   -- Don't indent for a single case alternative.
+   StgCase expr bndr alt_type [alt]
+      -> sep [ sep [ text "case"
+                   , nest 4 (hsep [ pprStgExpr opts expr
+                                  , whenPprDebug (dcolon <+> ppr alt_type)
+                                  ])
+                   , text "of"
+                   , pprBndr CaseBind bndr
+                   , char '{'
+                   ]
+             , pprStgAlt opts False alt
+             , char '}'
+             ]
+
+   StgCase expr bndr alt_type alts
+      -> sep [ sep [ text "case"
+                   , nest 4 (hsep [ pprStgExpr opts expr
+                                  , whenPprDebug (dcolon <+> ppr alt_type)
+                                  ])
+                   , text "of"
+                   , pprBndr CaseBind bndr, char '{'
+                   ]
+             , nest 2 (vcat (map (pprStgAlt opts True) alts))
+             , char '}'
+             ]
+
+
+pprStgAlt :: OutputablePass pass => StgPprOpts -> Bool -> GenStgAlt pass -> SDoc
+pprStgAlt opts indent (con, params, expr)
+  | indent    = hang altPattern 4 (pprStgExpr opts expr <> semi)
+  | otherwise = sep [altPattern, pprStgExpr opts expr <> semi]
     where
       altPattern = (hsep [ppr con, sep (map (pprBndr CasePatBind) params), text "->"])
 
@@ -801,15 +806,14 @@ instance Outputable AltType where
   ppr (AlgAlt tc)     = text "Alg"    <+> ppr tc
   ppr (PrimAlt tc)    = text "Prim"   <+> ppr tc
 
-pprStgRhs :: OutputablePass pass => GenStgRhs pass -> SDoc
-
-pprStgRhs (StgRhsClosure ext cc upd_flag args body)
-  = sdocWithDynFlags $ \dflags ->
-    hang (hsep [if sccProfilingEnabled dflags then ppr cc else empty,
-                ppUnlessOption sdocSuppressStgExts (ppr ext),
-                char '\\' <> ppr upd_flag, brackets (interppSP args)])
-         4 (ppr body)
-
-pprStgRhs (StgRhsCon cc con args)
-  = hcat [ ppr cc,
-           space, ppr con, text "! ", brackets (interppSP args)]
+pprStgRhs :: OutputablePass pass => StgPprOpts -> GenStgRhs pass -> SDoc
+pprStgRhs opts rhs = case rhs of
+   StgRhsClosure ext cc upd_flag args body
+      -> hang (hsep [ if stgSccEnabled opts then ppr cc else empty
+                    , ppUnlessOption sdocSuppressStgExts (ppr ext)
+                    , char '\\' <> ppr upd_flag, brackets (interppSP args)
+                    ])
+              4 (pprStgExpr opts body)
+
+   StgRhsCon cc con args
+      -> hcat [ ppr cc, space, ppr con, text "! ", brackets (sep (map pprStgArg args))]


=====================================
compiler/GHC/Stg/Unarise.hs
=====================================
@@ -1,3 +1,5 @@
+{-# LANGUAGE FlexibleContexts #-}
+
 {-
 (c) The GRASP/AQUA Project, Glasgow University, 1992-2012
 
@@ -315,7 +317,7 @@ unariseExpr rho e@(StgApp f args)
     f' = case lookupVarEnv rho f of
            Just (UnaryVal (StgVarArg f')) -> f'
            Nothing -> f
-           err -> pprPanic "unariseExpr - app2" (ppr e $$ ppr err)
+           err -> pprPanic "unariseExpr - app2" (pprStgExpr panicStgPprOpts e $$ ppr err)
                -- Can't happen because 'args' is non-empty, and
                -- a tuple or sum cannot be applied to anything
 
@@ -334,7 +336,7 @@ unariseExpr rho (StgOpApp op args ty)
   = return (StgOpApp op (unariseFunArgs rho args) ty)
 
 unariseExpr _ e at StgLam{}
-  = pprPanic "unariseExpr: found lambda" (ppr e)
+  = pprPanic "unariseExpr: found lambda" (pprStgExpr panicStgPprOpts e)
 
 unariseExpr rho (StgCase scrut bndr alt_ty alts)
   -- tuple/sum binders in the scrutinee can always be eliminated
@@ -412,7 +414,7 @@ elimCase rho args bndr (MultiValAlt _) alts
 
 elimCase _ args bndr alt_ty alts
   = pprPanic "elimCase - unhandled case"
-      (ppr args <+> ppr bndr <+> ppr alt_ty $$ ppr alts)
+      (ppr args <+> ppr bndr <+> ppr alt_ty $$ pprPanicAlts alts)
 
 --------------------------------------------------------------------------------
 
@@ -433,7 +435,7 @@ unariseAlts rho (MultiValAlt n) bndr [(DataAlt _, ys, e)]
 
 unariseAlts _ (MultiValAlt _) bndr alts
   | isUnboxedTupleBndr bndr
-  = pprPanic "unariseExpr: strange multi val alts" (ppr alts)
+  = pprPanic "unariseExpr: strange multi val alts" (pprPanicAlts alts)
 
 -- In this case we don't need to scrutinize the tag bit
 unariseAlts rho (MultiValAlt _) bndr [(DEFAULT, _, rhs)]
@@ -484,7 +486,7 @@ unariseSumAlt rho args (DataAlt sumCon, bs, e)
        return ( LitAlt (LitNumber LitNumInt (fromIntegral (dataConTag sumCon))), [], e' )
 
 unariseSumAlt _ scrt alt
-  = pprPanic "unariseSumAlt" (ppr scrt $$ ppr alt)
+  = pprPanic "unariseSumAlt" (ppr scrt $$ pprPanicAlt alt)
 
 --------------------------------------------------------------------------------
 
@@ -776,4 +778,10 @@ mkDefaultLitAlt :: [StgAlt] -> [StgAlt]
 mkDefaultLitAlt [] = pprPanic "elimUbxSumExpr.mkDefaultAlt" (text "Empty alts")
 mkDefaultLitAlt alts@((DEFAULT, _, _) : _) = alts
 mkDefaultLitAlt ((LitAlt{}, [], rhs) : alts) = (DEFAULT, [], rhs) : alts
-mkDefaultLitAlt alts = pprPanic "mkDefaultLitAlt" (text "Not a lit alt:" <+> ppr alts)
+mkDefaultLitAlt alts = pprPanic "mkDefaultLitAlt" (text "Not a lit alt:" <+> pprPanicAlts alts)
+
+pprPanicAlts :: (Outputable a, Outputable b, OutputablePass pass) => [(a,b,GenStgExpr pass)] -> SDoc
+pprPanicAlts alts = ppr (map pprPanicAlt alts)
+
+pprPanicAlt :: (Outputable a, Outputable b, OutputablePass pass) => (a,b,GenStgExpr pass) -> SDoc
+pprPanicAlt (c,b,e) = ppr (c,b,pprStgExpr panicStgPprOpts e)


=====================================
docs/users_guide/exts/existential_quantification.rst
=====================================
@@ -173,7 +173,7 @@ For example: ::
 
     data G a b where { G1 { g1::a, g2::c } :: G a [c] }
     upd3 g x = g { g1=x }   -- OK:   upd3 :: G a b -> c -> G c b
-    upd4 g x = g { g2=x }   -- BAD (f2's type mentions c, which is not a simple
+    upd4 g x = g { g2=x }   -- BAD (g2's type mentions c, which is not a simple
                             --      type-variable argument in G1's result type)
 
 Restrictions


=====================================
rts/RtsSymbols.c
=====================================
@@ -59,6 +59,7 @@
       SymI_HasProto(signal_handlers)            \
       SymI_HasProto(stg_sig_install)            \
       SymI_HasProto(rtsTimerSignal)             \
+      SymI_HasProto(atexit)                     \
       SymI_NeedsDataProto(nocldstop)
 #endif
 
@@ -993,213 +994,29 @@
       RTS_USER_SIGNALS_SYMBOLS                                          \
       RTS_INTCHAR_SYMBOLS
 
+
 // 64-bit support functions in libgcc.a
-// See https://gcc.gnu.org/onlinedocs/gccint/Libgcc.html#Libgcc
-#define RTS_LIBGCC_SYMBOLS_32                          \
-      SymI_NeedsProto(__fixunsdfdi)                    \
-      /* 4 The GCC low-level runtime library         */\
-      /* 4.1.1 Arithmetic functions                  */\
-      /* SymI_NeedsProto(__ashlsi3) */\
-      SymI_NeedsProto(__ashldi3) \
-      /* SymI_NeedsProto(__ashlti3) */\
-      /* These functions return the result of shifting a left by b bits. */\
-      /* SymI_NeedsProto(__ashrsi3) */\
-      SymI_NeedsProto(__ashrdi3) \
-      /* SymI_NeedsProto(__ashrti3) */\
-      /* These functions return the result of arithmetically shifting a right by b bits. */\
-      /* SymI_NeedsProto(__divsi3) */\
-      SymI_NeedsProto(__divdi3) \
-      /* SymI_NeedsProto(__divti3) */\
-      /* These functions return the quotient of the signed division of a and b. */\
-      /* SymI_NeedsProto(__lshrsi3) */ \
-      SymI_NeedsProto(__lshrdi3) \
-      /* SymI_NeedsProto(__lshrti3) */ \
-      /* These functions return the result of logically shifting a right by b bits. */\
-      /* SymI_NeedsProto(__modsi3) */ \
-      SymI_NeedsProto(__moddi3) \
-      /* SymI_NeedsProto(__modti3) */ \
-      /* These functions return the remainder of the signed division of a and b. */\
-      /* SymI_NeedsProto(__mulsi3) */ \
-      SymI_NeedsProto(__muldi3) \
-      /* SymI_NeedsProto(__multi3) */ \
-      /* These functions return the product of a and b. */\
-      SymI_NeedsProto(__negdi2) \
-      /* SymI_NeedsProto(__negti2) */ \
-      /* These functions return the negation of a. */\
-      /* SymI_NeedsProto(__udivsi3) */ \
-      SymI_NeedsProto(__udivdi3) \
-      /* SymI_NeedsProto(__udivti3) */ \
-      /* These functions return the quotient of the unsigned division of a and b. */\
-      SymI_NeedsProto(__udivmoddi4) \
-      /* SymI_NeedsProto(__udivmodti4) */ \
-      /* These functions calculate both the quotient and remainder of the unsigned division of a and b. The return value is the quotient, and the remainder is placed in variable pointed to by c. */\
-      /* SymI_NeedsProto(__umodsi3) */ \
-      SymI_NeedsProto(__umoddi3) \
-      /* SymI_NeedsProto(__umodti3) */ \
-      /* These functions return the remainder of the unsigned division of a and b. */\
-      /* 4.1.2 Comparison functions */\
-      /* The following functions implement integral comparisons. These functions implement a low-level compare, upon which the higher level comparison operators (such as less than and greater than or equal to) can be constructed. The returned values lie in the range zero to two, to allow the high-level operators to be implemented by testing the returned result using either signed or unsigned comparison. */\
-      SymI_NeedsProto(__cmpdi2) \
-      /* SymI_NeedsProto(__cmpti2) */ \
-      /* These functions perform a signed comparison of a and b. If a is less than b, they return 0; if a is greater than b, they return 2; and if a and b are equal they return 1. */\
-      SymI_NeedsProto(__ucmpdi2) \
-      /* SymI_NeedsProto(__ucmpti2) */ \
-      /* These functions perform an unsigned comparison of a and b. If a is less than b, they return 0; if a is greater than b, they return 2; and if a and b are equal they return 1. */\
-      /* 4.1.3 Trapping arithmetic functions */\
-      /* The following functions implement trapping arithmetic. These functions call the libc function abort upon signed arithmetic overflow. */\
-      SymI_NeedsProto(__absvsi2) \
-      SymI_NeedsProto(__absvdi2) \
-      /* These functions return the absolute value of a. */\
-      /* SymI_NeedsProto(__addvsi3) */ \
-      SymI_NeedsProto(__addvdi3) \
-      /* These functions return the sum of a and b; that is a + b. */\
-      /* SymI_NeedsProto(__mulvsi3) */ \
-      SymI_NeedsProto(__mulvdi3) \
-      /* The functions return the product of a and b; that is a * b. */\
-      SymI_NeedsProto(__negvsi2) \
-      SymI_NeedsProto(__negvdi2) \
-      /* These functions return the negation of a; that is -a. */\
-      /* SymI_NeedsProto(__subvsi3) */ \
-      SymI_NeedsProto(__subvdi3) \
-      /* These functions return the difference between b and a; that is a - b. */\
-      /* 4.1.4 Bit operations */\
-      SymI_NeedsProto(__clzsi2) \
-      SymI_NeedsProto(__clzdi2) \
-      /* SymI_NeedsProto(__clzti2) */ \
-      /* These functions return the number of leading 0-bits in a, starting at the most significant bit position. If a is zero, the result is undefined. */\
-      SymI_NeedsProto(__ctzsi2) \
-      SymI_NeedsProto(__ctzdi2) \
-      /* SymI_NeedsProto(__ctzti2) */ \
-      /* These functions return the number of trailing 0-bits in a, starting at the least significant bit position. If a is zero, the result is undefined. */\
-      SymI_NeedsProto(__ffsdi2) \
-      /* SymI_NeedsProto(__ffsti2) */ \
-      /* These functions return the index of the least significant 1-bit in a, or the value zero if a is zero. The least significant bit is index one. */\
-      SymI_NeedsProto(__paritysi2) \
-      SymI_NeedsProto(__paritydi2) \
-      /* SymI_NeedsProto(__parityti2) */\
-      /* These functions return the value zero if the number of bits set in a is even, and the value one otherwise. */\
-      SymI_NeedsProto(__popcountsi2) \
-      SymI_NeedsProto(__popcountdi2) \
-      /* SymI_NeedsProto(__popcountti2) */ \
-      /* These functions return the number of bits set in a. */\
-      SymI_NeedsProto(__bswapsi2) \
-      SymI_NeedsProto(__bswapdi2)
-#define RTS_LIBGCC_SYMBOLS_aarch32                     \
-      /* armv6l                                      */\
-      /* TODO: should check for __ARM_EABI__         */\
-      SymI_NeedsProto(__aeabi_d2f) \
-      SymI_NeedsProto(__aeabi_d2iz) \
-      SymI_NeedsProto(__aeabi_d2lz) \
-      SymI_NeedsProto(__aeabi_d2uiz) \
-      SymI_NeedsProto(__aeabi_d2ulz) \
-      SymI_NeedsProto(__aeabi_dadd) \
-      SymI_NeedsProto(__aeabi_dcmpeq) \
-      SymI_NeedsProto(__aeabi_dcmpge) \
-      SymI_NeedsProto(__aeabi_dcmpgt) \
-      SymI_NeedsProto(__aeabi_dcmple) \
-      SymI_NeedsProto(__aeabi_dcmplt) \
-      SymI_NeedsProto(__aeabi_dcmpun) \
-      SymI_NeedsProto(__aeabi_ddiv) \
-      SymI_NeedsProto(__aeabi_dmul) \
-      SymI_NeedsProto(__aeabi_dneg) \
-      SymI_NeedsProto(__aeabi_dsub) \
-      SymI_NeedsProto(__aeabi_f2d) \
-      SymI_NeedsProto(__aeabi_f2iz) \
-      SymI_NeedsProto(__aeabi_f2lz) \
-      SymI_NeedsProto(__aeabi_f2uiz) \
-      SymI_NeedsProto(__aeabi_f2ulz) \
-      SymI_NeedsProto(__aeabi_fadd) \
-      SymI_NeedsProto(__aeabi_fcmpeq) \
-      SymI_NeedsProto(__aeabi_fcmpge) \
-      SymI_NeedsProto(__aeabi_fcmpgt) \
-      SymI_NeedsProto(__aeabi_fcmple) \
-      SymI_NeedsProto(__aeabi_fcmplt) \
-      SymI_NeedsProto(__aeabi_fcmpun) \
-      SymI_NeedsProto(__aeabi_fdiv) \
-      SymI_NeedsProto(__aeabi_fmul) \
-      SymI_NeedsProto(__aeabi_fneg) \
-      SymI_NeedsProto(__aeabi_fsub) \
-      SymI_NeedsProto(__aeabi_i2d) \
-      SymI_NeedsProto(__aeabi_i2f) \
-      SymI_NeedsProto(__aeabi_idiv) \
-      SymI_NeedsProto(__aeabi_idivmod) \
-      SymI_NeedsProto(__aeabi_l2d) \
-      SymI_NeedsProto(__aeabi_l2f) \
-      SymI_NeedsProto(__aeabi_lasr) \
-      SymI_NeedsProto(__aeabi_lcmp) \
-      SymI_NeedsProto(__aeabi_ldivmod) \
-      SymI_NeedsProto(__aeabi_llsl) \
-      SymI_NeedsProto(__aeabi_llsr) \
-      SymI_NeedsProto(__aeabi_lmul) \
-      SymI_NeedsProto(__aeabi_ui2d) \
-      SymI_NeedsProto(__aeabi_ui2f) \
-      SymI_NeedsProto(__aeabi_uidiv) \
-      SymI_NeedsProto(__aeabi_uidivmod) \
-      SymI_NeedsProto(__aeabi_ul2d) \
-      SymI_NeedsProto(__aeabi_ul2f) \
-      SymI_NeedsProto(__aeabi_ulcmp) \
-      SymI_NeedsProto(__aeabi_uldivmod)
-#define RTS_LIBGCC_SYMBOLS_64                          \
+#if defined(__GNUC__) && SIZEOF_VOID_P <= 4 && !defined(_ABIN32)
+#define RTS_LIBGCC_SYMBOLS                             \
+      SymI_NeedsProto(__divdi3)                        \
+      SymI_NeedsProto(__udivdi3)                       \
+      SymI_NeedsProto(__moddi3)                        \
+      SymI_NeedsProto(__umoddi3)                       \
+      SymI_NeedsProto(__muldi3)                        \
+      SymI_NeedsProto(__ashldi3)                       \
+      SymI_NeedsProto(__ashrdi3)                       \
+      SymI_NeedsProto(__lshrdi3)                       \
+      SymI_NeedsProto(__fixunsdfdi)
+#elif defined(__GNUC__) && SIZEOF_VOID_P == 8
+#define RTS_LIBGCC_SYMBOLS                             \
       SymI_NeedsProto(__udivti3)                       \
       SymI_NeedsProto(__umodti3)
-
-/* for aarch64                                        */
-#define RTS_LIBGCC_SYMBOLS_aarch64                     \
-      SymI_NeedsProto(__netf2)                         \
-      SymI_NeedsProto(__addtf3)                        \
-      SymI_NeedsProto(__subtf3)                        \
-      SymI_NeedsProto(__multf3)                        \
-      SymI_NeedsProto(__extenddftf2)                   \
-      SymI_NeedsProto(__fixtfsi)                       \
-      SymI_NeedsProto(__fixunstfsi)                    \
-      SymI_NeedsProto(__floatsitf)                     \
-      SymI_NeedsProto(__floatunsitf)
-
-#if defined(__GNUC__) && SIZEOF_VOID_P <= 4 && defined(arm_HOST_OS)
-#define RTS_LIBGCC_SYMBOLS RTS_LIBGCC_SYMBOLS_32 RTS_LIBGCC_SYMBOLS_aarch32
-#elif defined(__GNUC__) && SIZEOF_VOID_P <= 4 && !defined(_ABIN32)
-#define RTS_LIBGCC_SYMBOLS RTS_LIBGCC_SYMBOLS_32
-#elif defined(__GNUC__) && SIZEOF_VOID_P == 8 && defined(aarch64_HOST_OS)
-#define RTS_LIBGCC_SYMBOLS RTS_LIBGCC_SYMBOLS_64 RTS_LIBGCC_SYMBOLS_aarch64
-#elif defined(__GNUC__) && SIZEOF_VOID_P == 8
-#define RTS_LIBGCC_SYMBOLS RTS_LIBGCC_SYMBOLS_64
 #else
 #define RTS_LIBGCC_SYMBOLS
 #endif
 
-#if !defined(mingw32_HOST_OS) && !defined(DYNAMIC) && (defined(_FORTIFY_SOURCE) || defined(__SSP__))
-#define RTS_SSP_SYMBOLS                                \
-      SymI_NeedsProto(__stack_chk_guard)               \
-      SymI_NeedsProto(__stack_chk_fail)
-#else
-#define RTS_SSP_SYMBOLS
-#endif
-#if !defined(DYNAMIC) && defined(linux_HOST_OS)
-// we need these for static musl builds. However when
-// linking shared objects (DLLs) this will fail, hence
-// we do not include them when building with -DDYNAMIC
-#define RTS_LINKER_SYMBOLS                             \
-      SymI_NeedsProto(__fini_array_start)              \
-      SymI_NeedsProto(__fini_array_end)
-#else
-#define RTS_LINKER_SYMBOLS
-#endif
-
-#if defined(darwin_HOST_OS) && defined(powerpc_HOST_ARCH)
-      // Symbols that don't have a leading underscore
-      // on Mac OS X. They have to receive special treatment,
-      // see machoInitSymbolsWithoutUnderscore()
-#define RTS_MACHO_NOUNDERLINE_SYMBOLS                   \
-      SymI_NeedsProto(saveFP)                           \
-      SymI_NeedsProto(restFP)
-#endif
-
 /* entirely bogus claims about types of these symbols */
-/* to prevent a bit of define expansion, SymI_NeedsProto is a variadic
- * macro.  And we'll concat vvv with the __VA_ARGS__. This prevents
- * vvv from getting macro expanded.
- */
-#define SymI_NeedsProto(vvv,...) extern void vvv ## __VA_ARGS__ (void);
+#define SymI_NeedsProto(vvv)  extern void vvv(void);
 #define SymI_NeedsDataProto(vvv)  extern StgWord vvv[];
 #if defined(COMPILING_WINDOWS_DLL)
 #define SymE_HasProto(vvv)    SymE_HasProto(vvv);
@@ -1226,8 +1043,6 @@ RTS_DARWIN_ONLY_SYMBOLS
 RTS_OPENBSD_ONLY_SYMBOLS
 RTS_LIBGCC_SYMBOLS
 RTS_LIBFFI_SYMBOLS
-RTS_SSP_SYMBOLS
-RTS_LINKER_SYMBOLS
 #undef SymI_NeedsProto
 #undef SymI_NeedsDataProto
 #undef SymI_HasProto
@@ -1247,7 +1062,7 @@ RTS_LINKER_SYMBOLS
 #define SymE_HasDataProto(vvv) \
                     SymE_HasProto(vvv)
 
-#define SymI_NeedsProto(vvv,...) SymI_HasProto(vvv ## __VA_ARGS__)
+#define SymI_NeedsProto(vvv) SymI_HasProto(vvv)
 #define SymI_NeedsDataProto(vvv) SymI_HasDataProto(vvv)
 #define SymE_NeedsProto(vvv) SymE_HasProto(vvv)
 #define SymE_NeedsDataProto(vvv) SymE_HasDataProto(vvv)
@@ -1268,8 +1083,6 @@ RTS_LINKER_SYMBOLS
 #define SymI_HasProto_deprecated(vvv)   \
    { #vvv, (void*)0xBAADF00D, true },
 
-void *RTS_DYNAMIC = NULL;
-
 RtsSymbolVal rtsSyms[] = {
       RTS_SYMBOLS
       RTS_RET_SYMBOLS
@@ -1281,14 +1094,11 @@ RtsSymbolVal rtsSyms[] = {
       RTS_LIBGCC_SYMBOLS
       RTS_LIBFFI_SYMBOLS
       SymI_HasDataProto(nonmoving_write_barrier_enabled)
-      RTS_SSP_SYMBOLS
-      RTS_LINKER_SYMBOLS
 #if defined(darwin_HOST_OS) && defined(i386_HOST_ARCH)
       // dyld stub code contains references to this,
       // but it should never be called because we treat
       // lazy pointers as nonlazy.
       { "dyld_stub_binding_helper", (void*)0xDEADBEEF, false },
 #endif
-      { "_DYNAMIC", (void*)(&RTS_DYNAMIC), false },
       { 0, 0, false } /* sentinel */
 };



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/d114cd4737b90cf4152662df008ec443955f19b5...863c544c9849e49872acac64b8faea56a3311564

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/d114cd4737b90cf4152662df008ec443955f19b5...863c544c9849e49872acac64b8faea56a3311564
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20200721/e6a75100/attachment-0001.html>


More information about the ghc-commits mailing list