Permalink
Browse files

Merge branch 'master' into fix#5464

  • Loading branch information...
2 parents acc2451 + ec436fe commit 3f50b5b99e3c0634355d1daa4610c5c81bacbe78 @dreixel dreixel committed Oct 4, 2011
Showing with 3,900 additions and 3,612 deletions.
  1. +90 −0 aclocal.m4
  2. +4 −6 compiler/basicTypes/Literal.lhs
  3. +3 −5 compiler/basicTypes/Name.lhs
  4. +2 −1 compiler/basicTypes/Unique.lhs
  5. +504 −492 compiler/cmm/CLabel.hs
  6. +18 −12 compiler/cmm/CmmBuildInfoTables.hs
  7. +15 −12 compiler/cmm/CmmInfo.hs
  8. +57 −56 compiler/cmm/CmmLint.hs
  9. +5 −4 compiler/cmm/CmmPipeline.hs
  10. +6 −1 compiler/cmm/CmmUtils.hs
  11. +0 −11 compiler/cmm/OldCmm.hs
  12. +51 −49 compiler/cmm/OldPprCmm.hs
  13. +128 −125 compiler/cmm/PprC.hs
  14. +44 −39 compiler/cmm/PprCmm.hs
  15. +35 −29 compiler/cmm/PprCmmDecl.hs
  16. +45 −42 compiler/cmm/PprCmmExpr.hs
  17. +10 −9 compiler/codeGen/CgBindery.lhs
  18. +4 −2 compiler/codeGen/CgCon.lhs
  19. +4 −1 compiler/codeGen/CgInfoTbls.hs
  20. +1 −1 compiler/codeGen/CgPrimOp.hs
  21. +12 −8 compiler/codeGen/StgCmmBind.hs
  22. +11 −10 compiler/codeGen/StgCmmClosure.hs
  23. +4 −2 compiler/codeGen/StgCmmEnv.hs
  24. +31 −27 compiler/codeGen/StgCmmHeap.hs
  25. +14 −7 compiler/codeGen/StgCmmLayout.hs
  26. +6 −6 compiler/codeGen/StgCmmMonad.hs
  27. +1 −1 compiler/codeGen/StgCmmPrim.hs
  28. +6 −5 compiler/codeGen/StgCmmTicky.hs
  29. +1 −1 compiler/coreSyn/CoreLint.lhs
  30. +356 −362 compiler/coreSyn/CoreUtils.lhs
  31. +5 −4 compiler/deSugar/Coverage.lhs
  32. +3 −2 compiler/deSugar/Desugar.lhs
  33. +2 −2 compiler/deSugar/DsCCall.lhs
  34. +163 −157 compiler/deSugar/DsForeign.lhs
  35. +1 −1 compiler/deSugar/DsMeta.hs
  36. +77 −87 compiler/ghci/ByteCodeLink.lhs
  37. +7 −3 compiler/hsSyn/Convert.lhs
  38. +36 −7 compiler/hsSyn/HsDecls.lhs
  39. +1 −1 compiler/hsSyn/HsUtils.lhs
  40. +163 −128 compiler/iface/BinIface.hs
  41. +18 −17 compiler/iface/IfaceEnv.lhs
  42. +1 −8 compiler/iface/IfaceSyn.lhs
  43. +24 −62 compiler/iface/IfaceType.lhs
  44. +9 −19 compiler/iface/MkIface.lhs
  45. +0 −23 compiler/iface/TcIface.lhs
  46. +4 −4 compiler/llvmGen/LlvmCodeGen.hs
  47. +26 −20 compiler/llvmGen/LlvmCodeGen/Base.hs
  48. +9 −9 compiler/llvmGen/LlvmCodeGen/CodeGen.hs
  49. +5 −5 compiler/llvmGen/LlvmCodeGen/Data.hs
  50. +3 −3 compiler/llvmGen/LlvmCodeGen/Ppr.hs
  51. +4 −0 compiler/main/DynFlags.hs
  52. +3 −0 compiler/main/GhcMonad.hs
  53. +3 −3 compiler/main/HscMain.lhs
  54. +16 −11 compiler/nativeGen/AsmCodeGen.lhs
  55. +52 −52 compiler/nativeGen/PIC.hs
  56. +3 −2 compiler/nativeGen/PPC/CodeGen.hs
  57. +114 −111 compiler/nativeGen/PPC/Ppr.hs
  58. +4 −3 compiler/nativeGen/PprBase.hs
  59. +16 −10 compiler/nativeGen/RegAlloc/Graph/Main.hs
  60. +1 −1 compiler/nativeGen/RegAlloc/Graph/Stats.hs
  61. +14 −8 compiler/nativeGen/RegAlloc/Liveness.hs
  62. +5 −2 compiler/nativeGen/SPARC/CodeGen/CondCode.hs
  63. +2 −1 compiler/nativeGen/SPARC/CodeGen/Gen64.hs
  64. +116 −114 compiler/nativeGen/SPARC/Ppr.hs
  65. +8 −4 compiler/nativeGen/X86/CodeGen.hs
  66. +54 −52 compiler/nativeGen/X86/Ppr.hs
  67. +16 −5 compiler/parser/Lexer.x
  68. +7 −7 compiler/parser/Parser.y.pp
  69. +9 −12 compiler/parser/ParserCore.y
  70. +291 −302 compiler/parser/RdrHsSyn.lhs
  71. +96 −95 compiler/prelude/ForeignCall.lhs
  72. +1 −1 compiler/prelude/PrelInfo.lhs
  73. +51 −17 compiler/prelude/PrelNames.lhs
  74. +100 −103 compiler/prelude/PrimOp.lhs
  75. +12 −2 compiler/prelude/TysPrim.lhs
  76. +2 −3 compiler/prelude/TysWiredIn.lhs
  77. +5 −5 compiler/prelude/primops.txt.pp
  78. +5 −4 compiler/profiling/ProfInit.hs
  79. +1 −1 compiler/rename/RnExpr.lhs
  80. +8 −4 compiler/rename/RnNames.lhs
  81. +32 −22 compiler/rename/RnSource.lhs
  82. +16 −1 compiler/rename/RnTypes.lhs
  83. +1 −3 compiler/typecheck/TcBinds.lhs
  84. +107 −53 compiler/typecheck/TcForeign.lhs
  85. +2 −2 compiler/typecheck/TcHsSyn.lhs
  86. +3 −0 compiler/typecheck/TcHsType.lhs
  87. +10 −4 compiler/typecheck/TcInstDcls.lhs
  88. +0 −1 compiler/typecheck/TcMatches.lhs
  89. +352 −352 compiler/typecheck/TcRnMonad.lhs
  90. +1 −0 compiler/typecheck/TcRnTypes.lhs
  91. +73 −51 compiler/typecheck/TcTyClsDecls.lhs
  92. +17 −33 compiler/typecheck/TcType.lhs
  93. +1 −1 compiler/types/FamInstEnv.lhs
  94. +5 −1 compiler/types/TyCon.lhs
  95. +24 −22 compiler/utils/Binary.hs
  96. +10 −4 compiler/utils/Outputable.lhs
  97. +1 −0 compiler/utils/Platform.hs
  98. +12 −101 configure.ac
  99. +94 −80 docs/users_guide/flags.xml
  100. +12 −7 docs/users_guide/ghci.xml
  101. +21 −12 docs/users_guide/glasgow_exts.xml
  102. +2 −2 docs/users_guide/runghc.xml
  103. +57 −35 docs/users_guide/using.xml
  104. +1 −1 ghc/GhciMonad.hs
  105. +1 −0 utils/genprimopcode/Main.hs
  106. +1 −1 utils/ghctags/Main.hs
