[commit: ghc] master: Refactor: delete most of the module FastTypes (2f29ebb)

git at git.haskell.org git at git.haskell.org
Fri Aug 21 14:25:01 UTC 2015


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

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/2f29ebbb6f8c914f2bba624f3edcc259274df8af/ghc

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

commit 2f29ebbb6f8c914f2bba624f3edcc259274df8af
Author: Thomas Miedema <thomasmiedema at gmail.com>
Date:   Fri Aug 21 10:44:54 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


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

2f29ebbb6f8c914f2bba624f3edcc259274df8af
 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                     |  68 +++++-----
 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, 268 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 2f29ebbb6f8c914f2bba624f3edcc259274df8af


More information about the ghc-commits mailing list