[commit: ghc] wip/d1141: Refactor: delete most of the module FastTypes (3849dac)

git at git.haskell.org git at git.haskell.org
Tue Aug 18 16:42:18 UTC 2015


Repository : ssh://git@git.haskell.org/ghc

On branch  : wip/d1141
Link       : http://ghc.haskell.org/trac/ghc/changeset/3849dac59209cc2608636ae120eac54237d882c5/ghc

>---------------------------------------------------------------

commit 3849dac59209cc2608636ae120eac54237d882c5
Author: Thomas Miedema <thomasmiedema at gmail.com>
Date:   Tue Aug 18 18:38:28 2015 +0200

    Refactor: delete most of the module FastTypes
    
    This reverses some of the work done in #1405, and goes back to the
    assumption that the bootstrap compiler understands GHC-haskell.
    
    In particular:
      * use MagicHash instead of _ILIT and _CLIT
      * pattern matching on I# if possible, instead of using iUnbox
        unnecessarily
      * use Int#/Char#/Addr# instead of the following type synonyms:
        - type FastInt   = Int#
        - type FastChar  = Char#
        - type FastPtr a = Addr#
      * inline the following functions:
        - iBox           = I#
        - cBox           = C#
        - fastChr        = chr#
        - fastOrd        = ord#
        - eqFastChar     = eqChar#
        - shiftLFastInt  = uncheckedIShiftL#
        - shiftR_FastInt = uncheckedIShiftRL#
        - shiftRLFastInt = uncheckedIShiftRL#
      * delete the following unused functions:
        - minFastInt
        - maxFastInt
        - uncheckedIShiftRA#
        - castFastPtr
        - panicDocFastInt and pprPanicFastInt
      * rename panicFastInt back to panic#
    
    These functions remain, since they actually do something:
      * iUnbox
      * bitAndFastInt
      * bitOrFastInt
    
    Test Plan: validate
    
    Reviewers: austin, bgamari
    
    Subscribers: rwbarton
    
    Differential Revision: https://phabricator.haskell.org/D1141
    
    GHC Trac Issues: #1405


>---------------------------------------------------------------

3849dac59209cc2608636ae120eac54237d882c5
 compiler/basicTypes/Literal.hs                     |  33 +++--
 compiler/basicTypes/Name.hs                        |  24 ++--
 compiler/basicTypes/UniqSupply.hs                  |  19 +--
 compiler/basicTypes/Unique.hs                      |  72 +++++------
 compiler/basicTypes/Var.hs                         |  32 ++---
 compiler/basicTypes/VarEnv.hs                      |  29 +++--
 compiler/cmm/CmmOpt.hs                             |  24 +---
 compiler/coreSyn/CoreUnfold.hs                     |  66 +++++-----
 compiler/ghc.cabal.in                              |   1 -
 compiler/ghc.mk                                    |   1 -
 compiler/hsSyn/HsExpr.hs                           |   2 -
 compiler/main/GhcPlugins.hs                        |   3 +-
 compiler/nativeGen/PPC/Regs.hs                     |  33 +++--
 compiler/nativeGen/RegAlloc/Graph/TrivColorable.hs |  52 ++++----
 compiler/nativeGen/SPARC/Regs.hs                   |  45 ++++---
 compiler/nativeGen/TargetReg.hs                    |   5 +-
 compiler/nativeGen/X86/Regs.hs                     |  42 +++----
 compiler/prelude/PrimOp.hs                         |  20 ++-
 compiler/profiling/CostCentre.hs                   |  14 +--
 compiler/utils/FastFunctions.hs                    |  31 +----
 compiler/utils/FastString.hs                       |  41 +-----
 compiler/utils/FastTypes.hs                        | 138 ---------------------
 compiler/utils/Outputable.hs                       |   9 +-
 compiler/utils/Panic.hs                            |  15 +--
 compiler/utils/StringBuffer.hs                     |  23 +---
 compiler/utils/Util.hs                             |  25 ++--
 utils/genprimopcode/Main.hs                        |   4 +-
 27 files changed, 266 insertions(+), 537 deletions(-)

Diff suppressed because of size. To see it, use:

    git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc 3849dac59209cc2608636ae120eac54237d882c5


More information about the ghc-commits mailing list