View
@@ -100,6 +100,96 @@ AC_DEFUN([FPTOOLS_SET_PLATFORM_VARS],
soext='.dylib'
;;
esac
+
+ checkArch() {
+ case [$]1 in
+ alpha|arm|hppa|hppa1_1|i386|ia64|m68k|mips|mipseb|mipsel|powerpc|powerpc64|rs6000|s390|s390x|sparc|sparc64|vax|x86_64)
+ ;;
+ *)
+ echo "Unknown arch [$]1"
+ exit 1
+ ;;
+ esac
+ }
+
+ checkVendor() {
+ case [$]1 in
+ dec|unknown|hp|apple|next|sun|sgi|ibm)
+ ;;
+ *)
+ echo "Unknown vendor [$]1"
+ exit 1
+ ;;
+ esac
+ }
+
+ checkOS() {
+ case [$]1 in
+ linux|freebsd|netbsd|openbsd|dragonfly|osf1|osf3|hpux|linuxaout|kfreebsdgnu|freebsd2|solaris2|cygwin32|mingw32|darwin|gnu|nextstep2|nextstep3|sunos4|ultrix|irix|aix|haiku)
+ ;;
+ *)
+ echo "Unknown OS '[$]1'"
+ exit 1
+ ;;
+ esac
+}
+
+BuildPlatform="$BuildArch-$BuildVendor-$BuildOS"
+BuildPlatform_CPP=`echo "$BuildPlatform" | sed -e 's/\./_/g' -e 's/-/_/g'`
+BuildArch_CPP=` echo "$BuildArch" | sed -e 's/\./_/g' -e 's/-/_/g'`
+BuildVendor_CPP=` echo "$BuildVendor" | sed -e 's/\./_/g' -e 's/-/_/g'`
+BuildOS_CPP=` echo "$BuildOS" | sed -e 's/\./_/g' -e 's/-/_/g'`
+
+checkArch "$BuildArch"
+checkVendor "$BuildVendor"
+checkOS "$BuildOS"
+
+HostPlatform="$HostArch-$HostVendor-$HostOS"
+HostPlatform_CPP=`echo "$HostPlatform" | sed -e 's/\./_/g' -e 's/-/_/g'`
+HostArch_CPP=` echo "$HostArch" | sed -e 's/\./_/g' -e 's/-/_/g'`
+HostVendor_CPP=` echo "$HostVendor" | sed -e 's/\./_/g' -e 's/-/_/g'`
+HostOS_CPP=` echo "$HostOS" | sed -e 's/\./_/g' -e 's/-/_/g'`
+
+checkArch "$HostArch"
+checkVendor "$HostVendor"
+checkOS "$HostOS"
+
+TargetPlatform="$TargetArch-$TargetVendor-$TargetOS"
+TargetPlatform_CPP=`echo "$TargetPlatform" | sed -e 's/\./_/g' -e 's/-/_/g'`
+TargetArch_CPP=` echo "$TargetArch" | sed -e 's/\./_/g' -e 's/-/_/g'`
+TargetVendor_CPP=` echo "$TargetVendor" | sed -e 's/\./_/g' -e 's/-/_/g'`
+TargetOS_CPP=` echo "$TargetOS" | sed -e 's/\./_/g' -e 's/-/_/g'`
+
+checkArch "$TargetArch"
+checkVendor "$TargetVendor"
+checkOS "$TargetOS"
+
+echo "GHC build : $BuildPlatform"
+echo "GHC host : $HostPlatform"
+echo "GHC target : $TargetPlatform"
+
+AC_SUBST(BuildPlatform)
+AC_SUBST(HostPlatform)
+AC_SUBST(TargetPlatform)
+AC_SUBST(HostPlatform_CPP)
+AC_SUBST(BuildPlatform_CPP)
+AC_SUBST(TargetPlatform_CPP)
+
+AC_SUBST(HostArch_CPP)
+AC_SUBST(BuildArch_CPP)
+AC_SUBST(TargetArch_CPP)
+
+AC_SUBST(HostOS_CPP)
+AC_SUBST(BuildOS_CPP)
+AC_SUBST(TargetOS_CPP)
+
+AC_SUBST(HostVendor_CPP)
+AC_SUBST(BuildVendor_CPP)
+AC_SUBST(TargetVendor_CPP)
+
+AC_SUBST(exeext)
+AC_SUBST(soext)
+
])
@@ -39,6 +39,8 @@ module Literal
, nullAddrLit, float2DoubleLit, double2FloatLit
) where
+#include "HsVersions.h"
+
import TysPrim
import PrelNames
import Type
@@ -220,16 +222,12 @@ instance Ord Literal where
\begin{code}
-- | Creates a 'Literal' of type @Int#@
mkMachInt :: Integer -> Literal
-mkMachInt x = -- ASSERT2( inIntRange x, integer x )
- -- Not true: you can write out of range Int# literals
- -- For example, one can write (intToWord# 0xffff0000) to
- -- get a particular Word bit-pattern, and there's no other
- -- convenient way to write such literals, which is why we allow it.
+mkMachInt x = ASSERT2( inIntRange x, integer x )
MachInt x
-- | Creates a 'Literal' of type @Word#@
mkMachWord :: Integer -> Literal
-mkMachWord x = -- ASSERT2( inWordRange x, integer x )
+mkMachWord x = ASSERT2( inWordRange x, integer x )
MachWord x
-- | Creates a 'Literal' of type @Int64#@
@@ -87,9 +87,7 @@ import FastTypes
import FastString
import Outputable
-import Data.Array
import Data.Data
-import Data.Word ( Word32 )
\end{code}
%************************************************************************
@@ -416,9 +414,9 @@ instance Binary Name where
case getUserData bh of
UserData{ ud_put_name = put_name } -> put_name bh name
- get bh = do
- i <- get bh
- return $! (ud_symtab (getUserData bh) ! fromIntegral (i::Word32))
+ get bh =
+ case getUserData bh of
+ UserData { ud_get_name = get_name } -> get_name bh
\end{code}
%************************************************************************
@@ -27,7 +27,8 @@ module Unique (
pprUnique,
mkUniqueGrimily, -- Used in UniqSupply only!
- getKey, getKeyFastInt, -- Used in Var, UniqFM, Name only!
+ getKey, getKeyFastInt, -- Used in Var, UniqFM, Name only!
+ mkUnique, unpkUnique, -- Used in BinIface only
incrUnique, -- Used for renumbering
deriveUnique, -- Ditto
Oops, something went wrong.

0 comments on commit 3f50b5b

Please sign in to comment.