Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Shayne Fletcher
Glasgow Haskell Compiler
Commits
28cb2d6d
Commit
28cb2d6d
authored
Oct 23, 2010
by
Ian Lynagh
Browse files
Follow GHC.Bool/GHC.Types merge
parent
c91279a1
Changes
12
Hide whitespace changes
Inline
Side-by-side
compiler/codeGen/StgCmmExpr.hs
View file @
28cb2d6d
...
...
@@ -550,8 +550,8 @@ if the assignment to the binder will be dead code (use isDeadBndr).
The following example illustrates how badly the code turns out:
STG:
case <=## [ww_s7Hx y_s7HD] of wild2_sbH8 {
GHC.
Bool
.False -> <true code> // sbH8 dead
GHC.
Bool
.True -> <false code> // sbH8 dead
GHC.
Types
.False -> <true code> // sbH8 dead
GHC.
Types
.True -> <false code> // sbH8 dead
};
Cmm:
_s7HD::F64 = F64[_sbH7::I64 + 7]; // MidAssign
...
...
compiler/coreSyn/CoreUnfold.lhs
View file @
28cb2d6d
...
...
@@ -871,7 +871,7 @@ But the defn of GHC.Classes.$dmmin is:
{- Arity: 3, HasNoCafRefs, Strictness: SLL,
Unfolding: (\ @ a $dOrd :: GHC.Classes.Ord a x :: a y :: a ->
case @ a GHC.Classes.<= @ a $dOrd x y of wild {
GHC.
Bool
.False -> y GHC.
Bool
.True -> x }) -}
GHC.
Types
.False -> y GHC.
Types
.True -> x }) -}
We *really* want to inline $dmmin, even though it has arity 3, in
order to unravel the recursion.
...
...
compiler/coreSyn/CoreUtils.lhs
View file @
28cb2d6d
...
...
@@ -732,8 +732,8 @@ If exprOkForSpeculation doesn't look through case expressions, you get this:
\ (ww :: GHC.Prim.Int#) ->
case ww of ds {
__DEFAULT -> case (case <# ds 5 of _ {
GHC.
Bool
.False -> lvl1;
GHC.
Bool
.True -> lvl})
GHC.
Types
.False -> lvl1;
GHC.
Types
.True -> lvl})
of _ { __DEFAULT ->
T.$wfoo (GHC.Prim.-# ds_XkE 1) };
0 -> 0
...
...
compiler/prelude/PrelNames.lhs
View file @
28cb2d6d
...
...
@@ -236,7 +236,7 @@ genericTyConNames = [crossTyConName, plusTyConName, genUnitTyConName]
pRELUDE :: Module
pRELUDE = mkBaseModule_ pRELUDE_NAME
gHC_PRIM, gHC_TYPES,
gHC_BOOL,
gHC_UNIT, gHC_ORDERING, gHC_GENERICS,
gHC_PRIM, gHC_TYPES, gHC_UNIT, gHC_ORDERING, gHC_GENERICS,
gHC_MAGIC,
gHC_CLASSES, gHC_BASE, gHC_ENUM,
gHC_SHOW, gHC_READ, gHC_NUM, gHC_INTEGER, gHC_INTEGER_TYPE, gHC_LIST, gHC_PARR,
...
...
@@ -250,7 +250,6 @@ gHC_PRIM, gHC_TYPES, gHC_BOOL, gHC_UNIT, gHC_ORDERING, gHC_GENERICS,
gHC_PRIM = mkPrimModule (fsLit "GHC.Prim") -- Primitive types and values
gHC_TYPES = mkPrimModule (fsLit "GHC.Types")
gHC_UNIT = mkPrimModule (fsLit "GHC.Unit")
gHC_BOOL = mkPrimModule (fsLit "GHC.Bool")
gHC_ORDERING = mkPrimModule (fsLit "GHC.Ordering")
gHC_GENERICS = mkPrimModule (fsLit "GHC.Generics")
gHC_MAGIC = mkPrimModule (fsLit "GHC.Magic")
...
...
compiler/prelude/TysWiredIn.lhs
View file @
28cb2d6d
...
...
@@ -153,9 +153,9 @@ intTyConName = mkWiredInTyConName UserSyntax gHC_TYPES (fsLit "Int") intTyCo
intDataConName = mkWiredInDataConName UserSyntax gHC_TYPES (fsLit "I#") intDataConKey intDataCon
boolTyConName, falseDataConName, trueDataConName :: Name
boolTyConName = mkWiredInTyConName UserSyntax gHC_
BOOL
(fsLit "Bool") boolTyConKey boolTyCon
falseDataConName = mkWiredInDataConName UserSyntax gHC_
BOOL
(fsLit "False") falseDataConKey falseDataCon
trueDataConName = mkWiredInDataConName UserSyntax gHC_
BOOL
(fsLit "True") trueDataConKey trueDataCon
boolTyConName = mkWiredInTyConName UserSyntax gHC_
TYPES
(fsLit "Bool") boolTyConKey boolTyCon
falseDataConName = mkWiredInDataConName UserSyntax gHC_
TYPES
(fsLit "False") falseDataConKey falseDataCon
trueDataConName = mkWiredInDataConName UserSyntax gHC_
TYPES
(fsLit "True") trueDataConKey trueDataCon
listTyConName, nilDataConName, consDataConName :: Name
listTyConName = mkWiredInTyConName BuiltInSyntax gHC_TYPES (fsLit "[]") listTyConKey listTyCon
...
...
compiler/simplCore/SAT.lhs
View file @
28cb2d6d
...
...
@@ -325,7 +325,7 @@ If we don't we get something like this:
[Arity 3]
GHC.Base.until =
\ (@ a_aiK)
(p_a6T :: a_aiK -> GHC.
Bool
.Bool)
(p_a6T :: a_aiK -> GHC.
Types
.Bool)
(f_a6V :: a_aiK -> a_aiK)
(x_a6X :: a_aiK) ->
letrec {
...
...
@@ -335,17 +335,17 @@ GHC.Base.until =
\ (x_a6X :: a_aiK) ->
let {
sat_shadow_r17 :: forall a_a3O.
(a_a3O -> GHC.
Bool
.Bool) -> (a_a3O -> a_a3O) -> a_a3O -> a_a3O
(a_a3O -> GHC.
Types
.Bool) -> (a_a3O -> a_a3O) -> a_a3O -> a_a3O
[]
sat_shadow_r17 =
\ (@ a_aiK)
(p_a6T :: a_aiK -> GHC.
Bool
.Bool)
(p_a6T :: a_aiK -> GHC.
Types
.Bool)
(f_a6V :: a_aiK -> a_aiK)
(x_a6X :: a_aiK) ->
sat_worker_s1aU x_a6X } in
case p_a6T x_a6X of wild_X3y [ALWAYS Dead Nothing] {
GHC.
Bool
.False -> GHC.Base.until @ a_aiK p_a6T f_a6V (f_a6V x_a6X);
GHC.
Bool
.True -> x_a6X
GHC.
Types
.False -> GHC.Base.until @ a_aiK p_a6T f_a6V (f_a6V x_a6X);
GHC.
Types
.True -> x_a6X
}; } in
sat_worker_s1aU x_a6X
...
...
rts/Exception.cmm
View file @
28cb2d6d
...
...
@@ -13,7 +13,7 @@
#include
"
Cmm.h
"
#include
"
RaiseAsync.h
"
import
ghczmprim_GHCzi
Bool
_True_closure
;
import
ghczmprim_GHCzi
Types
_True_closure
;
/* -----------------------------------------------------------------------------
Exception Primitives
...
...
@@ -498,8 +498,8 @@ retry_pop_stack:
Sp
(
5
)
=
exception
;
Sp
(
4
)
=
stg_raise_ret_info
;
Sp
(
3
)
=
exception
;
// the AP_STACK
Sp
(
2
)
=
ghczmprim_GHCzi
Bool
_True_closure
;
// dummy breakpoint info
Sp
(
1
)
=
ghczmprim_GHCzi
Bool
_True_closure
;
// True <=> a breakpoint
Sp
(
2
)
=
ghczmprim_GHCzi
Types
_True_closure
;
// dummy breakpoint info
Sp
(
1
)
=
ghczmprim_GHCzi
Types
_True_closure
;
// True <=> a breakpoint
R1
=
ioAction
;
jump
RET_LBL
(
stg_ap_pppv
);
}
...
...
rts/Prelude.h
View file @
28cb2d6d
...
...
@@ -24,8 +24,8 @@
* modules these names are defined in.
*/
PRELUDE_CLOSURE
(
ghczmprim_GHCzi
Bool
_True_closure
);
PRELUDE_CLOSURE
(
ghczmprim_GHCzi
Bool
_False_closure
);
PRELUDE_CLOSURE
(
ghczmprim_GHCzi
Types
_True_closure
);
PRELUDE_CLOSURE
(
ghczmprim_GHCzi
Types
_False_closure
);
PRELUDE_CLOSURE
(
base_GHCziPack_unpackCString_closure
);
PRELUDE_CLOSURE
(
base_GHCziWeak_runFinalizzerBatch_closure
);
...
...
@@ -82,8 +82,8 @@ PRELUDE_INFO(base_GHCziWord_W64zh_con_info);
PRELUDE_INFO
(
base_GHCziStable_StablePtr_static_info
);
PRELUDE_INFO
(
base_GHCziStable_StablePtr_con_info
);
#define True_closure DLL_IMPORT_DATA_REF(ghczmprim_GHCzi
Bool
_True_closure)
#define False_closure DLL_IMPORT_DATA_REF(ghczmprim_GHCzi
Bool
_False_closure)
#define True_closure DLL_IMPORT_DATA_REF(ghczmprim_GHCzi
Types
_True_closure)
#define False_closure DLL_IMPORT_DATA_REF(ghczmprim_GHCzi
Types
_False_closure)
#define unpackCString_closure DLL_IMPORT_DATA_REF(base_GHCziPack_unpackCString_closure)
#define runFinalizerBatch_closure DLL_IMPORT_DATA_REF(base_GHCziWeak_runFinalizzerBatch_closure)
#define mainIO_closure (&ZCMain_main_closure)
...
...
rts/PrimOps.cmm
View file @
28cb2d6d
...
...
@@ -34,7 +34,7 @@ import pthread_mutex_unlock;
import
base_ControlziExceptionziBase_nestedAtomically_closure
;
import
EnterCriticalSection
;
import
LeaveCriticalSection
;
import
ghczmprim_GHCzi
Bool
_False_closure
;
import
ghczmprim_GHCzi
Types
_False_closure
;
#if
!
defined
(
mingw32_HOST_OS
)
import
sm_mutex
;
#endif
...
...
@@ -2014,13 +2014,13 @@ stg_getSparkzh
W_
spark
;
#if
ndef
THREADED_RTS
RET_NP
(
0
,
ghczmprim_GHCzi
Bool
_False_closure
);
RET_NP
(
0
,
ghczmprim_GHCzi
Types
_False_closure
);
#else
(
spark
)
=
foreign
"
C
"
findSpark
(
MyCapability
());
if
(
spark
!=
0
)
{
RET_NP
(
1
,
spark
);
}
else
{
RET_NP
(
0
,
ghczmprim_GHCzi
Bool
_False_closure
);
RET_NP
(
0
,
ghczmprim_GHCzi
Types
_False_closure
);
}
#endif
}
...
...
rts/package.conf.in
View file @
28cb2d6d
...
...
@@ -83,8 +83,8 @@ ld-options:
, "-u", "_base_GHCziPtr_Ptr_con_info"
, "-u", "_base_GHCziPtr_FunPtr_con_info"
, "-u", "_base_GHCziStable_StablePtr_con_info"
, "-u", "_ghczmprim_GHCzi
Bool
_False_closure"
, "-u", "_ghczmprim_GHCzi
Bool
_True_closure"
, "-u", "_ghczmprim_GHCzi
Types
_False_closure"
, "-u", "_ghczmprim_GHCzi
Types
_True_closure"
, "-u", "_base_GHCziPack_unpackCString_closure"
, "-u", "_base_GHCziIOziException_stackOverflow_closure"
, "-u", "_base_GHCziIOziException_heapOverflow_closure"
...
...
@@ -121,8 +121,8 @@ ld-options:
, "-u", "base_GHCziPtr_Ptr_con_info"
, "-u", "base_GHCziPtr_FunPtr_con_info"
, "-u", "base_GHCziStable_StablePtr_con_info"
, "-u", "ghczmprim_GHCzi
Bool
_False_closure"
, "-u", "ghczmprim_GHCzi
Bool
_True_closure"
, "-u", "ghczmprim_GHCzi
Types
_False_closure"
, "-u", "ghczmprim_GHCzi
Types
_True_closure"
, "-u", "base_GHCziPack_unpackCString_closure"
, "-u", "base_GHCziIOziException_stackOverflow_closure"
, "-u", "base_GHCziIOziException_heapOverflow_closure"
...
...
rts/win32/libHSghc-prim.def
View file @
28cb2d6d
...
...
@@ -3,8 +3,8 @@ LIBRARY "libHSghc-prim-@LibVersion@-ghc@ProjectVersion@.dll"
EXPORTS
ghczmprim_GHCzi
Bool
_True_closure
ghczmprim_GHCzi
Bool
_False_closure
ghczmprim_GHCzi
Types
_True_closure
ghczmprim_GHCzi
Types
_False_closure
ghczmprim_GHCziTypes_Czh_con_info
ghczmprim_GHCziTypes_Izh_con_info
ghczmprim_GHCziTypes_Fzh_con_info
...
...
utils/genprimopcode/Main.hs
View file @
28cb2d6d
...
...
@@ -132,7 +132,7 @@ gen_hs_source (Info defaults entries) =
++
unlines
(
map
((
"
\t
"
++
)
.
hdr
)
entries
)
++
") where
\n
"
++
"
\n
"
++
"import GHC.
Bool
\n
"
++
"import GHC.
Types
\n
"
++
"
\n
"
++
"{-
\n
"
++
unlines
(
map
opt
defaults
)
...
...
@@ -487,7 +487,7 @@ gen_wrappers (Info _ entries)
-- don't need the Prelude here so we add NoImplicitPrelude.
++
"module GHC.PrimopWrappers where
\n
"
++
"import qualified GHC.Prim
\n
"
++
"import GHC.
Bool
(Bool)
\n
"
++
"import GHC.
Types
(Bool)
\n
"
++
"import GHC.Unit ()
\n
"
++
"import GHC.Prim ("
++
types
++
")
\n
"
++
unlines
(
concatMap
f
specs
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment